|
@@ -1,47 +1,62 @@
|
|
|
<template>
|
|
|
<div class="app-container">
|
|
|
- <el-form :model="queryParams" ref="queryForm" size="mini" :inline="true">
|
|
|
- <el-form-item prop="receiveUserId" v-hasPermi="['material:asset:add']">
|
|
|
- <template slot="label">
|
|
|
- <span>领用人</span>
|
|
|
- <el-tooltip class="item" effect="dark" content="不选择时,默认展示当前用户的领用" placement="top">
|
|
|
- <i class="el-icon-info"></i>
|
|
|
- </el-tooltip>
|
|
|
- </template>
|
|
|
- <el-autocomplete
|
|
|
- class="my-autocomplete"
|
|
|
- v-model="selectUser"
|
|
|
- :fetch-suggestions="querySearch"
|
|
|
- placeholder="请输入姓名"
|
|
|
- @select="handleSelect">
|
|
|
- <template slot-scope="{ item }">
|
|
|
- <div class="autocomplete-item">
|
|
|
- <div class="name">{{ item.value }}</div>
|
|
|
- <div class="dept">{{ item.deptName }}</div>
|
|
|
- </div>
|
|
|
+ <div class="query-container">
|
|
|
+ <el-form :model="queryParams" ref="queryForm" size="mini" :inline="true">
|
|
|
+ <el-form-item prop="receiveUserId" v-hasPermi="['material:asset:add']">
|
|
|
+ <template slot="label">
|
|
|
+ <span>领用人</span>
|
|
|
+ <el-tooltip class="item" effect="dark" content="不选择时,默认展示当前用户的领用" placement="top">
|
|
|
+ <i class="el-icon-info"></i>
|
|
|
+ </el-tooltip>
|
|
|
</template>
|
|
|
- </el-autocomplete>
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="资产类型" prop="assetType">
|
|
|
- <el-select
|
|
|
- v-model="queryParams.assetType"
|
|
|
- placeholder="资产类型"
|
|
|
- style="width: 150px">
|
|
|
- <el-option label="固定资产" value="0"/>
|
|
|
- <el-option label="耗材" value="1"/>
|
|
|
- </el-select>
|
|
|
- </el-form-item>
|
|
|
- <el-form-item>
|
|
|
- <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
|
|
- <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
|
|
- </el-form-item>
|
|
|
- </el-form>
|
|
|
-
|
|
|
+ <el-autocomplete
|
|
|
+ class="my-autocomplete"
|
|
|
+ v-model="selectUser"
|
|
|
+ :fetch-suggestions="querySearch"
|
|
|
+ placeholder="请输入姓名"
|
|
|
+ @select="handleSelect">
|
|
|
+ <template slot-scope="{ item }">
|
|
|
+ <div class="autocomplete-item">
|
|
|
+ <div class="name">{{ item.value }}</div>
|
|
|
+ <div class="dept">{{ item.deptName }}</div>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ </el-autocomplete>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="资产类型" prop="assetType">
|
|
|
+ <el-select
|
|
|
+ v-model="queryParams.assetType"
|
|
|
+ placeholder="资产类型"
|
|
|
+ style="width: 150px">
|
|
|
+ <el-option label="固定资产" value="0"/>
|
|
|
+ <el-option label="耗材" value="1"/>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item>
|
|
|
+ <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
|
|
+ <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
|
|
+ </el-form-item>
|
|
|
+ </el-form>
|
|
|
+ <el-row :gutter="10" style="margin-bottom:8px">
|
|
|
+ <el-col :span="1.5">
|
|
|
+ <el-button
|
|
|
+ type="primary"
|
|
|
+ plain
|
|
|
+ icon="el-icon-s-check"
|
|
|
+ size="mini"
|
|
|
+ @click="handleCheck"
|
|
|
+ v-hasPermi="['material:asset:check']"
|
|
|
+ >月度盘点
|
|
|
+ </el-button>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ </div>
|
|
|
|
|
|
<el-table :data="assetList"
|
|
|
@cell-click="cellClick"
|
|
|
@cell-mouse-enter="cellMouseEnter"
|
|
|
@cell-mouse-leave="cellMouseLeave"
|
|
|
+ height="calc(100vh - 110px)"
|
|
|
size="mini"
|
|
|
row-key="id"
|
|
|
:row-class-name="rowClassName"
|
|
@@ -198,11 +213,61 @@
|
|
|
</el-row>
|
|
|
</el-dialog>
|
|
|
|
|
|
+ <!-- 资产盘点确认对话框-->
|
|
|
+ <el-dialog :title="checkTitle" :visible.sync="checkOpen" class="asset-dialog" width="900px" append-to-body
|
|
|
+ @close="checkOpen=false">
|
|
|
+ <el-table :data="toConfirmList"
|
|
|
+ size="mini"
|
|
|
+ row-key="id"
|
|
|
+ @selection-change="handleSelectionChange"
|
|
|
+ :tree-props="{children: 'children', hasChildren: 'hasChildren'}">
|
|
|
+ <el-table-column type="selection" width="50" :selectable="selectableHandler"/>
|
|
|
+ <el-table-column label="唯一编码" prop="deptAssetNumber" :show-overflow-tooltip="true"/>
|
|
|
+ <el-table-column label="公司资产编号" prop="assetNumber" :show-overflow-tooltip="true"/>
|
|
|
+ <el-table-column label="物品名称" prop="assetName" min-width="100" :show-overflow-tooltip="true"/>
|
|
|
+ <el-table-column label="资产类型" width="80">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-tag v-if="scope.row.assetType==='1'" size="mini" type="warning">耗材</el-tag>
|
|
|
+ <el-tag v-else size="mini" type="success">固定资产</el-tag>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="设备型号" prop="equipmentType" :show-overflow-tooltip="true"/>
|
|
|
+ <el-table-column label="生产厂家" prop="factoryName" :show-overflow-tooltip="true"/>
|
|
|
+ <el-table-column label="领用日期" prop="receiveDate" width="115">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <span>{{ parseTime(scope.row.receiveDate) }}</span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="是否确认" width="80">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-tag type="info" v-if="scope.row.receiveConfirm==='0'">
|
|
|
+ <i class="el-icon-coordinate"></i>未确认
|
|
|
+ </el-tag>
|
|
|
+ <el-tag type="success" v-if="scope.row.receiveConfirm==='1'">
|
|
|
+ <i class="el-icon-coordinate"></i>已确认
|
|
|
+ </el-tag>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ </el-table>
|
|
|
+ <div slot="footer" class="dialog-footer">
|
|
|
+ <el-button type="primary" size="mini" :disabled="monthCheckIds.length===0" @click="submitCheck">确 定
|
|
|
+ </el-button>
|
|
|
+ <el-button size="mini" @click="checkOpen=false">取 消</el-button>
|
|
|
+ </div>
|
|
|
+ </el-dialog>
|
|
|
+
|
|
|
+
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-import {addTransfer, confirmReceive, getTransferList, personReceive} from "@/api/material/transfer";
|
|
|
+import {
|
|
|
+ addTransfer,
|
|
|
+ confirmReceive,
|
|
|
+ getTransferList, monthCheckConfirm,
|
|
|
+ personMonthCheckList,
|
|
|
+ personReceive
|
|
|
+} from "@/api/material/transfer";
|
|
|
import {getAsset} from "@/api/material/asset";
|
|
|
import AssetDetail from "./components/assetDetail"
|
|
|
import DeptUserTree from "@/components/DeptUserTree"
|
|
@@ -246,6 +311,11 @@ export default {
|
|
|
{required: true, message: "流转备注不能为空", trigger: "blur"}
|
|
|
]
|
|
|
},
|
|
|
+ checkTitle: '',
|
|
|
+ checkOpen: false,
|
|
|
+ toConfirmList: [],
|
|
|
+ monthCheckIds: []
|
|
|
+
|
|
|
}
|
|
|
},
|
|
|
watch: {
|
|
@@ -256,6 +326,11 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
created() {
|
|
|
+ let checkConfirmNum = this.$route.query.checkConfirmNum;
|
|
|
+ console.log(checkConfirmNum);
|
|
|
+ if (checkConfirmNum > 0) {
|
|
|
+ this.getPersonMonthCheckList()
|
|
|
+ }
|
|
|
this.getList()
|
|
|
this.getUsers()
|
|
|
},
|
|
@@ -410,7 +485,41 @@ export default {
|
|
|
this.transferOpen = false
|
|
|
this.transferForm = {}
|
|
|
this.resetForm("transferForm");
|
|
|
- }
|
|
|
+ },
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 月度盘点
|
|
|
+ */
|
|
|
+ handleCheck() {
|
|
|
+ this.$router.push('/material/monthCheck')
|
|
|
+ },
|
|
|
+ getPersonMonthCheckList() {
|
|
|
+ let currentMonth = DateUtil.month();
|
|
|
+ personMonthCheckList({date: currentMonth}).then(res => {
|
|
|
+ this.toConfirmList = res.data || []
|
|
|
+ this.checkTitle = currentMonth + '资产盘点确认'
|
|
|
+ this.checkOpen = true
|
|
|
+ })
|
|
|
+ },
|
|
|
+ selectableHandler(row, index) {
|
|
|
+ return row.receiveConfirm == '0'
|
|
|
+ },
|
|
|
+ handleSelectionChange(val) {
|
|
|
+ this.monthCheckIds = val.map(item => item.monthCheckId)
|
|
|
+ },
|
|
|
+ submitCheck() {
|
|
|
+ if (this.monthCheckIds.length === 0) {
|
|
|
+ return
|
|
|
+ }
|
|
|
+ let data = {
|
|
|
+ date: DateUtil.month(),
|
|
|
+ monthCheckIds: this.monthCheckIds
|
|
|
+ }
|
|
|
+ monthCheckConfirm(data).then(res => {
|
|
|
+ this.$message.success(res.message)
|
|
|
+ })
|
|
|
+ },
|
|
|
+
|
|
|
}
|
|
|
}
|
|
|
</script>
|