|
@@ -33,11 +33,21 @@
|
|
|
</div>
|
|
|
<div class="form">
|
|
|
<span class="formSpan">资产编号:</span>
|
|
|
- <el-input v-model="qrs.assetNo" placeholder="请输入资产编号" style="width: 160px" />
|
|
|
+ <el-input
|
|
|
+ v-model="qrs.assetNo"
|
|
|
+ placeholder="请输入资产编号"
|
|
|
+ style="width: 160px"
|
|
|
+ @keydown="keydonwHandle"
|
|
|
+ />
|
|
|
</div>
|
|
|
<div class="form">
|
|
|
<span class="formSpan">资产名称:</span>
|
|
|
- <el-input v-model="qrs.assetName" placeholder="请输入资产名称" style="width: 160px" />
|
|
|
+ <el-input
|
|
|
+ v-model="qrs.assetName"
|
|
|
+ placeholder="请输入资产名称"
|
|
|
+ style="width: 160px"
|
|
|
+ @keydown="keydonwHandle"
|
|
|
+ />
|
|
|
</div>
|
|
|
<div class="form">
|
|
|
<span class="formSpan">资产类型:</span>
|
|
@@ -52,15 +62,30 @@
|
|
|
</div>
|
|
|
<div class="form">
|
|
|
<span class="formSpan">资产型号:</span>
|
|
|
- <el-input v-model="qrs.assetModel" placeholder="请输入资产型号" style="width: 160px" />
|
|
|
+ <el-input
|
|
|
+ v-model="qrs.assetModel"
|
|
|
+ placeholder="请输入资产型号"
|
|
|
+ style="width: 160px"
|
|
|
+ @keydown="keydonwHandle"
|
|
|
+ />
|
|
|
</div>
|
|
|
<div class="form">
|
|
|
<span class="formSpan">资产序列号:</span>
|
|
|
- <el-input v-model="qrs.assetSequence" placeholder="请输入资产序列号" style="width: 160px" />
|
|
|
+ <el-input
|
|
|
+ v-model="qrs.assetSequence"
|
|
|
+ placeholder="请输入资产序列号"
|
|
|
+ style="width: 160px"
|
|
|
+ @keydown="keydonwHandle"
|
|
|
+ />
|
|
|
</div>
|
|
|
<div class="form">
|
|
|
<span class="formSpan">保管人:</span>
|
|
|
- <el-input v-model="qrs.custodianName" placeholder="请输入保管人" style="width: 160px" />
|
|
|
+ <el-input
|
|
|
+ v-model="qrs.custodianName"
|
|
|
+ placeholder="请输入保管人"
|
|
|
+ style="width: 160px"
|
|
|
+ @keydown="keydonwHandle"
|
|
|
+ />
|
|
|
</div>
|
|
|
<div class="form">
|
|
|
<span class="formSpan">保管人部门:</span>
|
|
@@ -87,10 +112,10 @@
|
|
|
<img src="@/assets/imgs/OA/open.png" class="mr-8px" alt="" />
|
|
|
导出</el-button
|
|
|
>
|
|
|
- <!-- <el-button type="primary" @click="addOrEditDialogHandle">
|
|
|
+ <el-button type="primary" @click="queryAssetProcure">
|
|
|
<el-icon size="16" style="margin-right: 5px; font-weight: bold"><Plus /></el-icon>
|
|
|
新增</el-button
|
|
|
- > -->
|
|
|
+ >
|
|
|
<el-button type="danger" @click="changeCustodian">
|
|
|
<img src="@/assets/imgs/OA/open.png" class="mr-8px" alt="" />
|
|
|
变更</el-button
|
|
@@ -145,27 +170,30 @@
|
|
|
<el-table-column :show-overflow-tooltip="true" prop="assetName" label="资产名称" />
|
|
|
<el-table-column :show-overflow-tooltip="true" prop="assetType" label="资产类型" />
|
|
|
<el-table-column :show-overflow-tooltip="true" prop="assetModel" label="资产型号" />
|
|
|
- <el-table-column
|
|
|
- :show-overflow-tooltip="true"
|
|
|
- prop="custodianName"
|
|
|
- label="保管人"
|
|
|
- width="120"
|
|
|
- />
|
|
|
<!-- <el-table-column
|
|
|
:show-overflow-tooltip="true"
|
|
|
prop="custodianDeptName"
|
|
|
label="保管人部门"
|
|
|
/> -->
|
|
|
<el-table-column :show-overflow-tooltip="true" prop="assetSequence" label="资产序列号" />
|
|
|
+ <el-table-column
|
|
|
+ :show-overflow-tooltip="true"
|
|
|
+ prop="custodianName"
|
|
|
+ label="保管人"
|
|
|
+ width="120"
|
|
|
+ />
|
|
|
<el-table-column :show-overflow-tooltip="true" prop="amount" label="金额" width="120" />
|
|
|
<!-- <el-table-column :show-overflow-tooltip="true" prop="assetConfig" label="资产配置" /> -->
|
|
|
<el-table-column :show-overflow-tooltip="true" prop="bz1" label="备注" />
|
|
|
|
|
|
- <el-table-column label="操作" width="80" fixed="right">
|
|
|
+ <el-table-column label="操作" width="160" fixed="right">
|
|
|
<template #default="scope">
|
|
|
- <div class="operateBtn" @click="operateClick(scope.row)">
|
|
|
- <span>查看</span>
|
|
|
- </div>
|
|
|
+ <el-button type="primary" plain round @click="operateClick(scope.row)"
|
|
|
+ >查看</el-button
|
|
|
+ >
|
|
|
+ <el-button type="primary" plain round @click="addOrEditDialogHandle(scope.row)"
|
|
|
+ >编辑</el-button
|
|
|
+ >
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
@@ -193,78 +221,75 @@
|
|
|
>
|
|
|
<el-row :gutter="20">
|
|
|
<el-col :span="12">
|
|
|
- <el-form-item label="项目名称" prop="name">
|
|
|
- <el-input v-model="ruleForm.name" />
|
|
|
- </el-form-item>
|
|
|
- </el-col>
|
|
|
- <el-col :span="12">
|
|
|
- <el-form-item label="项目编号" prop="name">
|
|
|
- <el-input v-model="ruleForm.name" />
|
|
|
- </el-form-item>
|
|
|
- </el-col>
|
|
|
- </el-row>
|
|
|
- <el-row :gutter="20">
|
|
|
- <el-col :span="12">
|
|
|
- <el-form-item label="项目责任部门" prop="name">
|
|
|
- <el-input v-model="ruleForm.name" />
|
|
|
+ <el-form-item label="采购时间">
|
|
|
+ <el-date-picker
|
|
|
+ style="width: 100%"
|
|
|
+ v-model="ruleForm.procureTime"
|
|
|
+ type="date"
|
|
|
+ placeholder="请选择采购时间"
|
|
|
+ />
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="12">
|
|
|
- <el-form-item label="采购时间" prop="name">
|
|
|
- <el-input v-model="ruleForm.name" />
|
|
|
+ <el-form-item label="资产编号">
|
|
|
+ <el-input v-model="ruleForm.assetNo" />
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
<el-row :gutter="20">
|
|
|
<el-col :span="12">
|
|
|
- <el-form-item label="资产编号" prop="name">
|
|
|
- <el-input v-model="ruleForm.name" />
|
|
|
+ <el-form-item label="资产名称">
|
|
|
+ <el-input v-model="ruleForm.assetName" />
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="12">
|
|
|
- <el-form-item label="资产名称" prop="name">
|
|
|
- <el-input v-model="ruleForm.name" />
|
|
|
+ <el-form-item label="资产类型">
|
|
|
+ <el-select
|
|
|
+ v-model="ruleForm.assetType"
|
|
|
+ style="width: 100%"
|
|
|
+ placeholder="请选择资产类型"
|
|
|
+ >
|
|
|
+ <el-option
|
|
|
+ v-for="item in typeList2"
|
|
|
+ :key="item.value"
|
|
|
+ :label="item.label"
|
|
|
+ :value="item.value"
|
|
|
+ />
|
|
|
+ </el-select>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
<el-row :gutter="20">
|
|
|
<el-col :span="12">
|
|
|
- <el-form-item label="资产类型" prop="name">
|
|
|
- <el-input v-model="ruleForm.name" />
|
|
|
+ <el-form-item label="资产型号">
|
|
|
+ <el-input v-model="ruleForm.assetModel" />
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="12">
|
|
|
- <el-form-item label="资产型号" prop="name">
|
|
|
- <el-input v-model="ruleForm.name" />
|
|
|
+ <el-form-item label="资产序列号">
|
|
|
+ <el-input v-model="ruleForm.assetSequence" />
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
<el-row :gutter="20">
|
|
|
<el-col :span="12">
|
|
|
- <el-form-item label="资产序列号" prop="name">
|
|
|
- <el-input v-model="ruleForm.name" />
|
|
|
+ <el-form-item label="保管人">
|
|
|
+ <UserOrgTree
|
|
|
+ v-model="ruleForm.custodian"
|
|
|
+ @node-click="nodeClickHandle"
|
|
|
+ :all="true"
|
|
|
+ placeholder="请选择人员"
|
|
|
+ />
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="12">
|
|
|
- <el-form-item label="保管人" prop="name">
|
|
|
- <el-input v-model="ruleForm.name" />
|
|
|
+ <el-form-item label="金额">
|
|
|
+ <el-input v-model="ruleForm.amount" />
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
- <el-row :gutter="20">
|
|
|
- <el-col :span="12">
|
|
|
- <el-form-item label="金额" prop="name">
|
|
|
- <el-input v-model="ruleForm.name" />
|
|
|
- </el-form-item>
|
|
|
- </el-col>
|
|
|
- <el-col :span="12">
|
|
|
- <el-form-item label="状态" prop="name">
|
|
|
- <el-input v-model="ruleForm.name" />
|
|
|
- </el-form-item>
|
|
|
- </el-col>
|
|
|
- </el-row>
|
|
|
- <el-form-item label="备注" prop="desc">
|
|
|
- <el-input v-model="ruleForm.desc" type="textarea" />
|
|
|
+ <el-form-item label="备注">
|
|
|
+ <el-input v-model="ruleForm.bz1" type="textarea" />
|
|
|
</el-form-item>
|
|
|
</el-form>
|
|
|
<template #footer>
|
|
@@ -281,6 +306,7 @@ import request from '@/config/axios'
|
|
|
import * as DeptApi from '@/api/system/dept'
|
|
|
import { defaultProps, handleTree } from '@/utils/tree'
|
|
|
import { arrFlatten } from '../../attendanceCenter/attendAuth'
|
|
|
+import { openFlow } from '@/utils/flow'
|
|
|
import UserForm from './UserForm.vue'
|
|
|
import UserOrgTree from '@/views/OaSystem/components/UserOrgTree/index.vue'
|
|
|
|
|
@@ -348,6 +374,24 @@ const typeList: any = ref([
|
|
|
value: '行政办公设备'
|
|
|
}
|
|
|
])
|
|
|
+const typeList2 = [
|
|
|
+ {
|
|
|
+ label: '计算机设备',
|
|
|
+ value: '计算机设备'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '机器设备',
|
|
|
+ value: '机器设备'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '办公家具',
|
|
|
+ value: '办公家具'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '行政办公设备',
|
|
|
+ value: '行政办公设备'
|
|
|
+ }
|
|
|
+]
|
|
|
const handleCurrentChange = (pageNo: number) => {
|
|
|
qrs.pageNo = pageNo
|
|
|
queryProjectListAjax()
|
|
@@ -388,19 +432,68 @@ const queryProjectListAjax = async () => {
|
|
|
}
|
|
|
|
|
|
queryProjectListAjax()
|
|
|
+const keydonwHandle = (evt) => {
|
|
|
+ console.log(evt)
|
|
|
+ if (evt.keyCode === 13) {
|
|
|
+ queryProjectListAjax()
|
|
|
+ console.log(evt)
|
|
|
+ }
|
|
|
+}
|
|
|
/**
|
|
|
* 固定资产投资新增、编辑
|
|
|
*/
|
|
|
-const title = ref<string>('添加固定资产')
|
|
|
-interface IFormType {}
|
|
|
+const title = ref<string>('编辑固定资产')
|
|
|
+interface IFormType {
|
|
|
+ procureTime: string
|
|
|
+ assetNo: string
|
|
|
+ assetName: string
|
|
|
+ assetType: string
|
|
|
+ assetModel: string
|
|
|
+ assetSequence: string
|
|
|
+ custodian: string
|
|
|
+ custodianName: string
|
|
|
+ amount: string
|
|
|
+ bz1: string
|
|
|
+}
|
|
|
const ruleForm = ref<IFormType>({
|
|
|
- name: ''
|
|
|
+ procureTime: '',
|
|
|
+ assetNo: '',
|
|
|
+ assetName: '',
|
|
|
+ assetType: '',
|
|
|
+ assetModel: '',
|
|
|
+ assetSequence: '',
|
|
|
+ custodian: '',
|
|
|
+ custodianName: '',
|
|
|
+ amount: '',
|
|
|
+ bz1: ''
|
|
|
})
|
|
|
+const nodeClickHandle = (node) => {
|
|
|
+ ruleForm.value.custodianName = node['label']
|
|
|
+}
|
|
|
const dialogVisible = ref<boolean>(false)
|
|
|
-const addOrEditDialogHandle = () => {
|
|
|
+const addOrEditDialogHandle = (row) => {
|
|
|
dialogVisible.value = true
|
|
|
+ ruleForm.value = row
|
|
|
+}
|
|
|
+
|
|
|
+const queryAssetProcure = async () => {
|
|
|
+ const urlApi = `/AssetProcure/process`
|
|
|
+ const result = await request.get({ url: urlApi }, '/business')
|
|
|
+ openFlow(router, result, '固定资产录入')
|
|
|
+}
|
|
|
+
|
|
|
+const message = useMessage() // 消息弹窗
|
|
|
+const onSaveHandle = async () => {
|
|
|
+ try {
|
|
|
+ const urlApi = `/AssetProcure/updateDetail`
|
|
|
+ const result = await request.post({ url: urlApi, data: ruleForm.value }, '/business')
|
|
|
+ console.log('result---------------')
|
|
|
+ console.log(result)
|
|
|
+ message.success('变更成功')
|
|
|
+ } finally {
|
|
|
+ dialogVisible.value = false
|
|
|
+ }
|
|
|
}
|
|
|
-const onSaveHandle = () => {}
|
|
|
/**
|
|
|
* 获取行政区tree结构数据
|
|
|
*/
|