Compare commits

..

No commits in common. "c37eab7bbc2389593bf84101a830fa931b6c71db" and "d3e700fcaea35441c21581cfed299d0e92af98fb" have entirely different histories.

6 changed files with 32 additions and 85 deletions

View File

@ -26,7 +26,7 @@
></el-input> ></el-input>
<scScanner @scanResult="codeTextChange" v-if="project_code!=='bxerp'"></scScanner> <scScanner @scanResult="codeTextChange" v-if="project_code!=='bxerp'"></scScanner>
</el-form-item> </el-form-item>
<el-form-item label="交接合计:"> <el-form-item label="计:">
{{ totalCount }} {{ totalCount }}
</el-form-item> </el-form-item>
<el-form-item label="原始物料" v-if="mode!='add'&&form.mtype==20" style="margin-left: 20px;"> <el-form-item label="原始物料" v-if="mode!='add'&&form.mtype==20" style="margin-left: 20px;">
@ -75,7 +75,7 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="5"> <el-col :span="5">
<el-form-item label="可交接数量"> <el-form-item label="数量">
<span>{{ listItem.count_canhandover }}</span> <span>{{ listItem.count_canhandover }}</span>
</el-form-item> </el-form-item>
</el-col> </el-col>
@ -976,8 +976,6 @@ export default {
obj.count = item.count_canhandover; obj.count = item.count_canhandover;
obj.state = res.state; obj.state = res.state;
obj.defect = res.defect; obj.defect = res.defect;
obj.defect_okcate = item.defect_okcate;
obj.tracking = item.material_ && item.material_.tracking;
obj.handoverbw = []; obj.handoverbw = [];
that.$API.wpm.wpr.list.req({wm:item.id,page:0}).then((res) => { that.$API.wpm.wpr.list.req({wm:item.id,page:0}).then((res) => {
let handoverbw = []; let handoverbw = [];

View File

@ -72,7 +72,7 @@
:query="query" :query="query"
@selection-change="selectionChange" @selection-change="selectionChange"
> >
<el-table-column type="selection" width="50" :selectable="canSelectForHandover"></el-table-column> <el-table-column type="selection" width="50"></el-table-column>
<el-table-column label="库存状态" prop="state" width="110" > <el-table-column label="库存状态" prop="state" width="110" >
<template #default="scope"> <template #default="scope">
<el-tag :type="wmState[scope.row.state]?.type"> <el-tag :type="wmState[scope.row.state]?.type">
@ -132,30 +132,24 @@
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
label="可用/库存" label="数量"
prop="count_canhandover" prop="count"
min-width="100" min-width="80"
> >
<template #default="scope"> <template #default="scope">
<el-tooltip <span v-if="scope.row.material_&&scope.row.material_.tracking==10">{{scope.row.count}}</span>
:content="`生产中:${scope.row.count_working || 0};交接中:${scope.row.count_handovering || 0}`" <el-link v-else :underline="false" type="primary" @click="showWpr(scope.row)">{{scope.row.count}}</el-link>
placement="top" </template>
>
<span>
<span :style="{ color: Number(scope.row.count_canhandover || 0) > 0 ? '#0052d9' : '#909399', fontWeight: 600 }">
{{ scope.row.count_canhandover }}
</span>
<span> / </span>
<span v-if="scope.row.material_&&scope.row.material_.tracking==10">{{scope.row.count}}</span>
<el-link v-else :underline="false" type="primary" @click.stop="showWpr(scope.row)">{{scope.row.count}}</el-link>
</span>
</el-tooltip>
</template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
label="备注" label="备注"
prop="note" prop="note"
></el-table-column> ></el-table-column>
<el-table-column
label="生产中"
prop="count_working"
min-width="80"
></el-table-column>
<el-table-column <el-table-column
label="缺陷项/标记" label="缺陷项/标记"
prop="defect_name" prop="defect_name"
@ -525,9 +519,6 @@ export default {
}); });
}, },
// //
canSelectForHandover(row) {
return Number(row.count_canhandover || 0) > 0;
},
selectionChange(selection) { selectionChange(selection) {
let that = this; let that = this;
that.selection = selection; that.selection = selection;
@ -556,26 +547,13 @@ export default {
let that = this; let that = this;
that.changebatch = true; that.changebatch = true;
let handoverb = []; let handoverb = [];
const selectableItems = that.selection.filter(item => Number(item.count_canhandover || 0) > 0); if(that.selection.length>0){
if(selectableItems.length !== that.selection.length){ that.selection.forEach(item=>{
that.$message.warning("已忽略无可交接数量的批次");
}
if(selectableItems.length === 0){
return;
}
if(selectableItems.length>0){
selectableItems.forEach(item=>{
that.Mmodel = item.material_.model; that.Mmodel = item.material_.model;
let obj = {}; let obj = {};
obj.id = item.id; obj.id = item.id;
obj.wm = item.id; obj.wm = item.id;
obj.batch = item.batch; obj.batch = item.batch;
obj.state = item.state;
obj.defect = item.defect;
obj.defect_okcate = item.defect_okcate;
obj.tracking = item.material_ && item.material_.tracking;
obj.material_ = item.material_;
obj.material = item.material;
obj.process = item.material_.process_name; obj.process = item.material_.process_name;
obj.count_canhandover = item.count_canhandover; obj.count_canhandover = item.count_canhandover;
obj.count = item.count_canhandover; obj.count = item.count_canhandover;

View File

@ -71,7 +71,7 @@
:query="query" :query="query"
@selection-change="selectionChange" @selection-change="selectionChange"
> >
<el-table-column type="selection" width="50" :selectable="canSelectForHandover"></el-table-column> <el-table-column type="selection" width="50"></el-table-column>
<el-table-column label="库存状态" prop="state" width="110" > <el-table-column label="库存状态" prop="state" width="110" >
<template #default="scope"> <template #default="scope">
<el-tag :type="wmState[scope.row.state]?.type"> <el-tag :type="wmState[scope.row.state]?.type">
@ -131,30 +131,24 @@
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
label="可用/库存" label="数量"
prop="count_canhandover" prop="count"
min-width="100" min-width="80"
> >
<template #default="scope"> <template #default="scope">
<el-tooltip <span v-if="scope.row.material_&&scope.row.material_.tracking==10">{{scope.row.count}}</span>
:content="`生产中:${scope.row.count_working || 0};交接中:${scope.row.count_handovering || 0}`" <el-link v-else :underline="false" type="primary" @click="showWpr(scope.row)">{{scope.row.count}}</el-link>
placement="top" </template>
>
<span>
<span :style="{ color: Number(scope.row.count_canhandover || 0) > 0 ? '#0052d9' : '#909399', fontWeight: 600 }">
{{ scope.row.count_canhandover }}
</span>
<span> / </span>
<span v-if="scope.row.material_&&scope.row.material_.tracking==10">{{scope.row.count}}</span>
<el-link v-else :underline="false" type="primary" @click.stop="showWpr(scope.row)">{{scope.row.count}}</el-link>
</span>
</el-tooltip>
</template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
label="备注" label="备注"
prop="note" prop="note"
></el-table-column> ></el-table-column>
<el-table-column
label="生产中"
prop="count_working"
min-width="80"
></el-table-column>
<el-table-column <el-table-column
label="缺陷项/标记" label="缺陷项/标记"
prop="defect_name" prop="defect_name"
@ -515,9 +509,6 @@ export default {
}); });
}, },
// //
canSelectForHandover(row) {
return Number(row.count_canhandover || 0) > 0;
},
selectionChange(selection) { selectionChange(selection) {
let that = this; let that = this;
that.selection = selection; that.selection = selection;
@ -545,25 +536,13 @@ export default {
batchConcat(){ batchConcat(){
this.changebatch = true; this.changebatch = true;
let handoverb = []; let handoverb = [];
const selectableItems = this.selection.filter(item => Number(item.count_canhandover || 0) > 0); if(this.selection.length>0){
if(selectableItems.length !== this.selection.length){ this.selection.forEach(item=>{
this.$message.warning("已忽略无可交接数量的批次");
}
if(selectableItems.length === 0){
return;
}
if(selectableItems.length>0){
selectableItems.forEach(item=>{
let obj = {}; let obj = {};
obj.id = item.id; obj.id = item.id;
obj.wm = item.id; obj.wm = item.id;
obj.state = item.state; obj.state = item.state;
obj.batch = item.batch; obj.batch = item.batch;
obj.defect = item.defect;
obj.defect_okcate = item.defect_okcate;
obj.tracking = item.material_ && item.material_.tracking;
obj.material_ = item.material_;
obj.material = item.material;
obj.process = item.material_.process_name; obj.process = item.material_.process_name;
obj.count_canhandover = item.count_canhandover; obj.count_canhandover = item.count_canhandover;
obj.count = item.count_canhandover; obj.count = item.count_canhandover;

View File

@ -911,8 +911,6 @@ export default {
obj.state = item.state; obj.state = item.state;
obj.defect = item.defect; obj.defect = item.defect;
obj.defect_name = item.defect_name; obj.defect_name = item.defect_name;
obj.defect_okcate = item.defect_okcate;
obj.tracking = item.material_ && item.material_.tracking;
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)

View File

@ -362,9 +362,6 @@ export default {
obj.batch = item.batch; obj.batch = item.batch;
obj.state = item.state; obj.state = item.state;
obj.defect = item.defect; obj.defect = item.defect;
obj.defect_okcate = item.defect_okcate;
obj.tracking = item.material_ && item.material_.tracking;
obj.material_ = item.material_;
obj.material = item.material; obj.material = item.material;
obj.count_canhandover = item.count_canhandover; obj.count_canhandover = item.count_canhandover;
obj.count = item.count_canhandover; obj.count = item.count_canhandover;

View File

@ -434,9 +434,6 @@ export default {
obj.batch = item.batch; obj.batch = item.batch;
obj.state = item.state; obj.state = item.state;
obj.defect = item.defect; obj.defect = item.defect;
obj.defect_okcate = item.defect_okcate;
obj.tracking = item.material_ && item.material_.tracking;
obj.material_ = item.material_;
obj.material = item.material; obj.material = item.material;
obj.count_canhandover = item.count_canhandover; obj.count_canhandover = item.count_canhandover;
obj.count = item.count_canhandover; obj.count = item.count_canhandover;