123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192 |
- <template>
- <div class="cmain">
- <el-form ref="form" :model="form" :rules="rules" label-width="200px">
- <el-form-item label="企业出口退税额" prop="companyDrawback">
- <el-input
- type="number"
- v-model="form.companyDrawback"
- placeholder="请输入企业出口退税额"
- ></el-input>
- </el-form-item>
- <el-form-item label="园区出口退税总额" prop="gardenDrawback">
- <el-input
- type="number"
- v-model="form.gardenDrawback"
- placeholder="请输入园区出口退税总额"
- ></el-input>
- </el-form-item>
- <el-form-item label="园区运营单位缴税总额" prop="gardenTax">
- <el-input
- type="number"
- v-model="form.gardenTax"
- placeholder="请输入园区运营单位缴税总额"
- ></el-input>
- </el-form-item>
- <el-form-item label="企业承接单量" prop="companyLists">
- <el-input
- type="number"
- v-model="form.companyLists"
- placeholder="请输入企业承接单量"
- ></el-input>
- </el-form-item>
- <el-form-item label="园区承接单总量" prop="gardenLits">
- <el-input
- type="number"
- v-model="form.gardenLits"
- placeholder="请输入园区承接单总量"
- ></el-input>
- </el-form-item>
- <el-form-item label="企业创新获奖量" prop="companyInnovative">
- <el-input
- type="number"
- v-model="form.companyInnovative"
- placeholder="请输入企业创新获奖量"
- ></el-input>
- </el-form-item>
- <el-form-item label="园区内创新获奖总量" prop="gardenInnovative">
- <el-input
- type="number"
- v-model="form.gardenInnovative"
- placeholder="请输入园区内创新获奖总量"
- ></el-input>
- </el-form-item>
- <el-form-item label="企业工业用水、用电量" prop="companyWaterElectric">
- <el-input
- type="number"
- v-model="form.companyWaterElectric"
- placeholder="请输入企业工业用水、用电量"
- ></el-input>
- </el-form-item>
- <el-form-item label="园区工业用水、用电总量" prop="gardenWaterElectric">
- <el-input
- type="number"
- v-model="form.gardenWaterElectric"
- placeholder="请输入园区工业用水、用电总量"
- ></el-input>
- </el-form-item>
- </el-form>
- <div class="mfooter">
- <el-button type="primary" @click="submitForm">确 定</el-button>
- <el-button @click="$layer.close(layerid)">取 消</el-button>
- </div>
- </div>
- </template>
- <script>
- import {
- getUser,
- listGARDENTRADEDATA,
- getGARDENTRADEDATA,
- delGARDENTRADEDATA,
- addGARDENTRADEDATA,
- updateGARDENTRADEDATA,
- } from "@/api/portal/GARDENTRADEDATA/GARDENTRADEDATA.js";
- export default {
- data() {
- return {
- deptList: [],
- form: {},
- deptId: "",
- rules: {
- gardenId: [
- { required: true, message: "园区ID不能为空", trigger: "blur" },
- ],
- deptId: [
- { required: true, message: "保税区ID不能为空", trigger: "blur" },
- ],
- companyDrawback: [
- { required: true, message: "企业出口退税额 不能为空", trigger: "blur", },
- { pattern: /^[1-9]\d*$/, message: "企业出口退税额年龄必须为整数值" },
- ],
- gardenDrawback: [
- { required: true, message: "园区出口退税总额 不能为空", trigger: "blur", },
- { pattern: /^[1-9]\d*$/, message: "园区出口退税总额必须为整数值" },
- ],
- gardenTax: [
- { 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", },
- { pattern: /^[1-9]\d*$/, message: "园区承接单总量年龄必须为整数值" },
- ],
- companyInnovative: [
- { required: true, message: "企业创新获奖量 不能为空", trigger: "blur", },
- { pattern: /^[1-9]\d*$/, message: "企业创新获奖量必须为整数值" },
- ],
- gardenInnovative: [
- { required: true, message: "园区内创新获奖总量 不能为空", trigger: "blur", },
- { pattern: /^[1-9]\d*$/, message: "园区内创新获奖总量必须为整数值" },
- ],
- companyWaterElectric: [
- { required: true, message: "企业工业用水、用电量 不能为空", trigger: "blur", },
- { pattern: /^[1-9]\d*$/, message: "必须为整数值" },
- ],
- gardenWaterElectric: [
- { required: true, message: "园区工业用水、用电总量 不能为空", trigger: "blur", },
- { pattern: /^[1-9]\d*$/, message: "必须为整数值" },
- ],
- },
- };
- },
- props: {
- param: {
- type: Object,
- default: () => {
- return {};
- },
- },
- layerid: {
- type: String,
- },
- },
- mounted() {
- if (this.param.id) {
- getGARDENTRADEDATA(this.param.id).then((response) => {
- this.form = response.data;
- });
- } else {
- //如果没传ID过来那就是新增,需要获取当前用户deptId
- getUser().then((res) => {
- this.deptId = res.user.deptId;
- });
- }
- },
- methods: {
- /** 提交按钮 */
- submitForm() {
- this.$refs["form"].validate((valid) => {
- if (valid) {
- if (this.form.gardenId != null) {
- updateGARDENTRADEDATA(this.form).then((response) => {
- this.$modal.msgSuccess("修改成功");
- this.$layer.close(this.layerid);
- this.$parent.getList();
- });
- } else {
- addGARDENTRADEDATA(this.form).then((response) => {
- this.$modal.msgSuccess("新增成功");
- this.$layer.close(this.layerid);
- this.$parent.getList();
- });
- }
- }
- });
- },
- },
- };
- </script>
- <style></style>
|