diff --git a/.flattened-pom.xml b/.flattened-pom.xml
deleted file mode 100644
index 1067f6ae..00000000
--- a/.flattened-pom.xml
+++ /dev/null
@@ -1,120 +0,0 @@
-
-
- 4.0.0
- com.chanko.yunxi
- mes
- 2.0.0-jdk8-snapshot
- pom
- ${project.artifactId}
- 芋道项目基础脚手架
- https://github.com/YunaiV/ruoyi-vue-pro
-
- mes-dependencies
- mes-framework
- mes-server
- mes-module-system
- mes-module-infra
- mes-module-heli
-
-
- 1.18.30
- 1.8
- 3.8.1
- 3.0.0-M5
- ${java.version}
- 1.5.5.Final
- UTF-8
- 1.5.0
- 2.0.0-jdk8-snapshot
- 2.7.17
- ${java.version}
-
-
-
-
- com.chanko.yunxi
- mes-dependencies
- 2.0.0-jdk8-snapshot
- pom
- import
-
-
-
-
-
- huaweicloud
- huawei
- https://mirrors.huaweicloud.com/repository/maven/
-
-
- aliyunmaven
- aliyun
- https://maven.aliyun.com/repository/public
-
-
-
-
-
-
- maven-surefire-plugin
- ${maven-surefire-plugin.version}
-
-
- maven-compiler-plugin
- ${maven-compiler-plugin.version}
-
-
-
- org.springframework.boot
- spring-boot-configuration-processor
- ${spring.boot.version}
-
-
- org.projectlombok
- lombok
- ${lombok.version}
-
-
- org.mapstruct
- mapstruct-processor
- ${mapstruct.version}
-
-
-
-
-
- org.codehaus.mojo
- flatten-maven-plugin
-
-
-
-
-
- org.codehaus.mojo
- flatten-maven-plugin
- ${flatten-maven-plugin.version}
-
-
- flatten
- process-resources
-
- flatten
-
-
-
- flatten.clean
- clean
-
- clean
-
-
-
-
- resolveCiFriendliesOnly
- true
-
-
-
-
-
diff --git a/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/dal/mysql/purchaseordernodetail/PurchaseOrderNoDetailMapper.java b/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/dal/mysql/purchaseordernodetail/PurchaseOrderNoDetailMapper.java
index b42ed39d..526d49fa 100644
--- a/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/dal/mysql/purchaseordernodetail/PurchaseOrderNoDetailMapper.java
+++ b/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/dal/mysql/purchaseordernodetail/PurchaseOrderNoDetailMapper.java
@@ -257,7 +257,7 @@ public interface PurchaseOrderNoDetailMapper extends BaseMapperX query = new MPJLambdaWrapper<>();
query.selectAll(PurchaseOrderNoDetailDO.class)
.select("t.composition as compositionName","t.purchase_rem_amount as purchaseRemAmounts","mat.code as matCode","pro.name as procedureName","bom.blueprint_no as blueprintNo","psub.id as projectSubId")
- .select("ROUND(t.estimated_price / t.purchase_amount, 1) as unitPrice","bom.spec as matSpec")
+ .select("ROUND(t.estimated_price / t.purchase_amount, 2) as unitPrice","bom.spec as matSpec")
.select("s.brief as supplierName")
.leftJoin(PurchaseOrderNoDO.class, "pb", PurchaseOrderNoDO::getId, PurchaseOrderBoomDO::getPurchaseOrderId)
.leftJoin(SupplierDO.class, "s", SupplierDO::getId, PurchaseOrderNoDO::getSupplierId)
diff --git a/mes-ui/mes-ui-admin-vue3/src/views/heli/purchaseorderno/partReceived.vue b/mes-ui/mes-ui-admin-vue3/src/views/heli/purchaseorderno/partReceived.vue
index 7d20fd60..3fca8b55 100644
--- a/mes-ui/mes-ui-admin-vue3/src/views/heli/purchaseorderno/partReceived.vue
+++ b/mes-ui/mes-ui-admin-vue3/src/views/heli/purchaseorderno/partReceived.vue
@@ -64,7 +64,7 @@ v-model="queryParams.supplierName" placeholder="供应商" clearable @keyup.ente
@@ -92,13 +92,13 @@ v-model="queryParams.supplierName" placeholder="供应商" clearable @keyup.ente
-
-
-
-
-
-
+ v-loading="loading" :data="list" :show-overflow-tooltip="true" class="hl-table" ref="multipleTableRef" show-summary :summary-method="getSummaries" @selection-change="handleSelectionChange" :row-class-name="tableRowClassName">
+
+
+
+
+
+
@@ -106,8 +106,8 @@ v-model="queryParams.supplierName" placeholder="供应商" clearable @keyup.ente
-
-
+
+
入库数量
@@ -115,28 +115,41 @@ v-model="queryParams.supplierName" placeholder="供应商" clearable @keyup.ente
+
+ 单价
+
+
+
+
+
+
预估总价(元)
handleInput(val,scope.row)"
@keyup.enter="(e)=>handleEnter(e,scope.row)"
+ @change="changeEstimatedPrice(scope.row)"
:id="'estimatedPrice'+scope.row.id"
/>
-
-
+
+
-
+
-
- 收货
+
+ 未收货
总价修改
@@ -210,6 +223,13 @@ const queryParams = reactive({
})
const queryFormRef = ref() // 搜索的表单
const exportLoading = ref(false) // 导出的加载中
+const changeUnitPrice =(row:any)=>{
+ row.estimatedPrice=parseFloat((row.unitPrice* row.purchaseAmount).toFixed(2))
+
+}
+const changeEstimatedPrice =(row:any)=>{
+ row.unitPrice=parseFloat((row.estimatedPrice/row.purchaseAmount).toFixed(2))
+}
const handleInput = (val: number, row: PurchaseOrderNoDetailApi.PurchaseOrderNoDetailVO) => {
console.log(val, 'val');
//输入判断当前行是否选中如无将当前行选中
@@ -239,6 +259,75 @@ const handleEnter = (e: KeyboardEvent, row: PurchaseOrderNoDetailApi.PurchaseOrd
console.log(input, 'input');
+}
+const getSummaries = (param: SummaryMethodProps) => {
+ const summaryField = ["purchaseRemAmounts"];
+ const { columns, data } = param;
+ const sums = [];
+ columns.forEach((column, index) => {
+ if (index === 0) {
+ sums[index] = '合计';
+ return;
+ }
+ if (!summaryField.includes(column.property)) {
+ sums[index] = '';
+ return;
+ }
+ const values = data.map(item => Number(item[column.property]));
+ if (!values.every(value => isNaN(value))) {
+ sums[index] = values.reduce((prev, curr) => {
+ const value = Number(curr);
+ if (!isNaN(value)) {
+ return floatAdd(prev, curr);
+ } else {
+ return prev;
+ }
+ }, 0);
+ const thousandsField = [];
+ if (thousandsField.includes(column.property)) {
+ sums[index] = thousandsFormat(sums[index]);
+ }
+ } else {
+ sums[index] = '';
+ }
+ });
+ // const sumValue = computed(() => {
+ // return list.value.reduce((sum, item) => sum + item.quantityLent, 0);
+ // });
+ // const sums = ['合计','','','','','','','',sumValue];
+ return sums;
+}
+const floatAdd = (a, b) => {
+ var c, d, e;
+ if (undefined === a || null === a || "" === a || isNaN(a)) { a = 0; }
+ if (undefined === b || null === b || "" === b || isNaN(b)) { b = 0; }
+ try {
+ c = a.toString().split(".")[1].length;
+ } catch (f) {
+ c = 0;
+ }
+ try {
+ d = b.toString().split(".")[1].length;
+ } catch (f) {
+ d = 0;
+ }
+ e = Math.pow(10, Math.max(c, d));
+ return (floatMul(a, e) + floatMul(b, e)) / e;
+};
+const floatMul = (a, b) => {
+ var c = 0,
+ d = a.toString(),
+ e = b.toString();
+ try {
+ c += d.split(".")[1].length;
+ } catch (f) {}
+ try {
+ c += e.split(".")[1].length;
+ } catch (f) {}
+ return Number(d.replace(".", "")) * Number(e.replace(".", "")) / Math.pow(10, c);
+}
+const tableRowClassName = ({ row }) => {
+ return row.isSelected ? 'selected-row' : '';
}
/** 查询列表 */
const getList = async () => {
@@ -246,7 +335,9 @@ const getList = async () => {
try {
queryParams.ids = undefined
const data = await PurchaseOrderNoDetailApi.getReceiveGoodDetail(queryParams)
-
+ list.value.forEach(item=>{
+ item.isSelected=false
+ })
list.value = data.list
total.value = data.total
} finally {
@@ -279,13 +370,26 @@ const multipleTableRef: any = ref>()
const multipleSelection: any = ref([])
const handleSelectionChange = (val: PurchaseOrderApi.PurchaseOrderVO[]) => {
+ // 第一步:重置所有行的 isSelected 为 false
+ list.value.forEach(row => {
+ row.isSelected = false;
+ });
+
+ // 第二步:将当前选中行的 isSelected 设为 true
+ val.forEach(selectedRow => {
+ // 找到对应行并更新状态(通过唯一标识符匹配更准确)
+ const targetRow = list.value.find(row => row.id === selectedRow.id);
+ if (targetRow) {
+ targetRow.isSelected = true;
+ }
+ });
multipleSelection.value = val
}
const receiveGood = async (row) => {
multipleTableRef.value.clearSelection()
multipleTableRef.value.toggleRowSelection(row)
- multipleSelection.value.indexOf(row) == -1 && multipleSelection.value.push(row) ;
+ multipleSelection.value.indexOf(row) == -1 && multipleSelection.value.push(row) ;
receiveGoods();
}
@@ -339,3 +443,9 @@ onMounted(async () => {
getList()
})
+