Commit 97c24f24 authored by dragondean@qq.com's avatar dragondean@qq.com

处理几个bug

parent d746090f
...@@ -9,6 +9,10 @@ ...@@ -9,6 +9,10 @@
} }
}, },
"exclude": [ "exclude": [
"node_modules" "node_modules",
"dist",
"bin",
"public",
"src/i18n/"
] ]
} }
\ No newline at end of file
...@@ -87,7 +87,7 @@ export default { ...@@ -87,7 +87,7 @@ export default {
} }
getCustomerContactsSelect({ids: this.value.join(',')}) getCustomerContactsSelect({ids: this.value.join(',')})
.then(res => { .then(res => {
this.$set(this, 'choosedList', res.data) this.$set(this, 'choosedList', res.data.list)
}) })
}, },
reLoad(){ reLoad(){
......
...@@ -40,20 +40,19 @@ export default { ...@@ -40,20 +40,19 @@ export default {
} }
}, },
watch:{ watch:{
index(val){ index(val, oldVal){
let productId = val !== '' && val !== null ? this.list[val].id : null let productId = val !== '' && val !== null ? this.list[val].id : null
console.log('index val', val, productId) // console.log('index val', val, oldVal, productId)
this.$emit('input', productId) this.$emit('input', productId)
this.$emit('change', val !== '' && val !== null ? this.list[val] : null) this.$emit('change', val !== '' && val !== null ? this.list[val] : null)
// 0 != '' 是 false
}, },
value(val){ value(val){
console.log('初始化内容', val) // console.log('初始化内容', val)
this.init() this.init()
} }
}, },
created(){ created(){
console.log('created', this.value) // console.log('created', this.value, this.lang)
this.init() this.init()
}, },
methods:{ methods:{
......
...@@ -90,7 +90,7 @@ export default { ...@@ -90,7 +90,7 @@ export default {
setInterval(() => { setInterval(() => {
this.$store.dispatch('getNotMessage'); this.$store.dispatch('getNotMessage');
this.$store.dispatch('getToDoList'); this.$store.dispatch('getToDoList');
}, 3000) }, 10000)
}, },
components: { components: {
Breadcrumb, Breadcrumb,
......
...@@ -7,14 +7,14 @@ ...@@ -7,14 +7,14 @@
<dict-selector defaultable :type="DICT_TYPE.ECW_BEGINTIME_TYPE_ENDTIME" v-model="dateFilterType" class="w-100 mr-10" /> <dict-selector defaultable :type="DICT_TYPE.ECW_BEGINTIME_TYPE_ENDTIME" v-model="dateFilterType" class="w-100 mr-10" />
<el-date-picker v-model="dateFilter" type="daterange" range-separator="-" :start-placeholder="$t('开始日期')" :end-placeholder="$t('结束日期')" value-format="yyyy-MM-dd HH:mm:ss" @change="handleQuery"></el-date-picker> <el-date-picker v-model="dateFilter" type="daterange" 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>
<el-form-item :label="$t('始发')" prop="startWarehouseId"> <el-form-item :label="$t('始发')" prop="startWarehouseId">
<el-select v-model="queryParams.startWarehouseId" :placeholder="$t('请选择始发地')" clearable @change="handleQuery"> <el-select v-model="queryParams.startWarehouseId" :placeholder="$t('请选择始发地')" clearable @change="handleQuery">
<el-option v-for="item in expoerCityList" :label="item.titleZh" :value="item.id" :key="item.id"></el-option> <el-option v-for="item in exportWarehouseList" :label="item.titleZh" :value="item.id" :key="item.id"></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item :label="$t('目的')" prop="destWarehouseId"> <el-form-item :label="$t('目的')" prop="destWarehouseId">
<el-select v-model="queryParams.destWarehouseId" :placeholder="$t('请选择目的地')" clearable @change="handleQuery"> <el-select v-model="queryParams.destWarehouseId" :placeholder="$t('请选择目的地')" clearable @change="handleQuery">
<el-option v-for="item in importCityList" :label="item.titleZh" :value="item.id" :key="item.id"></el-option> <el-option v-for="item in importWarehouseList" :label="item.titleZh" :value="item.id" :key="item.id"></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item :label="$t('运输方式')" prop="transportId"> <el-form-item :label="$t('运输方式')" prop="transportId">
...@@ -157,14 +157,14 @@ import Selector from '@/components/Selector' ...@@ -157,14 +157,14 @@ 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 { 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 { getCargoControlOrderPage, batchReview, orderReview, getPickRleaseInfo } from "@/api/ecw/orderCargoControl" import { getCargoControlOrderPage, batchReview, orderReview, getPickRleaseInfo } from "@/api/ecw/orderCargoControl"
import TransferCargo from '@/views/ecw/order/components/TransferCargo' import TransferCargo from '@/views/ecw/order/components/TransferCargo'
import Fallback from './components/Fallback' import Fallback from './components/Fallback'
import {getWarehouseList} from '@/api/ecw/warehouse'
export default { export default {
name: "EcwOrderCargonControl", name: "EcwOrderCargonControl",
components: { components: {
...@@ -196,6 +196,7 @@ export default { ...@@ -196,6 +196,7 @@ export default {
rows: 10 rows: 10
}, },
tradeCityList: [], tradeCityList: [],
warehouseList: [],
productAttrList: [], // 商品属性 productAttrList: [], // 商品属性
molecule: '', //重货比分子 molecule: '', //重货比分子
denominator: '', //重货比分母 denominator: '', //重货比分母
...@@ -215,6 +216,12 @@ export default { ...@@ -215,6 +216,12 @@ export default {
importCityList() { importCityList() {
return this.tradeCityList.filter(item => item.type == 1) return this.tradeCityList.filter(item => item.type == 1)
}, },
exportWarehouseList(){
return this.warehouseList.filter(item => item.tradeType == 2 || item.tradeType == 3)
},
importWarehouseList(){
return this.warehouseList.filter(item => item.tradeType == 1 || item.tradeType == 3)
},
combinedQueryParams(){ combinedQueryParams(){
let timeParams = {} let timeParams = {}
if(this.dateFilterType && this.dateFilter){ if(this.dateFilterType && this.dateFilter){
...@@ -230,7 +237,8 @@ export default { ...@@ -230,7 +237,8 @@ export default {
created() { created() {
this.getList(); this.getList();
getProductAttrList().then(res => this.productAttrList = res.data) getProductAttrList().then(res => this.productAttrList = res.data)
getTradeCityList().then(res => this.tradeCityList = res.data) // getTradeCityList().then(res => this.tradeCityList = res.data)
getWarehouseList().then(res => this.warehouseList = res.data)
}, },
methods: { methods: {
/** 查询列表 */ /** 查询列表 */
......
...@@ -96,7 +96,7 @@ ...@@ -96,7 +96,7 @@
<el-button type="primary" size="mini" @click="addProduct(null)" :disabled="!canAddProduct">{{$t('添加货物')}}</el-button> <el-button type="primary" size="mini" @click="addProduct(null)" :disabled="!canAddProduct">{{$t('添加货物')}}</el-button>
<el-button type="primary" size="mini" @click="showBatchImportDialog=true" :disabled="!canAddProduct">{{$t('批量添加货物')}}</el-button> <el-button type="primary" size="mini" @click="showBatchImportDialog=true" :disabled="!canAddProduct">{{$t('批量添加货物')}}</el-button>
</div> </div>
<el-table :data="form.orderItemVOList" border class="product-list"> <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>
<template slot-scope="scope"> <template slot-scope="scope">
{{scope.$index + 1}} {{scope.$index + 1}}
...@@ -115,6 +115,7 @@ ...@@ -115,6 +115,7 @@
class="mb-0 mr-0" class="mb-0 mr-0"
> >
<product-selector <product-selector
@hook:mounted="onTableMounted"
v-model="scope.row.prodId" v-model="scope.row.prodId"
@change="onProductChange(scope.row, $event)" @change="onProductChange(scope.row, $event)"
:disabled="!canAddProduct || !productEditable" :disabled="!canAddProduct || !productEditable"
...@@ -606,6 +607,7 @@ export default { ...@@ -606,6 +607,7 @@ export default {
quickCreateType: null, // 快速新建客户类型,1发货人,2收货人 quickCreateType: null, // 快速新建客户类型,1发货人,2收货人
showWorkFlow: false, // 是否显示工作流表单 showWorkFlow: false, // 是否显示工作流表单
calculating: false, // 是否正在计算费用,防止频繁重新请求 calculating: false, // 是否正在计算费用,防止频繁重新请求
initing: true, // 初始化中
}; };
}, },
computed:{ computed:{
...@@ -787,9 +789,10 @@ export default { ...@@ -787,9 +789,10 @@ export default {
}else if(!this.form.externalWarehouseDtoList.length){ }else if(!this.form.externalWarehouseDtoList.length){
this.$set(this.form, 'externalWarehouseDtoList', [{}]) this.$set(this.form, 'externalWarehouseDtoList', [{}])
} }
}, },
/* 'form.orderItemVOList'(){
console.log('form.orderItemVOList', this.form.orderItemVOList.length, this.form.orderItemVOList)
}, */
// 选择的路线变化后,需要判断是否开通了对应的服务,如果没开通需要取消对应的服务选择 // 选择的路线变化后,需要判断是否开通了对应的服务,如果没开通需要取消对应的服务选择
selectedRouter(val){ selectedRouter(val){
if(!val) return if(!val) return
...@@ -826,13 +829,20 @@ export default { ...@@ -826,13 +829,20 @@ export default {
value: 2 // 1 发货人,2收货人,默认收货人,可修改 value: 2 // 1 发货人,2收货人,默认收货人,可修改
}) })
}) })
this.$nextTick(() => {
this.initing = false
})
}, },
methods: { methods: {
onTableMounted(e){
// console.warn('onTableMounted', e)
},
getOrder(){ getOrder(){
getUpdateInfo(this.$route.query.id).then(res => { getUpdateInfo(this.$route.query.id).then(res => {
this.form = {...res.data} this.form = Object.assign({}, res.data, {orderItemVOList: []})
this.form.orderItemVOList = []; /* this.form.orderItemVOList = []; */
this.form.type = this.form.type ? this.form.type.split(',').filter(item => item != '') : [] this.form.type = this.form.type ? this.form.type.split(',').filter(item => item != '') : []
this.form.packageTypeArr = this.form.packageType ? this.form.packageType.split(',').filter(item => item != '') : [] this.form.packageTypeArr = this.form.packageType ? this.form.packageType.split(',').filter(item => item != '') : []
...@@ -880,7 +890,10 @@ export default { ...@@ -880,7 +890,10 @@ export default {
}) })
}) })
} }
this.initing = false
}) })
}).catch(() => {
this.initing = false
}) })
}, },
onContactChoose(contact){ onContactChoose(contact){
......
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