滞货分析

This commit is contained in:
chenjianan
2019-03-28 11:24:09 +08:00
parent 6593847443
commit 035b9bcd31
4 changed files with 354 additions and 14 deletions

View File

@@ -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 = []