Bläddra i källkod

增加基本参数

dongjh 1 år sedan
förälder
incheckning
4a0ca8c90f

+ 208 - 0
src/views/module_base/elecfeeAdd/ElecfeeAddList.vue

@@ -0,0 +1,208 @@
+<template>
+  <a-card :bordered="false">
+    <!-- 查询区域 -->
+    <div class="table-page-search-wrapper">
+      <a-form layout="inline" @keyup.enter.native="searchQuery">
+        <a-row :gutter="24">
+        </a-row>
+      </a-form>
+    </div>
+    <!-- 查询区域-END -->
+
+    <!-- 操作按钮区域 -->
+    <div class="table-operator">
+      <a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>
+      <a-button type="primary" icon="download" @click="handleExportXls('base_elecfee_add')">导出</a-button>
+      <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">
+        <a-button type="primary" icon="import">导入</a-button>
+      </a-upload>
+      <!-- 高级查询区域 -->
+      <j-super-query :fieldList="superFieldList" ref="superQueryModal" @handleSuperQuery="handleSuperQuery"></j-super-query>
+      <a-dropdown v-if="selectedRowKeys.length > 0">
+        <a-menu slot="overlay">
+          <a-menu-item key="1" @click="batchDel"><a-icon type="delete"/>删除</a-menu-item>
+        </a-menu>
+        <a-button style="margin-left: 8px"> 批量操作 <a-icon type="down" /></a-button>
+      </a-dropdown>
+    </div>
+
+    <!-- table区域-begin -->
+    <div>
+      <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">
+        <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a style="font-weight: 600">{{ selectedRowKeys.length }}</a>项
+        <a style="margin-left: 24px" @click="onClearSelected">清空</a>
+      </div>
+
+      <a-table
+        ref="table"
+        size="middle"
+        :scroll="{x:true}"
+        bordered
+        rowKey="id"
+        :columns="columns"
+        :dataSource="dataSource"
+        :pagination="ipagination"
+        :loading="loading"
+        :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
+        class="j-table-force-nowrap"
+        @change="handleTableChange">
+
+        <template slot="htmlSlot" slot-scope="text">
+          <div v-html="text"></div>
+        </template>
+        <template slot="imgSlot" slot-scope="text,record">
+          <span v-if="!text" style="font-size: 12px;font-style: italic;">无图片</span>
+          <img v-else :src="getImgView(text)" :preview="record.id" height="25px" alt="" style="max-width:80px;font-size: 12px;font-style: italic;"/>
+        </template>
+        <template slot="fileSlot" slot-scope="text">
+          <span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span>
+          <a-button
+            v-else
+            :ghost="true"
+            type="primary"
+            icon="download"
+            size="small"
+            @click="downloadFile(text)">
+            下载
+          </a-button>
+        </template>
+
+        <span slot="action" slot-scope="text, record">
+          <a @click="handleEdit(record)">编辑</a>
+
+          <a-divider type="vertical" />
+          <a-dropdown>
+            <a class="ant-dropdown-link">更多 <a-icon type="down" /></a>
+            <a-menu slot="overlay">
+              <a-menu-item>
+                <a @click="handleDetail(record)">详情</a>
+              </a-menu-item>
+              <a-menu-item>
+                <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
+                  <a>删除</a>
+                </a-popconfirm>
+              </a-menu-item>
+            </a-menu>
+          </a-dropdown>
+        </span>
+
+      </a-table>
+    </div>
+
+    <elecfee-add-modal ref="modalForm" @ok="modalFormOk"></elecfee-add-modal>
+  </a-card>
+</template>
+
+<script>
+
+  import '@/assets/less/TableExpand.less'
+  import { mixinDevice } from '@/utils/mixin'
+  import { JeecgListMixin } from '@/mixins/JeecgListMixin'
+  import ElecfeeAddModal from './modules/ElecfeeAddModal'
+
+  export default {
+    name: 'ElecfeeAddList',
+    mixins:[JeecgListMixin, mixinDevice],
+    components: {
+      ElecfeeAddModal
+    },
+    data () {
+      return {
+        description: 'base_elecfee_add管理页面',
+        // 表头
+        columns: [
+          {
+            title: '#',
+            dataIndex: '',
+            key:'rowIndex',
+            width:60,
+            align:"center",
+            customRender:function (t,r,index) {
+              return parseInt(index)+1;
+            }
+          },
+          {
+            title:'部门',
+            align:"center",
+            dataIndex: 'deptid_dictText'
+          },
+          {
+            title:'费用类别',
+            align:"center",
+            dataIndex: 'addtype_dictText'
+          },
+          {
+            title:'电价(元/kw)',
+            align:"center",
+            dataIndex: 'price'
+          },
+          {
+            title:'开始时间',
+            align:"center",
+            dataIndex: 'begintime',
+            customRender:function (text) {
+              return !text?"":(text.length>10?text.substr(0,10):text)
+            }
+          },
+          {
+            title:'结束时间',
+            align:"center",
+            dataIndex: 'endtime',
+            customRender:function (text) {
+              return !text?"":(text.length>10?text.substr(0,10):text)
+            }
+          },
+          {
+            title:'备注',
+            align:"center",
+            dataIndex: 'remark'
+          },
+          {
+            title: '操作',
+            dataIndex: 'action',
+            align:"center",
+            fixed:"right",
+            width:147,
+            scopedSlots: { customRender: 'action' }
+          }
+        ],
+        url: {
+          list: "/elecfeeAdd/elecfeeAdd/list",
+          delete: "/elecfeeAdd/elecfeeAdd/delete",
+          deleteBatch: "/elecfeeAdd/elecfeeAdd/deleteBatch",
+          exportXlsUrl: "/elecfeeAdd/elecfeeAdd/exportXls",
+          importExcelUrl: "elecfeeAdd/elecfeeAdd/importExcel",
+          
+        },
+        dictOptions:{},
+        superFieldList:[],
+      }
+    },
+    created() {
+    this.getSuperFieldList();
+    },
+    computed: {
+      importExcelUrl: function(){
+        return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
+      },
+    },
+    methods: {
+      initDictConfig(){
+      },
+      getSuperFieldList(){
+        let fieldList=[];
+        fieldList.push({type:'int',value:'elecfeeaddid',text:'附加费ID'})
+        fieldList.push({type:'string',value:'remark',text:'备注'})
+        fieldList.push({type:'int',value:'deptid',text:'部门ID'})
+        fieldList.push({type:'string',value:'addtype',text:'费用类别'})
+        fieldList.push({type:'number',value:'price',text:'电价(元/kw)'})
+        fieldList.push({type:'date',value:'begintime',text:'开始时间'})
+        fieldList.push({type:'date',value:'endtime',text:'结束时间'})
+        this.superFieldList = fieldList
+      }
+    }
+  }
+</script>
+<style scoped>
+  @import '~@assets/less/common.less';
+</style>

+ 138 - 0
src/views/module_base/elecfeeAdd/modules/ElecfeeAddForm.vue

@@ -0,0 +1,138 @@
+<template>
+  <a-spin :spinning="confirmLoading">
+    <j-form-container :disabled="formDisabled">
+      <a-form-model ref="form" :model="model" :rules="validatorRules" slot="detail">
+        <a-row>
+          <a-col :span="24">
+            <a-form-model-item label="部门" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="deptid">
+              <j-select-depart v-model="model.deptid" :multi="true"  />
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="费用类别" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="addtype">
+              <j-dict-select-tag type="list" v-model="model.addtype" dictCode="elecfee_add_addtype" placeholder="请选择费用类别" />
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="电价(元/kw)" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="price">
+              <a-input-number v-model="model.price" placeholder="请输入电价(元/kw)" style="width: 100%" />
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="开始时间" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="begintime">
+              <j-date placeholder="请选择开始时间" v-model="model.begintime"  style="width: 100%" />
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="结束时间" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="endtime">
+              <j-date placeholder="请选择结束时间" v-model="model.endtime"  style="width: 100%" />
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="备注" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="remark">
+              <a-textarea v-model="model.remark" placeholder="请输入备注" rows="3" ></a-textarea>
+            </a-form-model-item>
+          </a-col>
+        </a-row>
+      </a-form-model>
+    </j-form-container>
+  </a-spin>
+</template>
+
+<script>
+
+  import { httpAction, getAction } from '@/api/manage'
+  import { validateDuplicateValue } from '@/utils/util'
+
+  export default {
+    name: 'ElecfeeAddForm',
+    components: {
+    },
+    props: {
+      //表单禁用
+      disabled: {
+        type: Boolean,
+        default: false,
+        required: false
+      }
+    },
+    data () {
+      return {
+        model:{
+         },
+        labelCol: {
+          xs: { span: 24 },
+          sm: { span: 5 },
+        },
+        wrapperCol: {
+          xs: { span: 24 },
+          sm: { span: 16 },
+        },
+        confirmLoading: false,
+        validatorRules: {
+           addtype: [
+              { required: true, message: '请选择费用类别!'},
+           ],
+           price: [
+              { required: true, message: '请输入电价!'},
+           ],
+           begintime: [
+              { required: true, message: '请输入开始时间!'},
+           ],
+        },
+        url: {
+          add: "/elecfeeAdd/elecfeeAdd/add",
+          edit: "/elecfeeAdd/elecfeeAdd/edit",
+          queryById: "/elecfeeAdd/elecfeeAdd/queryById"
+        }
+      }
+    },
+    computed: {
+      formDisabled(){
+        return this.disabled
+      },
+    },
+    created () {
+       //备份model原始值
+      this.modelDefault = JSON.parse(JSON.stringify(this.model));
+    },
+    methods: {
+      add () {
+        this.edit(this.modelDefault);
+      },
+      edit (record) {
+        this.model = Object.assign({}, record);
+        this.visible = true;
+      },
+      submitForm () {
+        const that = this;
+        // 触发表单验证
+        this.$refs.form.validate(valid => {
+          if (valid) {
+            that.confirmLoading = true;
+            let httpurl = '';
+            let method = '';
+            if(!this.model.id){
+              httpurl+=this.url.add;
+              method = 'post';
+            }else{
+              httpurl+=this.url.edit;
+               method = 'put';
+            }
+            httpAction(httpurl,this.model,method).then((res)=>{
+              if(res.success){
+                that.$message.success(res.message);
+                that.$emit('ok');
+              }else{
+                that.$message.warning(res.message);
+              }
+            }).finally(() => {
+              that.confirmLoading = false;
+            })
+          }
+         
+        })
+      },
+    }
+  }
+</script>

+ 84 - 0
src/views/module_base/elecfeeAdd/modules/ElecfeeAddModal.Style#Drawer.vue

@@ -0,0 +1,84 @@
+<template>
+  <a-drawer
+    :title="title"
+    :width="width"
+    placement="right"
+    :closable="false"
+    @close="close"
+    destroyOnClose
+    :visible="visible">
+    <elecfee-add-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit" normal></elecfee-add-form>
+    <div class="drawer-footer">
+      <a-button @click="handleCancel" style="margin-bottom: 0;">关闭</a-button>
+      <a-button v-if="!disableSubmit"  @click="handleOk" type="primary" style="margin-bottom: 0;">提交</a-button>
+    </div>
+  </a-drawer>
+</template>
+
+<script>
+
+  import ElecfeeAddForm from './ElecfeeAddForm'
+
+  export default {
+    name: 'ElecfeeAddModal',
+    components: {
+      ElecfeeAddForm
+    },
+    data () {
+      return {
+        title:"操作",
+        width:800,
+        visible: false,
+        disableSubmit: false
+      }
+    },
+    methods: {
+      add () {
+        this.visible=true
+        this.$nextTick(()=>{
+          this.$refs.realForm.add();
+        })
+      },
+      edit (record) {
+        this.visible=true
+        this.$nextTick(()=>{
+          this.$refs.realForm.edit(record);
+        });
+      },
+      close () {
+        this.$emit('close');
+        this.visible = false;
+      },
+      submitCallback(){
+        this.$emit('ok');
+        this.visible = false;
+      },
+      handleOk () {
+        this.$refs.realForm.submitForm();
+      },
+      handleCancel () {
+        this.close()
+      }
+    }
+  }
+</script>
+
+<style lang="less" scoped>
+/** Button按钮间距 */
+  .ant-btn {
+    margin-left: 30px;
+    margin-bottom: 30px;
+    float: right;
+  }
+  .drawer-footer{
+    position: absolute;
+    bottom: -8px;
+    width: 100%;
+    border-top: 1px solid #e8e8e8;
+    padding: 10px 16px;
+    text-align: right;
+    left: 0;
+    background: #fff;
+    border-radius: 0 0 2px 2px;
+  }
+</style>

+ 60 - 0
src/views/module_base/elecfeeAdd/modules/ElecfeeAddModal.vue

@@ -0,0 +1,60 @@
+<template>
+  <j-modal
+    :title="title"
+    :width="width"
+    :visible="visible"
+    switchFullscreen
+    @ok="handleOk"
+    :okButtonProps="{ class:{'jee-hidden': disableSubmit} }"
+    @cancel="handleCancel"
+    cancelText="关闭">
+    <elecfee-add-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></elecfee-add-form>
+  </j-modal>
+</template>
+
+<script>
+
+  import ElecfeeAddForm from './ElecfeeAddForm'
+  export default {
+    name: 'ElecfeeAddModal',
+    components: {
+      ElecfeeAddForm
+    },
+    data () {
+      return {
+        title:'',
+        width:800,
+        visible: false,
+        disableSubmit: false
+      }
+    },
+    methods: {
+      add () {
+        this.visible=true
+        this.$nextTick(()=>{
+          this.$refs.realForm.add();
+        })
+      },
+      edit (record) {
+        this.visible=true
+        this.$nextTick(()=>{
+          this.$refs.realForm.edit(record);
+        })
+      },
+      close () {
+        this.$emit('close');
+        this.visible = false;
+      },
+      handleOk () {
+        this.$refs.realForm.submitForm();
+      },
+      submitCallback(){
+        this.$emit('ok');
+        this.visible = false;
+      },
+      handleCancel () {
+        this.close()
+      }
+    }
+  }
+</script>

+ 1 - 1
src/views/module_base/elecfeeBase/ElecfeeBaseList.vue

@@ -203,7 +203,7 @@ export default {
     }
   },
   created() {
-    // this.getSuperFieldList()
+    this.getSuperFieldList()
   },
   computed: {
     importExcelUrl: function () {

+ 213 - 0
src/views/module_base/elecfeeDegree/ElecfeeDegreeList.vue

@@ -0,0 +1,213 @@
+<template>
+  <a-card :bordered="false">
+    <!-- 查询区域 -->
+    <div class="table-page-search-wrapper">
+      <a-form layout="inline" @keyup.enter.native="searchQuery">
+        <a-row :gutter="24">
+        </a-row>
+      </a-form>
+    </div>
+    <!-- 查询区域-END -->
+
+    <!-- 操作按钮区域 -->
+    <div class="table-operator">
+      <a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>
+      <a-button type="primary" icon="download" @click="handleExportXls('电度电费')">导出</a-button>
+      <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">
+        <a-button type="primary" icon="import">导入</a-button>
+      </a-upload>
+      <!-- 高级查询区域 -->
+      <j-super-query :fieldList="superFieldList" ref="superQueryModal" @handleSuperQuery="handleSuperQuery"></j-super-query>
+      <a-dropdown v-if="selectedRowKeys.length > 0">
+        <a-menu slot="overlay">
+          <a-menu-item key="1" @click="batchDel"><a-icon type="delete"/>删除</a-menu-item>
+        </a-menu>
+        <a-button style="margin-left: 8px"> 批量操作 <a-icon type="down" /></a-button>
+      </a-dropdown>
+    </div>
+
+    <!-- table区域-begin -->
+    <div>
+      <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">
+        <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a style="font-weight: 600">{{ selectedRowKeys.length }}</a>项
+        <a style="margin-left: 24px" @click="onClearSelected">清空</a>
+      </div>
+
+      <a-table
+        ref="table"
+        size="middle"
+        :scroll="{x:true}"
+        bordered
+        rowKey="id"
+        :columns="columns"
+        :dataSource="dataSource"
+        :pagination="ipagination"
+        :loading="loading"
+        :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
+        class="j-table-force-nowrap"
+        @change="handleTableChange">
+
+        <template slot="htmlSlot" slot-scope="text">
+          <div v-html="text"></div>
+        </template>
+        <template slot="imgSlot" slot-scope="text,record">
+          <span v-if="!text" style="font-size: 12px;font-style: italic;">无图片</span>
+          <img v-else :src="getImgView(text)" :preview="record.id" height="25px" alt="" style="max-width:80px;font-size: 12px;font-style: italic;"/>
+        </template>
+        <template slot="fileSlot" slot-scope="text">
+          <span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span>
+          <a-button
+            v-else
+            :ghost="true"
+            type="primary"
+            icon="download"
+            size="small"
+            @click="downloadFile(text)">
+            下载
+          </a-button>
+        </template>
+
+        <span slot="action" slot-scope="text, record">
+          <a @click="handleEdit(record)">编辑</a>
+
+          <a-divider type="vertical" />
+          <a-dropdown>
+            <a class="ant-dropdown-link">更多 <a-icon type="down" /></a>
+            <a-menu slot="overlay">
+              <a-menu-item>
+                <a @click="handleDetail(record)">详情</a>
+              </a-menu-item>
+              <a-menu-item>
+                <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
+                  <a>删除</a>
+                </a-popconfirm>
+              </a-menu-item>
+            </a-menu>
+          </a-dropdown>
+        </span>
+
+      </a-table>
+    </div>
+
+    <elecfee-degree-modal ref="modalForm" @ok="modalFormOk"></elecfee-degree-modal>
+  </a-card>
+</template>
+
+<script>
+
+  import '@/assets/less/TableExpand.less'
+  import { mixinDevice } from '@/utils/mixin'
+  import { JeecgListMixin } from '@/mixins/JeecgListMixin'
+  import ElecfeeDegreeModal from './modules/ElecfeeDegreeModal'
+
+  export default {
+    name: 'ElecfeeDegreeList',
+    mixins:[JeecgListMixin, mixinDevice],
+    components: {
+      ElecfeeDegreeModal
+    },
+    data () {
+      return {
+        description: '电度电费管理页面',
+        // 表头
+        columns: [
+          {
+            title: '#',
+            dataIndex: '',
+            key:'rowIndex',
+            width:60,
+            align:"center",
+            customRender:function (t,r,index) {
+              return parseInt(index)+1;
+            }
+          },
+          {
+            title:'部门',
+            align:"center",
+            dataIndex: 'deptid_dictText',
+            width: 200,
+          },
+          {
+            title:'计费类型',
+            align:"center",
+            dataIndex: 'feetype_dictText',
+            width: 150,
+          },
+          {
+            title:'目录电价(元/kw)',
+            align:"center",
+            dataIndex: 'price',
+            width: 200,
+          },
+          {
+            title:'开始时间',
+            align:"center",
+            dataIndex: 'begintime',
+            customRender:function (text) {
+              return !text?"":(text.length>10?text.substr(0,10):text)
+            },
+            width: 150,
+          },
+          {
+            title:'结束时间',
+            align:"center",
+            dataIndex: 'endtime',
+            customRender:function (text) {
+              return !text?"":(text.length>10?text.substr(0,10):text)
+            },
+            width: 150,
+          },
+          {
+            title:'备注',
+            align:"center",
+            dataIndex: 'remark'
+          },
+          {
+            title: '操作',
+            dataIndex: 'action',
+            align:"center",
+            fixed:"right",
+            width:147,
+            scopedSlots: { customRender: 'action' }
+          }
+        ],
+        url: {
+          list: "/elecfeeDegree/elecfeeDegree/list",
+          delete: "/elecfeeDegree/elecfeeDegree/delete",
+          deleteBatch: "/elecfeeDegree/elecfeeDegree/deleteBatch",
+          exportXlsUrl: "/elecfeeDegree/elecfeeDegree/exportXls",
+          importExcelUrl: "elecfeeDegree/elecfeeDegree/importExcel",
+          
+        },
+        dictOptions:{},
+        superFieldList:[],
+      }
+    },
+    created() {
+    this.getSuperFieldList();
+    },
+    computed: {
+      importExcelUrl: function(){
+        return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
+      },
+    },
+    methods: {
+      initDictConfig(){
+      },
+      getSuperFieldList(){
+        let fieldList=[];
+        fieldList.push({type:'int',value:'elecfeedegreeid',text:'电度电费ID',dictCode:''})
+        fieldList.push({type:'string',value:'remark',text:'备注',dictCode:''})
+        fieldList.push({type:'int',value:'deptid',text:'部门ID',dictCode:''})
+        fieldList.push({type:'string',value:'feetype',text:'计费类型:售电、光伏',dictCode:''})
+        fieldList.push({type:'double',value:'price',text:'目录电价(元/kw)',dictCode:''})
+        fieldList.push({type:'date',value:'begintime',text:'开始时间'})
+        fieldList.push({type:'date',value:'endtime',text:'结束时间'})
+        this.superFieldList = fieldList
+      }
+    }
+  }
+</script>
+<style scoped>
+  @import '~@assets/less/common.less';
+</style>

+ 141 - 0
src/views/module_base/elecfeeDegree/modules/ElecfeeDegreeForm.vue

@@ -0,0 +1,141 @@
+<template>
+  <a-spin :spinning="confirmLoading">
+    <j-form-container :disabled="formDisabled">
+      <a-form-model ref="form" :model="model" :rules="validatorRules" slot="detail">
+        <a-row>
+          <a-col :span="24">
+            <a-form-model-item label="部门ID" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="deptid">
+              <j-select-depart v-model="model.deptid" :multi="true"  />
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="计费类型" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="feetype">
+              <j-dict-select-tag type="list" v-model="model.feetype" dictCode="elecfee_degree_feetype" placeholder="请选择计费类型" />
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="目录电价(元/kw)" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="price">
+              <a-input-number v-model="model.price" placeholder="请输入目录电价(元/kw)" style="width: 100%" />
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="开始时间" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="begintime">
+              <j-date placeholder="请选择开始时间" v-model="model.begintime"  style="width: 100%" />
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="结束时间" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="endtime">
+              <j-date placeholder="请选择结束时间" v-model="model.endtime"  style="width: 100%" />
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="备注" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="remark">
+              <a-textarea v-model="model.remark" placeholder="请输入备注" rows="3" ></a-textarea>
+            </a-form-model-item>
+          </a-col>
+        </a-row>
+      </a-form-model>
+    </j-form-container>
+  </a-spin>
+</template>
+
+<script>
+
+  import { httpAction, getAction } from '@/api/manage'
+  import { validateDuplicateValue } from '@/utils/util'
+
+  export default {
+    name: 'ElecfeeDegreeForm',
+    components: {
+    },
+    props: {
+      //表单禁用
+      disabled: {
+        type: Boolean,
+        default: false,
+        required: false
+      }
+    },
+    data () {
+      return {
+        model:{
+         },
+        labelCol: {
+          xs: { span: 24 },
+          sm: { span: 5 },
+        },
+        wrapperCol: {
+          xs: { span: 24 },
+          sm: { span: 16 },
+        },
+        confirmLoading: false,
+        validatorRules: {
+           elecfeedegreeid: [
+              { required: true, message: '请输入电度电费ID!'},
+           ],
+           feetype: [
+              { required: true, message: '请输入计费类型:售电、光伏!'},
+           ],
+           price: [
+              { required: true, message: '请输入目录电价(元/kw)!'},
+           ],
+           begintime: [
+              { required: true, message: '请输入开始时间!'},
+           ],
+        },
+        url: {
+          add: "/elecfeeDegree/elecfeeDegree/add",
+          edit: "/elecfeeDegree/elecfeeDegree/edit",
+          queryById: "/elecfeeDegree/elecfeeDegree/queryById"
+        }
+      }
+    },
+    computed: {
+      formDisabled(){
+        return this.disabled
+      },
+    },
+    created () {
+       //备份model原始值
+      this.modelDefault = JSON.parse(JSON.stringify(this.model));
+    },
+    methods: {
+      add () {
+        this.edit(this.modelDefault);
+      },
+      edit (record) {
+        this.model = Object.assign({}, record);
+        this.visible = true;
+      },
+      submitForm () {
+        const that = this;
+        // 触发表单验证
+        this.$refs.form.validate(valid => {
+          if (valid) {
+            that.confirmLoading = true;
+            let httpurl = '';
+            let method = '';
+            if(!this.model.id){
+              httpurl+=this.url.add;
+              method = 'post';
+            }else{
+              httpurl+=this.url.edit;
+               method = 'put';
+            }
+            httpAction(httpurl,this.model,method).then((res)=>{
+              if(res.success){
+                that.$message.success(res.message);
+                that.$emit('ok');
+              }else{
+                that.$message.warning(res.message);
+              }
+            }).finally(() => {
+              that.confirmLoading = false;
+            })
+          }
+         
+        })
+      },
+    }
+  }
+</script>

+ 84 - 0
src/views/module_base/elecfeeDegree/modules/ElecfeeDegreeModal.Style#Drawer.vue

@@ -0,0 +1,84 @@
+<template>
+  <a-drawer
+    :title="title"
+    :width="width"
+    placement="right"
+    :closable="false"
+    @close="close"
+    destroyOnClose
+    :visible="visible">
+    <elecfee-degree-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit" normal></elecfee-degree-form>
+    <div class="drawer-footer">
+      <a-button @click="handleCancel" style="margin-bottom: 0;">关闭</a-button>
+      <a-button v-if="!disableSubmit"  @click="handleOk" type="primary" style="margin-bottom: 0;">提交</a-button>
+    </div>
+  </a-drawer>
+</template>
+
+<script>
+
+  import ElecfeeDegreeForm from './ElecfeeDegreeForm'
+
+  export default {
+    name: 'ElecfeeDegreeModal',
+    components: {
+      ElecfeeDegreeForm
+    },
+    data () {
+      return {
+        title:"操作",
+        width:800,
+        visible: false,
+        disableSubmit: false
+      }
+    },
+    methods: {
+      add () {
+        this.visible=true
+        this.$nextTick(()=>{
+          this.$refs.realForm.add();
+        })
+      },
+      edit (record) {
+        this.visible=true
+        this.$nextTick(()=>{
+          this.$refs.realForm.edit(record);
+        });
+      },
+      close () {
+        this.$emit('close');
+        this.visible = false;
+      },
+      submitCallback(){
+        this.$emit('ok');
+        this.visible = false;
+      },
+      handleOk () {
+        this.$refs.realForm.submitForm();
+      },
+      handleCancel () {
+        this.close()
+      }
+    }
+  }
+</script>
+
+<style lang="less" scoped>
+/** Button按钮间距 */
+  .ant-btn {
+    margin-left: 30px;
+    margin-bottom: 30px;
+    float: right;
+  }
+  .drawer-footer{
+    position: absolute;
+    bottom: -8px;
+    width: 100%;
+    border-top: 1px solid #e8e8e8;
+    padding: 10px 16px;
+    text-align: right;
+    left: 0;
+    background: #fff;
+    border-radius: 0 0 2px 2px;
+  }
+</style>

+ 60 - 0
src/views/module_base/elecfeeDegree/modules/ElecfeeDegreeModal.vue

@@ -0,0 +1,60 @@
+<template>
+  <j-modal
+    :title="title"
+    :width="width"
+    :visible="visible"
+    switchFullscreen
+    @ok="handleOk"
+    :okButtonProps="{ class:{'jee-hidden': disableSubmit} }"
+    @cancel="handleCancel"
+    cancelText="关闭">
+    <elecfee-degree-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></elecfee-degree-form>
+  </j-modal>
+</template>
+
+<script>
+
+  import ElecfeeDegreeForm from './ElecfeeDegreeForm'
+  export default {
+    name: 'ElecfeeDegreeModal',
+    components: {
+      ElecfeeDegreeForm
+    },
+    data () {
+      return {
+        title:'',
+        width:800,
+        visible: false,
+        disableSubmit: false
+      }
+    },
+    methods: {
+      add () {
+        this.visible=true
+        this.$nextTick(()=>{
+          this.$refs.realForm.add();
+        })
+      },
+      edit (record) {
+        this.visible=true
+        this.$nextTick(()=>{
+          this.$refs.realForm.edit(record);
+        })
+      },
+      close () {
+        this.$emit('close');
+        this.visible = false;
+      },
+      handleOk () {
+        this.$refs.realForm.submitForm();
+      },
+      submitCallback(){
+        this.$emit('ok');
+        this.visible = false;
+      },
+      handleCancel () {
+        this.close()
+      }
+    }
+  }
+</script>

+ 220 - 0
src/views/module_base/elecfeeRatio/ElecfeeRatioList.vue

@@ -0,0 +1,220 @@
+<template>
+  <a-card :bordered="false">
+    <!-- 查询区域 -->
+    <div class="table-page-search-wrapper">
+      <a-form layout="inline" @keyup.enter.native="searchQuery">
+        <a-row :gutter="24">
+        </a-row>
+      </a-form>
+    </div>
+    <!-- 查询区域-END -->
+
+    <!-- 操作按钮区域 -->
+    <div class="table-operator">
+      <a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>
+      <a-button type="primary" icon="download" @click="handleExportXls('base_elecfee_ratio')">导出</a-button>
+      <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">
+        <a-button type="primary" icon="import">导入</a-button>
+      </a-upload>
+      <!-- 高级查询区域 -->
+      <j-super-query :fieldList="superFieldList" ref="superQueryModal" @handleSuperQuery="handleSuperQuery"></j-super-query>
+      <a-dropdown v-if="selectedRowKeys.length > 0">
+        <a-menu slot="overlay">
+          <a-menu-item key="1" @click="batchDel"><a-icon type="delete"/>删除</a-menu-item>
+        </a-menu>
+        <a-button style="margin-left: 8px"> 批量操作 <a-icon type="down" /></a-button>
+      </a-dropdown>
+    </div>
+
+    <!-- table区域-begin -->
+    <div>
+      <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">
+        <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a style="font-weight: 600">{{ selectedRowKeys.length }}</a>项
+        <a style="margin-left: 24px" @click="onClearSelected">清空</a>
+      </div>
+
+      <a-table
+        ref="table"
+        size="middle"
+        :scroll="{x:true}"
+        bordered
+        rowKey="id"
+        :columns="columns"
+        :dataSource="dataSource"
+        :pagination="ipagination"
+        :loading="loading"
+        :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
+        class="j-table-force-nowrap"
+        @change="handleTableChange">
+
+        <template slot="htmlSlot" slot-scope="text">
+          <div v-html="text"></div>
+        </template>
+        <template slot="imgSlot" slot-scope="text,record">
+          <span v-if="!text" style="font-size: 12px;font-style: italic;">无图片</span>
+          <img v-else :src="getImgView(text)" :preview="record.id" height="25px" alt="" style="max-width:80px;font-size: 12px;font-style: italic;"/>
+        </template>
+        <template slot="fileSlot" slot-scope="text">
+          <span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span>
+          <a-button
+            v-else
+            :ghost="true"
+            type="primary"
+            icon="download"
+            size="small"
+            @click="downloadFile(text)">
+            下载
+          </a-button>
+        </template>
+
+        <span slot="action" slot-scope="text, record">
+          <a @click="handleEdit(record)">编辑</a>
+
+          <a-divider type="vertical" />
+          <a-dropdown>
+            <a class="ant-dropdown-link">更多 <a-icon type="down" /></a>
+            <a-menu slot="overlay">
+              <a-menu-item>
+                <a @click="handleDetail(record)">详情</a>
+              </a-menu-item>
+              <a-menu-item>
+                <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
+                  <a>删除</a>
+                </a-popconfirm>
+              </a-menu-item>
+            </a-menu>
+          </a-dropdown>
+        </span>
+
+      </a-table>
+    </div>
+
+    <elecfee-ratio-modal ref="modalForm" @ok="modalFormOk"></elecfee-ratio-modal>
+  </a-card>
+</template>
+
+<script>
+
+  import '@/assets/less/TableExpand.less'
+  import { mixinDevice } from '@/utils/mixin'
+  import { JeecgListMixin } from '@/mixins/JeecgListMixin'
+  import ElecfeeRatioModal from './modules/ElecfeeRatioModal'
+
+  export default {
+    name: 'ElecfeeRatioList',
+    mixins:[JeecgListMixin, mixinDevice],
+    components: {
+      ElecfeeRatioModal
+    },
+    data () {
+      return {
+        description: 'base_elecfee_ratio管理页面',
+        // 表头
+        columns: [
+          {
+            title: '#',
+            dataIndex: '',
+            key:'rowIndex',
+            width:60,
+            align:"center",
+            customRender:function (t,r,index) {
+              return parseInt(index)+1;
+            }
+          },
+          {
+            title:'部门',
+            align:"center",
+            dataIndex: 'deptid_dictText',
+            width: 200,
+          },
+          {
+            title:'功率因数',
+            align:"center",
+            dataIndex: 'powerfactor',
+            width: 150,
+          },
+          {
+            title:'考核因数',
+            align:"center",
+            dataIndex: 'assessfactor',
+            width: 150,
+          },
+          {
+            title:'力调系数',
+            align:"center",
+            dataIndex: 'ratio',
+            width: 150,
+          },
+          {
+            title:'开始时间',
+            align:"center",
+            dataIndex: 'begintime',
+            customRender:function (text) {
+              return !text?"":(text.length>10?text.substr(0,10):text)
+            },
+            width: 200,
+          },
+          {
+            title:'结束时间',
+            align:"center",
+            dataIndex: 'endtime',
+            customRender:function (text) {
+              return !text?"":(text.length>10?text.substr(0,10):text)
+            },
+            width: 200,
+          },
+          {
+            title:'备注',
+            align:"center",
+            dataIndex: 'remark'
+          },
+          {
+            title: '操作',
+            dataIndex: 'action',
+            align:"center",
+            fixed:"right",
+            width:147,
+            scopedSlots: { customRender: 'action' }
+          }
+        ],
+        url: {
+          list: "/elecfeeRatio/elecfeeRatio/list",
+          delete: "/elecfeeRatio/elecfeeRatio/delete",
+          deleteBatch: "/elecfeeRatio/elecfeeRatio/deleteBatch",
+          exportXlsUrl: "/elecfeeRatio/elecfeeRatio/exportXls",
+          importExcelUrl: "elecfeeRatio/elecfeeRatio/importExcel",
+          
+        },
+        dictOptions:{},
+        superFieldList:[],
+      }
+    },
+    created() {
+    this.getSuperFieldList();
+    },
+    computed: {
+      importExcelUrl: function(){
+        return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
+      },
+    },
+    methods: {
+      initDictConfig(){
+      },
+      getSuperFieldList(){
+        let fieldList=[];
+        fieldList.push({type:'int',value:'elecfeeratioid',text:'力调系数ID'})
+        fieldList.push({type:'string',value:'remark',text:'备注'})
+        fieldList.push({type:'int',value:'deptid',text:'部门ID'})
+        fieldList.push({type:'number',value:'powerfactor',text:'功率因数'})
+        fieldList.push({type:'number',value:'assessfactor',text:'考核因数'})
+        fieldList.push({type:'number',value:'ratio',text:'力调系数'})
+        fieldList.push({type:'date',value:'begintime',text:'开始时间'})
+        fieldList.push({type:'date',value:'endtime',text:'结束时间'})
+        this.superFieldList = fieldList
+      }
+    }
+  }
+</script>
+<style scoped>
+  @import '~@assets/less/common.less';
+</style>

+ 146 - 0
src/views/module_base/elecfeeRatio/modules/ElecfeeRatioForm.vue

@@ -0,0 +1,146 @@
+<template>
+  <a-spin :spinning="confirmLoading">
+    <j-form-container :disabled="formDisabled">
+      <a-form-model ref="form" :model="model" :rules="validatorRules" slot="detail">
+        <a-row>
+          <a-col :span="24">
+            <a-form-model-item label="部门ID" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="deptid">
+              <j-select-depart v-model="model.deptid" :multi="true"  />
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="功率因数" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="powerfactor">
+              <a-input-number v-model="model.powerfactor" placeholder="请输入功率因数" style="width: 100%" />
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="考核因数" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="assessfactor">
+              <a-input-number v-model="model.assessfactor" placeholder="请输入考核因数" style="width: 100%" />
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="力调系数" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="ratio">
+              <a-input-number v-model="model.ratio" placeholder="请输入力调系数" style="width: 100%" />
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="开始时间" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="begintime">
+              <j-date placeholder="请选择开始时间" v-model="model.begintime"  style="width: 100%" />
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="结束时间" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="endtime">
+              <j-date placeholder="请选择结束时间" v-model="model.endtime"  style="width: 100%" />
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="备注" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="remark">
+              <a-textarea v-model="model.remark" placeholder="请输入备注" rows="3" ></a-textarea>
+            </a-form-model-item>
+          </a-col>
+        </a-row>
+      </a-form-model>
+    </j-form-container>
+  </a-spin>
+</template>
+
+<script>
+
+  import { httpAction, getAction } from '@/api/manage'
+  import { validateDuplicateValue } from '@/utils/util'
+
+  export default {
+    name: 'ElecfeeRatioForm',
+    components: {
+    },
+    props: {
+      //表单禁用
+      disabled: {
+        type: Boolean,
+        default: false,
+        required: false
+      }
+    },
+    data () {
+      return {
+        model:{
+         },
+        labelCol: {
+          xs: { span: 24 },
+          sm: { span: 5 },
+        },
+        wrapperCol: {
+          xs: { span: 24 },
+          sm: { span: 16 },
+        },
+        confirmLoading: false,
+        validatorRules: {
+           powerfactor: [
+              { required: true, message: '请输入功率因数!'},
+           ],
+           assessfactor: [
+              { required: true, message: '请输入考核因数!'},
+           ],
+           ratio: [
+              { required: true, message: '请输入力调系数!'},
+           ],
+           begintime: [
+              { required: true, message: '请输入开始时间!'},
+           ],
+        },
+        url: {
+          add: "/elecfeeRatio/elecfeeRatio/add",
+          edit: "/elecfeeRatio/elecfeeRatio/edit",
+          queryById: "/elecfeeRatio/elecfeeRatio/queryById"
+        }
+      }
+    },
+    computed: {
+      formDisabled(){
+        return this.disabled
+      },
+    },
+    created () {
+       //备份model原始值
+      this.modelDefault = JSON.parse(JSON.stringify(this.model));
+    },
+    methods: {
+      add () {
+        this.edit(this.modelDefault);
+      },
+      edit (record) {
+        this.model = Object.assign({}, record);
+        this.visible = true;
+      },
+      submitForm () {
+        const that = this;
+        // 触发表单验证
+        this.$refs.form.validate(valid => {
+          if (valid) {
+            that.confirmLoading = true;
+            let httpurl = '';
+            let method = '';
+            if(!this.model.id){
+              httpurl+=this.url.add;
+              method = 'post';
+            }else{
+              httpurl+=this.url.edit;
+               method = 'put';
+            }
+            httpAction(httpurl,this.model,method).then((res)=>{
+              if(res.success){
+                that.$message.success(res.message);
+                that.$emit('ok');
+              }else{
+                that.$message.warning(res.message);
+              }
+            }).finally(() => {
+              that.confirmLoading = false;
+            })
+          }
+         
+        })
+      },
+    }
+  }
+</script>

+ 84 - 0
src/views/module_base/elecfeeRatio/modules/ElecfeeRatioModal.Style#Drawer.vue

@@ -0,0 +1,84 @@
+<template>
+  <a-drawer
+    :title="title"
+    :width="width"
+    placement="right"
+    :closable="false"
+    @close="close"
+    destroyOnClose
+    :visible="visible">
+    <elecfee-ratio-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit" normal></elecfee-ratio-form>
+    <div class="drawer-footer">
+      <a-button @click="handleCancel" style="margin-bottom: 0;">关闭</a-button>
+      <a-button v-if="!disableSubmit"  @click="handleOk" type="primary" style="margin-bottom: 0;">提交</a-button>
+    </div>
+  </a-drawer>
+</template>
+
+<script>
+
+  import ElecfeeRatioForm from './ElecfeeRatioForm'
+
+  export default {
+    name: 'ElecfeeRatioModal',
+    components: {
+      ElecfeeRatioForm
+    },
+    data () {
+      return {
+        title:"操作",
+        width:800,
+        visible: false,
+        disableSubmit: false
+      }
+    },
+    methods: {
+      add () {
+        this.visible=true
+        this.$nextTick(()=>{
+          this.$refs.realForm.add();
+        })
+      },
+      edit (record) {
+        this.visible=true
+        this.$nextTick(()=>{
+          this.$refs.realForm.edit(record);
+        });
+      },
+      close () {
+        this.$emit('close');
+        this.visible = false;
+      },
+      submitCallback(){
+        this.$emit('ok');
+        this.visible = false;
+      },
+      handleOk () {
+        this.$refs.realForm.submitForm();
+      },
+      handleCancel () {
+        this.close()
+      }
+    }
+  }
+</script>
+
+<style lang="less" scoped>
+/** Button按钮间距 */
+  .ant-btn {
+    margin-left: 30px;
+    margin-bottom: 30px;
+    float: right;
+  }
+  .drawer-footer{
+    position: absolute;
+    bottom: -8px;
+    width: 100%;
+    border-top: 1px solid #e8e8e8;
+    padding: 10px 16px;
+    text-align: right;
+    left: 0;
+    background: #fff;
+    border-radius: 0 0 2px 2px;
+  }
+</style>

+ 60 - 0
src/views/module_base/elecfeeRatio/modules/ElecfeeRatioModal.vue

@@ -0,0 +1,60 @@
+<template>
+  <j-modal
+    :title="title"
+    :width="width"
+    :visible="visible"
+    switchFullscreen
+    @ok="handleOk"
+    :okButtonProps="{ class:{'jee-hidden': disableSubmit} }"
+    @cancel="handleCancel"
+    cancelText="关闭">
+    <elecfee-ratio-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></elecfee-ratio-form>
+  </j-modal>
+</template>
+
+<script>
+
+  import ElecfeeRatioForm from './ElecfeeRatioForm'
+  export default {
+    name: 'ElecfeeRatioModal',
+    components: {
+      ElecfeeRatioForm
+    },
+    data () {
+      return {
+        title:'',
+        width:800,
+        visible: false,
+        disableSubmit: false
+      }
+    },
+    methods: {
+      add () {
+        this.visible=true
+        this.$nextTick(()=>{
+          this.$refs.realForm.add();
+        })
+      },
+      edit (record) {
+        this.visible=true
+        this.$nextTick(()=>{
+          this.$refs.realForm.edit(record);
+        })
+      },
+      close () {
+        this.$emit('close');
+        this.visible = false;
+      },
+      handleOk () {
+        this.$refs.realForm.submitForm();
+      },
+      submitCallback(){
+        this.$emit('ok');
+        this.visible = false;
+      },
+      handleCancel () {
+        this.close()
+      }
+    }
+  }
+</script>

+ 20 - 50
src/views/module_base/energyPlan/EnergyPlanList.vue

@@ -122,24 +122,16 @@
             }
           },
           {
-            title:'能源计划ID',
-            align:"center",
-            dataIndex: 'energyplanid'
-          },
-          {
-            title:'备注',
-            align:"center",
-            dataIndex: 'remark'
-          },
-          {
-            title:'设备ID',
+            title:'设备编号',
             align:"center",
-            dataIndex: 'equipmentid'
+            dataIndex: 'equipmentcode',
+            width: 150,
           },
           {
-            title:'设备编号',
+            title:'设备名称',
             align:"center",
-            dataIndex: 'equipmentcode'
+            dataIndex: 'equipmentid_dictText',
+            width: 300,
           },
           {
             title:'计划日期',
@@ -147,47 +139,25 @@
             dataIndex: 'plandate',
             customRender:function (text) {
               return !text?"":(text.length>10?text.substr(0,10):text)
-            }
+            },
+            width: 150,
           },
           {
-            title:'能源分类ID',
+            title:'能源分类',
             align:"center",
-            dataIndex: 'energytypeid'
+            dataIndex: 'energytypeid_dictText',
+            width: 150,
           },
           {
             title:'计划值',
             align:"center",
-            dataIndex: 'planvalue'
-          },
-          {
-            title:'所属年',
-            align:"center",
-            dataIndex: 'year'
+            dataIndex: 'planvalue',
+            width: 150,
           },
           {
-            title:'所属月',
-            align:"center",
-            dataIndex: 'month'
-          },
-          {
-            title:'日期',
-            align:"center",
-            dataIndex: 'day'
-          },
-          {
-            title:'所属年月',
-            align:"center",
-            dataIndex: 'yearmonth'
-          },
-          {
-            title:'所属周',
-            align:"center",
-            dataIndex: 'week'
-          },
-          {
-            title:'周几',
+            title:'备注',
             align:"center",
-            dataIndex: 'dayofweek'
+            dataIndex: 'remark'
           },
           {
             title: '操作',
@@ -199,11 +169,11 @@
           }
         ],
         url: {
-          list: "/baseEnergyPlan/baseEnergyPlan/list",
-          delete: "/baseEnergyPlan/baseEnergyPlan/delete",
-          deleteBatch: "/baseEnergyPlan/baseEnergyPlan/deleteBatch",
-          exportXlsUrl: "/baseEnergyPlan/baseEnergyPlan/exportXls",
-          importExcelUrl: "baseEnergyPlan/baseEnergyPlan/importExcel",
+          list: "/energyPlan/energyPlan/list",
+          delete: "/energyPlan/energyPlan/delete",
+          deleteBatch: "/energyPlan/energyPlan/deleteBatch",
+          exportXlsUrl: "/energyPlan/energyPlan/exportXls",
+          importExcelUrl: "energyPlan/energyPlan/importExcel",
           
         },
         dictOptions:{},

+ 21 - 47
src/views/module_base/energyPlan/modules/EnergyPlanForm.vue

@@ -4,23 +4,13 @@
       <a-form-model ref="form" :model="model" :rules="validatorRules" slot="detail">
         <a-row>
           <a-col :span="24">
-            <a-form-model-item label="能源计划ID" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="energyplanid">
-              <a-input-number v-model="model.energyplanid" placeholder="请输入能源计划ID" style="width: 100%" />
-            </a-form-model-item>
-          </a-col>
-          <a-col :span="24">
-            <a-form-model-item label="备注" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="remark">
-              <a-input v-model="model.remark" placeholder="请输入备注"  ></a-input>
-            </a-form-model-item>
-          </a-col>
-          <a-col :span="24">
-            <a-form-model-item label="设备ID" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="equipmentid">
-              <a-input-number v-model="model.equipmentid" placeholder="请输入设备ID" style="width: 100%" />
+            <a-form-model-item label="设备名称" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="equipmentid">
+              <j-search-select-tag v-model="model.equipmentid" placeholder="请选择设备" dict="tpm_equipment,equipmentname,id"  />
             </a-form-model-item>
           </a-col>
           <a-col :span="24">
             <a-form-model-item label="设备编号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="equipmentcode">
-              <a-input v-model="model.equipmentcode" placeholder="请输入设备编号"  ></a-input>
+              <a-input v-model="model.equipmentcode" readonly placeholder="请输入设备编号"  ></a-input>
             </a-form-model-item>
           </a-col>
           <a-col :span="24">
@@ -29,8 +19,8 @@
             </a-form-model-item>
           </a-col>
           <a-col :span="24">
-            <a-form-model-item label="能源分类ID" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="energytypeid">
-              <a-input-number v-model="model.energytypeid" placeholder="请输入能源分类ID" style="width: 100%" />
+            <a-form-model-item label="能源分类" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="energytypeid">
+              <j-search-select-tag v-model="model.energytypeid" placeholder="请选择能源分类" dict="base_energy_type,name,id"  />
             </a-form-model-item>
           </a-col>
           <a-col :span="24">
@@ -39,33 +29,8 @@
             </a-form-model-item>
           </a-col>
           <a-col :span="24">
-            <a-form-model-item label="所属年" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="year">
-              <a-input-number v-model="model.year" placeholder="请输入所属年" style="width: 100%" />
-            </a-form-model-item>
-          </a-col>
-          <a-col :span="24">
-            <a-form-model-item label="所属月" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="month">
-              <a-input-number v-model="model.month" placeholder="请输入所属月" style="width: 100%" />
-            </a-form-model-item>
-          </a-col>
-          <a-col :span="24">
-            <a-form-model-item label="日期" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="day">
-              <a-input v-model="model.day" placeholder="请输入日期"  ></a-input>
-            </a-form-model-item>
-          </a-col>
-          <a-col :span="24">
-            <a-form-model-item label="所属年月" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="yearmonth">
-              <a-input v-model="model.yearmonth" placeholder="请输入所属年月"  ></a-input>
-            </a-form-model-item>
-          </a-col>
-          <a-col :span="24">
-            <a-form-model-item label="所属周" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="week">
-              <a-input-number v-model="model.week" placeholder="请输入所属周" style="width: 100%" />
-            </a-form-model-item>
-          </a-col>
-          <a-col :span="24">
-            <a-form-model-item label="周几" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="dayofweek">
-              <a-input-number v-model="model.dayofweek" placeholder="请输入周几" style="width: 100%" />
+            <a-form-model-item label="备注" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="remark">
+              <a-textarea v-model="model.remark" placeholder="请输入备注" rows="3" ></a-textarea>
             </a-form-model-item>
           </a-col>
         </a-row>
@@ -105,14 +70,23 @@
         },
         confirmLoading: false,
         validatorRules: {
-           energyplanid: [
-              { required: true, message: '请输入能源计划ID!'},
+           equipmentid: [
+              { required: true, message: '请输入设备名称!'},
+           ],
+           plandate: [
+              { required: true, message: '请输入计划日期!'},
+           ],
+           energytypeid: [
+              { required: true, message: '请选择能源分类!'},
+           ],
+           planvalue: [
+              { required: true, message: '请输入计划值!'},
            ],
         },
         url: {
-          add: "/baseEnergyPlan/baseEnergyPlan/add",
-          edit: "/baseEnergyPlan/baseEnergyPlan/edit",
-          queryById: "/baseEnergyPlan/baseEnergyPlan/queryById"
+          add: "/energyPlan/energyPlan/add",
+          edit: "/energyPlan/energyPlan/edit",
+          queryById: "/energyPlan/energyPlan/queryById"
         }
       }
     },

+ 3 - 3
src/views/module_base/energyRate/EnergyRateList.vue

@@ -172,14 +172,14 @@
             dataIndex: 'name',
           },
           {
-            title: '能源分类ID',
+            title: '能源分类',
             align: 'center',
-            dataIndex: 'energytypeid',
+            dataIndex: 'energytypeid_dictText',
           },
           {
             title: '费率类型',
             align: 'center',
-            dataIndex: 'ratetype',
+            dataIndex: 'ratetype_dictText',
           },
           {
             title: '单位',

+ 7 - 7
src/views/module_base/energyRate/modules/EnergyRateForm.vue

@@ -10,13 +10,13 @@
             </a-form-model-item>
           </a-col>
           <a-col :xs="24" :sm="12">
-            <a-form-model-item label="能源分类ID" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="energytypeid">
-              <a-input-number v-model="model.energytypeid" placeholder="请输入能源分类ID" style="width: 100%" />
+            <a-form-model-item label="能源分类" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="energytypeid">
+              <j-search-select-tag v-model="model.energytypeid" placeholder="请选择设备" dict="base_energy_type,name,id"  />
             </a-form-model-item>
           </a-col>
           <a-col :xs="24" :sm="12">
             <a-form-model-item label="费率类型" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="ratetype">
-              <a-input v-model="model.ratetype" placeholder="请输入费率类型" ></a-input>
+              <j-dict-select-tag type="list" v-model="model.ratetype" dictCode="energy_rate_type" placeholder="请选择费率类型" />
             </a-form-model-item>
           </a-col>
           <a-col :xs="24" :sm="12">
@@ -36,7 +36,7 @@
           </a-col>
           <a-col :xs="24" :sm="24">
             <a-form-model-item label="备注" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="remark">
-              <a-textarea v-model="model.remark" placeholder="请输入备注" style="width: 100%" ></a-textarea>
+              <a-textarea v-model="model.remark" placeholder="请输入备注" rows="3" ></a-textarea>
             </a-form-model-item>
           </a-col>
         </a-row>
@@ -119,7 +119,7 @@
             {
               title: '分时开始时间',
               key: 'begintime',
-              type: FormTypes.date,
+              type: FormTypes.time,
               width:"200px",
               placeholder: '请输入${title}',
               defaultValue:'',
@@ -128,7 +128,7 @@
             {
               title: '分时结束时间',
               key: 'endtime',
-              type: FormTypes.date,
+              type: FormTypes.time,
               width:"200px",
               placeholder: '请输入${title}',
               defaultValue:'',
@@ -167,7 +167,7 @@
               width:"200px",
               placeholder: '请输入${title}',
               defaultValue:'',
-              validateRules: [{ required: true, message: '${title}不能为空' }],
+              // validateRules: [{ required: true, message: '${title}不能为空' }],
             },
           ]
         },

+ 2 - 2
src/views/module_base/energyRate/subTables/EnergyRateDetailSubTable.vue

@@ -52,7 +52,7 @@
     },
     data() {
       return {
-        description: 'base_energy_rate_detail内嵌列表',
+        description: '能源费率内嵌列表',
         disableMixinCreated: true,
         loading: false,
         dataSource: [],
@@ -70,7 +70,7 @@
           {
             title: '峰平谷',
             align: 'center',
-            dataIndex: 'pandv',
+            dataIndex: 'pandv_dictText',
           },
           {
             title: '价格',

+ 5 - 10
src/views/module_base/energyType/modules/EnergyTypeForm.vue

@@ -4,16 +4,6 @@
       <a-form-model ref="form" :model="model" :rules="validatorRules" slot="detail">
         <a-row>
           <a-col :span="24">
-            <a-form-model-item label="能源分类ID" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="id">
-              <a-input-number v-model="model.id" placeholder="请输入能源分类ID" style="width: 100%" />
-            </a-form-model-item>
-          </a-col>
-          <a-col :span="24">
-            <a-form-model-item label="备注" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="remark">
-              <a-input v-model="model.remark" placeholder="请输入备注"  ></a-input>
-            </a-form-model-item>
-          </a-col>
-          <a-col :span="24">
             <a-form-model-item label="名称" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="name">
               <a-input v-model="model.name" placeholder="请输入名称"  ></a-input>
             </a-form-model-item>
@@ -33,6 +23,11 @@
               <a-input-number v-model="model.co2" placeholder="请输入千克二氧化碳排放" style="width: 100%" />
             </a-form-model-item>
           </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="备注" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="remark">
+              <a-textarea v-model="model.remark" placeholder="请输入备注" rows="3" ></a-textarea>
+            </a-form-model-item>
+          </a-col>
         </a-row>
       </a-form-model>
     </j-form-container>