新购编码入库

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