feat:禅道381辅料库-在出入库记录中带出单价与此次出入库记录的总金额
This commit is contained in:
parent
185144e332
commit
fd9b34c558
|
|
@ -104,6 +104,16 @@
|
|||
<el-link v-else :underline="false" type="primary" @click="showWpr(scope.row)">{{scope.row.count}}</el-link>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="单价" prop="price" v-if="cate == 'helpso'&&project_code=='gx'">
|
||||
<template #default="scope">
|
||||
<span v-if="scope.row.material_">{{ scope.row.material_.unit_price }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="金额" prop="price" v-if="cate == 'helpso'&&project_code=='gx'">
|
||||
<template #default="scope">
|
||||
<span v-if="scope.row.material_">{{ scope.row.count * Number(scope.row.material_.unit_price) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="发出数量" prop="count_send" v-if="mioObj.type == 'sale_out'&&project_code=='gx'">
|
||||
</el-table-column>
|
||||
<el-table-column label="样品数量" v-if="mioObj.type == 'sale_out'&&project_code=='gx'">
|
||||
|
|
@ -679,12 +689,12 @@ that.$API.wpm.prints.req(printer_ip, obj).then((response) => {
|
|||
if((index == 6||index == 7||index == 8||index == 9)&&column.label=='不合格数量'){
|
||||
propert = 'count_notok';
|
||||
}
|
||||
// if((index == 6||index == 7||index == 8)&&column.label=='检验'){
|
||||
// propert = 'count_tested';
|
||||
// }
|
||||
if(index == 6 &&column.label == '发出数量'){
|
||||
propert = 'count_send';
|
||||
}
|
||||
if(index == 7 &&column.label == '金额'){
|
||||
propert = 'material_.unit_price';
|
||||
}
|
||||
if (propert!=='') {
|
||||
const values = data.map((item) =>
|
||||
Number(item[propert])
|
||||
|
|
@ -710,6 +720,16 @@ that.$API.wpm.prints.req(printer_ip, obj).then((response) => {
|
|||
}
|
||||
}
|
||||
}
|
||||
if(index==7&&this.cate == 'helpso'&&this.project_code=='gx'){
|
||||
let sumsss = 0;
|
||||
data.forEach((item)=>{
|
||||
if(item.count&&item.material_.unit_price&&item.material_.unit_price!==null){
|
||||
sumsss += Number(item.count)*Number(item.material_.unit_price);
|
||||
}
|
||||
})
|
||||
sums[index] =sumsss;
|
||||
}
|
||||
|
||||
});
|
||||
return sums;
|
||||
},
|
||||
|
|
|
|||
Loading…
Reference in New Issue