Commit 1473a407 authored by dragondean@qq.com's avatar dragondean@qq.com
parents 6e8983d1 a9793157
......@@ -82,6 +82,26 @@ const mutations = {
}
return false
})
},
DEL_LEFT_VIEWS: (state, view) => {
const index = state.visitedViews.findIndex(v => v.path === view.path)
if (index === -1) {
return
}
state.visitedViews = state.visitedViews.filter((item, idx) => {
if (idx >= index || (item.meta && item.meta.affix)) {
return true
}
const i = state.cachedViews.indexOf(item.name)
if (i > -1) {
state.cachedViews.splice(i, 1)
}
if(item.meta.link) {
const fi = state.iframeViews.findIndex(v => v.path === item.path)
state.iframeViews.splice(fi, 1)
}
return false
})
}
}
......@@ -176,6 +196,12 @@ const actions = {
resolve([...state.visitedViews])
})
},
delLeftTags({ commit }, view){
return new Promise(resolve => {
commit('DEL_LEFT_VIEWS', view)
resolve([...state.visitedViews])
})
},
delCurrentView({ dispatch }){
const view = router.history.current
return dispatch('delView', view).then(({visitedViews}) => {
......
......@@ -131,7 +131,7 @@ import {approveTask, getTaskListByProcessInstanceId, rejectTask, updateTaskAssig
import {getDate} from "@/utils/dateUtils";
import {listSimpleUsers} from "@/api/system/user";
import {getActivityList} from "@/api/bpm/activity";
import SpecialDetail from "@/views/ecw/offer/components/SpecialDetail"
import SpecialDetail from "@/views/ecw/offer/components/specialDetail"
import warehouseDetails from "@/views/ecw/order/components/warehouseDetails";
import shippingDetail from '@/views/ecw/box/shippingDetail'
import SplitDetail from '@/views/ecw/order/components/SplitDetail'
......
......@@ -53,7 +53,7 @@
<el-button icon="el-icon-refresh" @click="resetQuery">重置</el-button></div>
<div style="flex: 1; text-align: right;">
<router-link :to="'/customerCommissionInfo/'+ 0 ">
<el-button>佣金设置</el-button>
<el-button type="primary">佣金设置</el-button>
</router-link>
</div>
</div>
......@@ -119,7 +119,7 @@
</el-table-column>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="200px">
<template slot-scope="scope">
<el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)">编辑</el-button>
<!-- <el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)">编辑</el-button>-->
<el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)">删除</el-button>
</template>
</el-table-column>
......
<template>
<el-select v-if="options" v-model="selectVal" placeholder="请选择">
<el-option v-if="allShow" label="全部" :value='0'></el-option>
<el-option
v-for="item in options"
:key="item[valueKey]"
......@@ -26,6 +27,10 @@ export default {
type:String,
default: 'value',
},
allShow:{
type:Boolean,
default:false
}
},
data(){
return{
......
......@@ -6,43 +6,47 @@
<el-row>
<el-col :span="5">
<el-form-item label="客户名称" prop="customerId">
<el-select
v-model="customerForm.name"
filterable
placeholder="请输入关键词"
@change="changefn">
<el-option
v-for="item in customeList"
:key="item.id"
:value="item.id.toString()"
:label="item.name"
>
{{ item.number }}|{{ item.name }}|{{ item.defaultContactPhone }}
</el-option>
</el-select>
<div style="display: flex">
<el-input placeholder="请输入选择客户" v-model="customerName"></el-input>
<img style="width: 40px;height: 40px;margin-left: 40px;" src="@/assets/images/phonebook.png" class="phonebook" @click="customerNameShow= true" />
</div>
<!-- <el-select-->
<!-- v-model="customerForm.name"-->
<!-- filterable-->
<!-- placeholder="请输入关键词"-->
<!-- @change="changefn">-->
<!-- <el-option-->
<!-- v-for="item in customeList"-->
<!-- :key="item.id"-->
<!-- :value="item.id.toString()"-->
<!-- :label="item.name"-->
<!-- >-->
<!-- {{ item.number }}|{{ item.name }}|{{ item.defaultContactPhone }}-->
<!-- </el-option>-->
<!-- </el-select>-->
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="5">
<el-form-item label="运输方式" prop="transportId">
<div>
<custom-selectors-dictionary v-model="form.transportId" :options="getDictDatas(DICT_TYPE.ECW_TRANSPORT_TYPE)"></custom-selectors-dictionary>
<custom-selectors-dictionary :all-show="true" v-model="form.transportId" :options="getDictDatas(DICT_TYPE.ECW_TRANSPORT_TYPE)"></custom-selectors-dictionary>
</div>
</el-form-item>
</el-col>
<el-col :span="5">
<el-form-item label="始发地" prop="departureId">
<div>
<custom-selectors-dictionary label-key="titleZh" value-key="id" v-model="form.departureId"
<custom-selectors-dictionary :all-show="true" label-key="titleZh" value-key="id" v-model="form.departureId"
:options="exportCityList"></custom-selectors-dictionary>
</div>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="5">
<el-form-item label="目的地" prop="objectiveId">
<div>
<custom-selectors-dictionary label-key="titleZh" value-key="id" v-model="form.objectiveId"
<custom-selectors-dictionary :all-show="true" label-key="titleZh" value-key="id" v-model="form.objectiveId"
:options="importCityList"></custom-selectors-dictionary>
</div>
</el-form-item>
......@@ -50,7 +54,7 @@
<el-col :span="5">
<el-form-item label="报关方式" prop="customsType">
<div>
<custom-selectors-dictionary v-model="form.customsType"
<custom-selectors-dictionary :all-show="true" v-model="form.customsType"
:options="getDictDatas(DICT_TYPE.SHIPPING_DECLARATION_TYPE)"></custom-selectors-dictionary>
</div>
</el-form-item>
......@@ -58,7 +62,7 @@
<el-col :span="5">
<el-form-item label="备案" prop="approval">
<div>
<custom-selectors-dictionary v-model="form.approval"
<custom-selectors-dictionary :all-show="true" v-model="form.approval"
:options="getDictDatas(DICT_TYPE.COMMISSION_PRODUCT_APPROVAL)"></custom-selectors-dictionary>
</div>
</el-form-item>
......@@ -109,7 +113,7 @@
<el-form-item label="商品类型" v-for="(item,index) in darkServantAndProductForm" :key="index">
<div class="shanping-type">
<div class="tool">
<custom-selectors-dictionary v-model="item.productType" :options="commodity" label-key="titleZh"
<custom-selectors-dictionary :all-show="true" v-model="item.productType" :options="productAttrList" label-key="titleZh"
value-key="id"></custom-selectors-dictionary>
</div>
<div class="box">
......@@ -117,7 +121,7 @@
商品特性
</div>
<div class="custom">
<custom-selectors-dictionary v-model="item.productAttr" label-key="attrName" value-key="id"
<custom-selectors-dictionary :all-show="true" v-model="item.productAttr" label-key="attrName" value-key="id"
:options="commodityType"></custom-selectors-dictionary>
</div>
</div>
......@@ -229,6 +233,7 @@
</el-row>
</el-card>
</el-form>
<choose-contact-dialog v-if="customerNameShow" @choose="onContactChoose" @close="customerNameShow = false" />
</div>
</template>
......@@ -244,16 +249,20 @@ import {getTradeCityList} from "@/api/ecw/region";
import RoutersSelector from "@/components/RoutersSelector"
import CustomersSelector from "@/components/CustomersSelector";
import {getUnitList} from "@/api/ecw/unit";
import ChooseContactDialog from '@/components/ChooseContactDialog'
import {getProductTypeList} from "@/api/ecw/productType";
export default {
name: "CustomerCommissionInfo",
components: {
customSelectorsDictionary,
RoutersSelector,
CustomersSelector
CustomersSelector,
ChooseContactDialog
},
data() {
return {
customerName:undefined,
customerNameShow:false,
value: '',
isSubmit:false,
getDictDatas,
......@@ -262,20 +271,20 @@ export default {
tradeCityList: [],
// 表单参数
form: {
approval: undefined,// 产品备案
approval: 0,// 产品备案
customerCommissionInfoBaseVOList: [],// 佣金详情
customerId: undefined,//客户id
customsType: undefined,//报关类别:我司全代:1,自单代报:2,混合报关:3
customsType: 0,//报关类别:我司全代:1,自单代报:2,混合报关:3
darkReturnType: parseInt(this.getDictDatas(this.DICT_TYPE.COMMISSION_DARK_TYPE)[0].value),// 暗佣类型 1产品2达标
departureId: undefined,// 始发地id
objectiveId: undefined,//目的地id
transportId:undefined,//运输方式
departureId: 0,// 始发地id
objectiveId: 0 ,//目的地id
transportId:0,//运输方式
type: parseInt(this.getDictDatas(this.DICT_TYPE.COMMISSION_TYPE)[1].value),// 佣金类型
},
//明佣
mingServantFrom: [
{
refund: 0,
refund: 1,
refundCurrency:parseInt(this.getDictDatas(this.DICT_TYPE.COMMISSION_CURRENCY_TYPE)[0].value),
refundUnit:undefined,
}
......@@ -283,9 +292,9 @@ export default {
//暗佣金+产品
darkServantAndProductForm: [
{
productType:undefined,//商品类型
productAttr: undefined,//暗佣 产品属性
darkCommission: 0,//暗佣 佣金
productType:0,//商品类型
productAttr: 0,//暗佣 产品属性
darkCommission: 1,//暗佣 佣金
darkCurrency: parseInt(this.getDictDatas(this.DICT_TYPE.COMMISSION_CURRENCY_TYPE)[0].value),// 暗佣 货币
darkUnit:undefined,// 暗佣 单位
}
......@@ -293,10 +302,10 @@ export default {
//暗佣+达标返佣
darkServantAndRebateForm: [
{
amount: 0,// 暗佣-满减金额
amount: 1,// 暗佣-满减金额
amountCurrency:parseInt(this.getDictDatas(this.DICT_TYPE.COMMISSION_CURRENCY_TYPE)[0].value),// 暗佣-满减金额对应货币
amountUnit:undefined,// 暗佣-满减金额对应单位,
refund: 0,//暗佣-满之后返还金额
refund: 1,//暗佣-满之后返还金额
refundCurrency:parseInt(this.getDictDatas(this.DICT_TYPE.COMMISSION_CURRENCY_TYPE)[0].value),//暗佣-满之后返还金额的货币
refundUnit:undefined,//暗佣-满之后返还金额的单位
}
......@@ -304,10 +313,10 @@ export default {
//暗佣+明金
mingServantAnddarkServant: [
{
refund: 0,// 暗佣+明佣 上调金额
refund: 1,// 暗佣+明佣 上调金额
refundCurrency: parseInt(this.getDictDatas(this.DICT_TYPE.COMMISSION_CURRENCY_TYPE)[0].value),// 暗佣+明佣 上调对应的货币
refundUnit: undefined,//暗佣+明佣 上调对应的单位
darkAdjustCommission: 0,//暗佣+明佣 上调金额
darkAdjustCommission: 1,//暗佣+明佣 上调金额
darkAdjustCurrency: parseInt(this.getDictDatas(this.DICT_TYPE.COMMISSION_CURRENCY_TYPE)[0].value),//暗佣+明佣 上调对应的货币
darkAdjustUnit:undefined,//暗佣+明佣 上调对应的单位
}
......@@ -326,8 +335,8 @@ export default {
},
customerShow: true,
id:undefined,//佣金id
weightList:[]
weightList:[],
productAttrList:[]
};
},
computed:{
......@@ -339,37 +348,41 @@ export default {
},
},
created() {
getProductTypeList().then(response => {
console.log(response.data,'response.data')
this.productAttrList = response.data
})
//重量单位
getUnitList().then(r =>{
if(r.code === 0){
this.weightList = r.data
this.$set(this.mingServantFrom,0, {
refund: 0,
refund: 1,
refundCurrency:parseInt(this.getDictDatas(this.DICT_TYPE.COMMISSION_CURRENCY_TYPE)[0].value),
refundUnit: parseInt(this.weightList[0].id),})
this.$set(this.darkServantAndProductForm, 0,
{
productType: undefined,//商品类型
productAttr: undefined,//暗佣 产品属性
darkCommission: 0,//暗佣 佣金
productType: 0,//商品类型
productAttr: 0,//暗佣 产品属性
darkCommission: 1,//暗佣 佣金
darkCurrency: parseInt(this.getDictDatas(this.DICT_TYPE.COMMISSION_CURRENCY_TYPE)[0].value),// 暗佣 货币
darkUnit: parseInt(this.weightList[0].id),// 暗佣 单位
})
this.$set(this.darkServantAndRebateForm, 0,
{
amount: 0,// 暗佣-满减金额
amount: 1,// 暗佣-满减金额
amountCurrency:parseInt(this.getDictDatas(this.DICT_TYPE.COMMISSION_CURRENCY_TYPE)[0].value),// 暗佣-满减金额对应货币
amountUnit:parseInt (this.weightList[0].id),// 暗佣-满减金额对应单位,
refund: 0,//暗佣-满之后返还金额
refund: 1,//暗佣-满之后返还金额
refundCurrency:parseInt(this.getDictDatas(this.DICT_TYPE.COMMISSION_CURRENCY_TYPE)[0].value),//暗佣-满之后返还金额的货币
refundUnit:parseInt(this.weightList[0].id),//暗佣-满之后返还金额的单位
})
this.$set(this.mingServantAnddarkServant, 0,
{
refund: 0,// 暗佣+明佣 上调金额
refund: 1,// 暗佣+明佣 上调金额
refundCurrency: parseInt(this.getDictDatas(this.DICT_TYPE.COMMISSION_CURRENCY_TYPE)[0].value),// 暗佣+明佣 上调对应的货币
refundUnit: parseInt(this.weightList[0].id),//暗佣+明佣 上调对应的单位
darkAdjustCommission: 0,//暗佣+明佣 上调金额
darkAdjustCommission: 1,//暗佣+明佣 上调金额
darkAdjustCurrency: parseInt(this.getDictDatas(this.DICT_TYPE.COMMISSION_CURRENCY_TYPE)[0].value),//暗佣+明佣 上调对应的货币
darkAdjustUnit:parseInt(this.weightList[0].id),//暗佣+明佣 上调对应的单位
})
......@@ -453,10 +466,10 @@ export default {
approval: undefined,
customerCommissionInfoBaseVOList: [],
customerId: undefined,//客户id
customsType: undefined,//报关类别:我司全代:1,自单代报:2,混合报关:3
customsType: '',//报关类别:我司全代:1,自单代报:2,混合报关:3
darkReturnType: this.getDictDatas(this.DICT_TYPE.COMMISSION_DARK_TYPE)[0].value,// 暗佣类型 1产品2达标
departureId: undefined,// 始发地id
objectiveId: undefined,// 运输方式
departureId: '',// 始发地id
objectiveId: '',// 运输方式
type: this.getDictDatas(this.DICT_TYPE.COMMISSION_TYPE)[1].value,// 佣金类型
};
this.resetForm("form");
......@@ -465,18 +478,18 @@ export default {
addToFn(val){
if(val === 1){
this.darkServantAndProductForm.push({
productType:this.commodity[0].id,//商品类型
productAttr: this.commodityType[0].id,//暗佣 产品属性
darkCommission: 0,//暗佣 佣金
productType:0,//商品类型
productAttr:0,//暗佣 产品属性
darkCommission: 1,//暗佣 佣金
darkCurrency: parseInt(this.getDictDatas(this.DICT_TYPE.COMMISSION_CURRENCY_TYPE)[0].value),// 暗佣 货币
darkUnit:this.darkServantAndProductForm[0].darkUnit,// 暗佣 单位
})
}else {
this.darkServantAndRebateForm.push( {
amount: 0,// 暗佣-满减金额
amount: 1,// 暗佣-满减金额
amountCurrency:parseInt(this.getDictDatas(this.DICT_TYPE.COMMISSION_CURRENCY_TYPE)[0].value),// 暗佣-满减金额对应货币
amountUnit: parseInt(this.weightList[0].id),// 暗佣-满减金额对应单位,
refund: 0,//暗佣-满之后返还金额
refund: 1,//暗佣-满之后返还金额
refundCurrency: parseInt(this.getDictDatas(this.DICT_TYPE.COMMISSION_CURRENCY_TYPE)[0].value),//暗佣-满之后返还金额的货币
refundUnit: this.darkServantAndRebateForm[0].refundUnit,//暗佣-满之后返还金额的单位
})
......@@ -488,21 +501,25 @@ export default {
this.isSubmit = true;
if(!valid)return
if (this.form.type == 1) {
if(Number(this.mingServantFrom[0].refund) <= 0 || isNaN(Number(this.mingServantFrom[0].refund))) return this.$message.warning('请输入大于0的金额')
this.form.customerCommissionInfoBaseVOList = this.mingServantFrom
} else if (this.form.type == 2) {
if (this.form.darkReturnType == 1) {
if(this.darkServantAndProductForm.some(i => i.darkCommission <= 0 || isNaN(i.darkCommission))) return this.$message.warning('请输入大于0的金额')
this.form.customerCommissionInfoBaseVOList = this.darkServantAndProductForm
} else {
if(this.darkServantAndRebateForm.some(i => i.amount <= 0 || i.refund <=0)) return this.$message.warning('请输入大于0的金额')
this.form.customerCommissionInfoBaseVOList = this.darkServantAndRebateForm
}
} else if (this.form.type == 3) {
if(this.mingServantAnddarkServant[0].darkAdjustCommission <= 0 || this.mingServantAnddarkServant[0].refund <= 0 ) return this.$message.warning('请输入大于0的金额')
this.form.customerCommissionInfoBaseVOList = this.mingServantAnddarkServant
}
if(this.$route.params.dictId == 0){
createCommission(this.form).then(r =>{
console.log('添加',r)
if(r.code == 0){
this.$message('添加成功!');
this.$message.success('添加成功!');
this.$router.go(-1)
}
})
......@@ -513,10 +530,9 @@ export default {
}
p.customerCommissionInfoBaseVOList.forEach(item => {item.commissionId = this.$route.params.dictId})
updateCustomerCommissionInfo(p).then(r=>{
console.log('更新',r)
if(r.code == 0){
this.$router.go(-1)
this.$message('修改成功!');
this.$message.success('修改成功!');
}
})
}
......@@ -529,7 +545,7 @@ export default {
if (res.code === 0) {
this.commodityType = res.data;
if(this.$route.params.dictId == 0 || (this.form.type == 2 && this.form.darkReturnType != 1)){
this.darkServantAndProductForm.forEach(item =>{item.productAttr = this.commodityType[0].id})
this.darkServantAndProductForm.forEach(item =>{item.productAttr = 0})
}
}
})
......@@ -539,9 +555,15 @@ export default {
commodityList().then(res => {
this.commodity = res.data
if(this.$route.params.dictId == 0 || (this.form.type == 2 && this.form.darkReturnType != 1)){
this.darkServantAndProductForm.forEach(item=>{item.productType =this.commodity[0].id})
this.darkServantAndProductForm.forEach(item=>{item.productType = 0})
}
})
},
onContactChoose(val){
this.customerNameShow = false;
this.customerName = val.customerName;
this.form.customerId = val.customerId;
}
},
watch:{
......@@ -554,7 +576,7 @@ export default {
deep:true,
},
'form.transportId':function (val){
if(!this.weightList) return
if(this.weightList.length === 0 || !val) return
if((val == 1 || val == 2)){
let index = this.weightList.findIndex(item => item.id == 7);
this.mingServantFrom.forEach(item =>{
......
......@@ -736,7 +736,7 @@ export default {
};
</script>
<style>
<style scoped>
.card {
margin-top: 20px;
}
......
......@@ -330,7 +330,7 @@ export default {
};
</script>
<style>
<style scoped>
.card {
margin-top: 20px;
}
......
......@@ -319,7 +319,7 @@ export default {
};
</script>
<style>
<style scoped>
.card {
margin-top: 20px;
}
......
......@@ -384,7 +384,7 @@ export default {
};
</script>
<style>
<style scoped>
.card {
margin-top: 20px;
}
......
......@@ -13,7 +13,7 @@
<el-descriptions-item :label="$t('出货渠道')">
{{channel ? $l(channel, 'name') : '/'}}
</el-descriptions-item>
<el-descriptions-item :label="$t('创建时间')">{{offer.createTime}}</el-descriptions-item>
<el-descriptions-item :label="$t('状态')">
<dict-tag :type="DICT_TYPE.ECW_OFFER_STATUS" :value="offer.status" />
......@@ -43,7 +43,7 @@
<dict-tag :value="row.unit" :type="DICT_TYPE.ECW_PACKAGE_TYPE" />
</template>
</el-table-column>
<el-table-column
:label="$t('原价')">
<template v-slot="{row}">
......@@ -98,7 +98,7 @@ import {getProductAttrList} from "@/api/ecw/productAttr"
import { parseTime } from '@/utils/ruoyi'
import {listByIds} from '@/api/ecw/region'
import {getChannel} from '@/api/ecw/channel'
import SpecialDiscount from '@/views/ecw/offer/components/SpecialDiscount'
import SpecialDiscount from '@/views/ecw/offer/components/specialDiscount'
import Commossion from '@/views/ecw/offer/components/Commossion'
export default {
......@@ -161,7 +161,7 @@ export default {
})
},
getChannel(){
if(!this.offer.channelId) return
if(!this.offer.channelId) return
getChannel(this.offer.channelId).then(res => {
this.channel = res.data
})
......
......@@ -9,12 +9,12 @@
v-bind="$attrs"
>
<el-tabs v-model="activeName" type="card" @tab-click="activeWarehouse = {}">
<el-tab-pane v-if="item.warehouseId === warehouseId" :label="item.name" :name="'' + index" v-for="(item, index) in area" :key="index">
<el-tab-pane v-if="item.warehouseId === warehouseId" :label="item.name" :name="'' + index" v-for="(item, index) in area" :key="item.id + index">
<div>
<div style="text-align: center">区域</div>
<div style="background-color: #efefef;padding: 10px 10px 0;border: #dcdcdc solid 1px;border-radius: 2px">
<el-row :gutter="20">
<el-col :span="12" v-for="(warehouse, i) in item.children" :key="i">
<el-col :span="12" v-for="(warehouse, i) in item.children" :key="warehouse.id + i">
<div
class="warehouse-block"
:class="{'warehouse-block-selected': warehouse.selected, 'warehouse-block-active': warehouse.id === activeWarehouse.id}"
......@@ -29,7 +29,7 @@
<div>
<div style="text-align: center">仓位</div>
<div class="position-group">
<div class="position" v-for="position in activeWarehouse.positionList" :key="item.id">
<div class="position" v-for="(position ,index) in activeWarehouse.positionList" :key="item.id + index ">
<div
class="position-item"
v-for="item in position.children"
......
......@@ -4,7 +4,7 @@
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="100px">
<el-row>
<el-form-item >
<el-select v-model="queryParams.dateType" style="width: 172px;">
<el-select v-model="queryParams.dateType" style="width: 172px;" clearable>
<el-option :label="$t('入仓时间')" value="1"/>
<el-option :label="$t('处理时间')" value="2"/>
</el-select>
......@@ -13,28 +13,28 @@
<el-date-picker clearable v-model="queryParams.endCreateTime" value-format="yyyy-MM-dd HH:mm:ss" format="yyyy-MM-dd HH:mm:ss" type="datetime" :placeholder="$t('请选择结束日期')" />
</el-form-item>
<el-form-item :label="$t('始发地:')">
<el-select v-model="queryParams.originId" :placeholder="$t('请选择始发地')">
<el-select v-model="queryParams.originId" :placeholder="$t('请选择始发地')" clearable>
<el-option v-for="item in expoerCityList" :label="$l(item, 'title')" :value="item.id" :key="item.id"></el-option>
</el-select>
</el-form-item>
<el-form-item :label="$t('目的地:')" >
<el-select v-model="queryParams.destinationId" :placeholder="$t('请选择目的地')">
<el-select v-model="queryParams.destinationId" :placeholder="$t('请选择目的地')" clearable>
<el-option v-for="item in importCityList" :label="$l(item, 'title')" :value="item.id" :key="item.id" ></el-option>
</el-select>
</el-form-item>
<el-form-item :label="$t('运输方式:')" >
<dict-selector :type="DICT_TYPE.ECW_TRANSPORT_TYPE" v-model="queryParams.transportId" formatter="number"/>
<dict-selector :type="DICT_TYPE.ECW_TRANSPORT_TYPE" :clearable="true" v-model="queryParams.transportId" />
</el-form-item>
</el-row>
<el-row>
<el-form-item :label="$t('控货:')">
<dict-selector :type="DICT_TYPE.ECW_YESNO" v-model="queryParams.isCargoControl" @keyup.enter.native="handleQuery"/>
<dict-selector :type="DICT_TYPE.ECW_YESNO" :clearable="true" v-model="queryParams.isCargoControl" @keyup.enter.native="handleQuery"/>
</el-form-item>
<el-form-item :label="$t('异常状态:')">
<dict-selector :type="DICT_TYPE.ORDER_EXCEPTION_STATUS" v-model="queryParams.orderExceptionStatus" @keyup.enter.native="handleQuery"/>
<dict-selector :type="DICT_TYPE.ORDER_EXCEPTION_STATUS" :clearable="true" v-model="queryParams.orderExceptionStatus" @keyup.enter.native="handleQuery"/>
</el-form-item>
<el-form-item :label="$t('异常类型:')">
<dict-selector :type="DICT_TYPE.ORDER_ERROR_TYPE" v-model="queryParams.orderExceptionType" @keyup.enter.native="handleQuery"/>
<dict-selector :type="DICT_TYPE.ORDER_ERROR_TYPE" :clearable="true" v-model="queryParams.orderExceptionType" @keyup.enter.native="handleQuery"/>
</el-form-item>
<el-form-item :label="$t('订单号:')">
<el-input v-model="queryParams.orderNo" :placeholder="$t('请输入订单号')" clearable @keyup.enter.native="handleQuery"/>
......@@ -42,21 +42,21 @@
</el-row>
<el-row>
<el-form-item :label="$t('发货人:')">
<customer-selector v-model="queryParams.consignor" @change="consignor = $event" />
<customer-selector v-model="queryParams.consignor" :clearable="true" @change="consignor = $event" />
</el-form-item>
<el-form-item :label="$t('唛头:')">
<el-input v-model="queryParams.marks" :placeholder="$t('请输入唛头')" clearable @keyup.enter.native="handleQuery"/>
</el-form-item>
<el-form-item :label="$t('品名:')">
<product-selector v-model="queryParams.goodsName" @keyup.enter.native="handleQuery" />
<product-selector v-model="queryParams.goodsName" :clearable="true" @keyup.enter.native="handleQuery" />
</el-form-item>
<el-form-item :label="$t('备案:')">
<dict-selector :type="DICT_TYPE.PRODUCT_RECORD_ATTRIBUTE" v-model="queryParams.productRecord" @keyup.enter.native="handleQuery"/>
<dict-selector :type="DICT_TYPE.PRODUCT_RECORD_ATTRIBUTE" :clearable="true" v-model="queryParams.productRecord" @keyup.enter.native="handleQuery"/>
</el-form-item>
</el-row>
<el-row>
<el-form-item :label="$t('跟进业务:')">
<el-select v-model="queryParams.salesmanId" :placeholder="$t('请选择跟进业务')">
<el-select v-model="queryParams.salesmanId" :placeholder="$t('请选择跟进业务')" clearable>
<el-option v-for="item in creatorData" :key="item.id" :label="item.nickname" :value="item.id"/>
</el-select>
</el-form-item>
......@@ -98,7 +98,8 @@
</el-table-column>
<el-table-column :label="$t('体积/重量')" align="center">
<template slot-scope="scope">
<span>{{scope.row.volume+"m³/"+scope.row.weight+"kg"}}</span>
<span v-if="scope.row.orderStatus >= 5 ">{{scope.row.volume+"m³/"+scope.row.weight+"kg"}}</span>
<span v-else>{{scope.row.totalVolume+"m³/"+scope.row.totalWeight+"kg"}}</span>
</template>
</el-table-column>
<el-table-column :label="$t('运输方式/目的地')" align="center">
......@@ -144,7 +145,8 @@
import {getOrderExceptionPage} from "@/api/ecw/orderException"
import {getTradeCityList} from '@/api/ecw/region'
import {DICT_TYPE} from '@/utils/dict'
import { userList } from "@/api/system/user"
// import { userList } from "@/api/system/user"
import {listServiceUser} from "@/api/system/user"
import CustomerSelector from '@/components/CustomerSelector'
import ProductSelector from '@/components/ProductSelector'
......@@ -176,7 +178,10 @@ export default {
created() {
this.getList();
getTradeCityList().then(res => this.tradeCityList = res.data)
userList('salesman').then(res =>this.creatorData = res.data)
listServiceUser().then(r => {
this.creatorData = r.data
})
// userList('salesman').then(res =>this.creatorData = res.data)
},
computed:{
expoerCityList(){
......@@ -198,6 +203,7 @@ export default {
this.list = response.data.list;
this.total = response.data.total;
this.loading = false;
this.reset()
});
},
/** 表单重置 */
......@@ -206,14 +212,12 @@ export default {
page: 1,
rows: 10,
};
this.resetForm("queryForm");
},
importCityName(id){
return this.tradeCityList.filter(item => item.id == id)
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.page = 1;
this.getList();
},
handEdit(id){
......
......@@ -89,7 +89,7 @@
</el-table-column>
<el-table-column :label="$t('操作')" align="center">
<template slot-scope="scope">
<el-tag v-if="scope.row.orderExceptionStatus>0">{{$t('已完成')}}</el-tag>
<el-tag v-if="scope.row.orderExceptionStatus==2">{{$t('已完成')}}</el-tag>
<el-button v-else size="mini" type="text" icon="el-icon-edit" @click="handEdit(scope.row)">{{$t('处理')}}</el-button>
</template>
</el-table-column>
......
......@@ -67,25 +67,26 @@
<el-descriptions style="margin-top: 20px" :column="4" border>
<el-descriptions-item label="集运仓库">{{ warehouseDetails && warehouseDetails.warehouseOutName ? warehouseDetails.warehouseOutName : '' }}</el-descriptions-item>
<el-descriptions-item label="储位">
<div v-for="item in storageSpaceList" style="display: flex;"><div>{{item.warehouseName ? item.warehouseName : ''}}</div><div>{{item.warehouseName ? item.regionName :''}} 区</div></div>
<div v-for="item in storageSpaceList" style="display: flex;"><div>{{item.warehouseName ? item.warehouseName : ''}}</div><div>{{item.warehouseName ? item.regionName :''}} 区</div> <div>{{item.code}}</div></div>
</el-descriptions-item>
<el-descriptions-item v-if="type == 2" label="选择储位">
<div @click="areaVisible = true" style="color: #0a84ff;cursor: pointer;">选择储位</div>
</el-descriptions-item>
<el-descriptions-item label="调拨目标仓">{{ warehouseDetails && warehouseDetails.warehouseInName ? warehouseDetails.warehouseInName : '' }}</el-descriptions-item>
<el-descriptions-item label="物流公司">
<el-select v-model="params.logisticsCompany" >
<el-select :disabled="type == 2" v-model="params.logisticsCompany" >
<el-option v-for="(item,index) in expressList " :key="index" :value="item.id" :label="item.companyZh"></el-option>
</el-select>
</el-descriptions-item>
<el-descriptions-item label="物流单号">
<el-input v-model="params.logisticsNo"></el-input>
<el-input :disabled="type == 2" v-model="params.logisticsNo"></el-input>
</el-descriptions-item>
<el-descriptions-item label="联系电话">
<el-input v-model="params.phone"></el-input>
<el-input :disabled="type == 2" v-model="params.phone"></el-input>
</el-descriptions-item>
<el-descriptions-item label="出仓日期" >
<el-date-picker
:disabled="type == 2"
value-format="yyyy-MM-dd HH:mm:ss"
v-model="params.deliveryDate"
type="date"
......@@ -276,15 +277,27 @@ export default {
if(item.wareId === itemm.id){
itemm.children.forEach(itemmm => {
if(itemmm.id === item.areaId){
obj.push({
warehouseName:itemm.name,
regionName:itemmm.name
})
if(itemmm.positionList.length > 0){
itemmm.positionList.forEach(ic =>{
if(ic.children.length > 0){
ic.children.forEach(icc => {
if(icc.id === item.locationId){
obj.push({
warehouseName:itemm.name,
regionName:itemmm.name,
code:icc.code
})
}
})
}
})
}
}
})
}
})
})
console.log(obj)
this.storageSpaceList = obj;
})
}
......@@ -366,6 +379,42 @@ export default {
});
},
},
watch:{
'params.orderLocationCreateReqVOList'(val){
console.log(val,'123')
getByWarehouseId().then(r =>{
console.log(r,'仓库')
let obj = [];
val.forEach(item => {
r.data.forEach(itemm => {
if(item.wareId === itemm.id){
itemm.children.forEach(itemmm => {
if(itemmm.id === item.areaId){
if(itemmm.positionList.length > 0){
itemmm.positionList.forEach(ic =>{
if(ic.children.length > 0){
ic.children.forEach(icc => {
if(icc.id === item.locationId){
obj.push({
warehouseName:itemm.name,
regionName:itemmm.name,
code:icc.code
})
}
})
}
})
}
}
})
}
})
})
console.log(obj,'obj')
this.storageSpaceList = obj;
})
}
}
}
</script>
......
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