提交 b6562ed5 编写于 作者: 刘英杰's avatar 刘英杰

保存

上级 bb0cf43a
......@@ -16,7 +16,7 @@ export declare function getApiClassificationGetClassificationById(params: GetApi
title: {
field_id: string;
show_name: string;
show_type: number;
show_type: string;
width: number;
order_by_flag: number;
default_hide_flag: number;
......
......@@ -16,7 +16,7 @@ export declare function getApiCommonUserSelect(params: GetApiCommonUserSelectPar
title: {
field_id: string;
show_name: string;
show_type: number;
show_type: string;
width: number;
order_by_flag: number;
default_hide_flag: number;
......
......@@ -3,3 +3,4 @@ export * from "./getApiCommonUserSelect";
export * from "./postApiCommonUploadFile";
export * from "./postApiCommonGetDept";
export * from "./postApiCommonGetLog";
export * from "./postApiCommonParaTest";
......@@ -3,3 +3,4 @@ export * from "./getApiCommonUserSelect";
export * from "./postApiCommonUploadFile";
export * from "./postApiCommonGetDept";
export * from "./postApiCommonGetLog";
export * from "./postApiCommonParaTest";
......@@ -16,7 +16,7 @@ export declare function getApiMaterialAuditAuditList(params: GetApiMaterialAudit
title: {
field_id: string;
show_name: string;
show_type: number;
show_type: string;
width: number;
order_by_flag: number;
default_hide_flag: number;
......
......@@ -16,7 +16,7 @@ export declare function getApiMaterialAuditAuditPassedList(params: GetApiMateria
title: {
field_id: string;
show_name: string;
show_type: number;
show_type: string;
width: number;
order_by_flag: number;
default_hide_flag: number;
......
......@@ -16,7 +16,7 @@ export declare function getApiMaterialAuditAuditRejectList(params: GetApiMateria
title: {
field_id: string;
show_name: string;
show_type: number;
show_type: string;
width: number;
order_by_flag: number;
default_hide_flag: number;
......
......@@ -16,7 +16,7 @@ export declare function getApiConsumaMaterilaApplicationConsumaMaterilaApplicati
title: {
field_id: string;
show_name: string;
show_type: number;
show_type: string;
width: number;
order_by_flag: number;
default_hide_flag: number;
......
......@@ -16,7 +16,7 @@ export declare function getApiConsumaMaterilaApplicationPersonConsumaMaterilaApp
title: {
field_id: string;
show_name: string;
show_type: number;
show_type: string;
width: number;
order_by_flag: number;
default_hide_flag: number;
......
......@@ -16,7 +16,7 @@ export declare function getApiConsumaMeterialLendRecordList(params: GetApiConsum
title: {
field_id: string;
show_name: string;
show_type: number;
show_type: string;
width: number;
order_by_flag: number;
default_hide_flag: number;
......@@ -90,8 +90,11 @@ export declare function getApiConsumaMeterialLendRecordList(params: GetApiConsum
};
}, any>>;
export interface GetApiConsumaMeterialLendRecordListParams {
/** 查询开始时间 */
start_date?: string;
/** 查询结束时间 */
end_date?: string;
/** 关键字:领用人卡号/领用人名称 */
query?: string;
page_index?: number;
page_size?: number;
......
......@@ -16,7 +16,7 @@ export declare function getApiConsumaMeterialMaterialList(params: GetApiConsumaM
title: {
field_id: string;
show_name: string;
show_type: number;
show_type: string;
width: number;
order_by_flag: number;
default_hide_flag: number;
......
......@@ -16,7 +16,7 @@ export declare function getApiConsumaMeterialPersonalLendRecordList(params: GetA
title: {
field_id: string;
show_name: string;
show_type: number;
show_type: string;
width: number;
order_by_flag: number;
default_hide_flag: number;
......
......@@ -7,8 +7,12 @@ export * from "./postApiConsumaMeterialMaterialBatchAdd";
export * from "./postApiConsumaMeterialMaterialBatchUpdate";
export * from "./getApiConsumaMeterialMaterialBatchListInit";
export * from "./postApiConsumaMeterialMaterialBatchList";
export * from "./postApiConsumaMeterialMaterialBatchListExport";
export * from "./getApiConsumaMeterialMaterialBatchDelete";
export * from "./getApiConsumaMeterialPersonalLendRecordListInit";
export * from "./getApiConsumaMeterialPersonalLendRecordList";
export * from "./getApiConsumaMeterialLendRecordListInit";
export * from "./getApiConsumaMeterialLendRecordList";
export * from "./getApiConsumaMeterialLendRecordListOutPut";
export * from "./postApiConsumaMeterialMaterialBatchImport";
export * from "./getApiConsumaMeterialMaterialBatchImportBaseFile";
......@@ -7,8 +7,12 @@ export * from "./postApiConsumaMeterialMaterialBatchAdd";
export * from "./postApiConsumaMeterialMaterialBatchUpdate";
export * from "./getApiConsumaMeterialMaterialBatchListInit";
export * from "./postApiConsumaMeterialMaterialBatchList";
export * from "./postApiConsumaMeterialMaterialBatchListExport";
export * from "./getApiConsumaMeterialMaterialBatchDelete";
export * from "./getApiConsumaMeterialPersonalLendRecordListInit";
export * from "./getApiConsumaMeterialPersonalLendRecordList";
export * from "./getApiConsumaMeterialLendRecordListInit";
export * from "./getApiConsumaMeterialLendRecordList";
export * from "./getApiConsumaMeterialLendRecordListOutPut";
export * from "./postApiConsumaMeterialMaterialBatchImport";
export * from "./getApiConsumaMeterialMaterialBatchImportBaseFile";
......@@ -17,7 +17,7 @@ export declare function postApiConsumaMeterialMaterialBatchList(input?: Material
title: {
field_id: string;
show_name: string;
show_type: number;
show_type: string;
width: number;
order_by_flag: number;
default_hide_flag: number;
......
......@@ -16,7 +16,7 @@ export declare function getApiEquipmentAdminEquipmentLendList(params: GetApiEqui
title: {
field_id: string;
show_name: string;
show_type: number;
show_type: string;
width: number;
order_by_flag: number;
default_hide_flag: number;
......
......@@ -16,7 +16,7 @@ export declare function getApiEquipmentEquipmentLendLsit(params: GetApiEquipment
title: {
field_id: string;
show_name: string;
show_type: number;
show_type: string;
width: number;
order_by_flag: number;
default_hide_flag: number;
......
......@@ -16,7 +16,7 @@ export declare function getApiEquipmentEquipmentSelect(params: GetApiEquipmentEq
title: {
field_id: string;
show_name: string;
show_type: number;
show_type: string;
width: number;
order_by_flag: number;
default_hide_flag: number;
......
......@@ -14,3 +14,4 @@ export * from "./getApiEquipmentEquipmentSelect";
export * from "./getApiEquipmentEquipmentDelete";
export * from "./getApiEquipmentGetEquipmentClassificationTree";
export * from "./getApiEquipmentEquipmentNotReturnReminder";
export * from "./postApiEquipmentEquipmentLendToPdf";
......@@ -14,3 +14,4 @@ export * from "./getApiEquipmentEquipmentSelect";
export * from "./getApiEquipmentEquipmentDelete";
export * from "./getApiEquipmentGetEquipmentClassificationTree";
export * from "./getApiEquipmentEquipmentNotReturnReminder";
export * from "./postApiEquipmentEquipmentLendToPdf";
......@@ -16,7 +16,7 @@ export declare function postApiEquipmentEquipmentList(params: PostApiEquipmentEq
title: {
field_id: string;
show_name: string;
show_type: number;
show_type: string;
width: number;
order_by_flag: number;
default_hide_flag: number;
......
......@@ -17,7 +17,7 @@ export declare function postApiEquipmentEquipmentStoreInList(input?: EquipmentSt
title: {
field_id: string;
show_name: string;
show_type: number;
show_type: string;
width: number;
order_by_flag: number;
default_hide_flag: number;
......
......@@ -16,7 +16,7 @@ export declare function postApiEquipmentPersonalLendEquipmentList(params: PostAp
title: {
field_id: string;
show_name: string;
show_type: number;
show_type: string;
width: number;
order_by_flag: number;
default_hide_flag: number;
......
......@@ -16,7 +16,7 @@ export declare function getApiEquipmentApplicationApplicationList(params: GetApi
title: {
field_id: string;
show_name: string;
show_type: number;
show_type: string;
width: number;
order_by_flag: number;
default_hide_flag: number;
......
......@@ -16,7 +16,7 @@ export declare function getApiEquipmentApplicationPersonalApplicationList(params
title: {
field_id: string;
show_name: string;
show_type: number;
show_type: string;
width: number;
order_by_flag: number;
default_hide_flag: number;
......
......@@ -16,7 +16,7 @@ export declare function getApiEquipmentAuditAuditList(params: GetApiEquipmentAud
title: {
field_id: string;
show_name: string;
show_type: number;
show_type: string;
width: number;
order_by_flag: number;
default_hide_flag: number;
......
......@@ -16,7 +16,7 @@ export declare function getApiEquipmentAuditAuditPassList(params: GetApiEquipmen
title: {
field_id: string;
show_name: string;
show_type: number;
show_type: string;
width: number;
order_by_flag: number;
default_hide_flag: number;
......
......@@ -16,7 +16,7 @@ export declare function getApiEquipmentAuditAuditRejectList(params: GetApiEquipm
title: {
field_id: string;
show_name: string;
show_type: number;
show_type: string;
width: number;
order_by_flag: number;
default_hide_flag: number;
......
......@@ -16,7 +16,7 @@ export declare function getApiPermissionQuery(params: GetApiPermissionQueryParam
title: {
field_id: string;
show_name: string;
show_type: number;
show_type: string;
width: number;
order_by_flag: number;
default_hide_flag: number;
......
......@@ -2,3 +2,4 @@ export * from "./getApiRepairAddMiddleItem";
export * from "./getApiRepairQueryById";
export * from "./getApiRepairDeleteMiddleItem";
export * from "./getApiRepairRegisterRepair";
export * from "./getApiRepairRepairList";
......@@ -2,3 +2,4 @@ export * from "./getApiRepairAddMiddleItem";
export * from "./getApiRepairQueryById";
export * from "./getApiRepairDeleteMiddleItem";
export * from "./getApiRepairRegisterRepair";
export * from "./getApiRepairRepairList";
......@@ -16,7 +16,7 @@ export declare function getApiWarningWarningList(params: GetApiWarningWarningLis
title: {
field_id: string;
show_name: string;
show_type: number;
show_type: string;
width: number;
order_by_flag: number;
default_hide_flag: number;
......
......@@ -2,7 +2,7 @@ import { type Option } from "../../interface";
export interface TableTitle {
field_id?: string;
show_name?: string;
show_type?: number;
show_type?: string;
width?: number;
order_by_flag?: number;
default_hide_flag?: number;
......
......@@ -18,6 +18,8 @@ export * from "./apiTypes/VEcmsDept";
export * from "./apiTypes/VEcmsDeptMessageModel";
export * from "./apiTypes/EcmsLog";
export * from "./apiTypes/EcmsLogMessageModel";
export * from "./apiTypes/Para";
export * from "./apiTypes/ParaTestRequest";
export * from "./apiTypes/EcmsSysConfig";
export * from "./apiTypes/EcmsSysConfigMessageModel";
export * from "./apiTypes/MaterialNumViewModel";
......@@ -101,6 +103,9 @@ export * from "./apiTypes/AdminAddRequest";
export * from "./apiTypes/PermissionUpdateRequest";
export * from "./apiTypes/EcmsRepairMiddle";
export * from "./apiTypes/EcmsRepairMiddleMessageModel";
export * from "./apiTypes/RepairListResponse";
export * from "./apiTypes/RepairListResponsePageModel";
export * from "./apiTypes/RepairListResponsePageModelMessageModel";
export * from "./apiTypes/Int32MessageModel";
export * from "./apiTypes/StringInt32DictionaryMessageModel";
export * from "./apiTypes/GetMaterialUseCountResponse";
......
......@@ -18,6 +18,8 @@ export * from "./apiTypes/VEcmsDept";
export * from "./apiTypes/VEcmsDeptMessageModel";
export * from "./apiTypes/EcmsLog";
export * from "./apiTypes/EcmsLogMessageModel";
export * from "./apiTypes/Para";
export * from "./apiTypes/ParaTestRequest";
export * from "./apiTypes/EcmsSysConfig";
export * from "./apiTypes/EcmsSysConfigMessageModel";
export * from "./apiTypes/MaterialNumViewModel";
......@@ -101,6 +103,9 @@ export * from "./apiTypes/AdminAddRequest";
export * from "./apiTypes/PermissionUpdateRequest";
export * from "./apiTypes/EcmsRepairMiddle";
export * from "./apiTypes/EcmsRepairMiddleMessageModel";
export * from "./apiTypes/RepairListResponse";
export * from "./apiTypes/RepairListResponsePageModel";
export * from "./apiTypes/RepairListResponsePageModelMessageModel";
export * from "./apiTypes/Int32MessageModel";
export * from "./apiTypes/StringInt32DictionaryMessageModel";
export * from "./apiTypes/GetMaterialUseCountResponse";
......
......@@ -39,7 +39,7 @@
<template #action="{ row }">
<div class="action-btns">
<a href="javascript:;" @click="details(row)">详情</a>
<Divider v-if="row.audit_status === 0" type="vertical"/>
<Divider v-if="row.audit_status === 0" type="vertical"/>
<Poptip
v-if="row.audit_status === 0"
confirm
......@@ -162,10 +162,11 @@
>
<template #num="{row}">
<InputNumber @on-change="materialChange($event,row)" v-model="row.num" :min="1" controls-outside/>
<InputNumber @on-change="materialChange($event,row)" v-model="row.num" :min="1" controls-outside/>
</template>
<template #action="{row}">
<a href="javascript:;" @click="init.application.formData.material_num_list = init.application.formData.material_num_list.filter(cur=>cur.id !== row.id)">删除</a>
<a href="javascript:;"
@click="init.application.formData.material_num_list = init.application.formData.material_num_list.filter(cur=>cur.id !== row.id)">删除</a>
<!-- <Poptip
:transfer="true"
......@@ -179,15 +180,15 @@
</template>
</Table>
<div style="gap: 8px;width: 100%;display: flex;justify-content: center;">
<Button
style="width: 100%;"
icon="md-add"
type="dashed"
@click="showAddUser('选择耗材')"
>
选择耗材
</Button>
</div>
<Button
style="width: 100%;"
icon="md-add"
type="dashed"
@click="showAddUser('选择耗材')"
>
选择耗材
</Button>
</div>
</FormItem>
</Col>
......@@ -212,7 +213,6 @@
:before-upload="beforeUpload"
>
<Button icon="ios-cloud-upload-outline">上传附件</Button>
</Upload>
<div
......@@ -374,7 +374,7 @@ import CTable from '@/components/CTable.vue'
const DrawerDetails = defineAsyncComponent(() => import('@/components/drawerDetails'))
const init = reactive({
pageKey:'',
pageKey: '',
consumablesSelector: {
batchMaintenance: {
flag: 'add',
......@@ -768,13 +768,15 @@ const init = reactive({
},
rules: {
material_num_list: [
{ required: true, type: 'array', validator:(rule, value, callback)=>{
if(init.application.formData.material_num_list.length>0){
callback();
}else{
callback(new Error('请选择耗材'));
}
}, message: "请选择耗材", trigger: "change" }
{
required: true, type: 'array', validator: (rule, value, callback) => {
if (init.application.formData.material_num_list.length > 0) {
callback();
} else {
callback(new Error('请选择耗材'));
}
}, message: "请选择耗材", trigger: "change"
}
],
},
......@@ -859,7 +861,6 @@ const applyForDevices = () => {
}
// 耗材申请数量
const materialChange = (event, row) => {
init.application.formData.material_num_list.forEach((cur => {
if (cur.id === row.id) cur.num = event
}))
......@@ -878,28 +879,26 @@ const handleSubmitDevice = () => {
// })
// return
materialForm.value.validate(validate=>{
if(validate){
materialForm.value.validate(validate => {
if (validate) {
hooks.myEncapsulationFunction(() => {
return api.postApiConsumaMaterilaApplicationConsumaMaterilaApply({
usage: init.application.formData.usage,
file_list: init.application.formData.file_list.map(cur => cur.id).join(';'),
material_num_list: init.application.formData.material_num_list.map(cur => ({
"material_id": cur.id,
"num": cur.num
})),
}).then(res => {
if (res.code === 1) {
PersonalApplicationList()
init.application.show = false
}
})
}, false, '正在提交中...')
return api.postApiConsumaMaterilaApplicationConsumaMaterilaApply({
usage: init.application.formData.usage,
file_list: init.application.formData.file_list.map(cur => cur.id).join(';'),
material_num_list: init.application.formData.material_num_list.map(cur => ({
"material_id": cur.id,
"num": cur.num
})),
}).then(res => {
if (res.code === 1) {
PersonalApplicationList()
init.application.show = false
}
return res
})
}, false, '正在提交中...')
}
})
}
/**
......@@ -1258,7 +1257,7 @@ function closeDrawer() {
function cancelApplication(row) {
hooks.myEncapsulationFunction(() => {
return api.postApiConsumaMaterilaApplicationConcelApplication({
application_id:row.application_id
application_id: row.application_id
}).then(res => {
if (res.code === 1) {
PersonalApplicationList()
......
......@@ -12,7 +12,7 @@
@on-reset="handleReset"
/>
<div style="display: flex;">
<Button class="ivu-ml-8" type="primary" @click="init.importDuty.show = true">
<Button class="ivu-ml-8" type="primary" @click="importDutyFun">
<Icon type="ios-cloud-download-outline"/>
导出领用记录
</Button>
......@@ -51,6 +51,7 @@
<!-- 分页 -->
<div class="pagination">
<Page
:key="init.pageKey"
:transfer="true"
:total="init.myBorrowingRecord.total"
:current="init.myBorrowingRecord.params.page_index"
......@@ -216,6 +217,7 @@ const departmentOptions = ref([])
// 当前选中的角色
const currentRole = ref({})
const init = reactive({
pageKey:'',
importDuty: {
loading: false,
show: false,
......@@ -422,6 +424,7 @@ const handleReset = () => {
page_size: 10,
remark: "",
}
init.pageKey = Date.now()
PersonalLendRecordList()
}
// 分页改变
......@@ -541,17 +544,12 @@ function closeDrawer(){
function importDutyFun() {
//值班附件导出
init.importDuty.loading = true
let date = {
begin_time: dayjs(init.importDuty.date[0]).format('YYYY-MM-DD'),
end_time: dayjs(init.importDuty.date[1]).format('YYYY-MM-DD'),
}
return api.postApiActivityExport({...init.importDuty.formData, ...date}).then(res => {
window.location.href = res.response
init.importDuty.loading = false
}).finally(() => {
init.importDuty.loading = false
})
hooks.myEncapsulationFunction(()=>{
return api.getApiConsumaMeterialLendRecordListOutPut(init.myBorrowingRecord.params ).then(res => {
window.location.href = res.response
return res
})
},false,'正在导出...')
}
onMounted(() => {
......@@ -702,4 +700,4 @@ onMounted(() => {
.duty-dept-select {
margin-bottom: 16px;
}
</style>
\ No newline at end of file
</style>
......@@ -18,7 +18,7 @@
<template #right>
<div class="demo-split-pane-R">
<Card ref="card" dis-hover>
<!-- 搜索条件-->
<!--搜索条件-->
<initForm
ref="searchFormRef"
:searchCondList="init.searchList"
......@@ -26,13 +26,30 @@
@on-reset="handleReset"
/>
<Button type="primary" class="ivu-ml-8" :disabled="params.classification_id==''" @click="add">
<Icon type="md-add"/>
新增
</Button>
<div style="display: flex;gap: 10px;padding-top: 10px;">
<Button type="primary" class="ivu-ml-8" :disabled="params.classification_id==''" @click="add">
<Icon type="md-add"/>
新增
</Button>
<!-- 数据table -->
<Upload class="ivu-ml-8" :before-upload="beforeUpload">
<Button type="primary">
<Icon type="ios-cloud-upload-outline"/>
批量导入批次
</Button>
</Upload>
<Button class="ivu-ml-8" type="primary" @click="importDutyFun">
<Icon type="ios-cloud-download-outline"/>
导出批量批次模版
</Button>
</div>
<!--数据table -->
<CTable
:key="init.pageKey"
:tableBorder="true"
:tableColumns="tableColumns.filter(a => a.show)"
:tableData="tableData"
......@@ -42,7 +59,6 @@
:pageIndex="params.page_index"
:pageSize="params.page_size"
@switchChange="switchChange"
@onPageChange="onPageChange"
@onPageSizeChange="onPageSizeChange">
......@@ -69,8 +85,8 @@
<a type="text" @click="showBatchMaintenance(row)">批次维护</a>
<Divider type="vertical"/>
<!-- <a type="text" @click="showEarlyWarning(row)">耗材预警</a>-->
<!-- <Divider type="vertical"/>-->
<!-- <a type="text" @click="showEarlyWarning(row)">耗材预警</a>-->
<!-- <Divider type="vertical"/>-->
<a type="text" @click="handleEdit(row)">编辑</a>
<Divider type="vertical"/>
<Poptip confirm transfer title="是否确认删除?" @on-ok="handleDelete(row)">
......@@ -290,6 +306,10 @@
<Icon type="md-add"/>
新增
</Button>
<Button class="ivu-ml-8" type="primary" @click="exportNearExpiryList">
<Icon type="ios-cloud-download-outline"/>
导出近效期清单
</Button>
</div>
<Table
:loading="init.batchMaintenance.loading"
......@@ -597,6 +617,7 @@
<!-- 分页 -->
<div class="pagination" style="margin-top: 16px">
<Page
:total="init.earlyWarning.total"
:current="init.earlyWarning.params.page_index"
:page-size="init.earlyWarning.params.page_size"
......@@ -624,7 +645,7 @@
import CTable from '@/components/CTable.vue';
import CEditModal from '@/components/CEditModal.vue';
import SearchCondForm from '@/components/SearchCondForm.vue';
import {DatePicker, Divider, FormItem, Modal, Page, Tag} from "view-ui-plus";
import {DatePicker, Divider, FormItem, Modal, Page, Tag, Upload} from "view-ui-plus";
import * as api from '@/api/allApi/controller/index'
import * as hooks from '@/hook/index'
import initForm from "@/components/initForm";
......@@ -634,6 +655,7 @@ import {deviceProjectStore} from "@/store/deviceProjectStoree";
export default {
name: 'list',
components: {
Upload,
DatePicker,
Modal, Page,
FormItem, Tag,
......@@ -646,6 +668,7 @@ export default {
data() {
return {
init: {
pageKey: '',
earlyWarning: {
flag: 'add',
show: false,
......@@ -1074,7 +1097,7 @@ export default {
],
// 搜索条件
params: {
is_under_safe:'0',
is_under_safe: '0',
query: '',
page_index: 1,
page_size: 10,
......@@ -1200,7 +1223,6 @@ export default {
// 获取物资树
this.tableLoading = true
this.getTreeData().then(res => {
console.log("🚀🚀🚀,", res.response)
this.init.consumables.formData.parent_name = res.response[0].name
this.params.classification_id = res.response[0].id
this.getData()
......@@ -1212,8 +1234,8 @@ export default {
* 耗材预警
* @param {Object} row 当前行数据
*/
showEarlyWarning(){
this.init.earlyWarning.show = true
showEarlyWarning() {
this.init.earlyWarning.show = true
},
//提交批次
handleSubmitEarlyWarning() {
......@@ -1514,9 +1536,9 @@ export default {
"duty_tid": "",
"duty_tids": [
{
card_number:deviceProjectStore.state.userInfo.card,
name:deviceProjectStore.state.userInfo.name,
tid:deviceProjectStore.state.userInfo.tid,
card_number: deviceProjectStore.state.userInfo.card,
name: deviceProjectStore.state.userInfo.name,
tid: deviceProjectStore.state.userInfo.tid,
}
],
"storage_num": 0,
......@@ -1663,6 +1685,16 @@ export default {
this.init.batchMaintenance.loading = false;
});
},
//导出批次进效清单
exportNearExpiryList() {
//值班附件导出
hooks.myEncapsulationFunction(() => {
return api.postApiConsumaMeterialMaterialBatchListExport(this.init.batchMaintenance.params).then(res => {
window.location.href = res.response
return res
})
}, false, '正在导出...')
},
/**
* 设备借用记录
......@@ -1789,11 +1821,12 @@ export default {
handleReset() {
this.params = {
...this.params,
is_under_safe:'0',
is_under_safe: '0',
query: '',
page_index: 1,
page_size: 10,
}
this.init.pageKey = Date.now()
this.getData()
},
//提交分类
......@@ -1919,9 +1952,9 @@ export default {
//预警人员
this.init.consumables.formData.waring_person_tid_lists = [
{
card_number:deviceProjectStore.state.userInfo.card,
name:deviceProjectStore.state.userInfo.name,
tid:deviceProjectStore.state.userInfo.tid,
card_number: deviceProjectStore.state.userInfo.card,
name: deviceProjectStore.state.userInfo.name,
tid: deviceProjectStore.state.userInfo.tid,
}
]
this.init.consumables.flag = 'add'
......@@ -1981,6 +2014,29 @@ export default {
})
},
//导出批次模版
importDutyFun() {
//值班附件导出
hooks.myEncapsulationFunction(() => {
return api.getApiConsumaMeterialMaterialBatchImportBaseFile().then(res => {
window.location.href = res.response
return res
})
}, false, '正在导出...')
},
//批次导入附件上传
beforeUpload(file) {
let f = new FormData();
f.append('file', file)
hooks.myEncapsulationFunction(() => {
return api.postApiConsumaMeterialMaterialBatchImport(f, {headers: {'Content-Type': 'multipart/form-data'}}).then(res => {
this.getData()
return res
})
}, false, '正在导入...')
return false
}
}
}
</script>
......
......@@ -52,6 +52,7 @@
<!-- 分页 -->
<div class="pagination">
<Page
:key="init.pageKey"
:total="init.allBorrowingRecord.total"
:current="init.allBorrowingRecord.params.page_index"
:page-size="init.allBorrowingRecord.params.page_size"
......@@ -437,6 +438,7 @@ import {deviceProjectStore} from "@/store/deviceProjectStoree";
const DrawerDetails = defineAsyncComponent(() => import('@/components/drawerDetails'))
const init = reactive({
pageKey:'',
batchMaintenance: {
flag: 'add',
formDataShow: false,
......@@ -1365,6 +1367,7 @@ const handleReset = () => {
page_index: 1,
page_size: 10,
}
init.pageKey = Date.now()
ApplicationList()
}
// 分页改变
......
......@@ -51,6 +51,7 @@
<!-- 分页 -->
<div class="pagination">
<Page
:key="init.pageKey"
:total="init.allBorrowingRecord.total"
:current="init.allBorrowingRecord.params.page_index"
:page-size="init.allBorrowingRecord.params.page_size"
......@@ -281,6 +282,7 @@ const DrawerDetails = defineAsyncComponent(()=>import('@/components/drawerDetai
const init = reactive({
pageKey:'',
grid: {
xs: 24,
sm: 12,
......@@ -584,6 +586,7 @@ const handleReset = () => {
page_index: 1,
page_size: 10,
}
init.pageKey = Date.now();
ApplicationList()
}
// 分页改变
......
......@@ -17,6 +17,10 @@
<Icon type="md-add"/>
新增设备
</Button>
<Button @click="handleBatchNotify" type="success" style="margin-left: 5px">
下载出库单
</Button>
<!-- <Button class="ivu-ml-8" @click="handleImport"><Icon type="md-cloud-upload" /> 导入设备</Button>-->
<!-- <Button-->
......@@ -30,7 +34,10 @@
</div>
<!-- 设备表格 -->
<Table :loading="loading" :columns="userColumns" :data="userList" border>
<Table :loading="loading" :columns="userColumns" :data="userList" border
@on-selection-change="handleSelectionChange"
>
<template #action="{ row }">
<div class="action-btns" style="display: flex; align-items: center">
<a href="javascript:;" @click="handleSubmit(row, 'borrow')"
......@@ -88,6 +95,7 @@
<!-- 分页 -->
<div class="pagination">
<Page
:key="init.pageKey"
:total="init.devices.total"
:current="init.devices.params.page_index"
:page-size="init.devices.params.page_size"
......@@ -639,7 +647,7 @@
label-width="100"
>
<Row :gutter="16" type="flex" style="flex-wrap: wrap;">
<!-- 报修人 -->
<!--报修人-->
<Col :xs="24" :sm="12">
<FormItem label="报修人" prop="name">
<Input
......@@ -669,7 +677,6 @@
placeholder="请选择报修区域"
style="width: 100%;"
:clearable="true"
@on-change="handleAreaChange"
/>
</FormItem>
</Col>
......@@ -695,7 +702,6 @@
placeholder="请选择报修项目"
style="width: 100%;"
:clearable="true"
@on-change="handleItemChange"
/>
<Spin v-if="init.repair.loading"></Spin>
</div>
......@@ -876,6 +882,11 @@ const formValues = ref({});
// 用户表格列定义
const userColumns = computed(() => {
const columns = [
{
type: 'selection',
width: 60,
align: "center",
},
{
title: "#",
type: "index",
......@@ -973,6 +984,7 @@ const loading = ref(false);
const userList = ref([]);
const init = reactive({
pageKey: '',
//报修
repair: {
loading: true,
......@@ -1234,6 +1246,7 @@ const init = reactive({
list: [],
},
devices: {
deviceIdList:[],
flag: "add",
total: 0,
params: {
......@@ -1468,7 +1481,7 @@ function handleSubmit(row, type) {
* 报修细项同步
* */
//变更报修系统细项
bxApi.setAreaItemStatus({"id":[responseInfo.repair_item_id],"use_flag":0}).then(_res=>{
bxApi.setAreaItemStatus({"id": [responseInfo.repair_item_id], "use_flag": 0}).then(_res => {
//删除中间表对应关系
api.getApiRepairDeleteMiddleItem({classification_equipment_id: responseInfo.euqipment_id})
})
......@@ -1667,7 +1680,7 @@ const handleReset = () => {
page_index: 1,
page_size: 10,
};
init.pageKey = Date.now();
init.searchList.forEach((cur) => {
if (cur.code === "classification_id") {
searchFormRef.value.searchCondObj.classification_id = cur.options[0].id;
......@@ -2195,21 +2208,21 @@ function setPeopleColumnsData() {
function showRepair(row) {
getRepairAreaTree()
getRepairItemTree()
init.repair.formData ={
init.repair.formData = {
"name": "",
"area_id": "",
"area_text": "",
"areaDetail": "",
"item_id": "",
"item_text": "",
"itemDetail": "",
"phone": "",
"detail": "",
"file_list": [],
"relationContentId": "",
"contentLinkId": "",
"key_file_list": [],
"key_remark": ""
"area_id": "",
"area_text": "",
"areaDetail": "",
"item_id": "",
"item_text": "",
"itemDetail": "",
"phone": "",
"detail": "",
"file_list": [],
"relationContentId": "",
"contentLinkId": "",
"key_file_list": [],
"key_remark": ""
}
init.repair.title = row.name
......@@ -2219,8 +2232,6 @@ function showRepair(row) {
init.repair.loading = true
//获取报修系统细项id
api.getApiRepairQueryById({classification_equipment_id: row.id}).then(res => {
init.repair.formData.item_id = String(res.response.repair_item_id)
......@@ -2314,9 +2325,10 @@ function handleRepairSubmit() {
}).then(res => {
//
api.getApiRepairRegisterRepair({
repair_item_id: init.repair.formData.item_id,
repair_out_id: res.response}
).then(()=>{
repair_item_id: init.repair.formData.item_id,
repair_out_id: res.response
}
).then(() => {
init.repair.show = false
EquipmentList()
})
......@@ -2331,6 +2343,25 @@ function handleRepairSubmit() {
/**
* 设备报修
* */
//设备导出出库单
function handleSelectionChange(selection) {
init.devices.deviceIdList = selection.map(row => row.id);
}
//导出出库单
function handleBatchNotify() {
if (init.devices.deviceIdList.length === 0) {
Message.warning("请先选择设备");
return;
}
hooks.myEncapsulationFunction(()=>{
api.postApiEquipmentEquipmentLendToPdf(init.devices.deviceIdList).then(res=>{
EquipmentList();
init.devices.deviceIdList = []
})
},false, '正在导出中...')
}
onMounted(() => {
getRepairAreaTree()
getRepairItemTree()
......
......@@ -52,6 +52,7 @@
<!-- 分页 -->
<div class="pagination">
<Page
:key="init.pageKey"
:total="init.allBorrowingRecord.total"
:current="init.allBorrowingRecord.params.page_index"
:page-size="init.allBorrowingRecord.params.page_size"
......@@ -291,6 +292,7 @@ const DrawerDetails = defineAsyncComponent(()=>import('@/components/drawerDetai
const init = reactive({
pageKey:'',
grid: {
xs: 24,
sm: 12,
......@@ -587,6 +589,7 @@ const handleReset = () => {
page_index: 1,
page_size: 10,
}
init.pageKey = Date.now();
ApplicationList()
}
// 分页改变
......
......@@ -54,6 +54,7 @@
<!-- 分页 -->
<div class="pagination">
<Page
:key="init.pageKey"
:total="init.devices.total"
:current="init.devices.params.page_index"
:page-size="init.devices.params.page_size"
......@@ -695,8 +696,8 @@ const userColumns = computed(() => {
return h('span', params.row.storage_location || '-');
}
},
];
// 添加操作列
......@@ -712,6 +713,7 @@ const loading = ref(false);
const userList = ref([]);
const init = reactive({
pageKey:123 ,
// 借用记录相关数据
equipmentBorrowingStatus: {
itemData: {},
......@@ -1334,7 +1336,7 @@ const handleReset = () => {
page_index: 1,
page_size: 10,
};
init.pageKey = Date.now();
init.searchList.forEach((cur) => {
if (cur.code === "classification_id") {
searchFormRef.value.searchCondObj.classification_id = cur.options[0].id;
......
Markdown 格式
0% or
您添加了 0 人 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册 或