Commit 11713ac6 authored by 我在何方's avatar 我在何方

国家区域设置设置币种

parent 4840b7f6
......@@ -78,7 +78,7 @@
<!-- 添加或修改部门对话框 -->
<el-dialog :title="title" :visible.sync="open" width="600px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
<el-form ref="form" :model="form" :rules="rules" label-width="160px">
<el-row>
<el-col :span="24">
<el-form-item :label="$t('上级区域')" prop="parentId">
......@@ -108,6 +108,46 @@
<el-form-item :label="$t('显示顺序')" prop="sort">
<el-input v-model="form.sort" :placeholder="$t('请输入显示顺序')" />
</el-form-item>
<div v-if="(form.type==2||form.type==3)&&isSecond">
<el-form-item :label="$t('出口运费/全包价币种')" prop="exportCurrency1">
<el-select v-model="form.exportCurrency1" :placeholder="$t('请选择')">
<el-option v-for="dict in currencyList "
:key="dict.id" :label="dict.titleZh" :value="dict.id"/>
</el-select>
</el-form-item>
<el-form-item :label="$t('出口清关费币种')" prop="exportCurrency2">
<el-select v-model="form.exportCurrency2" :placeholder="$t('请选择')">
<el-option v-for="dict in currencyList "
:key="dict.id" :label="dict.titleZh" :value="dict.id"/>
</el-select>
</el-form-item>
<el-form-item :label="$t('出口额外费用币种')" prop="出口额外费用币种">
<el-select v-model="form.exportCurrency3" :placeholder="$t('请选择')">
<el-option v-for="dict in currencyList "
:key="dict.id" :label="dict.titleZh" :value="dict.id"/>
</el-select>
</el-form-item>
</div>
<div v-if="(form.type==1||form.type==3)&&isSecond">
<el-form-item :label="$t('进口运费/全包价币种')" prop="importCurrency1">
<el-select v-model="form.importCurrency1" :placeholder="$t('请选择')">
<el-option v-for="dict in currencyList "
:key="dict.id" :label="dict.titleZh" :value="dict.id"/>
</el-select>
</el-form-item>
<el-form-item :label="$t('进口清关费币种')" prop="importCurrency2">
<el-select v-model="form.importCurrency2" :placeholder="$t('请选择')">
<el-option v-for="dict in currencyList "
:key="dict.id" :label="dict.titleZh" :value="dict.id"/>
</el-select>
</el-form-item>
<el-form-item :label="$t('进口额外费用币种')" prop="importCurrency3">
<el-select v-model="form.importCurrency3" :placeholder="$t('请选择')">
<el-option v-for="dict in currencyList "
:key="dict.id" :label="dict.titleZh" :value="dict.id"/>
</el-select>
</el-form-item>
</div>
<!-- <el-col :span="12">-->
<!-- <el-form-item :label="$t('部门状态')" prop="status">-->
<!-- <el-radio-group v-model="form.status">-->
......@@ -145,6 +185,7 @@ import {
} from "@/api/ecw/region";
import {changeUserStatus} from "@/api/system/user";
import {updateBankAccount} from "@/api/ecw/bankAccount";
import { getCurrencyList } from '@/api/ecw/currency'
export default {
name: "Region",
......@@ -198,11 +239,14 @@ export default {
CommonStatusEnum: CommonStatusEnum,
// 数据字典
statusDictDatas: getDictDatas(DICT_TYPE.COMMON_STATUS),
regionTypeDatas: getDictDatas(DICT_TYPE.ECW_REGION_TYPE)
regionTypeDatas: getDictDatas(DICT_TYPE.ECW_REGION_TYPE),
currencyList:[],//币种
isSecond:false,
};
},
created() {
this.getList();
getCurrencyList().then(res => this.currencyList = res.data)
// 获得用户列表
listSimpleUsers().then(response => {
this.users = response.data;
......@@ -289,6 +333,12 @@ export default {
/** 新增按钮操作 */
handleAdd(row) {
this.reset();
var region = this.regionList.find(v=>v.id==row.parentId)
if(region){
this.isSecond = true
}else{
this.isSecond = false
}
if (row !== undefined) {
this.form.parentId = row.id;
}
......@@ -311,6 +361,12 @@ export default {
/** 修改按钮操作 */
handleUpdate(row) {
this.reset();
var region = this.regionList.find(v=>v.id==row.parentId)
if(region){
this.isSecond = true
}else{
this.isSecond = false
}
getRegion(row.id).then(response => {
this.form = response.data;
// console.log("getRegion("+row.id+"):"+JSON.stringify(this.form));
......
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