Commit ff6c4f83 authored by huyf's avatar huyf

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

parents 57295901 bba4cf02
...@@ -17,3 +17,18 @@ export default { ...@@ -17,3 +17,18 @@ export default {
} }
} }
</script> </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){ ...@@ -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){ export function orderWarehouseInGetAdjustInfo(params){
return request({ 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 = { ...@@ -103,6 +103,7 @@ export const DICT_TYPE = {
ECW_BEGINTIME_TYPE_ENDTIME: 'begintime_type_endtime', // 时间筛选字段(订单) ECW_BEGINTIME_TYPE_ENDTIME: 'begintime_type_endtime', // 时间筛选字段(订单)
ECW_CUSTOM_DRAWEE: 'custom_drawee', // 自定义付款人费用类型 ECW_CUSTOM_DRAWEE: 'custom_drawee', // 自定义付款人费用类型
ECW_IS_DRAFT: 'is_draft', // 草稿发布状态 ECW_IS_DRAFT: 'is_draft', // 草稿发布状态
ECW_PRICE_TYPE: 'price_type',
//--------ecw--------- //--------ecw---------
CUSTOMER_STATUS: 'customer_status', CUSTOMER_STATUS: 'customer_status',
CUSTOMER_SOURCE: 'customer_source', CUSTOMER_SOURCE: 'customer_source',
......
...@@ -113,7 +113,7 @@ ...@@ -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" @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" >反复核</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> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
...@@ -121,7 +121,7 @@ ...@@ -121,7 +121,7 @@
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.page" :limit.sync="queryParams.rows" <pagination v-show="total > 0" :total="total" :page.sync="queryParams.page" :limit.sync="queryParams.rows"
@pagination="getList" /> @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="showReleaseOrderId" :order-id="showReleaseOrderId" @close="showReleaseOrderId=null" />
<release v-if="showEditOrderId" :order-id="showEditOrderId" @close="showEditOrderId=null" /> <release v-if="showEditOrderId" :order-id="showEditOrderId" @close="showEditOrderId=null" />
</div> </div>
...@@ -132,17 +132,11 @@ import Selector from '@/components/Selector' ...@@ -132,17 +132,11 @@ import Selector from '@/components/Selector'
import ProductSelector from '@/components/ProductSelector' import ProductSelector from '@/components/ProductSelector'
import { getProductAttrList } from '@/api/ecw/productAttr' import { getProductAttrList } from '@/api/ecw/productAttr'
import CustomerSelector from '@/components/CustomerSelector' import CustomerSelector from '@/components/CustomerSelector'
import specialNeeds from '@/views/ecw/order/components/specialNeeds';
import { getTradeCityList } from '@/api/ecw/region' import { getTradeCityList } from '@/api/ecw/region'
import Transfer from '@/views/ecw/order/components/Transfer' import Transfer from '@/views/ecw/order/components/Transfer'
import Release from './components/Release' import Release from './components/Release'
import CargoControlEdit from './components/CargoControlEdit' import CargoControlEdit from './components/CargoControlEdit'
import { import { getCargoControlOrderPage } from "@/api/ecw/orderCargoControl"
getOrder,
getOrderPage,
exportOrderExcel,
getCargoControlOrderPage
} from "@/api/ecw/order";
export default { export default {
...@@ -181,7 +175,7 @@ export default { ...@@ -181,7 +175,7 @@ export default {
denominator: '', //重货比分母 denominator: '', //重货比分母
dateFilterType: '', //日期筛选类别 dateFilterType: '', //日期筛选类别
dateFilter: [], //筛选日期 dateFilter: [], //筛选日期
showTransferOrderId: null, // 控制权转移操作订单 showTransferOrder: null, // 控制权转移操作订单
showReleaseOrderId: null, // 放货ID showReleaseOrderId: null, // 放货ID
showEditOrderId: null, // 修改ID showEditOrderId: null, // 修改ID
}; };
......
<template> <template>
<div class="app-container"> <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-form ref="elForm" :model="formData" :rules="rules" size="small" label-width="100px" >
<el-row> <el-row>
<el-col :span="6"> <el-col :span="6">
...@@ -36,7 +36,7 @@ ...@@ -36,7 +36,7 @@
</el-row> </el-row>
</el-form> </el-form>
<div class="title">放货详情</div> <div class="page-title">放货详情</div>
<el-table :data="[1]" border> <el-table :data="[1]" border>
<el-table-column label="序号" width="50px"> <el-table-column label="序号" width="50px">
...@@ -77,7 +77,7 @@ ...@@ -77,7 +77,7 @@
</el-table-column> </el-table-column>
</el-table> </el-table>
<div class="title">历史放货记录</div> <div class="page-title">历史放货记录</div>
<el-table :data="[1]" border> <el-table :data="[1]" border>
<el-table-column label="序号" width="50px"> <el-table-column label="序号" width="50px">
...@@ -131,18 +131,3 @@ export default { ...@@ -131,18 +131,3 @@ export default {
} }
} }
</script> </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> <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"> <div class="" v-if="agreement">
<el-form ref="form" :model="form" label-position="left" label-width="120px"> <el-form ref="form" :model="form" :rules="rules" label-position="left" label-width="120px">
<el-form-item v-if="detail" label="原控货人"> <el-form-item label="原控货人">
<el-input v-model="detail.orderNo" readonly></el-input> <el-input v-model="cargoControlName" readonly></el-input>
</el-form-item> </el-form-item>
<el-form-item label="原控货手机号" prop="start" required> <el-form-item label="原控货手机号">
<el-input v-model.number="form.start" type="number"></el-input> <el-input v-model="cargoControlPhone" readonly></el-input>
</el-form-item> </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>
<el-form-item label="新控货手机号" prop="start" required> <el-form-item label="新控货手机号" prop="phone">
<el-input v-model.number="form.start" type="number"> <el-input v-model="form.phone" type="tel">
<el-select slot="prepend" v-model="form.areaCode" placeholder=""> <el-select slot="prepend" v-model="form.dialCode" placeholder="" style="width:200px">
<el-option :label="1" :value="1"></el-option> <el-option v-for="item in countryList" :key="item.id" :label="item.nameZh + item.tel" :value="item.tel.replace('+', '')"></el-option>
</el-select> </el-select>
</el-input> </el-input>
</el-form-item> </el-form-item>
<el-form-item label="新控货人邮箱" prop="end" required> <el-form-item label="新控货人邮箱" prop="email">
<el-input v-model.number="form.end" type="number" :max="detail ? detail.num : 1"></el-input> <el-input v-model="form.email" type="email"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="手机验证码" prop="end" required> <el-form-item label="手机验证码" prop="code">
<el-input v-model.number="form.end" type="number"> <el-input v-model.number="form.code" type="number">
<span slot="append">获取验证码</span> <send-sms-code slot="append" :order-id="orderId" scene="4" />
</el-input> </el-input>
</el-form-item> </el-form-item>
<el-form-item label=""> <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-item>
</el-form> </el-form>
</div> </div>
...@@ -42,41 +43,72 @@ ...@@ -42,41 +43,72 @@
</template> </template>
<script> <script>
import TransferAgreement from "./TransferAgreement" import TransferAgreement from "./TransferAgreement"
import {getCountryListAll} from '@/api/ecw/country'
import SendSmsCode from './SendSmsCode'
import {create} from '@/api/ecw/orderCargoControl'
export default { export default {
props:{ props:{
orderId: [String, Number] orderId: [String, Number],
cargoControlName: String,
cargoControlPhone: String,
orderNo: String
}, },
components: {TransferAgreement}, components: {TransferAgreement, SendSmsCode},
data(){ data(){
return { return {
show: false, show: false,
detail: null, // detail: null,
form:{}, form:{},
agreement: false, // 是否同意协议 agreement: false, // 是否同意协议
countryList: [],
rules:{
name: [{required: true, message: '请输入控货人'}],
phone: [{required: true, message: '请输入控货人手机'}],
// email: [{required: true, message: '请输入控货人'}],
code: [{required: true, message: '验证码不能为空'}]
}
} }
}, },
computed:{ computed:{
title(){ title(){
let t = '控货权转移' return this.orderNo
if(this.detail){ }
t += '-' + this.detail.orderNo },
watch:{
countryList(){
if(this.countryList.length){
this.$set(this.form, 'dialCode', this.countryList[0].tel.replace('+', ''))
} }
return t
} }
}, },
created(){ created(){
this.show = true this.show = true
this.loadData() getCountryListAll().then(res => {
this.countryList = res.data
})
}, },
methods:{ methods:{
loadData(){
},
closeDialog(){ closeDialog(){
this.show = false this.show = false
this.$emit('close'); 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> </script>
\ No newline at end of file
...@@ -278,7 +278,7 @@ ...@@ -278,7 +278,7 @@
<el-input v-model="form.marks" placeholder=""></el-input> <el-input v-model="form.marks" placeholder=""></el-input>
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item label="是否控货"> <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>
<!--代收货款,只有非控货订单、并且线路开通了代收货款后,才显示是否代收货款选项--> <!--代收货款,只有非控货订单、并且线路开通了代收货款后,才显示是否代收货款选项-->
<el-descriptions-item label="是否代收货款"> <el-descriptions-item label="是否代收货款">
...@@ -527,7 +527,13 @@ export default { ...@@ -527,7 +527,13 @@ export default {
this.getOpenedRouterList() this.getOpenedRouterList()
}, },
'form.transportId'(){ '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(){ consignorContact(){
......
...@@ -3,12 +3,12 @@ ...@@ -3,12 +3,12 @@
<!-- 搜索工作栏 --> <!-- 搜索工作栏 -->
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch"> <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch">
<el-form-item label="订单编号" prop="orderNo"> <el-form-item label="编号" prop="orderNo">
<el-input v-model="queryParams.orderNo" placeholder="订单编号" clearable @keyup.enter.native="handleQuery" /> <el-input v-model="queryParams.orderNo" placeholder="请输入订单号、唛头、提单号" clearable @keyup.enter.native="handleQuery" />
</el-form-item> </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-input v-model="queryParams.marks" placeholder="唛头" clearable @keyup.enter.native="handleQuery" />
</el-form-item> </el-form-item> -->
<el-form-item label="发货人" prop="consignorId"> <el-form-item label="发货人" prop="consignorId">
<el-input v-model="queryParams.consignorId" placeholder="发货人" clearable @keyup.enter.native="handleQuery" /> <el-input v-model="queryParams.consignorId" placeholder="发货人" clearable @keyup.enter.native="handleQuery" />
...@@ -17,8 +17,8 @@ ...@@ -17,8 +17,8 @@
<el-form-item label="收货人" prop="consigneeId"> <el-form-item label="收货人" prop="consigneeId">
<el-input v-model="queryParams.consigneeId" placeholder="收货人" clearable @keyup.enter.native="handleQuery" /> <el-input v-model="queryParams.consigneeId" placeholder="收货人" clearable @keyup.enter.native="handleQuery" />
</el-form-item> </el-form-item>
<el-form-item label="日期筛选"> <el-form-item label="">
<dict-selector :type="DICT_TYPE.ECW_BEGINTIME_TYPE_ENDTIME" v-model="dateFilterType" style="width: 150px; margin-right: 5px" /> <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-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> </el-form-item>
...@@ -37,7 +37,7 @@ ...@@ -37,7 +37,7 @@
<dict-selector :type="DICT_TYPE.ECW_TRANSPORT_TYPE" v-model="queryParams.transportId" formatter="number" /> <dict-selector :type="DICT_TYPE.ECW_TRANSPORT_TYPE" v-model="queryParams.transportId" formatter="number" />
</el-form-item> </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 v-model="queryParams.goodsType" :options="productAttrList" label-field="attrName" value-field="id">
</selector> </selector>
</el-form-item> </el-form-item>
...@@ -47,9 +47,10 @@ ...@@ -47,9 +47,10 @@
<el-form-item label="品牌" prop="brand"> <el-form-item label="品牌" prop="brand">
<dict-selector v-model="queryParams.brand" :type="DICT_TYPE.ECW_IS_BRAND" formatter="bool" clearable <dict-selector v-model="queryParams.brand" :type="DICT_TYPE.ECW_IS_BRAND" formatter="bool" clearable
@keyup.enter.native="handleQuery" /> @keyup.enter.native="handleQuery" />
</el-form-item> </el-form-item> -->
<el-form-item label="提单号" prop="tidanNo">
<el-input v-model="queryParams.tidanNo" placeholder="提单号" clearable @keyup.enter.native="handleQuery" /> <el-form-item label="商品" prop="tidanNo">
<el-input v-model="queryParams.product" placeholder="请输入商品类型、品名或品牌" clearable @keyup.enter.native="handleQuery" />
</el-form-item> </el-form-item>
<el-form-item label="控货" prop="isCargoControl"> <el-form-item label="控货" prop="isCargoControl">
...@@ -58,11 +59,12 @@ ...@@ -58,11 +59,12 @@
<el-form-item label="入仓类型" prop="warehouseType"> <el-form-item label="入仓类型" prop="warehouseType">
<dict-selector :type="DICT_TYPE.ECW_WAREHOUSING_TYPE" v-model="queryParams.warehousingType" /> <dict-selector :type="DICT_TYPE.ECW_WAREHOUSING_TYPE" v-model="queryParams.warehousingType" />
</el-form-item> </el-form-item>
<el-form-item label="跟进客服" > <el-form-item label="客户经理" >
<customer-selector /> <!-- <customer-selector /> -->
// TODO
</el-form-item> </el-form-item>
<el-form-item label="订单状态" prop="status"> <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" /> @keyup.enter.native="handleQuery" />
</el-form-item> </el-form-item>
<el-form-item label="报关方式" prop="customsType"> <el-form-item label="报关方式" prop="customsType">
...@@ -70,15 +72,16 @@ ...@@ -70,15 +72,16 @@
@keyup.enter.native="handleQuery" /> @keyup.enter.native="handleQuery" />
</el-form-item> </el-form-item>
<el-form-item label="是否齐货" > <el-form-item label="是否齐货" >
<!--// 字段存疑-->
<dict-selector v-model="queryParams.isCargoControl" :type="DICT_TYPE.INFRA_BOOLEAN_STRING" fomatter="bool" /> <dict-selector v-model="queryParams.isCargoControl" :type="DICT_TYPE.INFRA_BOOLEAN_STRING" fomatter="bool" />
</el-form-item> </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" <el-input style="width: 100px;" v-model="molecule" placeholder="" clearable @change="moleculeChange"
@keyup.enter.native="handleQuery" /> @keyup.enter.native="handleQuery" />
- -
<el-input style="width: 100px;" v-model="denominator" placeholder="" clearable @change="denominatorChange" <el-input style="width: 100px;" v-model="denominator" placeholder="" clearable @change="denominatorChange"
@keyup.enter.native="handleQuery" /> @keyup.enter.native="handleQuery" />
</el-form-item> </el-form-item> -->
<el-form-item label="备案属性" prop="productRecord"> <el-form-item label="备案属性" prop="productRecord">
<dict-selector :type="DICT_TYPE.PRODUCT_RECORD_ATTRIBUTE" v-model="queryParams.productRecord" clearable <dict-selector :type="DICT_TYPE.PRODUCT_RECORD_ATTRIBUTE" v-model="queryParams.productRecord" clearable
@keyup.enter.native="handleQuery" /> @keyup.enter.native="handleQuery" />
......
...@@ -55,20 +55,62 @@ ...@@ -55,20 +55,62 @@
<el-card style="margin-bottom: 10px"> <el-card style="margin-bottom: 10px">
<div slot="header" style="font-size:20px;"> <div slot="header" style="font-size:20px;">
价格设置 价格设置
<span>
<el-checkbox label="" @change="form.advanceStatus=$event ? 1 : 0">预付</el-checkbox>
<el-checkbox label="" @change="form.stepPrice=$event ? 1 : 0">阶梯订单</el-checkbox>
</span>
</div> </div>
<el-form-item label="单价模式" prop="priceType">
<dict-selector :type="DICT_TYPE.ECW_PRICE_TYPE" v-model="form.priceType" form-type="radio" defaultable />
</el-form-item>
<!--阶梯订单-->
<template v-if="form.stepPrice==1" >
<div v-for="(item, index) in priceStepList" :key="index">
<div style="font-size:14px; margin:10px 0">
{{index+1}}阶梯定价方案:
<template v-if="index == priceStepList.length - 1">
<el-link type="primary" @click.native="priceStepList.push({})">添加区间</el-link>
<el-divider direction="vertical"></el-divider>
<el-link type="danger" @click.native="priceStepList.splice(index, 1)">删除</el-link>
</template>
</div>
<el-form-item :label="`第${index+1}阶梯`">
<el-input v-model="item.startNum" type="number" placeholder="" class="w100"></el-input>
-
<el-input v-model="item.endNum" type="number" placeholder="" class="w100"></el-input>
/
<selector v-model="form.weightUnit" :options="unitList" label-field="titleZh" value-field="id" defaultable class="w100" />
</el-form-item>
<el-form-item label="默认运费" v-if="form.priceType != 1">
<inputor default="0" v-model.number="item.transportPrice" type="number" placeholder="整数或者两位小数" class="w100 mr10" />
<selector v-model="item.transportPriceUnit" :options="currencyList" label-field="titleZh" value-field="id" defaultable class="w100" />
/ <selector v-model="item.transportVolumeUnit" :options="unitList" label-field="titleZh" value-field="id" defaultable class="w100" />
</el-form-item>
<el-form-item label="默认清关费" v-if="form.priceType != 1">
<inputor default="0" v-model.number="item.clearancePrice" type="number" placeholder="整数或者两位小数" class="w100 mr10" />
<selector v-model="item.clearancePriceUnit" :options="currencyList" label-field="titleZh" value-field="id" defaultable class="w100" />
/ <selector v-model="item.clearanceVolumeUnit" :options="unitList" label-field="titleZh" value-field="id" defaultable class="w100" />
</el-form-item>
<el-form-item label="默认全包价" v-if="form.priceType == 1">
<inputor default="0" v-model.number="item.allPrice" type="number" placeholder="整数或者两位小数" class="w100 mr10" />
<selector v-model="item.allPriceUnit" :options="currencyList" label-field="titleZh" value-field="id" defaultable class="w100" />
/ <selector v-model="item.allVolumeUnit" :options="unitList" label-field="titleZh" value-field="id" defaultable class="w100" />
</el-form-item>
</div>
</template>
<template v-else>
<el-form-item label="默认运费" prop="transportPrice"> <el-form-item label="默认运费" prop="transportPrice">
<el-row :gutter="20"> <el-row :gutter="20">
<el-col :span="4"> <el-col :span="4">
<selector v-model="form.transportPriceUnit" :options="currencyList" label-field="titleZh" value-field="id" defaultable style="width:100px" /> <selector v-model="form.transportPriceUnit" :options="currencyList" label-field="titleZh" value-field="id" defaultable style="width:100px" />
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6">
<inputor default="0" v-model.number="form.transportPrice" type="number" placeholder="整数或者两位小数" /> <inputor default="0" v-model.number="form.transportPrice" type="number" placeholder="整数或者两位小数" />
</el-col> </el-col>
<el-col :span="4"> <el-col :span="4">
/ / <selector v-model="form.transportVolumeUnit" :options="unitList" label-field="titleZh" value-field="id" defaultable style="width:100px" />
<selector v-model="form.transportVolumeUnit" :options="unitList" label-field="titleZh" value-field="id" defaultable style="width:100px" />
</el-col> </el-col>
</el-row> </el-row>
</el-form-item> </el-form-item>
...@@ -126,11 +168,11 @@ ...@@ -126,11 +168,11 @@
</el-row> </el-row>
</el-form-item> </el-form-item>
</template> </template>
</template>
<!-- <el-form-item label="是否预付" prop="advanceStatus">
<el-form-item label="是否预付" prop="advanceStatus">
<dict-selector form-type="radio" :type="DICT_TYPE.ADVANCE_STATUS" v-model="form.advanceStatus" /> <dict-selector form-type="radio" :type="DICT_TYPE.ADVANCE_STATUS" v-model="form.advanceStatus" />
</el-form-item> </el-form-item> -->
</el-card> </el-card>
...@@ -181,8 +223,12 @@ export default { ...@@ -181,8 +223,12 @@ export default {
return { return {
checkList: [], checkList: [],
selectedRoutes: [], // 勾选的路线渠道 selectedRoutes: [], // 勾选的路线渠道
form: {}, form: {
stepPrice: 0,
advanceStatus: 0
},
specialProducts: [], specialProducts: [],
priceStepList: [{},{}], // 阶梯价格
// specialList:[], // 特殊需求,默认四个 // specialList:[], // 特殊需求,默认四个
rules: { rules: {
/* typeId: [{ required: true, message: "产品类型不能为空", trigger: "blur" }], /* typeId: [{ required: true, message: "产品类型不能为空", trigger: "blur" }],
...@@ -321,6 +367,9 @@ export default { ...@@ -321,6 +367,9 @@ export default {
specialList: this.specialProducts, specialList: this.specialProducts,
isAllProduct: 0 isAllProduct: 0
}) })
if(this.form.stepPrice == 1){
data.priceStepList = this.priceStepList
}
// 修改的提交 // 修改的提交
if (this.$route.query.ids) { if (this.$route.query.ids) {
...@@ -348,7 +397,7 @@ export default { ...@@ -348,7 +397,7 @@ export default {
data.productIdList = [this.form.productId] data.productIdList = [this.form.productId]
batchUpdateProductPrice(data).then(response => { batchUpdateProductPrice(data).then(response => {
this.$modal.msgSuccess("修改成功"); this.$modal.msgSuccess("修改成功");
this.$router.replace('/product/product-price') this.$router.replace('/product/product-price?' + (new URLSearchParams(this.$route.query)).toString())
}) })
return; return;
...@@ -358,10 +407,18 @@ export default { ...@@ -358,10 +407,18 @@ export default {
data.lineChannelList = this.selectedRoutes data.lineChannelList = this.selectedRoutes
createProductPrice(data).then(response => { createProductPrice(data).then(response => {
this.$modal.msgSuccess("请求成功"); this.$modal.msgSuccess("请求成功");
this.$router.replace('/product/product-price') this.$router.replace('/product/product-price?' + (new URLSearchParams(this.$route.query)).toString())
}); });
}); });
}, },
} }
} }
</script> </script>
<style scoped>
.w100{
width: 100px;
}
.mr10{
margin-right: 10px;
}
</style>
\ No newline at end of file
<template> <template>
<div class="app-container"> <div class="app-container">
<div class="page-title">{{$route.query.product_id ? productTitle + '-' : '全部'}}路线价格列表</div>
<!-- 搜索工作栏 --> <!-- 搜索工作栏 -->
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px"> <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item label="商品编码" prop="productCode"> <el-form-item label="商品编码" prop="productCode" v-if="!$route.query.product_id">
<el-input v-model="queryParams.productCode" placeholder="请输入商品编码" clearable @keyup.enter.native="handleQuery"/> <el-input v-model="queryParams.productCode" placeholder="请输入商品编码" clearable @keyup.enter.native="handleQuery"/>
</el-form-item> </el-form-item>
<el-form-item label="海关编码" prop="customsCode"> <el-form-item label="海关编码" prop="customsCode" v-if="!$route.query.product_id">
<el-input v-model="queryParams.customsCode" placeholder="请输入海关编码" clearable @keyup.enter.native="handleQuery"/> <el-input v-model="queryParams.customsCode" placeholder="请输入海关编码" clearable @keyup.enter.native="handleQuery"/>
</el-form-item> </el-form-item>
<el-form-item label="商品名称" prop="titleZh"> <el-form-item label="商品名称" prop="titleZh" v-if="!$route.query.product_id">
<el-input v-model="queryParams.titleZh" placeholder="请输入商品名称" clearable @keyup.enter.native="handleQuery"/> <el-input v-model="queryParams.titleZh" placeholder="请输入商品名称" clearable @keyup.enter.native="handleQuery"/>
</el-form-item> </el-form-item>
<el-form-item label="商品类型" prop="typeId"> <el-form-item label="商品类型" prop="typeId" v-if="!$route.query.product_id">
<el-select v-model="queryParams.typeId" placeholder="选择商品类型" clearable> <el-select v-model="queryParams.typeId" placeholder="选择商品类型" clearable>
<el-option v-for="type in typeList" :key="type.id" :label="type.titleZh" :value="type.id"/> <el-option v-for="type in typeList" :key="type.id" :label="type.titleZh" :value="type.id"/>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="商品属性" prop="attrId" v-if="!$route.query.product_id">
<el-form-item label="商品特性" prop="attrId"> <el-select v-model="queryParams.attrId" placeholder="选择商品属性" clearable>
<el-select v-model="queryParams.attrId" placeholder="选择商品特性" clearable>
<el-option v-for="attr in attrList" :key="attr.id" :label="attr.attrName" :value="attr.id"/> <el-option v-for="attr in attrList" :key="attr.id" :label="attr.attrName" :value="attr.id"/>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="商品特性" prop="attrId" v-if="!$route.query.product_id">
// TODO
</el-form-item>
<el-form-item label="运输方式" prop="transportType">
<dict-selector :type="DICT_TYPE.ECW_TRANSPORT_TYPE" v-model="queryParams.transportType" formatter="number" />
</el-form-item>
<el-form-item label="空运渠道" prop="shippingChannelId">
<el-select v-model="queryParams.shippingChannelId" clearable>
<el-option v-for="item in channelList" :key="item.id" :label="item.nameZh" :value="item.channelId" />
</el-select>
</el-form-item>
<el-form-item label="始发地" prop="startCityId"> <el-form-item label="始发地" prop="startCityId">
<el-select v-model="queryParams.startCityId" clearable> <el-select v-model="queryParams.startCityId" clearable>
<el-option v-for="city in startCityList" :key="city.id" :label="city.titleZh" :value="city.id" /> <el-option v-for="city in startCityList" :key="city.id" :label="city.titleZh" :value="city.id" />
...@@ -38,19 +47,12 @@ ...@@ -38,19 +47,12 @@
<el-option v-for="city in destCityList" :key="city.id" :label="city.titleZh" :value="city.id" /> <el-option v-for="city in destCityList" :key="city.id" :label="city.titleZh" :value="city.id" />
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="空运渠道" prop="shippingChannelId">
<el-select v-model="queryParams.shippingChannelId" clearable>
<el-option v-for="item in channelList" :key="item.id" :label="item.nameZh" :value="item.channelId" />
</el-select>
</el-form-item>
<el-form-item label="" prop="blacklist" v-if="false"> <el-form-item label="状态" prop="destCityId" v-if="!$route.query.product_id">
<el-checkbox v-model="queryParams.blacklist" // TODO
:true-label="1" :false-label="0">黑名单</el-checkbox>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-button type="primary" icon="el-icon-search" @click="handleQuery">搜索</el-button> <el-button type="primary" icon="el-icon-search" @click="handleQuery">搜索</el-button>
<el-button icon="el-icon-refresh" @click="resetQuery">重置</el-button> <el-button icon="el-icon-refresh" @click="resetQuery">重置</el-button>
...@@ -59,11 +61,16 @@ ...@@ -59,11 +61,16 @@
<!-- 操作工具栏 --> <!-- 操作工具栏 -->
<el-row :gutter="10" class="mb8"> <el-row :gutter="10" class="mb8">
<el-col :span="1.5"> <!--全部路线吗没有新增入口,指定商品的路线价格才有添加路线-->
<el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd" v-hasPermi="['ecw:product-price:create']">新增</el-button> <el-col :span="1.5" v-if="$route.query.product_id">
<el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd" v-hasPermi="['ecw:product-price:create']">添加路线</el-button>
</el-col> </el-col>
<el-col :span="1.5"> <el-col :span="1.5">
<el-button type="primary" plain icon="el-icon-setting" size="mini" @click="handleBatchEdit" :disabled="multiple" v-hasPermi="['ecw:product:attr']">批量设置路线</el-button> <el-button v-if="!$route.query.product_id" type="primary" plain icon="el-icon-setting" size="mini" @click="handleBatchEdit" :disabled="multiple">设置已选路线价格</el-button>
<el-button v-if="!$route.query.product_id" type="primary" plain icon="el-icon-setting" size="mini" @click="handleBatchEdit" :disabled="multiple">批量加入黑名单</el-button>
<el-button v-if="!$route.query.product_id" type="primary" plain icon="el-icon-setting" size="mini" @click="handleBatchEdit" :disabled="multiple">批量下架</el-button>
<el-button type="primary" plain icon="el-icon-setting" size="mini" @click="handleBatchEdit" :disabled="multiple">批量设置路线</el-button>
</el-col> </el-col>
<!-- <el-col :span="1.5"> <!-- <el-col :span="1.5">
<el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport" :loading="exportLoading" <el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport" :loading="exportLoading"
...@@ -77,7 +84,7 @@ ...@@ -77,7 +84,7 @@
<el-table-column type="selection" width="55" align="center"></el-table-column> <el-table-column type="selection" width="55" align="center"></el-table-column>
<el-table-column label="序号" prop="id" width="50" /> <el-table-column label="序号" prop="id" width="50" />
<el-table-column label="商品编码" align="center" prop="productCode" > <el-table-column label="商品编码" align="center" prop="productCode" v-if="!$route.query.product_id">
<template slot-scope="{row}"> <template slot-scope="{row}">
<div> <div>
{{ row.productDO ? row.productDO.productCode : '无productDO字段' }} {{ row.productDO ? row.productDO.productCode : '无productDO字段' }}
...@@ -85,7 +92,7 @@ ...@@ -85,7 +92,7 @@
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="海关编码" align="center" prop="customsCode" > <el-table-column label="海关编码" align="center" prop="customsCode" v-if="!$route.query.product_id">
<template slot-scope="{row}"> <template slot-scope="{row}">
<div> <div>
{{ row.productDO ? row.productDO.customsCode : '无productDO字段' }} {{ row.productDO ? row.productDO.customsCode : '无productDO字段' }}
...@@ -93,16 +100,16 @@ ...@@ -93,16 +100,16 @@
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="商品类型" align="center" prop="typeId"> <el-table-column label="商品类型" align="center" prop="typeId" v-if="!$route.query.product_id">
<template slot-scope="{row}"> <template slot-scope="{row}">
<span>{{ row.productDO ? getTypeName(row.productDO.typeId) : '无productDO字段' }}</span> <span>{{ row.productDO ? getTypeName(row.productDO.typeId) : '无productDO字段' }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="商品名称" align="center" prop="productName" > <el-table-column label="商品名称" align="center" prop="productName" v-if="!$route.query.product_id">
<template slot-scope="{row}"> <template slot-scope="{row}">
<div> <div>
{{ row.productDO ? row.productDO.titleZh : '无productDO字段' }} {{ row.productDO ? row.productDO.titleZh + '/' + row.productDO.titleEn : '无productDO字段' }}
</div> </div>
</template> </template>
</el-table-column> </el-table-column>
...@@ -154,7 +161,8 @@ ...@@ -154,7 +161,8 @@
<el-table-column prop="advanceStatus" label="预付" align="center" width="80"> <el-table-column prop="advanceStatus" label="预付" align="center" width="80">
<template slot-scope="scope"> <template slot-scope="scope">
<div> <div>
{{ getAdvanceStatuTitle(scope.row.advanceStatus) }} <!-- {{ getAdvanceStatuTitle(scope.row.advanceStatus) }} -->
<dict-tag :type="DICT_TYPE.ADVANCE_STATUS" :value="scope.row.advanceStatus"></dict-tag>
</div> </div>
</template> </template>
</el-table-column> </el-table-column>
...@@ -162,14 +170,14 @@ ...@@ -162,14 +170,14 @@
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="140"> <el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="140">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)" <el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)"
v-hasPermi="['ecw:product-price:update']">修改</el-button> v-hasPermi="['ecw:product-price:update']">编辑</el-button>
<el-button size="mini" type="text" icon="el-icon-edit" @click="updateStatus(scope.row, 'blacklist')" <el-button v-if="!$route.query.product_id" size="mini" type="text" icon="el-icon-edit" @click="updateStatus(scope.row, 'blacklist')"
v-hasPermi="['ecw:product-price:update']">{{ scope.row.blacklist == 0 ? '加入黑名单' : '移除黑名单' }}</el-button> >{{ scope.row.blacklist == 0 ? '加入黑名单' : '移除黑名单' }}</el-button>
<el-button size="mini" type="text" icon="el-icon-edit" @click="updateStatus(scope.row, 'auditStatus')" <el-button v-if="!$route.query.product_id" size="mini" type="text" icon="el-icon-edit" @click="updateStatus(scope.row, 'auditStatus')"
v-hasPermi="['ecw:product-price:update']">{{scope.row.auditStatus == AuditStatusEnum.PASS ? '下架' : '上架'}}</el-button> >{{scope.row.auditStatus == AuditStatusEnum.PASS ? '下架' : '上架'}}</el-button>
<!-- <el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)" <el-button v-if="!$route.query.product_id" size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)"
v-hasPermi="['ecw:product-price:delete']">删除</el-button> --> v-hasPermi="['ecw:product-price:delete']">删除</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
...@@ -193,6 +201,7 @@ import { AuditStatusEnum} from '@/utils/constants' ...@@ -193,6 +201,7 @@ import { AuditStatusEnum} from '@/utils/constants'
import { getChannelList } from '@/api/ecw/channel'; import { getChannelList } from '@/api/ecw/channel';
import DictTag from '@/components/DictTag' import DictTag from '@/components/DictTag'
import {arrryToKeyedObjectBy} from '@/utils/index' import {arrryToKeyedObjectBy} from '@/utils/index'
import { getProduct } from '@/api/ecw/product';
export default { export default {
name: "ProductPrice", name: "ProductPrice",
components: { components: {
...@@ -273,7 +282,7 @@ export default { ...@@ -273,7 +282,7 @@ export default {
lineList: [], lineList: [],
transportDatas: getDictDatas(DICT_TYPE.ECW_TRANSPORT_TYPE), transportDatas: getDictDatas(DICT_TYPE.ECW_TRANSPORT_TYPE),
advanceStatusDictDatas: getDictDatas(DICT_TYPE.ADVANCE_STATUS), /* advanceStatusDictDatas: getDictDatas(DICT_TYPE.ADVANCE_STATUS), */
AuditStatusEnum: AuditStatusEnum, AuditStatusEnum: AuditStatusEnum,
locationList: getDictDatas(DICT_TYPE.ECW_CONTAINER_LOCATION), locationList: getDictDatas(DICT_TYPE.ECW_CONTAINER_LOCATION),
...@@ -281,14 +290,24 @@ export default { ...@@ -281,14 +290,24 @@ export default {
}, },
computed: { computed: {
// 商品名称
productTitle(){
if(!this.product){
return ''
}
return this.product.titleZh
},
// 渠道用id做键值
keyedChannel(){ keyedChannel(){
return arrryToKeyedObjectBy(this.channelList, 'channelId') return arrryToKeyedObjectBy(this.channelList, 'channelId')
}, },
// 根据渠道id获取渠道名
channelName(){ channelName(){
return id => { return id => {
return this.keyedChannel[id] ? this.keyedChannel[id].nameZh : null return this.keyedChannel[id] ? this.keyedChannel[id].nameZh : null
} }
}, },
// 根据类型获取类型名称
getTypeName() { getTypeName() {
return typeId => { return typeId => {
for(let index in this.typeList) { for(let index in this.typeList) {
...@@ -299,7 +318,7 @@ export default { ...@@ -299,7 +318,7 @@ export default {
} }
} }
}, },
// 根据状态获取状态名称 ,这个应该可以改成字典,目前接口缺少相关数据,待定
statusName() { statusName() {
return row => { return row => {
if(row.blacklist) return '黑名单'; if(row.blacklist) return '黑名单';
...@@ -308,18 +327,13 @@ export default { ...@@ -308,18 +327,13 @@ export default {
} }
}, },
// 根据运输方式获取名称
transportName() { transportName() {
return transportType => { return transportType => {
return this.getDictDataLabel(this.DICT_TYPE.ECW_TRANSPORT_TYPE, transportType) return this.getDictDataLabel(this.DICT_TYPE.ECW_TRANSPORT_TYPE, transportType)
/* for(let index in this.transportDatas) {
let transportItem = this.transportDatas[index];
if(transportItem.value == transportType) {
return transportItem.label;
}
} */
} }
}, },
// 显示币种符号
getCurrencySymbol() { getCurrencySymbol() {
return currencyId => { return currencyId => {
for(let index in this.currecyList) { for(let index in this.currecyList) {
...@@ -330,7 +344,7 @@ export default { ...@@ -330,7 +344,7 @@ export default {
} }
} }
}, },
// 显示币种名称
getCurrencyTitle() { getCurrencyTitle() {
return currencyId => { return currencyId => {
for(let index in this.currecyList) { for(let index in this.currecyList) {
...@@ -353,7 +367,7 @@ export default { ...@@ -353,7 +367,7 @@ export default {
} }
}, },
getAdvanceStatuTitle() { /* getAdvanceStatuTitle() {
return value => { return value => {
for(let index in this.advanceStatusDictDatas) { for(let index in this.advanceStatusDictDatas) {
let dictItem = this.advanceStatusDictDatas[index]; let dictItem = this.advanceStatusDictDatas[index];
...@@ -362,7 +376,7 @@ export default { ...@@ -362,7 +376,7 @@ export default {
} }
} }
} }
} } */
}, },
activated() { activated() {
...@@ -391,13 +405,22 @@ export default { ...@@ -391,13 +405,22 @@ export default {
if(this.$route.query.product_type){ if(this.$route.query.product_type){
this.$set(this.queryParams, 'typeId', +this.$route.query.product_type); this.$set(this.queryParams, 'typeId', +this.$route.query.product_type);
} }
// 指定产品获取产品信息
if(this.$route.query.product_id){
getProduct(this.$route.query.product_id).then(res => {
this.product = res.data
})
}else{
// 不指定产品获取类型等信息
this.getTypeList(); this.getTypeList();
this.getChannelList()
this.getAttrList();
//获取城市列表 //获取城市列表
this.getAllCityList(); this.getAllCityList();
this.getAttrList();
}
this.getChannelList()
//获取货币列表 //获取货币列表
this.requestCurrencyList(); this.requestCurrencyList();
//获取单位列表 //获取单位列表
......
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