领用滞货
This commit is contained in:
@@ -144,7 +144,32 @@ export function addListDetail(PickingListNumberx, projectnumber, machinenumber,
|
||||
data: {
|
||||
type: '2',
|
||||
name: '车间装配管理_领料单_领料单明细增加',
|
||||
param: '领料单流水号=' + PickingListNumberx + '&项目流水号=' + projectnumber + '&机床流水号=' + machinenumber + '&组件流水号=' + teamNumber + '&出库数量=' + outNumber + '&零件类型=' + partType + '&备注=' + Note + '&工艺计划流水号=' + data1 + '&收件信息ID=' + data2 + '&采购合同明细流水号=' + data4 + '&请购单明细流水号=' + data5 + '&货位流水号=' + data6 + '&出库类型=' + data7 + '&物料与货位对照流水号=' + data8 + '&名称=' + data9 + '&物料规格=' + data10 + '&物料型号=' + data11 + '&零件图号=' + data12 + '&材料=' + data13
|
||||
param: '领料单流水号=' + PickingListNumberx + '&项目流水号=' + projectnumber + '&机床流水号=' + machinenumber + '&组件流水号=' + teamNumber + '&出库数量=' + outNumber + '&零件类型=' + partType + '&备注\\=' + Note + '&工艺计划流水号=' + data1 + '&收件信息ID=' + data2 + '&采购合同明细流水号=' + data4 + '&请购单明细流水号=' + data5 + '&货位流水号=' + data6 + '&出库类型=' + data7 + '&物料与货位对照流水号=' + data8 + '&名称=' + data9 + '&物料规格\\=' + data10 + '&物料型号=' + data11 + '&零件图号=' + data12 + '&材料=' + data13
|
||||
}
|
||||
})
|
||||
}
|
||||
// 查询滞货件
|
||||
export function searchBacklogPart(pageCurrent, pageSize, project_check, project, machine_check, machine, group_check, group) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '1',
|
||||
name: '采购管理_滞货件领料_查询数据',
|
||||
param: '项目流水号_check=' + project_check + '&项目流水号=' + project + '&机床流水号_check=' + machine_check + '&机床流水号=' + machine + '&组件流水号_check=' + group_check + '&组件流水号=' + group,
|
||||
Pagination: pageCurrent + '&' + pageSize
|
||||
}
|
||||
})
|
||||
}
|
||||
// 领料滞货件
|
||||
export function submitAddBacklogList(...params) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '2',
|
||||
name: '采购管理_领料单明细_滞货件_增加数据',
|
||||
param: `领料单流水号=${params[0]}&项目流水号=${params[1]}&机床流水号=${params[2]}&组件流水号=${params[3]}&出库数量=${params[4]}&备注\\=${params[5]}&货位流水号=${params[6]}&物料与货位对照流水号=${params[7]}&名称=${params[8]}&物料规格\\=${params[9]}&物料型号=${params[10]}`
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
@@ -1,13 +1,51 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 初始化项目
|
||||
export function initProject() {
|
||||
// 查询滞货使用记录
|
||||
export function searchBacklogUseRecord(pageCurrent, pageSize, status) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '1',
|
||||
name: 'PDM_项目名称_查询数据_按时间排序'
|
||||
name: '采购管理_滞货使用记录_查询数据',
|
||||
param: '关联状态=' + status,
|
||||
Pagination: pageCurrent + '&' + pageSize
|
||||
}
|
||||
})
|
||||
}
|
||||
// 查询滞货使用记录
|
||||
export function searchBacklogLocation(num) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '1',
|
||||
name: '采购管理_滞货物料与货位_查询数据',
|
||||
param: '物料流水号=' + num
|
||||
}
|
||||
})
|
||||
}
|
||||
// 提交关联
|
||||
export function submitConnectBacklog(...params) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '2',
|
||||
name: '采购管理_滞货物料关联_增加数据',
|
||||
param: `滞货使用流水号=${params[0]}&物料与货位对照流水号组=${params[1]}&关联数量组=${params[2]}`
|
||||
}
|
||||
})
|
||||
}
|
||||
// 查询滞货关联明细
|
||||
export function searchBacklogConnectDetail(num) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '1',
|
||||
name: '采购管理_滞货关联明细_查询数据',
|
||||
param: '滞货使用流水号=' + num
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
@@ -191,7 +191,7 @@ export function submitUseInventory(...params) {
|
||||
data: {
|
||||
type: '2',
|
||||
name: '采购管理_使用滞货',
|
||||
param: `物料流水号=${params[0]}&使用滞货数量=${params[1]}&组件零件流水号=${params[2]}`
|
||||
param: `物料流水号=${params[0]}&使用滞货数量=${params[1]}&组件零件流水号=${params[2]}&使用人编号=${params[3]}`
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
@@ -325,19 +325,17 @@
|
||||
</el-table-column>
|
||||
<el-table-column label="货位存量" align="center" width="120">
|
||||
<template slot-scope="scope">
|
||||
123123123
|
||||
{{ scope.row.数量 }}
|
||||
{{ scope.row.关联数量 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="待出库数量" align="center" width="120">
|
||||
<template slot-scope="scope">
|
||||
123123123
|
||||
{{ scope.row.数量 }}
|
||||
{{ scope.row.待出库数量 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="可出库数量" align="center" width="90">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.可出库数量 = scope.row.货位存量 - scope.row.待出库数量 }}
|
||||
{{ scope.row.可出库数量 = scope.row.关联数量 - scope.row.待出库数量 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" width="100">
|
||||
@@ -512,7 +510,7 @@
|
||||
|
||||
<script>
|
||||
import { initProject, searchmachine, searchTeam, searchPurchasePart, searchBasicPart, searchList, addList, dropList,
|
||||
addListDetail, searchListDetail, dropListDetail, searchHoursePart } from '@/api/Inventory/PickingList'
|
||||
addListDetail, searchListDetail, dropListDetail, searchHoursePart, searchBacklogPart, submitAddBacklogList } from '@/api/Inventory/PickingList'
|
||||
import { mapGetters } from 'vuex'
|
||||
export default {
|
||||
data() {
|
||||
@@ -819,7 +817,12 @@ export default {
|
||||
searchBacklogPart() {
|
||||
this.listLoading3 = true
|
||||
this.tableDataBacklog = []
|
||||
this.listLoading3 = false
|
||||
searchBacklogPart(this.PageCurrent3, this.PageSize3, this.ProjectValue_check, this.ProjectValue, this.MachineValue_check, this.MachineValue, this.GroupNumValue_check, this.GroupNumValue).then(response => {
|
||||
console.log(response.data.rows, 123)
|
||||
this.tableDataBacklog = response.data.rows
|
||||
this.listLoading3 = false
|
||||
this.total3 = response.data.total
|
||||
})
|
||||
},
|
||||
// 滞货件分页
|
||||
handleSizeChange3(val) {
|
||||
@@ -963,9 +966,47 @@ export default {
|
||||
}
|
||||
},
|
||||
// 增加滞货件领料单明细
|
||||
addBacklogList(row) {},
|
||||
addBacklogList(row) {
|
||||
if (this.$refs['form3'] !== undefined) {
|
||||
this.$refs['form3'].resetFields()
|
||||
}
|
||||
console.log(row)
|
||||
this.dialogFormVisible3 = true
|
||||
this.partProjectNumber = row.项目流水号
|
||||
this.partMachineNumber = row.机床流水号
|
||||
this.partGroupNumber = row.组件流水号
|
||||
this.form3.outNumber = ''
|
||||
this.form3.outNote = ''
|
||||
this.locatenumber = row.货位流水号
|
||||
this.materialLocate = row.物料与货位对照流水号
|
||||
this.materialName = row.物料名称
|
||||
this.materialType = row.物料规格
|
||||
this.materialNumber = row.物料型号
|
||||
this.enableOut = Number(row.可出库数量)
|
||||
},
|
||||
// 提交增加滞货件领料单明细
|
||||
submitAddBacklogList() {},
|
||||
submitAddBacklogList() {
|
||||
console.log(123)
|
||||
this.$refs['form3'].validate((valid) => {
|
||||
if (valid) {
|
||||
if (this.pickingListNumberx === '') {
|
||||
this.$message.error('请选择领料单')
|
||||
} else {
|
||||
submitAddBacklogList(this.pickingListNumberx, this.partProjectNumber, this.partMachineNumber, this.partGroupNumber, this.form3.outNumber, this.form3.outNote, this.locatenumber, this.materialLocate, this.materialName, this.materialType, this.materialNumber).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('增加成功')
|
||||
this.searchPartinfo()
|
||||
this.searchListinfor()
|
||||
this.searchListDetailt()
|
||||
this.dialogFormVisible3 = false
|
||||
} else {
|
||||
this.$message.error('增加失败')
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
// 增加车间采购领料单明细
|
||||
addWorkshopList(row) {
|
||||
if (this.$refs['form2'] !== undefined) {
|
||||
@@ -998,7 +1039,7 @@ export default {
|
||||
if (this.pickingListNumberx === '') {
|
||||
this.$message.error('请选择领料单')
|
||||
} else {
|
||||
addListDetail(this.pickingListNumberx, this.partProjectNumber, this.partMachineNumber, this.partGroupNumber, this.form3.outNumber, this.partType, this.form3.outNote, this.craftplannumber, this.receive, this.purchaseDetailNum, this.askPurchaseNumber, this.locatenumber, this.outType, this.materialLocate, this.materialName, this.materialType, this.materialNumber, this.partPiant, this.material).then(response => {
|
||||
addListDetail(this.pickingListNumberx, this.partProjectNumber, this.partMachineNumber, this.partGroupNumber, this.form4.outNumber, this.partType, this.form4.outNote, this.craftplannumber, this.receive, this.purchaseDetailNum, this.askPurchaseNumber, this.locatenumber, this.outType, this.materialLocate, this.materialName, this.materialType, this.materialNumber, this.partPiant, this.material).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('增加成功')
|
||||
this.searchPartinfo()
|
||||
|
||||
@@ -1,17 +1,179 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-card></el-card>
|
||||
<el-card>
|
||||
<div slot="header" class="clearfix">
|
||||
<span>关联状态:</span>
|
||||
<el-checkbox-group v-model="connectStatus" :min="1" size="small" style="display: inline-block">
|
||||
<el-checkbox label="0">未关联</el-checkbox>
|
||||
<el-checkbox label="1">已关联</el-checkbox>
|
||||
</el-checkbox-group>
|
||||
<el-button size="small" type="success" icon="el-icon-search" style="margin: 0 0 0 10px" @click="pageCurrent1=1;pageSize1=10;total1=0;searchTable1();">查询</el-button>
|
||||
</div>
|
||||
<h4 style="margin-top: 0">滞货使用情况表</h4>
|
||||
<el-table :data="tableData1" size="mini" stripe border style="width: 100%;" highlight-current-row height="440" @row-click="searchConnect">
|
||||
<el-table-column label="关联状态" align="center" width="100">
|
||||
<template slot-scope="scope">
|
||||
<el-tag v-if="Number(scope.row.是否关联)===1" type="success" size="small">已关联</el-tag>
|
||||
<el-tag v-else type="info" size="small">未关联</el-tag>
|
||||
</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="150">
|
||||
<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="80">
|
||||
<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="90">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.姓名 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="使用时间" align="center" width="140">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.操作时间 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" width="100">
|
||||
<template slot-scope="scope">
|
||||
<el-button :disabled="Number(scope.row.是否关联)===1" size="mini" type="primary" @click="connectBacklog(scope.row)">关联物料</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div class="block" style="margin: 10px 0;">
|
||||
<el-pagination
|
||||
:current-page="PageCurrent1"
|
||||
:page-sizes="[10, 20, 30, 40]"
|
||||
:page-size="PageSize1"
|
||||
:total="total1"
|
||||
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="220">
|
||||
<el-table-column label="序号" align="center" type="index" width="80"/>
|
||||
<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" min-width="80">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.关联数量 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-card>
|
||||
|
||||
<el-dialog :visible.sync="dialogVisible1" title="关联物料" center style="min-height: 300px;" width="900px">
|
||||
<el-table :data="tableData01" size="mini" border style="width: 100%;" height="220" show-summary @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" align="center" width="55"/>
|
||||
<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="120" prop="关联数量">
|
||||
<template slot-scope="scope">
|
||||
<el-input-number :min="0" v-model="scope.row.关联数量" size="mini" controls-position="right" style="width: 100%"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button size="small" @click="dialogVisible1=false">取消</el-button>
|
||||
<el-button type="primary" size="small" @click="submitConnectBacklog">确定</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {} from '@/api/PurchasingCenter/BacklogGoodsPrepare'
|
||||
import { searchBacklogUseRecord, searchBacklogLocation, submitConnectBacklog, searchBacklogConnectDetail } from '@/api/PurchasingCenter/BacklogGoodsPrepare'
|
||||
import { mapGetters } from 'vuex'
|
||||
export default {
|
||||
name: 'BacklogGoodsPrepare',
|
||||
data() {
|
||||
return {
|
||||
tableData: []
|
||||
connectStatus: ['0'],
|
||||
tableData1: [],
|
||||
PageCurrent1: 1,
|
||||
PageSize1: 10,
|
||||
total1: 0,
|
||||
tableData2: [],
|
||||
dialogVisible1: false,
|
||||
tableData01: [],
|
||||
multipleSelection: [],
|
||||
useNumber: '', // 使用数量
|
||||
useNum: '' // 滞货使用流水号
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
@@ -21,9 +183,83 @@ export default {
|
||||
},
|
||||
mounted() {
|
||||
this.initData()
|
||||
this.searchTable1()
|
||||
},
|
||||
methods: {
|
||||
initData() {}
|
||||
// 初始化数据
|
||||
initData() {},
|
||||
// 查询滞货使用记录
|
||||
searchTable1() {
|
||||
let status
|
||||
if (Number(this.connectStatus) === 0) {
|
||||
status = 0
|
||||
} else if (Number(this.connectStatus) === 1) {
|
||||
status = 1
|
||||
} else {
|
||||
status = 2
|
||||
}
|
||||
searchBacklogUseRecord(this.PageCurrent1, this.PageSize1, status).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()
|
||||
},
|
||||
// 查询滞货关联
|
||||
searchConnect(row) {
|
||||
searchBacklogConnectDetail(row.滞货使用流水号).then(response => {
|
||||
this.tableData2 = response.data
|
||||
})
|
||||
},
|
||||
// 关联物料
|
||||
connectBacklog(row) {
|
||||
this.dialogVisible1 = true
|
||||
this.useNumber = row.使用滞货数量
|
||||
this.useNum = row.滞货使用流水号
|
||||
searchBacklogLocation(row.物料流水号).then(response => {
|
||||
this.tableData01 = response.data
|
||||
this.tableData01.map(v => {
|
||||
this.$set(v, '关联数量', 0)
|
||||
return v
|
||||
})
|
||||
})
|
||||
},
|
||||
// 多选
|
||||
handleSelectionChange(val) {
|
||||
this.multipleSelection = val
|
||||
},
|
||||
// 提交关联物料
|
||||
submitConnectBacklog() {
|
||||
let sum = 0
|
||||
const numGroup = []
|
||||
const materialLocalGroup = []
|
||||
for (let i = 0; i < this.multipleSelection.length; i++) {
|
||||
sum += this.multipleSelection[i].关联数量
|
||||
numGroup.push(this.multipleSelection[i].关联数量)
|
||||
materialLocalGroup.push(this.multipleSelection[i].物料与货位对照流水号)
|
||||
}
|
||||
if (sum === Number(this.useNumber)) {
|
||||
submitConnectBacklog(this.useNum, materialLocalGroup, numGroup).then(response => {
|
||||
console.log(response.data)
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('关联成功')
|
||||
this.searchTable1()
|
||||
this.dialogVisible1 = false
|
||||
} else {
|
||||
this.$message.error('关联失败')
|
||||
}
|
||||
})
|
||||
} else {
|
||||
this.$message.error('关联数量有误')
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -41,4 +277,7 @@ export default {
|
||||
span{
|
||||
margin: 10px 0 10px 10px;
|
||||
}
|
||||
.el-tag{
|
||||
margin: 0
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -97,14 +97,14 @@
|
||||
{{ Number(scope.row.使用滞货数量) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="使用滞货" align="center" min-width="130">
|
||||
<el-table-column label="使用滞货" align="center" min-width="70">
|
||||
<template slot-scope="scope">
|
||||
<el-tooltip class="item" effect="dark" content="使用滞货" placement="top-start">
|
||||
<el-button :disabled="parseInt(scope.row.询价状态编号)!==1||parseInt(scope.row.是否确认)!==1||Number(scope.row.滞货数量)===0" icon="el-icon-goods" plain type="primary" size="mini" @click="useInventory(scope.row)"/>
|
||||
</el-tooltip>
|
||||
<el-tooltip class="item" effect="dark" content="取消使用滞货" placement="top-start">
|
||||
<el-button :disabled="parseInt(scope.row.询价状态编号)!==1||parseInt(scope.row.是否确认)!==1||Number(scope.row.使用滞货数量)===0" icon="el-icon-sold-out" plain type="danger" size="mini" @click="cancelUseInventory(scope.row)"/>
|
||||
</el-tooltip>
|
||||
<!--<el-tooltip class="item" effect="dark" content="使用滞货" placement="top-start">-->
|
||||
<el-button :disabled="parseInt(scope.row.询价状态编号)!==1||parseInt(scope.row.是否确认)!==1||Number(scope.row.滞货数量)===0" icon="el-icon-goods" plain type="primary" size="mini" @click="useInventory(scope.row)"/>
|
||||
<!--</el-tooltip>-->
|
||||
<!--<el-tooltip class="item" effect="dark" content="取消使用滞货" placement="top-start">-->
|
||||
<!--<el-button :disabled="parseInt(scope.row.询价状态编号)!==1||parseInt(scope.row.是否确认)!==1||Number(scope.row.使用滞货数量)===0" icon="el-icon-sold-out" plain type="danger" size="mini" @click="cancelUseInventory(scope.row)"/>-->
|
||||
<!--</el-tooltip>-->
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="滞货数量" align="center" min-width="80">
|
||||
@@ -573,10 +573,10 @@
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
<el-dialog :visible.sync="dialogVisible4" title="使用滞货" center style="min-height: 300px;" width="460px">
|
||||
<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 style="margin-top: 10px;color: red">注意:若设置待询价物料全部使用滞货,则将不可再取消使用滞货</div>
|
||||
<div style="margin: 10px 0 0 10px;color: red">注意:确定后将不可取消使用滞货</div>
|
||||
<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>
|
||||
@@ -588,7 +588,7 @@
|
||||
<script>
|
||||
import { searchMaterial, searchPart, searchSupplier, searchCreateInquirySheet, searchCreateInquirySheet2, searchSheetDetail, editInquirySheet,
|
||||
createInquirySheet, deleteInquirySheet, addInquirySheet1, addInquirySheet2, outInquirySheet, searchAllMaterial, materialChange, saveOrder,
|
||||
submitUseInventory, cancelUseInventory } from '@/api/PurchasingCenter/CreateInquirySheet'
|
||||
submitUseInventory } from '@/api/PurchasingCenter/CreateInquirySheet'
|
||||
import { mapGetters } from 'vuex'
|
||||
import { exportExcelMethod } from './exportExcel'
|
||||
|
||||
@@ -712,7 +712,7 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
submitUseInventory() {
|
||||
submitUseInventory(this.backlogMaterialNum, this.useNumber, this.backlogGroupPartNum).then(response => {
|
||||
submitUseInventory(this.backlogMaterialNum, this.useNumber, this.backlogGroupPartNum, this.id).then(response => {
|
||||
console.log(response.data)
|
||||
if (response.data[0].result === '1') {
|
||||
this.searchTable11()
|
||||
@@ -729,27 +729,27 @@ export default {
|
||||
this.backlogGroupPartNum = row.组件零件流水号
|
||||
this.dialogVisible4 = true
|
||||
},
|
||||
cancelUseInventory(row) { // 取消使用滞货
|
||||
console.log(row)
|
||||
this.backlogMaterialNum = row.物料流水号
|
||||
this.backlogGroupPartNum = row.组件零件流水号
|
||||
this.cancelNum = row.使用滞货数量
|
||||
this.$confirm('确定取消使用滞货?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
console.log(this.backlogMaterialNum, this.cancelNum, this.backlogGroupPartNum)
|
||||
cancelUseInventory(this.backlogMaterialNum, this.cancelNum, this.backlogGroupPartNum).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.searchTable11()
|
||||
this.$message.success('操作成功')
|
||||
} else { this.$message.error('操作失败') }
|
||||
})
|
||||
}).catch(() => {
|
||||
this.$message.info('已取消操作')
|
||||
})
|
||||
},
|
||||
// cancelUseInventory(row) { // 取消使用滞货
|
||||
// console.log(row)
|
||||
// this.backlogMaterialNum = row.物料流水号
|
||||
// this.backlogGroupPartNum = row.组件零件流水号
|
||||
// this.cancelNum = row.使用滞货数量
|
||||
// this.$confirm('确定取消使用滞货?', '提示', {
|
||||
// confirmButtonText: '确定',
|
||||
// cancelButtonText: '取消',
|
||||
// type: 'warning'
|
||||
// }).then(() => {
|
||||
// console.log(this.backlogMaterialNum, this.cancelNum, this.backlogGroupPartNum)
|
||||
// cancelUseInventory(this.backlogMaterialNum, this.cancelNum, this.backlogGroupPartNum).then(response => {
|
||||
// if (response.data[0].result === '1') {
|
||||
// this.searchTable11()
|
||||
// this.$message.success('操作成功')
|
||||
// } else { this.$message.error('操作失败') }
|
||||
// })
|
||||
// }).catch(() => {
|
||||
// this.$message.info('已取消操作')
|
||||
// })
|
||||
// },
|
||||
saveOrder() { // 保存询价单
|
||||
const orderNumGroup = []
|
||||
const numGroup = []
|
||||
|
||||
Reference in New Issue
Block a user