From f294efb8c01ad8b0704a92d51c14dbd55d898874 Mon Sep 17 00:00:00 2001
From: zouyu <2723363702@qq.com>
Date: 星期四, 23 十月 2025 16:49:46 +0800
Subject: [PATCH] 拆分原材料和外购成品的业务流程(报检、下单、检验)
---
src/views/CNAS/resourceDemand/device/component/record.vue | 114 ++++++++++++++++++--------------------------------------
1 files changed, 37 insertions(+), 77 deletions(-)
diff --git a/src/views/CNAS/resourceDemand/device/component/record.vue b/src/views/CNAS/resourceDemand/device/component/record.vue
index 7b61015..5f3b83c 100644
--- a/src/views/CNAS/resourceDemand/device/component/record.vue
+++ b/src/views/CNAS/resourceDemand/device/component/record.vue
@@ -2,27 +2,31 @@
<template>
<div>
<div class="search">
- <div class="search_thing">
- <div class="search_label">鏍峰搧缂栧彿锛�</div>
- <el-input v-model="search.sampleCode" clearable placeholder="璇疯緭鍏�" size="small" style="width: 60%;"
- @keyup.enter.native="getTableList(clickNodeVal.value)"></el-input>
- <div class="search_label">绠$悊缂栧彿锛�</div>
- <el-input v-model="search.managementNumber" clearable placeholder="璇疯緭鍏�" size="small" style="width: 60%;"
- @keyup.enter.native="getTableList(clickNodeVal.value)"></el-input>
- </div>
- <div class="search_thing" style="padding-left: 30px;">
- <el-button size="small" @click="resetSearch">閲� 缃�</el-button>
- <el-button size="small" type="primary" @click="getTableList(clickNodeVal.value)">鏌� 璇�</el-button>
- </div>
- <div class="btns" v-if="isMenuList != 1">
+ <el-form :model="search" ref="search" size="small" :inline="true">
+ <el-form-item label="鏍峰搧缂栧彿">
+ <el-input v-model="search.sampleCode" clearable placeholder="璇疯緭鍏�" size="small"
+ @keyup.enter.native="getTableList(clickNodeVal.value)"></el-input>
+ </el-form-item>
+ <el-form-item label="绠$悊缂栧彿">
+ <el-input v-model="search.managementNumber" clearable placeholder="璇疯緭鍏�" size="small"
+ @keyup.enter.native="getTableList(clickNodeVal.value)"></el-input>
+ </el-form-item>
+ <el-form-item>
+ <el-button size="mini" type="primary" @click="getTableList(clickNodeVal.value)">鏌ヨ</el-button>
+ <el-button size="mini" @click="resetSearch">閲嶇疆</el-button>
+ </el-form-item>
+ </el-form>
+ <div>
<el-button size="small" type="primary" @click="dialogVisible = true, openAdd()">鏂� 寤�</el-button>
<el-button :loading="outLoading" size="small" type="primary" @click="openHandleOut">瀵� 鍑�</el-button>
</div>
</div>
- <div class="tables" style="margin-top: 10px;">
- <el-table ref="Recordtable" :data="formParamList" height="calc(100vh - 20em)">
+ <div>
+ <el-table ref="Recordtable" :data="formParamList" height="calc(100vh - 20em)"
+ v-loading="tableLoading"
+ :header-cell-style="{ background: '#f8f8f9', color: '#515a6e' }" border>
<!-- 琛ㄦ牸鍒� -->
- <el-table-column label="搴忓彿" type="index" width="120">
+ <el-table-column label="搴忓彿" type="index" width="70" align="center">
<template v-slot="scope">
<span>{{ (search.current - 1) * search.size + scope.$index + 1 }}</span>
</template>
@@ -41,8 +45,8 @@
</template>
</el-table-column>
<!-- <el-table-column label="寮傚父鎯呭喌" min-width="120" prop="abnormal" />-->
- <el-table-column label="浣跨敤寮�濮嬫棩鏈�" min-width="150" prop="useStartDate" />
- <el-table-column label="浣跨敤缁撴潫鏃ユ湡" min-width="150" prop="useEndDate" />
+ <el-table-column label="浣跨敤寮�濮嬫棩鏈�" min-width="170" prop="useStartDate" />
+ <el-table-column label="浣跨敤缁撴潫鏃ユ湡" min-width="170" prop="useEndDate" />
<el-table-column label="浣跨敤浜�" min-width="120" prop="usePerson" />
<el-table-column label="澶囨敞" min-width="120" prop="remark" />
<!-- 鎿嶄綔鎸夐挳 -->
@@ -56,7 +60,7 @@
</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">
+ @current-change="handleCurrentChange" background>
</el-pagination>
</div>
<el-dialog :visible.sync="dialogVisible" title="浠櫒璁惧浣跨敤璁板綍琛�" top="5vh" width="55%">
@@ -104,7 +108,8 @@
prop="useDateList">
<el-date-picker v-model="form.useDateList" :disabled="operationType === 'view'" end-placeholder="缁撴潫鏃ユ湡"
format="yyyy-MM-dd HH:mm:ss" size="small" start-placeholder="寮�濮嬫棩鏈�" style="width:100%"
- type="datetimerange" value-format="yyyy-MM-dd HH:mm:ss">
+ type="datetimerange" value-format="yyyy-MM-dd HH:mm:ss"
+ :picker-options="pickerOptions">
</el-date-picker>
</el-form-item>
</el-col>
@@ -209,6 +214,12 @@
dialogVisible: false,
operationType: '',
formParamList: [],
+ tableLoading: false,
+ pickerOptions: {
+ disabledDate(time) {
+ return time.getTime() > Date.now();
+ }
+ }
}
},
mounted() {
@@ -237,14 +248,18 @@
if (deviceId === undefined) {
deviceId = ''
}
+ this.tableLoading = true
await deviceRecordPage({
deviceId: deviceId,
...this.search
}).then(res => {
+ this.tableLoading = false
if (res.code == 200) {
this.formParamList = res.data.records
this.search.total = res.data.total
}
+ }).catch(err => {
+ this.tableLoading = false
})
},
// 鎵撳紑瀵煎嚭寮规閫夋嫨缂栧埗浜恒�佹壒鍑嗕汉
@@ -393,65 +408,10 @@
</script>
<style scoped>
-.tables {
- width: 100%;
- height: calc(100vh - 15em);
-}
-
-.el-from {
- max-width: 400px;
- margin: 0 auto;
-}
-
-.form-row {
+.search {
+ height: 46px;
display: flex;
justify-content: space-between;
-}
-
-.el-input {
- width: calc(100% - 120px);
- /* 纭繚杈撳叆妗嗗搴︿竴鑷� */
-}
-
-.form-row .el-form-item {
- flex: 1;
- /* 姣忎釜琛ㄥ崟椤瑰崰鎹浉鍚屾瘮渚嬬殑绌洪棿 */
- margin-right: 100px;
- /* 鍙�夛細涓哄彸渚у厓绱犳坊鍔犻棿璺� */
-}
-
-/* 绉婚櫎鏈�鍚庝竴涓厓绱犵殑鍙宠竟璺� */
-.form-row .el-form-item:last-child {
- margin-right: 0;
-
-}
-
-.search {
- background-color: #fff;
margin-top: 10px;
- display: flex;
- align-items: center;
- position: relative;
-}
-
-.search_thing {
- display: flex;
- align-items: center;
- height: 40px;
-
-}
-
-.search_label {
- width: 140px;
- font-size: 14px;
- text-align: right;
- margin-right: 10px;
-}
-
-.btns {
- position: absolute;
- right: 0px;
- top: 50%;
- transform: translate(0, -50%);
}
</style>
--
Gitblit v1.9.3