Bladeren bron

收入业务

lining 5 jaren geleden
bovenliggende
commit
69c16df73e

+ 11 - 0
src/dashoo.cn/backend/api/business/oilsupplier/oilcatalog/oilcatalog.go

@@ -9,10 +9,21 @@ type OilCatalog struct {
 	CatalogType    int       `xorm:"comment('目录类型: 1 自建项目、2 优势项目、3 关联交易、4 战略合作、5 特殊业务、6 创收业务') INT(11)"`
 	OrderNo        int       `xorm:"comment('序号') INT(11)"`
 	CompanyName    string    `xorm:"comment('企业名称') VARCHAR(255)"`
+	LegalPerson    string    `xorm:"comment('法人名称') VARCHAR(50)"`
+	Address        string    `xorm:"comment('注册地址') VARCHAR(255)"`
+	USCCode        string    `xorm:"comment('统一社会信息代码') VARCHAR(20)"`
+	RegCapital     float64   `xorm:"comment('注册资金') FLOAT"`
+	RecordScope    string    `xorm:"comment('企业名称') TEXT"`
+	IDCode         string    `xorm:"comment('身份证号') VARCHAR(20)"`
 	Business       string    `xorm:"comment('业务范围') TEXT"`
 	ValidityFrom   time.Time `xorm:"comment('有效期起') DATETIME"`
 	ValidityTo     time.Time `xorm:"comment('有效期止') DATETIME"`
 	Remark         string    `xorm:"comment('备注') VARCHAR(255)"`
+	Status         string    `xorm:"VARCHAR(10)"`
+	FirstAudit     int       `xorm:"comment('初审人') INT(11)"`
+	SecondAudit    int       `xorm:"comment('复审人') INT(11)"`
+	BusinessKey    string    `xorm:"VARCHAR(50)"`
+	ProcessKey     string    `xorm:"VARCHAR(50)"`
 	CreateUserId   int       `xorm:"INT(11)"`
 	CreateOn       time.Time `xorm:"DATETIME"`
 	CreateBy       string    `xorm:"VARCHAR(50)"`

+ 205 - 0
src/dashoo.cn/frontend_web/src/pages/oilsupplier/oilcatalog/_opera/incomeedit.vue

@@ -0,0 +1,205 @@
+<template>
+  <div>
+    <el-breadcrumb class="heading">
+      <el-breadcrumb-item :to="{ path: '/' }">平台首页</el-breadcrumb-item>
+      <el-breadcrumb-item :to="{ path: '/oilsupplier/oilcatalog/income' }">收入业务</el-breadcrumb-item>
+      <el-breadcrumb-item>添加</el-breadcrumb-item>
+    </el-breadcrumb>
+    <el-card class="box-card">
+      <div slot="header">
+        <div slot="header">
+          <span><i class="icon icon-table2"></i></span>
+          <el-button style="float: right; padding: 3px 0" type="text" @click="saveEntity">保存信息</el-button>
+        </div>
+      </div>
+
+      <el-form label-width="150px" ref="EntityForm">
+        <el-row>
+          <el-col :span="8">
+            <el-form-item label="提交人" prop="Submitter">
+              <el-input v-model="formData.Submitter" :readonly="true" placeholder="请输入" style="width: 100%"></el-input>
+            </el-form-item>
+          </el-col>
+          <!--<el-col :span="6">-->
+            <!--<el-form-item label="提交单位" prop="DeptId">-->
+              <!--<el-select filterable v-model="formData.DeptId" maxlength="255" clearable placeholder="请选择分办单位"-->
+                         <!--style="width: 100%" >-->
+                <!--<el-option v-for="item in organizeOption" :key="item.Id" :label="item.Fullname" :value="item.Id">-->
+                <!--</el-option>-->
+              <!--</el-select>-->
+            <!--</el-form-item>-->
+          <!--</el-col>-->
+          <el-col :span="8">
+            <el-form-item label="初审人员" prop="FirstAuditName" :rules="{ required: true, message: '初审人员不能为空', trigger: 'blur'}">
+              <el-input ref="selectAuditer" readonly v-model="formData.FirstAuditName" placeholder="请选择初审人">
+                <el-button slot="append" icon="el-icon-search" @click="chooseAuditorShow"></el-button>
+              </el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :span="8">
+            <el-form-item label="复审人员" prop="SecondAudit" :rules="{ required: true, message: '复审人员不能为空', trigger: 'blur'}">
+              <el-select ref="secondAudit" v-model="formData.SecondAudit" placeholder="请选择复审人" style="width: 100%" filterable
+                         allow-create default-first-option>
+                <el-option v-for="item in secauditerOptions" :key="item.Id" :label="item.Realname" :value="item.Id">
+                </el-option>
+              </el-select>
+            </el-form-item>
+          </el-col>
+          <el-col :span="16">
+            <el-form-item label="备注" prop="Remark">
+              <el-input  type="textarea" v-model="formData.Remark"
+                        placeholder="请输入">
+              </el-input>
+            </el-form-item>
+          </el-col>
+        </el-row>
+      </el-form>
+    </el-card>
+    <el-card class="box-card">
+      <div slot="header">
+        <span>
+          <i class="icon icon-table2"></i> 明细
+        </span>
+      </div>
+      <el-table :data="entityList" border height="calc(100vh - 243px)" style="width: 100%" size="mini">
+        <el-table-column label="操作" min-width="100px" align="center" fixed="right">
+          <template slot-scope="scope">
+            <el-button type="primary" size="mini" @click="editOilcatalog(scope.row)" plain>{{btnName}}</el-button>
+            <el-popover placement="top" title="提示">
+              <el-alert
+                title=""
+                description="确认要删除吗?"
+                type="warning"
+                :closable="false">
+              </el-alert>
+              <br/>
+              <div style="text-align: right; margin: 0">
+                <el-button type="danger" size="mini" @click="deleteEntity(scope.row)">删除</el-button>
+              </div>
+              <el-button slot="reference" type="danger" title="删除" style="margin-left:10px" size="mini" plain v-if="showBtn">删除</el-button>
+            </el-popover>
+          </template>
+
+        </el-table-column>
+        <!--<el-table-column sortable min-width="80" align="center" show-overflow-tooltip prop="SupplierName" label="序号"></el-table-column>-->
+        <el-table-column sortable min-width="120" align="center" show-overflow-tooltip prop="CompanyName" label="企业名称"></el-table-column>
+        <el-table-column sortable min-width="120" align="center" show-overflow-tooltip prop="LegalPerson" label="法人姓名"></el-table-column>
+        <el-table-column sortable min-width="120" align="center" show-overflow-tooltip prop="Address" label="企业注册地址"></el-table-column>
+        <el-table-column sortable min-width="150" align="center" show-overflow-tooltip prop="USCCode" label="全国统一信用代码"></el-table-column>
+        <el-table-column sortable min-width="120" align="center" show-overflow-tooltip prop="RegCapital" label="注册资本"></el-table-column>
+        <el-table-column sortable min-width="500" align="center" show-overflow-tooltip prop="RecordScope" label="申请备案范围"></el-table-column>
+        <el-table-column sortable min-width="120" align="center" show-overflow-tooltip prop="IDCode" label="法人身份证号"></el-table-column>
+        <el-table-column sortable min-width="120" align="center" show-overflow-tooltip prop="Remark" label="备注"></el-table-column>
+
+      </el-table>
+    </el-card>
+
+    <choose-auditor ref="chooseAuditor"
+                    @close="setAuditer"
+                    @hideChooseAuditer="chooseAuditorVisible=false"
+                    :visible="chooseAuditorVisible"></choose-auditor>
+
+  </div>
+</template>
+
+<script>
+  import { mapGetters } from 'vuex'
+  import ChooseAuditor from '@/components/oilsupplier/chooseauditor'
+  import sipapi from '@/api/oilsupplier/supplier'
+
+  export default {
+    computed: {
+      ...mapGetters({
+        authUser: 'authUser'
+      })
+    },
+    components: {
+      ChooseAuditor
+    },
+    name: 'incomeedit',
+
+    data () {
+      return {
+        chooseAuditorVisible: false,
+
+        organizeOption: [],
+        secauditerOptions: [],
+        entityList: [],
+
+        formData: {
+          Id: '',
+          Status: '',
+          SubmitterId: '',
+          Submitter: '',
+          DeptId: '',
+          Dept: '',
+          FirstAudit: '',
+          FirstAuditName: '',
+          SecondAudit: '',
+          SecondAuditName: ''
+        }
+      }
+    },
+    created () {
+      console.log(this.authUser.Profile, 'this.authUser.Profile')
+      this.formData.SubmitterId = this.authUser.Profile.Id
+      this.formData.Submitter = this.authUser.Profile.Realname
+      this.getDictOptions()
+    },
+    methods: {
+      chooseAuditorShow () {
+        this.$refs['chooseAuditor'].getorgtreelist('01')
+        this.chooseAuditorVisible = true
+      },
+      setAuditer (val, name) {
+        this.formData.FirstAudit = val
+        this.formData.FirstAuditName = name
+        this.chooseAuditorVisible = false
+        this.auditOrgChang(this.formData.FirstAudit)
+      },
+      auditOrgChang (val) {
+        let auditstepcode = 'SECOND_TRIAL'
+        sipapi.getAuditerByFirst(val, auditstepcode, this.$axios)
+          .then(res => {
+            this.secauditerOptions = res.data.item
+          })
+          .catch(err => {
+            console.error(err)
+          })
+      },
+
+      getDictOptions () {
+        let params = {
+
+        }
+        sipapi.getDictListByStatus(params, this.$axios).then(res => {
+          this.organizeOption = res.data.items['Allunitorglist']
+        }).catch(err => {
+          console.error(err)
+        })
+      },
+
+      saveEntity () {
+        console.log(this.formData, 'this.formData')
+        this.$refs['EntityForm'].validate((valid) => {
+          console.log(this.formData, 'this.formData')
+          if (valid) {
+            this.formData.SecondAuditName = this.$refs.secondAudit.selectedLabel + ''
+            if (!this.formData.Id) {
+              this.addEntity()
+            } else {
+              this.updateEntity()
+            }
+          } else {
+            return false
+          }
+        })
+      }
+
+    }
+  }
+</script>
+
+<style scoped>
+
+</style>

+ 536 - 0
src/dashoo.cn/frontend_web/src/pages/oilsupplier/oilcatalog/_opera/index.vue

@@ -0,0 +1,536 @@
+<template>
+  <div>
+    <el-breadcrumb class="heading">
+      <el-breadcrumb-item :to="{ path: '/' }">平台首页</el-breadcrumb-item>
+      <el-breadcrumb-item>{{cardTitle}}目录</el-breadcrumb-item>
+    </el-breadcrumb>
+    <el-card class="box-card" style="height: calc(100vh - 115px);" v-loading="loading">
+      <div slot="header">
+        <span>
+          <i class="icon icon-table2"></i> {{cardTitle}}目录
+        </span>
+        <el-form ref="form" :inline="true" style="float: right; margin-top: -10px">
+          <el-form-item label="时间">
+            <el-date-picker size="mini" style="width: 220px" v-model="CreateOn" type="daterange" range-separator="至"
+                            start-placeholder="有效期" end-placeholder="有效期"></el-date-picker>
+          </el-form-item>
+          <el-form-item label="企业名称">
+            <el-input size="mini" v-model="searchForm.CompanyName" style="width:100%" placeholder="请输入"></el-input>
+          </el-form-item>
+          <el-form-item label="业务范围">
+            <el-input size="mini" v-model="searchForm.Business" style="width:100%" placeholder="请输入"></el-input>
+          </el-form-item>
+          <!--<el-form-item label="准入类型">-->
+            <!--<el-select size="mini" style="width:100px" v-model="searchForm.SupplierTypeName" placeholder="准入类别">-->
+              <!--<el-option label="全部" value=""></el-option>-->
+              <!--<el-option label="物资类" value="物资类"></el-option>-->
+              <!--<el-option label="基建类" value="基建类"></el-option>-->
+              <!--<el-option label="技术服务类" value="技术服务类"></el-option>-->
+            <!--</el-select>-->
+          <!--</el-form-item>-->
+
+          <el-form-item>
+            <el-dropdown split-button type="primary" size="mini" @click="handleSearch" @command="searchCommand">
+              查询
+              <el-dropdown-menu slot="dropdown">
+                <el-dropdown-item command="clear">查询重置</el-dropdown-item>
+              </el-dropdown-menu>
+            </el-dropdown>
+          </el-form-item>
+          <el-form-item>
+            <el-button type="primary" size="mini" style="margin-left:10px; margin-top: -4px;" @click="showdialog()">添加</el-button>
+            <router-link :to="'/oilsupplier/oilcatalog/income'">
+              <el-button type="warning" size="mini" style="margin-left:10px; margin-top: -4px;">返回</el-button>
+            </router-link>
+          </el-form-item>
+        </el-form>
+      </div>
+      <el-table :data="entityList" border height="calc(100vh - 243px)" style="width: 100%" @sort-change="orderby" size="mini">
+        <el-table-column label="操作" min-width="100px" align="center" fixed="right">
+          <template slot-scope="scope">
+            <el-button type="primary" size="mini" @click="editOilcatalog(scope.row)" plain>{{btnName}}</el-button>
+            <el-popover placement="top" title="提示">
+              <el-alert
+                title=""
+                description="确认要删除吗?"
+                type="warning"
+                :closable="false">
+              </el-alert>
+              <br/>
+              <div style="text-align: right; margin: 0">
+                <el-button type="danger" size="mini" @click="deleteEntity(scope.row)">删除</el-button>
+              </div>
+              <el-button slot="reference" type="danger" title="删除" style="margin-left:10px" size="mini" plain v-if="showBtn">删除</el-button>
+            </el-popover>
+          </template>
+
+        </el-table-column>
+        <!--<el-table-column sortable min-width="80" align="center" show-overflow-tooltip prop="SupplierName" label="序号"></el-table-column>-->
+        <el-table-column sortable min-width="120" align="center" show-overflow-tooltip prop="CompanyName" label="企业名称"></el-table-column>
+        <el-table-column sortable min-width="120" align="center" show-overflow-tooltip prop="LegalPerson" label="法人姓名"></el-table-column>
+        <el-table-column sortable min-width="120" align="center" show-overflow-tooltip prop="Address" label="企业注册地址"></el-table-column>
+        <el-table-column sortable min-width="150" align="center" show-overflow-tooltip prop="USCCode" label="全国统一信用代码"></el-table-column>
+        <el-table-column sortable min-width="120" align="center" show-overflow-tooltip prop="RegCapital" label="注册资本"></el-table-column>
+        <el-table-column sortable min-width="500" align="center" show-overflow-tooltip prop="RecordScope" label="申请备案范围"></el-table-column>
+        <el-table-column sortable min-width="120" align="center" show-overflow-tooltip prop="IDCode" label="法人身份证号"></el-table-column>
+        <el-table-column sortable min-width="120" align="center" show-overflow-tooltip prop="Remark" label="备注"></el-table-column>
+
+      </el-table>
+      <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="currentPage"
+                     :page-sizes="[10, 15, 20, 25]" :page-size="size" layout="total, sizes, prev, pager, next, jumper" :total="currentItemCount">
+      </el-pagination>
+    </el-card>
+    <el-dialog title="添加收入业务目录"
+               :visible.sync="addshow"
+               width="60%">
+      <el-form label-width="135px" ref="EntityForm" :model="formData">
+        <el-row>
+          <el-col :span="12">
+            <el-form-item label="企业名称" prop="CompanyName" :rules="{ required: true, message: '供方名称不能为空', trigger: 'blur'}">
+              <el-input v-model="formData.CompanyName" :maxlength="255" placeholder="请输入" style="width: 100%"></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <el-form-item label="法人姓名" prop="LegalPerson" :rules="{ required: true, message: '法人姓名不能为空', trigger: 'blur'}">
+              <el-input v-model="formData.LegalPerson" :maxlength="255" placeholder="请输入" style="width: 100%"></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <el-form-item label="法人身份证号" prop="IDCode" :rules="{ required: true, message: '法人身份证号不能为空', trigger: 'blur'}">
+              <el-input v-model="formData.IDCode" :maxlength="255" placeholder="请输入" style="width: 100%"></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <el-form-item label="注册地址" prop="Address" :rules="{ required: true, message: '注册地址不能为空', trigger: 'blur'}">
+              <el-input v-model="formData.Address" :maxlength="255" placeholder="请输入" style="width: 100%"></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <el-form-item label="全国统一信用代码" prop="USCCode" :rules="{ required: true, message: '全国统一信用代码不能为空', trigger: 'blur'}">
+              <el-input v-model="formData.USCCode" :maxlength="255" placeholder="请输入" style="width: 100%"></el-input>
+            </el-form-item>
+          </el-col><el-col :span="12">
+          <el-form-item label="注册资金" prop="RegCapital" :rules="{ required: true, message: '注册资金不能为空', trigger: 'blur'}">
+            <el-input v-model="formData.RegCapital" :maxlength="255" placeholder="请输入" style="width: 100%"></el-input>
+          </el-form-item>
+        </el-col>
+          <el-col :span="24">
+            <el-form-item label="申请备案范围" prop="RecordScope" :rules="{ required: true, message: '申请备案范围不能为空', trigger: 'blur'}">
+              <el-input v-model="formData.RecordScope"  type="textarea" style="width: 100%"></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :span="24">
+            <el-form-item label="备注">
+              <el-input v-model="formData.Remark"  placeholder="请输入" type="textarea" style="width: 100%">
+              </el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :span="24">
+            <el-form-item style="text-align: center;">
+              <el-button type="primary" size="mini" @click="saveOilcatalog">保存</el-button>
+            </el-form-item>
+          </el-col>
+        </el-row>
+      </el-form>
+    </el-dialog>
+    <el-dialog title="提交初审"
+               :visible.sync="dialogVisible"
+               width="520px">
+      <el-form ref="searchForm"
+               label-width="100px">
+        <el-row>
+          <el-col :span="24">
+            <el-form-item label="初审人员">
+              <el-input ref="selectAuditer" readonly v-model="auditform.auditerName" placeholder="请选择初审人">
+                <el-button slot="append" icon="el-icon-search" @click="chooseAuditorShow"></el-button>
+              </el-input>
+            </el-form-item>
+            <el-form-item label="复审人员">
+              <el-select ref="selectAuditer" v-model="auditform.fushenauditer" placeholder="请选择复审人" style="width: 100%" filterable
+                         allow-create default-first-option>
+                <el-option v-for="item in secauditerOptions" :key="item.Id" :label="item.Realname" :value="item.Id">
+                </el-option>
+              </el-select>
+            </el-form-item>
+          </el-col>
+          <el-col :span="24">
+            <el-form-item label="备注">
+              <el-input v-model="auditform.AuditRemark"
+                        type="textarea"
+                        placeholder="请输入备注内容">
+              </el-input>
+            </el-form-item>
+          </el-col>
+        </el-row>
+      </el-form>
+      <span slot="footer"
+            class="dialog-footer">
+        <el-button size="mini"
+                   @click="dialogVisible = false">取 消</el-button>
+        <el-button size="mini"
+                   type="primary"
+                   >确定</el-button>
+      </span>
+    </el-dialog>
+
+    <choose-auditor ref="chooseAuditor"
+                    @close="setAuditer"
+                    @hideChooseAuditer="chooseAuditorVisible=false"
+                    :visible="chooseAuditorVisible"></choose-auditor>
+
+  </div>
+</template>
+<script>
+  import { mapGetters } from 'vuex'
+  import api from '@/api/oilsupplier/oilcatalog'
+  import sipapi from '@/api/oilsupplier/supplier'
+  import ChooseAuditor from '@/components/oilsupplier/chooseauditor'
+
+  export default {
+    computed: {
+      ...mapGetters({
+        authUser: 'authUser'
+      })
+    },
+    components: {
+      ChooseAuditor
+    },
+    name: 'oilcatalog',
+
+    data () {
+      var validDate = (rule, value, callback) => {
+        if (!value || !value[0] || !value[1]) {
+          callback(new Error('请选择时间'))
+        } else {
+          callback()
+        }
+      }
+
+      return {
+        dialogVisible: false,
+        chooseAuditorVisible: false,
+        btnName: '打开',
+        showBtn: false,
+        cardTitle: '收入业务',
+        catalogType: '7',
+        addShowTitle: '添加目录',
+        addshow: false,
+        loading: false,
+
+        // 分页参数
+        size: 10,
+        currentPage: 1,
+        currentItemCount: 0,
+
+        // 查询时间
+        CreateOn: null,
+        ValidityDate: null,
+
+        secauditerOptions: [],
+        // 列表数据
+        entityList: [],
+        // 列表排序
+        Column: {
+          Order: '',
+          Prop: ''
+        },
+        // 查询项
+        searchFormReset: {},
+        searchForm: {
+          CompanyName: '',
+          Business: ''
+
+        },
+        rules: {
+          ValidityDate: [{
+            validator: validDate,
+            trigger: 'blur'
+          }]
+        },
+        formData: {
+          Id: '',
+          CatalogType: '7',
+          CompanyName: '',
+          LegalPerson: '',
+          Address: '',
+          USCCode: '',
+          RegCapital: '',
+          RecordScope: '',
+          IDCode: '',
+          Business: '',
+          Remark: '',
+          Status: '',
+          FirstAudit: '',
+          SecondAudit: ''
+        },
+        auditform: {
+          auditer: '',
+          auditerName: '',
+          fushenauditer: '',
+          AuditRemark: ''
+        }
+      }
+    },
+    created () {
+      // this.isAccess()
+      this.initDatas()
+    },
+
+    methods: {
+      submitOilcatalog () {
+        this.dialogVisible = true
+      },
+      chooseAuditorShow () {
+        this.$refs['chooseAuditor'].getorgtreelist('01')
+        this.chooseAuditorVisible = true
+      },
+      setAuditer (val, name) {
+        this.auditform.auditer = val
+        this.auditform.auditerName = name
+        this.chooseAuditorVisible = false
+        this.auditOrgChang(this.auditform.auditer)
+      },
+      auditOrgChang (val) {
+        let auditstepcode = 'SECOND_TRIAL'
+        sipapi.getAuditerByFirst(val, auditstepcode, this.$axios)
+          .then(res => {
+            this.secauditerOptions = res.data.item
+          })
+          .catch(err => {
+            console.error(err)
+          })
+      },
+      showdialog () {
+        this.addshow = true
+      },
+      isAccess () {
+        let params = {
+          RoleId: '10000203'
+        }
+        api.isAccess(params, this.$axios).then(res => {
+          this.showBtn = res.data
+          if (this.showBtn) {
+            this.btnName = '编辑'
+          } else {
+            this.btnName = '打开'
+          }
+        }).catch(err => {
+          console.log(err)
+        })
+      },
+      exportExcel () {
+        if (this.entityList == null || this.entityList.length <= 0) {
+          this.$message({
+            type: 'warning',
+            message: '没有数据可以导出'
+          })
+          return
+        }
+        this.loading = true
+        let params = {
+          CardTitle: this.cardTitle,
+          CatalogType: this.formData.CatalogType
+        }
+        api.exportExcelAll(params, this.$axios).then(res => {
+          this.loading = false
+          let docurl = res.data
+          // 内网服务器专用
+          if (process.client && docurl.indexOf('upfile') === 0) {
+            const myDomain = window.location.host
+            location.href = 'http://' + myDomain + '/' + docurl
+          } else {
+            location.href = 'http://' + docurl
+          }
+        })
+      },
+      addOilcatalog () {
+        this.addshow = true
+        this.formData.Id = ''
+        this.formData.CompanyName = ''
+        this.formData.Business = ''
+        this.formData.Remark = ''
+        this.ValidityDate = null
+      },
+      editOilcatalog (row) {
+        this.addshow = true
+        this.formData.Id = row.Id
+        this.formData.CatalogType = row.CatalogType
+        this.formData.CompanyName = row.CompanyName
+        this.formData.Business = row.Business
+        this.formData.Remark = row.Remark
+        this.ValidityDate = [new Date(row.ValidityFrom), new Date(row.ValidityTo)]
+      },
+      saveOilcatalog () {
+
+        this.formData.RegCapital = parseFloat(this.formData.RegCapital)
+
+        if (this.ValidityDate && this.ValidityDate.length === 2) {
+          this.ValidityDate[1].setHours(23)
+          this.ValidityDate[1].setMinutes(59)
+          this.ValidityDate[1].setSeconds(59)
+          this.formData.ValidityFrom = this.ValidityDate[0]
+          this.formData.ValidityTo = this.ValidityDate[1]
+        }
+        if (this.formData.Id > 0) {
+          this.editEntity()
+        } else {
+          this.addEntity()
+        }
+      },
+      editEntity () {
+        this.$refs['EntityForm'].validate((valid) => {
+          if (valid) {
+            api.updateEntity(this.formData.Id, this.formData, this.$axios).then(res => {
+              if (res.data.code === 0) {
+                this.$message({
+                  type: 'success',
+                  message: res.data.message
+                })
+                this.addshow = false
+                this.initDatas()
+              } else {
+                this.$message({
+                  type: 'warning',
+                  message: res.data.message
+                })
+              }
+            })
+          }
+        })
+      },
+      addEntity () {
+        this.$refs['EntityForm'].validate((valid) => {
+          if (valid) {
+            api.addEntity(this.formData, this.$axios).then(res => {
+              if (res.data.code === 0) {
+                this.$message({
+                  type: 'success',
+                  message: res.data.message
+                })
+                this.addshow = false
+                this.initDatas()
+              } else {
+                this.$message({
+                  type: 'warning',
+                  message: res.data.message
+                })
+              }
+            })
+          }
+        })
+      },
+      initDatas () {
+        // 分页及列表条件
+        let params = {
+          _currentPage: this.currentPage,
+          _size: this.size,
+          Order: this.Column.Order,
+          Prop: this.Column.Prop,
+          CatalogType: this.formData.CatalogType
+        }
+        let myCreateOn = []
+        // 解析时间
+        if (this.CreateOn && this.CreateOn.length === 2) {
+          this.CreateOn[1].setHours(23)
+          this.CreateOn[1].setMinutes(59)
+          this.CreateOn[1].setSeconds(59)
+          myCreateOn.push(this.formatDateTime(this.CreateOn[0]))
+          myCreateOn.push(this.formatDateTime(this.CreateOn[1]))
+        }
+        // 查询条件
+        Object.assign(params, this.searchForm)
+        api.getList(myCreateOn, params, this.$axios).then(res => {
+          this.entityList = res.data.items
+          this.currentItemCount = res.data.currentItemCount
+        })
+      },
+
+      searchCommand (command) {
+        if (command === 'search') {
+          this.dialogVisible = true
+        } else if (command === 'clear') {
+          this.clearSearch()
+        }
+      },
+      // 列表排序功能
+      orderby (column) {
+        if (column.order === 'ascending') {
+          this.Column.Order = 'asc'
+        } else if (column.order === 'descending') {
+          this.Column.Order = 'desc'
+        }
+        this.Column.Prop = column.prop
+        this.initDatas()
+      },
+      clearSearch () {
+        Object.assign(this.searchForm, this.searchFormReset)
+        this.CreateOn = ''
+        this.initDatas()
+      },
+      handleSearch () {
+        this.currentPage = 1
+        this.dialogVisible = false
+        this.initDatas()
+      },
+      handleCurrentChange (value) {
+        this.currentPage = value
+        this.initDatas()
+      },
+      handleSizeChange (value) {
+        this.size = value
+        this.currentPage = 1
+        this.initDatas()
+      },
+      deleteEntity (row) {
+        api.deleteEntity(row.Id, this.$axios).then(res => {
+          if (res.data.code === 0) {
+            this.initDatas()
+            this.$message({
+              type: 'success',
+              message: res.data.message
+            })
+          } else {
+            this.$message({
+              type: 'warning',
+              message: res.data.message
+            })
+          }
+        }).catch(err => {
+          console.error(err)
+        })
+      },
+
+      jstimehandle (val) {
+        if (val === '') {
+          return '----'
+        } else if (val === '0001-01-01T08:00:00+08:00') {
+          return '----'
+        } else if (val === '5000-01-01T23:59:59+08:00') {
+          return '永久'
+        } else {
+          val = val.replace('T', ' ')
+          return val.substring(0, 10)
+        }
+      },
+
+      formatDateTime (date) {
+        var y = date.getFullYear()
+        var m = date.getMonth() + 1
+        m = m < 10 ? ('0' + m) : m
+        var d = date.getDate()
+        d = d < 10 ? ('0' + d) : d
+        var h = date.getHours()
+        var minute = date.getMinutes()
+        minute = minute < 10 ? ('0' + minute) : minute
+        return y + '-' + m + '-' + d + ' ' + h + ':' + minute
+      }
+    }
+  }
+</script>
+
+<style lang="scss">
+  .el-pagination {
+    margin: 1rem 0 2rem;
+    text-align: right;
+  }
+</style>

+ 425 - 0
src/dashoo.cn/frontend_web/src/pages/oilsupplier/oilcatalog/income.vue

@@ -0,0 +1,425 @@
+<template>
+  <div>
+    <el-breadcrumb class="heading">
+      <el-breadcrumb-item :to="{ path: '/' }">平台首页</el-breadcrumb-item>
+      <el-breadcrumb-item>{{cardTitle}}目录</el-breadcrumb-item>
+    </el-breadcrumb>
+    <el-card class="box-card" style="height: calc(100vh - 115px);" v-loading="loading">
+      <div slot="header">
+        <span>
+          <i class="icon icon-table2"></i> {{cardTitle}}目录
+        </span>
+        <el-form ref="form" :inline="true" style="float: right; margin-top: -10px">
+          <el-form-item label="时间">
+            <el-date-picker size="mini" style="width: 220px" v-model="CreateOn" type="daterange" range-separator="至"
+                            start-placeholder="有效期" end-placeholder="有效期"></el-date-picker>
+          </el-form-item>
+          <el-form-item label="企业名称">
+            <el-input size="mini" v-model="searchForm.CompanyName" style="width:100%" placeholder="请输入"></el-input>
+          </el-form-item>
+          <el-form-item label="业务范围">
+            <el-input size="mini" v-model="searchForm.Business" style="width:100%" placeholder="请输入"></el-input>
+          </el-form-item>
+          <!--<el-form-item label="准入类型">-->
+            <!--<el-select size="mini" style="width:100px" v-model="searchForm.SupplierTypeName" placeholder="准入类别">-->
+              <!--<el-option label="全部" value=""></el-option>-->
+              <!--<el-option label="物资类" value="物资类"></el-option>-->
+              <!--<el-option label="基建类" value="基建类"></el-option>-->
+              <!--<el-option label="技术服务类" value="技术服务类"></el-option>-->
+            <!--</el-select>-->
+          <!--</el-form-item>-->
+
+          <el-form-item>
+            <el-dropdown split-button type="primary" size="mini" @click="handleSearch" @command="searchCommand">
+              查询
+              <el-dropdown-menu slot="dropdown">
+                <el-dropdown-item command="clear">查询重置</el-dropdown-item>
+              </el-dropdown-menu>
+            </el-dropdown>
+          </el-form-item>
+          <el-form-item>
+            <router-link :to="'/oilsupplier/oilcatalog/_opera/incomeedit'">
+              <el-button type="primary" size="mini" style="margin-left:10px; margin-top: -4px;">收入业务申请</el-button>
+            </router-link>
+            <el-button type="primary" size="mini" style="margin-left:10px; margin-top: -4px;" @click="exportExcel">导出</el-button>
+          </el-form-item>
+        </el-form>
+      </div>
+      <el-table :data="entityList" border height="calc(100vh - 243px)" style="width: 100%" @sort-change="orderby" size="mini">
+        <el-table-column label="操作" min-width="100px" align="center" fixed="right">
+          <template slot-scope="scope">
+            <el-button type="primary" size="mini" @click="editOilcatalog(scope.row)" plain>{{btnName}}</el-button>
+            <el-popover placement="top" title="提示">
+              <el-alert
+                title=""
+                description="确认要删除吗?"
+                type="warning"
+                :closable="false">
+              </el-alert>
+              <br/>
+              <div style="text-align: right; margin: 0">
+                <el-button type="danger" size="mini" @click="deleteEntity(scope.row)">删除</el-button>
+              </div>
+              <el-button slot="reference" type="danger" title="删除" style="margin-left:10px" size="mini" plain v-if="showBtn">删除</el-button>
+            </el-popover>
+          </template>
+
+        </el-table-column>
+        <!--<el-table-column sortable min-width="80" align="center" show-overflow-tooltip prop="SupplierName" label="序号"></el-table-column>-->
+        <el-table-column sortable min-width="120" align="center" show-overflow-tooltip prop="CompanyName" label="企业名称"></el-table-column>
+        <el-table-column sortable min-width="120" align="center" show-overflow-tooltip prop="LegalPerson" label="法人姓名"></el-table-column>
+        <el-table-column sortable min-width="120" align="center" show-overflow-tooltip prop="IDCode" label="法人身份证号"></el-table-column>
+        <el-table-column sortable min-width="120" align="center" show-overflow-tooltip prop="Address" label="企业注册地址"></el-table-column>
+        <el-table-column sortable min-width="150" align="center" show-overflow-tooltip prop="USCCode" label="全国统一信用代码"></el-table-column>
+        <el-table-column sortable min-width="120" align="center" show-overflow-tooltip prop="RegCapital" label="注册资本"></el-table-column>
+        <el-table-column sortable min-width="500" align="center" show-overflow-tooltip prop="RecordScope" label="申请备案范围"></el-table-column>
+        <el-table-column sortable min-width="120" align="center" show-overflow-tooltip prop="Remark" label="备注"></el-table-column>
+
+      </el-table>
+      <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="currentPage"
+                     :page-sizes="[10, 15, 20, 25]" :page-size="size" layout="total, sizes, prev, pager, next, jumper" :total="currentItemCount">
+      </el-pagination>
+    </el-card>
+    <el-dialog :title="addShowTitle"
+               :visible.sync="addshow"
+               width="60%">
+      <el-form label-width="135px" ref="EntityForm" :model="formData">
+        <el-row>
+          <el-col :span="12">
+            <el-form-item label="供方名称" prop="CompanyName" :rules="{ required: true, message: '供方名称不能为空', trigger: 'blur'}">
+              <el-input v-model="formData.CompanyName" :maxlength="255" placeholder="请输入" style="width: 100%" :readonly="!showBtn"></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <el-form-item label="有效期" prop="ValidityDate" >
+              <el-date-picker style="width: 220px" v-model="ValidityDate" type="daterange" range-separator="至"
+                              start-placeholder="有效期起" end-placeholder="有效期止" :readonly="!showBtn"></el-date-picker>
+            </el-form-item>
+          </el-col>
+          <el-col :span="24">
+            <el-form-item label="营业范围" prop="Business" :rules="{ required: true, message: '营业范围不能为空', trigger: 'blur'}">
+              <el-input v-model="formData.Business"  type="textarea" style="width: 100%" :readonly="!showBtn"></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :span="24">
+            <el-form-item label="备注">
+              <el-input v-model="formData.Remark"  placeholder="请输入" type="textarea" style="width: 100%" :readonly="!showBtn">
+              </el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :span="24">
+            <el-form-item style="text-align: center;" v-if="showBtn">
+              <el-button type="primary" size="mini" @click="saveOilcatalog">保存</el-button>
+            </el-form-item>
+          </el-col>
+        </el-row>
+      </el-form>
+    </el-dialog>
+
+  </div>
+</template>
+<script>
+  import { mapGetters } from 'vuex'
+  import api from '@/api/oilsupplier/oilcatalog'
+
+  export default {
+    computed: {
+      ...mapGetters({
+        authUser: 'authUser'
+      })
+    },
+    name: 'oilcatalog',
+
+    data () {
+      var validDate = (rule, value, callback) => {
+        if (!value || !value[0] || !value[1]) {
+          callback(new Error('请选择时间'))
+        } else {
+          callback()
+        }
+      }
+
+      return {
+        btnName: '打开',
+        showBtn: false,
+        cardTitle: '收入业务',
+        catalogType: '',
+        addShowTitle: '添加目录',
+        addshow: false,
+        loading: false,
+
+        // 分页参数
+        size: 10,
+        currentPage: 1,
+        currentItemCount: 0,
+
+        // 查询时间
+        CreateOn: null,
+        ValidityDate: null,
+
+        // 列表数据
+        entityList: [],
+        // 列表排序
+        Column: {
+          Order: '',
+          Prop: ''
+        },
+        // 查询项
+        searchFormReset: {},
+        searchForm: {
+          CompanyName: '',
+          Business: ''
+
+        },
+        rules: {
+          ValidityDate: [{
+            validator: validDate,
+            trigger: 'blur'
+          }]
+        },
+        formData: {
+          Id: '',
+          CatalogType: '7',
+          OrderNo: '',
+          CompanyName: '',
+          Business: '',
+          ValidityFrom: null,
+          ValidityTo: null,
+          Remark: ''
+        }
+      }
+    },
+    created () {
+      this.isAccess()
+      this.initDatas()
+    },
+
+    methods: {
+      isAccess () {
+        let params = {
+          RoleId: '10000203'
+        }
+        api.isAccess(params, this.$axios).then(res => {
+          this.showBtn = res.data
+          if (this.showBtn) {
+            this.btnName = '编辑'
+          } else {
+            this.btnName = '打开'
+          }
+        }).catch(err => {
+          console.log(err)
+        })
+      },
+      exportExcel () {
+        if (this.entityList == null || this.entityList.length <= 0) {
+          this.$message({
+            type: 'warning',
+            message: '没有数据可以导出'
+          })
+          return
+        }
+        this.loading = true
+        let params = {
+          CardTitle: this.cardTitle,
+          CatalogType: this.formData.CatalogType
+        }
+        api.exportExcelAll(params, this.$axios).then(res => {
+          this.loading = false
+          let docurl = res.data
+          // 内网服务器专用
+          if (process.client && docurl.indexOf('upfile') === 0) {
+            const myDomain = window.location.host
+            location.href = 'http://' + myDomain + '/' + docurl
+          } else {
+            location.href = 'http://' + docurl
+          }
+        })
+      },
+      addOilcatalog () {
+        this.addshow = true
+        this.formData.Id = ''
+        this.formData.CompanyName = ''
+        this.formData.Business = ''
+        this.formData.Remark = ''
+        this.ValidityDate = null
+      },
+      editOilcatalog (row) {
+        this.addshow = true
+        this.formData.Id = row.Id
+        this.formData.CatalogType = row.CatalogType
+        this.formData.CompanyName = row.CompanyName
+        this.formData.Business = row.Business
+        this.formData.Remark = row.Remark
+        this.ValidityDate = [new Date(row.ValidityFrom), new Date(row.ValidityTo)]
+      },
+      saveOilcatalog () {
+        if (this.ValidityDate && this.ValidityDate.length === 2) {
+          this.ValidityDate[1].setHours(23)
+          this.ValidityDate[1].setMinutes(59)
+          this.ValidityDate[1].setSeconds(59)
+          this.formData.ValidityFrom = this.ValidityDate[0]
+          this.formData.ValidityTo = this.ValidityDate[1]
+        }
+        if (this.formData.Id > 0) {
+          this.editEntity()
+        } else {
+          this.addEntity()
+        }
+      },
+      editEntity () {
+        this.$refs['EntityForm'].validate((valid) => {
+          if (valid) {
+            api.updateEntity(this.formData.Id, this.formData, this.$axios).then(res => {
+              if (res.data.code === 0) {
+                this.$message({
+                  type: 'success',
+                  message: res.data.message
+                })
+                this.addshow = false
+                this.initDatas()
+              } else {
+                this.$message({
+                  type: 'warning',
+                  message: res.data.message
+                })
+              }
+            })
+          }
+        })
+      },
+      addEntity () {
+        this.$refs['EntityForm'].validate((valid) => {
+          if (valid) {
+            api.addEntity(this.formData, this.$axios).then(res => {
+              if (res.data.code === 0) {
+                this.$message({
+                  type: 'success',
+                  message: res.data.message
+                })
+                this.addshow = false
+                this.initDatas()
+              } else {
+                this.$message({
+                  type: 'warning',
+                  message: res.data.message
+                })
+              }
+            })
+          }
+        })
+      },
+      initDatas () {
+        // 分页及列表条件
+        let params = {
+          _currentPage: this.currentPage,
+          _size: this.size,
+          Order: this.Column.Order,
+          Prop: this.Column.Prop,
+          CatalogType: this.formData.CatalogType
+        }
+        let myCreateOn = []
+        // 解析时间
+        if (this.CreateOn && this.CreateOn.length === 2) {
+          this.CreateOn[1].setHours(23)
+          this.CreateOn[1].setMinutes(59)
+          this.CreateOn[1].setSeconds(59)
+          myCreateOn.push(this.formatDateTime(this.CreateOn[0]))
+          myCreateOn.push(this.formatDateTime(this.CreateOn[1]))
+        }
+        // 查询条件
+        Object.assign(params, this.searchForm)
+        api.getList(myCreateOn, params, this.$axios).then(res => {
+          this.entityList = res.data.items
+          this.currentItemCount = res.data.currentItemCount
+        })
+      },
+
+      searchCommand (command) {
+        if (command === 'search') {
+          this.dialogVisible = true
+        } else if (command === 'clear') {
+          this.clearSearch()
+        }
+      },
+      // 列表排序功能
+      orderby (column) {
+        if (column.order === 'ascending') {
+          this.Column.Order = 'asc'
+        } else if (column.order === 'descending') {
+          this.Column.Order = 'desc'
+        }
+        this.Column.Prop = column.prop
+        this.initDatas()
+      },
+      clearSearch () {
+        Object.assign(this.searchForm, this.searchFormReset)
+        this.CreateOn = ''
+        this.initDatas()
+      },
+      handleSearch () {
+        this.currentPage = 1
+        this.dialogVisible = false
+        this.initDatas()
+      },
+      handleCurrentChange (value) {
+        this.currentPage = value
+        this.initDatas()
+      },
+      handleSizeChange (value) {
+        this.size = value
+        this.currentPage = 1
+        this.initDatas()
+      },
+      deleteEntity (row) {
+        api.deleteEntity(row.Id, this.$axios).then(res => {
+          if (res.data.code === 0) {
+            this.initDatas()
+            this.$message({
+              type: 'success',
+              message: res.data.message
+            })
+          } else {
+            this.$message({
+              type: 'warning',
+              message: res.data.message
+            })
+          }
+        }).catch(err => {
+          console.error(err)
+        })
+      },
+
+      jstimehandle (val) {
+        if (val === '') {
+          return '----'
+        } else if (val === '0001-01-01T08:00:00+08:00') {
+          return '----'
+        } else if (val === '5000-01-01T23:59:59+08:00') {
+          return '永久'
+        } else {
+          val = val.replace('T', ' ')
+          return val.substring(0, 10)
+        }
+      },
+
+      formatDateTime (date) {
+        var y = date.getFullYear()
+        var m = date.getMonth() + 1
+        m = m < 10 ? ('0' + m) : m
+        var d = date.getDate()
+        d = d < 10 ? ('0' + d) : d
+        var h = date.getHours()
+        var minute = date.getMinutes()
+        minute = minute < 10 ? ('0' + minute) : minute
+        return y + '-' + m + '-' + d + ' ' + h + ':' + minute
+      }
+    }
+  }
+</script>
+
+<style lang="scss">
+  .el-pagination {
+    margin: 1rem 0 2rem;
+    text-align: right;
+  }
+</style>

+ 4 - 1
src/dashoo.cn/frontend_web/src/pages/oilsupplier/oilcatalog/index.vue

@@ -38,6 +38,7 @@
             </el-dropdown>
           </el-form-item>
           <el-form-item>
+            <el-button type="primary" size="mini" style="margin-left:10px; margin-top: -4px;" v-if="formData.CatalogType == '7'">收入业务申请</el-button>
             <el-button type="primary" size="mini" @click="addOilcatalog" v-if="showBtn">添加</el-button>
             <el-button type="primary" size="mini" style="margin-left:10px; margin-top: -4px;" @click="exportExcel">导出</el-button>
           </el-form-item>
@@ -201,7 +202,9 @@
         } else if (val.query.catalogType === '5') {
           this.cardTitle = '特殊业务'
         } else if (val.query.catalogType === '6') {
-          this.cardTitle = '创收业务'
+          this.cardTitle = '外部市场'
+        } else if (val.query.catalogType === '7') {
+          this.cardTitle = '收入业务'
         }
         this.initDatas()
       }