|
@@ -73,7 +73,7 @@
|
|
|
<div style="margin: 16px 0 8px 0; font-weight: bold"> {{ isCollect ? '借用明细表' : '归还明细表' }}</div>
|
|
|
<el-table :data="form.items" border style="width: 100%; margin-bottom: 12px">
|
|
|
<el-table-column type="index" label="序号" width="60" />
|
|
|
- <el-table-column prop="remark" label="设备分类" />
|
|
|
+ <el-table-column prop="device_category_name" label="设备分类" />
|
|
|
<!-- <el-table-column prop="quantity" label="借用数量" /> -->
|
|
|
<el-table-column :label="isCollect ? '借用数量' : '归还数量'">
|
|
|
<template #default="{ row }">
|
|
@@ -247,13 +247,34 @@
|
|
|
<el-col :span="8">
|
|
|
<div style="font-weight: bold; margin-bottom: 8px">当前状态</div>
|
|
|
<el-input v-model="form.status_label" :disabled="true" placeholder="" style="width: 150px" />
|
|
|
- <el-button type="primary" style="margin-left: 16px" @click="clickReturn">归还</el-button>
|
|
|
+ <el-button type="primary" style="margin-left: 16px" @click="clickReturn" :disabled="form.status_label=='已归还'">归还</el-button>
|
|
|
</el-col>
|
|
|
<el-col :span="24" style="margin-top: 16px">
|
|
|
<div style="font-weight: bold; margin-bottom: 8px">备注</div>
|
|
|
<el-input v-model="returnRemark" type="textarea" placeholder="请输入备注" />
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
+ <el-row :gutter="16" style="margin-top: 16px">
|
|
|
+ <el-col :span="24">
|
|
|
+ <div style="font-weight: bold; margin-bottom: 8px">异常记录 <span>{{ 0 }}</span> 条</div>
|
|
|
+ <el-table v-if="returnAbnormalList.length > 0" :data="returnAbnormalList" border style="width: 100%">
|
|
|
+ <el-table-column type="index" label="序号" width="60" align="center" />
|
|
|
+ <el-table-column prop="borrowNo" label="借用单编号" align="center" />
|
|
|
+ <el-table-column prop="borrower" label="借用人" align="center" />
|
|
|
+ <el-table-column prop="time" label="发生时间" align="center" />
|
|
|
+ <el-table-column prop="type" label="异常类型" align="center">
|
|
|
+ <template #default="{ row }">
|
|
|
+ <el-tag :type="row.type === '逾期' ? 'danger' : 'warning'">{{ row.type }}</el-tag>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="operation" label="操作" align="center" width="80">
|
|
|
+ <template #default="{ row }">
|
|
|
+ <el-button type="text" @click="handleView(row)">查看</el-button>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ </el-table>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
</el-form>
|
|
|
</el-tab-pane>
|
|
|
</el-tabs>
|
|
@@ -478,6 +499,10 @@ const abnormalList = ref([
|
|
|
type: '损坏'
|
|
|
} */
|
|
|
]);
|
|
|
+/* 归还设备异常记录 */
|
|
|
+const returnAbnormalList = ref([
|
|
|
+
|
|
|
+]);
|
|
|
|
|
|
// 查看异常记录详情
|
|
|
const handleView = (row: any) => {
|
|
@@ -520,6 +545,7 @@ function onDeviceSelected(devices: Device[]) {
|
|
|
borrow_count: 1,
|
|
|
brand: d.brand || '',
|
|
|
model: d.model || '',
|
|
|
+ device_specification: d.device_specification || '',
|
|
|
warehouse: d.warehouse
|
|
|
}))
|
|
|
);
|
|
@@ -754,7 +780,25 @@ function onSubmit() {
|
|
|
// 准备结算单数据
|
|
|
settlementData.value = {
|
|
|
...form.value,
|
|
|
- items: deviceList.value,
|
|
|
+ items: deviceList.value.map(item => ({
|
|
|
+ ...item,
|
|
|
+ device_category_name: item.device_type,
|
|
|
+ device_name: item.device_name,
|
|
|
+ device_specification: item.device_specification,
|
|
|
+ device_storage_location: item.warehouse,
|
|
|
+ remark: item.device_type,
|
|
|
+ quantity: item.borrow_count,
|
|
|
+ device_id: item.device_no,
|
|
|
+ device_category: item.device_type,
|
|
|
+ device_code: item.device_no,
|
|
|
+ borrow_type: form.value.borrow_type,
|
|
|
+ /* borrow_type_label: form.value.borrow_type_label,
|
|
|
+ borrower_info: form.value.borrower_info, */
|
|
|
+ borrower_dept: form.value.borrower_dept,
|
|
|
+ emergency_contact: form.value.emergency_contact,
|
|
|
+ emergency_phone: form.value.emergency_phone,
|
|
|
+ team_type: form.value.team_type,
|
|
|
+ })),
|
|
|
accessory_info: accessoryInfo.value,
|
|
|
remark: remark.value,
|
|
|
expected_start_time: dayjs().format('YYYY-MM-DD HH:mm:ss')
|