|
@@ -179,7 +179,7 @@
|
|
|
/>
|
|
|
|
|
|
<!-- 添加或修改保税区进出口总值数据对话框 -->
|
|
|
- <el-dialog :title="title" :visible.sync="open" width="580px" append-to-body>
|
|
|
+ <el-dialog :title="title" :visible.sync="open" width="580px" :close-on-click-modal="false" append-to-body>
|
|
|
<el-form :ref="'form'" :model="form" :rules="rules" label-width="80px">
|
|
|
<el-form-item prop="deptId" label-width="120px" label="保税区名称">
|
|
|
<el-select
|
|
@@ -210,6 +210,7 @@
|
|
|
</el-option>
|
|
|
</el-select>
|
|
|
<!-- 我只要年份,请不要打开这个代码谢谢 -->
|
|
|
+<!-- 只要年份,为啥不用type == year -->
|
|
|
<!-- <el-date-picker-->
|
|
|
<!-- v-model="form.year"-->
|
|
|
<!-- type="month"-->
|
|
@@ -227,14 +228,30 @@
|
|
|
>
|
|
|
</el-cascader>
|
|
|
</el-form-item> -->
|
|
|
- <el-form-item prop="imExport" label-width="120px" label="进出口总值">
|
|
|
- <el-input
|
|
|
- v-model="form.imExport"
|
|
|
- placeholder="请输入进出口总值"
|
|
|
- ></el-input>
|
|
|
+ <el-form-item prop="select" label-width="120px" label="级别">
|
|
|
+ <el-select
|
|
|
+ v-model="form.select"
|
|
|
+ clearable
|
|
|
+ placeholder="请选择级别"
|
|
|
+ >
|
|
|
+ <el-option
|
|
|
+ v-for="item in option"
|
|
|
+ :key="item.value"
|
|
|
+ :label="item.label"
|
|
|
+ :value="item.value"
|
|
|
+ >
|
|
|
+ </el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item prop="imExport" label-width="120px" label="进出口总值" v-show="form.select == 2"
|
|
|
+ :rules="{required: form.select == 2 ? true : false, message: '请选择', trigger: 'blur'}"
|
|
|
+ >
|
|
|
+ <el-input type="number" v-model="form.imExport" placeholder="请输入进出口总值"></el-input>
|
|
|
</el-form-item>
|
|
|
- <el-form-item prop="cityTotal" label-width="120px" label="市进口总值">
|
|
|
- <el-input v-model="form.cityTotal" placeholder="请输入市进口总值"></el-input>
|
|
|
+ <el-form-item prop="cityTotal" label-width="120px" label="市进口总值" v-show="form.select == 1"
|
|
|
+ :rules="{required: form.select == 1 ? true : false, message: '请选择', trigger: 'blur'}"
|
|
|
+ >
|
|
|
+ <el-input v-model="form.cityTotal" placeholder="请输入市进口总值" type="number"></el-input>
|
|
|
</el-form-item>
|
|
|
</el-form>
|
|
|
<div slot="footer" class="dialog-footer">
|
|
@@ -310,7 +327,18 @@ export default {
|
|
|
{ trigger: "blur", validator: this.validatorFloatNum },
|
|
|
],
|
|
|
year: [{ required: true, message: "年份不能为空", trigger: "blur" }],
|
|
|
+ select: [{ required: true, message: "请选择级别", trigger: "blur" }],
|
|
|
+
|
|
|
+ },
|
|
|
+ option:[
|
|
|
+ {
|
|
|
+ value:1,
|
|
|
+ label: '市级'
|
|
|
},
|
|
|
+ {
|
|
|
+ value:2,
|
|
|
+ label: '保税区'
|
|
|
+ },]
|
|
|
};
|
|
|
},
|
|
|
created() {
|
|
@@ -331,8 +359,10 @@ export default {
|
|
|
// 获取保税区列表
|
|
|
getDeptList() {
|
|
|
this.loading = true;
|
|
|
- listDept({ parentId: "100" }).then((response) => {
|
|
|
- this.deptList = response.data;
|
|
|
+ listDept().then((response) => {
|
|
|
+ // this.deptList = response.data;
|
|
|
+ // 过滤type === 2 或 4 的部门数据
|
|
|
+ this.deptList = response.data.filter(item => item.type === 2 || item.type === 4);
|
|
|
this.loading = false;
|
|
|
});
|
|
|
},
|