Pārlūkot izejas kodu

修改耗材信息

余思翰 6 mēnešus atpakaļ
vecāks
revīzija
85fe4fa746
1 mainītis faili ar 27 papildinājumiem un 92 dzēšanām
  1. 27
    92
      oa-ui/src/views/oa/material/index.vue

+ 27
- 92
oa-ui/src/views/oa/material/index.vue Parādīt failu

@@ -2,44 +2,19 @@
2 2
   <div class="app-container">
3 3
     <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
4 4
       <el-form-item label="耗材编号" prop="materialId">
5
-        <el-input
6
-          v-model="queryParams.materialId"
7
-          placeholder="请输入耗材编号"
8
-          clearable
9
-          @keyup.enter.native="handleQuery"
10
-        />
5
+        <el-input v-model="queryParams.materialId" placeholder="请输入耗材编号" clearable @keyup.enter.native="handleQuery" />
11 6
       </el-form-item>
12 7
       <el-form-item label="耗材名称" prop="name">
13
-        <el-input
14
-          v-model="queryParams.name"
15
-          placeholder="请输入耗材名称"
16
-          clearable
17
-          @keyup.enter.native="handleQuery"
18
-        />
8
+        <el-input v-model="queryParams.name" placeholder="请输入耗材名称" clearable @keyup.enter.native="handleQuery" />
19 9
       </el-form-item>
20 10
       <el-form-item label="规格型号" prop="series">
21
-        <el-input
22
-          v-model="queryParams.series"
23
-          placeholder="请输入规格型号"
24
-          clearable
25
-          @keyup.enter.native="handleQuery"
26
-        />
11
+        <el-input v-model="queryParams.series" placeholder="请输入规格型号" clearable @keyup.enter.native="handleQuery" />
27 12
       </el-form-item>
28 13
       <el-form-item label="耗材品牌" prop="brand">
29
-        <el-input
30
-          v-model="queryParams.brand"
31
-          placeholder="请输入耗材品牌"
32
-          clearable
33
-          @keyup.enter.native="handleQuery"
34
-        />
14
+        <el-input v-model="queryParams.brand" placeholder="请输入耗材品牌" clearable @keyup.enter.native="handleQuery" />
35 15
       </el-form-item>
36 16
       <el-form-item label="存放地点" prop="place">
37
-        <el-input
38
-          v-model="queryParams.place"
39
-          placeholder="请输入存放地点"
40
-          clearable
41
-          @keyup.enter.native="handleQuery"
42
-        />
17
+        <el-input v-model="queryParams.place" placeholder="请输入存放地点" clearable @keyup.enter.native="handleQuery" />
43 18
       </el-form-item>
44 19
       <el-form-item>
45 20
         <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
@@ -49,46 +24,20 @@
49 24
 
50 25
     <el-row :gutter="10" class="mb8">
51 26
       <el-col :span="1.5">
52
-        <el-button
53
-          type="primary"
54
-          plain
55
-          icon="el-icon-plus"
56
-          size="mini"
57
-          @click="handleAdd"
58
-          v-hasPermi="['oa:material:add']"
59
-        >新增</el-button>
27
+        <el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd"
28
+          v-hasPermi="['oa:material:add']">新增</el-button>
60 29
       </el-col>
61 30
       <el-col :span="1.5">
62
-        <el-button
63
-          type="success"
64
-          plain
65
-          icon="el-icon-edit"
66
-          size="mini"
67
-          :disabled="single"
68
-          @click="handleUpdate"
69
-          v-hasPermi="['oa:material:edit']"
70
-        >修改</el-button>
31
+        <el-button type="success" plain icon="el-icon-edit" size="mini" :disabled="single" @click="handleUpdate"
32
+          v-hasPermi="['oa:material:edit']">修改</el-button>
71 33
       </el-col>
72 34
       <el-col :span="1.5">
73
-        <el-button
74
-          type="danger"
75
-          plain
76
-          icon="el-icon-delete"
77
-          size="mini"
78
-          :disabled="multiple"
79
-          @click="handleDelete"
80
-          v-hasPermi="['oa:material:remove']"
81
-        >删除</el-button>
35
+        <el-button type="danger" plain icon="el-icon-delete" size="mini" :disabled="multiple" @click="handleDelete"
36
+          v-hasPermi="['oa:material:remove']">删除</el-button>
82 37
       </el-col>
83 38
       <el-col :span="1.5">
84
-        <el-button
85
-          type="warning"
86
-          plain
87
-          icon="el-icon-download"
88
-          size="mini"
89
-          @click="handleExport"
90
-          v-hasPermi="['oa:material:export']"
91
-        >导出</el-button>
39
+        <el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport"
40
+          v-hasPermi="['oa:material:export']">导出</el-button>
92 41
       </el-col>
93 42
       <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
94 43
     </el-row>
@@ -106,31 +55,16 @@
106 55
       <el-table-column label="备注" align="center" prop="remark" />
107 56
       <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
108 57
         <template slot-scope="scope">
109
-          <el-button
110
-            size="mini"
111
-            type="text"
112
-            icon="el-icon-edit"
113
-            @click="handleUpdate(scope.row)"
114
-            v-hasPermi="['oa:material:edit']"
115
-          >修改</el-button>
116
-          <el-button
117
-            size="mini"
118
-            type="text"
119
-            icon="el-icon-delete"
120
-            @click="handleDelete(scope.row)"
121
-            v-hasPermi="['oa:material:remove']"
122
-          >删除</el-button>
58
+          <el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)"
59
+            v-hasPermi="['oa:material:edit']">修改</el-button>
60
+          <el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)"
61
+            v-hasPermi="['oa:material:remove']">删除</el-button>
123 62
         </template>
124 63
       </el-table-column>
125 64
     </el-table>
126
-    
127
-    <pagination
128
-      v-show="total>0"
129
-      :total="total"
130
-      :page.sync="queryParams.pageNum"
131
-      :limit.sync="queryParams.pageSize"
132
-      @pagination="getList"
133
-    />
65
+
66
+    <pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize"
67
+      @pagination="getList" />
134 68
 
135 69
     <!-- 添加或修改cmc耗材信息对话框 -->
136 70
     <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
@@ -148,7 +82,7 @@
148 82
           <el-input v-model="form.place" placeholder="请输入存放地点" />
149 83
         </el-form-item>
150 84
         <el-form-item label="剩余数量" prop="remain">
151
-          <el-input v-model="form.remain" placeholder="请输入剩余数量" />
85
+          {{ form.remain }}
152 86
         </el-form-item>
153 87
         <el-form-item label="单位" prop="unit">
154 88
           <el-input v-model="form.unit" placeholder="请输入单位" />
@@ -255,14 +189,15 @@ export default {
255 189
     // 多选框选中数据
256 190
     handleSelectionChange(selection) {
257 191
       this.ids = selection.map(item => item.materialId)
258
-      this.single = selection.length!==1
192
+      this.single = selection.length !== 1
259 193
       this.multiple = !selection.length
260 194
     },
261 195
     /** 新增按钮操作 */
262 196
     handleAdd() {
263 197
       this.reset();
264 198
       this.open = true;
265
-      this.title = "添加cmc耗材信息";
199
+      this.form.remain = 0;
200
+      this.title = "添加耗材信息";
266 201
     },
267 202
     /** 修改按钮操作 */
268 203
     handleUpdate(row) {
@@ -271,7 +206,7 @@ export default {
271 206
       getMaterial(materialId).then(response => {
272 207
         this.form = response.data;
273 208
         this.open = true;
274
-        this.title = "修改cmc耗材信息";
209
+        this.title = "修改耗材信息";
275 210
       });
276 211
     },
277 212
     /** 提交按钮 */
@@ -297,12 +232,12 @@ export default {
297 232
     /** 删除按钮操作 */
298 233
     handleDelete(row) {
299 234
       const materialIds = row.materialId || this.ids;
300
-      this.$modal.confirm('是否确认删除cmc耗材信息编号为"' + materialIds + '"的数据项?').then(function() {
235
+      this.$modal.confirm('是否确认删除cmc耗材信息编号为"' + materialIds + '"的数据项?').then(function () {
301 236
         return delMaterial(materialIds);
302 237
       }).then(() => {
303 238
         this.getList();
304 239
         this.$modal.msgSuccess("删除成功");
305
-      }).catch(() => {});
240
+      }).catch(() => { });
306 241
     },
307 242
     /** 导出按钮操作 */
308 243
     handleExport() {

Notiek ielāde…
Atcelt
Saglabāt