新购编码入库

This commit is contained in:
zzyuan 2024-11-18 14:21:13 +08:00
parent d733f047a6
commit 5abd6c1b7f
1 changed files with 40 additions and 23 deletions

View File

@ -92,9 +92,17 @@
</template>
</el-table-column>
<el-table-column label="验收结论" align="center" prop="checkResult" :show-overflow-tooltip="true"/>
<el-table-column label="状态" align="center" prop="status" :show-overflow-tooltip="true">
<template slot-scope="scope">
<dict-tag
:options="dict.type.purchase_task_status"
:value="scope.row.status"
/>
</template>
</el-table-column>
<el-table-column label="操作" align="center" width="180" v-if="!isView">
<template slot-scope="scope">
<el-button size="mini" type="success" @click="pass(scope.row)">
<el-button size="mini" type="success" @click="pass(scope.row)" v-if="(scope.row.status!=19&&scope.row.manageType==1)||scope.row.manageType==0">
入库
</el-button>
<!-- <el-button size="mini" type="danger" @click="reject(scope.row)">
@ -165,7 +173,7 @@
</el-col>
</el-row>
<el-table :data="codeTableData" width="100%" height="450px" row-key="id" @selection-change="codeSelection">
<el-table-column type="selection" width="55" align="center" :reserve-selection="true" v-if="!isView"/>
<el-table-column type="selection" width="55" align="center" v-if="!isView"/>
<el-table-column label="序号" type="index" width="55" align="center"/>
<el-table-column label="类型名称" prop="typeName" align="center" :show-overflow-tooltip="true">
<template slot-scope="scope">
@ -202,6 +210,7 @@ import { downloadFile } from '@/utils/download'
import { getToken } from '@/utils/auth'
export default {
name: "GoodsAcceptDetail",
dicts: ["purchase_task_status"],
data() {
return {
Id:'',
@ -351,8 +360,9 @@ export default {
}
getMachineById(param).then((res)=>{
this.codeTableData=res.data
})
this.inPutList=[]
this.openCode=true
})
}else{
let obj = {
taskId: this.taskId,
@ -371,29 +381,36 @@ export default {
},
//
codeSelection(selection){
this.inPutList = selection.map(item => item.maCode)
console.log(selection)
this.inPutList = selection.map(item => {return {'maCode':item.maCode}})
},
//
codeWarehouse(){
if(this.inPutList.length>0){
let obj = {
taskId: this.taskId,
typeId:this.codeRowData.typeId,
purchaseId: this.codeRowData.id,
inPutList: this.inPutList
};
console.log(obj)
this.$modal.confirm('是否确认新购入库勾选的编码?')
.then(function() {
return purchaseWarehouse(obj)
}).then(() => {
let param={
taskId:this.taskId,
typeId:this.codeRowData.typeId
}
getMachineById(param).then((res)=>{
this.codeTableData=res.data
})
// let param={
// taskId:this.taskId,
// typeId:this.codeRowData.typeId
// }
// getMachineById(param).then((res)=>{
// this.codeTableData=res.data
// })
this.openCode=false
this.$modal.msgSuccess('入库成功')
}).catch(() => {});
}else{
this.$modal.msgError('请先勾选入库编码!')
}
},
//