|
@@ -57,19 +57,58 @@
|
|
|
></el-input>
|
|
|
</el-form-item>
|
|
|
|
|
|
- <el-form-item label="企业工业用水、用电量" prop="companyWaterElectric">
|
|
|
+ <el-form-item label="保税区" prop="gardenWaterElectric">
|
|
|
+ <!-- @change="selectDept" -->
|
|
|
+ <el-select
|
|
|
+ v-model="form.cbId"
|
|
|
+ placeholder="请选择供应商类型(三种) "
|
|
|
+ filterable
|
|
|
+ >
|
|
|
+ <el-option
|
|
|
+ v-for="(dict, index) in deptList"
|
|
|
+ :key="index"
|
|
|
+ :label="dict.deptName"
|
|
|
+ :value="dict.deptId"
|
|
|
+ ></el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+
|
|
|
+ <el-form-item label="年月" prop="dateValue">
|
|
|
+ <el-date-picker v-model="form.dateValue" @change="setDateSelect" format="yyyy-MM" value-format="yyyy-MM" type="month" placeholder="选择年份">
|
|
|
+ </el-date-picker>
|
|
|
+ </el-form-item>
|
|
|
+
|
|
|
+
|
|
|
+ <el-form-item label="企业工业用水(吨)" prop="companyWaterElectric">
|
|
|
<el-input
|
|
|
type="number"
|
|
|
v-model="form.companyWaterElectric"
|
|
|
- placeholder="请输入企业工业用水、用电量"
|
|
|
+ placeholder="请输入企业工业用水"
|
|
|
+ ></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="企业工业用电(度)" prop="companyElectric">
|
|
|
+ <el-input
|
|
|
+ type="number"
|
|
|
+ v-model="form.companyElectric"
|
|
|
+ placeholder="请输入企业工业用电"
|
|
|
></el-input>
|
|
|
</el-form-item>
|
|
|
|
|
|
- <el-form-item label="园区工业用水、用电总量" prop="gardenWaterElectric">
|
|
|
+ <el-form-item label="园区工业用水(吨)" prop="gardenWaterElectric">
|
|
|
<el-input
|
|
|
type="number"
|
|
|
v-model="form.gardenWaterElectric"
|
|
|
- placeholder="请输入园区工业用水、用电总量"
|
|
|
+ placeholder="请输入园区工业用水"
|
|
|
+ ></el-input>
|
|
|
+ </el-form-item>
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ <el-form-item label="园区工业用电(度)" prop="gardenElectric">
|
|
|
+ <el-input
|
|
|
+ type="number"
|
|
|
+ v-model="form.gardenElectric"
|
|
|
+ placeholder="请输入园区工业用电"
|
|
|
></el-input>
|
|
|
</el-form-item>
|
|
|
</el-form>
|
|
@@ -90,11 +129,62 @@ import {
|
|
|
addGARDENTRADEDATA,
|
|
|
updateGARDENTRADEDATA,
|
|
|
} from "@/api/portal/GARDENTRADEDATA/GARDENTRADEDATA.js";
|
|
|
+import { listDept } from "@/api/system/dept.js";
|
|
|
export default {
|
|
|
data() {
|
|
|
return {
|
|
|
+ monthOpt: [
|
|
|
+ {
|
|
|
+ value: "1",
|
|
|
+ label: "1月",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ value: "2",
|
|
|
+ label: "2月",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ value: "3",
|
|
|
+ label: "3月",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ value: "4",
|
|
|
+ label: "4月",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ value: "5",
|
|
|
+ label: "5月",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ value: "6",
|
|
|
+ label: "6月",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ value: "7",
|
|
|
+ label: "7月",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ value: "8",
|
|
|
+ label: "8月",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ value: "9",
|
|
|
+ label: "9月",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ value: "10",
|
|
|
+ label: "10月",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ value: "11",
|
|
|
+ label: "11月",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ value: "12",
|
|
|
+ label: "12月",
|
|
|
+ },
|
|
|
+ ],
|
|
|
deptList: [],
|
|
|
- form: {},
|
|
|
+ form: {dateValue:""},
|
|
|
deptId: "",
|
|
|
rules: {
|
|
|
gardenId: [
|
|
@@ -103,40 +193,90 @@ export default {
|
|
|
deptId: [
|
|
|
{ required: true, message: "保税区ID不能为空", trigger: "blur" },
|
|
|
],
|
|
|
+ dateValue: [{ required: true, message: "年月不能为空", trigger: "blur" }],
|
|
|
+ companyElectric: [
|
|
|
+ {
|
|
|
+ required: true,
|
|
|
+ message: "企业工业用电量不能为空",
|
|
|
+ trigger: "blur",
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ gardenElectric: [
|
|
|
+ {
|
|
|
+ required: true,
|
|
|
+ message: "园区工业用电总量不能为空",
|
|
|
+ trigger: "blur",
|
|
|
+ },
|
|
|
+ ],
|
|
|
companyDrawback: [
|
|
|
- { required: true, message: "企业出口退税额 不能为空", trigger: "blur", },
|
|
|
+ {
|
|
|
+ required: true,
|
|
|
+ message: "企业出口退税额 不能为空",
|
|
|
+ trigger: "blur",
|
|
|
+ },
|
|
|
{ pattern: /^[1-9]\d*$/, message: "企业出口退税额年龄必须为整数值" },
|
|
|
],
|
|
|
gardenDrawback: [
|
|
|
- { required: true, message: "园区出口退税总额 不能为空", trigger: "blur", },
|
|
|
+ {
|
|
|
+ required: true,
|
|
|
+ message: "园区出口退税总额 不能为空",
|
|
|
+ trigger: "blur",
|
|
|
+ },
|
|
|
{ pattern: /^[1-9]\d*$/, message: "园区出口退税总额必须为整数值" },
|
|
|
],
|
|
|
gardenTax: [
|
|
|
- { required: true, message: "园区运营单位缴税总额 不能为空", trigger: "blur", },
|
|
|
- { pattern: /^[1-9]\d*$/, message: "园区运营单位缴税总额必须为整数值" },
|
|
|
+ {
|
|
|
+ required: true,
|
|
|
+ message: "园区运营单位缴税总额 不能为空",
|
|
|
+ trigger: "blur",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ pattern: /^[1-9]\d*$/,
|
|
|
+ message: "园区运营单位缴税总额必须为整数值",
|
|
|
+ },
|
|
|
],
|
|
|
companyLists: [
|
|
|
{ required: true, message: "企业承接单量 不能为空", trigger: "blur" },
|
|
|
{ pattern: /^[1-9]\d*$/, message: "企业承接单量必须为整数值" },
|
|
|
],
|
|
|
gardenLits: [
|
|
|
- { required: true, message: "园区承接单总量 不能为空", trigger: "blur", },
|
|
|
+ {
|
|
|
+ required: true,
|
|
|
+ message: "园区承接单总量 不能为空",
|
|
|
+ trigger: "blur",
|
|
|
+ },
|
|
|
{ pattern: /^[1-9]\d*$/, message: "园区承接单总量年龄必须为整数值" },
|
|
|
],
|
|
|
companyInnovative: [
|
|
|
- { required: true, message: "企业创新获奖量 不能为空", trigger: "blur", },
|
|
|
+ {
|
|
|
+ required: true,
|
|
|
+ message: "企业创新获奖量 不能为空",
|
|
|
+ trigger: "blur",
|
|
|
+ },
|
|
|
{ pattern: /^[1-9]\d*$/, message: "企业创新获奖量必须为整数值" },
|
|
|
],
|
|
|
gardenInnovative: [
|
|
|
- { required: true, message: "园区内创新获奖总量 不能为空", trigger: "blur", },
|
|
|
+ {
|
|
|
+ required: true,
|
|
|
+ message: "园区内创新获奖总量 不能为空",
|
|
|
+ trigger: "blur",
|
|
|
+ },
|
|
|
{ pattern: /^[1-9]\d*$/, message: "园区内创新获奖总量必须为整数值" },
|
|
|
],
|
|
|
companyWaterElectric: [
|
|
|
- { required: true, message: "企业工业用水、用电量 不能为空", trigger: "blur", },
|
|
|
+ {
|
|
|
+ required: true,
|
|
|
+ message: "企业工业用水、用电量 不能为空",
|
|
|
+ trigger: "blur",
|
|
|
+ },
|
|
|
{ pattern: /^[1-9]\d*$/, message: "必须为整数值" },
|
|
|
],
|
|
|
gardenWaterElectric: [
|
|
|
- { required: true, message: "园区工业用水、用电总量 不能为空", trigger: "blur", },
|
|
|
+ {
|
|
|
+ required: true,
|
|
|
+ message: "园区工业用水、用电总量 不能为空",
|
|
|
+ trigger: "blur",
|
|
|
+ },
|
|
|
{ pattern: /^[1-9]\d*$/, message: "必须为整数值" },
|
|
|
],
|
|
|
},
|
|
@@ -154,9 +294,15 @@ export default {
|
|
|
},
|
|
|
},
|
|
|
mounted() {
|
|
|
+ listDept({type:2}).then(res=>{
|
|
|
+ this.deptList = res.data;
|
|
|
+ })
|
|
|
if (this.param.id) {
|
|
|
getGARDENTRADEDATA(this.param.id).then((response) => {
|
|
|
this.form = response.data;
|
|
|
+ this.form.cbId = +this.form.cbId;
|
|
|
+ this.$set(this.form,"dateValue",this.form.year + '-' + this.form.month)
|
|
|
+ console.log(this.form);
|
|
|
});
|
|
|
} else {
|
|
|
//如果没传ID过来那就是新增,需要获取当前用户deptId
|
|
@@ -166,6 +312,10 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
+ setDateSelect(){
|
|
|
+ this.form.year = this.form.dateValue.slice(0, 4);
|
|
|
+ this.form.month = this.form.dateValue.slice(5);
|
|
|
+ },
|
|
|
/** 提交按钮 */
|
|
|
submitForm() {
|
|
|
this.$refs["form"].validate((valid) => {
|