fix:交接完善1

This commit is contained in:
shijing 2025-12-10 14:16:56 +08:00
parent 413e5a8c17
commit 37b4fc5662
2 changed files with 30 additions and 5 deletions

View File

@ -1,7 +1,7 @@
<template> <template>
<el-container> <el-container>
<el-header> <el-header>
<div class="left-panel"> <div class="left-panel" v-if="!isFeiPinku">
<el-button <el-button
type="primary" type="primary"
icon="el-icon-plus" icon="el-icon-plus"
@ -22,6 +22,7 @@
v-auth="'handover.create'" v-auth="'handover.create'"
>改版</el-button> >改版</el-button>
</div> </div>
<div class="left-panel" v-else></div>
<div class="right-panel"> <div class="right-panel">
<el-select <el-select
v-model="searchType" v-model="searchType"
@ -250,6 +251,10 @@ export default {
type: String, type: String,
default: "", default: "",
}, },
isFeiPinku: {
type: Boolean,
default: false,
},
}, },
name: "handover", name: "handover",
components: { components: {

View File

@ -224,7 +224,7 @@
</el-col> </el-col>
<el-col :md="12" :sm="24" v-if="change_batch"> <el-col :md="12" :sm="24" v-if="change_batch">
<el-form-item label="新批次号" prop="new_batch"> <el-form-item label="新批次号" prop="new_batch">
<el-input v-model="form.new_batch" placeholder="新批次号" @change="new_batch(form.new_batch)" :disabled="type==50"></el-input> <el-input v-model="form.new_batch" placeholder="新批次号" @change="new_batch(form.new_batch)" :disabled="type==50&&isFeiPinku"></el-input>
<span style="color: red;">请手动录入新批次号不要用已有批次</span> <span style="color: red;">请手动录入新批次号不要用已有批次</span>
</el-form-item> </el-form-item>
</el-col> </el-col>
@ -253,6 +253,10 @@ export default {
type: String, type: String,
default: "", default: "",
}, },
isFeiPinku: {
type: Boolean,
default: false,
},
tag: { tag: {
type: String, type: String,
default: "done", default: "done",
@ -474,11 +478,14 @@ export default {
let that = this; let that = this;
var req = { var req = {
page: 0, page: 0,
tag:that.tag,
mgroupx:that.mgroupId mgroupx:that.mgroupId
}; };
if(that.type!==50){ if(that.type==50){
req.state = 50;
req.state_all= 1;
}else{
req.state = 10; req.state = 10;
req.tag = that.tag;
} }
that.materialOptions = []; that.materialOptions = [];
this.$API.wpm.wmaterial.list.req(req).then((res) => { this.$API.wpm.wmaterial.list.req(req).then((res) => {
@ -616,9 +623,17 @@ export default {
if(data&&data!==''&&data.length>0){ if(data&&data!==''&&data.length>0){
that.totalCount = 0; that.totalCount = 0;
data.forEach((item,index)=>{ data.forEach((item,index)=>{
item.wm = item.id;
that.totalCount += Number(item.count); that.totalCount += Number(item.count);
that.getWprList(item.wm,index); that.getWprList(item.wm,index);
}) })
console.log('that.isFeiPinku',that.isFeiPinku);
if(that.isFeiPinku){
console.log('data[0].material',data[0].material);
that.form.new_batch = data[0].batch;
that.form.material_changed = data[0].material;
that.form.material_changed_fname = data[0].material_name;
}
} }
that.visible = true; that.visible = true;
return this; return this;
@ -636,9 +651,14 @@ export default {
data = that.materialOptions.filter((item) => { data = that.materialOptions.filter((item) => {
return that.selectItems.indexOf(item.id)>-1; return that.selectItems.indexOf(item.id)>-1;
}); });
if(that.type==50){ if(that.type==50&&!that.isFeiPinku){
that.form.new_batch = data[0].batch+'-G'; that.form.new_batch = data[0].batch+'-G';
} }
if(that.type==50&&that.isFeiPinku){
that.form.new_batch = data[0].batch;
that.form.material_changed = data[0].material;
that.form.material_changed_fname = data[0].material_name;
}
let materialId = data[0].material; let materialId = data[0].material;
if(that.type==50){}else{ if(that.type==50){}else{
let params = { let params = {