| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592 |
- <template>
- <div>
- <div v-if="IsCompanyUser == 0 || (IsCompanyUser == 1 && suplen > 0)">
- <el-breadcrumb class="heading">
- <el-breadcrumb-item :to="{ path: '/' }">平台首页</el-breadcrumb-item>
- <el-breadcrumb-item :to="{ path: '/oilsupplier/infochange' }">企业信息表</el-breadcrumb-item>
- </el-breadcrumb>
- <el-card class="box-card" style="height: calc(100vh - 115px);">
- <div slot="header">
- <span>
- <i class="icon icon-table2"></i> 企业信息表
- </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.SupplierName" 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="01"></el-option>
- <el-option label="技术服务类" value="03"></el-option>
- <el-option label="基建类" value="02"></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="search">高级查询</el-dropdown-item> -->
- <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" @click="addinfochange">
- 添加变更
- </el-button>
- </el-form-item>
- </el-form>
- </div>
- <el-table :data="entityList" size="mini" border height="calc(100vh - 243px)" style="width: 100%"
- @sort-change="orderby">
- <el-table-column label="操作" min-width="90" align="center" fixed="right">
- <template slot-scope="scope">
- <router-link
- :to="'/oilsupplier/infochangech/' + scope.row.Id + '/operation?InfoStatus='+ scope.row.Status +'&infoId='+scope.row.InfoId">
- <el-button type="primary" plain title="信息变更" style="margin-right: 10px" size="mini">变更</el-button>
- </router-link>
- <el-button type="danger" plain title="信息变更" size="mini" @click="delInfoChangech(scope.row.InfoId)" :disabled="scope.row.Status > 0">删除</el-button>
- </template>
- </el-table-column>
- <el-table-column sortable min-width="110" align="center" prop="Status" label="审核状态">
- <template slot-scope="scope">
- <span v-if="scope.row.Status=='0'" style="color:#E6A23C">待提交</span>
- <span v-if="scope.row.Status=='1'" style="color:#E6A23C">待初审</span>
- <span v-if="scope.row.Status=='-1'" style="color:#F56C6C">初审未通过</span>
- <span v-if="scope.row.Status=='2'" style="color:#E6A23C">待复审</span>
- <span v-if="scope.row.Status=='-2'" style="color:#F56C6C">复审未通过</span>
- <span v-if="scope.row.Status=='5'" style="color:#E6A23C">待法规处审核</span>
- <span v-if="scope.row.Status=='-5'" style="color:#F56C6C">审核未通过</span>
- <span v-if="scope.row.Status=='10'" style="color:#E6A23C">待二级单位分办</span>
- <span v-if="scope.row.Status=='-10'" style="color:#F56C6C">分办未通过</span>
- <span v-if="scope.row.Status=='11'" style="color:#67C23A">审核通过</span>
- </template>
- </el-table-column>
- <el-table-column v-for="column in tableColumns" :key="column.Id" :prop="column.prop" sortable min-width="100"
- :label="column.label" align="center" show-overflow-tooltip>
- </el-table-column>
- <el-table-column prop="ConmmitTime" sortable min-width="100" label="申请日期" align="center"
- show-overflow-tooltip>
- <template slot-scope="scope">
- {{ jstimehandle(scope.row.ConmmitTime+'') }}
- </template>
- </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="dialogVisible" width="720px">
- <el-form ref="searchForm" label-width="110px">
- <el-row> -->
- <!-- <el-col :span="12">
- <el-form-item label="生成时间">
- <el-date-picker size="mini" v-model="CreateOn" type="daterange" style="width:100%" range-separator="至"
- start-placeholder="生成日期" end-placeholder="结束日期"></el-date-picker>
- </el-form-item>
- </el-col> -->
- <!--
- <el-col :span="12">
- <el-form-item label="">
- <el-input size="mini" v-model="searchForm.Id" style="width:100%" placeholder="请输入"></el-input>
- </el-form-item>
- </el-col> -->
- <!--
- <el-col :span="12">
- <el-form-item label="推荐单位编码">
- <el-input size="mini" v-model="searchForm.RecUnitId" style="width:100%" placeholder="请输入"></el-input>
- </el-form-item>
- </el-col>
- <el-col :span="12">
- <el-form-item label="准入编码">
- <el-input size="mini" v-model="searchForm.AccessCardNo" style="width:100%" placeholder="请输入">
- </el-input>
- </el-form-item>
- </el-col>
- <el-col :span="12">
- <el-form-item label="准入类别">
- <el-input size="mini" v-model="searchForm.SupplierTypeName" style="width:100%" placeholder="请输入">
- </el-input>
- </el-form-item>
- </el-col>
- <el-col :span="12">
- <el-form-item label="企业名称">
- <el-input size="mini" v-model="searchForm.SupplierName" style="width:100%" 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" @click="handleSearch">查 询</el-button>
- </span>
- </el-dialog> -->
- <el-dialog title="信息变更添加" :visible.sync="addshow" width="360px">
- <el-form label-width="90px" :model="entityForm" ref="EntityFormref">
- <el-row>
- <el-col :span="24">
- <el-form-item label="企业名称" prop="SupplierId" required>
- <el-select filterable default-first-option ref="supselect" v-model="entityForm.SupplierId" required
- placeholder="请选择" style="width: 100%">
- <el-option v-for="item in selectsupplierlist" :key="item.Id" :label="item.Realname" :value="item.Id">
- </el-option>
- </el-select>
- </el-form-item>
- </el-col>
- </el-row>
- <el-row>
- <el-col :span="24">
- <el-form-item label="备注">
- <el-input v-model="entityForm.Remark" type="textarea" placeholder="请输入备注内容">
- </el-input>
- </el-form-item>
- </el-col>
- </el-row>
- </el-form>
- <span style="float: right;margin-top:-10px;">
- <el-button size="small" @click="addshow = false">取 消</el-button>
- <el-button type="primary" size="small" @click="addInfoChange()">确 定</el-button>
- </span>
- <br>
- </el-dialog>
- </div>
- <page401 v-if="IsCompanyUser == 1 && suplen == 0"></page401>
- </div>
- </template>
- <script>
- import {
- mapGetters
- } from 'vuex';
- import supplierapi from '@/api/oilsupplier/supplier';
- import api from '@/api/oilsupplier/infochange';
- import annapi from '@/api/oilsupplier/annualaudit'
- import page401 from '@/components/error/401.vue'
- export default {
- components: {
- page401
- },
- computed: {
- ...mapGetters({
- authUser: 'authUser'
- })
- },
- name: 'annualaudit',
- data() {
- return {
- addshow: false,
- dialogVisible: false,
- delevisble: false,
- //列表数据
- selectsupplierlist: [],
- entityList: [],
- //分页参数
- size: 10,
- currentPage: 1,
- currentItemCount: 0,
- //列表排序
- Column: {
- Order: '',
- Prop: ''
- },
- //查询时间
- CreateOn: '',
- //查询项
- searchFormReset: {},
- entityForm: {
- Id: '',
- SupplierId: '',
- },
- searchForm: {
- Id: '',
- RecUnitId: '',
- AccessCardNo: '',
- SupplierTypeName: '',
- SupplierName: '',
- Num: '',
- ProjectName: '',
- Performance: '',
- WorkRange: '',
- Status: '',
- BackReason: '',
- ApplyTime: '',
- AuditDate: '',
- EnterUserId: '',
- EnterUserName: '',
- EnterUserTel: '',
- SCR: '',
- SCRQ: '',
- SCYJ: '',
- SCJG: '',
- SPR: '',
- SPRQ: '',
- SPYJ: '',
- SPJG: '',
- CreateOn: '',
- CreateUserId: '',
- CreateBy: '',
- ModifiedOn: '',
- ModifiedUserId: '',
- ModifiedBy: '',
- },
- tableColumns: [
- // {
- // prop: "RecUnitId",
- // label: '推荐单位编码',
- // width: 100,
- // sort: true
- // },
- {
- prop: "SupplierName",
- label: '企业名称',
- width: 100,
- sort: true
- },
- {
- prop: "PACNumber",
- label: '中石油准入证编号',
- width: 200,
- sort: true
- },
- // {
- // prop: "Grade",
- // label: '级别',
- // width: 100,
- // sort: true
- // },
- // {
- // prop: "MgrUnit",
- // label: '管理单位',
- // width: 100,
- // sort: true
- // },
- // {
- // prop: "OperType",
- // label: '经营方式',
- // width: 100,
- // sort: true
- // },
- // {
- // prop: "Country",
- // label: '国家',
- // width: 100,
- // sort: true
- // },
- // {
- // prop: "MaunAgent",
- // label: '所代理制造商名称',
- // width: 200,
- // sort: true
- // },
- // {
- // prop: "ConstructTeam",
- // label: '施工队伍名称',
- // width: 100,
- // sort: true
- // },
- {
- prop: "CommercialNo",
- label: '工商注册号',
- width: 100,
- sort: true
- },
- ],
- IsCompanyUser: 0,
- supplierList: [],
- suplen: 1,
- }
- },
- created() {
- this.IsCompanyUser = this.authUser.Profile.IsCompanyUser
- //查询条件初始值备份
- Object.assign(this.searchFormReset, this.searchForm)
- //查询列表
- this.initDatas()
- this.getselectsupplier()
- //this.getDictOptions()
- this.getSupplierList()
- },
- methods: {
- initDatas() {
- //分页及列表条件
- let params = {
- _currentPage: this.currentPage,
- _size: this.size,
- Order: this.Column.Order,
- Prop: this.Column.Prop,
- }
- 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.getSuppList(myCreateOn.join(','), params, this.$axios).then(res => {
- this.entityList = res.data.items
- this.currentItemCount = res.data.currentItemCount
- }).catch(err => {
- console.error(err)
- })
- },
- getSupplierList() {
- let _this = this
- _this.supplierList = []
- let params = {
- SuppTypeCode: '',
- }
- _this.$axios.get('/annualaudit/getsupplierforchange', {
- params
- })
- .then(res => {
- _this.supplierList = res.data
- if (_this.supplierList) {
- _this.suplen = _this.supplierList.length
- } else {
- _this.suplen = 0
- }
- if (_this.IsCompanyUser == 1 && _this.supplierList) {
- _this.entityForm.SupplierId = _this.supplierList[0].SupplierId
- }
- })
- .catch(err => {
- console.error(err)
- })
- },
- getselectsupplier () {
- api.getAddSupList(this.$axios).then(res => {
- if (res.data.items != null && res.data.items.length != 0) {
- for (var i = 0; i < res.data.items.length; i++) {
- this.selectsupplierlist.push({
- Id: res.data.items[i].Id,
- Realname: res.data.items[i].SupplierName
- })
- }
- }
- }).catch(err => {
- console.error(err)
- })
- },
- addinfochange() {
- if (this.IsCompanyUser === 1) {
- this.addInfoChangeCom()
- } else {
- this.addshow = true
- }
- },
- addInfoChangeCom() {
- this.$confirm("确定添加变更申请, 是否继续?", "提示", {
- confirmButtonText: "确定",
- cancelButtonText: "取消",
- type: "warning"
- })
- .then(() => {
- api.addInfoChMain(this.entityForm, this.$axios).then(res => {
- if (res.data.code === 0) {
- //保存成功后,初始化数据,变成修改
- this.entityForm.Id = res.data.item;
- this.$router.push({
- path: '/oilsupplier/infochangech/' + this.entityForm.SupplierId + '/operation',
- query: {
- InfoStatus: 0,
- infoId: this.entityForm.Id,
- }
- })
- this.$message({
- type: 'success',
- message: res.data.message
- });
- } else {
- this.$message({
- type: 'warning',
- message: res.data.message
- });
- }
- }).catch(err => {
- console.error(err)
- });
- })
- .catch(() => {});
- },
- addInfoChange() {
- this.$refs['EntityFormref'].validate((valid) => {
- if (valid) {
- this.entityForm.SupplierId = this.entityForm.SupplierId + ""
- api.addInfoChMain(this.entityForm, this.$axios).then(res => {
- if (res.data.code === 0) {
- //保存成功后,初始化数据,变成修改
- this.entityForm.Id = res.data.item;
- this.initDatas();
- this.addshow = false
- this.$message({
- type: 'success',
- message: res.data.message
- });
- } else {
- this.$message({
- type: 'warning',
- message: res.data.message
- });
- }
- }).catch(err => {
- console.error(err)
- });
- }
- })
- },
- delInfoChangech (Id) {
- this.$confirm('该操作将彻底删除的数据,是否继续?', '提示', {
- confirmButtonText: '确定',
- cancelButtonText: '取消',
- type: 'warning'
- }).then(() => {
- api.delInfoChangech(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
- })
- }
- })
- })
- },
- getDictOptions() {
- api.getDictList(this.$axios).then(res => {
- //this.dictOptions.customerList = res.data.items['customerList']
- //this.dictOptions.projectList = res.data.items['projectList']
- }).catch(err => {
- console.error(err)
- })
- },
- 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.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-01T00:00:00Z') {
- 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">
- </style>
|