问题修改

master
zhangdi 3 days ago
parent 9d3f46c9ea
commit 4578665d0c
  1. 72
      src/views/firstOrder/components/inDialog.vue
  2. 38
      src/views/firstOrder/components/outDialog.vue

@ -123,24 +123,7 @@
</el-table-column> </el-table-column>
<el-table-column prop="model" label="规格"> </el-table-column> <el-table-column prop="model" label="规格"> </el-table-column>
<el-table-column prop="unit" label="单位"> </el-table-column> <el-table-column prop="unit" label="单位"> </el-table-column>
<el-table-column prop="type" label="类别">
<template slot-scope="scope">
<el-select
v-model="scope.row.type"
placeholder="请选择"
style="width: 100%"
:disabled="inDialogType == 'details'"
@change="handleTypeChange(scope.row)"
v-if="inDialogType != 'details'"
>
<el-option label="耐用品" value="NY"></el-option>
<el-option label="易耗品" value="YH"></el-option>
</el-select>
<span v-else>{{
scope.row.type == "NY" ? "耐用品" : "易耗品"
}}</span>
</template>
</el-table-column>
<el-table-column <el-table-column
prop="requiredQuantity" prop="requiredQuantity"
label="计划采购数量" label="计划采购数量"
@ -173,6 +156,24 @@
}}</span> }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="type" label="类别">
<template slot-scope="scope">
<el-select
v-model="scope.row.type"
placeholder="请选择"
style="width: 100%"
:disabled="inDialogType == 'details'"
@change="handleTypeChange(scope.row)"
v-if="inDialogType != 'details'"
>
<el-option label="耐用品" value="NY"></el-option>
<el-option label="易耗品" value="YH"></el-option>
</el-select>
<span v-else>{{
scope.row.type == "NY" ? "耐用品" : "易耗品"
}}</span>
</template>
</el-table-column>
<el-table-column prop="unitPrice" label="单价"> <el-table-column prop="unitPrice" label="单价">
<template slot-scope="scope"> <template slot-scope="scope">
<el-input-number <el-input-number
@ -237,23 +238,7 @@
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="model" label="物资规格"></el-table-column> <el-table-column prop="model" label="物资规格"></el-table-column>
<el-table-column prop="type" label="类别 ">
<template slot-scope="scope">
<el-select
v-model="scope.row.type"
placeholder="请选择"
style="width: 100%"
@change="handleTypeChange(scope.row)"
v-if="inDialogType !== 'details'"
>
<el-option label="耐用品" value="NY"></el-option>
<el-option label="易耗品" value="YH"></el-option>
</el-select>
<span v-else>{{
scope.row.type == "NY" ? "耐用品" : "易耗品"
}}</span>
</template>
</el-table-column>
<el-table-column prop="unit" label="单位"></el-table-column> <el-table-column prop="unit" label="单位"></el-table-column>
<el-table-column <el-table-column
prop="requiredQuantity" prop="requiredQuantity"
@ -286,6 +271,23 @@
<span v-else>{{ scope.row.theInboundQuantity || 0 }}</span> <span v-else>{{ scope.row.theInboundQuantity || 0 }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="type" label="类别 ">
<template slot-scope="scope">
<el-select
v-model="scope.row.type"
placeholder="请选择"
style="width: 100%"
@change="handleTypeChange(scope.row)"
v-if="inDialogType !== 'details'"
>
<el-option label="耐用品" value="NY"></el-option>
<el-option label="易耗品" value="YH"></el-option>
</el-select>
<span v-else>{{
scope.row.type == "NY" ? "耐用品" : "易耗品"
}}</span>
</template>
</el-table-column>
<el-table-column prop="unitPrice" label="单价"> <el-table-column prop="unitPrice" label="单价">
<template slot-scope="scope"> <template slot-scope="scope">
<el-input-number <el-input-number

@ -135,17 +135,7 @@
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="model" label="规格"> </el-table-column> <el-table-column prop="model" label="规格"> </el-table-column>
<el-table-column prop="type" label="类别">
<template slot-scope="scope">
{{
scope.row.type === "NY"
? "耐用品"
: scope.row.type === "YH"
? "易耗品"
: ""
}}
</template>
</el-table-column>
<el-table-column prop="unit" label="单位"> </el-table-column> <el-table-column prop="unit" label="单位"> </el-table-column>
<el-table-column <el-table-column
@ -212,6 +202,17 @@
<span v-else>{{ scope.row.outboundQuantity }}</span> <span v-else>{{ scope.row.outboundQuantity }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="type" label="类别">
<template slot-scope="scope">
{{
scope.row.type === "NY"
? "耐用品"
: scope.row.type === "YH"
? "易耗品"
: ""
}}
</template>
</el-table-column>
<el-table-column <el-table-column
label="操作" label="操作"
style="text-align: center" style="text-align: center"
@ -517,13 +518,14 @@ export default {
}, },
}, },
mounted() { mounted() {
this.getDetailedItems();
this.outDialogVisible = this.repairVisible; this.outDialogVisible = this.repairVisible;
if (this.outDialogType == "add") { if (this.outDialogType == "add") {
this.addInit(); this.addInit();
} else { } else {
this.inInit(); this.inInit();
} }
this.getDetailedItems();
this.sizeForm.userInfoVO = this.userInfo; this.sizeForm.userInfoVO = this.userInfo;
// this.getMaterialList() // this.getMaterialList()
}, },
@ -782,20 +784,17 @@ export default {
const selectedDept = this.departmentList.find( const selectedDept = this.departmentList.find(
(dept) => dept.departmentId === this.inBatchForm.department (dept) => dept.departmentId === this.inBatchForm.department
); );
const deptName = selectedDept ? selectedDept.department : "";
// this.sizeForm.inTableData = res.data.result.map((item) => ({
// ...item,
// IdDemandEndld: this.inBatchForm.batchType,
// department: deptName,
// }));
const processedData = res.data.result.map((item) => { const processedData = res.data.result.map((item) => {
// - // -
// 0 // 0
const appQty = Number(item.applicationQuantity || 0); const appQty = Number(item.applicationQuantity || 0);
const outQty = Number(item.outboundQuantity || 0); const outQty = Number(item.outboundQuantity || 0);
const defaultQty = appQty - outQty; const defaultQty = appQty - outQty;
if (this.inBatchForm.optionType === "YH"){
item.department = selectedDept.departmentId
item.departmentName = selectedDept.department
}
return { return {
...item, ...item,
IdDemandEndld: this.inBatchForm.batchType, IdDemandEndld: this.inBatchForm.batchType,
@ -823,6 +822,7 @@ export default {
this.dialogVisible = true; this.dialogVisible = true;
this.batchTableData = res.data.result; this.batchTableData = res.data.result;
} else { } else {
this.getStatistics(); this.getStatistics();
} }

Loading…
Cancel
Save