From 86a84c327007a1fb398fa2aefff1bffc03a83cfb Mon Sep 17 00:00:00 2001
From: Crunchy <3114200645@qq.com>
Date: 星期二, 06 八月 2024 22:36:02 +0800
Subject: [PATCH] 委托下单,禁止下拉框输入
---
src/components/view/b4-sample-defects.vue | 73 ++++++++++++++++++++----------------
1 files changed, 41 insertions(+), 32 deletions(-)
diff --git a/src/components/view/b4-sample-defects.vue b/src/components/view/b4-sample-defects.vue
index da232f8..0bfec22 100644
--- a/src/components/view/b4-sample-defects.vue
+++ b/src/components/view/b4-sample-defects.vue
@@ -50,19 +50,19 @@
<div class="role_manage">
<div>
<el-row class="title">
- <el-col :span="12" style="padding-left: 20px;">鏍峰搧缂洪櫡鎸囨暟</el-col>
+ <el-col :span="12" style="padding-left: 20px;text-align: left;">鏍峰搧缂洪櫡鎸囨暟</el-col>
</el-row>
</div>
<div class="search">
<div class="search_thing">
<div class="search_label">妫�楠岄」鐩細</div>
<div class="search_input"><el-input size="small" placeholder="璇疯緭鍏�" clearable
- v-model="entity.laboratoryName" @keyup.enter.native="refreshTable()"></el-input></div>
+ v-model="entity.inspectionItems" @keyup.enter.native="refreshTable()"></el-input></div>
</div>
<div class="search_thing">
<div class="search_label">濮旀墭缂栧彿锛�</div>
<div class="search_input"><el-input size="small" placeholder="璇疯緭鍏�" clearable
- v-model="entity.laboratoryNumber" @keyup.enter.native="refreshTable()"></el-input></div>
+ v-model="entity.orderNumber" @keyup.enter.native="refreshTable()"></el-input></div>
</div>
<div class="search_thing" style="padding-left: 30px;">
<el-button size="small" @click="refresh()">閲� 缃�</el-button>
@@ -73,36 +73,37 @@
<el-table
:data="tableData"
style="width: 100%;margin-bottom: 10px;height: calc(100% - 40px);"
+ height="calc(100% - 40px)"
row-key="id"
v-loading="loading"
border
default-expand-all
:tree-props="{children: 'children', hasChildren: 'hasChildren'}">
<el-table-column
- prop="date"
+ prop="inspection_item"
label="妫�楠岄」鐩�"
sortable
min-width="180">
<template slot-scope="scope">
<p>
<el-tag style="margin-right: 10px;height: 24px;border-radius: 10px;line-height: 24px;border: 0;" :type="scope.row.level==2?'success':''">{{ '0' + scope.row.level }}</el-tag>
- <span>{{ scope.row.date }}</span>
+ <span>{{ scope.row.inspection_item }}</span>
</p>
</template>
</el-table-column>
<el-table-column
- prop="name"
+ prop="entrust_code"
label="濮旀墭缂栧彿"
sortable
min-width="180">
</el-table-column>
<el-table-column
- prop="address"
+ prop="name"
label="妫�楠屼汉"
min-width="180">
</el-table-column>
<el-table-column
- prop="address"
+ prop="create_time"
label="妫�楠屾椂闂�"
min-width="180">
</el-table-column>
@@ -121,27 +122,11 @@
export default {
data() {
return {
- entity: {},
- tableData: [{
- id: 3,
- date: '2016-05-01',
- name: '鐜嬪皬铏�',
- address: '涓婃捣甯傛櫘闄�鍖洪噾娌欐睙璺� 1519 寮�',
- level:1,
- children: [{
- id: 31,
- date: '2016-05-01',
- name: '鐜嬪皬铏�',
- address: '涓婃捣甯傛櫘闄�鍖洪噾娌欐睙璺� 1519 寮�',
- level:2,
- }, {
- id: 32,
- date: '2016-05-01',
- name: '鐜嬪皬铏�',
- address: '涓婃捣甯傛櫘闄�鍖洪噾娌欐睙璺� 1519 寮�',
- level:2,
- }]
- }],
+ entity: {
+ orderNumber:null,
+ inspectionItems:null,
+ },
+ tableData: [],
page:{
current:1,
size:20,
@@ -151,15 +136,39 @@
}
},
mounted() {
-
- this.getPower()
+ // this.getPower()
+ this.refreshTable()
},
methods: {
refreshTable(){
this.loading = true
+ this.$axios.post(this.$api.insOrder.selectSampleDefects, {
+ ...this.page,
+ ...this.entity
+ }).then(res => {
+ this.loading = false
+ if (res.code === 201) {
+ this.loading = false
+ return
+ }
+ this.total = res.data.total;
+ this.tableData = res.data.records.map(item=>{
+ item.level = 1;
+ item.inspection_item = item.sample
+ item.children = item.children.map(m=>{
+ m.id = Math.random(10000)
+ m.level = 2;
+ return m
+ })
+ return item
+ });
+ })
},
refresh(){
- this.page.size = 20;
+ this.entity = {
+ orderNumber:null,
+ inspectionItems:null,
+ },
this.page.current = 1;
this.refreshTable();
},
--
Gitblit v1.9.3