Initial commit: 景耀JY1.0项目

This commit is contained in:
Developer
2026-05-21 09:46:02 +08:00
parent 4969870de8
commit fd70670235
90 changed files with 10278 additions and 1508 deletions

View File

@@ -1,10 +1,16 @@
<template>
<div class="app-container">
<el-card style="height: 850px">
<div style="margin-top: 7px; margin-bottom: 7px">
<el-card style="height: 850px; display: flex; flex-direction: column;">
<div style="margin-top: 7px; margin-bottom: 7px; flex-shrink: 0;">
<el-input v-model="materialNameValue" style="width:150px" placeholder="物料名称" size="small" clearable/>
<el-input v-model="materialToolValue" style="width:150px" placeholder="图号/型号" size="small" clearable/>
<el-select v-model="materialTypeValue" style="width:100px;" placeholder="物料类型" size="small" filterable clearable>
<el-select
v-model="materialTypeValue"
style="width:100px;"
placeholder="物料类型"
size="small"
filterable
clearable>
<el-option
v-for="item in materialType"
:key="item.value"
@@ -23,110 +29,221 @@
range-separator=""
start-placeholder="开始日期"
end-placeholder="结束日期"/>
<el-button type="primary" plain icon="el-icon-search" size="small" style="margin-left:10px" @click="pageCurrent=1;searchTable()">查询</el-button>
<el-button type="distribution" icon="el-icon-plus" size="small" style="margin-left:10px" @click="materialPlus">物料</el-button>
<el-button
type="primary"
plain
icon="el-icon-search"
size="small"
style="margin-left:10px"
@click="pageCurrent=1;searchTable()">查询
</el-button>
<!-- <el-button type="distribution" icon="el-icon-plus" size="small" style="margin-left:10px" @click="materialPlus">
物料
</el-button> -->
<el-badge :value="value" :max="99" class="item">
<el-button type="warning" plain size="small" style="margin-left:10px" @click="purchaseChangeRequest">采购变更申请</el-button>
<el-button type="warning" plain size="small" style="margin-left:10px" @click="purchaseChangeRequest">
采购变更申请
</el-button>
</el-badge>
<el-button type="info" icon="el-icon-edit" plain size="small" style="margin-left:10px" @click="maintainMaterial">材料维护</el-button>
<el-button type="success" icon="el-icon-upload2" plain size="small" style="margin-left:10px" @click="handleExcel">批量导入</el-button>
<el-checkbox v-model="checked" style="margin-left: 50px" @change="searchTable()">专机</el-checkbox>
<!-- <el-button
type="info"
icon="el-icon-edit"
plain
size="small"
style="margin-left:10px"
@click="maintainMaterial">材料维护
</el-button> -->
<el-button type="info" icon="el-icon-edit" plain size="small" style="margin-left:10px" @click="updateUnit">
单位维护
</el-button>
<!-- <el-button
type="success"
icon="el-icon-upload2"
plain
size="small"
style="margin-left:10px"
@click="handleExcel">批量导入
</el-button> -->
<el-button
v-show="Number(token)===2"
type="success"
icon="el-icon-download"
plain
size="small"
style="margin-left:10px"
@click="exportTableData">物料导出
</el-button>
</div>
<el-table v-loading="loading" :data="tableData" highlight-current-row border stripe size="small" style="width: 1500px; margin-top: 10px" height="740px" @sort-change="sortChange">
<!--<el-table-column align="center" label="照片" width="80">-->
<!-- <template slot-scope="scope">-->
<!-- <el-popover-->
<!-- v-if="scope.row.文件内容 && scope.row.文件内容 !== 'null'"-->
<!-- placement="top-start"-->
<!-- width="400"-->
<!-- trigger="hover">-->
<!-- <el-button type="text" style="float:right" @click="deletePhoto(scope.row)">删除</el-button>-->
<!-- <el-image :src="scope.row.文件内容 && scope.row.文件内容 !== 'null' ? ('data:image/png;base64,' + scope.row.文件内容) : ''">-->
<!-- <div slot="error" class="image-slot">-->
<!-- <i class="el-icon-picture-outline"/>-->
<!-- </div>-->
<!-- </el-image>-->
<!-- <el-image slot="reference" :src="scope.row.文件内容 && scope.row.文件内容 !== 'null' ? ('data:image/png;base64,' + scope.row.文件内容) : ''" style="width:43px;margin-top: 7px">-->
<!-- <div slot="error" class="image-slot">-->
<!-- <i class="el-icon-picture-outline"/>-->
<!-- </div>-->
<!-- </el-image>-->
<!-- </el-popover>-->
<!-- <span v-else></span>-->
<!-- </template>-->
<!--</el-table-column>-->
<el-table-column width="150px" label="物料编码" align="center" prop="物料编码" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.物料编码 }}
</template>
</el-table-column>
<el-table-column width="170px" label="物料名称" align="center" sortable="名称" prop="名称" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.名称 }}
</template>
</el-table-column>
<el-table-column width="80px" label="物料类型" align="center" prop="物料类型" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.物料类型 }}
</template>
</el-table-column>
<el-table-column width="180px" label="图号/型号" align="center" sortable="代号" prop="代号" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.代号 }}
</template>
</el-table-column>
<el-table-column width="80px" label="库位" align="center" prop="库位" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.库位 }}
</template>
</el-table-column>
<el-table-column :width="setColumnWidth('材料')" label="材料" align="center" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.材料 }}
</template>
</el-table-column>
<el-table-column :width="setColumnWidth('单位')" label="单位" align="center" prop="单位" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.单位 }}
</template>
</el-table-column>
<el-table-column :width="setColumnWidth('类型')" label="类型" align="center" prop="类型" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.类型名称 }}
</template>
</el-table-column>
<el-table-column width="170px" label="物料说明" align="center">
<template slot-scope="scope">
{{ scope.row.物料说明 }}
</template>
</el-table-column>
<el-table-column :width="setColumnWidth('日期时间')" label="最近修改" align="center" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.修改日期 }}
</template>
</el-table-column>
<el-table-column :width="setColumnWidth('姓名')" label="修改人" align="center" prop="修改人" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.修改人 }}
</template>
</el-table-column>
<el-table-column label="操作" align="center">
<template slot-scope="scope">
<el-button type="text" icon="el-icon-edit" size="mini" style="margin-right: 10px" @click="handleEdit(scope.row)"/>
<el-button type="text" icon="el-icon-delete" size="mini" style="margin-right: 10px" @click="handleDelete(scope.row)"/>
<el-tooltip :open-delay="700" effect="dark" content="上传照片" placement="top">
<el-button :disabled="scope.row.文件内容 && scope.row.文件内容 !== 'null'" type="text" style="margin-right: 10px" icon="el-icon-upload" size="mini" @click="handlePicture(scope.row)"/>
</el-tooltip>
<el-tooltip :open-delay="700" effect="dark" content="查看照片" placement="top">
<el-button :disabled="scope.row.图片数量 == 0" type="text" icon="el-icon-picture-outline-round" size="mini" @click="getImageList(scope.row)"/>
</el-tooltip>
<el-tooltip :open-delay="700" effect="dark" content="查看图纸" placement="top">
<el-button :disabled="scope.row.文件数量 == 0" type="text" icon="el-icon-picture-outline" size="mini" @click="getNum(scope.row)"/>
</el-tooltip>
</template>
</el-table-column>
</el-table>
<div class="block" style="margin-top: 10px;">
<div style="flex: 1;">
<el-table
v-loading="loading"
:data="tableData"
:max-height="750"
highlight-current-row
border
stripe
size="small"
style="width: 1650px; margin-top: 10px; overflow-x: auto; display: block"
@sort-change="sortChange">
<!--<el-table-column align="center" label="照片" width="80">-->
<!-- <template slot-scope="scope">-->
<!-- <el-popover-->
<!-- v-if="scope.row.文件内容 && scope.row.文件内容 !== 'null'"-->
<!-- placement="top-start"-->
<!-- width="400"-->
<!-- trigger="hover">-->
<!-- <el-button type="text" style="float:right" @click="deletePhoto(scope.row)">删除</el-button>-->
<!-- <el-image :src="scope.row.文件内容 && scope.row.文件内容 !== 'null' ? ('data:image/png;base64,' + scope.row.文件内容) : ''">-->
<!-- <div slot="error" class="image-slot">-->
<!-- <i class="el-icon-picture-outline"/>-->
<!-- </div>-->
<!-- </el-image>-->
<!-- <el-image slot="reference" :src="scope.row.文件内容 && scope.row.文件内容 !== 'null' ? ('data:image/png;base64,' + scope.row.文件内容) : ''" style="width:43px;margin-top: 7px">-->
<!-- <div slot="error" class="image-slot">-->
<!-- <i class="el-icon-picture-outline"/>-->
<!-- </div>-->
<!-- </el-image>-->
<!-- </el-popover>-->
<!-- <span v-else></span>-->
<!-- </template>-->
<!--</el-table-column>-->
<el-table-column width="150px" label="物料编码" align="center" prop="物料编码" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.物料编码 }}
</template>
</el-table-column>
<el-table-column
width="170px"
label="物料名称"
align="center"
sortable="名称"
prop="名称"
show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.名称 }}
</template>
</el-table-column>
<el-table-column
width="180px"
label="图号/型号"
align="center"
sortable="代号"
prop="代号"
show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.代号 }}
</template>
</el-table-column>
<el-table-column width="80px" label="规格" align="center" prop="规格" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.规格 }}
</template>
</el-table-column>
<el-table-column :width="setColumnWidth('材料')" label="材料" align="center" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.材料 }}
</template>
</el-table-column>
<el-table-column :width="setColumnWidth('单位')" label="单位" align="center" prop="单位" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.单位 }}
</template>
</el-table-column>
<el-table-column :width="setColumnWidth('类型')" label="类型" align="center" prop="类型" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.类型名称 }}
</template>
</el-table-column>
<el-table-column width="80px" label="物料类型" align="center" prop="物料类型" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.物料类型 }}
</template>
</el-table-column>
<el-table-column width="80px" label="库位" align="center" prop="库位" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.库位 }}
</template>
</el-table-column>
<el-table-column width="170px" label="物料说明" align="center">
<template slot-scope="scope">
{{ scope.row.物料说明 }}
</template>
</el-table-column>
<el-table-column width="150px" label="曾用物料编码" align="center" prop="物料编码" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.曾用物料编码 }}
</template>
</el-table-column>
<el-table-column :width="setColumnWidth('日期时间')" label="最近修改" align="center" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.修改日期 }}
</template>
</el-table-column>
<el-table-column
:width="setColumnWidth('姓名')"
label="修改人"
align="center"
prop="修改人"
show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.修改人 }}
</template>
</el-table-column>
<el-table-column :width="setColumnWidth('日期时间')" label="创建时间" align="center" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.操作日期 && scope.row.操作日期.split(' ')[0] || '' }}
</template>
</el-table-column>
<el-table-column :width="setColumnWidth('姓名')" label="创建人" align="center" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.Expr1 }}
</template>
</el-table-column>
<el-table-column label="操作" align="center" fixed="right" width="200px">
<template slot-scope="scope">
<el-button
type="text"
icon="el-icon-edit"
size="mini"
style="margin-right: 10px"
@click="handleEdit(scope.row)"/>
<el-button
type="text"
icon="el-icon-delete"
size="mini"
style="margin-right: 10px"
@click="handleDelete(scope.row)"/>
<el-tooltip :open-delay="700" effect="dark" content="上传照片" placement="top">
<el-button
:disabled="scope.row.文件内容 && scope.row.文件内容 !== 'null'"
type="text"
style="margin-right: 10px"
icon="el-icon-upload"
size="mini"
@click="handlePicture(scope.row)"/>
</el-tooltip>
<el-tooltip :open-delay="700" effect="dark" content="查看照片" placement="top">
<el-button
:disabled="scope.row.图片数量 == 0"
type="text"
icon="el-icon-picture-outline-round"
size="mini"
@click="getImageList(scope.row)"/>
</el-tooltip>
<el-tooltip :open-delay="700" effect="dark" content="查看图纸" placement="top">
<el-button
:disabled="scope.row.文件数量 == 0"
type="text"
icon="el-icon-picture-outline"
size="mini"
@click="getNum(scope.row)"/>
</el-tooltip>
</template>
</el-table-column>
</el-table>
</div>
<div class="block" style="margin-top: 10px; flex-shrink: 0;">
<el-pagination
:current-page="pageCurrent"
:page-sizes="[10, 20, 30, 40, 100]"
@@ -137,7 +254,13 @@
@current-change="handleCurrentChanges"/>
</div>
<el-dialog v-el-drag-dialog :visible.sync="dialogFormVisible" :title="title" center width="440px">
<el-form ref="form" :model="form" :rules="rules" label-position="center" label-width="100px" class="demo-ruleForm">
<el-form
ref="form"
:model="form"
:rules="rules"
label-position="center"
label-width="100px"
class="demo-ruleForm">
<el-form-item label="物料名称" prop="物料名称">
<el-input v-model="form.物料名称" style="width:250px;" placeholder="物料名称" size="small" clearable/>
</el-form-item>
@@ -181,7 +304,13 @@
</el-select>
</el-form-item>
<el-form-item label="物料库" prop="物料库">
<el-select v-model="form.物料库" style="width:250px;" placeholder="物料库" size="small" filterable clearable>
<el-select
v-model="form.物料库"
style="width:250px;"
placeholder="物料库"
size="small"
filterable
clearable>
<el-option
v-for="item in checkeds"
:key="item.value"
@@ -195,12 +324,31 @@
</el-form>
<div slot="footer" class="dialog-footer">
<el-button size="small" style="width: 76px" @click="callOff('form')">取消</el-button>
<el-button v-show="title==='新增物料'" type="distribution" size="small" style="width: 76px" @click="submitOrder('form')">确定</el-button>
<el-button v-show="title==='编辑物料'" type="distribution" size="small" style="width: 76px" @click="submitUpdate('form')">确定</el-button>
<el-button
v-show="title==='新增物料'"
type="distribution"
size="small"
style="width: 76px"
@click="submitOrder('form')">确定
</el-button>
<el-button
v-show="title==='编辑物料'"
type="distribution"
size="small"
style="width: 76px"
@click="submitUpdate('form')">确定
</el-button>
</div>
</el-dialog>
<el-dialog v-el-drag-dialog :visible.sync="dialogFormVisible1" width="1283px">
<el-table :data="tableData1" highlight-current-row border stripe size="small" style="width: 1241px; margin-top: 10px" height="540px">
<el-table
:data="tableData1"
highlight-current-row
border
stripe
size="small"
style="width: 1241px; margin-top: 10px"
height="540px">
<el-table-column :width="setColumnWidth('序号')" label="序号" type="index" align="center"/>
<el-table-column :width="setColumnWidth('订单编号')" label="订单编号" align="center" show-overflow-tooltip>
<template slot-scope="scope">
@@ -248,21 +396,44 @@
size="mini"
type="text"
icon="el-icon-circle-check"
@click="agree(scope.row)">同意</el-button>
@click="agree(scope.row)">同意
</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-circle-close"
@click="disagree(scope.row)">不同意</el-button>
@click="disagree(scope.row)">不同意
</el-button>
</template>
</el-table-column>
</el-table>
</el-dialog>
<el-dialog v-el-drag-dialog :visible.sync="dialogFormVisible2" width="405px">
<el-input v-model="material" style="width:150px;margin-left: 10px" placeholder="材料名称" size="small" clearable/>
<el-button type="primary" plain icon="el-icon-search" size="small" style="margin-left:15px" @click="pageCurrent1=1;searchTable2()">查询</el-button>
<el-button type="distribution" icon="el-icon-plus" size="small" style="margin-left:15px" @click="addMaterial">材料</el-button>
<el-table :data="tableData2" highlight-current-row border stripe size="small" style="width: 341px; margin-top: 10px;margin-left: 10px" height="402px">
<el-input
v-model="material"
style="width:150px;margin-left: 10px"
placeholder="材料名称"
size="small"
clearable/>
<el-button
type="primary"
plain
icon="el-icon-search"
size="small"
style="margin-left:15px"
@click="pageCurrent1=1;searchTable2()">查询
</el-button>
<el-button type="distribution" icon="el-icon-plus" size="small" style="margin-left:15px" @click="addMaterial">
材料
</el-button>
<el-table
:data="tableData2"
highlight-current-row
border
stripe
size="small"
style="width: 341px; margin-top: 10px;margin-left: 10px"
height="402px">
<el-table-column :width="setColumnWidth('序号')" label="序号" type="index" align="center"/>
<el-table-column label="材料名称" align="center" show-overflow-tooltip>
<template slot-scope="scope">
@@ -296,19 +467,68 @@
@current-change="handleCurrentChanges1"/>
</div>
</el-dialog>
<el-dialog v-el-drag-dialog :visible.sync="dialogVisible3" width="405px">
<el-button
type="warning"
plain
icon="el-icon-circle-plus-outline"
size="small"
style="margin-left:15px"
@click="addUnit()">添加
</el-button>
<el-table
:data="unit"
highlight-current-row
border
stripe
size="small"
style="width: 341px; margin-top: 10px;margin-left: 10px"
height="402px">
<el-table-column label="序号" type="index" align="center"/>
<el-table-column label="单位" align="center" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.label }}
</template>
</el-table-column>
<el-table-column width="100px" label="操作" align="center">
<template slot-scope="scope">
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="deleteUnit(scope.row)"/>
</template>
</el-table-column>
</el-table>
</el-dialog>
<el-dialog v-el-drag-dialog :visible.sync="dialogFormVisible3" :title="title1" center width="360px">
<el-form ref="form1" :model="form1" :rules="rules1" label-position="center" label-width="100px" class="demo-ruleForm">
<el-form
ref="form1"
:model="form1"
:rules="rules1"
label-position="center"
label-width="100px"
class="demo-ruleForm">
<el-form-item label="材料名称" prop="材料名称">
<el-input v-model="form1.材料名称" style="width:150px;" placeholder="材料名称" size="small" clearable/>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button size="small" @click="callOff1('form')">取消</el-button>
<el-button v-show="title1==='新增材料'" type="distribution" size="small" @click="submitAdd('form1')">确定</el-button>
<el-button v-show="title1==='编辑材料'" type="distribution" size="small" @click="submitUpdate1('form1')">确定</el-button>
<el-button v-show="title1==='新增材料'" type="distribution" size="small" @click="submitAdd('form1')">确定
</el-button>
<el-button v-show="title1==='编辑材料'" type="distribution" size="small" @click="submitUpdate1('form1')">
确定
</el-button>
</div>
</el-dialog>
<el-dialog v-el-drag-dialog :visible.sync="dialogFormVisiblePicture" title="上传图片" center style="height: 1000px" width="17%">
<el-dialog
v-el-drag-dialog
:visible.sync="dialogFormVisiblePicture"
title="上传图片"
center
style="height: 1000px"
width="17%">
<el-upload
id="invoiceScan"
ref="upload"
@@ -329,16 +549,24 @@
<el-button type="primary" style="width: 70px" @click="submitPicture()">确定</el-button>
</div>
</el-dialog>
<el-dialog v-el-drag-dialog :visible.sync="dialogFormVisibleExcel" title="批量导入" center style="height: 800px" width="40%">
<!-- <el-dialog
v-el-drag-dialog
:visible.sync="dialogFormVisibleExcel"
title="批量导入"
center
style="height: 800px"
width="40%">
<upload-excel-component style="margin-left: 8%" @on-selected-file="selected"/>
<div style="margin-left: 38%">
<span v-show="worksheet.length > 1" style="cursor: pointer;width: 50px;" @click="removeAll"><i class="el-icon-close"/></span>
<span v-show="worksheet.length > 1" style="cursor: pointer;width: 50px;" @click="removeAll"><i
class="el-icon-close"/></span>
<el-upload :on-remove="handleRemove" :file-list="itemFile" style="width: 220px" action=""/>
</div>
<div v-if="worksheet.length !== 0" style="margin: 3px 0 0 40%">
<el-button icon="el-icon-upload2" type="primary" size="small" @click="basicPartsToSQL">导入到数据库</el-button>
</div>
<!--<el-button :disabled="disabled" icon="el-icon-upload" type="success" style="margin-left: 78%" plain size="small" @click="transferData">上传</el-button>
<el-button icon="el-icon-upload2" type="primary" size="small" @click="basicPartsToSQL">导入到数据库
</el-button>
</div> -->
<!--<el-button :disabled="disabled" icon="el-icon-upload" type="success" style="margin-left: 78%" plain size="small" @click="transferData">上传</el-button>
<el-button icon="el-icon-delete" type="danger" plain size="small" @click="allDelete">全部删除</el-button>
<el-table v-loading="loading3" :data="tableData3" highlight-current-row border stripe size="small" style="width: 900px; margin-top: 10px" height="720px">
<el-table-column width="60px" label="序号" align="center" type="index"/>
@@ -393,32 +621,50 @@
@size-change="handleSizeChanges"
@current-change="handleCurrentChanges"/>
</div>-->
</el-dialog>
<!-- </el-dialog> -->
<el-dialog v-el-drag-dialog :visible.sync="dialogVisible" width="350px">
<div v-for="(file, key) in hadFile" :key="key">
<div class="wrapper">
<div class="content">
<div v-if="file.suffix==='pdf'" class="icon"><svg-icon icon-class="pdf" /></div>
<div v-else-if="file.suffix==='docx'||file.suffix === 'doc'" class="icon"><svg-icon icon-class="doc" /></div>
<div v-else-if="file.suffix==='xlsx' || file.suffix === 'xls'" class="icon"><svg-icon icon-class="excel" /></div>
<div v-else-if="file.suffix==='pptx' || file.suffix === 'ppt'" class="icon"><svg-icon icon-class="ppt" /></div>
<div v-else-if="file.suffix==='jpg' || file.suffix === 'jpeg'|| file.suffix === 'png'" class="icon"><svg-icon icon-class="pic" /></div>
<div v-else class="icon"><svg-icon icon-class="file" /></div>
<a id="appUrl" :href="file.url" target="view_window"><div class="info">{{ file.name }}</div></a>
<div v-if="file.suffix==='pdf'" class="icon">
<svg-icon icon-class="pdf"/>
</div>
<div v-else-if="file.suffix==='docx'||file.suffix === 'doc'" class="icon">
<svg-icon icon-class="doc"/>
</div>
<div v-else-if="file.suffix==='xlsx' || file.suffix === 'xls'" class="icon">
<svg-icon icon-class="excel"/>
</div>
<div v-else-if="file.suffix==='pptx' || file.suffix === 'ppt'" class="icon">
<svg-icon icon-class="ppt"/>
</div>
<div v-else-if="file.suffix==='jpg' || file.suffix === 'jpeg'|| file.suffix === 'png'" class="icon">
<svg-icon icon-class="pic"/>
</div>
<div v-else class="icon">
<svg-icon icon-class="file"/>
</div>
<a id="appUrl" :href="file.url" target="view_window">
<div class="info">{{ file.name }}</div>
</a>
</div>
</div>
</div>
</el-dialog>
<el-dialog v-el-drag-dialog :visible.sync="dialogVisible2" title="查看图片">
<div style="height: 400px;overflow: auto">
<div v-for="(item, key) in imageList" :key="key" >
<div v-for="(item, key) in imageList" :key="key">
<el-popover
v-if="item.文件内容 && item.文件内容 !== 'null'"
placement="top-start"
width="50"
trigger="hover">
<el-button type="text" style="float:left" @click="deletePhoto(item)">删除</el-button>
<el-image slot="reference" :preview-src-list="imageUrlList" :src="item.文件内容 && item.文件内容 !== 'null' ? ('data:image/png;base64,' + item.文件内容) : ''" style="margin: 5px auto">
<el-image
slot="reference"
:preview-src-list="imageUrlList"
:src="item.文件内容 && item.文件内容 !== 'null' ? ('data:image/png;base64,' + item.文件内容) : ''"
style="margin: 5px auto">
<div slot="error" class="image-slot">
<i class="el-icon-picture-outline"/>
</div>
@@ -456,6 +702,7 @@ export default {
dialogFormVisiblePicture: false,
dialogVisible: false,
dialogVisible2: false,
dialogVisible3: false,
imageList: [],
imageUrlList: [],
hadFile: [],
@@ -602,6 +849,42 @@ export default {
})
}
},
exportTableData() {
if (this.tableData.length !== 0) {
let materialToolValue_check, materialNameValue_check, materialTypeValue_check, dateRange_check, checked_check
this.materialToolValue ? materialToolValue_check = 1 : materialToolValue_check = 0
this.materialNameValue ? materialNameValue_check = 1 : materialNameValue_check = 0
this.materialTypeValue ? materialTypeValue_check = 1 : materialTypeValue_check = 0
this.checked ? checked_check = 1 : checked_check = 0
this.dateRange ? dateRange_check = 1 : (dateRange_check = 0, this.dateRange = '')
if (this.checked === false) {
this.checkedsValue = '1'
checked_check = '1'
} else {
this.checkedsValue = '2'
}
var param = []
param[0] = ['物料名称_check', materialNameValue_check]
param[1] = ['物料名称', this.materialNameValue]
param[2] = ['时间_check', dateRange_check]
param[3] = ['开始时间', this.dateRange[0]]
param[4] = ['结束时间', this.dateRange[1]]
param[5] = ['图号_check', materialToolValue_check]
param[6] = ['图号', this.materialToolValue]
param[7] = ['类型_check', materialTypeValue_check]
param[8] = ['类型', this.materialTypeValue]
param[9] = ['排序名称', this.orderName]
param[10] = ['排序方式', this.order]
param[11] = ['PageCurrent', this.pageCurrent]
param[12] = ['PageSize', 9999999]
param[13] = ['PageCount', '1111', 'int', '1']
param[14] = ['ItemCount', '1111', 'int', '1']
var Data = this.CreateData('2001', '物料管理_查询数据_分页', param)
this.exportExcel_NPOI(Data)
} else {
this.$message.warning('暂无数据')
}
},
handleExcel() {
this.dialogFormVisibleExcel = true
},
@@ -678,6 +961,7 @@ export default {
var param = []
param[0] = ['名称', name]
param[1] = ['代号', drawingNum]
param[2] = ['类型', type]
var Data = this.CreateData('11', '物料标准维护_验证图号', param)
this.ExecDatabase(Data).then(response => {
if (Number(response.data[0].Column1) === 0) {
@@ -795,6 +1079,7 @@ export default {
var param = []
var Data = this.CreateData('11', '单位_查询数据', param)
this.ExecDatabase(Data).then(response => {
this.unit = []
for (let i = 0; i < response.data.length; i++) {
this.unit.push({
label: response.data[i].单位,
@@ -803,6 +1088,51 @@ export default {
}
})
},
updateUnit() {
this.getUnit()
this.dialogVisible3 = true
},
deleteUnit(row) {
// 提示是否删除此单位
this.$confirm('此操作将永久删除该单位, 是否继续?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
var param = []
param[0] = ['单位', row.label]
var Data = this.CreateData('12', '单位_删除数据', param)
this.ExecDatabase(Data).then(response => {
if (response.data[0].result == 1) {
this.$message({
type: 'success',
message: '删除成功'
})
this.getUnit()
}
})
})
},
addUnit() {
// 弹出输入框 输入单位
this.$prompt('请输入单位', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消'
}).then(({ value }) => {
var param = []
param[0] = ['单位', value]
var Data = this.CreateData('12', '单位_增加数据', param)
this.ExecDatabase(Data).then(response => {
if (response.data[0].result == 1) {
this.$message({
type: 'success',
message: '添加成功'
})
this.getUnit()
}
})
})
},
materialPlus() {
this.title = '新增物料'
if (this.$refs['form'] !== undefined) {
@@ -826,6 +1156,7 @@ export default {
var param = []
param[0] = ['名称', this.form.物料名称]
param[1] = ['代号', this.form.图号或型号]
param[2] = ['类型', this.form.类型]
var Data = this.CreateData('11', '物料标准维护_验证图号', param)
this.ExecDatabase(Data).then(response => {
if (Number(response.data[0].Column1) === 0) {
@@ -961,6 +1292,7 @@ export default {
var param = []
param[0] = ['名称', this.form.物料名称]
param[1] = ['代号', this.form.图号或型号]
param[2] = ['类型', this.form.类型]
var Data = this.CreateData('11', '物料标准维护_验证图号', param)
this.ExecDatabase(Data).then(response => {
if (Number(response.data[0].Column1) === 0) {
@@ -1072,8 +1404,6 @@ export default {
param[12] = ['PageSize', this.pageSize]
param[13] = ['PageCount', '1111', 'int', '1']
param[14] = ['ItemCount', '1111', 'int', '1']
param[15] = ['物料库', this.checkedsValue]
param[16] = ['物料库_check', checked_check]
var Data = this.CreateData('11', '物料管理_查询数据_分页', param)
this.ExecDatabase(Data).then(response => {
this.tableData = response.data.result
@@ -1090,7 +1420,9 @@ export default {
}
if (column.order === 'ascending') {
this.order = 1
} else if (column.order === 'descending') { this.order = 2 } else {
} else if (column.order === 'descending') {
this.order = 2
} else {
this.order = ''
}
this.searchTable()
@@ -1112,6 +1444,7 @@ export default {
this.total1 = response.data.total
})
},
addMaterial() {
this.title1 = '新增材料'
if (this.$refs['form1'] !== undefined) {
@@ -1226,59 +1559,66 @@ export default {
</script>
<style scoped>
.wrapper{
width: 90%;
height: 50px;
overflow: hidden;
border: 1px solid #b8c7d9;
/*float: left;*/
margin: 10px;
}
.content{
position: relative;
padding: 8px 8px 0 8px;
}
.action{
position: absolute;
top: 2px;
right: 8px;
}
.delete{
padding: 0 5px;
border-radius: 3px;
color: #0f84b0;
font-size: 12px;
}
.delete:hover{
background: -webkit-linear-gradient(top,#0ba9e3,#0099d3);
color: #fff;
}
a{
text-decoration: none;
}
.icon{
width: 30px;
height: 30px;
display: inline-block;
margin-right: 7px;
margin-top: 2px;
font-size: 26px;
}
.info{
width: 160px;
height: 50px;
position: absolute;
left: 44px;
line-height: 30px;
display: inline-block;
color: #999;
}
.wrapper {
width: 90%;
height: 50px;
overflow: hidden;
border: 1px solid #b8c7d9;
/*float: left;*/
margin: 10px;
}
.el-form-item{
margin-bottom: 12px;
}
.content {
position: relative;
padding: 8px 8px 0 8px;
}
.el-pagination .btn-next, .el-pagination .btn-prev{
background-color: rgba(255,255,255,.0);
}
.action {
position: absolute;
top: 2px;
right: 8px;
}
.delete {
padding: 0 5px;
border-radius: 3px;
color: #0f84b0;
font-size: 12px;
}
.delete:hover {
background: -webkit-linear-gradient(top, #0ba9e3, #0099d3);
color: #fff;
}
a {
text-decoration: none;
}
.icon {
width: 30px;
height: 30px;
display: inline-block;
margin-right: 7px;
margin-top: 2px;
font-size: 26px;
}
.info {
width: 160px;
height: 50px;
position: absolute;
left: 44px;
line-height: 30px;
display: inline-block;
color: #999;
}
.el-form-item {
margin-bottom: 12px;
}
.el-pagination .btn-next, .el-pagination .btn-prev {
background-color: rgba(255, 255, 255, .0);
}
</style>