fix:光芯交接改动
This commit is contained in:
parent
f749fc14f0
commit
5a3ffca288
|
@ -37,11 +37,12 @@
|
||||||
<el-form-item label="交接物料">
|
<el-form-item label="交接物料">
|
||||||
<xtSelect
|
<xtSelect
|
||||||
:apiObj="apiObjM"
|
:apiObj="apiObjM"
|
||||||
v-model="form.wm_in"
|
v-model="selectObjIds"
|
||||||
v-model:obj="selectObj"
|
v-model:obj="selectObjs"
|
||||||
:labelField="'batch'"
|
:labelField="'batch'"
|
||||||
style="width: 100%;"
|
style="width: 100%;"
|
||||||
:params = "paramsM"
|
:params = "paramsM"
|
||||||
|
:multiple="true"
|
||||||
@change="materialChange0"
|
@change="materialChange0"
|
||||||
>
|
>
|
||||||
<el-table-column label="物料" prop="full_name">
|
<el-table-column label="物料" prop="full_name">
|
||||||
|
@ -52,7 +53,7 @@
|
||||||
<span v-if="scope.row.defect_name !== null" style="color: orangered">{{ scope.row.defect_name }}</span>
|
<span v-if="scope.row.defect_name !== null" style="color: orangered">{{ scope.row.defect_name }}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="数量" prop="count_canhandover" width="110px"></el-table-column>
|
<el-table-column label="可交接数量" prop="count_canhandover" width="110px"></el-table-column>
|
||||||
</xtSelect>
|
</xtSelect>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
@ -233,9 +234,11 @@ export default {
|
||||||
recive_mgroup: null,
|
recive_mgroup: null,
|
||||||
handoverb:[],
|
handoverb:[],
|
||||||
},
|
},
|
||||||
|
selectObjIds:[],
|
||||||
apiObjM:null,
|
apiObjM:null,
|
||||||
paramsM:{},
|
paramsM:{},
|
||||||
selectObj:{},
|
selectObj:{},
|
||||||
|
selectObjs:[],
|
||||||
rules: {
|
rules: {
|
||||||
batch: [
|
batch: [
|
||||||
{
|
{
|
||||||
|
@ -441,9 +444,11 @@ export default {
|
||||||
},
|
},
|
||||||
//显示
|
//显示
|
||||||
open(mode = "add",data,mtype) {
|
open(mode = "add",data,mtype) {
|
||||||
|
console.log(data)
|
||||||
this.mode = mode;
|
this.mode = mode;
|
||||||
this.mtype = mtype;
|
this.mtype = mtype;
|
||||||
if(data!==''&&data!==null&&data!==undefined){
|
if(data!==''&&data!==null&&data!==undefined){
|
||||||
|
console.log(typeof(data)=='string')
|
||||||
if(typeof(data)=='string'){
|
if(typeof(data)=='string'){
|
||||||
this.codeText = data.replace(" ","");
|
this.codeText = data.replace(" ","");
|
||||||
this.codeTextChange(this.codeText)
|
this.codeTextChange(this.codeText)
|
||||||
|
@ -462,35 +467,23 @@ export default {
|
||||||
},
|
},
|
||||||
materialChange0(){
|
materialChange0(){
|
||||||
let that = this;
|
let that = this;
|
||||||
if(that.selectObj.count_canhandover>0){
|
that.form.handoverb = [];
|
||||||
|
that.totalCount = 0;
|
||||||
|
that.selectObjs.forEach(item=>{
|
||||||
let obj = {};
|
let obj = {};
|
||||||
obj.wm = that.selectObj.id;
|
obj.wm = item.id;
|
||||||
obj.state = that.selectObj.state;
|
obj.state = item.state;
|
||||||
obj.batch = that.selectObj.batch;
|
obj.batch = item.batch;
|
||||||
obj.label = that.selectObj.defect !== null?that.selectObj.batch+'('+that.selectObj.material_name+')'+that.selectObj.defect_name:that.selectObj.batch+'('+that.selectObj.material_name+')';
|
obj.label = item.defect !== null?item.batch+'('+item.material_name+')'+item.defect_name:item.batch+'('+item.material_name+')';
|
||||||
obj.count = that.selectObj.count_canhandover;
|
obj.count = item.count_canhandover;
|
||||||
obj.defect = that.selectObj.defect;
|
obj.defect = item.defect;
|
||||||
obj.defect_name = that.selectObj.defect_name;
|
obj.defect_name = item.defect_name;
|
||||||
obj.count_cando = that.selectObj.count_canhandover;
|
obj.count_cando = item.count_canhandover;
|
||||||
obj.material = that.selectObj.material;
|
obj.material = item.material;
|
||||||
if(that.form.handoverb.length>0){
|
that.totalCount += Number(obj.count);
|
||||||
let datas = that.form.handoverb.filter((item) => {
|
|
||||||
return item.wm==that.selectObj.id;
|
|
||||||
});
|
|
||||||
if(datas.length>0){
|
|
||||||
that.$message.warning('该物料已存在');
|
|
||||||
}else{
|
|
||||||
that.totalCount += Number(obj.count_canhandover);
|
|
||||||
that.form.handoverb.push(obj);
|
that.form.handoverb.push(obj);
|
||||||
}
|
|
||||||
}else{
|
|
||||||
that.totalCount += Number(obj.count_canhandover);
|
|
||||||
that.form.handoverb.push(obj);
|
|
||||||
}
|
|
||||||
that.getResaveMgroups(obj.material);
|
that.getResaveMgroups(obj.material);
|
||||||
}else{
|
})
|
||||||
that.$message.warning('该物料暂无可交接数量');
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
countChange(){
|
countChange(){
|
||||||
let that = this;
|
let that = this;
|
||||||
|
@ -553,11 +546,19 @@ export default {
|
||||||
},
|
},
|
||||||
//表单注入数据
|
//表单注入数据
|
||||||
setData(data) {
|
setData(data) {
|
||||||
|
console.log(data)
|
||||||
|
let that = this;
|
||||||
Object.assign(this.form, data);
|
Object.assign(this.form, data);
|
||||||
|
that.totalCount = 0;
|
||||||
|
that.form.handoverb = data.handoverb;
|
||||||
|
data.handoverb.forEach(item=>{
|
||||||
|
item.label = item.batch;
|
||||||
|
that.totalCount += Number(item.count);
|
||||||
|
})
|
||||||
if(data.type==30){
|
if(data.type==30){
|
||||||
this.getUserList3();
|
that.getUserList3();
|
||||||
}else{
|
}else{
|
||||||
this.getUserList2();
|
that.getUserList2();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
//设置过滤项
|
//设置过滤项
|
||||||
|
@ -594,7 +595,7 @@ export default {
|
||||||
if(res1.length>0){
|
if(res1.length>0){
|
||||||
res1.forEach(item=>{
|
res1.forEach(item=>{
|
||||||
let cando = Number(item.count_canhandover);
|
let cando = Number(item.count_canhandover);
|
||||||
if(cando>0&&item.defect_name==res.defect_name){
|
if(cando>0&&(item.defect==null||item.defect_name==res.defect_name)){
|
||||||
let obj = {};
|
let obj = {};
|
||||||
obj.wm = item.id;
|
obj.wm = item.id;
|
||||||
obj.batch = item.batch;
|
obj.batch = item.batch;
|
||||||
|
@ -606,11 +607,9 @@ export default {
|
||||||
obj.count_cando = cando;
|
obj.count_cando = cando;
|
||||||
obj.material = item.material;
|
obj.material = item.material;
|
||||||
that.form.handoverb.push(obj)
|
that.form.handoverb.push(obj)
|
||||||
|
that.totalCount += Number(obj.count);
|
||||||
that.getResaveMgroups(obj.material);
|
that.getResaveMgroups(obj.material);
|
||||||
}
|
}
|
||||||
// else{
|
|
||||||
// that.$message.error("该批次物料没有可交接的数量")
|
|
||||||
// }
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
that.codeText = '';
|
that.codeText = '';
|
||||||
|
|
Loading…
Reference in New Issue