flx:修改中科安信 物料单位

This commit is contained in:
Rain 2024-08-16 18:42:44 +08:00
parent 725b0f8507
commit 76f8b79e42
2 changed files with 50 additions and 13 deletions

View File

@ -903,7 +903,9 @@ export default {
name: this.searchName,
specification: this.searchSpecification,
unit: this.searchUnit,
unitPrice: this.searchUnitPricr
unitPrice: this.searchUnitPricr,
pageNo: 1,
pageSize: -1,
};
getGtMaterialWarehouseDetailPageApi(data).then((res) => {
if (res.code == 200) {

View File

@ -51,7 +51,7 @@
label="项目计划用量"
>
<template slot-scope="scope">
{{
<!-- {{
scope.row.materialUnit == 1
? scope.row.projectPlanUsage? scope.row.projectPlanUsage+'斤':''
: scope.row.materialUnit == 2
@ -61,12 +61,13 @@
: scope.row.materialUnit == 4
? scope.row.projectPlanUsage? scope.row.projectPlanUsage+ '吨':''
: scope.row.projectPlanUsage
}}
}} -->
{{scope.row.projectPlanUsage?scope.row.projectPlanUsage + scope.row.materialUnit : ''}}
</template>
</el-table-column>
<el-table-column prop="inventoryNumber" align="center" label="库存数">
<template slot-scope="scope">
{{
<!-- {{
scope.row.materialUnit == 1
? scope.row.inventoryNumber?scope.row.inventoryNumber + '斤':''
: scope.row.materialUnit == 2
@ -76,7 +77,8 @@
: scope.row.materialUnit == 4
? scope.row.inventoryNumber?scope.row.inventoryNumber + '吨':''
: scope.row.inventoryNumber
}}
}} -->
{{scope.row.inventoryNumber?scope.row.inventoryNumber + scope.row.materialUnit : ''}}
</template>
</el-table-column>
<el-table-column
@ -85,7 +87,7 @@
label="安全库存数"
>
<template slot-scope="scope">
{{
<!-- {{
scope.row.materialUnit == 1
? scope.row.safetyStockNumber ?scope.row.safetyStockNumber+ '斤':''
: scope.row.materialUnit == 2
@ -95,7 +97,8 @@
: scope.row.materialUnit == 4
? scope.row.safetyStockNumber?scope.row.safetyStockNumber + '吨':''
: scope.row.safetyStockNumber
}}
}} -->
{{scope.row.safetyStockNumber?scope.row.safetyStockNumber + scope.row.materialUnit : ''}}
</template>
</el-table-column>
<el-table-column
@ -104,7 +107,7 @@
label="需采购数量"
>
<template slot-scope="scope">
{{
<!-- {{
scope.row.materialUnit == 1
? scope.row.purchasedQuantity?scope.row.purchasedQuantity + '斤':''
: scope.row.materialUnit == 2
@ -114,7 +117,8 @@
: scope.row.materialUnit == 4
? scope.row.purchasedQuantity?scope.row.purchasedQuantity + '吨':''
: scope.row.purchasedQuantity
}}
}} -->
{{scope.row.purchasedQuantity?scope.row.purchasedQuantity + scope.row.materialUnit : ''}}
</template>
</el-table-column>
<el-table-column prop="remark" label="备注" align="center">
@ -182,8 +186,8 @@
<el-option
v-for="(item, index) in resultList"
:key="index"
:value="item.value"
:label="item.materialUnit"
:value="item.unit"
:label="item.unit"
></el-option>
</el-select>
</el-form-item>
@ -254,11 +258,14 @@ import {
addMaterialPurchaseDemandApi,
deleteMaterialPurchaseDemandApi,
editMaterialPurchaseDemandApi,
getMaterialPurchaseDemandPageApi
getMaterialPurchaseDemandPageApi,
getGtMaterialWarehouseDetailPageApi,//
} from '@/assets/js/api/materialManagement.js'
export default {
mounted() {
this.getList()
this.getList();
this.inputGetLIst(3);
},
data() {
return {
@ -316,6 +323,34 @@ export default {
}
},
methods: {
//
inputGetLIst(type) {
console.log('type----', type);
if (type == 1) {
this.valType = 'name'
} else if (type == 2) {
this.valType = 'specification'
} else if (type == 3) {
this.valType = 'unit'
} else {
this.valType = 'unitPrice'
}
let data = {
projectSn: this.$store.state.projectSn,
groupBy: this.valType,
name: this.searchName,
specification: this.searchSpecification,
unit: this.searchUnit,
unitPrice: this.searchUnitPricr,
pageNo: 1,
pageSize: -1,
};
getGtMaterialWarehouseDetailPageApi(data).then((res) => {
if (res.code == 200) {
this.resultList = res.result.records;
}
});
},
//
getList() {
getMaterialPurchaseDemandPageApi({