This commit is contained in:
caoqianming 2025-12-15 10:28:41 +08:00
commit 364f9320cb
3 changed files with 48 additions and 11 deletions

View File

@ -15,6 +15,12 @@
v-auth="'handover.create'" v-auth="'handover.create'"
v-if="mgroupName!=='切片'" v-if="mgroupName!=='切片'"
>返工</el-button> >返工</el-button>
<el-button
type="primary"
icon="el-icon-plus"
@click="table_add(50)"
v-auth="'handover.create'"
>改版</el-button>
<scScanner :labeltext="'交接扫码'" @scanResult="codeTextChange10"></scScanner> <scScanner :labeltext="'交接扫码'" @scanResult="codeTextChange10"></scScanner>
<scScanner :labeltext="'返工扫码'" @scanResult="codeTextChange20"></scScanner> <scScanner :labeltext="'返工扫码'" @scanResult="codeTextChange20"></scScanner>
<el-input <el-input

View File

@ -160,6 +160,21 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :md="12" :sm="24" v-if="type==50">
<el-form-item label="更改物料">
<xtSelect
:apiObj="apiObj"
:params="params"
v-model="form.material_changed"
v-model:label="form.material_changed_fname"
style="width:100%"
>
<el-table-column label="名称" prop="name"></el-table-column>
<el-table-column label="工序" prop="process_name"></el-table-column>
<el-table-column label="规格" prop="specification"></el-table-column>
</xtSelect>
</el-form-item>
</el-col>
<el-col :md="12" :sm="24" v-if="type==10&&mtype==30"> <el-col :md="12" :sm="24" v-if="type==10&&mtype==30">
<el-form-item label="更改批次"> <el-form-item label="更改批次">
<el-switch v-model="change_batch"></el-switch> <el-switch v-model="change_batch"></el-switch>
@ -269,7 +284,9 @@ export default {
}, },
initForm:{}, initForm:{},
selectObjIds:[], selectObjIds:[],
apiObj:this.$API.wpm.wmaterial.list,
apiObjM:null, apiObjM:null,
params:{},
paramsM:{}, paramsM:{},
selectObj:{}, selectObj:{},
selectObjs:[], selectObjs:[],
@ -350,11 +367,11 @@ export default {
that.form.handle_date = that.form.send_date = this.$TOOL.dateFormat2(new Date()); that.form.handle_date = that.form.send_date = this.$TOOL.dateFormat2(new Date());
that.form.send_mgroup = that.mgroupId; that.form.send_mgroup = that.mgroupId;
that.route_code = that.$route.path.split("/")[2]; that.route_code = that.$route.path.split("/")[2];
// console.log('that.route_code',that.route_code) // type=10
// console.log('that.type',that.type) // type=20
// console.log('that.mtype',that.mtype) // type=30
// console.log(that.route_code=='tuihuo'&&that.type==10&&that.mtype==10) // type=40
//type 10: 20: 40: // type=50
//mtype 10: 20: 30: //mtype 10: 20: 30:
//state 10:;20:;30:;34:;40:;50: //state 10:;20:;30:;34:;40:;50:
// //
@ -374,6 +391,9 @@ export default {
}else if(that.type==40){ }else if(that.type==40){
// //
that.paramsM = {mgroupx: that.mgroupId,page: 0,state:20}; that.paramsM = {mgroupx: that.mgroupId,page: 0,state:20};
}else if(that.type==50){
//
that.paramsM = {mgroupx: that.mgroupId,page: 0};
}else{ }else{
// //
that.paramsM = {mgroup: that.mgroupId,page: 0,state:10,tag : 'done'}; that.paramsM = {mgroup: that.mgroupId,page: 0,state:10,tag : 'done'};
@ -512,9 +532,14 @@ export default {
this.codeText = data.replace(" ",""); this.codeText = data.replace(" ","");
this.codeTextChange(this.codeText) this.codeTextChange(this.codeText)
}else{ }else{
this.form.handoverb = data; this.form.handoverb = [];
data.forEach(item=>{ data.forEach(item=>{
this.totalCount += Number(item.count); let obj = {};
obj.wm = item.id;
obj.batch = item.batch;
obj.count = item.count_canhandover;
this.form.handoverb.push(obj);
this.totalCount += Number(item.count_canhandover);
}) })
} }
} }
@ -526,8 +551,6 @@ export default {
//handoverb //handoverb
materialChange0(){ materialChange0(){
let that = this; let that = this;
// that.form.handoverb = [];
// that.handoverbIds = [];
that.totalCount = 0; that.totalCount = 0;
that.selectObjs.forEach(item=>{ that.selectObjs.forEach(item=>{
if(that.handoverbIds.indexOf(item.id)==-1){ if(that.handoverbIds.indexOf(item.id)==-1){
@ -542,6 +565,13 @@ export default {
obj.defect_name = item.defect_name; obj.defect_name = item.defect_name;
obj.count_cando = item.count_canhandover; obj.count_cando = item.count_canhandover;
obj.material = item.material; obj.material = item.material;
if(that.type==50){
that.form.material_changed = item.material;
that.form.material_changed_fname = item.material_name;
that.form.recive_mgroup = that.mgroupId;
that.form.new_batch = item.batch;
}
that.form.handoverb.push(obj); that.form.handoverb.push(obj);
that.getResaveMgroups(obj.material); that.getResaveMgroups(obj.material);
} }

View File

@ -112,13 +112,14 @@
@click="table_Check(scope.row)" @click="table_Check(scope.row)"
v-auth="'ftestwork.create'" v-auth="'ftestwork.create'"
type="primary" type="primary"
v-if="(scope.row.mgroup_name == '黑化'||scope.row.mgroup_name == '退火'||scope.row.mgroup_name == '外观检验')&&(scope.row.state == 10||scope.row.state == 20||scope.row.state == 34)" v-if="scope.row.state == 10||scope.row.state == 34"
>检验</el-button> >检验</el-button>
<!-- v-if="(scope.row.mgroup_name == '黑化'||scope.row.mgroup_name == '退火'||scope.row.mgroup_name == '外观检验')&&(scope.row.state == 10||scope.row.state == 20||scope.row.state == 34)" -->
<el-button <el-button
link size="small" link size="small"
type="warning" type="warning"
@click="tableCheckList(scope.row)" @click="tableCheckList(scope.row)"
v-if="(scope.row.mgroup_name == '黑化'||scope.row.mgroup_name == '退火'||scope.row.mgroup_name == '外观检验')&&(scope.row.state == 10||scope.row.state == 20||scope.row.state == 34)" v-if="scope.row.state == 10||scope.row.state == 34"
>检验记录</el-button> >检验记录</el-button>
<el-button @click="printMaterial(scope.row)" type="text">物料标签</el-button> <el-button @click="printMaterial(scope.row)" type="text">物料标签</el-button>
</template> </template>