滞货分析
This commit is contained in:
40
src/api/PurchasingCenter/BacklogGoodsAnalysis.js
Normal file
40
src/api/PurchasingCenter/BacklogGoodsAnalysis.js
Normal file
@@ -0,0 +1,40 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 查询库存量
|
||||
export function searchMaterialNum(pageCurrent, pageSize, check1, val1, check2, val2, check3, val3) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '1',
|
||||
name: '采购管理_物料与货位对照_查询数据',
|
||||
param: `物料名称_check=${check1}&物料名称=${val1}&物料规格_check=${check2}&物料规格=${val2}&物料型号_check=${check3}&物料型号=${val3}`,
|
||||
Pagination: pageCurrent + '&' + pageSize
|
||||
}
|
||||
})
|
||||
}
|
||||
// 查询滞货库存量
|
||||
export function searchBacklogNum(pageCurrent, pageSize, check1, val1, check2, val2, check3, val3) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '1',
|
||||
name: '采购管理_滞货物料与货位对照_查询数据',
|
||||
param: `物料名称_check=${check1}&物料名称=${val1}&物料规格_check=${check2}&物料规格=${val2}&物料型号_check=${check3}&物料型号=${val3}`,
|
||||
Pagination: pageCurrent + '&' + pageSize
|
||||
}
|
||||
})
|
||||
}
|
||||
// 转为滞货
|
||||
export function submitTurn(...params) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '2',
|
||||
name: '采购管理_转为滞货',
|
||||
param: `物料流水号=${params[0]}&转滞货数量=${params[1]}&物料与货位对照流水号=${params[2]}&货位流水号=${params[3]}`
|
||||
}
|
||||
})
|
||||
}
|
||||
1
src/icons/svg/BacklogGoodsAnalysis.svg
Normal file
1
src/icons/svg/BacklogGoodsAnalysis.svg
Normal file
@@ -0,0 +1 @@
|
||||
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1553736654324" class="icon" style="" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1686" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><defs><style type="text/css"></style></defs><path d="M1020.221442 259.023358l0.057305-0.01535L512.668731 6.224772 5.978666 258.526031l-0.948605 0 0 505.962493 507.639692 252.7904 507.610016-252.7904L1020.27977 259.023358 1020.221442 259.023358zM512.668731 67.442018l381.63693 190.562127L749.096465 330.981227l-383.65796-190.004425L512.668731 67.442018zM298.950208 176.850847l388.576993 186.487322-174.857447 84.181261-381.642047-188.511421L298.950208 176.850847zM68.45458 322.952366l20.269649-0.025583-20.269649-0.696872 0-31.654954L480.873584 495.91772l0 442.368106L68.45458 732.932832 68.45458 322.952366zM956.881858 353.789699l0 379.144156L544.462854 938.285826 544.462854 495.91772l412.417981-205.343785L956.880835 353.789699z" p-id="1687"></path></svg>
|
||||
|
After Width: | Height: | Size: 1.1 KiB |
251
src/views/PurchasingCenter/BacklogGoodsAnalysis/index.vue
Normal file
251
src/views/PurchasingCenter/BacklogGoodsAnalysis/index.vue
Normal file
@@ -0,0 +1,251 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-card>
|
||||
<div slot="header" class="clearfix">
|
||||
<span>物料名称:</span>
|
||||
<el-input v-model="materialName" placeholder="物料名称" clearable size="small"/>
|
||||
<span>物料规格:</span>
|
||||
<el-input v-model="materialSpec" placeholder="物料规格" clearable size="small"/>
|
||||
<span>物料型号:</span>
|
||||
<el-input v-model="materialModel" placeholder="物料型号" clearable size="small"/>
|
||||
<el-button size="small" type="success" icon="el-icon-search" style="margin: 0 0 0 10px" @click="pageCurrent1=1;pageSize1=10;total1=0;searchTable1();pageCurrent2=1;pageSize2=10;total2=0;searchTable2()">查询</el-button>
|
||||
</div>
|
||||
<h4 style="margin-top: 0">采购件列表</h4>
|
||||
<el-table :data="tableData1" size="mini" border style="width: 100%;" height="440">
|
||||
<el-table-column label="名称" align="center" min-width="100">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.物料名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="图号或型号" align="center" min-width="100">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.物料型号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="规格" align="center" min-width="150">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.物料规格 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column props="仓库名称" label="仓库名称" align="center" min-width="80">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.仓库名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="货位名称" align="center" min-width="80">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.货位名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="货位存量" align="center" width="80">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.货位存量 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="待出库数量" align="center" width="90">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.待出库数量 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="可转滞货数量" align="center" width="100">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.可转滞货数量 = scope.row.货位存量 - scope.row.待出库数量 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="所属机床" align="center" width="100">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.机床图号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="所属分组" align="center" width="80">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.组号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" width="100">
|
||||
<template slot-scope="scope" align="center">
|
||||
<el-button size="mini" type="primary" @click="turnToBacklogGoods(scope.row)">转为滞货</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div class="block" style="margin-top: 10px;">
|
||||
<el-pagination
|
||||
:current-page="pageCurrent1"
|
||||
:page-sizes="[10, 20, 30, 40]"
|
||||
:page-size="pageSize1"
|
||||
:total="total1"
|
||||
style="display:inline-block;width:50%"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
@size-change="handleSizeChange1"
|
||||
@current-change="handleCurrentChange1"/>
|
||||
</div>
|
||||
<h4>滞货件列表</h4>
|
||||
<el-table :data="tableData2" size="mini" border style="width: 100%;" height="440">
|
||||
<el-table-column label="名称" align="center" min-width="100">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.物料名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="图号或型号" align="center" min-width="120">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.物料型号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="规格" align="center" min-width="120">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.物料规格 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="仓库名称" align="center" min-width="80">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.仓库名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="货位名称" align="center" min-width="80">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.货位名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="滞货货位存量" align="center" min-width="80">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.货位存量 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div class="block" style="margin-top: 10px;">
|
||||
<el-pagination
|
||||
:current-page="pageCurrent2"
|
||||
:page-sizes="[10, 20, 30, 40]"
|
||||
:page-size="pageSize2"
|
||||
:total="total2"
|
||||
style="display:inline-block;width:50%"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
@size-change="handleSizeChange2"
|
||||
@current-change="handleCurrentChange2"/>
|
||||
</div>
|
||||
</el-card>
|
||||
|
||||
<el-dialog :visible.sync="dialogFormVisible" title="转为滞货" center width="380px">
|
||||
<span>转为滞货数量:</span>
|
||||
<el-input-number :min="0" :max="maxNumber" v-model="number" controls-position="right"/>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button @click="dialogFormVisible=false">取消</el-button>
|
||||
<el-button :disabled="Number(number)===0" type="primary" @click="submitTurn()">确定</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { searchMaterialNum, searchBacklogNum, submitTurn } from '@/api/PurchasingCenter/BacklogGoodsAnalysis'
|
||||
import { mapGetters } from 'vuex'
|
||||
export default {
|
||||
name: 'BacklogGoodsAnalysis',
|
||||
data() {
|
||||
return {
|
||||
materialName: '',
|
||||
materialSpec: '',
|
||||
materialModel: '',
|
||||
pageCurrent1: 1,
|
||||
pageSize1: 10,
|
||||
total1: 0,
|
||||
tableData1: [],
|
||||
number: 0,
|
||||
maxNumber: 0,
|
||||
dialogFormVisible: false,
|
||||
pageCurrent2: 1,
|
||||
pageSize2: 10,
|
||||
total2: 0,
|
||||
tableData2: [],
|
||||
materialNum: '', // 物料流水号
|
||||
materialLocalNum: '', // 物料与货位对照流水号
|
||||
localNum: '' // 货位流水号
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapGetters([
|
||||
'name',
|
||||
'id' // 人员编号
|
||||
])
|
||||
},
|
||||
mounted() {
|
||||
this.searchTable1()
|
||||
this.searchTable2()
|
||||
},
|
||||
methods: {
|
||||
searchTable1() {
|
||||
let check1, check2, check3
|
||||
this.materialName ? check1 = 1 : check1 = 0
|
||||
this.materialSpec ? check2 = 1 : check2 = 0
|
||||
this.materialModel ? check3 = 1 : check3 = 0
|
||||
searchMaterialNum(this.pageCurrent1, this.pageSize1, check1, this.materialName, check2, this.materialSpec, check3, this.materialModel).then(response => {
|
||||
this.tableData1 = response.data.rows
|
||||
this.total1 = response.data.total
|
||||
})
|
||||
},
|
||||
handleSizeChange1(val) {
|
||||
this.pageSize1 = val
|
||||
this.pageCurrent1 = 1
|
||||
this.searchTable1()
|
||||
},
|
||||
handleCurrentChange1(val) {
|
||||
this.pageCurrent1 = val
|
||||
this.searchTable1()
|
||||
},
|
||||
turnToBacklogGoods(row) {
|
||||
this.number = 0
|
||||
this.dialogFormVisible = true
|
||||
this.maxNumber = row.可转滞货数量
|
||||
this.materialNum = row.物料流水号
|
||||
this.materialLocalNum = row.物料与货位对照流水号
|
||||
this.localNum = row.货位流水号
|
||||
},
|
||||
submitTurn() {
|
||||
submitTurn(this.materialNum, this.number, this.materialLocalNum, this.localNum).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.searchTable1()
|
||||
this.searchTable2()
|
||||
this.$message.success('操作成功')
|
||||
this.dialogFormVisible = false
|
||||
} else {
|
||||
this.$message.error('操作失败')
|
||||
}
|
||||
})
|
||||
},
|
||||
searchTable2() {
|
||||
let check1, check2, check3
|
||||
this.materialName ? check1 = 1 : check1 = 0
|
||||
this.materialSpec ? check2 = 1 : check2 = 0
|
||||
this.materialModel ? check3 = 1 : check3 = 0
|
||||
searchBacklogNum(this.pageCurrent2, this.pageSize2, check1, this.materialName, check2, this.materialSpec, check3, this.materialModel).then(response => {
|
||||
this.tableData2 = response.data.rows
|
||||
this.total2 = response.data.total
|
||||
})
|
||||
},
|
||||
handleSizeChange2(val) {
|
||||
this.pageSize2 = val
|
||||
this.pageCurrent2 = 1
|
||||
this.searchTable2()
|
||||
},
|
||||
handleCurrentChange2(val) {
|
||||
this.pageCurrent2 = val
|
||||
this.searchTable2()
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.el-card{
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
.el-select{
|
||||
width:200px
|
||||
}
|
||||
.el-input{
|
||||
width:200px
|
||||
}
|
||||
span{
|
||||
margin: 10px 0 10px 10px;
|
||||
}
|
||||
</style>
|
||||
@@ -36,7 +36,7 @@
|
||||
<el-button :disabled="parseInt(scope.row.询价状态编号)!==1||parseInt(scope.row.是否确认)!==1" type="primary" size="mini" @click="materialChange(scope.row)">物料变更</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="物料状态" align="center" width="100">
|
||||
<el-table-column label="物料状态" align="center" width="80">
|
||||
<template slot-scope="scope">
|
||||
<el-tag v-if="parseInt(scope.row.询价状态编号)===1" type="warning" size="small">未询价</el-tag>
|
||||
<el-tag v-if="parseInt(scope.row.询价状态编号)===3&&parseInt(scope.row.采购状态编号)!==3" type="success" size="small">已询价</el-tag>
|
||||
@@ -48,11 +48,11 @@
|
||||
{{ scope.row.物料计划到货时间.split(' ')[0] }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="项目名称" align="center" min-width="100">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.项目名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!--<el-table-column label="项目名称" align="center" min-width="100">-->
|
||||
<!--<template slot-scope="scope">-->
|
||||
<!--{{ scope.row.项目名称 }}-->
|
||||
<!--</template>-->
|
||||
<!--</el-table-column>-->
|
||||
<el-table-column label="机床图号" align="center" min-width="100">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.机床图号 }}
|
||||
@@ -73,26 +73,46 @@
|
||||
{{ scope.row.物料品种 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="图号" align="center" min-width="100">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.物料型号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="名称" align="center" min-width="100">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.物料名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="规格" align="center" min-width="100">
|
||||
<el-table-column label="图号或型号" align="center" min-width="100">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.物料型号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="规格" align="center" min-width="200">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.物料规格 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="数量" align="center" min-width="80">
|
||||
<el-table-column label="分配数量" align="center" min-width="80">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.零件数量 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="待询价数量" align="center" min-width="90">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.待询价数量 = Number(scope.row.零件数量) - Number(scope.row.使用数量) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="使用滞货数量" align="center" min-width="100">
|
||||
<template slot-scope="scope">
|
||||
{{ Number(scope.row.使用数量) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="使用滞货" align="center" min-width="100">
|
||||
<template slot-scope="scope">
|
||||
<el-button type="primary" size="mini" @click="useInventory(scope.row)">使用滞货</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="滞货数量" align="center" min-width="80">
|
||||
<template slot-scope="scope">
|
||||
{{ Number(scope.row.滞货数量) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="备注" align="center" min-width="100">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.备注 }}
|
||||
@@ -559,6 +579,15 @@
|
||||
<el-button type="primary" size="small" @click="submitMaterialChange">确定</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
<el-dialog :visible.sync="dialogVisible4" title="使用滞货" center style="min-height: 300px;" width="400px">
|
||||
<span>使用滞货数量:</span>
|
||||
<el-input-number :min="0" :max="maxUseNumber" v-model="useNumber" controls-position="right"/>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button size="small" @click="dialogVisible4=false">取消</el-button>
|
||||
<el-button :disabled="Number(useNumber)===0" type="primary" size="small" @click="submitUseInventory">确定</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -656,7 +685,10 @@ export default {
|
||||
standardAndPurchaseValue: '', // 标准件和外购件流水号
|
||||
title2: '',
|
||||
orderExport: '',
|
||||
supplierExport: ''
|
||||
supplierExport: '',
|
||||
useNumber: '',
|
||||
maxUseNumber: '',
|
||||
dialogVisible4: false
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
@@ -672,6 +704,22 @@ export default {
|
||||
this.searchTable2() // 查表2
|
||||
},
|
||||
methods: {
|
||||
submitUseInventory() {
|
||||
this.$confirm('该操作不可逆,确定使用滞货?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
this.dialogVisible4 = false
|
||||
}).catch(() => {
|
||||
this.$message.info('已取消操作')
|
||||
})
|
||||
},
|
||||
useInventory(row) { // 使用滞货
|
||||
console.log(row)
|
||||
this.maxUseNumber = Number(row.滞货数量)
|
||||
this.dialogVisible4 = true
|
||||
},
|
||||
saveOrder() { // 保存询价单
|
||||
const orderNumGroup = []
|
||||
const numGroup = []
|
||||
|
||||
Reference in New Issue
Block a user