物料管理
This commit is contained in:
@@ -113,7 +113,7 @@
|
||||
<!--clearable-->
|
||||
<!--@dblclick.native="param=0;openSupplier()"/>-->
|
||||
</el-col>
|
||||
<el-col style="width: 450px">
|
||||
<el-col style="width: 550px">
|
||||
<el-button
|
||||
type="success"
|
||||
icon="el-icon-search"
|
||||
@@ -131,6 +131,9 @@
|
||||
@click="CategoryMaintenance">维护物料类别
|
||||
</el-button>
|
||||
<el-button type="primary" style="margin-bottom: 3px;margin-top: 10px" icon="el-icon-circle-plus-outline" size="small" @click="open()">新增供货商</el-button>
|
||||
<el-badge :value="weishenhe" class="item">
|
||||
<el-button type="primary" size="small" @click="daishenhe()">待审核</el-button>
|
||||
</el-badge>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-card>
|
||||
@@ -480,6 +483,61 @@
|
||||
<el-button type="primary" @click="AddGonghuoshang('form3')">确定</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
<el-dialog v-el-drag-dialog :visible.sync="dialogFormVisible4" title="采购部申请物料" center style="min-height: 300px" width="700px">
|
||||
<el-form>
|
||||
<el-table
|
||||
:data="tableData5"
|
||||
style="width: 100%;margin-top: 3px"
|
||||
height="300"
|
||||
size="mini"
|
||||
highlight-current-row
|
||||
border
|
||||
stripe>
|
||||
<el-table-column align="center" label="物料名称">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.物料名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="物料规格">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.物料规格 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="物料型号">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.物料型号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="供货商">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.供货商 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" fixed="right" align="center" width="150">
|
||||
<template slot-scope="scope">
|
||||
<div style="display: inline-block">
|
||||
<el-button type="primary" size="small" @click="Tongguo(scope.row)">通过</el-button>
|
||||
</div>
|
||||
<div style="display: inline-block">
|
||||
<el-popover
|
||||
placement="bottom"
|
||||
width="400"
|
||||
trigger="click">
|
||||
<span>打回原因:</span>
|
||||
<el-input v-model="打回原因" placeholder="打回原因" size="small" clearable/>
|
||||
<el-button type="danger" size="small" @click="queren()">确认</el-button>
|
||||
<el-button slot="reference" type="danger" size="small" @click="Dahui(scope.row)">打回</el-button>
|
||||
</el-popover>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button @click="dialogFormVisible4=false">关闭</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -504,13 +562,22 @@ import {
|
||||
deleteCategory,
|
||||
editVariety,
|
||||
addVariety,
|
||||
deleteVariety
|
||||
deleteVariety,
|
||||
getMaterial,
|
||||
searchmateria5,
|
||||
Dahui,
|
||||
Tongguo
|
||||
} from '@/api/PurchasingCenter/MaterialManagement'
|
||||
import { mapGetters } from 'vuex'
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
打回原因: '',
|
||||
物料流水号: '',
|
||||
tableData5: [],
|
||||
dialogFormVisible4: false,
|
||||
weishenhe: 0,
|
||||
Gonghuoshang: [],
|
||||
Gonghuoshang2: [],
|
||||
GonghuoshangValue: '',
|
||||
@@ -605,11 +672,62 @@ export default {
|
||||
])
|
||||
},
|
||||
created() {
|
||||
this.getMaterial()
|
||||
this.fetchData()
|
||||
this.searchMaterialCategory()
|
||||
this.getGonghuoshang()
|
||||
},
|
||||
methods: {
|
||||
// 通过
|
||||
Tongguo(row) {
|
||||
this.$confirm('通过该物料, 是否继续?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
Tongguo(row.物料流水号).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.getMaterial()
|
||||
this.daishenhe()
|
||||
this.searchMaterial()
|
||||
this.$message.success('通过成功')
|
||||
} else { this.$message.error('通过失败') }
|
||||
})
|
||||
}).catch(() => {
|
||||
this.$message({
|
||||
type: 'info',
|
||||
message: '已取消通过'
|
||||
})
|
||||
})
|
||||
},
|
||||
// 打回
|
||||
Dahui(row) {
|
||||
this.物料流水号 = row.物料流水号
|
||||
},
|
||||
// 打回确认
|
||||
queren() {
|
||||
Dahui(this.物料流水号, this.打回原因).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.getMaterial()
|
||||
this.daishenhe()
|
||||
this.$message.success('打回成功')
|
||||
} else { this.$message.error('打回失败') }
|
||||
})
|
||||
},
|
||||
// 查询采购部物料申请明细
|
||||
daishenhe() {
|
||||
this.tableData5 = []
|
||||
searchmateria5(0, 0, 0, 0, 0, 0, 0, 0, 1, 1000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0).then(response => {
|
||||
this.tableData5 = response.data.result
|
||||
this.dialogFormVisible4 = true
|
||||
})
|
||||
},
|
||||
// 查询待审核物料数量
|
||||
getMaterial() {
|
||||
getMaterial().then(response => {
|
||||
this.weishenhe = response.data[0].数量
|
||||
})
|
||||
},
|
||||
getGonghuoshang() { // 供货商初始化查询
|
||||
this.Gonghuoshang = []
|
||||
this.Gonghuoshang2 = []
|
||||
@@ -726,7 +844,7 @@ export default {
|
||||
this.editForm(row, 'form', [this.title = '编辑', this.dialogFormVisible1 = true])
|
||||
},
|
||||
submitEdit() {
|
||||
this.editTable(editData, [this.form.物料流水号, this.form.物料品种流水号, this.form.物料名称, this.form.物料全名, this.form.物料规格, this.form.物料型号, this.form.计量单位流水号, this.form.物料来源流水号, this.supplierValue1], 'form', function() {
|
||||
this.editTable(editData, [this.form.物料流水号, this.form.物料品种流水号, this.form.物料名称, this.form.物料全名, this.form.物料规格, this.form.物料型号, this.form.计量单位流水号, this.form.物料来源流水号, this.form.GonghuoshangValue], 'form', function() {
|
||||
this.searchMaterial()
|
||||
this.dialogFormVisible1 = false
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user