ソースを参照

新增客户管理页面

dxq 3週間前
コミット
32f2045438
1個のファイルの変更86行の追加387行の削除
  1. 86
    387
      src/views/sto/main/customer.vue

+ 86
- 387
src/views/sto/main/customer.vue ファイルの表示

@@ -1,7 +1,23 @@
1 1
 <template>
2 2
   <div>
3
-    <SearchBox ref="SearchBoxRef" formName="selectTop" :formData="query" @showPop="showPop" @reset="reset"></SearchBox>
4
-    <ButtonBox @search="handleSearch" @add="insertDialog" @start="start('0')" @remove="shutdwon('1')"></ButtonBox>
3
+    <el-card :body-style="cardBodyStyle">
4
+      <el-form :model="query" label-width="auto" label-position="right">
5
+        <el-row :gutter="10">
6
+          <el-col :span="5">
7
+            <el-form-item label="客户名称" style="margin-bottom: 0px;" >
8
+              <el-input v-model="query.customerNm" clearable placeholder="请输入客户名称" style="width:100%;"></el-input>
9
+            </el-form-item>
10
+          </el-col>
11
+          <el-col :span="4">
12
+            <el-form-item label="" style="margin-bottom: 0px; margin-top: 5px;">
13
+              <el-button type="primary" @click="handleSearch">查询</el-button>
14
+              <el-button type="success" @click="insertDialog">新增</el-button>
15
+            </el-form-item>
16
+          </el-col>
17
+        </el-row>
18
+      </el-form>
19
+    </el-card>
20
+    <ButtonBox @search="handleSearch" @add="insertDialog"></ButtonBox>
5 21
     <el-card :body-style="cardBodyStyle">
6 22
       <el-table :data="tableData" border highlight-current-row   @selection-change="handleSelectionChange" :height="height"  >
7 23
         <el-table-column type="selection" fixed></el-table-column>
@@ -10,36 +26,19 @@
10 26
             <span>{{ scope.$index + (currentPage - 1) * pageSize + 1 }}</span>
11 27
           </template>
12 28
         </el-table-column>
13
-        <el-table-column v-if="true" prop="storeCd" label="库房编码" width="150" header-align="center"
29
+        <el-table-column v-if="true" prop="customerNm" label="客户名称" width="150" header-align="center"
14 30
                          align="center" show-overflow-tooltip>
15 31
         </el-table-column>
16
-        <el-table-column v-if="true" prop="storeNm" label="库房名称" width="150" header-align="center"
32
+        <el-table-column v-if="true" prop="customerShortNm" label="客户简称" width="150" header-align="center"
17 33
                          align="center" show-overflow-tooltip>
18 34
         </el-table-column>
19
-        <el-table-column v-if="true" prop="areaCd" label="区号" width="150" header-align="center"
35
+        <el-table-column v-if="true" prop="contactPerson" label="联系人" width="150" header-align="center"
20 36
                          align="center" show-overflow-tooltip>
21 37
         </el-table-column>
22
-        <el-table-column v-if="true" prop="stackCd" label="垛位号" width="150" header-align="center"
38
+        <el-table-column v-if="true" prop="contactInfo" label="联系方式" width="150" header-align="center"
23 39
                          align="center" show-overflow-tooltip>
24 40
         </el-table-column>
25
-        <el-table-column v-if="true" prop="storeType" label="库房类型" width="150" header-align="center" :formatter="formatter"
26
-                         align="center" show-overflow-tooltip>
27
-        </el-table-column>
28
-        <el-table-column v-if="true" prop="activeStatus" label="生效状态" width="150" header-align="center"
29
-                         align="center" show-overflow-tooltip>
30
-          <template #default="scope">
31
-            <el-tag type="success" v-if="scope.row.activeStatus == 0">{{ formatterStr( "status",scope.row.activeStatus) }}</el-tag>
32
-            <el-tag type="info" v-else-if="scope.row.activeStatus == 1">{{ formatterStr( "status",scope.row.activeStatus) }}</el-tag>
33
-            <el-tag  v-else>{{ formatterStr( "status",scope.row.activeStatus) }}</el-tag>
34
-          </template>
35
-        </el-table-column>
36
-        <el-table-column v-if="true" prop="addName" label="添加人" width="150" header-align="center"
37
-                         align="center" show-overflow-tooltip>
38
-        </el-table-column>
39
-        <el-table-column v-if="true" prop="addTime" label="添加时间" width="200" header-align="center"
40
-                         align="center" show-overflow-tooltip>
41
-        </el-table-column>
42
-        <el-table-column v-if="true" prop="remarks" label="备注"  header-align="center"
41
+        <el-table-column v-if="true" prop="defaultAddress" label="默认地址" header-align="center"
43 42
                          align="center" show-overflow-tooltip>
44 43
         </el-table-column>
45 44
         <el-table-column label="操作" header-align="center" align="center" width="200px" fixed="right">
@@ -64,49 +63,34 @@
64 63
       <el-form :model="form" label-width="120px" label-position="right" inline ref="ruleFormRef" :rules="rules">
65 64
         <el-row>
66 65
           <el-col :span="12">
67
-            <el-form-item label="库房类型" prop="storeType">
68
-              <SelectorComponent  :optionList="dictList.STORE_TYPE" :value="form.storeType"
69
-                                 @change="storeTypeDict"/>
66
+            <el-form-item label="客户名称" prop="customerNm">
67
+              <el-input v-model="form.customerNm" maxlength="100" placeholder="请输入客户名称"></el-input>
70 68
             </el-form-item>
71 69
           </el-col>
72 70
           <el-col :span="12">
73
-            <el-form-item label="库房名称" prop="storeNm">
74
-              <el-autocomplete
75
-                  v-model="form.storeNm"
76
-                  :fetch-suggestions="querySearchSignReqNm"
77
-                  placeholder="请输入库房名称"
78
-                  @change="querySearchSignReqNmChange"
79
-                  clearable
80
-
81
-                  @select="handleBlur"
82
-              ></el-autocomplete>
71
+            <el-form-item label="客户简称" prop="customerShortNm">
72
+              <el-input v-model="form.customerShortNm" maxlength="100"  placeholder="请输入客户简称"></el-input>
83 73
             </el-form-item>
84 74
           </el-col>
85 75
           <el-col :span="12">
86
-            <el-form-item label="区号" prop="areaCd">
87
-              <el-autocomplete
88
-                  v-model="form.areaCd"
89
-                  :fetch-suggestions="querySearChareaCd"
90
-                  placeholder="请输入区号"
91
-                  @change="querySearChareaCdChange"
92
-                  clearable
93
-
94
-                  @select="handleBlurQh"
95
-              ></el-autocomplete>
76
+            <el-form-item label="联系人" prop="contactPerson">
77
+              <el-input v-model="form.contactPerson"  maxlength="50" placeholder="请输入联系人"></el-input>
96 78
             </el-form-item>
97 79
           </el-col>
98 80
           <el-col :span="12">
99
-            <el-form-item label="垛位号" prop="stackCd">
100
-              <el-input v-model="form.stackCd"></el-input>
81
+            <el-form-item label="联系方式" prop="contactInfo">
82
+              <el-input v-model="form.contactInfo" maxlength="50" placeholder="请输入联系方式"></el-input>
101 83
             </el-form-item>
102 84
           </el-col>
103 85
           <el-col :span="24">
104
-            <el-form-item label="备注">
86
+            <el-form-item label="默认地址" prop="defaultAddress">
105 87
               <el-input
106
-                  v-model="form.remarks"
88
+                  v-model="form.defaultAddress"
107 89
                   :autosize="{ minRows: 2, maxRows: 4 }"
108 90
                   type="textarea"
109
-                  placeholder=""
91
+                  placeholder="请输入默认地址"
92
+                  maxlength="2"
93
+                  show-word-limit
110 94
               />
111 95
             </el-form-item>
112 96
           </el-col>
@@ -128,55 +112,32 @@
128 112
       <el-form :model="form" label-width="120px" label-position="right" inline ref="ruleFormRef" :rules="rules">
129 113
         <el-row>
130 114
           <el-col :span="12">
131
-            <el-form-item label="库房类型" prop="storeType">
132
-              <SelectorComponent  :optionList="dictList.STORE_TYPE" :value="form.storeType"
133
-                                 @change="storeTypeDict"/>
115
+            <el-form-item label="客户名称" prop="customerNm">
116
+              <el-input v-model="form.customerNm" placeholder="请输入客户名称"></el-input>
134 117
             </el-form-item>
135 118
           </el-col>
136 119
           <el-col :span="12">
137
-            <el-form-item label="库房名称" prop="storeNm">
138
-              <el-autocomplete
139
-                  v-model="form.storeNm"
140
-                  :fetch-suggestions="querySearchSignReqNm"
141
-                  placeholder="请输入库房名称"
142
-                  @change="querySearchSignReqNmChange"
143
-                  clearable
144
-
145
-                  @select="handleBlur"
146
-              ></el-autocomplete>
120
+            <el-form-item label="客户简称" prop="customerShortNm">
121
+              <el-input v-model="form.customerShortNm" placeholder="请输入客户简称"></el-input>
147 122
             </el-form-item>
148 123
           </el-col>
149 124
           <el-col :span="12">
150
-            <el-form-item label="区号" prop="areaCd">
151
-              <el-autocomplete
152
-                  v-model="form.areaCd"
153
-                  :fetch-suggestions="querySearChareaCd"
154
-                  placeholder="请输入区号"
155
-                  @change="querySearChareaCdChange"
156
-                  clearable
157
-
158
-                  @select="handleBlurQh"
159
-              ></el-autocomplete>
125
+            <el-form-item label="联系人" prop="contactPerson">
126
+              <el-input v-model="form.contactPerson" placeholder="请输入联系人"></el-input>
160 127
             </el-form-item>
161 128
           </el-col>
162 129
           <el-col :span="12">
163
-            <el-form-item label="垛位号" prop="stackCd">
164
-<!--              <el-autocomplete-->
165
-<!--                  v-model="form.stackCd"-->
166
-<!--                  :fetch-suggestions="querySearChareaCd"-->
167
-<!--                  placeholder="请输入垛位号"-->
168
-<!--                  clearable-->
169
-<!--              ></el-autocomplete>-->
170
-              <el-input v-model="form.stackCd"></el-input>
130
+            <el-form-item label="联系方式" prop="contactInfo">
131
+              <el-input v-model="form.contactInfo" placeholder="请输入联系方式"></el-input>
171 132
             </el-form-item>
172 133
           </el-col>
173 134
           <el-col :span="24">
174
-            <el-form-item label="备注">
135
+            <el-form-item label="默认地址" prop="defaultAddress">
175 136
               <el-input
176
-                  v-model="form.remarks"
137
+                  v-model="form.defaultAddress"
177 138
                   :autosize="{ minRows: 2, maxRows: 4 }"
178 139
                   type="textarea"
179
-                  placeholder=""
140
+                  placeholder="请输入默认地址"
180 141
               />
181 142
             </el-form-item>
182 143
           </el-col>
@@ -197,14 +158,9 @@
197 158
 </template>
198 159
 
199 160
 <script setup>
200
-import ButtonBar from '@/components/ButtonBar.vue'
201
-
202 161
 import {getCurrentInstance, onMounted, reactive, ref} from 'vue'
203 162
 import tools from '@/tools'
204
-import Attachment from '@/components/Attachment.vue'
205 163
 import ButtonBox from "@/components/ButtonBox.vue";
206
-import SearchBox from "@/components/SearchBox.vue";
207
-import SelectorComponent from "@/views/sal/components/Selector_component.vue";
208 164
 
209 165
 const {
210 166
   proxy
@@ -215,34 +171,26 @@ const inputStyle = ref(tools.style.input)
215 171
 
216 172
 
217 173
 
218
-const PopupMenuTreeRef = ref(null)
219
-const showPop = () => {
220
-  console.log('showPop')
221
-  PopupMenuTreeRef.value.show()
222
-}
223
-const url = ref('sto/Config/query')
224
-const pageType = ref(true)
174
+const url = ref('Customer/query')
225 175
 
226 176
 /**
227 177
  *   查询
228 178
  */
179
+
229 180
 const form = ref({
230
-  storeNm: '',
231
-  areaCd: '',
232
-  stackCd: '',
233
-  storeType: '',
234
-  id1: '',
235
-  id2: '',
236
-  id3: '',
181
+  customerNm: '',
182
+  customerShortNm: '',
183
+  contactPerson: '',
184
+  contactInfo: '',
185
+  defaultAddress: ''
237 186
 });
238
-/*method方法调用后端接口查询子类的值*/
239
-
240 187
 
241 188
 const query = ref({
242
-  storeNm: '',
243
-  areaCd: '',
244
-  stackCd: '',
245
-  storeType: ''
189
+  customerNm: '',
190
+  customerShortNm: '',
191
+  contactPerson: '',
192
+  contactInfo: '',
193
+  defaultAddress: ''
246 194
 })
247 195
 const tableData = ref([])
248 196
 const TableBoxRef = ref(null)
@@ -253,111 +201,6 @@ const handleSearch = () => {
253 201
 
254 202
 
255 203
 
256
-/*绑定监听*/
257
-
258
-// 定义一个方法
259
-const handleBlur = (item) => {
260
-
261
-  console.log(item)
262
-  form.value.id1 = item.id
263
-};
264
-const querySearChareaCdChange = (item) => {
265
-
266
-  console.log('通过input,将id2,清除·····')
267
-  // form.value.id2 = ''
268
-};
269
-const querySearchSignReqNmChange = (item) => {
270
-
271
-  console.log('通过input,将id1,清除·····')
272
-  // form.value.id1 = ''
273
-};
274
-const handleBlurQh = (item) => {
275
-
276
-  console.log("区号选择···",item)
277
-  form.value.id2 = item.id
278
-};
279
-
280
-// 定义一个方法来获取建议
281
-const querySearchSignReqNm = (queryString, cb) => {
282
-  var ss = []
283
-  if (form.value.storeType == '' || form.value.storeType == null){
284
-    return cb(ss);
285
-  }
286
-  var url = 'sto/Config/queryAllKF'
287
-  var obj = {
288
-    storeType: form.value.storeType,
289
-    activeStatus: '0',
290
-    storeNm: form.value.storeNm
291
-  }
292
-  var param = {
293
-    params: JSON.stringify(obj),
294
-  }
295
-  proxy.$axios.get(url, param).then(response => {
296
-    if (response.data.code == '0') {
297
-      console.log(  response.data.data.records)
298
-      response.data.data.records.forEach((item) => {
299
-        ss.push({value :item.storeNm , id: item.id})
300
-      })
301
-      cb(ss);
302
-      console.log('ss' , ss)
303
-    } else {
304
-      ElMessage.error('操作失败!' + response.data.msg)
305
-      cb(ss);
306
-    }
307
-  })
308
-};
309
-
310
-const querySearChareaCd = (queryString, cb) => {
311
-  var ss = []
312
-  if (form.value.id1 == '' || form.value.id1 == null){
313
-    return cb(ss);
314
-  }
315
-
316
-  var url = 'sto/Config/queryAllQH'
317
-  var obj = {
318
-    fId: form.value.id1,
319
-  }
320
-  var param = {
321
-    params: JSON.stringify(obj),
322
-  }
323
-  proxy.$axios.get(url, param).then(response => {
324
-    if (response.data.code == '0') {
325
-      console.log(  response.data.data.records)
326
-      response.data.data.records.forEach((item) => {
327
-        ss.push({value :item.areaCd , id: item.id})
328
-      })
329
-      cb(ss);
330
-      console.log('ss' , ss)
331
-    } else {
332
-      ElMessage.error('操作失败!' + response.data.msg)
333
-      cb(ss);
334
-    }
335
-  })
336
-};
337
-
338
-const querySearchStackCd = (queryString, cb) => {
339
-  var ss = []
340
-  var url = 'sto/Config/queryAll'
341
-  var obj = {
342
-    fId: form.value.id_2,
343
-  }
344
-  var param = {
345
-    params: JSON.stringify(obj),
346
-  }
347
-  proxy.$axios.get(url, param).then(response => {
348
-    if (response.data.code == '0') {
349
-      console.log(  response.data.data.records)
350
-      response.data.data.records.forEach((item) => {
351
-        ss.push({value :item.storeNm})
352
-      })
353
-      cb(ss);
354
-      console.log('ss' , ss)
355
-    } else {
356
-      ElMessage.error('操作失败!' + response.data.msg)
357
-      cb(ss);
358
-    }
359
-  })
360
-};
361 204
 
362 205
 /**
363 206
  * 分页
@@ -388,29 +231,31 @@ const dialogVisibleEdit = ref(false)
388 231
 const ruleFormRef = ref()
389 232
 
390 233
 const rules = reactive({
391
-  storeType: [
392
-    {required: true, message: '不允许为空', trigger: 'change'},
234
+  customerNm: [
235
+    {required: true, message: '不允许为空', trigger: 'blur'},
393 236
   ],
394
-  storeNm: [
395
-    {required: true, message: '不允许为空', trigger: 'change'},
237
+  customerShortNm: [
238
+    {required: true, message: '不允许为空', trigger: 'blur'},
396 239
   ],
397
-  areaCd: [
398
-    {required: true, message: '不允许为空', trigger: 'change'},
240
+  contactPerson: [
241
+    {required: true, message: '不允许为空', trigger: 'blur'},
399 242
   ],
400
-  stackCd: [
401
-    {required: true, message: '不允许为空', trigger: 'change'},
243
+  contactInfo: [
244
+    {required: true, message: '不允许为空', trigger: 'blur'},
402 245
   ],
246
+  // defaultAddress: [
247
+  //   {required: true, message: '不允许为空', trigger: 'blur'},
248
+  // ],
403 249
 
404 250
 })
405 251
 
406 252
 const insertDialog = () => {
407 253
   form.value = {
408
-    storeNm: '',
409
-    areaCd: '',
410
-    stackCd: '',
411
-    storeType: '',
412
-    activeStatue: '',
413
-    remarks: ''
254
+    customerNm: '',
255
+    customerShortNm: '',
256
+    contactPerson: '',
257
+    contactInfo: '',
258
+    defaultAddress: ''
414 259
   }
415 260
   dialogVisible.value = true
416 261
 }
@@ -434,7 +279,7 @@ const handleSave = (ruleFormRef) => {
434 279
   ruleFormRef.validate((valid) => {
435 280
     if (valid) {
436 281
       console.log('submit!')
437
-      var url = 'sto/Config/save'
282
+      var url = 'Customer/save'
438 283
       var param = {
439 284
         json: JSON.stringify(form.value),
440 285
 
@@ -465,7 +310,7 @@ const handleInsert = (ruleFormRef) => {
465 310
   ruleFormRef.validate((valid) => {
466 311
     if (valid) {
467 312
       console.log('submit!')
468
-      var url = 'sto/Config/insert'
313
+      var url = 'Customer/save'
469 314
       var param = {
470 315
         json: JSON.stringify(form.value),
471 316
 
@@ -501,42 +346,23 @@ const handleCancelSave2 = () => {
501 346
 }
502 347
 
503 348
 const handleEdit = (row) => {
504
-  if (row.activeStatus == '0') {
505
-    ElMessage({
506
-      type: 'warning',
507
-      message: '数据生效中,不允许操作!'
508
-    })
509
-    return
510
-  }
511
-
512
-  var url = 'sto/Config/queryByPK'
349
+  var url = 'Customer/queryByPK'
513 350
   var param = {
514 351
     id: row.id
515 352
   }
516 353
   proxy.$axios.get(url, param).then(response => {
517 354
     if (response.data.code == '0') {
518
-      // Object.assign(insertForm, {
519
-      //   ...response.data.data,
520
-      // });
521
-
522 355
       form.value = response.data.data
523 356
       console.log(form.value)
357
+      dialogVisibleEdit.value = true
524 358
     } else {
525 359
       ElMessage.error('操作失败!' + response.data.msg)
526 360
     }
527 361
   })
528
-  dialogVisibleEdit.value = true
529 362
 }
530 363
 
531 364
 const handleRemove = (row) => {
532
-  if (row.activeStatus == '0' || row.activeStatus == '1') {
533
-    ElMessage({
534
-      type: 'warning',
535
-      message: '数据非新增状态,不允许操作!'
536
-    })
537
-    return
538
-  }
539
-  var url = 'sto/Config/remove'
365
+  var url = 'Customer/remove'
540 366
   var param = {
541 367
     id: row.id
542 368
   }
@@ -558,7 +384,6 @@ const handleRemove = (row) => {
558 384
               message: '删除成功!',
559 385
             });
560 386
             getTableData()
561
-            // TableBoxRef.value.search()
562 387
           } else {
563 388
             ElMessage.error('操作失败!' + response.data.msg)
564 389
           }
@@ -574,77 +399,6 @@ const handleRemove = (row) => {
574 399
 
575 400
 }
576 401
 
577
-const start = (param) => {
578
-  if (multipleSelection.value.length < 1) {
579
-    ElMessage({
580
-      type: 'warning',
581
-      message: '请选择要生效的数据!'
582
-    })
583
-    return
584
-  }
585
-  edit('生效', param)
586
-
587
-}
588
-
589
-const shutdwon = (param) => {
590
-  if (multipleSelection.value.length < 1) {
591
-    ElMessage({
592
-      type: 'warning',
593
-      message: '请选择要失效的数据!'
594
-    })
595
-    return
596
-  }
597
-  edit('失效', param)
598
-
599
-}
600
-
601
-const edit = (title, val) => {
602
-  var ids = []
603
-  for (var i = 0; i < multipleSelection.value.length; i++) {
604
-    ids.push(multipleSelection.value[i].id)
605
-    ids.push(multipleSelection.value[i].id1)
606
-    ids.push(multipleSelection.value[i].id2)
607
-  }
608
-
609
-  var param = {
610
-    ids: JSON.stringify(ids),
611
-    status: val
612
-  }
613
-  var url = 'sto/Config/startAndShutDown'
614
-  ElMessageBox.confirm(
615
-      '此操作将' + title + '该数据, 是否继续?',
616
-      '提示', {
617
-        confirmButtonText: '确认',
618
-        cancelButtonText: '取消',
619
-        type: 'warning',
620
-        draggable: true,
621
-      }
622
-  )
623
-      .then(() => {
624
-        proxy.$axios.post(url, param).then(response => {
625
-          if (response.data.code == '0') {
626
-
627
-            ElMessage({
628
-              type: 'success',
629
-              message: title + '成功!',
630
-            });
631
-
632
-            getTableData()
633
-            // TableBoxRef.value.search()
634
-          } else {
635
-            ElMessage.error('操作失败!' + response.data.msg)
636
-          }
637
-        })
638
-      })
639
-      .catch(() => {
640
-        ElMessage({
641
-          type: 'info',
642
-          message: '已取消',
643
-        })
644
-      })
645
-
646
-
647
-}
648 402
 
649 403
 /**
650 404
  * 保存、修改、删除
@@ -729,37 +483,16 @@ const handleImport = () => {
729 483
 const handleExport = () => {
730 484
   console.log('handleExport')
731 485
 }
732
-const dictList = ref({})
733
-
734
-const dictData = () => {
735
-  var url = 'framework/Common/querySelectorList'
736
-  var param = {
737
-    type: JSON.stringify(['STORE_TYPE' , 'START_STATUS'])
738
-  }
739
-  proxy.$axios.get(url, param).then(response => {
740
-    if (response.data.code == '0') {
741
-      dictList.value = response.data.data
742
-      console.log(response.data.data)
743
-
744
-    } else {
745
-      ElMessage.error('操作失败!' + response.data.msg)
746
-    }
747
-  })
748
-}
749
-
750
-
751
-const storeTypeDict = (val) => {
752
-  form.value.storeType = val
753
-}
754 486
 const getTableData = () => {
755
-  var url = 'sto/Config/query'
487
+  var url = 'Customer/query'
756 488
   var param = {
757 489
     page: currentPage.value,
758 490
     rows: pageSize.value,
759
-    storeNm: query.value.storeNm,
760
-    areaCd: query.value.areaCd,
761
-    stackCd: query.value.stackCd,
762
-    storeType: query.value.storeType,
491
+    customerNm: query.value.customerNm,
492
+    customerShortNm: query.value.customerShortNm,
493
+    contactPerson: query.value.contactPerson,
494
+    contactInfo: query.value.contactInfo,
495
+    defaultAddress: query.value.defaultAddress,
763 496
     json: JSON.stringify(query.value)
764 497
   }
765 498
   proxy.$axios.get(url, param).then(response => {
@@ -771,48 +504,14 @@ const getTableData = () => {
771 504
     }
772 505
   })
773 506
 }
774
-const formatterStr = (col,value) => {
775
-  if (!value || value == null || value == '') {
776
-    return value
777
-  }
778
-
779
-  switch (col) {
780
-    case 'status':
781
-      value = dictList.value && Array.isArray(dictList.value.START_STATUS)
782
-          ? dictList.value.START_STATUS.find(item => item.dicCode == value)?.dicName
783
-          : undefined
784
-      break
785
-  }
786
-  return value
787
-
788
-}
789 507
 const height = ref(600)
790 508
 const updateViewportHeight = () => {
791 509
   height.value = window.innerHeight * 0.65
792 510
   console.log( window.innerHeight);
793 511
 };
794
-
795
-const formatter = (row, column, cellValue, index) => {
796
-  if (!cellValue || cellValue == null || cellValue == '') {
797
-    return cellValue
798
-  }
799
-  switch (column.property) {
800
-    case 'storeType':
801
-      cellValue = dictList.value && Array.isArray(dictList.value.STORE_TYPE)
802
-          ? dictList.value.STORE_TYPE.find(item => item.dicCode == cellValue)?.dicName
803
-          : undefined
804
-      break
805
-  }
806
-  return cellValue
807
-
808
-}
809 512
 onMounted(() => {
810
-  dictData()
811 513
   getTableData()
812 514
   updateViewportHeight()
813
-
814
-
815
-
816 515
 })
817 516
 </script>
818 517
 

読み込み中…
キャンセル
保存