123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289 |
- <!DOCTYPE html>
- <html lang="en">
- <head>
- <meta name="renderer" content="webkit">
- <meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1">
- <meta http-equiv="Content-Type" content="text/html;charset=utf-8">
- <meta http-equiv="pragma" content="no-cache">
- <meta http-equiv="Cache" content="no-cache">
- <meta http-equiv="cache-control" content="no-cache, must-revalidate">
- <meta http-equiv="expires" content="0">
- <meta name="viewport"
- content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
- <title>备件列表</title>
- <link rel="stylesheet" href="../css/index.css">
- <link rel="stylesheet" href="../css/style.css">
- <link rel="stylesheet" href="../css/iconfont.css">
- <link rel="stylesheet" href="../css/tablema.css">
- <script src="../js/vue.min.js"></script>
- <script src="../js/index.js"></script>
- <script src="../js/jquery.min.js"></script>
- <script src="../js/echarts.min.js"></script>
- <script type="text/javascript">
- document.write('<script src="../assets/init.js?id=' + (new Date().getTime()) +
- '" type="text/javascript" charset="utf-8"><\/script>');
- document.write('<script src="../assets/ajax.js?id=' + (new Date().getTime()) +
- '" type="text/javascript" charset="utf-8"><\/script>');
- </script>
- <script>
- checkLogin();
- </script>
- <style type="text/css">
- .spaclForm .el-form-item__label {
- color: #fff;
- }
- .el-tree--highlight-current .el-tree-node.is-current>.el-tree-node__content{
- color: #409EFF;
- background-color: transparent;
- }
- .el-input-number__decrease, .el-input-number__increase{
- height: 34px;
- top: 2px;
- }
- .el-drawer__body .el-table tr,.el-drawer__body .el-table td,.el-drawer__body .el-table {
- color: #606266;
- background-color: #fff !important;
- }
- </style>
- </head>
- <body>
- <div id="app" v-cloak class="padding-lr-xs padding-tb-sm">
- <el-row :gutter="10">
- <el-col :span="12" :xs="24">
- <el-form :model="queryParams" class="spaclForm" ref="queryRef" :inline="true" label-width="90px">
- <el-form-item label="备件名称:" prop="sparePartName" class="cerName">
- <el-input v-model="queryParams.sparePartName" placeholder="请输入备件名称" clearable
- @keyup.enter="handleQuery" />
- </el-form-item>
- <el-form-item>
- <el-button type="primary" size="small" icon="el-icon-search" @click="handleQuery">搜索
- </el-button>
- <el-button icon="el-icon-refresh" size="small" @click="resetQuery">重置</el-button>
- </el-form-item>
- </el-form>
- </el-col>
- <el-col :span="12" :xs="24" class="text-right">
- <el-button type="success" size="small" plain icon="el-icon-plus" @click="handleAdd">新增</el-button>
- <!-- <el-button type="warning" size="small" plain icon="el-icon-download">导出</el-button> -->
- <el-badge :value="storageOutTotal" :hidden="storageOutTotal == 0" class="margin-right">
- <el-button type="warning" size="small" plain icon="el-icon-document-remove" @click="handleStorageOrder(20)">出库列表</el-button>
- </el-badge>
- <el-badge :value="storageInTotal" :hidden="storageInTotal == 0">
- <el-button type="warning" size="small" plain icon="el-icon-document-add" @click="handleStorageOrder(10)">入库列表</el-button>
- </el-badge>
- </el-col>
- </el-row>
- <el-table :data="storageList" :header-cell-style="{ color: 'var(--white)',background: '#082041' }">
- <el-table-column type="expand" width="30">
- <template slot-scope="scope">
- <div class="padding text-white">
- <el-descriptions :column="3">
- <el-descriptions-item label="编号" :label-style="{color:'#fff'}" :content-style="{color:'#ddd'}">
- {{ scope.row.sparePartNumber }}
- </el-descriptions-item>
- <el-descriptions-item label="备件名称" :label-style="{color:'#fff'}" :content-style="{color:'#ddd'}">
- {{scope.row.sparePartName}}
- </el-descriptions-item>
- <el-descriptions-item label="备件规格" :label-style="{color:'#fff'}" :content-style="{color:'#ddd'}">
- {{ scope.row.sparePartSpecifications }}
- </el-descriptions-item>
- <el-descriptions-item label="图片" :label-style="{color:'#fff'}" :content-style="{color:'#ddd'}">
- <el-image
- style="width: 50px; height: 50px"
- :preview-src-list="scope.row.filePath | getImgList"
- :src="imgUrl + scope.row.filePath" >
- </el-image>
- </el-descriptions-item>
- <el-descriptions-item label="备件品牌" :label-style="{color:'#fff'}" :content-style="{color:'#ddd'}">
- {{ scope.row.sparePartBrand }}
- </el-descriptions-item>
- <el-descriptions-item label="存放位置" :label-style="{color:'#fff'}" :content-style="{color:'#ddd'}">
- {{ scope.row.sparePartStorageLocation }}
- </el-descriptions-item>
- <el-descriptions-item label="备件类型" :label-style="{color:'#fff'}" :content-style="{color:'#ddd'}">
- <my-texttag :options="stockTypeList" column="value" label="label"
- :value="scope.row.sparePartStockType" text></my-texttag>
- </el-descriptions-item>
- <el-descriptions-item label="备件单价" :label-style="{color:'#fff'}" :content-style="{color:'#ddd'}">
- {{ scope.row.sparePartUnitPrice }}
- </el-descriptions-item>
- <el-descriptions-item label="库存总量" :label-style="{color:'#fff'}" :content-style="{color:'#ddd'}">
- {{ scope.row.sparePartQuantity }}
- </el-descriptions-item>
- <el-descriptions-item label="单位" :label-style="{color:'#fff'}" :content-style="{color:'#ddd'}">
- {{ scope.row.sparePartUnit }}
- </el-descriptions-item>
- <el-descriptions-item label="备注" :label-style="{color:'#fff'}" :content-style="{color:'#ddd'}">
- {{ scope.row.remark }}
- </el-descriptions-item>
- </el-descriptions>
- </div>
- </template>
- </el-table-column>
- <el-table-column label="序号" align="center" type="index" width="50"></el-table-column>
- <el-table-column label="编号" align="center" prop="sparePartNumber" show-overflow-tooltip></el-table-column>
- <el-table-column label="图片" align="center" prop="filePath">
- <template slot-scope="scope">
- <el-image
- style="width: 50px; height: 50px"
- :preview-src-list="scope.row.filePath | getImgList"
- :src="imgUrl+scope.row.filePath" >
- </el-image>
- </template>
- </el-table-column>
- <el-table-column label="备件名称" align="center" prop="sparePartName"></el-table-column>
- <el-table-column label="备件规格" align="center" prop="sparePartSpecifications"></el-table-column>
- <el-table-column label="备件单价" align="center" prop="sparePartUnitPrice"></el-table-column>
- <el-table-column label="库存总量" align="center" prop="sparePartQuantity"></el-table-column>
- <el-table-column label="操作" align="center" width="200">
- <template slot-scope="scope">
- <el-button link type="text" class="text-green padding-xs" icon="el-icon-edit" @click="handleUpdate(scope.row)">修改</el-button>
- <el-button link type="text" class="text-red padding-xs" icon="el-icon-delete" @click="handleDelete(scope.row)">删除</el-button>
- <el-button link type="text" class="text-orange padding-xs"
- icon="el-icon-document-remove" @click="handleStorageOut(scope.row)">出库</el-button>
- <el-button link type="text" class="text-orange padding-xs"
- icon="el-icon-document-add" @click="handleStorageIn(scope.row)">入库</el-button>
- </template>
- </el-table-column>
- </el-table>
- <div class="margin-tb-sm" v-if="storageList.length">
- <el-pagination @current-change="handleCurrentChange" :current-page="queryParams.pageNum" background
- :page-size="10" layout="total, prev, pager, next, jumper" :total="allTotal">
- </el-pagination>
- </div>
- <!-- 添加或修改证书对话框 -->
- <el-dialog :title="title" :visible.sync="drawerDolag" width="1000px" append-to-body>
- <el-form ref="storageRef" class="spaclForm" :model="storageForm" :rules="rules" label-width="120px">
- <div class="grid col-2">
- <el-form-item label="备件编号:" prop="sparePartNumber">
- <el-input v-model="storageForm.sparePartNumber" placeholder="请输入备件编号" />
- </el-form-item>
- <el-form-item label="备件名称:" prop="sparePartName">
- <el-input v-model="storageForm.sparePartName" placeholder="请输入备件名称" />
- </el-form-item>
- <el-form-item label="备件规格:" prop="sparePartSpecifications">
- <el-input v-model="storageForm.sparePartSpecifications" placeholder="请输入备件规格" />
- </el-form-item>
- <el-form-item label="备件品牌:" prop="sparePartBrand">
- <el-input v-model="storageForm.sparePartBrand" placeholder="请输入备件品牌" />
- </el-form-item>
- <el-form-item label="备件单价:" prop="sparePartUnitPrice">
- <el-input-number v-model="storageForm.sparePartUnitPrice"
- :precision="0" :min="0" :step="1" placeholder="请输入备件单价" />
- </el-form-item>
- <el-form-item label="库存总量:" prop="sparePartQuantity">
- <el-input-number v-model="storageForm.sparePartQuantity" :disabled="storageForm.sparePartId != null"
- :precision="0" :min="0" :step="1" placeholder="请输入库存总量" />
- </el-form-item>
- <el-form-item label="备件类型:" prop="sparePartStockType">
- <el-select v-model="storageForm.sparePartStockType" placeholder="请选择备件类型" style="width:100%;display:block">
- <el-option v-for="dict in stockTypeList" :key="dict.value" :label="dict.label"
- :value="dict.value"></el-option>
- </el-select>
- </el-form-item>
- <el-form-item label="单位:" prop="sparePartUnit">
- <el-input v-model="storageForm.sparePartUnit" placeholder="请输入单位" />
- </el-form-item>
- <el-form-item label="存放位置:" prop="sparePartStorageLocation">
- <el-input v-model="storageForm.sparePartStorageLocation" type="textarea" :rows="1" placeholder="请输入存放位置" />
- </el-form-item>
- <el-form-item label="备注:" prop="remark">
- <el-input v-model="storageForm.remark" type="textarea" :rows="1" placeholder="请输入备注" />
- </el-form-item>
- </div>
- <el-form-item label="备件样板:">
- <el-upload
- :headers="upHeaders"
- class="avatar-uploader"
- :action="imgUrl+'/common/upload'"
- :show-file-list="false"
- limit="1"
- :on-success="handleAvatarSuccess"
- :before-upload="beforeAvatarUpload">
- <img v-if="storageForm.filePath" style="width: 200px;" :src="imgUrl + storageForm.filePath" class="avatar">
- <i v-else class="el-icon-plus avatar-uploader-icon"></i>
- </el-upload>
- </el-form-item>
- <el-form-item>
- <el-button size="small" type="primary" @click="handleSubmitForm">确 定</el-button>
- <el-button size="small" @click="drawerDolag=false">取 消</el-button>
- </el-form-item>
- </el-form>
- </el-dialog>
- <el-drawer
- :title="sparePartAccessType == 10?'入库清单':'出库清单'"
- size="80vw"
- :visible.sync="drawerOutIn"
- direction="rtl">
- <el-form ref="submitRef" :model="submitForm" :rules="rules" label-width="120px" class="grid col-2">
- <el-form-item label="备注:" prop="sparePartAccessExplain" style="color: 'red'">
- <el-input v-model="submitForm.sparePartAccessExplain" type="textarea" :rows="1" placeholder="请输入备注" />
- </el-form-item>
- <el-form-item class="text-right">
- <div v-if="sparePartAccessType == 10">
- <el-button size="small" v-if="storageInTotal > 0" @click="clrearQuantityIn(true)">清空</el-button>
- <el-button size="small" :disabled="storageInTotal == 0" type="primary" @click="submitOrder" v-if="storageInTotal > 0">提交</el-button>
- </div>
- <div v-if="sparePartAccessType == 20">
- <el-button size="small" v-if="storageOutTotal > 0" @click="clrearQuantityOut(true)">清空</el-button>
- <el-button size="small" :disabled="storageOutTotal == 0" type="primary" @click="submitOrder" v-if="storageOutTotal > 0">提交</el-button>
- </div>
- </el-form-item>
- </el-form>
- <div class="padding-xs" v-if="sparePartAccessType == 10">
- <el-table :data="Object.values(srorageQuantityIn)"
- stripe
- :cell-style="{ color: 'var(--black)' }"
- :header-cell-style="{ color: 'var(--white)',background: '#5e5e5e' }">
- <el-table-column label="备件编号" align="center" prop="sparePartNumber"></el-table-column>
- <el-table-column label="备件名称" align="center" prop="sparePartName"></el-table-column>
- <el-table-column label="备件规格" align="center" prop="sparePartSpecifications"></el-table-column>
- <el-table-column label="备件品牌" align="center" prop="sparePartBrand"></el-table-column>
- <el-table-column label="库存总量" align="center" prop="sparePartQuantity"></el-table-column>
- <el-table-column label="数量" align="center" prop="sparePartNumber" width="170">
- <template slot-scope="scope">
- <el-input-number v-model="scope.row.sparePartRetrievalQuantity" :min="1" :step="1"
- @change="updateStorageIn(scope.row)" style="width: 150px;"/>
- </template>
- </el-table-column>
- <el-table-column label="操作" align="center" width="100">
- <template slot-scope="scope">
- <el-button link type="text" class="text-red padding-xs" @click="removeQuantityIn(scope.row)" icon="el-icon-delete">删除</el-button>
- </template>
- </el-table-column>
- </el-table>
- </div>
- <div class="padding-xs" v-else-if="sparePartAccessType == 20">
- <el-table :data="Object.values(srorageQuantityOut)"
- stripe
- :cell-style="{ color: 'var(--black)' }"
- :header-cell-style="{ color: 'var(--white)',background: '#5e5e5e' }">
- <el-table-column label="备件编号" align="center" prop="sparePartNumber"></el-table-column>
- <el-table-column label="备件名称" align="center" prop="sparePartName"></el-table-column>
- <el-table-column label="备件规格" align="center" prop="sparePartSpecifications"></el-table-column>
- <el-table-column label="备件品牌" align="center" prop="sparePartBrand"></el-table-column>
- <el-table-column label="库存总量" align="center" prop="sparePartQuantity"></el-table-column>
- <el-table-column label="数量" align="center" prop="sparePartNumber" width="170">
- <template slot-scope="scope">
- <el-input-number v-model="scope.row.sparePartRetrievalQuantity" :min="1" :step="1"
- @change="updateStorageOut(scope.row)" style="width: 150px;"/>
- </template>
- </el-table-column>
- <el-table-column label="操作" align="center" width="100">
- <template slot-scope="scope">
- <el-button link type="text" class="text-red padding-xs" @click="removeQuantityOut(scope.row)" icon="el-icon-delete">删除</el-button>
- </template>
- </el-table-column>
- </el-table>
- </div>
- </el-drawer>
- </div>
- <script type="text/javascript">
- document.write('<script src="../assets/fileApi.js?id=' + (new Date().getTime()) + '" type="text/javascript" charset="utf-8"><\/script>');
- document.write('<script src="../components/TextTag.js?id=' + (new Date().getTime()) + '" type="text/javascript" charset="utf-8"><\/script>');
- document.write('<script src="../assets/storageList.js?id=' + (new Date().getTime()) + '" type="text/javascript" charset="utf-8"><\/script>');
- </script>
- </body>
- </html>
|