From 7fb0a8f0ab16c149484bf043754cd10cfa94de2f Mon Sep 17 00:00:00 2001
From: wangyi <2946747746@qq.com>
Date: 星期一, 19 一月 2026 14:48:05 +0800
Subject: [PATCH] 增加了业务员,保管员和验收员的对应的显示
---
src/views/gyMaterial/GyMaterial.vue | 1030 ++++++++++++++++++++++----------------------------------
1 files changed, 402 insertions(+), 628 deletions(-)
diff --git a/src/views/gyMaterial/GyMaterial.vue b/src/views/gyMaterial/GyMaterial.vue
index 49028d1..e2c8064 100644
--- a/src/views/gyMaterial/GyMaterial.vue
+++ b/src/views/gyMaterial/GyMaterial.vue
@@ -1,55 +1,26 @@
<template>
<div style="padding: 10px">
- <el-card style="margin-bottom: 10px;">
+ <el-card style="margin-bottom: 10px">
<el-form :inline="true" :model="queryParams" ref="queryForm" class="mb8">
<el-form-item label="鐗╂枡浠g爜" prop="HNumber">
- <el-input
- v-model="queryParams.HNumber"
- placeholder="璇疯緭鍏ョ墿鏂欎唬鐮�"
- style="width: 160px"
- />
+ <el-input v-model="queryParams.HNumber" placeholder="璇疯緭鍏ョ墿鏂欎唬鐮�" style="width: 160px" />
</el-form-item>
<el-form-item label="鐗╂枡鍚嶇О" prop="HName">
- <el-input
- v-model="queryParams.HName"
- placeholder="璇疯緭鍏ョ墿鏂欏悕绉�"
- style="width: 160px"
- />
+ <el-input v-model="queryParams.HName" placeholder="璇疯緭鍏ョ墿鏂欏悕绉�" style="width: 160px" />
</el-form-item>
<el-form-item label="缁勭粐鍚嶇О" prop="HOrgID">
- <el-select
- v-model="queryParams.HOrgID"
- placeholder="璇烽�夋嫨缁勭粐"
- style="width: 160px"
- >
- <el-option
- v-for="item in organizationOptions"
- :key="item.ID"
- :label="item.Name"
- :value="item.ID"
- />
+ <el-select v-model="queryParams.HOrgID" placeholder="璇烽�夋嫨缁勭粐" style="width: 160px">
+ <el-option v-for="(item, index) in organizationOptions" :key="index" :label="item.Name"
+ :value="item.ID.toString()" />
</el-select>
</el-form-item>
<el-form-item label="椤圭洰鍙�" prop="HProject">
- <el-select
- v-model="queryParams.HProject"
- placeholder="璇烽�夋嫨椤圭洰鍙�"
- style="width: 160px"
- >
- <el-option
- v-for="item in projectOptions"
- :key="item.HName"
- :label="item.HName"
- :value="item.HName"
- />
+ <el-select v-model="queryParams.HProject" placeholder="璇烽�夋嫨椤圭洰鍙�" style="width: 160px">
+ <el-option v-for="item in projectOptions" :key="item.HName" :label="item.HName" :value="item.HName" />
</el-select>
</el-form-item>
<el-form-item label="閲嶆柊鍚屾">
- <el-input
- v-model="queryParams.HNumber2"
- placeholder="璇疯緭鍏ョ墿鏂欎唬鐮�"
- style="width: 160px"
- />
+ <el-input v-model="queryParams.HNumber2" placeholder="璇疯緭鍏ョ墿鏂欎唬鐮�" style="width: 160px" />
<el-button type="primary" size="mini" @click="handleResCnz" style="margin-left: 10px">閲嶆柊鍚屾</el-button>
</el-form-item>
<el-form-item>
@@ -61,138 +32,74 @@
<el-collapse v-model="activeCollapse" class="filter-collapse">
<el-collapse-item title="鏇村" name="more">
<el-form-item label="瑙勬牸鍨嬪彿" prop="HModel">
- <el-input
- v-model="queryParams.HModel"
- placeholder="璇疯緭鍏ヨ鏍煎瀷鍙�"
- style="width: 160px"
- />
+ <el-input v-model="queryParams.HModel" placeholder="璇疯緭鍏ヨ鏍煎瀷鍙�" style="width: 160px" />
</el-form-item>
- <el-card class="box-card" style="margin-top: 20px;">
+ <el-card class="box-card" style="margin-top: 20px">
<div slot="header" class="clearfix"><span>杩囨护</span></div>
<div>
<el-form-item label-width="0">
<el-row>
<el-col :span="7">
- <el-select
- v-model="queryParams.ColName"
- placeholder="璇烽�夋嫨"
- style="width: 100%"
- >
- <el-option value="0" label=""></el-option>
- <el-option
- v-for="(item, index) in visibleColumns"
- :key="index"
- :label="item.title"
- :value="item.field"
- ></el-option>
+ <el-select v-model="queryParams.ColName" placeholder="璇烽�夋嫨" style="width: 100%">
+ <!-- <el-option value="" label=""></el-option> -->
+ <el-option v-for="(item, index) in visibleColumns" :key="index" :label="item.title"
+ :value="item.field"></el-option>
</el-select>
</el-col>
<el-col :span="6" style="padding: 0 10px">
- <el-select
- v-model="queryParams.Comparator"
- placeholder="璇烽�夋嫨"
- style="width: 100%"
- >
- <el-option value="0" label=""></el-option>
- <el-option
- v-for="(item, index) in comparatorList"
- :key="index"
- :label="item.label"
- :value="item.value"
- ></el-option>
+ <el-select v-model="queryParams.Comparator" placeholder="璇烽�夋嫨" style="width: 100%">
+ <!-- <el-option value="0" label=""></el-option> -->
+ <el-option v-for="(item, index) in comparatorList" :key="index" :label="item.label"
+ :value="item.value"></el-option>
</el-select>
</el-col>
<el-col :span="11">
- <el-input
- v-model="queryParams.ColContent"
- placeholder="璇疯緭鍏�"
- clearable
- @keyup.enter.native="handleQuery"
- />
+ <el-input v-model="queryParams.ColContent" placeholder="璇疯緭鍏�" clearable
+ @keyup.enter.native="handleQuery" />
</el-col>
</el-row>
</el-form-item>
<el-form-item label-width="0">
<el-row>
<el-col :span="7">
- <el-select
- v-model="queryParams.ColName1"
- placeholder="璇烽�夋嫨"
- style="width: 100%"
- >
- <el-option value="0" label=""></el-option>
- <el-option
- v-for="(item, index) in visibleColumns"
- :key="index"
- :label="item.title"
- :value="item.field"
- ></el-option>
+ <el-select v-model="queryParams.ColName1" placeholder="璇烽�夋嫨" style="width: 100%">
+ <!-- <el-option value="0" label=""></el-option> -->
+ <el-option v-for="(item, index) in visibleColumns" :key="index" :label="item.title"
+ :value="item.field"></el-option>
</el-select>
</el-col>
<el-col :span="6" style="padding: 0 10px">
- <el-select
- v-model="queryParams.Comparator1"
- placeholder="璇烽�夋嫨"
- style="width: 100%"
- >
- <el-option value="0" label=""></el-option>
- <el-option
- v-for="(item, index) in comparatorList"
- :key="index"
- :label="item.label"
- :value="item.value"
- ></el-option>
+ <el-select v-model="queryParams.Comparator1" placeholder="璇烽�夋嫨" style="width: 100%">
+ <!-- <el-option value="0" label=""></el-option> -->
+ <el-option v-for="(item, index) in comparatorList" :key="index" :label="item.label"
+ :value="item.value"></el-option>
</el-select>
</el-col>
<el-col :span="11">
- <el-input
- v-model="queryParams.ColContent1"
- placeholder="璇疯緭鍏�"
- clearable
- @keyup.enter.native="handleQuery"
- />
+ <el-input v-model="queryParams.ColContent1" placeholder="璇疯緭鍏�" clearable
+ @keyup.enter.native="handleQuery" />
</el-col>
</el-row>
</el-form-item>
<el-form-item label-width="0">
<el-row>
<el-col :span="7">
- <el-select
- v-model="queryParams.ColName2"
- placeholder="璇烽�夋嫨"
- style="width: 100%"
- >
- <el-option value="0" label=""></el-option>
- <el-option
- v-for="(item, index) in visibleColumns"
- :key="index"
- :label="item.title"
- :value="item.field"
- ></el-option>
+ <el-select v-model="queryParams.ColName2" placeholder="璇烽�夋嫨" style="width: 100%">
+ <!-- <el-option value="0" label=""></el-option> -->
+ <el-option v-for="(item, index) in visibleColumns" :key="index" :label="item.title"
+ :value="item.field"></el-option>
</el-select>
</el-col>
<el-col :span="6" style="padding: 0 10px">
- <el-select
- v-model="queryParams.Comparator2"
- placeholder="璇烽�夋嫨"
- style="width: 100%"
- >
- <el-option value="0" label=""></el-option>
- <el-option
- v-for="(item, index) in comparatorList"
- :key="index"
- :label="item.label"
- :value="item.value"
- ></el-option>
+ <el-select v-model="queryParams.Comparator2" placeholder="璇烽�夋嫨" style="width: 100%">
+ <!-- <el-option value="0" label=""></el-option> -->
+ <el-option v-for="(item, index) in comparatorList" :key="index" :label="item.label"
+ :value="item.value"></el-option>
</el-select>
</el-col>
<el-col :span="11">
- <el-input
- v-model="queryParams.ColContent2"
- placeholder="璇疯緭鍏�"
- clearable
- @keyup.enter.native="handleQuery"
- />
+ <el-input v-model="queryParams.ColContent2" placeholder="璇疯緭鍏�" clearable
+ @keyup.enter.native="handleQuery" />
</el-col>
</el-row>
</el-form-item>
@@ -201,211 +108,107 @@
</el-collapse-item>
</el-collapse>
</el-form>
- <div style="text-align:center;font-size:15px;font-weight:bold;color:#fc9393;margin: 20px 0;">
+ <div style="
+ text-align: center;
+ font-size: 15px;
+ font-weight: bold;
+ color: #fc9393;
+ margin: 20px 0;
+ ">
{{ currentFilterScheme }}
</div>
</el-card>
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
- <el-button
- type="primary"
- plain
- size="mini"
- @click="handleImport"
- >瀵煎叆</el-button
- >
+ <el-button type="primary" plain size="mini" @click="handleImport">瀵煎叆</el-button>
</el-col>
<el-col :span="1.5">
- <el-button
- type="primary"
- plain
- size="mini"
- @click="handleExport"
- >瀵煎嚭</el-button
- >
+ <el-button type="primary" plain size="mini" @click="handleExport">瀵煎嚭</el-button>
</el-col>
<el-col :span="1.5">
- <el-button
- type="primary"
- size="mini"
- @click="handleNumAdd"
- >娴佹按鍙锋柊澧�</el-button
- >
+ <el-button type="primary" size="mini" @click="handleNumAdd">娴佹按鍙锋柊澧�</el-button>
</el-col>
<el-col :span="1.5">
- <el-button
- type="primary"
- size="mini"
- @click="handleAdd"
- >鏂板</el-button
- >
+ <el-button type="primary" size="mini" @click="handleAdd">鏂板</el-button>
</el-col>
<el-col :span="1.5">
- <el-button
- size="mini"
- :disabled="single"
- @click="handleCopy"
- >澶嶅埗</el-button
- >
+ <el-button size="mini" :disabled="single" @click="handleCopy">澶嶅埗</el-button>
</el-col>
<el-col :span="1.5">
- <el-button
- size="mini"
- :disabled="single"
- @click="handleEdit"
- >缂栬緫</el-button
- >
+ <el-button size="mini" :disabled="single" @click="handleEdit">缂栬緫</el-button>
</el-col>
<el-col :span="1.5">
- <el-button
- type="danger"
- size="mini"
- :disabled="single"
- @click="handleDelete"
- >鍒犻櫎</el-button
- >
+ <el-button type="danger" size="mini" :disabled="single" @click="handleDelete">鍒犻櫎</el-button>
</el-col>
<el-col :span="1.5">
- <el-button
- size="mini"
- :disabled="single"
- @click="handleAudit(0)"
- >瀹℃牳</el-button
- >
+ <el-button size="mini" :disabled="single" @click="handleAudit(0)">瀹℃牳</el-button>
</el-col>
<el-col :span="1.5">
- <el-button
- size="mini"
- :disabled="single"
- @click="handleAudit(1)"
- >鍙嶅鏍�</el-button
- >
+ <el-button size="mini" :disabled="single" @click="handleAudit(1)">鍙嶅鏍�</el-button>
</el-col>
<el-col :span="1.5">
- <el-button
- size="mini"
- :disabled="single"
- @click="handleStop(0)"
- >绂佺敤</el-button
- >
+ <el-button size="mini" :disabled="single" @click="handleStop(0)">绂佺敤</el-button>
</el-col>
<el-col :span="1.5">
- <el-button
- size="mini"
- :disabled="single"
- @click="handleStop(1)"
- >鍙嶇鐢�</el-button
- >
+ <el-button size="mini" :disabled="single" @click="handleStop(1)">鍙嶇鐢�</el-button>
</el-col>
<el-col :span="1.5">
- <el-button
- size="mini"
- @click="handleColumnSetting"
- >鍒楄缃�</el-button
- >
+ <el-button size="mini" @click="handleColumnSetting">鍒楄缃�</el-button>
</el-col>
<el-col :span="1.5">
- <el-button
- size="mini"
- @click="handleButtonSetting"
- >鎸夐挳璁剧疆</el-button
- >
+ <el-button size="mini" @click="handleButtonSetting">鎸夐挳璁剧疆</el-button>
</el-col>
<el-col :span="1.5">
- <el-button
- type="primary"
- size="mini"
- @click="handleSaveScheme"
- >淇濆瓨鏂规</el-button
- >
+ <el-button type="primary" size="mini" @click="handleSaveScheme">淇濆瓨鏂规</el-button>
</el-col>
<el-col :span="1.5">
- <el-button
- type="primary"
- size="mini"
- @click="handleReadScheme"
- >璇诲彇鏂规</el-button
- >
+ <el-button type="primary" size="mini" @click="handleReadScheme">璇诲彇鏂规</el-button>
</el-col>
<el-col :span="1.5">
- <el-button
- size="mini"
- @click="handleRefresh"
- >鍒锋柊</el-button
- >
+ <el-button size="mini" @click="handleRefresh">鍒锋柊</el-button>
</el-col>
<el-col :span="1.5">
- <el-button
- size="mini"
- @click="handleExit"
- >閫�鍑�</el-button
- >
+ <el-button size="mini" @click="handleExit">閫�鍑�</el-button>
</el-col>
<el-col :span="1.5">
- <el-button
- type="primary"
- size="mini"
- @click="handleCorrect"
- >鎵规敼</el-button
- >
+ <el-button type="primary" size="mini" @click="handleCorrect">鎵规敼</el-button>
</el-col>
<el-col :span="1.5">
- <el-button
- type="primary"
- size="mini"
- @click="handleCorrect2"
- >鎵规敼(鏂规2)</el-button
- >
+ <el-button type="primary" size="mini" @click="handleCorrect2">鎵规敼(鏂规2)</el-button>
</el-col>
</el-row>
<el-row :gutter="10" style="margin-top: 10px">
<el-col :span="6">
- <el-card style="height: 600px; overflow: hidden; display: flex; flex-direction: column;">
+ <el-card style="height: 600px; overflow: hidden; display: flex; flex-direction: column">
<div slot="header">
<span>鐗╂枡鍒嗙被</span>
</div>
- <div style="flex: 1; overflow: auto; margin-bottom: 10px;">
- <el-tree
- :data="treeData"
- :props="treeProps"
- node-key="id"
- default-expand-all
- :expand-on-click-node="false"
- @node-click="handleTreeNodeClick"
- :highlight-current="true"
- class="custom-tree"
- >
+ <div style="flex: 1; overflow: auto; margin-bottom: 10px">
+ <el-tree :data="treeData" :props="treeProps" node-key="id" default-expand-all :expand-on-click-node="false"
+ @node-click="handleTreeNodeClick" :highlight-current="true" class="custom-tree">
<span class="custom-tree-node" slot-scope="{ node, data }">
<span>{{ node.label }}</span>
</span>
</el-tree>
</div>
- <div style="height: 200px; border: 1px solid #ebeef5; border-radius: 4px;">
- <el-carousel
- :autoplay="false"
- indicator-position="none"
- height="200px"
- ref="carousel"
- >
+ <div style="height: 200px; border: 1px solid #ebeef5; border-radius: 4px">
+ <el-carousel :autoplay="false" indicator-position="none" height="200px" ref="carousel">
<el-carousel-item v-for="(item, index) in fileList" :key="index">
<div v-if="item.type === 'image'" class="carousel-item">
- <img
- :src="item.url"
- :alt="item.name"
- style="width: 100%; height: 100%; object-fit: contain;"
- @click="previewImg(item.url)"
- />
+ <img :src="item.url" :alt="item.name" style="width: 100%; height: 100%; object-fit: contain"
+ @click="previewImg(item.url)" />
</div>
<div v-else-if="item.type === 'pdf'" class="carousel-item">
- <embed
- :src="item.url"
- type="application/pdf"
- style="width: 100%; height: 100%;"
- />
+ <embed :src="item.url" type="application/pdf" style="width: 100%; height: 100%" />
</div>
<div v-else class="carousel-item">
- <h1 style="text-align:center;line-height:180px;color:red;font-weight:bolder;">
+ <h1 style="
+ text-align: center;
+ line-height: 180px;
+ color: red;
+ font-weight: bolder;
+ ">
鏆傛湭涓婁紶鏂囦欢
</h1>
</div>
@@ -417,40 +220,21 @@
<el-col :span="18">
<div class="tableBox" v-loading="loading">
- <el-table
- :data="tableData"
- ref="tableData"
- height="600"
- @selection-change="handleSelectionChange"
- border
- @row-click="handleRowClick"
- @row-dblclick="handleDblclick"
- :row-style="rowStyle"
- v-if="tableShow"
- >
+ <el-table :data="tableData" ref="tableData" height="600" @selection-change="handleSelectionChange" border
+ @row-click="handleRowClick" @row-dblclick="handleDblclick" :row-style="rowStyle" v-if="tableShow">
<el-table-column type="selection" width="55" align="center" fixed="left" />
<el-table-column prop="hmainid" label="鍗曟嵁ID" v-if="false" />
- <el-table-column
- v-for="(item, index) in btList"
- :key="index"
- :align="item.align"
- :prop="item.field"
- :label="item.title"
- :width="item.width"
- v-if="!item.hide"
- :sortable="item.sort"
- show-overflow-tooltip
- :fixed="item.fixed"
- >
+ <el-table-column v-for="(item, index) in btList" :key="index" :align="item.align" :prop="item.field"
+ :label="item.title" :width="item.width" v-if="!item.hide" :sortable="item.sort" show-overflow-tooltip
+ :fixed="item.fixed">
<template slot-scope="{ row, column }">
<div :style="item.style">
- <el-button
- type="text"
- @click="handleMaterialCodeClick(row)"
- v-if="column.property === '鐗╂枡浠g爜'"
- >{{ row[column.property] }}</el-button
- >
- <span v-else-if="(column.property || '').includes('鏃堕棿') || (column.property || '').includes('鏃ユ湡')">
+ <el-button type="text" @click="handleMaterialCodeClick(row)" v-if="column.property === '鐗╂枡浠g爜'">{{
+ row[column.property] }}</el-button>
+ <span v-else-if="
+ (column.property || '').includes('鏃堕棿') ||
+ (column.property || '').includes('鏃ユ湡')
+ ">
{{ formatDate(row[column.property]) }}
</span>
<span v-else>{{ row[column.property] }}</span>
@@ -458,119 +242,56 @@
</template>
</el-table-column>
</el-table>
- <pagination
- v-show="total > 0"
- :total="total"
- :page.sync="page"
- :limit.sync="pageSize"
- :pageSizes="pageSizes"
- @pagination="getList"
- />
+ <pagination v-show="total > 0" :total="total" :page.sync="page" :limit.sync="pageSize" :pageSizes="pageSizes"
+ @pagination="handleQuery" />
</div>
</el-col>
</el-row>
- <el-dialog
- :visible.sync="previewVisible"
- width="80%"
- top="5vh"
- :before-close="handlePreviewClose"
- >
- <img :src="previewImage" style="width: 100%;" />
+ <el-dialog :visible.sync="previewVisible" width="80%" top="5vh" :before-close="handlePreviewClose">
+ <img :src="previewImage" style="width: 100%" />
</el-dialog>
- <el-dialog
- title="闅愯棌鍒楄缃�"
- :visible.sync="openColumnSetting"
- width="816px"
- append-to-body
- >
- <RowSettings
- :colName="btResList"
- :HModName="HModName"
- @rowEditClose="columnSettingClose"
- v-if="columnSettingShow"
- />
+ <el-dialog title="闅愯棌鍒楄缃�" :visible.sync="openColumnSetting" width="816px" append-to-body>
+ <RowSettings :colName="btResList" :HModName="HModName" @rowEditClose="columnSettingClose"
+ v-if="columnSettingShow" />
</el-dialog>
- <el-dialog
- :title="editTitle"
- :visible.sync="openEdit"
- width="95%"
- top="2vh"
- append-to-body
- class="material-edit-dialog"
- :before-close="closeEdit"
- >
- <MaterialEdit
- v-if="editShow"
- :hID="currentEditId"
- :OperationType="OperationType"
- :HMaterTypeID="currentMaterTypeID"
- @close="handleEditClose"
- />
+ <el-dialog :title="editTitle" :visible.sync="openEdit" width="95%" top="2vh" append-to-body
+ class="material-edit-dialog" :before-close="closeEdit">
+ <MaterialEdit v-if="editShow" :hID="currentEditId" :OperationType="OperationType"
+ :HMaterTypeID="currentMaterTypeID" @close="handleEditClose" />
</el-dialog>
- <MaterialCorrection
- :visible.sync="openCorrect"
- @close="closeCorrect"
- />
+ <MaterialCorrection :visible.sync="openCorrect" @close="closeCorrect" />
- <el-dialog
- title="鎵规敼(鏂规2)"
- :visible.sync="openCorrect2"
- width="1480px"
- append-to-body
- :before-close="closeCorrect2"
- >
- <div style="text-align: center; padding: 50px;">
+ <el-dialog title="鎵规敼(鏂规2)" :visible.sync="openCorrect2" width="1480px" append-to-body :before-close="closeCorrect2">
+ <div style="text-align: center; padding: 50px">
<h2>鐗╂枡鎵规敼鍔熻兘(鏂规2)</h2>
<p>鐗╂枡鎵规敼鍔熻兘(鏂规2)寰呭悗缁紑鍙�</p>
<el-button type="primary" @click="closeCorrect2">鍏抽棴</el-button>
</div>
</el-dialog>
- <el-dialog
- :title="upload.title"
- :visible.sync="upload.open"
- width="1500px"
- append-to-body
- >
+ <el-dialog :title="upload.title" :visible.sync="upload.open" width="1500px" append-to-body>
<div style="margin-top: -20px">
<el-button type="primary" size="mini" @click="handleImportSubmit">瀵煎叆鏁版嵁</el-button>
<el-button type="primary" size="mini" @click="upload.open = false">閫� 鍑�</el-button>
- <el-upload
- ref="upload"
- :limit="1"
- accept=".xlsx, .xls"
- style="display: inline-block; margin-left: 10px"
- :action="upload.url + '?updateSupport=' + upload.updateSupport"
- :disabled="upload.isUploading"
- :on-progress="handleFileUploadProgress"
- :on-success="handleFileSuccess"
- >
+ <el-upload ref="upload" :limit="1" accept=".xlsx, .xls" style="display: inline-block; margin-left: 10px"
+ :action="upload.url + '?updateSupport=' + upload.updateSupport" :disabled="upload.isUploading"
+ :on-progress="handleFileUploadProgress" :on-success="handleFileSuccess">
<el-button type="primary" size="mini">鏂囦欢涓婁紶</el-button>
</el-upload>
</div>
- <el-table
- :data="uploadData"
- v-loading="uploadTableLoading"
- border
- height="550"
- >
+ <el-table :data="uploadData" v-loading="uploadTableLoading" border height="550">
<el-table-column type="index" label="搴忓彿" width="55" align="center" />
<el-table-column label="鐗╂枡浠g爜" prop="鐗╂枡浠g爜" align="center" width="120" />
<el-table-column label="鐗╂枡鍚嶇О" prop="鐗╂枡鍚嶇О" align="center" width="120" />
<el-table-column label="鐗╂枡鍒嗙被" prop="鐗╂枡鍒嗙被" align="center" width="120" />
<el-table-column label="鎿嶄綔" align="center">
<template slot-scope="scope">
- <el-button
- size="mini"
- type="text"
- icon="el-icon-delete"
- @click="uploadDataDelete(scope.$index)"
- >鍒犻櫎</el-button
- >
+ <el-button size="mini" type="text" icon="el-icon-delete"
+ @click="uploadDataDelete(scope.$index)">鍒犻櫎</el-button>
</template>
</el-table-column>
</el-table>
@@ -586,55 +307,55 @@
export default {
name: "GyMaterial",
- components: { RowSettings,MaterialEdit,MaterialCorrection },
+ components: { RowSettings, MaterialEdit, MaterialCorrection },
props: {
openPage: { type: String },
},
data() {
return {
- activeCollapse: [],
-
+ activeCollapse: [],
+
HModName: "Gy_Material",
HModuleName: "鐗╂枡鍒楄〃缁存姢",
HClassTag: "ForFilteringSchemes",
treeData: [],
treeProps: {
- children: 'children',
- label: 'title'
+ children: "children",
+ label: "title",
},
currentMaterTypeID: 0,
-
+
fileList: [
{
- type: 'empty',
- url: '',
- name: '鏆傛棤鏂囦欢'
- }
+ type: "empty",
+ url: "",
+ name: "鏆傛棤鏂囦欢",
+ },
],
-
+
// 缂栬緫鐩稿叧
editShow: false,
openEdit: false,
OperationType: null,
editTitle: "缂栬緫鐗╂枡",
currentEditId: 0,
-
+
// 鎵规敼鐩稿叧
openCorrect: false,
openCorrect2: false,
-
+
// 鍒楄缃�
columnSettingShow: false,
openColumnSetting: false,
-
+
// 鍥剧墖棰勮
previewVisible: false,
- previewImage: '',
-
+ previewImage: "",
+
// 琛ㄦ牸鏄剧ず
tableShow: true,
loading: true,
-
+
queryParams: {
HNumber: null,
HName: null,
@@ -642,17 +363,17 @@
HModel: null,
HOrgID: null,
HProject: null,
- ColName: "0",
- ColName1: "0",
- ColName2: "0",
- Comparator: "0",
- Comparator1: "0",
- Comparator2: "0",
+ ColName: "",
+ ColName1: "",
+ ColName2: "",
+ Comparator: "",
+ Comparator1: "",
+ Comparator2: "",
ColContent: "",
ColContent1: "",
ColContent2: "",
},
- organizationOptions: [],
+ organizationOptions: JSON.parse(sessionStorage["organizationList"]),
projectOptions: [],
currentFilterScheme: "",
HInterID_Choose: 0,
@@ -668,9 +389,10 @@
{ label: "鍙冲寘鍚�", value: "9" },
{ label: "涓嶅寘鍚�", value: "10" },
],
-
+
sWhere: "",
selectedRow: null,
+ selRowList: [],
ids: [],
single: true,
multiple: true,
@@ -691,61 +413,54 @@
},
uploadData: [],
uploadTableLoading: false,
-
- baseURL: process.env.VUE_APP_BASE_URL || "http://47.96.97.237/API/",
+
+ baseURL: process.env.VUE_APP_BASE_API,
user: "admin",
};
},
computed: {
visibleColumns() {
- return this.btList.filter(item => !item.hide && item.field);
- }
+ return this.btList.filter((item) => !item.hide && item.field);
+ },
},
created() {
+ this.user = sessionStorage["HUserName"];
+ this.queryParams.HOrgID = sessionStorage["OrganizationID"];
+ },
+ mounted() {
this.fetchData();
},
methods: {
fetchData() {
- axios
- .get(
- "http://47.96.97.237/API/Web/GetUser?UserName=001&PassWord=123456&HOrgName=100038"
- )
- .then((response) => {
- let data = response.data.data[0];
- this.user = data.Czymc;
- this.getOrganizations();
- this.getTreeData();
- this.getProjectOptions();
- this.getList();
- this.getDefaultFilterScheme();
- })
- .catch((error) => {
- this.$modal.msgError("鎺ュ彛璇锋眰澶辫触!");
- });
+ this.getOrganizations();
+ this.getTreeData();
+ this.getProjectOptions();
+ this.handleQuery();
+ //this.getDefaultFilterScheme();
},
-
+
getOrganizations() {
axios
- .get(this.baseURL + "/Web/GetOrganizations")
+ .get(this.$baseUrl + "/Web/GetOrganizations")
.then((response) => {
if (response.data.count == 1) {
this.organizationOptions = response.data.data;
- if (this.organizationOptions.length > 0) {
- this.queryParams.HOrgID = this.organizationOptions[0].ID;
- }
+ // if (this.organizationOptions.length > 0) {
+ // this.queryParams.HOrgID = this.organizationOptions[0].ID;
+ // }
}
})
.catch((error) => {
this.$modal.msgError("鎺ュ彛璇锋眰澶辫触!");
});
},
-
+
getTreeData() {
axios
- .get(this.baseURL + "/Gy_MaterType/Gy_MaterTypeTreeListByLevel",{
- params: {
- HOrgID: '100038'
- }
+ .get(this.$baseUrl + "/Gy_MaterType/Gy_MaterTypeTreeListByLevel", {
+ params: {
+ HOrgID: this.queryParams.HOrgID,
+ },
})
.then((response) => {
if (response.data.count == 1) {
@@ -756,14 +471,13 @@
this.$modal.msgError("鎺ュ彛璇锋眰澶辫触!");
});
},
-
getProjectOptions() {
axios
- .get(this.baseURL + "/Gy_Material/Get_HProject", {
+ .get(this.$baseUrl + "/Gy_Material/Get_HProject", {
params: {
- HOrgID: this.queryParams.HOrgID
- }
+ HOrgID: this.queryParams.HOrgID,
+ },
})
.then((response) => {
if (response.data.count == 1) {
@@ -774,20 +488,21 @@
this.$modal.msgError("鎺ュ彛璇锋眰澶辫触!");
});
},
-
-
+
getList() {
this.tableShow = false;
this.loading = true;
-
+
+ let orgName = this.organizationOptions.find((e) => e.ID == this.queryParams.HOrgID)
+ ?.Name;
axios
- .get(this.baseURL + "/Gy_Material/page", {
+ .get(this.$baseUrl + "/Gy_Material/page", {
params: {
sWhere: this.sWhere,
user: this.user,
page: this.page,
size: this.pageSize,
- Organization: ''
+ Organization: orgName || "",
},
})
.then((response) => {
@@ -807,29 +522,27 @@
this.loading = false;
});
},
-
setDefaultColumns() {
this.btList = [
- { type: 'checkbox', fixed: 'left' },
- { field: 'hmainid', title: '鍗曟嵁ID', hide: true },
- { field: '鐗╂枡浠g爜', title: '鐗╂枡浠g爜', align: 'center', width: 120 },
- { field: '鐗╂枡鍚嶇О', title: '鐗╂枡鍚嶇О', align: 'center', width: 120 },
- { field: '瑙勬牸鍨嬪彿', title: '瑙勬牸鍨嬪彿', align: 'center', width: 120 },
- { field: '鐗╂枡灞炴��', title: '鐗╂枡灞炴��', align: 'center', width: 100 },
- { field: '缁勭粐鍚嶇О', title: '缁勭粐鍚嶇О', align: 'center', width: 120 },
- { field: '椤圭洰鍙�', title: '椤圭洰鍙�', align: 'center', width: 100 },
- { field: '绂佺敤鏍囪', title: '绂佺敤鏍囪', align: 'center', width: 100 },
- { field: '瀹℃牳浜�', title: '瀹℃牳浜�', align: 'center', width: 100 },
- { field: '鍒涘缓浜�', title: '鍒涘缓浜�', align: 'center', width: 100 },
- { field: '鍒涘缓鏃堕棿', title: '鍒涘缓鏃堕棿', align: 'center', width: 150 }
+ { type: "checkbox", fixed: "left" },
+ { field: "hmainid", title: "鍗曟嵁ID", hide: true },
+ { field: "鐗╂枡浠g爜", title: "鐗╂枡浠g爜", align: "center", width: 120 },
+ { field: "鐗╂枡鍚嶇О", title: "鐗╂枡鍚嶇О", align: "center", width: 120 },
+ { field: "瑙勬牸鍨嬪彿", title: "瑙勬牸鍨嬪彿", align: "center", width: 120 },
+ { field: "鐗╂枡灞炴��", title: "鐗╂枡灞炴��", align: "center", width: 100 },
+ { field: "缁勭粐鍚嶇О", title: "缁勭粐鍚嶇О", align: "center", width: 120 },
+ { field: "椤圭洰鍙�", title: "椤圭洰鍙�", align: "center", width: 100 },
+ { field: "绂佺敤鏍囪", title: "绂佺敤鏍囪", align: "center", width: 100 },
+ { field: "瀹℃牳浜�", title: "瀹℃牳浜�", align: "center", width: 100 },
+ { field: "鍒涘缓浜�", title: "鍒涘缓浜�", align: "center", width: 100 },
+ { field: "鍒涘缓鏃堕棿", title: "鍒涘缓鏃堕棿", align: "center", width: 150 },
];
},
-
-
+
handleTreeNodeClick(data) {
this.currentMaterTypeID = data.id;
-
+
if (data.id == "100") {
this.sWhere = " and HMaterTypeID= 0";
} else if (data.id == "0") {
@@ -837,16 +550,13 @@
} else {
this.sWhere = " and HMaterTypeID='" + data.id + "' ";
}
- this.getList();
+ this.handleQuery();
},
-
async handleQuery() {
this.sWhere = "";
-
this.processFilterConditions();
-
if (this.queryParams.HNumber) {
this.sWhere += " and 鐗╂枡浠g爜 like '%" + this.queryParams.HNumber + "%'";
@@ -863,16 +573,33 @@
this.getList();
},
-
+
processFilterConditions() {
const conditions = [
- { colName: this.queryParams.ColName, comparator: this.queryParams.Comparator, content: this.queryParams.ColContent },
- { colName: this.queryParams.ColName1, comparator: this.queryParams.Comparator1, content: this.queryParams.ColContent1 },
- { colName: this.queryParams.ColName2, comparator: this.queryParams.Comparator2, content: this.queryParams.ColContent2 }
+ {
+ colName: this.queryParams.ColName,
+ comparator: this.queryParams.Comparator,
+ content: this.queryParams.ColContent,
+ },
+ {
+ colName: this.queryParams.ColName1,
+ comparator: this.queryParams.Comparator1,
+ content: this.queryParams.ColContent1,
+ },
+ {
+ colName: this.queryParams.ColName2,
+ comparator: this.queryParams.Comparator2,
+ content: this.queryParams.ColContent2,
+ },
];
- conditions.forEach(condition => {
- if (condition.colName && condition.colName !== "0" && condition.comparator && condition.comparator !== "0") {
+ conditions.forEach((condition) => {
+ if (
+ condition.colName &&
+ condition.colName !== "0" &&
+ condition.comparator &&
+ condition.comparator !== "0"
+ ) {
let com = "";
switch (condition.comparator) {
case "7":
@@ -895,7 +622,6 @@
}
});
},
-
resetQuery() {
this.sWhere = "";
@@ -904,7 +630,7 @@
HName: null,
HNumber2: null,
HModel: null,
- HOrgID: this.organizationOptions.length > 0 ? this.organizationOptions[0].ID : null,
+ HOrgID: sessionStorage["OrganizationID"],
HProject: null,
ColName: "0",
ColName1: "0",
@@ -916,27 +642,26 @@
ColContent1: "",
ColContent2: "",
};
- this.getList();
+ this.handleQuery();
},
-
handleResCnz() {
if (!this.queryParams.HNumber2) {
this.$modal.msgWarning("璇疯緭鍏ョ墿鏂欎唬鐮�");
return;
}
-
+
axios
- .get(this.baseURL + "/Gy_Material/Gy_MaterialViewApi", {
+ .get(this.$baseUrl + "/Gy_Material/Gy_MaterialViewApi", {
params: {
Number: this.queryParams.HNumber2,
- Type: 'WL'
- }
+ Type: "WL",
+ },
})
.then((response) => {
if (response.data.count == 1) {
this.$modal.msgSuccess(response.data.Message);
- this.getList();
+ this.handleQuery();
} else {
this.$modal.msgError(response.data.Message);
}
@@ -945,22 +670,21 @@
this.$modal.msgError("鎺ュ彛璇锋眰澶辫触!");
});
},
-
-
+
handleImport() {
this.uploadData = [];
this.upload.isUploading = false;
this.upload.title = "瀵煎叆";
this.upload.open = true;
},
-
+
handleExport() {
axios
- .get(this.baseURL + "/LMES/getReportByModRightNameCheck", {
+ .get(this.$baseUrl + "/LMES/getReportByModRightNameCheck", {
params: {
ModRightNameCheck: "Gy_Material_ExportExcel",
- user: this.user
- }
+ user: this.user,
+ },
})
.then((response) => {
if (response.data.count == 1) {
@@ -976,58 +700,61 @@
this.$modal.msgError("鎺ュ彛璇锋眰澶辫触!");
});
},
-
+
handleNumAdd() {
- if ((this.currentMaterTypeID == 0 || this.currentMaterTypeID == null) && !this.judgeSkipTouchMaterType()) {
- this.$modal.msgWarning("璇烽�夋嫨鍏蜂綋鐗╂枡鍒嗙被锛�");
- return;
- }
- this.OperationType = 4;
- this.currentEditId = 0;
- this.editTitle = "娴佹按鍙锋柊澧炵墿鏂�";
- this.openEdit = true;
- this.editShow = true;
- },
-
- handleAdd() {
- this.OperationType = 1;
- this.currentEditId = 0;
- this.editTitle = "鏂板鐗╂枡";
- this.openEdit = true;
- this.editShow = true;
+ if (
+ (this.currentMaterTypeID == 0 || this.currentMaterTypeID == null) &&
+ !this.judgeSkipTouchMaterType()
+ ) {
+ this.$modal.msgWarning("璇烽�夋嫨鍏蜂綋鐗╂枡鍒嗙被锛�");
+ return;
+ }
+ this.OperationType = 4;
+ this.currentEditId = 0;
+ this.editTitle = "娴佹按鍙锋柊澧炵墿鏂�";
+ this.openEdit = true;
+ this.editShow = true;
},
-
+
+ handleAdd() {
+ this.OperationType = 1;
+ this.currentEditId = 0;
+ this.editTitle = "鏂板鐗╂枡";
+ this.openEdit = true;
+ this.editShow = true;
+ },
+
handleCopy() {
- if (this.single) {
- this.$modal.msgWarning("璇烽�夋嫨涓�鏉℃暟鎹�");
- return;
- }
- this.OperationType = 2;
- this.currentEditId = this.selectedRow.HItemID;
- this.editTitle = "澶嶅埗鐗╂枡";
- this.openEdit = true;
- this.editShow = true;
- },
-
+ if (this.single) {
+ this.$modal.msgWarning("璇烽�夋嫨涓�鏉℃暟鎹�");
+ return;
+ }
+ this.OperationType = 2;
+ this.currentEditId = this.selectedRow.HItemID;
+ this.editTitle = "澶嶅埗鐗╂枡";
+ this.openEdit = true;
+ this.editShow = true;
+ },
+
handleEdit() {
- if (this.single) {
- this.$modal.msgWarning("璇烽�夋嫨涓�鏉℃暟鎹�");
- return;
- }
- this.OperationType = 3;
- this.currentEditId = this.selectedRow.HItemID;
- this.editTitle = "缂栬緫鐗╂枡";
- this.openEdit = true;
- this.editShow = true;
- },
-
+ if (this.single) {
+ this.$modal.msgWarning("璇烽�夋嫨涓�鏉℃暟鎹�");
+ return;
+ }
+ this.OperationType = 3;
+ this.currentEditId = this.selectedRow.HItemID;
+ this.editTitle = "缂栬緫鐗╂枡";
+ this.openEdit = true;
+ this.editShow = true;
+ },
+
handleDelete() {
if (this.single) {
this.$modal.msgWarning("璇烽�夋嫨涓�鏉℃暟鎹�");
return;
}
- if (this.selectedRow.瀹℃牳浜� !== null && this.selectedRow.瀹℃牳浜� !== '') {
+ if (this.selectedRow.瀹℃牳浜� !== null && this.selectedRow.瀹℃牳浜� !== "") {
this.$modal.msgError("宸茶瀹℃牳鐨勭墿鏂欎笉鑳借鍒犻櫎!");
return;
}
@@ -1036,27 +763,29 @@
.confirm("纭瑕佸垹闄ゅ悧锛屽垹闄ゅ悗涓嶈兘鎭㈠")
.then(() => {
axios
- .get(this.baseURL + "/Gy_Material/Delete", {
+ .get(this.$baseUrl + "/Gy_Material/Delete", {
params: {
HItemID: this.selectedRow.HItemID,
- user: this.user
- }
+ user: this.user,
+ },
})
.then((response) => {
if (response.data.count == 1) {
- this.getList();
+ this.handleQuery();
this.$modal.msgSuccess("鍒犻櫎鎴愬姛");
} else {
- this.$modal.msgError("閿欒:" + response.data.code + response.data.Message);
+ this.$modal.msgError(
+ "閿欒:" + response.data.code + response.data.Message
+ );
}
})
.catch((error) => {
this.$modal.msgError("鎺ュ彛璇锋眰澶辫触!");
});
})
- .catch(() => {});
+ .catch(() => { });
},
-
+
handleAudit(isAudit) {
if (this.single) {
this.$modal.msgWarning("璇烽�夋嫨涓�鏉℃暟鎹�");
@@ -1064,16 +793,16 @@
}
axios
- .get(this.baseURL + "/Gy_Material/AuditGy_Material", {
+ .get(this.$baseUrl + "/Gy_Material/AuditGy_Material", {
params: {
HInterID: this.selectedRow.HItemID,
IsAudit: isAudit,
- CurUserName: this.user
- }
+ CurUserName: this.user,
+ },
})
.then((response) => {
if (response.data.count == 1) {
- this.getList();
+ this.handleQuery();
this.$modal.msgSuccess(response.data.Message);
} else {
this.$modal.msgError(response.data.Message);
@@ -1083,23 +812,23 @@
this.$modal.msgError("鎺ュ彛璇锋眰澶辫触!");
});
},
-
+
handleStop(isStop) {
if (this.single) {
this.$modal.msgWarning("璇烽�夋嫨涓�鏉℃暟鎹�");
return;
}
axios
- .get(this.baseURL + "/Gy_Material/StopGy_Material", {
+ .get(this.$baseUrl + "/Gy_Material/StopGy_Material", {
params: {
HInterID: this.selectedRow.HItemID,
IsStop: isStop,
- CurUserName: this.user
- }
+ CurUserName: this.user,
+ },
})
.then((response) => {
if (response.data.count == 1) {
- this.getList();
+ this.handleQuery();
this.$modal.msgSuccess(response.data.Message);
} else {
this.$modal.msgError(response.data.Message);
@@ -1109,89 +838,106 @@
this.$modal.msgError("鎺ュ彛璇锋眰澶辫触!");
});
},
-
+
handleColumnSetting() {
this.columnSettingShow = true;
this.openColumnSetting = true;
},
-
+
handleButtonSetting() {
this.$modal.msgInfo("鎸夐挳璁剧疆鍔熻兘");
},
-
+
handleSaveScheme() {
this.$modal.msgInfo("淇濆瓨鏂规鍔熻兘");
},
-
+
handleReadScheme() {
this.$modal.msgInfo("璇诲彇鏂规鍔熻兘");
},
-
+
handleRefresh() {
- this.getList();
+ // 鍒锋柊鏃舵竻闄よ〃鏍奸�夋嫨骞堕噸缃浉鍏崇姸鎬侊紝淇濊瘉澶嶅埗/缂栬緫/鍒犻櫎/瀹℃牳绛夋寜閽绂佺敤
+ if (this.$refs.tableData && this.$refs.tableData.clearSelection) {
+ this.$refs.tableData.clearSelection();
+ }
+ this.selectedRow = null;
+ this.ids = [];
+ this.single = true;
+ this.multiple = true;
+ this.handleQuery();
},
-
+
handleExit() {
this.$router.go(-1);
},
-
+
handleCorrect() {
this.openCorrect = true;
},
-
+
handleCorrect2() {
this.openCorrect2 = true;
},
-
+
// 鐗╂枡浠g爜鐐瑰嚮
- handleMaterialCodeClick(row) {
- this.selectedRow = row;
- this.OperationType = 3;
- this.currentEditId = row.HItemID;
- this.editTitle = "缂栬緫鐗╂枡";
- this.openEdit = true;
- this.editShow = true;
- },
-
+ handleMaterialCodeClick(row) {
+ this.selectedRow = row;
+ this.OperationType = 3;
+ this.currentEditId = row.HItemID;
+ this.editTitle = "缂栬緫鐗╂枡";
+ this.openEdit = true;
+ this.editShow = true;
+ },
handleRowClick(row, column, event) {
+ if (this.openPage) {
+ if (this.openPage == 'Gy_BarCodeBill') {
+ this.$emit('deptEmit', this.selRowList, 3)
+ }else{
+ this.$emit("deptEmit", row, 3);
+ }
+ }
+ if (this.checkIsIframe()) {
+ // 灏嗗綋鍓嶉�変腑鐨勬暟鎹毚闇插埌window涓�
+ window.selectedRow = row;
+ }
this.$refs.tableData.toggleRowSelection(row);
this.selectedRow = row;
this.getFileList(row.鐗╂枡浠g爜);
},
-
getFileList(HMaterNumber) {
if (!HMaterNumber) return;
-
+
axios
- .get(this.baseURL + "/Cj_StationOutBill/Filelist", {
- params: { HBillNo: HMaterNumber }
+ .get(this.$baseUrl + "/Cj_StationOutBill/Filelist", {
+ params: { HBillNo: HMaterNumber },
})
.then((response) => {
if (response.data.count == 1) {
this.fileList = [];
const data = response.data.data;
-
+
if (data.length === 0) {
this.fileList.push({
- type: 'empty',
- url: '',
- name: '鏆傛棤鏂囦欢'
+ type: "empty",
+ url: "",
+ name: "鏆傛棤鏂囦欢",
});
} else {
- data.forEach(item => {
- if (item.HFileType === '.jpeg' || item.HFileType === '.jpg') {
+ data.forEach((item) => {
+ if (item.HFileType === ".jpeg" || item.HFileType === ".jpg") {
this.fileList.push({
- type: 'image',
+ type: "image",
url: `../../..${item.HFilePath}`,
- name: item.HFileName
+ name: item.HFileName,
});
- } else if (item.HFileType === '.pdf') {
+ } else if (item.HFileType === ".pdf") {
this.fileList.push({
- type: 'pdf',
+ type: "pdf",
url: `../../..${item.HFilePath}`,
- name: item.HFileName
+ name: item.HFileName,
});
}
});
@@ -1202,73 +948,92 @@
this.$modal.msgError("鑾峰彇鏂囦欢鍒楄〃澶辫触!");
});
},
-
+
// 鍥剧墖棰勮
previewImg(url) {
this.previewImage = url;
this.previewVisible = true;
},
-
+
handlePreviewClose() {
this.previewVisible = false;
- this.previewImage = '';
+ this.previewImage = "";
},
-
+
// 琛屾牱寮�
rowStyle({ row, rowIndex }) {
if (this.ids.includes(row.hmainid)) {
- return { background: "#ecf5ff" };
+ return {};
+ // background: "#ecf5ff"
}
},
-
+
// 鍙屽嚮琛�
handleDblclick(row, column, cell, event) {
+ if (this.openPage) {
+ if (this.openPage == 'Gy_BarCodeBill') {
+ let list = []
+ list.push(row)
+ this.$emit("deptEmitDb", list, 3)
+ } else {
+ this.$emit("deptEmitDb", row, 3);
+ }
+ }
+ if (this.checkIsIframe()) {
+ // IFrame 鍙屽嚮 杩斿洖褰撳墠鍙屽嚮鐨勬暟鎹�
+ window.parent.iFrameMaterialCallback(row);
+ return;
+ }
this.handleMaterialCodeClick(row);
},
handleSelectionChange(selection) {
this.ids = selection.map((item) => item.hmainid);
+ this.selRowList = selection
this.single = selection.length != 1;
this.multiple = !selection.length;
if (!this.single) {
this.selectedRow = selection[0];
}
+ if (this.openPage == 'Gy_BarCodeBill') {
+ this.$emit('deptEmit', this.selRowList, 3)
+ }
},
- // 缂栬緫鍏抽棴鍥炶皟
- handleEditClose() {
- this.openEdit = false;
- this.editShow = false;
- this.getList();
- },
+ // 缂栬緫鍏抽棴鍥炶皟
+ handleEditClose() {
+ this.openEdit = false;
+ this.editShow = false;
+ this.handleQuery();
+ },
// 鍏抽棴缂栬緫
closeEdit() {
this.openEdit = false;
this.editShow = false;
},
-
+
// 鍏抽棴鎵规敼
closeCorrect() {
this.openCorrect = false;
},
-
+
// 鍏抽棴鎵规敼鏂规2
closeCorrect2() {
this.openCorrect2 = false;
},
-
+
// 鍒楄缃叧闂�
columnSettingClose(val) {
this.columnSettingShow = false;
this.openColumnSetting = val;
- this.getList();
+ this.handleQuery();
},
-
+
// 瀵煎叆鐩稿叧鏂规硶
handleFileUploadProgress(event, file, fileList) {
this.upload.isUploading = true;
this.uploadTableLoading = true;
},
-
+
handleFileSuccess(response, file, fileList) {
this.upload.isUploading = true;
this.$refs.upload.clearFiles();
@@ -1278,24 +1043,24 @@
} else {
this.$alert(
"<div style='overflow: auto;overflow-x: hidden;max-height: 70vh;padding: 10px 20px 0;'>" +
- response.Message +
- "</div>",
+ response.Message +
+ "</div>",
"瀵煎叆缁撴灉",
{ dangerouslyUseHTMLString: true }
);
}
},
-
+
handleImportSubmit() {
if (this.uploadData.length === 0) {
this.$modal.msgWarning("璇峰厛涓婁紶鏂囦欢");
return;
}
-
+
var sMainSub = JSON.stringify(this.uploadData) + "&鍜�" + this.user;
axios({
method: "post",
- url: this.baseURL + "/Gy_Material/Gy_Material_btnSave",
+ url: this.$baseUrl + "/Gy_Material/Gy_Material_btnSave",
data: {
sMainSub: sMainSub,
},
@@ -1303,42 +1068,51 @@
.then((res) => {
this.$alert(
"<div style='overflow: auto;overflow-x: hidden;max-height: 70vh;padding: 10px 20px 0;'>" +
- res.data.Message +
- "</div>",
+ res.data.Message +
+ "</div>",
"瀵煎叆缁撴灉",
{ dangerouslyUseHTMLString: true }
);
this.upload.open = false;
- this.getList();
+ this.handleQuery();
})
.catch((error) => {
this.$modal.msgError("鎺ュ彛璇锋眰澶辫触!");
});
},
-
+
uploadDataDelete(index) {
this.uploadData.splice(index, 1);
},
-
+
formatDate(dateString) {
- if (!dateString) return '';
+ if (!dateString) return "";
const date = new Date(dateString);
- return date.toLocaleString('zh-CN');
+ return date.toLocaleString("zh-CN");
},
-
+
judgeSkipTouchMaterType() {
- if (this.treeData.length > 0 && this.treeData[0].children &&
- this.treeData[0].children.length == 1 &&
- this.treeData[0].children[0].children.length == 0) {
+ if (
+ this.treeData.length > 0 &&
+ this.treeData[0].children &&
+ this.treeData[0].children.length == 1 &&
+ this.treeData[0].children[0].children.length == 0
+ ) {
return true;
} else {
return false;
}
},
-
+
getDefaultFilterScheme() {
this.currentFilterScheme = "褰撳墠杩囨护鏂规锛氶粯璁ゆ柟妗�";
- }
+ },
+ checkIsIframe() {
+ if (window.self == window.top) {
+ return false;
+ }
+ return true;
+ },
},
};
</script>
@@ -1381,7 +1155,7 @@
width: 100%;
}
-.el-tree-node.is-current > .el-tree-node__content {
+.el-tree-node.is-current>.el-tree-node__content {
background-color: #aef0f7;
}
@@ -1392,4 +1166,4 @@
.filter-collapse {
margin-top: 10px;
}
-</style>
\ No newline at end of file
+</style>
--
Gitblit v1.9.1