页面新增判断字段,新增归还功能

main
mo 1 year ago
parent 409d6b961c
commit d236c5271a

@ -393,6 +393,7 @@ export default {
company: null, company: null,
remark: null, remark: null,
createTime: [], createTime: [],
historyOrList: "List",
}, },
optType: null, optType: null,
// //
@ -432,27 +433,27 @@ export default {
}, },
// //
handleInitList() { handleInitList() {
// //
listData({ listData({
pageNo: 1, pageNo: 1,
pageSize: 100, pageSize: 100,
dictType: "borrow_apply", dictType: "borrow_state",
}).then((res) => { }).then((res) => {
this.borrowStateOptions = res.data.list || []; this.borrowStateOptions = res.data.list || [];
}); });
// //
listData({ listData({
pageNo: 1, pageNo: 1,
pageSize: 100, pageSize: 100,
dictType: "archives_way", dictType: "way_type",
}).then((res) => { }).then((res) => {
this.wayOptions = res.data.list || []; this.wayOptions = res.data.list || [];
}); });
// //
listData({ listData({
pageNo: 1, pageNo: 1,
pageSize: 100, pageSize: 100,
dictType: "archives_media", dictType: "media_type",
}).then((res) => { }).then((res) => {
this.mediaOptions = res.data.list || []; this.mediaOptions = res.data.list || [];
}); });

@ -124,7 +124,7 @@
<span>{{ parseTime(scope.row.createTime) }}</span> <span>{{ parseTime(scope.row.createTime) }}</span>
</template> </template>
</el-table-column> </el-table-column>
<!-- <el-table-column <el-table-column
label="操作" label="操作"
align="center" align="center"
class-name="small-padding fixed-width" class-name="small-padding fixed-width"
@ -133,21 +133,14 @@
<el-button <el-button
size="mini" size="mini"
type="text" type="text"
icon="el-icon-edit" icon="el-icon-refresh-left"
v-if="scope.row.borrowState == 0"
@click="handleUpdate(scope.row)" @click="handleUpdate(scope.row)"
v-hasPermi="['archives:borrowAapply:update']" v-hasPermi="['archives:borrowAapply:update']"
>修改</el-button >归还</el-button
>
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
v-hasPermi="['archives:borrowAapply:delete']"
>删除</el-button
> >
</template> </template>
</el-table-column> --> </el-table-column>
</el-table> </el-table>
<!-- 分页组件 --> <!-- 分页组件 -->
<pagination <pagination
@ -327,6 +320,7 @@ export default {
company: null, company: null,
remark: null, remark: null,
createTime: [], createTime: [],
historyOrList: "history",
}, },
// //
form: {}, form: {},
@ -421,14 +415,12 @@ export default {
this.open = true; this.open = true;
this.title = "添加档案借阅申请"; this.title = "添加档案借阅申请";
}, },
/** 修改按钮操作 */ /** 归还按钮操作 */
handleUpdate(row) { handleUpdate(row) {
this.reset(); const data = { id: row.id, borrowState: "2", recordId: row.recordId };
const borrowId = row.borrowId; updateBorrowApply(data).then((response) => {
getBorrowApply(borrowId).then((response) => { this.getList();
this.form = response.data; this.$modal.msgSuccess("归还成功");
this.open = true;
this.title = "修改档案借阅申请";
}); });
}, },
/** 提交按钮 */ /** 提交按钮 */

Loading…
Cancel
Save