From 21e7326b415597938fba463ebb8b3507b7fdbdfd Mon Sep 17 00:00:00 2001
From: gaoluyang <2820782392@qq.com>
Date: 星期六, 15 三月 2025 13:57:57 +0800
Subject: [PATCH] 修改原材料下单报异常捕获方式
---
src/components/Table/lims-table.vue | 2
src/views/CNAS/externalService/serviceAndSupplyPro/component/ConsumableList.vue | 29 ++-----
src/views/CNAS/externalService/serviceAndSupplyPro/component/Store.vue | 16 +---
src/views/CNAS/resourceDemand/facilitiesEnvironment/index.vue | 78 +++++++++----------
src/views/business/materialOrder/customsInspection.vue | 44 ++++++-----
src/views/CNAS/resourceDemand/standardMaterialAccept/index.vue | 2
src/views/CNAS/externalService/serviceAndSupplyPro/index.vue | 5 -
src/views/CNAS/resourceDemand/facilitiesEnvironment/component/facilities-environmental-conditions/power-supply-stability.vue | 4
src/views/CNAS/externalService/serviceAndSupplyPro/component/ConsumableProject.vue | 36 +++-----
9 files changed, 90 insertions(+), 126 deletions(-)
diff --git a/src/components/Table/lims-table.vue b/src/components/Table/lims-table.vue
index aed6f4c..d71bc90 100644
--- a/src/components/Table/lims-table.vue
+++ b/src/components/Table/lims-table.vue
@@ -230,7 +230,7 @@
},
rowStyle: {
type: Object || Function,
- default: () => { },
+ default: () => null,
},
tableData: {
type: Array,
diff --git a/src/views/CNAS/externalService/serviceAndSupplyPro/component/ConsumableList.vue b/src/views/CNAS/externalService/serviceAndSupplyPro/component/ConsumableList.vue
index 8e5ef0f..40e44a9 100644
--- a/src/views/CNAS/externalService/serviceAndSupplyPro/component/ConsumableList.vue
+++ b/src/views/CNAS/externalService/serviceAndSupplyPro/component/ConsumableList.vue
@@ -10,7 +10,7 @@
</div>
<limsTable :column="columns" :currentChange="rowClick" :height="'25vh'" :highlightCurrentRow="true"
:isSelection="false" :rowStyle="tableRowStyle" :table-data="tableData" rowKey="id"
- style="margin-top: 18px;">
+ @pagination="pagination" :page="page" style="margin-top: 18px;">
<template v-slot:consumablesTypeSlot="{ row }">
{{ findType(row.consumablesType) }}
</template>
@@ -19,13 +19,6 @@
<el-button size="small" style="color: #f56c6c" type="text" @click="handleDelete(scope.row)">鍒犻櫎</el-button>
</template>
</limsTable>
- <div class="pagination">
- <div></div>
- <el-pagination :page-size="pagination.pageSize" :page-sizes="[10, 20, 30, 40]" :total="pagination.total"
- background
- layout="total, sizes, prev, pager, next, jumper" @current-change="handleCurrent" @size-change="handleSize">
- </el-pagination>
- </div>
<el-divider></el-divider>
<div>
<ConsumableProject ref="consumableProject"></ConsumableProject>
@@ -122,9 +115,9 @@
}
],
tableData: [],
- pagination: {
+ page: {
current: 1,
- pageSize: 20,
+ size: 20,
total: 0
},
options: [],
@@ -136,9 +129,10 @@
},
methods: {
async fetchData() {
- procurementSuppliesList({ contentId: this.contentsId }).then(res => {
+ procurementSuppliesList({ contentId: this.contentsId, ...this.page }).then(res => {
if (res.code === 200) {
this.tableData = res.data.records
+ this.page.total = res.data.total
if (this.tableData.length > 0) {
this.rowClick(this.tableData[0])
}
@@ -165,9 +159,9 @@
this.$download.saveAs(blob, '鑰楁潗鍒楄〃.xlsx')
})
},
- handleCurrent() {
- },
- handleSize() {
+ pagination(page) {
+ this.page.size = page.limit
+ this.fetchData()
},
handleDelete(row) {
deleteProcurementSuppliesList({ id: row.id }).then(res => {
@@ -195,12 +189,5 @@
<style scoped>
.flex {
text-align: right;
-}
-
-.pagination {
- padding-top: 15px;
- padding-right: 10px;
- display: flex;
- justify-content: space-between
}
</style>
diff --git a/src/views/CNAS/externalService/serviceAndSupplyPro/component/ConsumableProject.vue b/src/views/CNAS/externalService/serviceAndSupplyPro/component/ConsumableProject.vue
index 9dd50d2..1ad4556 100644
--- a/src/views/CNAS/externalService/serviceAndSupplyPro/component/ConsumableProject.vue
+++ b/src/views/CNAS/externalService/serviceAndSupplyPro/component/ConsumableProject.vue
@@ -4,34 +4,23 @@
<el-button icon="el-icon-plus" size="small" type="primary" @click="showDialog">
娣诲姞椤圭洰
</el-button>
- <el-button icon="el-icon-upload2" size="small" @click="exportExcel">
- 瀵煎嚭
- </el-button>
+<!-- <el-button icon="el-icon-upload2" size="small" @click="exportExcel">-->
+<!-- 瀵煎嚭-->
+<!-- </el-button>-->
</div>
<limsTable
:column="columns"
:height="'25vh'"
:isSelection="true"
:table-data="tableData"
+ @pagination="pagination"
+ :page="page"
style="margin-top: 18px;"
>
<template v-slot:operation="scope">
<el-button size="small" type="text" @click="deleteData(scope.row)">鍒犻櫎</el-button>
</template>
</limsTable>
- <div class="pagination">
- <div></div>
- <el-pagination
- background
- :page-size="pagination.pageSize"
- :page-sizes="[10, 20, 30, 40]"
- :total="pagination.total"
- layout="total, sizes, prev, pager, next, jumper"
- @current-change="handleCurrent"
- @size-change="handleSize"
- >
- </el-pagination>
- </div>
<AddProject ref="AddProjectRef" @submit="fetchData"/>
</div>
</template>
@@ -80,9 +69,9 @@
}
],
tableData: [],
- pagination: {
+ page: {
current: 1,
- pageSize: 20,
+ size: 20,
total: 0
},
listId: 0,
@@ -103,12 +92,17 @@
async fetchData() {
if (this.listId === 0) return
procurementSuppliesExpendlist({
- procurementSuppliesListId:this.listId
+ procurementSuppliesListId:this.listId,
+ ...this.page
}).then(res => {
if (res.code === 200) {
this.tableData = res.data
}
})
+ },
+ pagination (page) {
+ this.page.size = page.limit
+ this.fetchData()
},
showDialog() {
this.$refs.AddProjectRef.openDialog(this.row);
@@ -120,10 +114,6 @@
this.fetchData()
}
})
- },
- handleCurrent() {
- },
- handleSize() {
},
exportExcel() {
}
diff --git a/src/views/CNAS/externalService/serviceAndSupplyPro/component/Store.vue b/src/views/CNAS/externalService/serviceAndSupplyPro/component/Store.vue
index 32951ec..ae715cd 100644
--- a/src/views/CNAS/externalService/serviceAndSupplyPro/component/Store.vue
+++ b/src/views/CNAS/externalService/serviceAndSupplyPro/component/Store.vue
@@ -6,11 +6,9 @@
margin-right: 20px;
margin-bottom: 20px;
">
- <el-button icon="el-icon-plus" size="small" type="primary" @click="addOrUpdateStore('add')">娣诲姞
- </el-button>
- <el-button icon="el-icon-download" size="small" @click="importExcel">
- 瀵煎嚭excel
- </el-button>
+ <el-button size="small" type="primary" @click="searchList">鍒锋柊</el-button>
+ <el-button icon="el-icon-plus" size="small" type="primary" @click="addOrUpdateStore('add')">娣诲姞</el-button>
+ <el-button icon="el-icon-download" size="small" @click="importExcel">瀵煎嚭excel</el-button>
</div>
<div class="table">
<limsTable :column="tableColumn" :height="'calc(100vh - 20em)'" :table-data="storageTableData"
@@ -253,12 +251,6 @@
consumableOptions: [],
options: [],
storageTableData: [],
- searchForm: {
- orderBy: {
- field: "id",
- order: "desc",
- },
- },
saveLoading: false,
};
},
@@ -350,7 +342,7 @@
// 鏌ヨ鍒楄〃
searchList() {
this.tableLoading = true
- storeList({ ...this.page, ...this.searchForm }).then(res => {
+ storeList({ ...this.page}).then(res => {
this.tableLoading = false
if (res.code === 200) {
this.storageTableData = res.data.records
diff --git a/src/views/CNAS/externalService/serviceAndSupplyPro/index.vue b/src/views/CNAS/externalService/serviceAndSupplyPro/index.vue
index 264a95d..5b93065 100644
--- a/src/views/CNAS/externalService/serviceAndSupplyPro/index.vue
+++ b/src/views/CNAS/externalService/serviceAndSupplyPro/index.vue
@@ -23,7 +23,7 @@
</el-tree>
</div>
<div class="purchase-right">
- <el-tabs v-model="activeName" @tab-click="handleClick">
+ <el-tabs v-model="activeName">
<el-tab-pane label="鑰楁潗鎬昏" name="first" :lazy="true">
<ConsumableOverview v-if="activeName == 'first'" :contentsId="contentsId"></ConsumableOverview>
</el-tab-pane>
@@ -140,9 +140,6 @@
// 鐐瑰嚮鏍戣妭鐐�
handleNodeClick(data) {
this.contentsId = data.id;
- },
- handleClick(tab, event) {
- console.log(tab, event);
},
},
created() {
diff --git a/src/views/CNAS/resourceDemand/facilitiesEnvironment/component/facilities-environmental-conditions/power-supply-stability.vue b/src/views/CNAS/resourceDemand/facilitiesEnvironment/component/facilities-environmental-conditions/power-supply-stability.vue
index 4d43c78..79dbc40 100644
--- a/src/views/CNAS/resourceDemand/facilitiesEnvironment/component/facilities-environmental-conditions/power-supply-stability.vue
+++ b/src/views/CNAS/resourceDemand/facilitiesEnvironment/component/facilities-environmental-conditions/power-supply-stability.vue
@@ -32,8 +32,8 @@
</el-table-column>
</el-table>
<el-pagination :current-page="1" :page-size="search.size" :page-sizes="[10, 20, 30, 50, 100]" :total="search.total"
- layout="->,total, sizes, prev, pager, next, jumper" @size-change="handleSizeChange"
- @current-change="handleCurrentChange">
+ background layout="->,total, sizes, prev, pager, next, jumper" @size-change="handleSizeChange"
+ @current-change="handleCurrentChange">
</el-pagination>
<el-dialog :visible.sync="dialogVisible" title="鏂板" width="50%" @open="openDialog">
<div style="height: 50vh; overflow-y: auto">
diff --git a/src/views/CNAS/resourceDemand/facilitiesEnvironment/index.vue b/src/views/CNAS/resourceDemand/facilitiesEnvironment/index.vue
index 2a9497c..a904884 100644
--- a/src/views/CNAS/resourceDemand/facilitiesEnvironment/index.vue
+++ b/src/views/CNAS/resourceDemand/facilitiesEnvironment/index.vue
@@ -1,47 +1,41 @@
<template>
- <div class="main">
- <el-tabs v-model="activeName" :lazy="true" type="border-card">
- <el-tab-pane label="璁炬柦鍜岀幆澧冩潯浠惰姹�" name="璁炬柦鍜岀幆澧冩潯浠惰姹�">
- <FacilitiesEnvironmentalConditions v-if="activeName === '璁炬柦鍜岀幆澧冩潯浠惰姹�'"/>
- </el-tab-pane>
- <el-tab-pane label="涓夊簾澶勭悊" name="涓夊簾澶勭悊">
- <a6-three-wastes-treatment v-if="activeName === '涓夊簾澶勭悊'"></a6-three-wastes-treatment>
- </el-tab-pane>
- <el-tab-pane label="杩涘嚭浜哄憳绠$悊" name="杩涘嚭浜哄憳绠$悊">
- <personnel-management v-if="activeName === '杩涘嚭浜哄憳绠$悊'"></personnel-management>
- </el-tab-pane>
- </el-tabs>
- </div>
- </template>
+ <div class="capacity-scope">
+ <el-tabs v-model="activeName" :lazy="true" type="border-card">
+ <el-tab-pane label="璁炬柦鍜岀幆澧冩潯浠惰姹�" name="璁炬柦鍜岀幆澧冩潯浠惰姹�">
+ <FacilitiesEnvironmentalConditions v-if="activeName === '璁炬柦鍜岀幆澧冩潯浠惰姹�'"/>
+ </el-tab-pane>
+ <el-tab-pane label="涓夊簾澶勭悊" name="涓夊簾澶勭悊">
+ <a6-three-wastes-treatment v-if="activeName === '涓夊簾澶勭悊'"></a6-three-wastes-treatment>
+ </el-tab-pane>
+ <el-tab-pane label="杩涘嚭浜哄憳绠$悊" name="杩涘嚭浜哄憳绠$悊">
+ <personnel-management v-if="activeName === '杩涘嚭浜哄憳绠$悊'"></personnel-management>
+ </el-tab-pane>
+ </el-tabs>
+ </div>
+</template>
- <script>
- import FacilitiesEnvironmentalConditions from "../facilitiesEnvironment/component/facilities-environmental-conditions.vue";
- import A6ThreeWastesTreatment from '../facilitiesEnvironment/component/three-wastes-treatment.vue';
- import PersonnelManagement from '../facilitiesEnvironment/component/Personnel-management.vue';
-
- export default {
- name: 'FacilitiesEnvironment',
- components: {
- A6ThreeWastesTreatment,
- PersonnelManagement,
- FacilitiesEnvironmentalConditions
- },
- data() {
- return {
- activeName: '璁炬柦鍜岀幆澧冩潯浠惰姹�',
- }
+<script>
+import FacilitiesEnvironmentalConditions from "../facilitiesEnvironment/component/facilities-environmental-conditions.vue";
+import A6ThreeWastesTreatment from '../facilitiesEnvironment/component/three-wastes-treatment.vue';
+import PersonnelManagement from '../facilitiesEnvironment/component/Personnel-management.vue';
+export default {
+ name: 'FacilitiesEnvironment',
+ components: {
+ A6ThreeWastesTreatment,
+ PersonnelManagement,
+ FacilitiesEnvironmentalConditions
+ },
+ data() {
+ return {
+ activeName: '璁炬柦鍜岀幆澧冩潯浠惰姹�',
}
}
- </script>
+}
+</script>
+<style scoped>
+.main {
+ width: 100%;
+ border-radius: 15px;
+}
- <style scoped>
- .main {
- padding: 15px 0;
- width: 100%;
- border-radius: 15px;
- }
- v-deep .el-tabs--border-card>.el-tabs__content {
- height: calc(100vh - 9em);
- padding: 0;
- }
- </style>
+</style>
diff --git a/src/views/CNAS/resourceDemand/standardMaterialAccept/index.vue b/src/views/CNAS/resourceDemand/standardMaterialAccept/index.vue
index 80106ab..2e2f6be 100644
--- a/src/views/CNAS/resourceDemand/standardMaterialAccept/index.vue
+++ b/src/views/CNAS/resourceDemand/standardMaterialAccept/index.vue
@@ -113,7 +113,7 @@
},
methods: {
getTableData() {
- getPageAcceptance(this.form).then(res => {
+ getPageAcceptance({...this.form, ...this.page}).then(res => {
this.tableData = res.data.records;
this.page.total = res.data.total;
})
diff --git a/src/views/business/materialOrder/customsInspection.vue b/src/views/business/materialOrder/customsInspection.vue
index 07b4342..1bba060 100644
--- a/src/views/business/materialOrder/customsInspection.vue
+++ b/src/views/business/materialOrder/customsInspection.vue
@@ -757,28 +757,32 @@
})
// 鎶ユ娴佺▼
selectStandardTreeListByPartNo({partNo:this.customsInspection.partNo}).then(res => {
- this.addObj.sample = res.data.label
- this.codeLevel = res.data.code
- this.$set(this.addObj, 'qtyArrived', this.customsInspection.qtyArrived)
- this.$set(this.addObj, 'partNo', this.customsInspection.partNo)
- this.$set(this.addObj, 'receiverDate', this.customsInspection.receiverDate)
- this.$set(this.addObj, 'orderNo', this.customsInspection.orderNo)
- this.$set(this.addObj, 'declareUser', this.customsInspection.declareUser)
- this.$set(this.addObj, 'testQuantity', this.customsInspection.testQuantity)
- this.$set(this.addObj, 'buyUnitMeas', this.customsInspection.buyUnitMeas)
- this.$set(this.addObj, 'updateBatchNo', this.customsInspection.updateBatchNo)
- this.$set(this.addObj, 'partDetail', this.customsInspection.partDesc)
- if (this.orderType == 1) {
- this.$set(this.addObj, 'orderType', 'Quarterly inspection')
+ if (res.data !== null) {
+ this.addObj.sample = res.data.label
+ this.codeLevel = res.data.code
+ this.$set(this.addObj, 'qtyArrived', this.customsInspection.qtyArrived)
+ this.$set(this.addObj, 'partNo', this.customsInspection.partNo)
+ this.$set(this.addObj, 'receiverDate', this.customsInspection.receiverDate)
+ this.$set(this.addObj, 'orderNo', this.customsInspection.orderNo)
+ this.$set(this.addObj, 'declareUser', this.customsInspection.declareUser)
+ this.$set(this.addObj, 'testQuantity', this.customsInspection.testQuantity)
+ this.$set(this.addObj, 'buyUnitMeas', this.customsInspection.buyUnitMeas)
+ this.$set(this.addObj, 'updateBatchNo', this.customsInspection.updateBatchNo)
+ this.$set(this.addObj, 'partDetail', this.customsInspection.partDesc)
+ if (this.orderType == 1) {
+ this.$set(this.addObj, 'orderType', 'Quarterly inspection')
+ }
+ const str = res.data.treeName.split('-')
+ this.selectTreeTem = str.join(' - ')
+ this.selectTree = str.join(' - ')
+ this.addListInfo(this.codeLevel, res.data) // 鍘熸潗鏂欐牱鍝佹槸鍥哄畾鐨勶紝灏遍粯璁よ祴鍊间竴鏉℃暟鎹紝鍙媶鍒�
+ this.selectInsOrderTemplate() // 鍘熸潗鏂欐ā鏉垮垪琛ㄦ煡璇�
+ } else {
+ this.dialogVisible = true
+ this.dialogMessage = res.message
}
- const str = res.data.treeName.split('-')
- this.selectTreeTem = str.join(' - ')
- this.selectTree = str.join(' - ')
- this.addListInfo(this.codeLevel, res.data) // 鍘熸潗鏂欐牱鍝佹槸鍥哄畾鐨勶紝灏遍粯璁よ祴鍊间竴鏉℃暟鎹紝鍙媶鍒�
- this.selectInsOrderTemplate() // 鍘熸潗鏂欐ā鏉垮垪琛ㄦ煡璇�
}).catch(err => {
- this.dialogVisible = true
- this.dialogMessage = err.message
+
})
}
},
--
Gitblit v1.9.3