| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429 |
- <template>
- <div>
- <el-breadcrumb class="heading">
- <el-breadcrumb-item :to="{ path: '/' }">平台首页</el-breadcrumb-item>
- <el-breadcrumb-item :to="{ path: '/oilsupplier/goodsaptitude' }">物资类项目与资质对照表</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> 物资类项目与资质对照表
- </span>
- <span style="float: right;">
- <router-link :to="'/oilsupplier/goodsaptitude/add/operation'">
- <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-button type="warning" plain size="mini" style="margin-left:20px; margin-top: -4px;" @click="showimport">更新物资编码
- </el-button>
- <!-- <router-link :to="'/oilsupplier/goodsaptitude/_opera/showdelcertsub'">-->
- <!-- <el-button type="warning" plain size="mini" style="margin-left:10px; margin-top: -4px;">查看待删除准入项</el-button>-->
- <!-- </router-link>-->
- </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.Code" style="width:100%" placeholder="请输入" clearable></el-input>
- </el-form-item>
- <el-form-item label="名称">
- <el-input size="mini" v-model="searchForm.Name" style="width:100%" placeholder="请输入" clearable></el-input>
- </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>
- </div>
- <el-table stripe highlight-current-row :data="entityList" id="rebateSetTable" size="mini" border height="calc(100vh - 243px)"
- style="width: 100%" @sort-change="orderby" v-loading="loading1">
- <el-table-column label="操作" min-width="200" align="center" fixed="right">
- <template slot-scope="scope">
- <router-link :to="'/oilsupplier/goodsaptitude/' + scope.row.Id + '/operation'">
- <el-button type="primary" plain title="编辑" size="mini">编辑</el-button>
- </router-link>
- <el-dropdown @command="MoreCmdClick">
- <el-button size="mini" type="primary" plain>
- 更多<i class="el-icon-arrow-down el-icon--right"></i>
- </el-button>
- <el-dropdown-menu slot="dropdown">
- <!-- <el-dropdown-item :command="GetCommand('Set', scope.row)">审核部门</el-dropdown-item> -->
- <el-dropdown-item :command="GetCommand('CodeEdit', scope.row)">编码名称修改</el-dropdown-item>
- </el-dropdown-menu>
- </el-dropdown>
- </template>
- </el-table-column>
- <el-table-column v-for="column in tableColumns" :prop="column.prop" sortable :width="column.width"
- :key="column.Id" :label="column.label" align="center" show-overflow-tooltip>
- <template slot-scope="scope">
- <span v-if="(column.prop != 'GoodsLevel' && column.prop != 'GoodsDesc' && column.prop != 'Standard' && column.prop != 'CompanyType')">{{ transferStr(scope.row[column.prop]) }}</span>
- <span v-else>{{ (scope.row[column.prop]) }}</span>
- </template>
- </el-table-column>
- <!--动态显示的表头-->
- <template v-for="column in dynamicTableColumns">
- <el-table-column :prop="column.prop" sortable :width="80"
- :key="column.Id" :label="column.label" align="center" v-if="column.IsManuf=='0'" show-overflow-tooltip>
- <template slot-scope="scope">
- {{ transferStr(scope.row[column.prop]) }}
- </template>
- </el-table-column>
- </template>
- <el-table-column label="贸易产品">
- <template v-for="column in dynamicTableColumns">
- <el-table-column :prop="column.prop" sortable :width="80"
- :key="column.Id" :label="column.label" align="center" v-if="column.IsManuf=='2'" show-overflow-tooltip>
- <template slot-scope="scope">
- {{ transferStr(scope.row[column.prop]) }}
- </template>
- </el-table-column>
- </template>
- </el-table-column>
- <el-table-column label="制造产品">
- <template v-for="column in dynamicTableColumns">
- <el-table-column :prop="column.prop" sortable :width="80"
- :key="column.Id" :label="column.label" align="center" v-if="column.IsManuf=='1'" show-overflow-tooltip>
- <template slot-scope="scope">
- {{ transferStr(scope.row[column.prop]) }}
- </template>
- </el-table-column>
- </template>
- </el-table-column>
- <!--<el-table-column prop="CreateOn" sortable min-width="150" label="生成时间" align="center" show-overflow-tooltip>
- <template slot-scope="scope">
- {{ jstimehandle(scope.row.CreateOn+'') }}
- </template>
- </el-table-column>-->
- </el-table>
- <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="currentPage"
- :page-sizes="[10, 50, 100, 200, 400]" :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="advancedsearchForm" 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.Code" 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.Name" 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.BigClassName" 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.BigClassCode" 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.MiddleClassName" 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.SmallClassName" 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.GoodsName" 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.GoodsLevel" 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.GoodsDesc" 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.Standard" 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.CompanyType" 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="deptsetVisible">
- <el-row>
- <el-col :span="12">
- 审批步骤:
- <el-select v-model="setForm.AuditStepCode" ref="selectAuditStep" placeholder="请选择" size="small">
- <el-option v-for="item in AuditStepOptions" :key="item.Id" :label="item.Key" :value="item.Value">
- </el-option>
- </el-select>
- </el-col>
- <el-col :span="12">
- 审批部门:
- <el-tree style="border: 0" show-checkbox node-key="id" :data="operationOrganizeData" :props="organizeProps"
- ref="operationOriganizeTree">
- </el-tree>
- </el-col>
- </el-row>
- <div slot="footer">
- <el-button @click="deptsetVisible = false">取消</el-button>
- <el-button type="primary" @click="saveApprovalDept()">确定</el-button>
- </div>
- </el-dialog>
- <el-dialog title="名称编码修改" :visible.sync="codeeditshow" width="720px">
- <el-form label-width="110px">
- <el-row>
- <el-col :span="12">
- <el-form-item label="大类名称">
- <el-input size="mini" v-model="formData.Name1" 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="formData.Code1" @change="Name1Change" 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="formData.Name2" 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="formData.Code2" @change="Name2Change" 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="formData.Name3" 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="formData.Code3" @change="Name3Change" 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="formData.Name4" 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="formData.Code4" 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="codeeditshow = false">取 消</el-button>
- <el-button size="mini" type="primary" @click="codeedit">修 改</el-button>
- </span>
- </el-dialog>
- <el-dialog title="上传文件" width="600px" :visible.sync="uploadshow">
- <el-form label-width="100px">
- <el-row>
- <el-col :span="24">
- <el-upload multiple style="margin-top: 10px;" action="" ref="refuploadattach"
- :http-request="uploadrequest" :before-upload="beforeAvatarUpload">
- <el-button size="small" type="primary">点击上传</el-button>
- </el-upload>
- </el-col>
- <el-col :span="24">
- <el-button style="float: right;" size="mini" type="primary" @click="uploadExcel()">确定</el-button>
- </el-col>
- </el-row>
- </el-form>
- </el-dialog>
- <el-dialog title="新导入" width="95%" top="5vh" :visible.sync="showimportvisible">
- <el-card class="box-card" v-loading="importloading">
- <div slot="header">
- <span>
- <i class="icon icon-table2"></i> 对照表(新导入)
- </span>
- <span style="float: right;">
- <el-button type="primary" size="mini" style="margin-left:20px; margin-top: -4px;" @click="importExcel">导入
- </el-button>
- <el-button type="primary" size="mini" style="margin-left:10px; margin-top: -4px;" @click="contrastList()">查看企业对比
- </el-button>
- <el-button type="primary" size="mini" style="margin-left:10px; margin-top: -4px;" @click="qualificaList()">查看资质对比
- </el-button>
- <el-button type="warning" size="mini" style="margin-left:10px; margin-top: -4px;" @click="truncateimport()">清空所有导入
- </el-button>
- <el-button type="primary" size="mini" style="margin-left:10px; margin-top: -4px;" @click="confirmImport()" :loading="confirmLoading">确认更新
- </el-button>
- </span>
- <el-form ref="form" :inline="true" style="float: right; margin-top: -10px">
- <el-form-item label="编码">
- <el-input size="mini" v-model="searchImportForm.Code" style="width:100%" placeholder="请输入"></el-input>
- </el-form-item>
- <el-form-item label="名称">
- <el-input size="mini" v-model="searchImportForm.Name" style="width:100%" placeholder="请输入"></el-input>
- </el-form-item>
- <el-form-item>
- <el-dropdown split-button type="primary" size="mini" @click="importhandleSearch" @command="importsearchCommand">
- 查询
- <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>
- </div>
- <el-table :data="importentityList" id="rebateSetTableimport" size="mini" border height="calc(100vh - 350px)"
- style="width: 100%" @sort-change="importorderby" v-loading="loading2">
- <el-table-column v-for="column in tableColumns" :prop="column.prop" sortable :width="column.width"
- :key="column.Id" :label="column.label" align="center" show-overflow-tooltip>
- <template slot-scope="scope">
- <span v-if="column.prop != 'GoodsLevel'">{{ transferStr(scope.row[column.prop], column.prop) }}</span>
- <span v-else>{{ (scope.row[column.prop]) }}</span>
- </template>
- </el-table-column>
- <!--动态显示的表头-->
- <template v-for="column in dynamicTableColumns">
- <el-table-column :prop="column.prop" sortable :width="80"
- :key="column.Id" :label="column.label" align="center" v-if="column.IsManuf=='0'" show-overflow-tooltip>
- <template slot-scope="scope">
- {{ transferStr(scope.row[column.prop]) }}
- </template>
- </el-table-column>
- </template>
- <el-table-column label="贸易产品">
- <template v-for="column in dynamicTableColumns">
- <el-table-column :prop="column.prop" sortable :width="80"
- :key="column.Id" :label="column.label" align="center" v-if="column.IsManuf=='2'" show-overflow-tooltip>
- <template slot-scope="scope">
- {{ transferStr(scope.row[column.prop]) }}
- </template>
- </el-table-column>
- </template>
- </el-table-column>
- <el-table-column label="制造产品">
- <template v-for="column in dynamicTableColumns">
- <el-table-column :prop="column.prop" sortable :width="80"
- :key="column.Id" :label="column.label" align="center" v-if="column.IsManuf=='1'" show-overflow-tooltip>
- <template slot-scope="scope">
- {{ transferStr(scope.row[column.prop]) }}
- </template>
- </el-table-column>
- </template>
- </el-table-column>
- <!--<el-table-column prop="CreateOn" sortable min-width="150" label="生成时间" align="center" show-overflow-tooltip>
- <template slot-scope="scope">
- {{ jstimehandle(scope.row.CreateOn+'') }}
- </template>
- </el-table-column>-->
- </el-table>
- <el-pagination @size-change="importhandleSizeChange" @current-change="importhandleCurrentChange" :current-page="importcurrentPage"
- :page-sizes="[10, 50, 100, 200, 500]" :page-size="importsize" layout="total, sizes, prev, pager, next, jumper"
- :total="importcurrentItemCount">
- </el-pagination>
- </el-card>
- </el-dialog>
- <el-dialog title="企业对比列表" width="95%" top="5vh" :visible.sync="contrastListvisible">
- <tmp-supplier-check v-if="contrastListvisible"></tmp-supplier-check>
- </el-dialog>
- <el-dialog title="资质对比列表" width="95%" top="5vh" :visible.sync="qualificaListvisible">
- <tmp-class-check v-if="qualificaListvisible"></tmp-class-check>
- </el-dialog>
- <el-dialog title="高级查询" :visible.sync="importDialogVisible" width="720px">
- <el-form ref="advancedsearchForm" label-width="110px">
- <el-row>
- <el-col :span="12">
- <el-form-item label="编码">
- <el-input size="mini" v-model="searchImportForm.Code" 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="searchImportForm.Name" 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="searchImportForm.BigClassName" 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="searchImportForm.BigClassCode" 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="searchImportForm.MiddleClassName" 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="searchImportForm.SmallClassName" 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="searchImportForm.GoodsName" 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="searchImportForm.GoodsLevel" 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="searchImportForm.GoodsDesc" 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="searchImportForm.Standard" 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="searchImportForm.CompanyType" 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="importDialogVisible = false">取 消</el-button>
- <el-button size="mini" type="primary" @click="importhandleSearch">查 询</el-button>
- </span>
- </el-dialog>
- <el-dialog title="导入失败" :visible.sync="errorDialogVisible" :close-on-click-modal = "false" width="720px">
- <el-input type="textarea" autosize placeholder="请输入内容" v-model="textarea"></el-input>
- </el-dialog>
- </div>
- </template>
- <script>
- import {
- mapGetters
- } from 'vuex'
- import api from '@/api/oilsupplier/goodsaptitude'
- import setapi from '@/api/oilsupplier/oilclassorgset'
- import axios from 'axios'
- import uploadajax from '@/assets/js/uploadajax.js'
- import tmpSupplierCheck from './tmpsuppliercheck'
- import tmpClassCheck from './tmpclasscheck'
- export default {
- components: {
- tmpSupplierCheck,
- tmpClassCheck
- },
- computed: {
- ...mapGetters({
- authUser: 'authUser'
- })
- },
- name: 'oilgoodsaptitude',
- data () {
- return {
- deleteDialogVisible: false,
- loading1: false,
- loading2: false,
- importloading: false,
- confirmLoading: false,
- textarea: '',
- showimportvisible: false,
- Excelurl: '',
- uploadshow: false,
- loading: false,
- codeeditshow: false,
- classid: '',
- myclassid: '',
- deptsetVisible: false,
- dialogVisible: false,
- importDialogVisible: false,
- errorDialogVisible: false,
- // 列表数据
- entityList: [],
- // 分页参数
- size: 10,
- currentPage: 1,
- currentItemCount: 0,
- // 列表排序
- Column: {
- Order: '',
- Prop: ''
- },
- // 列表数据
- importentityList: [],
- // 分页参数
- importsize: 10,
- importcurrentPage: 1,
- importcurrentItemCount: 0,
- // 列表排序
- importColumn: {
- Order: '',
- Prop: ''
- },
- formData: {
- Id: '',
- Id1: '',
- Id2: '',
- Id3: '',
- Id4: '',
- Code: '',
- Name: '',
- Code1: '',
- Name1: '',
- Code2: '',
- Name2: '',
- Code3: '',
- Name3: '',
- Code4: '',
- Name4: ''
- },
- // 查询时间
- CreateOn: [],
- conList: [],
- importCreateOn: [],
- // 查询项
- searchFormReset: {},
- searchForm: {
- Id: '',
- Code: '',
- Name: '',
- BigClassName: '',
- BigClassCode: '',
- MiddleClassName: '',
- SmallClassName: '',
- GoodsName: '',
- GoodsLevel: '',
- GoodsDesc: '',
- Standard: '',
- CompanyType: '',
- F01: '',
- F02: '',
- F03: '',
- F04: '',
- F05: '',
- F06: '',
- F07: '',
- F08: '',
- F09: '',
- F10: '',
- F11: '',
- F12: '',
- F13: '',
- F14: '',
- F15: '',
- F16: '',
- F17: '',
- F18: '',
- F19: '',
- F20: '',
- F21: '',
- F22: '',
- F23: '',
- F24: '',
- F25: '',
- F26: '',
- F27: '',
- F28: '',
- F29: '',
- F30: '',
- F31: '',
- F32: '',
- F33: '',
- F34: '',
- F35: '',
- F36: '',
- F37: '',
- F38: '',
- F39: '',
- F40: '',
- F41: '',
- F42: '',
- F43: '',
- F44: '',
- F45: '',
- F46: '',
- Remark: '',
- DeletionStateCode: '',
- CreateOn: '',
- CreateUserId: '',
- CreateBy: '',
- ModifiedOn: '',
- ModifiedUserId: '',
- ModifiedBy: ''
- },
- searchImportForm: {
- Id: '',
- Code: '',
- Name: '',
- BigClassName: '',
- BigClassCode: '',
- MiddleClassName: '',
- SmallClassName: '',
- GoodsName: '',
- GoodsLevel: '',
- GoodsDesc: '',
- Standard: '',
- CompanyType: '',
- F01: '',
- F02: '',
- F03: '',
- F04: '',
- F05: '',
- F06: '',
- F07: '',
- F08: '',
- F09: '',
- F10: '',
- F11: '',
- F12: '',
- F13: '',
- F14: '',
- F15: '',
- F16: '',
- F17: '',
- F18: '',
- F19: '',
- F20: '',
- F21: '',
- F22: '',
- F23: '',
- F24: '',
- F25: '',
- F26: '',
- F27: '',
- F28: '',
- F29: '',
- F30: '',
- F31: '',
- F32: '',
- F33: '',
- F34: '',
- F35: '',
- F36: '',
- F37: '',
- F38: '',
- F39: '',
- F40: '',
- F41: '',
- F42: '',
- F43: '',
- F44: '',
- F45: '',
- F46: '',
- Remark: '',
- DeletionStateCode: '',
- CreateOn: '',
- CreateUserId: '',
- CreateBy: '',
- ModifiedOn: '',
- ModifiedUserId: '',
- ModifiedBy: ''
- },
- setForm: {
- SupplierTypeCode: '01',
- SupplierTypeName: '物资类',
- AuditStepCode: '',
- AuditStepName: ''
- },
- tableColumns: [
- {
- prop: 'Code1',
- label: '大类编码',
- width: 120,
- sort: true
- },
- {
- prop: 'Name1',
- label: '大类名称',
- width: 150,
- sort: true
- },
- {
- prop: 'Code2',
- label: '中类编码',
- width: 120,
- sort: true
- },
- {
- prop: 'Name2',
- label: '中类名称',
- width: 150,
- sort: true
- },
- {
- prop: 'Code3',
- label: '小类编码',
- width: 120,
- sort: true
- },
- {
- prop: 'Name3',
- label: '小类名称',
- width: 150,
- sort: true
- },
- {
- prop: 'Code4',
- label: '品名编码',
- width: 120,
- sort: true
- },
- {
- prop: 'Name4',
- label: '品名名称',
- width: 150,
- sort: true
- },
- {
- prop: 'GoodsLevel',
- label: '物资级别',
- width: 110,
- sort: true
- },
- {
- prop: 'GoodsDesc',
- label: '产品说明',
- width: 110,
- sort: true
- },
- {
- prop: 'Standard',
- label: '标准备案',
- width: 110,
- sort: true
- },
- {
- prop: 'CompanyType',
- label: '供应商类型',
- width: 130,
- sort: true
- }
- ],
- dynamicTableColumns: [],
- organizeProps: {
- value: 'id',
- label: 'name',
- children: 'children'
- },
- operationOrganizeData: [],
- AuditStepOptions: [],
- showcolumn: [],
- contrastListvisible: false,
- qualificaListvisible: false,
- ContrastLoading: false,
- contrastsize: 10,
- contrastcurrentPage: 1,
- contrastimportCount: 0,
- }
- },
- created () {
- // 查询条件初始值备份
- Object.assign(this.searchFormReset, this.searchForm)
- // 初始化部分表头
- this.initTableHeader()
- // 查询列表
- this.initDatas()
- this.getDictOptions()
- },
- methods: {
- initContrastDatas (event) {
- this.ContrastLoading = true
- let myCreateOn = []
- // 解析时间
- if (this.CreateOn != null && 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]))
- }
- let params = {
- _size: this.contrastsize,
- _currentPage: this.contrastcurrentPage,
- Order: this.Column.Order,
- Prop: this.Column.Prop,
- SetupTime: this.SetupTime,
- CreateOn: myCreateOn.join(','),
- CheckUId: this.auditorg,
- FullId: this.selectDept
- }
- api.getCompanyList(params, this.searchForm, this.$axios)
- .then(res => {
- this.entityList = res.data.items
- this.contrastimportCount = res.data.currentItemCount
- this.ContrastLoading = false
- })
- .catch(err => {
- console.error(err)
- })
- },
- showDelSupplierCertSub () {
- this.deleteDialogVisible = true
- this.initContrastDatas()
- },
- contrastList () {
- this.contrastListvisible = true
- this.showimportvisible = false
- },
- qualificaList () {
- this.qualificaListvisible = true
- this.showimportvisible = false
- },
- deleteSuspend () {
- // this.$confirm('此操作将更新企业资质, 是否继续?', '提示', {
- // confirmButtonText: '确定',
- // cancelButtonText: '取消',
- // type: 'warning'
- // }).then(() => {
- // this.importloading = true
- api.deleteSuspend(this.$axios).then(res => {
- // this.importloading = false
- if (res.data.code === 0) {
- // this.$message({
- // type: 'success',
- // message: res.data.message
- // })
- }
- })
- // })
- },
- suspend () {
- api.suspend(this.$axios).then(res => {
- if (res.data.code === 0) {
- }
- })
- },
- truncateimport () {
- this.$confirm('此操作将清空导入的数据, 是否继续?', '提示', {
- confirmButtonText: '确定',
- cancelButtonText: '取消',
- type: 'warning'
- }).then(() => {
- api.truncateImport(this.$axios).then(res => {
- this.initImportDatas()
- if (res.data.code === 0) {
- this.$message({
- type: 'success',
- message: res.data.message
- })
- } else {
- this.$message({
- type: 'warning',
- message: res.data.message
- })
- }
- })
- })
- },
- confirmImport () {
- this.confirmLoading = true
- this.$confirm('此操作将更新原有数据, 是否继续?', '提示', {
- confirmButtonText: '确定',
- cancelButtonText: '取消',
- type: 'warning'
- }).then(() => {
- api.insertGoodsAptitude(this.$axios).then(res => {
- this.showimportvisible = false
- if (res.data.code === 0) {
- this.$message({
- type: 'success',
- message: res.data.message
- })
- this.initDatas()
- this.deleteSuspend()
- // this.suspend()
- } else {
- this.$message({
- type: 'warning',
- message: res.data.message
- })
- }
- this.confirmLoading = false
- })
- })
- },
- showimport () {
- this.importcurrentPage = 1
- this.initImportDatas()
- this.showimportvisible = true
- },
- uploadExcel () {
- this.importloading = true
- this.uploadshow = false
- let params = {
- ExcelUrl: this.Excelurl
- }
- api.importExcel(params, this.$axios).then(res => {
- if (res.data.code === 0) {
- this.$message({
- type: 'success',
- message: res.data.message + " 即将生成对比列表"
- })
- this.importloading = false
- this.initImportDatas()
- // this.createContrast()
- } else if (res.data.code === -1) {
- this.errorDialogVisible = true
- this.textarea = res.data.message
- } else if (res.data.code === -2) {
- this.$message({
- type: 'warning',
- message: res.data.message
- })
- }
- })
- },
- createContrast () {
- api.createContrast(this.$axios).then(res => {
- }).catch(err => {
- console.error(err)
- })
- },
- uploadrequest (option) {
- let _this = this
- if (process.client) {
- const myDomain = window.location.host
- axios.post(process.env.upfilehost, {})
- .then(function (res) {
- if (res.data && res.data.fid && res.data.fid !== '') {
- if (res.data.publicUrl.indexOf('/upfile') === 0) {
- option.action = `http://${myDomain}/${res.data.publicUrl}/${res.data.fid}`
- } else {
- option.action = `http://${res.data.publicUrl}/${res.data.fid}`
- }
- uploadajax(option)
- _this.Excelurl = option.action
- } else {
- _this.$message({
- type: 'warning',
- message: '未上传成功!请刷新界面重新上传!'
- })
- }
- })
- .catch(res => {
- _this.$message({
- type: 'warning',
- message: '未上传成功!请重新上传!'
- })
- })
- }
- },
- beforeAvatarUpload (file) {
- if (file.name.indexOf('.xlsx') < 0) {
- this.$message.error('文件格式必须为.xlsx')
- return false
- }
- return true
- },
- Name1Change (val) {
- this.formData.Code2 = this.formData.Code2.replace(/^(\w{0})\w{2}(.*)$/, '$1' + val + '$2')
- this.formData.Code3 = this.formData.Code3.replace(/^(\w{0})\w{2}(.*)$/, '$1' + val + '$2')
- this.formData.Code4 = this.formData.Code4.replace(/^(\w{0})\w{2}(.*)$/, '$1' + val + '$2')
- },
- Name2Change (val) {
- this.formData.Code3 = this.formData.Code3.replace(/^(\w{0})\w{4}(.*)$/, '$1' + val + '$2')
- this.formData.Code4 = this.formData.Code4.replace(/^(\w{0})\w{4}(.*)$/, '$1' + val + '$2')
- },
- Name3Change (val) {
- this.formData.Code4 = this.formData.Code4.replace(/^(\w{0})\w{6}(.*)$/, '$1' + val + '$2')
- },
- CodeNameEdit (val) {
- this.myclassid = val.ClassId
- this.$axios.get('goodsaptitudeclass/getcodename/' + val.Code, {})
- .then(res => {
- // response
- this.formData = res.data
- this.codeeditshow = true
- })
- .catch(err => {
- console.log(err)
- })
- },
- codeedit () {
- api.updateCodeEntity(this.myclassid, this.formData, this.$axios).then(res => {
- if (res.data.code === 0) {
- // 保存成功后,初始化数据,变成修改
- this.codeeditshow = false
- this.initDatas()
- this.$message({
- type: 'success',
- message: res.data.message
- })
- } else {
- this.$message({
- type: 'warning',
- message: res.data.message
- })
- }
- }).catch(err => {
- console.error(err)
- })
- },
- // exportExcel () {
- // /* generate workbook object from table */
- // let table = document.querySelector('#rebateSetTable').cloneNode(true) // 克隆备份(原table不动)
- // // 因为element-ui的表格的fixed属性导致多出一个table,会下载重复内容,这里删除掉
- // table.removeChild(table.querySelector('.el-table__fixed-right')) // 删掉备份的子节点
- // let wb = XLSX.utils.table_to_book(table, {
- // raw: true
- // })
- // /* get binary string as output */
- // let wbout = XLSX.write(wb, {
- // bookType: 'xlsx',
- // bookSST: true,
- // type: 'array'
- // })
- // try {
- // FileSaver.saveAs(
- // new Blob([wbout], {
- // type: 'application/octet-stream'
- // }),
- // 'Goods.xlsx'
- // )
- // } catch (e) {
- // if (typeof console !== 'undefined') console.log(e, wbout)
- // }
- // return wbout
- // },
- importExcel () {
- this.uploadshow = true
- },
- exportExcel () {
- this.loading = true
- // 显示列
- Object.assign(this.showcolumn, this.tableColumns)
- Object.assign(this.showcolumn, this.dynamicTableColumns)
- let showcolumn = this.tableColumns.concat(this.dynamicTableColumns)
- let showcolumnarr = []
- let showcolumnnamearr = []
- for (var i = 0; i < showcolumn.length; i++) {
- showcolumnarr.push(showcolumn[i].label)
- showcolumnnamearr.push(showcolumn[i].prop.replace(/,/g, ','))
- }
- let params = {
- _currentPage: this.currentPage,
- _size: this.size,
- Order: this.Column.Order,
- Prop: this.Column.Prop,
- Edition: '1',
- showcolumnarr: showcolumnarr + '',
- showcolumnnamearr: showcolumnnamearr + ''
- }
- 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
- }
- })
- },
- initTableHeader () {
- setapi.initGoodTableHeader(this.$axios).then(res => {
- this.dynamicTableColumns = res.data.items
- })
- },
- saveApprovalDept () {
- let organizeids = []
- let organize = this.$refs.operationOriganizeTree.getCheckedNodes()
- organize.forEach(row => {
- organizeids.push(row.id)
- })
- this.setForm.AuditStepName = this.$refs.selectAuditStep.selectedLabel + ''
- setapi.addOrganize(this.classid, organizeids, this.setForm, this.$axios).then(res => {
- if (res.data.code === 0) {
- this.$message({
- type: 'success',
- message: res.data.message
- })
- this.deptsetVisible = false
- } else {
- this.$message({
- type: 'warning',
- message: res.data.message
- })
- }
- }).catch(err => {
- console.log(err)
- })
- },
- deptSet (val) {
- let stcode = this.setForm.SupplierTypeCode
- this.deptsetVisible = true
- this.selecteclassid = val.Id
- this.classid = val.ClassId
- // request
- this.$axios.get('classorgsetting/getdepartment?id=' + this.selecteclassid + '&stcode=' + stcode, {})
- .then(res => {
- // response
- this.setForm.AuditStepCode = res.data.AuditStepCode
- this.operationOrganizeData = window.toolfun_gettreejson(res.data.Organize, 'id', 'pId', 'id,name,scope')
- if (!res.data.SelectedOrganize) {
- res.data.SelectedOrganize = []
- }
- this.$refs.operationOriganizeTree.setCheckedKeys(res.data.SelectedOrganize, true)
- })
- .catch(err => {
- console.log(err)
- })
- },
- initDatas () {
- this.loading1 = true
- // 分页及列表条件
- let params = {
- _currentPage: this.currentPage,
- _size: this.size,
- Order: this.Column.Order,
- Prop: this.Column.Prop,
- Edition: '1'
- }
- let myCreateOn = []
- // 解析时间
- if (this.CreateOn != null && 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.join(','), params, this.$axios).then(res => {
- this.entityList = res.data.items
- this.currentItemCount = res.data.currentItemCount
- this.loading1 = false
- }).catch(err => {
- console.error(err)
- })
- },
- initImportDatas () {
- this.loading2 = true
- // 分页及列表条件
- let params = {
- _currentPage: this.importcurrentPage,
- _size: this.importsize,
- Order: this.initImportDatas.Order,
- Prop: this.initImportDatas.Prop,
- Edition: '1'
- }
- let myCreateOn = []
- // 解析时间
- if (this.importCreateOn != null && this.importCreateOn.length === 2) {
- this.importCreateOn[1].setHours(23)
- this.importCreateOn[1].setMinutes(59)
- this.importCreateOn[1].setSeconds(59)
- myCreateOn.push(this.formatDateTime(this.importCreateOn[0]))
- myCreateOn.push(this.formatDateTime(this.importCreateOn[1]))
- }
- // 查询条件
- Object.assign(params, this.searchImportForm)
- // 访问接口
- api.getImportList(myCreateOn.join(','), params, this.$axios).then(res => {
- this.importentityList = res.data.items
- this.importcurrentItemCount = res.data.currentItemCount
- this.loading2 = false
- }).catch(err => {
- console.error(err)
- })
- },
- getDictOptions () {
- api.getDictList(this.$axios).then(res => {
- this.AuditStepOptions = res.data.items['AuditStep']
- // this.dictOptions.customerList = res.data.items['customerList']
- // this.dictOptions.projectList = res.data.items['projectList']
- }).catch(err => {
- console.error(err)
- })
- },
- MoreCmdClick (cmd) {
- if (cmd.Command === 'Set') {
- this.deptSet(cmd.row)
- } else if (cmd.Command === 'Delete') {
- this.deleteEntity(cmd.row)
- } else if (cmd.Command === 'CodeEdit') {
- this.CodeNameEdit(cmd.row)
- }
- },
- GetCommand (cmdType, row) {
- let cmd = {}
- cmd.Command = cmdType
- cmd.row = row
- return cmd
- },
- 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()
- },
- importsearchCommand (command) {
- if (command === 'search') {
- this.importDialogVisible = true
- } else if (command === 'clear') {
- this.importclearSearch()
- }
- },
- // 列表排序功能
- importorderby (column) {
- if (column.order === 'ascending') {
- this.importColumn.Order = 'asc'
- } else if (column.order === 'descending') {
- this.importColumn.Order = 'desc'
- }
- this.importColumn.Prop = column.prop
- this.initImportDatas()
- },
- importclearSearch () {
- Object.assign(this.searchImportForm, this.searchFormReset)
- // this.searchForm = this.searchFormReset;
- this.importCreateOn = ''
- this.initImportDatas()
- },
- importhandleSearch () {
- this.importcurrentPage = 1
- this.importDialogVisible = false
- this.initImportDatas()
- },
- importhandleCurrentChange (value) {
- this.importcurrentPage = value
- this.initImportDatas()
- },
- importhandleSizeChange (value) {
- this.importsize = value
- this.importcurrentPage = 1
- this.initImportDatas()
- },
- deleteEntity (row) {
- // row.deleteConfirmFlag = false
- this.$confirm('此操作将永久删除该数据, 是否继续?', '提示', {
- confirmButtonText: '确定',
- cancelButtonText: '取消',
- type: 'warning'
- }).then(() => {
- 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)
- })
- }).catch(err => {
- console.error(err)
- })
- },
- transferStr (val) {
- if (val === '1') {
- return '是'
- }
- if (val === '0') {
- return ''
- } else {
- return val
- }
- },
- 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>
- .el-col {
- margin-bottom: 5px;
- }
- .attach-uploader {
- border: 1px dashed #63B8FF;
- cursor: pointer;
- position: relative;
- overflow: hidden;
- // margin-bottom: -17px;
- margin-top: -15px;
- margin-left: 20px
- }
- .attach-uploader :hover {
- border-color: #228B22;
- }
- .attach-uploader-icon {
- font-size: 25px;
- color: #63B8FF;
- width: 50px;
- height: 50px;
- line-height: 50px;
- text-align: center;
- }
- .attach-uploader-icon:hover {
- color: #228B22;
- }
- </style>
|