diff --git a/src/components/header/index.vue b/src/components/header/index.vue
index d297c27..685227f 100644
--- a/src/components/header/index.vue
+++ b/src/components/header/index.vue
@@ -271,7 +271,7 @@ onMounted(() => {
-
+
diff --git a/src/layout/header.vue b/src/layout/header.vue
index 54fd007..40f0e4b 100644
--- a/src/layout/header.vue
+++ b/src/layout/header.vue
@@ -289,6 +289,7 @@ const nickNameNew = computed(() => {
})
const onJumpUser = () => {
+ // router.push({ name: 'my-user' })
const isType: any = localStorage.getItem('rolesType')
if (isType == 3) {
const host = window.location.origin
@@ -306,16 +307,6 @@ const onJumpUser = () => {
} else {
router.push({ name: 'my-user' })
}
- // const roles = store.userInfo.roles
- // if (roles?.length > 0) {
- // const isAdmin = roles.some((e: any) => e.roleKey == 'admin')
- // if (isAdmin) {
- // // window.location.href = `http://192.168.137.101:80/?token=${store.token}`
- // window.open(`http://36.33.26.201:17788/glweb/login?token=${store.token}`)
- // } else {
- // router.push({ name: 'my-user' })
- // }
- // }
}
const onClickLogin = () => {
@@ -416,7 +407,7 @@ onMounted(() => {
-
diff --git a/src/views/equip/detail.vue b/src/views/equip/detail.vue
index 03f639b..4196b6c 100644
--- a/src/views/equip/detail.vue
+++ b/src/views/equip/detail.vue
@@ -172,16 +172,15 @@
-
证书展示
-
-
+
+
+
-
+ -->
-
+
检测记录
diff --git a/src/views/parity/index.vue b/src/views/parity/index.vue
index 349e11a..634e58c 100644
--- a/src/views/parity/index.vue
+++ b/src/views/parity/index.vue
@@ -18,6 +18,7 @@
@click="selectScreen(v.type, val, i)"
v-for="(val, index) in v.list"
:key="index"
+ style="color: #333"
>
{{ val.name }}
diff --git a/src/views/user/goodsManagement/index.vue b/src/views/user/goodsManagement/index.vue
index 4f10160..673b95f 100644
--- a/src/views/user/goodsManagement/index.vue
+++ b/src/views/user/goodsManagement/index.vue
@@ -182,9 +182,9 @@ const equipmentDeployment = () => {
examinationPdf.value = []
//装备证书table
- ;(equipTableList.value = []),
- // 打开入驻弹框
- (dialogFormVisibleSettlein.value = true)
+ equipTableList.value = []
+ // 打开入驻弹框
+ dialogFormVisibleSettlein.value = true
}
const isEditForm = ref(false)
const maId: any = ref('')
@@ -310,6 +310,13 @@ const getDetailData = async (row: any) => {
if (isEditForm.value == true) {
if (addAndEditForm.tableList != null) {
addAndEditForm.tableList.forEach((item: any) => {
+ console.log('🚀 ~ addAndEditForm.tableList.forEach ~ item:', item)
+ if (item.examinationPdf && item.examinationPdf.length > 0) {
+ item.examinationPdf.forEach((e: any) => {
+ e.url = e.fileUrl
+ e.name = e.fileName
+ })
+ }
equipTableList.value.push({
id: item.id,
identifyCode: item.identifyCode,
@@ -322,6 +329,7 @@ const getDetailData = async (row: any) => {
examinationPdf: item.examinationPdf,
})
})
+ console.log(equipTableList.value, '--->>>addAndEditForm.tableList')
} else {
equipTableList.value = [
{
@@ -338,8 +346,15 @@ const getDetailData = async (row: any) => {
]
}
} else {
+ console.log('详情--->?>')
if (addAndEditForm.tableList != null) {
addAndEditForm.tableList.forEach((item: any) => {
+ if (item.examinationPdf && item.examinationPdf.length > 0) {
+ item.examinationPdf.forEach((e: any) => {
+ e.url = e.fileUrl
+ e.name = e.fileName
+ })
+ }
equipTableList.value.push({
id: item.id,
identifyCode: item.identifyCode,
@@ -487,7 +502,7 @@ const dialogTypeChange = async () => {
// equipmentDeploymentParams.value.deviceCount = 1
// countDisabled.value = true
// }
- console.log('deviceTypeList', deviceTypeList[0].data.name)
+ console.log('deviceTypeList', deviceTypeList[0].data)
warningDays.value = deviceTypeList[0].data.maintenanceAlarmDay
if (deviceTypeList[0].data.maTypeProperties == null) {
propertyNames.value = []
@@ -722,14 +737,14 @@ const submitFun = (type: any) => {
if (type == 3 || type == 4) {
// addAndEditForm.identifyCode = e.identifyCode
- addAndEditForm.insurancePdf = e.insurancePdfs.map((e: any) => {
- return { fileNam: e.fileName, fileUrl: e.fileUrl }
- })
+ // addAndEditForm.insurancePdf = e.insurancePdfs.map((e: any) => {
+ // return { fileNam: e.fileName, fileUrl: e.fileUrl }
+ // })
addAndEditForm.examinationPdf = e.examinationPdfs.map((e: any) => {
return { fileNam: e.fileName, fileUrl: e.fileUrl }
})
} else {
- addAndEditForm.insurancePdfs[index] = e.insurancePdfs
+ // addAndEditForm.insurancePdfs[index] = e.insurancePdfs
addAndEditForm.examinationPdfs[index] = e.examinationPdfs
// addAndEditForm.identifyCode.push(e.identifyCode)
}
@@ -758,7 +773,8 @@ const submitFun = (type: any) => {
(row[key] === null || row[key] === '' || row[key]?.length === 0) &&
key !== 'name2' &&
key !== 'name6' &&
- key !== 'id'
+ key !== 'id' &&
+ key !== 'insurancePdf'
) {
if (key == 'identifyCode') {
ElMessage({
@@ -780,19 +796,30 @@ const submitFun = (type: any) => {
type: 'error',
message: `第 ${i + 1} 行的 ${'下次检修日期'} 字段不能为空`,
})
- } else if (key == 'insurancePdf') {
- ElMessage({
- type: 'error',
- message: `请上传第 ${i + 1} 行的合格证`,
- })
- } else {
- ElMessage({
- type: 'error',
- message: `请上传第 ${i + 1} 行的检测证明`,
- })
}
+
+ // } else if (key == 'insurancePdf') {
+ // ElMessage({
+ // type: 'error',
+ // message: `请上传第 ${i + 1} 行的合格证`,
+ // })
+ // } else {
+ // ElMessage({
+ // type: 'error',
+ // message: `请上传第 ${i + 1} 行的检测证明`,
+ // })
+ // }
return // 如果有任何字段为空,直接返回,不进行提交
}
+
+ console.log(row, '-->提交')
+ if (row.examinationPdf.length === 0) {
+ ElMessage({
+ type: 'error',
+ message: `请上传第 ${i + 1} 行的检测证明`,
+ })
+ return
+ }
}
}
if (isDescription) return
@@ -1019,10 +1046,6 @@ const picturePreview = (file: any) => {
dialogImageUrl.value = file.fileUrl
dialogVisible.value = true
}
-//文件查看
-const handleRemove = (list: any, index: Number) => {
- list.splice(index, 1)
-}
const onTempDownLoad = () => {
ElMessageBox.confirm('是否确定下载', {
@@ -1160,6 +1183,50 @@ const onExaminationPdfChange = (fileList: any, index: number) => {
descriptionFormList.value[index].examinationTempPdf.push(...fileListTemp)
}
+//文件查看
+const handlePreview = (e: any) => {
+ console.log('🚀 ~ handlePreview ~ handlePreview:', e.fileUrl)
+ // 点击跳转展示
+ window.open(e.fileUrl, '_blank')
+}
+// 删除附件
+const handleRemove = (file: any, row: any) => {
+ console.log('🚀 ~ handleRemove ~ handleRemove:', file)
+
+ if (row.id) {
+ const index = row.examinationPdf.findIndex((e: any) => e.fileUrl == file.fileUrl)
+ if (index > -1) {
+ row.examinationPdf.splice(index, 1)
+ }
+ } else {
+ const index = row.examinationPdf.findIndex((e: any) => e.fileUrl == file.response.data.url)
+ if (index > -1) {
+ row.examinationPdf.splice(index, 1)
+ }
+ }
+ console.log('🚀 ~ handleRemove ~ row:', row.examinationPdf)
+}
+// 上传附件
+const handleSuccess = (uploadFile: any, row: any) => {
+ console.log('🚀 ~ handleSuccess ~ uploadFile:', uploadFile)
+ if (uploadFile.code == 200) {
+ row.examinationPdf.push({
+ fileName: uploadFile.data.name,
+ fileUrl: uploadFile.data.url,
+ })
+ }
+ console.log('🚀 ~ handleSuccess ~ row:', row)
+}
+
+// 超限提示
+const handleExceed = () => {
+ ElMessage({
+ type: 'error',
+ message: '最多只能上传5个文件',
+ })
+}
+
+// 上传附件
const onFileChangeEquip = (fileList: any, row: any, index: number, type: number) => {
const origin = window.location.origin
const isProd = origin.indexOf('sgwpdm.ah.sgcc.com.cn') > -1
@@ -1278,29 +1345,26 @@ const changeDate = (row: any, index: number) => {
console.log('3333', row)
const currentDate = new Date(row.checkDate)
console.log('1111', currentDate)
- console.log('🚀 ~ 告警时间 ~ warningDays.value:', warningDays.value)
- currentDate.setDate(currentDate.getDate() + Number(warningDays.value))
- equipTableList.value[index].nextCheckDate = dayjs(currentDate).format('YYYY-MM-DD')
- // equipTableList.value = [...equipTableList.value];
+ // console.log('🚀 ~ 告警时间 ~ warningDays.value:', warningDays.value)
+ // 获取当前时间一年后的天数
+ const nextYearDate = dayjs(currentDate).add(1, 'year').subtract(1, 'day').toDate()
+ console.log('🚀 ~ changeDate ~ nextDate:', nextYearDate)
+ // currentDate.setDate(currentDate.getDate() + Number(warningDays.value))
+ equipTableList.value[index].nextCheckDate = dayjs(nextYearDate).format('YYYY-MM-DD')
}
-const getUpdateTimeBgColor = (row: any) => {
- // 将字符串日期转换为 Date 对象
- const checkDate = new Date();
- const nextCheckDate = new Date(row.nextCheckDate);
-
- // 计算两个日期之间的差值(以毫秒为单位)
- const diffTime = Math.abs(nextCheckDate - checkDate);
- // 将差值转换为天数
- const diffDays = Math.ceil(diffTime / (1000 * 60 * 60 * 24));
-
- if (checkDate < nextCheckDate && diffDays <= 30) {
- return '#FFFFCC'; // 黄色背景
- } else if (checkDate > nextCheckDate) {
- return '#FFCCCC'; // 红色背景
- }
- return ''; // 返回空字符串,让背景色保持默认
-};
+// 下次检修时间不能早于检修时间
+const changeNextDate = (row: any) => {
+ if (row.checkDate && row.nextCheckDate) {
+ if (dayjs(row.checkDate).isAfter(row.nextCheckDate)) {
+ ElMessage({
+ type: 'error',
+ message: '下次检修时间不能早于检修时间',
+ })
+ row.nextCheckDate = ''
+ }
+ }
+}
@@ -1456,11 +1520,7 @@ const getUpdateTimeBgColor = (row: any) => {
-
-
- {{ row.nextCheckDate }}
-
-
+
草稿状态
@@ -1669,7 +1729,7 @@ const getUpdateTimeBgColor = (row: any) => {
v-model="addAndEditForm.personPhone"
placeholder="请输入联系电话"
clearable
- maxlength="20"
+ maxlength="11"
/>
@@ -2089,7 +2149,7 @@ const getUpdateTimeBgColor = (row: any) => {
>
- {
>
-
{
>
-
+ -->
{
type="date"
placeholder="请选择"
style="width: 100%"
+ @change="changeNextDate(row)"
>
@@ -2193,10 +2253,24 @@ const getUpdateTimeBgColor = (row: any) => {
label="检测证明"
prop="name6"
align="center"
- :show-overflow-tooltip="true"
>
-
+
+ 上传
+
+
{
@click="viewCertificate(row.examinationPdf[0].fileUrl)"
>查看
-
+ -->
diff --git a/src/views/user/lessor/quality-manage/index.vue b/src/views/user/lessor/quality-manage/index.vue
index 12bff78..94b85c5 100644
--- a/src/views/user/lessor/quality-manage/index.vue
+++ b/src/views/user/lessor/quality-manage/index.vue
@@ -255,7 +255,7 @@
- 支持格式:.jpg、.png 单个文件大小不能超过2M,最多可上传1张
+ 支持格式:.jpg、.png、.pdf、.doc、.docx 单个文件大小不能超过5M,最多可上传1个文件
@@ -263,7 +263,7 @@
diff --git a/src/views/user/orderManagement/components/order-details.vue b/src/views/user/orderManagement/components/order-details.vue
index bb72f5a..898139a 100644
--- a/src/views/user/orderManagement/components/order-details.vue
+++ b/src/views/user/orderManagement/components/order-details.vue
@@ -1,5 +1,5 @@
@@ -300,10 +330,10 @@ const isOrderComplete = computed(() => {
租期 :
-
+
{{ goods.days }}{{ ' ' + '天' }}
-
+
{{
isNaN(momentInit(goods.takeOverTime).diff(goods.rentOverTime, 'day'))
? '-'
@@ -352,16 +382,16 @@ const isOrderComplete = computed(() => {
租期
{{ goods.rentBeginTime }}至{{ goods.rentEndTime }}
- {{ goods.takeOverTime?.slice(0, 10) }}至{{
- goods.rentOverTime?.slice(0, 10)
+ {{ goods.takeOverTime }}至{{
+ goods.rentOverTime
}}
@@ -371,7 +401,7 @@ const isOrderComplete = computed(() => {
总费用
{{ orderDetails.cost }} 元
-
+
{{ overhaulDetails.totalCost }} 元
diff --git a/src/views/user/orderManagement/components/order-home.vue b/src/views/user/orderManagement/components/order-home.vue
index c8f9dd8..04b3c7e 100644
--- a/src/views/user/orderManagement/components/order-home.vue
+++ b/src/views/user/orderManagement/components/order-home.vue
@@ -496,14 +496,15 @@ const pickUpViewOut = (index: number) => {
};
const pickUpCodeFormRef = ref()
//取件码表单校验规则
-const pickUpCodeRules = ref([
+const pickUpCodeRules = ref({
+ pickUpCode:[
{
required: true,
message: '请输入取件码',
trigger: 'blur',
- },
+ }
],
-)
+})
const pickUpCodeForm = reactive
({
pickUpCode: '',
})
@@ -671,8 +672,8 @@ const pickUpCodeForm = reactive({
class="order-title-info"
>
- 出租方姓名:
- {{ item.sellerName }}
+ 出租方联系人:
+ {{ item.person }}
承租方姓名:
diff --git a/src/views/user/orderManagementCz/components/order-details.vue b/src/views/user/orderManagementCz/components/order-details.vue
index bb72f5a..f975aec 100644
--- a/src/views/user/orderManagementCz/components/order-details.vue
+++ b/src/views/user/orderManagementCz/components/order-details.vue
@@ -11,7 +11,9 @@ const lossRecordList = ref([])
const repairRecordList = ref([])
const fileListAll = ref([])
const viewFileInfoList = ref([])
-const overhaulDetails = ref({})
+const overhaulDetails = ref({
+ 'totalCost': 0,
+})
const innerVisible = ref(false)
import moment from 'moment'
@@ -27,11 +29,18 @@ const getId = () => {
const orderDetails = ref({})
/** 查询列表 */
const getList = async () => {
+ flag.value = false
const res: any = await getOrderListInfoApi({ orderId: props.orderId })
console.log(res, '详情')
orderDetails.value = res.data
+ if (props.orderStatus == 20){
+ isOrderComplete.value= 'text-decoration: line-through'
+ } else if(props.orderStatus == 4 && orderDetails.value.detailsList.length>0 && orderDetails.value.detailsList.some((item:any) => item.orderStatus == 20)){
+ isOrderComplete.value= 'text-decoration: line-through'
+ }
if (props.orderStatus == 20) {
+ isOrderComplete.value= 'text-decoration: line-through'
const { data: result }: any = await getOverhaulApi(props.orderId)
orderDetailDtoList.value = result.orderDetailDtoList
repairRecordList.value = result.repairRecordList
@@ -40,6 +49,27 @@ const getList = async () => {
fileListAll.value = result.fileInfoList
overhaulDetails.value = result
}
+ if(props.orderStatus == 4){
+ orderDetails.value.detailsList.forEach((item:any) => {
+ if (item.orderStatus!= 20) {
+ // 累加符合条件的 cost 到 totalCost
+ overhaulDetails.value.totalCost += item.costs;
+ }
+ });
+ if(orderDetails.value.detailsList.length>0){
+ orderDetails.value.detailsList.forEach((itemTwo: any) => {
+ if (itemTwo.orderStatus == 20) {
+ flag.value = true
+ let time = momentInit(itemTwo.takeOverTime).diff(itemTwo.rentOverTime, 'day')
+ if(time==0){
+ time = 1
+ }
+ // 累加符合条件的 cost 到 total
+ overhaulDetails.value.totalCost += itemTwo.dayLeasePrice*time;
+ }
+ });
+ }
+ }
}
onBeforeMount(() => {
@@ -164,9 +194,15 @@ const onViewFileImg = (row: any, index: number) => {
innerVisible.value = true
}
-const isOrderComplete = computed(() => {
- if (props.orderStatus == 20) return 'text-decoration: line-through'
-})
+// const isOrderComplete = computed(() => {
+// if (props.orderStatus == 20) return 'text-decoration: line-through'
+// })
+const isOrderComplete = ref('')
+const flag = ref(false)
+
+const isOrderCompleteTwo = (goods: any) => {
+ if (goods.orderStatus == 20) return 'text-decoration: line-through'
+}
@@ -300,7 +336,7 @@ const isOrderComplete = computed(() => {
租期 :
-
+
{{ goods.days }}{{ ' ' + '天' }}
@@ -352,16 +388,16 @@ const isOrderComplete = computed(() => {
租期
{{ goods.rentBeginTime }}至{{ goods.rentEndTime }}
- {{ goods.takeOverTime?.slice(0, 10) }}至{{
- goods.rentOverTime?.slice(0, 10)
+ {{ goods.takeOverTime }}至{{
+ goods.rentOverTime
}}
@@ -371,7 +407,7 @@ const isOrderComplete = computed(() => {
总费用
{{ orderDetails.cost }} 元
-
+
{{ overhaulDetails.totalCost }} 元
diff --git a/src/views/user/orderManagementCz/components/order-home.vue b/src/views/user/orderManagementCz/components/order-home.vue
index 8cdcde9..44ab6e5 100644
--- a/src/views/user/orderManagementCz/components/order-home.vue
+++ b/src/views/user/orderManagementCz/components/order-home.vue
@@ -911,8 +911,8 @@ const pickUpView = async(item: any) => {
class="order-title-info"
>
- 出租方姓名:
- {{ item.sellerName }}
+ 出租方联系人:
+ {{ item.person }}
承租方姓名: