Commit e0e873aa authored by Smile's avatar Smile

集运主页页面修改

parent b92e811b
...@@ -19,6 +19,35 @@ ...@@ -19,6 +19,35 @@
<el-form-item label="发货人" prop="customerNumber"> <el-form-item label="发货人" prop="customerNumber">
<el-input v-model="queryParams.customerKey" placeholder="请输入发货人手机号、客户编号" clearable @keyup.enter.native="handleQuery"/> <el-input v-model="queryParams.customerKey" placeholder="请输入发货人手机号、客户编号" clearable @keyup.enter.native="handleQuery"/>
</el-form-item> </el-form-item>
<el-form-item label="发货人名称" prop="customerNumber">
<el-input v-model="queryParams.customerName" placeholder="请输入客户名称" clearable @keyup.enter.native="handleQuery"/>
</el-form-item>
<el-form-item :label="$t('集运仓')">
<el-select v-model="queryParams.wareId" :placeholder="$t('请选择仓库')" filterable>
<el-option v-for="warehouse in this.warehouseList" :key="warehouse.id" :label="$l(warehouse,'title')" :value="warehouse.id"></el-option>
</el-select>
</el-form-item>
<el-form-item :label="$t('客户经理')">
<user-selector manage v-model="queryParams.salesmanIds" multiple clearable @change="handleQuery" :prepend="{ id: 0, nickname: $t('未分配客户经理') }" class="w-200" />
</el-form-item>
<el-form-item :label="$t('运输方式')" prop="transportId">
<dict-selector :type="DICT_TYPE.ECW_TRANSPORT_TYPE" v-model="queryParams.transportId" class="w-200" />
</el-form-item>
<el-form-item :label="$t('目的国')" prop="consigneeCountryId">
<el-select v-model="queryParams.consigneeCountryId" :label="queryParams.consigneeCountryId" :placeholder="$t('请选择目的国')" clearable @change="handleQuery" class="w-200">
<el-option v-for="item in AddressProvince" :key="item.guojia" :label="item.guojiaName" :value="item.guojia"></el-option>
</el-select>
</el-form-item>
<el-form-item :label="$t('目的城市')" prop="objectiveId">
<el-select v-model="queryParams.consigneeCityId" :placeholder="$t('请选择目的城市')" style="width: 200px" clearable @change="handleQuery" class="w-200">
<el-option v-for="item in AddressCity" :key="item.shi" :label="item.shiName" :value="item.shi"></el-option>
</el-select>
</el-form-item>
<el-form-item :label="$t('出货渠道')" prop="shippingChannelIdList">
<el-select v-model="queryParams.shippingChannelIdList" multiple :placeholder="$t('请选择出货渠道')" clearable>
<el-option v-for="item in channelList" :label="$l(item, 'name')" :value="item.channelId" :key="item.channelId"></el-option>
</el-select>
</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>
...@@ -227,10 +256,15 @@ ...@@ -227,10 +256,15 @@
import {createCons, deleteCons, exportConsExcel, getCons, getConsPage, updateCons} from "@/api/ecw/cons"; import {createCons, deleteCons, exportConsExcel, getCons, getConsPage, updateCons} from "@/api/ecw/cons";
import Transmutation from "@/views/ecw/cons/components/Transmutation.vue" import Transmutation from "@/views/ecw/cons/components/Transmutation.vue"
import Template from "@/views/cms/template/index.vue"; import Template from "@/views/cms/template/index.vue";
import UserSelector from "@/components/UserSelector/index.vue";
import { getWarehouseList } from "@/api/ecw/warehouse";
import {getTradeCountryList} from "@/api/ecw/region";
import {getRegionList} from "@/api/ecw/order";
export default { export default {
name: "Cons", name: "Cons",
components: { components: {
UserSelector,
Transmutation, Transmutation,
Template Template
}, },
...@@ -256,6 +290,9 @@ export default { ...@@ -256,6 +290,9 @@ export default {
value: "" value: ""
}, },
dateRangeWatEtime: [], dateRangeWatEtime: [],
warehouseList:[],
AddressProvince:[],
AddressCity:[],
dateRangeWatTime: [], dateRangeWatTime: [],
dateRangeSignedTime: [], dateRangeSignedTime: [],
dateRangeCreateTime: [], dateRangeCreateTime: [],
...@@ -282,7 +319,9 @@ export default { ...@@ -282,7 +319,9 @@ export default {
remarks: null, remarks: null,
}, },
// 表单参数 // 表单参数
form: {}, form: {
transportId: null,
},
// 表单校验 // 表单校验
rules: { rules: {
signed: [{ required: true, message: "是否被签收,0未签收,1已签收不能为空", trigger: "blur" }], signed: [{ required: true, message: "是否被签收,0未签收,1已签收不能为空", trigger: "blur" }],
...@@ -293,6 +332,11 @@ export default { ...@@ -293,6 +332,11 @@ export default {
}, },
created() { created() {
this.getList(); this.getList();
getWarehouseList().then((r) => {
this.warehouseList = r.data;
});
this.getAddressProvince()
this.getAddressCity()
}, },
computed: { computed: {
isChinese() { isChinese() {
...@@ -307,7 +351,35 @@ export default { ...@@ -307,7 +351,35 @@ export default {
return queryParams return queryParams
}, },
}, },
watch: {
'queryParams.consigneeCountryId': {
deep: true, //深度监听
handler() {
if (this.queryParams.consigneeCountryId != "") {
this.findByprovinceCode()
}
}
},
},
methods: { methods: {
getAddressProvince() {
getRegionList(1, 1).then(({ data }) => {
this.AddressProvince = data
})
},
getAddressCity() {
getRegionList(4, 4).then(({ data }) => {
this.AddressCity = data
})
},
findByprovinceCode() {
if (this.queryParams.consigneeCountryId != null && this.queryParams.consigneeCountryId != "") {
//获取当前省份值id,获取该省份下城市 destCountryId provinceCode
getRegionList(2, this.queryParams.consigneeCountryId).then(({ data }) => {
this.AddressCity = data
})
}
},
// 自动去除空格 // 自动去除空格
replaceSpace(obj, field) { replaceSpace(obj, field) {
obj[field] = obj[field].replace(/\s+/g, "") obj[field] = obj[field].replace(/\s+/g, "")
......
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