| | |
| | | <el-col :span="12"> |
| | | <el-card shadow="never"> |
| | | <div slot="header" class="clearfix"> |
| | | <span class="font-18 font-bold">待办名称</span> |
| | | <span class="font-18 font-bold">调拨待办</span> |
| | | </div> |
| | | <div class="f-r f-r-between m-b-10"> |
| | | <el-radio-group v-model="waitType" size="medium"> |
| | | <el-radio-button label="1">全部</el-radio-button> |
| | | <el-radio-group @change="changeAudit" v-model="waitType" size="mini"> |
| | | <el-radio-button label="0">待出库</el-radio-button> |
| | | <el-radio-button label="1">待入库</el-radio-button> |
| | | </el-radio-group> |
| | | <div class="to-more" @click="nav('/stock/transfer/transferissue')">查看更多 ></div> |
| | | </div> |
| | | <el-table :data="waitWorkData" class="top-tb" :show-header="false" size="medium"> |
| | | <el-table-column prop="number" align="center"></el-table-column> |
| | | <el-table-column prop="type" align="center" width="100"></el-table-column> |
| | | <el-table-column prop="orgName" align="center" width="100"></el-table-column> |
| | | <el-table-column prop="name" align="center" width="80"></el-table-column> |
| | | <el-table-column prop="createTime" align="center" width="180"> |
| | | <el-table v-loading="waitLoading" :data="waitWorkData" class="top-tb" height="220" :show-header="false" |
| | | size="medium"> |
| | | <el-table-column prop="businessFormCode" align="center" width="130"></el-table-column> |
| | | <el-table-column prop="inWarehouseName" align="left" min-width="130"> |
| | | <template slot-scope="{row}"> |
| | | <el-tooltip class="item" effect="dark" :content="row.inWarehouseName " placement="top-start"> |
| | | <div class="font-14 color-333" |
| | | style="width: 100%;white-space:nowrap;text-overflow: ellipsis;overflow: hidden"> |
| | | {{ row.inWarehouseName }} |
| | | </div> |
| | | </el-tooltip> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="operatorName" align="center" width="80"></el-table-column> |
| | | <el-table-column prop="createTime" align="center" width="160"> |
| | | <template slot-scope="scope"> |
| | | <span class="font-14 color-333">{{ formattTime(scope.row.createTime) }}</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="date" label="操作" align="center" width="120"> |
| | | <el-table-column prop="date" label="操作" fixed="right" align="center" width="80"> |
| | | <template slot-scope="scope"> |
| | | <el-button @click.native.prevent="aduitThis(scope.row.id)" size="small" type="primary">处理</el-button> |
| | | <el-button style="padding: 4px 15px" @click.native.prevent="aduitThis(scope.row)" size="mini" type="primary">处理</el-button> |
| | | </template> |
| | | </el-table-column> |
| | | <el-empty slot="empty" description="暂无数据"></el-empty> |
| | | </el-table> |
| | | </el-card> |
| | | </el-col> |
| | |
| | | <span class="font-18 font-bold">预警通知</span> |
| | | </div> |
| | | <div class="f-r f-r-between m-b-10"> |
| | | <el-radio-group size="medium" v-model="earlyWarningType" @change="changeEarlyWarning"> |
| | | <el-radio-button label="1">全部</el-radio-button> |
| | | <el-radio-button label="2">缺货(12)</el-radio-button> |
| | | <el-radio-button label="3">超出(3)</el-radio-button> |
| | | <el-radio-group size="mini" v-model="earlyWarningType" @change="changeEarlyWarning"> |
| | | <el-radio-button label="">全部</el-radio-button> |
| | | <el-radio-button label="2">缺货 <span v-if="warningTypeNum.lowNum">({{warningTypeNum.lowNum}})</span></el-radio-button> |
| | | <el-radio-button label="1">超出 <span v-if="warningTypeNum.upNum">({{warningTypeNum.upNum}})</span></el-radio-button> |
| | | </el-radio-group> |
| | | <div class="to-more" @click="nav('/stock/ledger/alertQuery')">查看更多 ></div> |
| | | </div> |
| | | <el-table :data="earlyWarningData" class="top-tb" :show-header="false" size="medium"> |
| | | <el-table-column prop="type" align="center"></el-table-column> |
| | | <el-table-column prop="name" align="center" width="100"></el-table-column> |
| | | <el-table-column prop="orgName" align="center" width="100"></el-table-column> |
| | | <el-table-column prop="surplus" align="center" width="100"> |
| | | <template slot-scope="scope"> |
| | | <span class="font-14 color-333">剩余{{ scope.row.surplus }}套</span> |
| | | <el-table v-loading="earlyLoading" :data="earlyWarningData" class="top-tb" height="220" :show-header="false" |
| | | size="medium"> |
| | | <el-table-column prop="baseGoodsTemplateName" align="left" min-width="130"> |
| | | <template slot-scope="{row}"> |
| | | <el-tooltip class="item" effect="dark" :content="row.baseGoodsTemplateName " placement="top-start"> |
| | | <div class="font-14 color-333" |
| | | style="width: 100%;white-space:nowrap;text-overflow: ellipsis;overflow: hidden"> |
| | | {{ row.baseGoodsTemplateName }} |
| | | </div> |
| | | </el-tooltip> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="createTime" align="center" width="180"> |
| | | <template slot-scope="scope"> |
| | | <span class="font-14 color-333">{{ formattTime(scope.row.createTime) }}</span> |
| | | <el-table-column prop="baseGoodsModelsName" align="left" min-width="130"> |
| | | <template slot-scope="{row}"> |
| | | <el-tooltip class="item" effect="dark" :content="row.baseGoodsModelsName " placement="top-start"> |
| | | <div class="font-14 color-333" |
| | | style="width: 100%;white-space:nowrap;text-overflow: ellipsis;overflow: hidden"> |
| | | {{ row.baseGoodsModelsName }} |
| | | </div> |
| | | </el-tooltip> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="date" label="操作" align="center" width="120"> |
| | | <template slot-scope="scope"> |
| | | <el-button @click.native.prevent="aduitThis(scope.row.id)" size="small" type="primary">处理</el-button> |
| | | <el-table-column prop="surplus" align="left" min-width="130"> |
| | | <template slot-scope="{row}"> |
| | | <span class="font-14 color-333">剩余{{ row.warehouseCount }}{{ row.unit }}</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="warningTime" align="center" width="160"> |
| | | <template slot-scope="{row}"> |
| | | <span class="font-14 color-333">{{ formattTime(row.warningTime) }}</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-empty slot="empty" description="暂无数据"></el-empty> |
| | | </el-table> |
| | | </el-card> |
| | | </el-col> |
| | |
| | | <div class="f-r f-r-between total-list"> |
| | | <div class="total-item"> |
| | | <div class="font-14 color-666">物品数量</div> |
| | | <div class="font-14 color-333" style="margin-top:6px;"><span class="total-num">1200</span></div> |
| | | <div class="font-14 color-333" style="margin-top:6px;"><span |
| | | class="total-num">{{ goodsNumPrice.totalNum }}</span></div> |
| | | </div> |
| | | <div class="total-item"> |
| | | <div class="font-14 color-666">资产总金额</div> |
| | | <div class="font-14 color-333" style="margin-top:6px;"><span class="total-num">120.88</span>万元</div> |
| | | <div class="font-14 color-333" style="margin-top:6px;"><span |
| | | class="total-num">{{ goodsNumPrice.totalPrice }}</span>万元 |
| | | </div> |
| | | </div> |
| | | <div class="total-item"> |
| | | <div class="font-14 color-666">物品占用率</div> |
| | | <div class="font-14 color-333" style="margin-top:6px;"><span class="total-num">80%</span></div> |
| | | <div class="font-14 color-333" style="margin-top:6px;"><span |
| | | class="total-num">{{ goodsNumPrice.zhanYouPercent }}%</span></div> |
| | | </div> |
| | | <div class="total-item"> |
| | | <div class="font-14 color-666">A类物品数量</div> |
| | | <div class="font-14 color-333" style="margin-top:6px;"><span class="total-num">120</span></div> |
| | | <div class="font-14 color-333" style="margin-top:6px;"><span |
| | | class="total-num">{{ goodsNumPrice.aTotalNum }}</span></div> |
| | | </div> |
| | | <div class="total-item"> |
| | | <div class="font-14 color-666">B类物品数量</div> |
| | | <div class="font-14 color-333" style="margin-top:6px;"><span class="total-num">123</span></div> |
| | | <div class="font-14 color-333" style="margin-top:6px;"><span |
| | | class="total-num">{{ goodsNumPrice.bTotalNum }}</span></div> |
| | | </div> |
| | | </div> |
| | | <!-- 类别金额统计/类别数量统计 --> |
| | | <!-- 类别金额统计/类别数量统计 --> |
| | | <el-row :gutter="20"> |
| | | <el-col :span="12"> |
| | | <LBSLTJ></LBSLTJ> |
| | | <LBSLTJ :num="goodsNumPrice"></LBSLTJ> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <LBJETJ></LBJETJ> |
| | | <LBJETJ :num="goodsNumPrice"></LBJETJ> |
| | | </el-col> |
| | | </el-row> |
| | | <!-- 资产增长/报废统计图(数量)--> |
| | | <!-- 资产增长/报废统计图(数量)--> |
| | | <XYZC></XYZC> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import listPage from '@/views/mixins/listPage'; |
| | | import {getGoodsNumPrice} from '@/api/dashboard' |
| | | // 创建Context |
| | | import {LongToDateTime} from "@/utils/DateFormatter"; |
| | | import {transfeIncome, transferList, transferOutput} from "@/api/stock/transfer"; |
| | | import {getWarningTypeNum, geWarningList} from '@/api/stock/ledger' |
| | | |
| | | const ComponentContext = require.context('./components', false, /\.vue$/i); |
| | | let res_components = {}; |
| | |
| | | export default { |
| | | name: 'Dashboard', |
| | | components: {...res_components}, |
| | | mixins: [listPage], |
| | | data() { |
| | | return { |
| | | waitType: '1', |
| | | waitWorkData: [ |
| | | {number: 'SJQ12345', type: '物品申领', orgName: '金融业务部', name: '张三丰', createTime: 20231127150606, id: 1}, |
| | | {number: 'SJQ12345', type: '物品申领', orgName: '金融业务部', name: '张三丰', createTime: 20231127150606, id: 2}, |
| | | {number: 'SJQ12345', type: '物品申领', orgName: '金融业务部', name: '张三丰', createTime: 20231127150606, id: 3}, |
| | | {number: 'SJQ12345', type: '物品申领', orgName: '金融业务部', name: '张三丰', createTime: 20231127150606, id: 4}, |
| | | {number: 'SJQ12345', type: '物品申领', orgName: '金融业务部', name: '张三丰', createTime: 20231127150606, id: 5}, |
| | | ], // 待办工作 |
| | | earlyWarningType: '1', |
| | | earlyWarningData: [ |
| | | {type: '施乐复印机碳粉', name: '施乐c2201', surplus: 4, createTime: 20231127150606, id: 1}, |
| | | {type: '施乐复印机碳粉', name: '施乐c2201', surplus: 5, createTime: 20231127150606, id: 2}, |
| | | {type: '施乐复印机碳粉', name: '施乐c2201', surplus: 6, createTime: 20231127150606, id: 3}, |
| | | {type: '施乐复印机碳粉', name: '施乐c2201', surplus: 6, createTime: 20231127150606, id: 4}, |
| | | ] // 预警通知 |
| | | earlyLoading: false, |
| | | waitLoading: false, |
| | | goodsNumPrice: { |
| | | aTotalNum: 0, |
| | | aTotalPrice: 0, |
| | | bTotalNum: 0, |
| | | bTotalPrice: 0, |
| | | cTotalNum: 0, |
| | | cTotalPrice: 0, |
| | | tenantId: 0, |
| | | totalNum: 0, |
| | | totalPrice: 0, |
| | | xiaFaNum: 0, |
| | | zhanYouPercent: 0, |
| | | }, |
| | | waitType: '0', |
| | | waitWorkData: [], // 待办工作 |
| | | earlyWarningType: '', |
| | | warningTypeNum: { |
| | | lowNum: 0, |
| | | totalNum: 0, |
| | | upNum: 0, |
| | | }, |
| | | earlyWarningData: [] // 预警通知 |
| | | }; |
| | | }, |
| | | created() { |
| | | this.getAuditList() |
| | | this.getWarningList() |
| | | getGoodsNumPrice().then(res => { |
| | | if(res){ |
| | | this.goodsNumPrice = res |
| | | } |
| | | |
| | | }) |
| | | }, |
| | | methods: { |
| | | // 格式化时间 |
| | | formattTime(time) { |
| | | return LongToDateTime(time) |
| | | }, |
| | | changeAudit(e) { |
| | | this.waitType = e |
| | | this.$nextTick(() => { |
| | | this.getAuditList() |
| | | }) |
| | | }, |
| | | // 获取预警通知列表数据 |
| | | getAduitList() { |
| | | let form = { |
| | | pageSize: 5, |
| | | getAuditList() { |
| | | this.waitLoading = true |
| | | this.waitWorkData = [] |
| | | let params = { |
| | | pageNum: 1, |
| | | waitType: this.waitType |
| | | pageSize: 5, |
| | | } |
| | | if (this.waitType === '0') { |
| | | params.outAgencyId = this.userInfo.tenantId |
| | | params.states = 0 |
| | | } else { |
| | | params.inAgencyId = this.userInfo.tenantId |
| | | params.states = 1 |
| | | } |
| | | transferList(params).then((res) => { |
| | | this.waitLoading = false |
| | | this.waitWorkData = res.datas; |
| | | }).catch(() => { |
| | | this.waitLoading = false |
| | | }); |
| | | }, |
| | | aduitThis(row) { |
| | | if (this.waitType === '0') { |
| | | this.handleOutput(row) |
| | | } else { |
| | | this.handleIncome(row) |
| | | } |
| | | }, |
| | | // 处理待办工作 |
| | | aduitThis(id) { |
| | | // 入库 |
| | | handleIncome(row) { |
| | | this.$confirm(`您确定 单号:${row.businessFormCode} 接收入库吗?`, '接收入库', { |
| | | beforeClose: (action, instance, done) => { |
| | | if (action == 'confirm') { |
| | | instance.confirmButtonLoading = true; |
| | | instance.confirmButtonText = '执行中...'; |
| | | transfeIncome({id: row.id}) |
| | | .then((res) => { |
| | | this.$message.success('接收入库成功!'); |
| | | done(); |
| | | instance.confirmButtonLoading = false; |
| | | this.search(1); |
| | | }) |
| | | .catch(() => { |
| | | done(); |
| | | }); |
| | | } else { |
| | | done(); |
| | | } |
| | | }, |
| | | }); |
| | | }, |
| | | //出库 |
| | | handleOutput(row) { |
| | | this.$confirm(`您确定 单号:${row.businessFormCode} 调拨出库吗?`, '调拨出库', { |
| | | beforeClose: (action, instance, done) => { |
| | | if (action == 'confirm') { |
| | | instance.confirmButtonLoading = true; |
| | | instance.confirmButtonText = '执行中...'; |
| | | transferOutput({id: row.id}) |
| | | .then((res) => { |
| | | this.$message.success('调拨出库成功!'); |
| | | done(); |
| | | instance.confirmButtonLoading = false; |
| | | this.search(1); |
| | | }) |
| | | .catch(() => { |
| | | done(); |
| | | }); |
| | | } else { |
| | | done(); |
| | | } |
| | | }, |
| | | }); |
| | | }, |
| | | // 切换预警通知 |
| | | changeEarlyWarning(e) { |
| | |
| | | }, |
| | | // 获取预警通知列表数据 |
| | | getWarningList() { |
| | | let form = { |
| | | pageSize: 5, |
| | | pageNum: 1, |
| | | earlyWarningType: this.earlyWarningType |
| | | } |
| | | this.earlyLoading = true |
| | | this.earlyWarningData = [] |
| | | getWarningTypeNum().then(res => { |
| | | this.warningTypeNum = res |
| | | geWarningList({ |
| | | warningType: this.earlyWarningType, |
| | | pageNum: 1, |
| | | pageSize: 5, |
| | | }).then(res => { |
| | | this.earlyLoading = false |
| | | this.earlyWarningData = res.datas; |
| | | }).catch(() => { |
| | | this.waitLoading = false |
| | | }); |
| | | }) |
| | | |
| | | }, |
| | | // 跳转 |
| | | nav(url){ |
| | | // 跳转 |
| | | nav(url) { |
| | | this.$router.push(url) |
| | | } |
| | | } |
| | |
| | | .top-tb { |
| | | width: 100%; |
| | | } |
| | | >>>.el-table__body{ |
| | | min-height: 265px; |
| | | } |
| | | |
| | | .total-list { |
| | | padding: 15px 0; |
| | | } |
| | |
| | | .total-item { |
| | | width: 19%; |
| | | padding: 12px 20px; |
| | | border-radius: 8px; |
| | | border-radius: 4px; |
| | | margin-right: 1%; |
| | | background-color: #FFFFFF; |
| | | border-left: 4px solid #fb6260; |
| | | } |
| | | |
| | | .total-item:last-child { |