Pārlūkot izejas kodu

移交记录加上办公设备、维修加上了办公设备

余思翰 10 mēnešus atpakaļ
vecāks
revīzija
ae11b2e246

+ 10
- 5
oa-ui/src/views/flowable/form/budget/components/chooseDevice.vue Parādīt failu

1
 <!--
1
 <!--
2
  * @Author: ysh
2
  * @Author: ysh
3
- * @Date: 2024-03-27 11:10:26
3
+ * @Date: 2024-06-21 18:51:51
4
  * @LastEditors: Please set LastEditors
4
  * @LastEditors: Please set LastEditors
5
- * @LastEditTime: 2024-07-29 11:19:05
5
+ * @LastEditTime: 2024-07-30 15:37:00
6
 -->
6
 -->
7
 <template>
7
 <template>
8
   <div>
8
   <div>
60
       <el-tag v-if="multiple" v-for="item in chooseList" style="margin: 5px;" :key="item.deviceIdId">
60
       <el-tag v-if="multiple" v-for="item in chooseList" style="margin: 5px;" :key="item.deviceIdId">
61
         {{ item.name + '-' + item.series + '-' + item.brand }}
61
         {{ item.name + '-' + item.series + '-' + item.brand }}
62
       </el-tag>
62
       </el-tag>
63
-      <el-tag v-if="!multiple" style="margin: 5px;">{{ chooseList.name + '-' + chooseList.series + '-' +
64
-      chooseList.brand
65
-        }}</el-tag>
63
+      <el-tag v-if="!multiple" style="margin: 5px;">{{ formatChooseList() }}</el-tag>
66
       <div style="text-align: center;margin-top: 20px;">
64
       <div style="text-align: center;margin-top: 20px;">
67
         <el-button type="primary" @click="confirmChoose">确认选择</el-button>
65
         <el-button type="primary" @click="confirmChoose">确认选择</el-button>
68
         <el-button @click="clearChoose">清空选择</el-button>
66
         <el-button @click="clearChoose">清空选择</el-button>
192
       if (row == '4') {
190
       if (row == '4') {
193
         return 'info'
191
         return 'info'
194
       }
192
       }
193
+    },
194
+    formatChooseList() {
195
+      if (this.chooseList.name) {
196
+        return this.chooseList.name + '-' + this.chooseList.series + '-' + this.chooseList.brand
197
+      }else{
198
+        return null
199
+      }
195
     }
200
     }
196
   }
201
   }
197
 }
202
 }

+ 8
- 10
oa-ui/src/views/oa/device/expense.vue Parādīt failu

138
               <span class="el-icon-download">下载文件</span>
138
               <span class="el-icon-download">下载文件</span>
139
             </el-link>
139
             </el-link>
140
           </div>
140
           </div>
141
-          <FileUpload :limit="1" :filePathName="expenseName" :fileType="['doc', 'docx', 'xls', 'xlsx', 'pdf', 'rar', 'zip']"
142
-            @input="getExpensePath"></FileUpload>
141
+          <FileUpload :limit="1" :filePathName="expenseName"
142
+            :fileType="['doc', 'docx', 'xls', 'xlsx', 'pdf', 'rar', 'zip']" @input="getExpensePath"></FileUpload>
143
         </el-form-item>
143
         </el-form-item>
144
       </el-form>
144
       </el-form>
145
       <div slot="footer" class="dialog-footer">
145
       <div slot="footer" class="dialog-footer">
149
     </el-dialog>
149
     </el-dialog>
150
 
150
 
151
     <el-dialog title="选择设备" :visible.sync="openDevice" width="70%" append-to-body>
151
     <el-dialog title="选择设备" :visible.sync="openDevice" width="70%" append-to-body>
152
-      <choose-device @chooseList="confirmDevice"></choose-device>
152
+      <device-list @chooseList="confirmDevice" :multiple="false"></device-list>
153
     </el-dialog>
153
     </el-dialog>
154
   </div>
154
   </div>
155
 </template>
155
 </template>
158
 import { listDeviceExpense, getDeviceExpense, delDeviceExpense, addDeviceExpense, updateDeviceExpense } from "@/api/oa/device/deviceExpense";
158
 import { listDeviceExpense, getDeviceExpense, delDeviceExpense, addDeviceExpense, updateDeviceExpense } from "@/api/oa/device/deviceExpense";
159
 import { listDevice } from "@/api/oa/device/device"
159
 import { listDevice } from "@/api/oa/device/device"
160
 import ChooseDevice from '../../flowable/form/budget/components/chooseDevice.vue';
160
 import ChooseDevice from '../../flowable/form/budget/components/chooseDevice.vue';
161
+import DeviceList from '../supply/deviceList.vue';
161
 
162
 
162
 export default {
163
 export default {
163
   name: "DeviceExpense",
164
   name: "DeviceExpense",
164
   components: {
165
   components: {
165
-    ChooseDevice
166
+    ChooseDevice,
167
+    DeviceList
166
   },
168
   },
167
   data() {
169
   data() {
168
     return {
170
     return {
204
       deviceList: [],
206
       deviceList: [],
205
       alldeviceList: [],
207
       alldeviceList: [],
206
       openDevice: false,
208
       openDevice: false,
207
-      expenseName:''
209
+      expenseName: ''
208
     };
210
     };
209
   },
211
   },
210
   created() {
212
   created() {
364
       }
366
       }
365
     },
367
     },
366
     confirmDevice(val) {
368
     confirmDevice(val) {
367
-      if (val && val.length > 1) {
368
-        return this.$message.error('请选择一个设备')
369
-      }
370
-
371
-      this.form.deviceId = val[0].deviceId
369
+      this.form.deviceId = val.deviceId
372
       this.openDevice = false;
370
       this.openDevice = false;
373
     },
371
     },
374
     //费用附件路径
372
     //费用附件路径

+ 5
- 7
oa-ui/src/views/oa/supply/handover.vue Parādīt failu

153
       </div>
153
       </div>
154
     </el-dialog>
154
     </el-dialog>
155
     <el-dialog title="选择设备" :visible.sync="openDevice" width="70%" append-to-body>
155
     <el-dialog title="选择设备" :visible.sync="openDevice" width="70%" append-to-body>
156
-      <choose-device @chooseList="confirmDevice"></choose-device>
156
+      <device-list @chooseList="confirmDevice" :multiple="false"></device-list>
157
     </el-dialog>
157
     </el-dialog>
158
   </div>
158
   </div>
159
 </template>
159
 </template>
162
 import { listDeviceHandover, getDeviceHandover, delDeviceHandover, addDeviceHandover, updateDeviceHandover } from "@/api/oa/device/deviceHandover";
162
 import { listDeviceHandover, getDeviceHandover, delDeviceHandover, addDeviceHandover, updateDeviceHandover } from "@/api/oa/device/deviceHandover";
163
 import { listDevice } from "@/api/oa/device/device"
163
 import { listDevice } from "@/api/oa/device/device"
164
 import ChooseDevice from '../../flowable/form/budget/components/chooseDevice.vue';
164
 import ChooseDevice from '../../flowable/form/budget/components/chooseDevice.vue';
165
+import DeviceList from './deviceList.vue';
165
 
166
 
166
 export default {
167
 export default {
167
   name: "DeviceHandover",
168
   name: "DeviceHandover",
168
   components: {
169
   components: {
169
-    ChooseDevice
170
+    ChooseDevice,
171
+    DeviceList
170
   },
172
   },
171
   data() {
173
   data() {
172
     return {
174
     return {
333
       }, `deviceHandover_${new Date().getTime()}.xlsx`)
335
       }, `deviceHandover_${new Date().getTime()}.xlsx`)
334
     },
336
     },
335
     confirmDevice(val) {
337
     confirmDevice(val) {
336
-      if (val && val.length > 1) {
337
-        return this.$message.error('请选择一个设备')
338
-      }
339
-
340
-      this.form.deviceId = val[0].deviceId
338
+      this.form.deviceId = val.deviceId
341
       this.openDevice = false;
339
       this.openDevice = false;
342
     },
340
     },
343
   }
341
   }

Notiek ielāde…
Atcelt
Saglabāt