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

完善自编号报表的目的国备选和必选规则

parent 4840b7f6
...@@ -27,7 +27,7 @@ ...@@ -27,7 +27,7 @@
<el-option <el-option
v-for="item in countryList" v-for="item in countryList"
:key="item.id" :key="item.id"
:label="$l(item, 'name')" :label="$l(item, 'title')"
:value="item.id" :value="item.id"
/> />
</el-select> </el-select>
...@@ -119,6 +119,7 @@ import store from "@/store"; ...@@ -119,6 +119,7 @@ import store from "@/store";
import {boxSettlementPage, exportSettlementExcel} from "@/api/ecw/box"; import {boxSettlementPage, exportSettlementExcel} from "@/api/ecw/box";
import {DICT_TYPE} from "@/utils/dict"; import {DICT_TYPE} from "@/utils/dict";
import {getCountryListAll} from "@/api/ecw/country"; import {getCountryListAll} from "@/api/ecw/country";
import {getListTree} from "@/api/ecw/region";
export default { export default {
data() { data() {
...@@ -147,10 +148,16 @@ export default { ...@@ -147,10 +148,16 @@ export default {
// getTradeCityList().then((res) => (this.tradeCityList = res.data)); // getTradeCityList().then((res) => (this.tradeCityList = res.data));
this.getList(); this.getList();
getWarehouseList().then(res => this.warehouseList = res.data) getWarehouseList().then(res => this.warehouseList = res.data)
getCountryListAll().then(r => { getListTree({treeType: 1}).then(r => {
this.countryList = r.data this.countryList = r.data
}) })
}, },
watch:{
// 目的国变更后要重置目的仓
'queryParams.destCountryId': function(){
this.$set(this.queryParams, 'destWarehouseId', '')
}
},
computed: { computed: {
DICT_TYPE() { DICT_TYPE() {
return DICT_TYPE return DICT_TYPE
...@@ -198,6 +205,9 @@ export default { ...@@ -198,6 +205,9 @@ export default {
/** 搜索按钮操作 */ /** 搜索按钮操作 */
handleQuery() { handleQuery() {
this.queryParams.page = 1; this.queryParams.page = 1;
if(!this.queryParams.destCountryId){
return this.$message.error(this.$t('请选择目的国'))
}
this.getList(); this.getList();
}, },
handleReset(){ handleReset(){
......
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