订单流程完善
This commit is contained in:
parent
477f48e23f
commit
26823d5cb8
|
|
@ -26,3 +26,4 @@ export const confirmPriceApi = (data: any) => {
|
|||
return post('/material-mall/lease-repair/confirmPrice', data)
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,712 @@
|
|||
<template>
|
||||
<!-- 维修保养管理 -->
|
||||
<div class="app-container-content">
|
||||
<el-form
|
||||
:inline="true"
|
||||
size="default"
|
||||
label-width="0"
|
||||
ref="searchFormRef"
|
||||
:rules="searchFormRules"
|
||||
:model="searchParams"
|
||||
>
|
||||
<el-row>
|
||||
<el-col :span="6">
|
||||
<el-form-item prop="deviceCode">
|
||||
<el-input
|
||||
clearable
|
||||
style="width: 100%"
|
||||
placeholder="请输入装备编码"
|
||||
v-model.trim="searchParams.deviceCode"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="3">
|
||||
<el-form-item prop="minNum">
|
||||
<el-input
|
||||
inputmode="numeric"
|
||||
v-model="searchParams.minNum"
|
||||
style="width: 100%"
|
||||
placeholder="质检次数"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="0.5" style="line-height: 1.5; margin-right: 0.5%">-</el-col>
|
||||
<el-col :span="3">
|
||||
<el-form-item prop="maxNum">
|
||||
<el-input
|
||||
inputmode="numeric"
|
||||
v-model.trim="searchParams.maxNum"
|
||||
style="width: 100%"
|
||||
placeholder="质检次数"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="5">
|
||||
<el-form-item prop="leaseStatus">
|
||||
<el-date-picker
|
||||
v-model="qcTime"
|
||||
type="daterange"
|
||||
style="width: 100%"
|
||||
range-separator="-"
|
||||
value-format="YYYY-MM-DD"
|
||||
start-placeholder="最新质检日期"
|
||||
end-placeholder="最新质检日期"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item>
|
||||
<el-date-picker
|
||||
v-model="createTime"
|
||||
type="daterange"
|
||||
style="width: 100%"
|
||||
range-separator="-"
|
||||
value-format="YYYY-MM-DD"
|
||||
start-placeholder="更新日期"
|
||||
end-placeholder="更新日期"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-form-item>
|
||||
<el-button @click="onSearch" type="primary" class="primary-lease">查询</el-button>
|
||||
<el-button @click="onReset" type="primary" class="primary-lease">重置</el-button>
|
||||
<el-button
|
||||
@click="
|
||||
() => {
|
||||
isRepublish = true
|
||||
dialogTitle = '质检新增'
|
||||
addOrEditDialogVisible = true
|
||||
}
|
||||
"
|
||||
type="primary"
|
||||
class="primary-lease"
|
||||
>
|
||||
新建
|
||||
</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<!-- 表格 -->
|
||||
<el-table
|
||||
border
|
||||
:data="qualityLis"
|
||||
show-overflow-tooltip
|
||||
:header-cell-style="{
|
||||
color: '#fff',
|
||||
background: '#00a288',
|
||||
}"
|
||||
>
|
||||
<el-table-column align="center" label="序号" type="index" width="80" />
|
||||
<el-table-column align="center" prop="deviceCode" label="装备编码" />
|
||||
<el-table-column align="center" prop="deviceName" label="装备名称" />
|
||||
<el-table-column align="center" prop="qcTime" label="最新质检日期" />
|
||||
<el-table-column align="center" prop="createBy" label="创建人" width="120" />
|
||||
<el-table-column align="center" prop="createTime" label="上传时间" />
|
||||
<el-table-column align="center" prop="updateTime" label="更新时间" />
|
||||
<el-table-column align="center" label="操作" :width="220">
|
||||
<template #default="{ row }">
|
||||
<el-button
|
||||
size="small"
|
||||
type="primary"
|
||||
class="primary-lease"
|
||||
@click="onViewQualityRecord(row)"
|
||||
>
|
||||
装备质检记录
|
||||
</el-button>
|
||||
|
||||
<el-popconfirm
|
||||
width="220"
|
||||
:icon="InfoFilled"
|
||||
icon-color="#626AEF"
|
||||
title="确定删除该项需求吗?"
|
||||
@confirm="onDelete(row.id, row.maId)"
|
||||
>
|
||||
<template #reference>
|
||||
<el-button size="small" type="danger"> 删除 </el-button>
|
||||
</template>
|
||||
<template #actions="{ confirm }">
|
||||
<el-button type="primary" class="primary-lease" size="small"
|
||||
>取消</el-button
|
||||
>
|
||||
<el-button
|
||||
class="primary-lease"
|
||||
type="primary"
|
||||
size="small"
|
||||
@click="confirm()"
|
||||
>
|
||||
确定
|
||||
</el-button>
|
||||
</template>
|
||||
</el-popconfirm>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<PagingComponent
|
||||
:total="total"
|
||||
:size="searchParams.pageSize"
|
||||
:page="searchParams.pageNum"
|
||||
@getListChange="getLeaseListData"
|
||||
v-model:page-num="searchParams.pageNum"
|
||||
v-model:page-size="searchParams.pageSize"
|
||||
/>
|
||||
|
||||
<!-- 新增修改对话框 -->
|
||||
<el-dialog
|
||||
:width="dialogTitle == '质检新增' ? '40%' : '60%'"
|
||||
align-center
|
||||
@close="onClose"
|
||||
destroy-on-close
|
||||
:title="dialogTitle"
|
||||
v-model="addOrEditDialogVisible"
|
||||
>
|
||||
<template v-if="dialogTitle == '质检新增'">
|
||||
<el-form
|
||||
label-width="auto"
|
||||
label-position="right"
|
||||
ref="addOrEditFormRef"
|
||||
:model="addOrEditForm"
|
||||
:rules="addOrEditFormRules"
|
||||
>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="24">
|
||||
<el-form-item label="关联装备" style="width: 100%" prop="maId">
|
||||
<el-select
|
||||
clearable
|
||||
style="width: 100%"
|
||||
placeholder="请选择关联装备"
|
||||
v-model="addOrEditForm.maId"
|
||||
>
|
||||
<el-option
|
||||
:key="item.maId"
|
||||
:value="item.maId * 1"
|
||||
:label="item.deviceName"
|
||||
v-for="item in associationList"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="24">
|
||||
<el-form-item label="质检名称" prop="qcName">
|
||||
<el-input
|
||||
v-model.trim="addOrEditForm.qcName"
|
||||
placeholder="请输入质检名称"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="24">
|
||||
<el-form-item label="质检员" prop="qcUser">
|
||||
<el-input
|
||||
clearable
|
||||
placeholder="请输入质检员"
|
||||
v-model="addOrEditForm.qcUser"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="24">
|
||||
<el-form-item label="质检日期" prop="qcTime">
|
||||
<el-date-picker
|
||||
clearable
|
||||
type="date"
|
||||
style="width: 100%"
|
||||
value-format="YYYY-MM-DD"
|
||||
v-model="addOrEditForm.qcTime"
|
||||
placeholder="请选择质检日期"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="24">
|
||||
<el-form-item label="1" style="margin-bottom: 0" class="upload-tip">
|
||||
支持格式:.jpg、.png 单个文件大小不能超过2M,最多可上传1张
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="24">
|
||||
<el-form-item label="质检附件" prop="fileInfoList">
|
||||
<UploadComponentNew
|
||||
:maxSize="2"
|
||||
:max-limit="1"
|
||||
width="100px"
|
||||
height="100px"
|
||||
:multiple="true"
|
||||
:autoUpload="true"
|
||||
:minLimit="addOrEditForm.fileInfoList.length"
|
||||
:actionUrl="uploadUrl"
|
||||
listType="picture-card"
|
||||
@onFileChange="onFileChange"
|
||||
:acceptTypeList="['.jpg', '.png']"
|
||||
>
|
||||
<template v-slot:default>
|
||||
<el-icon size="48" color="#aaa"><Plus /></el-icon>
|
||||
</template>
|
||||
</UploadComponentNew>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
</template>
|
||||
<template #footer v-if="dialogTitle == '质检新增'">
|
||||
<div class="dialog-footer">
|
||||
<el-button type="primary" class="primary-lease" @click="onCancel"
|
||||
>取消</el-button
|
||||
>
|
||||
<el-button class="primary-lease" type="primary" @click="onSubmit()">
|
||||
提交
|
||||
</el-button>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<template v-if="dialogTitle == '质检记录'">
|
||||
<el-row style="padding-bottom: 20px">
|
||||
<el-col :span="6">
|
||||
<span> 装备编号: </span>
|
||||
<span>{{ qualityDetails.deviceCode }}</span>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<span> 装备名称: </span>
|
||||
<span>{{ qualityDetails.deviceName }}</span>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-form
|
||||
:inline="true"
|
||||
size="default"
|
||||
label-width="0"
|
||||
ref="searchFormRefInDialog"
|
||||
:model="searchParamsInDialog"
|
||||
>
|
||||
<el-row>
|
||||
<el-col :span="6">
|
||||
<el-form-item prop="qcCode">
|
||||
<el-input
|
||||
clearable
|
||||
style="width: 100%"
|
||||
placeholder="请输入质检编码"
|
||||
v-model="searchParamsInDialog.qcCode"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item>
|
||||
<el-date-picker
|
||||
v-model="qcTime_1"
|
||||
type="daterange"
|
||||
style="width: 100%"
|
||||
range-separator="-"
|
||||
value-format="YYYY-MM-DD"
|
||||
start-placeholder="质检日期"
|
||||
end-placeholder="质检日期"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item>
|
||||
<el-date-picker
|
||||
v-model="createTime_1"
|
||||
type="daterange"
|
||||
style="width: 100%"
|
||||
range-separator="-"
|
||||
value-format="YYYY-MM-DD"
|
||||
start-placeholder="上传日期"
|
||||
end-placeholder="上传日期"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item>
|
||||
<el-button
|
||||
@click="getLeaseListDataInDialog"
|
||||
type="primary"
|
||||
class="primary-lease"
|
||||
>查询</el-button
|
||||
>
|
||||
<el-button
|
||||
@click="onResetInDialog"
|
||||
type="primary"
|
||||
class="primary-lease"
|
||||
>重置</el-button
|
||||
>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
|
||||
<el-table
|
||||
border
|
||||
:data="qualityDetailsList"
|
||||
show-overflow-tooltip
|
||||
:header-cell-style="{
|
||||
color: '#fff',
|
||||
background: '#00a288',
|
||||
}"
|
||||
>
|
||||
<el-table-column align="center" label="序号" type="index" width="80" />
|
||||
<el-table-column align="center" prop="qcCode" label="维修保养编码" />
|
||||
<el-table-column align="center" prop="qcName" label="维修保养名称" />
|
||||
<el-table-column align="center" prop="qcTime" label="维修保养日期" />
|
||||
<el-table-column align="center" prop="nickName" label="上传人" width="120" />
|
||||
<el-table-column align="center" prop="createTime" label="上传时间" />
|
||||
<el-table-column align="center" label="附件">
|
||||
<template #default="{ row }">
|
||||
<el-image
|
||||
style="width: 60px; height: 60px"
|
||||
:src="row.url"
|
||||
:zoom-rate="1.2"
|
||||
:max-scale="7"
|
||||
:min-scale="0.2"
|
||||
:preview-src-list="[row.url]"
|
||||
:initial-index="0"
|
||||
fit="cover"
|
||||
:z-index="9999999999"
|
||||
:preview-teleported="true"
|
||||
/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<PagingComponent
|
||||
:total="totalInDialog"
|
||||
:size="searchParamsInDialog.pageSize"
|
||||
:page="searchParamsInDialog.pageNum"
|
||||
@getListChange="getLeaseListDataInDialog"
|
||||
v-model:page-num="searchParamsInDialog.pageNum"
|
||||
v-model:page-size="searchParamsInDialog.pageSize"
|
||||
/>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import PagingComponent from 'components/PagingComponent/index.vue'
|
||||
import UploadComponentNew from 'components/uploadComponentNew/index.vue'
|
||||
import {
|
||||
addQualityDataApi,
|
||||
getQualityListApi,
|
||||
getQualityDetailsApi,
|
||||
qualityDeleteByIdApi,
|
||||
getAssociationListApi,
|
||||
} from 'http/api/quality-manage'
|
||||
import { InfoFilled } from '@element-plus/icons-vue'
|
||||
import { ElMessage } from 'element-plus'
|
||||
|
||||
const total = ref(0)
|
||||
const totalInDialog = ref(0)
|
||||
const qcTime = ref([])
|
||||
const createTime = ref([])
|
||||
const qcTime_1 = ref([])
|
||||
const createTime_1 = ref([])
|
||||
const isRepublish = ref(true)
|
||||
const qualityLis = ref<any>([])
|
||||
const dialogTitle = ref('新增')
|
||||
const searchFormRef = ref<any>(null)
|
||||
const searchFormRefInDialog = ref<any>(null)
|
||||
const addOrEditFormRef = ref<any>(null)
|
||||
const addOrEditDialogVisible = ref(false)
|
||||
const associationList = ref<any>([])
|
||||
const qualityDetailsList = ref<any>([])
|
||||
const qualityDetails = ref<any>({})
|
||||
const uploadUrl = import.meta.env.VITE_API_URL + '/file/upload'
|
||||
|
||||
const searchParams = reactive({
|
||||
deviceCode: '',
|
||||
qcStartTime: '',
|
||||
qcEndTime: '',
|
||||
createStartTime: '',
|
||||
createEndTime: '',
|
||||
minNum: '',
|
||||
maxNum: '',
|
||||
pageSize: 10,
|
||||
pageNum: 1,
|
||||
})
|
||||
const searchParamsInDialog = reactive({
|
||||
id: '',
|
||||
qcCode: '',
|
||||
qcStartTime: '',
|
||||
qcEndTime: '',
|
||||
createStartTime: '',
|
||||
createEndTime: '',
|
||||
pageSize: 10,
|
||||
pageNum: 1,
|
||||
})
|
||||
|
||||
const addOrEditForm = ref<any>({
|
||||
maId: '',
|
||||
qcName: '',
|
||||
qcUser: '',
|
||||
qcTime: '',
|
||||
fileInfoList: [],
|
||||
fileInfoTempList: [],
|
||||
})
|
||||
|
||||
const checkMinNum = (rule: any, value: any, callback: any) => {
|
||||
const maxNum = parseInt(searchParams.maxNum)
|
||||
|
||||
if (value > maxNum && maxNum > 0) {
|
||||
return callback(new Error('查询开始次数不能大于查询结束次数'))
|
||||
}
|
||||
callback()
|
||||
}
|
||||
const checkMaxNum = (rule: any, value: any, callback: any) => {
|
||||
const minNum = parseInt(searchParams.minNum)
|
||||
|
||||
if (value < minNum && minNum > 0) {
|
||||
return callback(new Error('查询结束次数不能小于查询开始次数'))
|
||||
}
|
||||
callback()
|
||||
}
|
||||
|
||||
const addOrEditFormRules = reactive({
|
||||
maId: [{ required: true, message: '请选择关联装备', trigger: 'change' }],
|
||||
qcName: [{ required: true, message: '请输入质检名称', trigger: 'blur' }],
|
||||
qcUser: [{ required: true, message: '请输入质检员', trigger: 'change' }],
|
||||
qcTime: [{ required: true, message: '请选择质检日期', trigger: 'change' }],
|
||||
fileInfoList: [{ required: true, message: '请上传质检附件', trigger: 'blur' }],
|
||||
})
|
||||
const searchFormRules = reactive({
|
||||
minNum: [
|
||||
{
|
||||
pattern: /^[1-9][0-9]*$/,
|
||||
message: '请输入大于0的正整数',
|
||||
trigger: 'blur',
|
||||
},
|
||||
{ validator: checkMinNum, trigger: 'blur' },
|
||||
],
|
||||
maxNum: [
|
||||
{
|
||||
pattern: /^[1-9][0-9]*$/,
|
||||
message: '请输入大于0的正整数',
|
||||
trigger: 'blur',
|
||||
},
|
||||
{ validator: checkMaxNum, trigger: 'blur' },
|
||||
],
|
||||
})
|
||||
|
||||
const disabledDate = (date: any) => {
|
||||
const today = new Date()
|
||||
// 禁用今天之前的日期
|
||||
return date.getTime() < today.getTime()
|
||||
}
|
||||
|
||||
// 获取列表
|
||||
const getLeaseListData = async () => {
|
||||
if (qcTime.value.length > 0) {
|
||||
searchParams.qcStartTime = qcTime.value[0]
|
||||
searchParams.qcEndTime = qcTime.value[1]
|
||||
}
|
||||
if (createTime.value.length > 0) {
|
||||
searchParams.createStartTime = createTime.value[0]
|
||||
searchParams.createEndTime = createTime.value[1]
|
||||
}
|
||||
const { data: res }: any = await getQualityListApi(searchParams)
|
||||
qualityLis.value = res.rows
|
||||
total.value = res.total
|
||||
}
|
||||
|
||||
const onSearch = () => {
|
||||
searchFormRef.value.validate((valid: any) => {
|
||||
if (valid) {
|
||||
getLeaseListData()
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
// 获取关联装备
|
||||
const getAssociationListData = async () => {
|
||||
const res: any = await getAssociationListApi()
|
||||
associationList.value = res.data
|
||||
}
|
||||
|
||||
// 重置
|
||||
const onReset = () => {
|
||||
qcTime.value = []
|
||||
createTime.value = []
|
||||
searchParams.qcStartTime = ''
|
||||
searchParams.qcEndTime = ''
|
||||
searchParams.createStartTime = ''
|
||||
searchParams.createEndTime = ''
|
||||
searchParams.pageNum = 1
|
||||
searchParams.pageSize = 10
|
||||
searchFormRef.value.resetFields()
|
||||
getLeaseListData()
|
||||
}
|
||||
const onResetInDialog = () => {
|
||||
qcTime_1.value = []
|
||||
createTime_1.value = []
|
||||
searchParamsInDialog.qcStartTime = ''
|
||||
searchParamsInDialog.qcEndTime = ''
|
||||
searchParamsInDialog.createStartTime = ''
|
||||
searchParamsInDialog.createEndTime = ''
|
||||
searchParamsInDialog.pageNum = 1
|
||||
searchParamsInDialog.pageSize = 10
|
||||
searchFormRefInDialog.value.resetFields()
|
||||
getLeaseListDataInDialog()
|
||||
}
|
||||
// 删除
|
||||
const onDelete = async (id: any, maId: any) => {
|
||||
const res: any = await qualityDeleteByIdApi({ maId })
|
||||
if (res.code === 200) {
|
||||
ElMessage({
|
||||
type: 'success',
|
||||
message: '删除成功',
|
||||
})
|
||||
getLeaseListData()
|
||||
}
|
||||
}
|
||||
|
||||
// 提交
|
||||
const onSubmit = () => {
|
||||
addOrEditForm.value.fileInfoList = addOrEditForm.value.fileInfoTempList
|
||||
addOrEditFormRef.value.validate(async (valid: any) => {
|
||||
if (valid) {
|
||||
const res: any = await addQualityDataApi(addOrEditForm.value)
|
||||
if (res.code === 200) {
|
||||
ElMessage({
|
||||
type: 'success',
|
||||
message: '提交成功',
|
||||
})
|
||||
addOrEditDialogVisible.value = false
|
||||
getLeaseListData()
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
// 质检记录
|
||||
const onViewQualityRecord = (row: any) => {
|
||||
qualityDetails.value = row
|
||||
searchParamsInDialog.id = row.id
|
||||
getLeaseListDataInDialog()
|
||||
dialogTitle.value = '质检记录'
|
||||
addOrEditDialogVisible.value = true
|
||||
}
|
||||
const getLeaseListDataInDialog = async () => {
|
||||
if (qcTime_1.value.length > 0) {
|
||||
searchParamsInDialog.qcStartTime = qcTime_1.value[0]
|
||||
searchParamsInDialog.qcEndTime = qcTime_1.value[1]
|
||||
}
|
||||
if (createTime_1.value.length > 0) {
|
||||
searchParamsInDialog.createStartTime = createTime_1.value[0]
|
||||
searchParamsInDialog.createEndTime = createTime_1.value[1]
|
||||
}
|
||||
const { data: res }: any = await getQualityDetailsApi(searchParamsInDialog)
|
||||
qualityDetailsList.value = res.rows
|
||||
totalInDialog.value = res.total
|
||||
}
|
||||
|
||||
// 自定义事件
|
||||
const onFileChange = (fileList: any) => {
|
||||
addOrEditForm.value.fileInfoTempList = []
|
||||
const fileListTemp = fileList.map((e: any) => {
|
||||
return {
|
||||
fileName: e.name,
|
||||
fileUrl: e.url,
|
||||
}
|
||||
})
|
||||
|
||||
addOrEditForm.value.fileInfoTempList.push(...fileListTemp)
|
||||
}
|
||||
|
||||
// 取消按钮
|
||||
const onCancel = () => {
|
||||
addOrEditDialogVisible.value = false
|
||||
}
|
||||
const onClose = () => {
|
||||
if (dialogTitle.value !== '质检记录') {
|
||||
addOrEditFormRef.value.resetFields()
|
||||
}
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
getLeaseListData()
|
||||
getAssociationListData()
|
||||
})
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
:deep.upload-tip .el-form-item__label {
|
||||
color: transparent;
|
||||
}
|
||||
.el-pagination {
|
||||
justify-content: flex-end;
|
||||
padding: 5px 0;
|
||||
}
|
||||
:deep.el-pagination.is-background .el-pager li.is-active {
|
||||
background-color: #3cb4a6;
|
||||
}
|
||||
:deep.el-form--inline .el-form-item {
|
||||
margin-right: 6px;
|
||||
width: 95%;
|
||||
}
|
||||
|
||||
.img-list {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
.img-items {
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
margin-right: 8px;
|
||||
position: relative;
|
||||
|
||||
img {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.mask-img {
|
||||
visibility: hidden;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
background-color: #000;
|
||||
opacity: 0.5;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
|
||||
.delete-icon {
|
||||
font-size: 20px;
|
||||
cursor: pointer;
|
||||
z-index: 9;
|
||||
color: #fff;
|
||||
}
|
||||
}
|
||||
}
|
||||
.img-items:hover .mask-img {
|
||||
visibility: visible;
|
||||
}
|
||||
}
|
||||
.app-container-content {
|
||||
:deep(.el-dialog) {
|
||||
display: flex !important;
|
||||
flex-direction: column !important;
|
||||
margin: 0 !important;
|
||||
position: absolute !important;
|
||||
top: 50% !important;
|
||||
left: 50% !important;
|
||||
transform: translate(-50%, -50%) !important;
|
||||
max-height: 100vh !important;
|
||||
.el-dialog__body {
|
||||
flex: 1;
|
||||
overflow-y: scroll !important;
|
||||
}
|
||||
.dialog-content {
|
||||
padding: 20px;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
|
@ -175,16 +175,16 @@ const stepList = ref([
|
|||
description: '',
|
||||
},
|
||||
{
|
||||
title: '退租待结算',
|
||||
title: '已退租待检修',
|
||||
description: '',
|
||||
},
|
||||
{
|
||||
title: '结算待确认',
|
||||
title: '已检修待结算',
|
||||
description: '',
|
||||
},
|
||||
|
||||
{
|
||||
title: '已完成',
|
||||
title: '订单完成',
|
||||
description: '',
|
||||
},
|
||||
])
|
||||
|
|
@ -213,21 +213,30 @@ if (props.orderStatus == 5) {
|
|||
stepList.value[2].title = '已收货'
|
||||
currentActive.value = 4
|
||||
}
|
||||
if (props.orderStatus == 6) {
|
||||
if (props.orderStatus == 10) {
|
||||
stepList.value[0].title = '已接单'
|
||||
stepList.value[1].title = '已出库'
|
||||
stepList.value[2].title = '已收货'
|
||||
stepList.value[3].title = '租赁结束'
|
||||
stepList.value[4].title = '退租已结算'
|
||||
stepList.value[4].title = '退租已检修'
|
||||
currentActive.value = 5
|
||||
}
|
||||
if (props.orderStatus == 7) {
|
||||
if (props.orderStatus == 15) {
|
||||
stepList.value[0].title = '已接单'
|
||||
stepList.value[1].title = '已出库'
|
||||
stepList.value[2].title = '已收货'
|
||||
stepList.value[3].title = '租赁结束'
|
||||
stepList.value[4].title = '退租已结算'
|
||||
stepList.value[5].title = '结算已确认'
|
||||
stepList.value[4].title = '退租已检修'
|
||||
stepList.value[5].title = '已结算待确认'
|
||||
currentActive.value = 5
|
||||
}
|
||||
if (props.orderStatus == 20) {
|
||||
stepList.value[0].title = '已接单'
|
||||
stepList.value[1].title = '已出库'
|
||||
stepList.value[2].title = '已收货'
|
||||
stepList.value[3].title = '租赁结束'
|
||||
stepList.value[4].title = '退租已检修'
|
||||
stepList.value[5].title = '结算完成'
|
||||
currentActive.value = 7
|
||||
}
|
||||
</script>
|
||||
|
|
|
|||
|
|
@ -51,10 +51,13 @@ const statusList: any = [
|
|||
{ id: '2', name: '待出库' },
|
||||
{ id: '3', name: '待收货' },
|
||||
{ id: '4', name: '租赁中' },
|
||||
{ id: '5', name: '已退租待结算' },
|
||||
{ id: '6', name: '结算待确认' },
|
||||
{ id: '5', name: '已退租' },
|
||||
{ id: '6', name: '已退租' },
|
||||
{ id: '15', name: '结算待确认' },
|
||||
{ id: '7', name: '已完成' },
|
||||
{ id: '8', name: '已驳回' },
|
||||
{ id: '10', name: '已检修待结算' },
|
||||
{ id: '20', name: '已完成' },
|
||||
]
|
||||
|
||||
const orderText = (status: any) => {
|
||||
|
|
@ -150,7 +153,7 @@ const onChangeGoods = (index: number) => {
|
|||
|
||||
// 确认收获按钮
|
||||
const confirmReceipt = async (index: number) => {
|
||||
ElMessageBox.confirm('是否确定收获?', {
|
||||
ElMessageBox.confirm('是否确定收货?', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning',
|
||||
|
|
@ -400,6 +403,7 @@ const costSubmit = () => {
|
|||
.then(async () => {
|
||||
const res: any = await confirmPriceApi({
|
||||
orderId: currentOrderId.value,
|
||||
orderStatus: 20,
|
||||
})
|
||||
if (res.code == 200) {
|
||||
ElMessage({
|
||||
|
|
@ -718,15 +722,7 @@ const costSubmit = () => {
|
|||
</el-button>
|
||||
|
||||
<el-button
|
||||
v-if="item.orderStatus == '6' || item.orderStatus == '7'"
|
||||
@click="handleViewList(item.orderId)"
|
||||
type="primary"
|
||||
size="small"
|
||||
>
|
||||
费用清单
|
||||
</el-button>
|
||||
<el-button
|
||||
v-if="item.orderStatus == 7 && item.isLeaseContent == 1"
|
||||
v-if="item.orderStatus == 10"
|
||||
@click="onViewOverhaulDetails(item.orderId)"
|
||||
type="primary"
|
||||
size="small"
|
||||
|
|
@ -734,7 +730,15 @@ const costSubmit = () => {
|
|||
检修详情
|
||||
</el-button>
|
||||
<el-button
|
||||
v-if="item.orderStatus == 6 && item.isLeaseContent == 1"
|
||||
v-if="item.orderStatus == 20"
|
||||
@click="handleViewList(item.orderId)"
|
||||
type="primary"
|
||||
size="small"
|
||||
>
|
||||
费用清单
|
||||
</el-button>
|
||||
<el-button
|
||||
v-if="item.orderStatus == 15"
|
||||
@click="onCostConfirm(item.orderId)"
|
||||
type="primary"
|
||||
size="small"
|
||||
|
|
@ -1103,31 +1107,10 @@ const costSubmit = () => {
|
|||
<span>装备套数:</span>
|
||||
<span>{{ overhaulDetails.maNumber }}</span>
|
||||
</div>
|
||||
<div style="flex: 1">
|
||||
<span>退租时间:</span>
|
||||
<span>{{ overhaulDetails.rentEndTime }}</span>
|
||||
</div>
|
||||
</el-row>
|
||||
<el-row
|
||||
style="
|
||||
display: flex;
|
||||
letter-spacing: 1px;
|
||||
justify-content: space-between;
|
||||
padding: 0 10px 20px;
|
||||
"
|
||||
>
|
||||
<div style="flex: 1">
|
||||
<span>结算单位:</span>
|
||||
<span>{{ overhaulDetails.leaseCompany }}</span>
|
||||
</div>
|
||||
<div style="flex: 1">
|
||||
<span>租赁天数:</span>
|
||||
<span>{{ overhaulDetails.rentDay }}</span>
|
||||
</div>
|
||||
<div style="flex: 1; color: transparent">
|
||||
<span>租赁天数:</span>
|
||||
<span>999</span>
|
||||
</div>
|
||||
</el-row>
|
||||
|
||||
<div style="padding: 6px 0 0 0; font-size: 18px; font-weight: bold; color: #eb190a">
|
||||
|
|
@ -1160,6 +1143,7 @@ const costSubmit = () => {
|
|||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="costs" align="center" label="租赁费用(元)" width="160" />
|
||||
<el-table-column prop="changeCost" align="center" label="改价后费用(元)" />
|
||||
</el-table>
|
||||
<TitleTip :titleText="`维修费用明细`" />
|
||||
<el-table
|
||||
|
|
@ -1175,6 +1159,7 @@ const costSubmit = () => {
|
|||
<el-table-column prop="typeName" align="center" label="型号" />
|
||||
<el-table-column prop="repairNum" align="center" label="维修数量" />
|
||||
<el-table-column prop="repairPrice" align="center" label="维修费用(元)" />
|
||||
<el-table-column prop="repairChangePrice" align="center" label="改价后费用(元)" />
|
||||
<el-table-column align="center" label="附件" width="160">
|
||||
<template #default="{ row }">
|
||||
<el-button type="primary" size="small" @click="onViewFileImg(row, 0)"
|
||||
|
|
@ -1198,6 +1183,7 @@ const costSubmit = () => {
|
|||
<el-table-column prop="scrapNum" align="center" label="报废数量" />
|
||||
<el-table-column prop="scrapReason" align="center" label="报废原因" />
|
||||
<el-table-column prop="scrapPrice" align="center" label="报废费用(元)" />
|
||||
<el-table-column prop="scrapChangePrice" align="center" label="改价后费用(元)" />
|
||||
<el-table-column align="center" label="附件" width="160">
|
||||
<template #default="{ row }">
|
||||
<el-button type="primary" size="small" @click="onViewFileImg(row, 1)"
|
||||
|
|
@ -1220,6 +1206,7 @@ const costSubmit = () => {
|
|||
<el-table-column prop="typeName" align="center" label="型号" />
|
||||
<el-table-column prop="lossNum" align="center" label="丢失数量" />
|
||||
<el-table-column prop="lossPrice" align="center" label="丢失费用(元)" />
|
||||
<el-table-column prop="lossChangePrice" align="center" label="改价后费用(元)" />
|
||||
<el-table-column align="center" label="附件" width="160">
|
||||
<template #default="{ row }">
|
||||
<el-button type="primary" size="small" @click="onViewFileImg(row, 2)"
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
|
|
@ -175,16 +175,16 @@ const stepList = ref([
|
|||
description: '',
|
||||
},
|
||||
{
|
||||
title: '退租待结算',
|
||||
title: '已退租待检修',
|
||||
description: '',
|
||||
},
|
||||
{
|
||||
title: '结算待确认',
|
||||
title: '已检修待结算',
|
||||
description: '',
|
||||
},
|
||||
|
||||
{
|
||||
title: '已完成',
|
||||
title: '订单完成',
|
||||
description: '',
|
||||
},
|
||||
])
|
||||
|
|
@ -213,21 +213,30 @@ if (props.orderStatus == 5) {
|
|||
stepList.value[2].title = '已收货'
|
||||
currentActive.value = 4
|
||||
}
|
||||
if (props.orderStatus == 6) {
|
||||
if (props.orderStatus == 10) {
|
||||
stepList.value[0].title = '已接单'
|
||||
stepList.value[1].title = '已出库'
|
||||
stepList.value[2].title = '已收货'
|
||||
stepList.value[3].title = '租赁结束'
|
||||
stepList.value[4].title = '退租已结算'
|
||||
stepList.value[4].title = '退租已检修'
|
||||
currentActive.value = 5
|
||||
}
|
||||
if (props.orderStatus == 7) {
|
||||
if (props.orderStatus == 15) {
|
||||
stepList.value[0].title = '已接单'
|
||||
stepList.value[1].title = '已出库'
|
||||
stepList.value[2].title = '已收货'
|
||||
stepList.value[3].title = '租赁结束'
|
||||
stepList.value[4].title = '退租已结算'
|
||||
stepList.value[5].title = '结算已确认'
|
||||
stepList.value[4].title = '退租已检修'
|
||||
stepList.value[5].title = '已结算待确认'
|
||||
currentActive.value = 5
|
||||
}
|
||||
if (props.orderStatus == 20) {
|
||||
stepList.value[0].title = '已接单'
|
||||
stepList.value[1].title = '已出库'
|
||||
stepList.value[2].title = '已收货'
|
||||
stepList.value[3].title = '租赁结束'
|
||||
stepList.value[4].title = '退租已检修'
|
||||
stepList.value[5].title = '结算完成'
|
||||
currentActive.value = 7
|
||||
}
|
||||
</script>
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@ const status = 0
|
|||
const viewOrderDetailsOrderId = ref<any>('')
|
||||
const viewOrderDetailsMaId = ref<any>('')
|
||||
const addOrEditDialogCostVisible = ref(false)
|
||||
const addOrEditDialogCostStatus = ref(1)
|
||||
const addOrEditDialogCostStatus = ref(1) // 1. 退租结算 2. 检修详情 3. 结算清单
|
||||
const addOrEditDialogCostIsChangePrice = ref(1)
|
||||
const addOrEditDialogVisible = ref(false)
|
||||
const viewOrderDetailsType = ref<any>(1)
|
||||
|
|
@ -53,10 +53,13 @@ const statusList: any = [
|
|||
{ id: '2', name: '待出库' },
|
||||
{ id: '3', name: '待收货' },
|
||||
{ id: '4', name: '租赁中' },
|
||||
{ id: '5', name: '已退租待结算' },
|
||||
{ id: '6', name: '结算待确认' },
|
||||
{ id: '5', name: '已退租' },
|
||||
{ id: '6', name: '已退租' },
|
||||
{ id: '15', name: '结算待确认' },
|
||||
{ id: '7', name: '已完成' },
|
||||
{ id: '8', name: '已驳回' },
|
||||
{ id: '10', name: '已检修待结算' },
|
||||
{ id: '20', name: '已完成' },
|
||||
]
|
||||
|
||||
const orderText = (status: any) => {
|
||||
|
|
@ -328,10 +331,10 @@ const handleFileSuccess2 = (response: any) => {
|
|||
}
|
||||
}
|
||||
//退租检修
|
||||
const handleViewBack = (item: any, goods: any) => {
|
||||
const handleViewBack = (item: any) => {
|
||||
viewOrderDetailsOrderId.value = ''
|
||||
viewOrderDetailsOrderId.value = item.orderId
|
||||
viewOrderDetailsMaId.value = goods.maId
|
||||
// viewOrderDetailsMaId.value = goods.maId
|
||||
viewOrderDetailsType.value = 1
|
||||
addOrEditDialogVisible.value = true
|
||||
}
|
||||
|
|
@ -398,11 +401,34 @@ const dialogFormVisibleSettlemoney: any = ref(false)
|
|||
const handleViewMoney = (item: any) => {
|
||||
viewOrderDetailsOrderId.value = ''
|
||||
viewOrderDetailsOrderId.value = item.orderId
|
||||
addOrEditDialogCostStatus.value = item.orderStatus
|
||||
addOrEditDialogCostStatus.value = 1
|
||||
addOrEditDialogCostVisible.value = true
|
||||
if (true) return
|
||||
}
|
||||
|
||||
// 检修完结
|
||||
const onRepairEnd = (orderId: any) => {
|
||||
ElMessageBox.confirm('是否确定检修完结,确认后将无法再对装备进行检修?', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning',
|
||||
})
|
||||
.then(async () => {
|
||||
const res: any = await passApi({ orderStatus: 10, orderId })
|
||||
|
||||
if (res.code === 200) {
|
||||
ElMessage({
|
||||
type: 'success',
|
||||
message: '检修成功',
|
||||
})
|
||||
|
||||
getList()
|
||||
}
|
||||
})
|
||||
|
||||
.catch(() => {})
|
||||
}
|
||||
|
||||
//维修费用
|
||||
const addPartItem1 = () => {
|
||||
partItems1.value.push({ partType: '', num: '', isCharge: '' })
|
||||
|
|
@ -508,7 +534,7 @@ const tableData4: any = ref([
|
|||
const handleViewList = (item: any) => {
|
||||
viewOrderDetailsOrderId.value = ''
|
||||
viewOrderDetailsOrderId.value = item.orderId
|
||||
addOrEditDialogCostStatus.value = item.orderStatus
|
||||
addOrEditDialogCostStatus.value = 3
|
||||
addOrEditDialogCostVisible.value = true
|
||||
|
||||
// settleListTitle.value = '费用清单'
|
||||
|
|
@ -560,7 +586,7 @@ const dialogFormVisibleSettleRepair: any = ref(false)
|
|||
const handleViewRepair = (item: any) => {
|
||||
viewOrderDetailsOrderId.value = ''
|
||||
viewOrderDetailsOrderId.value = item.orderId
|
||||
addOrEditDialogCostStatus.value = item.orderStatus
|
||||
addOrEditDialogCostStatus.value = 2
|
||||
addOrEditDialogCostVisible.value = true
|
||||
// viewOrderDetailsOrderId.value = ''
|
||||
// viewOrderDetailsOrderId.value = item.orderId
|
||||
|
|
@ -866,7 +892,7 @@ const downloadContract = () => {}
|
|||
</div>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="2" class="order-items-info" v-if="item.orderStatus == 5">
|
||||
<!-- <el-col :span="2" class="order-items-info" v-if="item.orderStatus == 5">
|
||||
<div
|
||||
v-for="(goods, j) in item.detailsList"
|
||||
:key="j"
|
||||
|
|
@ -888,13 +914,27 @@ const downloadContract = () => {}
|
|||
</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</el-col>
|
||||
</el-col> -->
|
||||
|
||||
<el-col
|
||||
:span="item.orderStatus == 5 ? 4 : 6"
|
||||
style="display: flex; align-items: center"
|
||||
>
|
||||
<div :class="item.orderStatus == 5 ? 'handle-btn-4' : 'handle-btn'">
|
||||
<el-col :span="6" style="display: flex; align-items: center">
|
||||
<div class="handle-btn">
|
||||
<el-button
|
||||
v-if="item.orderStatus == 5 || item.partBacked"
|
||||
@click="handleViewBack(item)"
|
||||
type="primary"
|
||||
size="small"
|
||||
>
|
||||
退租检修
|
||||
</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
@click="onRepairEnd(item.orderId)"
|
||||
class="primary-lease"
|
||||
size="small"
|
||||
v-if="item.orderStatus == 5"
|
||||
>
|
||||
检修完结
|
||||
</el-button>
|
||||
<el-button
|
||||
v-if="item.orderStatus == '1'"
|
||||
type="primary"
|
||||
|
|
@ -928,29 +968,29 @@ const downloadContract = () => {}
|
|||
租赁协议
|
||||
</el-button>
|
||||
<el-button
|
||||
v-if="item.orderStatus == '5'"
|
||||
@click="handleViewMoney(item)"
|
||||
type="primary"
|
||||
size="small"
|
||||
>
|
||||
费用结算
|
||||
</el-button>
|
||||
<el-button
|
||||
v-if="item.orderStatus == '6' || item.orderStatus == '7'"
|
||||
@click="handleViewList(item)"
|
||||
type="primary"
|
||||
size="small"
|
||||
>
|
||||
费用清单
|
||||
</el-button>
|
||||
<el-button
|
||||
v-if="item.orderStatus == '6' || item.orderStatus == '7'"
|
||||
v-if="item.orderStatus == 10"
|
||||
@click="handleViewRepair(item)"
|
||||
type="primary"
|
||||
size="small"
|
||||
>
|
||||
检修详情
|
||||
</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
size="small"
|
||||
@click="handleViewMoney(item)"
|
||||
v-if="item.orderStatus == 10"
|
||||
>
|
||||
费用结算
|
||||
</el-button>
|
||||
<el-button
|
||||
v-if="item.orderStatus == 20 || item.orderStatus == 15"
|
||||
@click="handleViewList(item)"
|
||||
type="primary"
|
||||
size="small"
|
||||
>
|
||||
费用清单
|
||||
</el-button>
|
||||
</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
|
@ -967,17 +1007,19 @@ const downloadContract = () => {}
|
|||
/>
|
||||
|
||||
<RentTerminationModel
|
||||
:type="viewOrderDetailsType"
|
||||
v-model:addOrEditDialogVisible="addOrEditDialogVisible"
|
||||
:orderId="viewOrderDetailsOrderId"
|
||||
:maId="viewOrderDetailsMaId"
|
||||
@onChangeGetList="getList"
|
||||
:type="viewOrderDetailsType"
|
||||
:maId="viewOrderDetailsMaId"
|
||||
v-if="addOrEditDialogVisible"
|
||||
:orderId="viewOrderDetailsOrderId"
|
||||
v-model:addOrEditDialogVisible="addOrEditDialogVisible"
|
||||
/>
|
||||
<CostSettlementModel
|
||||
@onChangeGetList="getList"
|
||||
v-if="addOrEditDialogCostVisible"
|
||||
:orderId="viewOrderDetailsOrderId"
|
||||
:status="addOrEditDialogCostStatus"
|
||||
v-model:addOrEditDialogCostVisible="addOrEditDialogCostVisible"
|
||||
:orderId="viewOrderDetailsOrderId"
|
||||
@onChangeGetList="getList"
|
||||
/>
|
||||
</div>
|
||||
<!-- 退租检修弹框 -->
|
||||
|
|
|
|||
|
|
@ -1,20 +1,19 @@
|
|||
div
|
||||
<template>
|
||||
<!-- 新增修改对话框 -->
|
||||
<el-dialog
|
||||
:title="dialogTitle"
|
||||
width="65%"
|
||||
destroy-on-close
|
||||
v-model="addOrEditDialogVisible"
|
||||
@close="onClose"
|
||||
destroy-on-close
|
||||
:title="dialogTitle"
|
||||
v-model="addOrEditDialogVisible"
|
||||
>
|
||||
<template v-if="dialogTitle === '退租检修'">
|
||||
<el-row
|
||||
style="
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
letter-spacing: 1px;
|
||||
padding: 0 10px 20px;
|
||||
justify-content: space-between;
|
||||
"
|
||||
>
|
||||
<div>
|
||||
|
|
@ -37,10 +36,10 @@ div
|
|||
|
||||
<TitleTip :titleText="`维修费用`" />
|
||||
<el-form
|
||||
v-for="(item, index) in repairFormList"
|
||||
:key="item.newId"
|
||||
:model="item"
|
||||
:key="item.newId"
|
||||
:rules="repairFormRules"
|
||||
v-for="(item, index) in repairFormList"
|
||||
:ref="
|
||||
($event:any) => {
|
||||
repairFormRefList[index] = $event
|
||||
|
|
@ -59,8 +58,8 @@ div
|
|||
<el-select
|
||||
clearable
|
||||
style="width: 100%"
|
||||
placeholder="请选择关联装备"
|
||||
v-model="item.maId"
|
||||
placeholder="请选择关联装备"
|
||||
@change="onChangeRepair($event, index)"
|
||||
>
|
||||
<el-option
|
||||
|
|
@ -74,10 +73,9 @@ div
|
|||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="维修数量" prop="repairNum">
|
||||
<!-- <el-input v-model="item.device_num" placeholder="请输入需求名称" /> -->
|
||||
<el-input-number
|
||||
clearable
|
||||
:min="1"
|
||||
clearable
|
||||
:max="9999"
|
||||
style="width: 100%"
|
||||
v-model="item.repairNum"
|
||||
|
|
@ -109,15 +107,15 @@ div
|
|||
<el-form-item label="附件上传" prop="fileInfoList">
|
||||
<UploadComponentNew
|
||||
:maxSize="2"
|
||||
:max-limit="4"
|
||||
:minLimit="0"
|
||||
width="100px"
|
||||
height="100px"
|
||||
:max-limit="4"
|
||||
:multiple="true"
|
||||
:autoUpload="true"
|
||||
:currentIndex="index"
|
||||
:actionUrl="uploadUrl"
|
||||
listType="picture-card"
|
||||
:minLimit="0"
|
||||
:acceptTypeList="['.jpg', '.png']"
|
||||
@onFileChange="onRepairFileChange"
|
||||
>
|
||||
|
|
@ -143,9 +141,9 @@ div
|
|||
<el-col :span="24">
|
||||
<el-form-item>
|
||||
<el-button
|
||||
icon="Plus"
|
||||
type="primary"
|
||||
class="primary-lease"
|
||||
icon="Plus"
|
||||
@click="onAddRepair"
|
||||
>
|
||||
增加维修设备
|
||||
|
|
@ -159,8 +157,8 @@ div
|
|||
<el-form
|
||||
:model="item"
|
||||
:key="item.newId"
|
||||
v-for="(item, index) in scrapFormList"
|
||||
:rules="scrapFormRules"
|
||||
v-for="(item, index) in scrapFormList"
|
||||
:ref="
|
||||
($event:any) => {
|
||||
scrapFormRefList[index] = $event
|
||||
|
|
@ -193,8 +191,8 @@ div
|
|||
<el-col :span="12">
|
||||
<el-form-item label="报废数量" prop="scrapNum">
|
||||
<el-input-number
|
||||
clearable
|
||||
:min="1"
|
||||
clearable
|
||||
:max="9999"
|
||||
style="width: 100%"
|
||||
v-model="item.scrapNum"
|
||||
|
|
@ -231,15 +229,15 @@ div
|
|||
<el-form-item label="附件上传" prop="fileInfoList">
|
||||
<UploadComponentNew
|
||||
:maxSize="2"
|
||||
:max-limit="4"
|
||||
:minLimit="0"
|
||||
width="100px"
|
||||
height="100px"
|
||||
:max-limit="4"
|
||||
:multiple="true"
|
||||
:autoUpload="true"
|
||||
:currentIndex="index"
|
||||
:actionUrl="uploadUrl"
|
||||
listType="picture-card"
|
||||
:minLimit="0"
|
||||
:acceptTypeList="['.jpg', '.png']"
|
||||
@onFileChange="onScrapFileChange"
|
||||
>
|
||||
|
|
@ -251,8 +249,8 @@ div
|
|||
</el-col>
|
||||
<el-col :span="4">
|
||||
<el-button
|
||||
type="danger"
|
||||
size="small"
|
||||
type="danger"
|
||||
class="primary-lease"
|
||||
@click="onDeleteScrap(index)"
|
||||
>
|
||||
|
|
@ -265,10 +263,10 @@ div
|
|||
<el-col :span="24">
|
||||
<el-form-item>
|
||||
<el-button
|
||||
type="primary"
|
||||
class="primary-lease"
|
||||
:icon="Plus"
|
||||
type="primary"
|
||||
@click="onAddScrap"
|
||||
class="primary-lease"
|
||||
>
|
||||
增加报废设备
|
||||
</el-button>
|
||||
|
|
@ -278,10 +276,10 @@ div
|
|||
<div class="line"></div>
|
||||
<TitleTip :titleText="`丢失费用`" />
|
||||
<el-form
|
||||
v-for="(item, index) in lossFormList"
|
||||
:key="item.newId"
|
||||
:model="item"
|
||||
:key="item.newId"
|
||||
:rules="lossFormRules"
|
||||
v-for="(item, index) in lossFormList"
|
||||
:ref="
|
||||
($event:any) => {
|
||||
lossFormRefList[index] = $event
|
||||
|
|
@ -298,15 +296,15 @@ div
|
|||
<el-select
|
||||
clearable
|
||||
style="width: 100%"
|
||||
placeholder="请选择关联装备"
|
||||
v-model="item.maId"
|
||||
placeholder="请选择关联装备"
|
||||
@change="onChangeLoss($event, index)"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in lossSelect"
|
||||
:key="item.device"
|
||||
:label="item.deviceName"
|
||||
:value="item.maId"
|
||||
:label="item.deviceName"
|
||||
v-for="item in lossSelect"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
|
@ -314,8 +312,8 @@ div
|
|||
<el-col :span="12">
|
||||
<el-form-item label="丢失数量" prop="lossNum">
|
||||
<el-input-number
|
||||
clearable
|
||||
:min="1"
|
||||
clearable
|
||||
:max="9999"
|
||||
style="width: 100%"
|
||||
v-model="item.lossNum"
|
||||
|
|
@ -328,9 +326,9 @@ div
|
|||
<el-col :span="12">
|
||||
<el-form-item label="丢失费用" prop="lossPrice">
|
||||
<el-input
|
||||
inputmode="numeric"
|
||||
v-model="item.lossPrice"
|
||||
placeholder="请输入需求名称"
|
||||
inputmode="numeric"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
|
@ -347,16 +345,16 @@ div
|
|||
<el-form-item label="附件上传" prop="fileInfoList">
|
||||
<UploadComponentNew
|
||||
:maxSize="2"
|
||||
:max-limit="4"
|
||||
:currentIndex="index"
|
||||
:minLimit="0"
|
||||
width="100px"
|
||||
height="100px"
|
||||
:autoUpload="true"
|
||||
:max-limit="4"
|
||||
:multiple="true"
|
||||
:minLimit="0"
|
||||
:autoUpload="true"
|
||||
:currentIndex="index"
|
||||
:actionUrl="uploadUrl"
|
||||
listType="picture-card"
|
||||
:acceptTypeList="['.jpg', '.png']"
|
||||
:actionUrl="uploadUrl"
|
||||
@onFileChange="onLossFileChange"
|
||||
>
|
||||
<template v-slot:default>
|
||||
|
|
@ -367,8 +365,8 @@ div
|
|||
</el-col>
|
||||
<el-col :span="4">
|
||||
<el-button
|
||||
type="danger"
|
||||
size="small"
|
||||
type="danger"
|
||||
class="primary-lease"
|
||||
@click="onDeleteLoss(index)"
|
||||
>
|
||||
|
|
@ -381,10 +379,10 @@ div
|
|||
<el-col :span="24">
|
||||
<el-form-item>
|
||||
<el-button
|
||||
type="primary"
|
||||
class="primary-lease"
|
||||
icon="Plus"
|
||||
type="primary"
|
||||
@click="onAddLoss"
|
||||
class="primary-lease"
|
||||
>
|
||||
增加丢失设备
|
||||
</el-button>
|
||||
|
|
@ -394,9 +392,9 @@ div
|
|||
|
||||
<div style="text-align: right">
|
||||
<el-button type="primary" class="primary-lease" @click="onCancel">取消</el-button>
|
||||
<el-button type="primary" class="primary-lease" @click="onSubmit(false)"
|
||||
>保存</el-button
|
||||
>
|
||||
<el-button type="primary" class="primary-lease" @click="onSubmit(false)">
|
||||
保存
|
||||
</el-button>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
|
@ -404,9 +402,9 @@ div
|
|||
<el-row
|
||||
style="
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
letter-spacing: 1px;
|
||||
padding: 0 10px 20px;
|
||||
justify-content: space-between;
|
||||
"
|
||||
>
|
||||
<div style="flex: 1">
|
||||
|
|
@ -426,8 +424,8 @@ div
|
|||
style="
|
||||
display: flex;
|
||||
letter-spacing: 1px;
|
||||
justify-content: space-between;
|
||||
padding: 0 10px 20px;
|
||||
justify-content: space-between;
|
||||
"
|
||||
>
|
||||
<div style="flex: 1">
|
||||
|
|
@ -446,8 +444,8 @@ div
|
|||
|
||||
<TitleTip :titleText="`维修费用明细`" />
|
||||
<el-table
|
||||
:data="repairRecordList"
|
||||
border
|
||||
:data="repairRecordList"
|
||||
show-overflow-tooltip
|
||||
:header-cell-style="{
|
||||
background: '#00a288',
|
||||
|
|
@ -460,9 +458,9 @@ div
|
|||
<el-table-column prop="repairPrice" align="center" label="维修费用(元)" />
|
||||
<el-table-column align="center" label="附件" width="160">
|
||||
<template #default="{ row }">
|
||||
<el-button type="primary" size="small" @click="onViewFileImg(row, 0)"
|
||||
>查看</el-button
|
||||
>
|
||||
<el-button type="primary" size="small" @click="onViewFileImg(row, 0)">
|
||||
查看
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
|
@ -484,8 +482,8 @@ div
|
|||
<el-table-column align="center" label="附件" width="160">
|
||||
<template #default="{ row }">
|
||||
<el-button type="primary" size="small" @click="onViewFileImg(row, 1)"
|
||||
>查看</el-button
|
||||
>
|
||||
>查看
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
|
@ -505,9 +503,9 @@ div
|
|||
<el-table-column prop="lossPrice" align="center" label="丢失费用(元)" />
|
||||
<el-table-column align="center" label="附件" width="160">
|
||||
<template #default="{ row }">
|
||||
<el-button type="primary" size="small" @click="onViewFileImg(row, 2)"
|
||||
>查看</el-button
|
||||
>
|
||||
<el-button type="primary" size="small" @click="onViewFileImg(row, 2)">
|
||||
查看
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
|
@ -515,28 +513,28 @@ div
|
|||
|
||||
<el-dialog v-model="innerVisible" width="500" title="附件详情" append-to-body>
|
||||
<el-table
|
||||
:data="viewFileInfoList"
|
||||
border
|
||||
:data="viewFileInfoList"
|
||||
show-overflow-tooltip
|
||||
:header-cell-style="{
|
||||
background: '#00a288',
|
||||
color: '#fff',
|
||||
background: '#00a288',
|
||||
}"
|
||||
>
|
||||
<el-table-column prop="fileName" align="center" label="文件名称" />
|
||||
<el-table-column align="center" label="操作" width="120">
|
||||
<template #default="{ row }">
|
||||
<el-image
|
||||
style="width: 60px; height: 60px"
|
||||
:src="row.fileUrl"
|
||||
:zoom-rate="1.2"
|
||||
:max-scale="7"
|
||||
:min-scale="0.2"
|
||||
:preview-src-list="[row.fileUrl]"
|
||||
:initial-index="0"
|
||||
fit="cover"
|
||||
:max-scale="7"
|
||||
:zoom-rate="1.2"
|
||||
:min-scale="0.2"
|
||||
:src="row.fileUrl"
|
||||
:initial-index="0"
|
||||
z-index="9999999999"
|
||||
:preview-teleported="true"
|
||||
:preview-src-list="[row.fileUrl]"
|
||||
style="width: 60px; height: 60px"
|
||||
/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
|
@ -546,39 +544,36 @@ div
|
|||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import UploadComponentNew from 'components/uploadComponentNew/index.vue'
|
||||
import TitleTip from 'components/TitleTip/index.vue'
|
||||
import {
|
||||
getRentTerminationListApi,
|
||||
getOrderDetailsByIdApi,
|
||||
setAddLeaseRepairApi,
|
||||
getOverhaulApi,
|
||||
} from 'http/api/rent-termination/index'
|
||||
|
||||
import { ElMessage } from 'element-plus'
|
||||
import { Plus } from '@element-plus/icons-vue'
|
||||
const uploadUrl = import.meta.env.VITE_API_URL + '/file/upload'
|
||||
// const addOrEditDialogVisible = ref<any>(false)
|
||||
const dialogTitle = ref('退租检测')
|
||||
const repairFormRefList = ref<any>([])
|
||||
const lossFormRefList = ref<any>([])
|
||||
const scrapFormRefList = ref<any>([])
|
||||
const orderDetails = ref<any>({})
|
||||
const repairSelect = ref<any>([])
|
||||
import TitleTip from 'components/TitleTip/index.vue'
|
||||
import UploadComponentNew from 'components/uploadComponentNew/index.vue'
|
||||
import {
|
||||
getOverhaulApi,
|
||||
setAddLeaseRepairApi,
|
||||
getOrderDetailsByIdApi,
|
||||
} from 'http/api/rent-termination/index'
|
||||
|
||||
const lossRecordList = ref([])
|
||||
const lossSelect = ref<any>([])
|
||||
const innerVisible = ref(false)
|
||||
const scrapRecordList = ref([])
|
||||
const scrapSelect = ref<any>([])
|
||||
const repairRecordList = ref([])
|
||||
const scrapRecordList = ref([])
|
||||
const lossRecordList = ref([])
|
||||
const viewFileInfoList = ref<any>([])
|
||||
const fileListAll = ref<any>([])
|
||||
const orderDetails = ref<any>({})
|
||||
const repairSelect = ref<any>([])
|
||||
const dialogTitle = ref('退租检测')
|
||||
const lossFormRefList = ref<any>([])
|
||||
const overhaulDetails = ref<any>({})
|
||||
const innerVisible = ref(false)
|
||||
const scrapFormRefList = ref<any>([])
|
||||
const viewFileInfoList = ref<any>([])
|
||||
const repairFormRefList = ref<any>([])
|
||||
const uploadUrl = import.meta.env.VITE_API_URL + '/file/upload'
|
||||
|
||||
// 维修表单
|
||||
const repairFormList: any = ref([])
|
||||
const lossFormList: any = ref([])
|
||||
const scrapFormList: any = ref([])
|
||||
const repairFormList: any = ref([])
|
||||
|
||||
const props = defineProps({
|
||||
orderId: {
|
||||
|
|
@ -589,31 +584,31 @@ const props = defineProps({
|
|||
type: [String, Number],
|
||||
default: '',
|
||||
},
|
||||
type: {
|
||||
type: Number,
|
||||
default: 1,
|
||||
},
|
||||
addOrEditDialogVisible: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
type: {
|
||||
type: Number,
|
||||
default: 1,
|
||||
},
|
||||
})
|
||||
|
||||
const emit = defineEmits(['update:addOrEditDialogVisible', 'onChangeGetList'])
|
||||
const emits = defineEmits(['update:addOrEditDialogVisible', 'onChangeGetList'])
|
||||
|
||||
const addOrEditDialogVisible = computed({
|
||||
get: () => {
|
||||
return props.addOrEditDialogVisible
|
||||
},
|
||||
set: (val: boolean) => {
|
||||
emit('update:addOrEditDialogVisible', val)
|
||||
emits('update:addOrEditDialogVisible', val)
|
||||
},
|
||||
})
|
||||
|
||||
const repairFormRules = reactive({
|
||||
maId: [{ required: true, message: '请选择关联装备', trigger: 'change' }],
|
||||
repairNum: [{ required: true, message: '请输入维修数量', trigger: 'blur' }],
|
||||
fileInfoList: [{ required: true, message: '请上传附件', trigger: 'blur' }],
|
||||
repairNum: [{ required: true, message: '请输入维修数量', trigger: 'blur' }],
|
||||
repairPrice: [
|
||||
{ required: true, message: '请输入维修费用', trigger: 'blur' },
|
||||
{
|
||||
|
|
@ -657,11 +652,11 @@ const onAddRepair = () => {
|
|||
repairFormList.value.push({
|
||||
newId,
|
||||
maId: '',
|
||||
deviceName: '',
|
||||
num: '',
|
||||
typeId: '',
|
||||
repairNum: 0,
|
||||
repairPrice: 0,
|
||||
deviceName: '',
|
||||
fileInfoList: [],
|
||||
})
|
||||
}
|
||||
|
|
@ -671,11 +666,11 @@ const onAddLoss = () => {
|
|||
lossFormList.value.push({
|
||||
newId,
|
||||
maId: '',
|
||||
deviceName: '',
|
||||
num: '',
|
||||
typeId: '',
|
||||
lossNum: 0,
|
||||
lossPrice: 0,
|
||||
deviceName: '',
|
||||
fileInfoList: [],
|
||||
})
|
||||
}
|
||||
|
|
@ -685,11 +680,11 @@ const onAddScrap = () => {
|
|||
scrapFormList.value.push({
|
||||
newId,
|
||||
maId: '',
|
||||
deviceName: '',
|
||||
num: '',
|
||||
typeId: '',
|
||||
scrapNum: 0,
|
||||
scrapPrice: 0,
|
||||
deviceName: '',
|
||||
scrapReason: '',
|
||||
fileInfoList: [],
|
||||
})
|
||||
|
|
@ -701,9 +696,9 @@ const onChangeRepair = (maId: any, index: number) => {
|
|||
try {
|
||||
repairSelect.value.forEach((e: any) => {
|
||||
if (e.maId == maId && e.isCheck === 0) {
|
||||
repairFormList.value[index].deviceName = e.deviceName
|
||||
repairFormList.value[index].num = e.num
|
||||
repairFormList.value[index].typeId = e.typeId
|
||||
repairFormList.value[index].deviceName = e.deviceName
|
||||
e.isCheck = 1
|
||||
throw new Error()
|
||||
}
|
||||
|
|
@ -723,9 +718,9 @@ const onChangeLoss = (maId: any, index: number) => {
|
|||
try {
|
||||
lossSelect.value.forEach((e: any) => {
|
||||
if (e.maId == maId && e.isCheck === 0) {
|
||||
lossFormList.value[index].deviceName = e.deviceName
|
||||
lossFormList.value[index].num = e.num
|
||||
lossFormList.value[index].typeId = e.typeId
|
||||
lossFormList.value[index].deviceName = e.deviceName
|
||||
e.isCheck = 1
|
||||
throw new Error()
|
||||
}
|
||||
|
|
@ -746,9 +741,9 @@ const onChangeScrap = (maId: any, index: number) => {
|
|||
try {
|
||||
scrapSelect.value.forEach((e: any) => {
|
||||
if (e.maId == maId && e.isCheck === 0) {
|
||||
scrapFormList.value[index].deviceName = e.deviceName
|
||||
scrapFormList.value[index].num = e.num
|
||||
scrapFormList.value[index].typeId = e.typeId
|
||||
scrapFormList.value[index].deviceName = e.deviceName
|
||||
e.isCheck = 1
|
||||
throw new Error()
|
||||
}
|
||||
|
|
@ -787,6 +782,7 @@ const onDeleteLoss = (index: number) => {
|
|||
lossFormList.value.splice(index, 1)
|
||||
lossFormRefList.value.splice(index, 1)
|
||||
}
|
||||
|
||||
const onDeleteScrap = (index: number) => {
|
||||
try {
|
||||
scrapSelect.value.forEach((e: any) => {
|
||||
|
|
@ -810,22 +806,22 @@ const getOrderDetailsData = async () => {
|
|||
})
|
||||
orderDetails.value = res
|
||||
repairSelect.value = JSON.parse(JSON.stringify(res.detailsList)).filter(
|
||||
(e: any) => e.maId == props.maId,
|
||||
(e: any) => e.orderStatus == 5,
|
||||
)
|
||||
lossSelect.value = JSON.parse(JSON.stringify(res.detailsList)).filter(
|
||||
(e: any) => e.maId == props.maId,
|
||||
(e: any) => e.orderStatus == 5,
|
||||
)
|
||||
scrapSelect.value = JSON.parse(JSON.stringify(res.detailsList)).filter(
|
||||
(e: any) => e.maId == props.maId,
|
||||
(e: any) => e.orderStatus == 5,
|
||||
)
|
||||
orderDetails.value.orderId = props.orderId
|
||||
} else {
|
||||
const { data: res }: any = await getOverhaulApi(props.orderId)
|
||||
repairRecordList.value = res.repairRecordList
|
||||
scrapRecordList.value = res.scrapRecordList
|
||||
lossRecordList.value = res.lossRecordList
|
||||
fileListAll.value = res.fileInfoList
|
||||
overhaulDetails.value = res
|
||||
fileListAll.value = res.fileInfoList
|
||||
lossRecordList.value = res.lossRecordList
|
||||
scrapRecordList.value = res.scrapRecordList
|
||||
repairRecordList.value = res.repairRecordList
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -879,8 +875,8 @@ const onSubmit = async (type: boolean) => {
|
|||
if (isRepair) return
|
||||
const { orderId, code } = orderDetails.value
|
||||
const res: any = await setAddLeaseRepairApi({
|
||||
orderId,
|
||||
code,
|
||||
orderId,
|
||||
maId: props.maId,
|
||||
repairRecordList: repairFormList.value,
|
||||
scrapRecordList: scrapFormList.value,
|
||||
|
|
@ -892,9 +888,8 @@ const onSubmit = async (type: boolean) => {
|
|||
type: 'success',
|
||||
message: '提交成功',
|
||||
})
|
||||
emit('update:addOrEditDialogVisible', false)
|
||||
emit('onChangeGetList')
|
||||
// getLeaseListData()
|
||||
emits('update:addOrEditDialogVisible', false)
|
||||
emits('onChangeGetList')
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -903,11 +898,11 @@ const onRepairFileChange = (fileList: any, index: number) => {
|
|||
repairFormList.value[index].fileInfoList = []
|
||||
const fileListTemp = fileList.map((e: any) => {
|
||||
return {
|
||||
fileName: e.name,
|
||||
fileUrl: e.url,
|
||||
modelId: repairFormList.value[index].maId,
|
||||
taskType: 19,
|
||||
fileType: 0,
|
||||
taskType: 19,
|
||||
fileUrl: e.url,
|
||||
fileName: e.name,
|
||||
modelId: repairFormList.value[index].maId,
|
||||
}
|
||||
})
|
||||
|
||||
|
|
@ -918,11 +913,11 @@ const onScrapFileChange = (fileList: any, index: number) => {
|
|||
scrapFormList.value[index].fileInfoList = []
|
||||
const fileListTemp = fileList.map((e: any) => {
|
||||
return {
|
||||
fileName: e.name,
|
||||
fileUrl: e.url,
|
||||
modelId: scrapFormList.value[index].maId,
|
||||
taskType: 19,
|
||||
fileType: 1,
|
||||
taskType: 19,
|
||||
fileUrl: e.url,
|
||||
fileName: e.name,
|
||||
modelId: scrapFormList.value[index].maId,
|
||||
}
|
||||
})
|
||||
scrapFormRefList.value[index].clearValidate('fileInfoList')
|
||||
|
|
@ -932,11 +927,11 @@ const onLossFileChange = (fileList: any, index: number) => {
|
|||
lossFormList.value[index].fileInfoList = []
|
||||
const fileListTemp = fileList.map((e: any) => {
|
||||
return {
|
||||
fileName: e.name,
|
||||
fileUrl: e.url,
|
||||
modelId: lossFormList.value[index].maId,
|
||||
taskType: 19,
|
||||
fileType: 2,
|
||||
taskType: 19,
|
||||
fileUrl: e.url,
|
||||
fileName: e.name,
|
||||
modelId: lossFormList.value[index].maId,
|
||||
}
|
||||
})
|
||||
lossFormRefList.value[index].clearValidate('fileInfoList')
|
||||
|
|
@ -945,7 +940,7 @@ const onLossFileChange = (fileList: any, index: number) => {
|
|||
|
||||
// 取消按钮
|
||||
const onCancel = () => {
|
||||
emit('update:addOrEditDialogVisible', false)
|
||||
emits('update:addOrEditDialogVisible', false)
|
||||
// addOrEditDialogVisible.value = false
|
||||
}
|
||||
const onClose = () => {
|
||||
|
|
|
|||
Loading…
Reference in New Issue