Merge branch 'ah-simple' of http://192.168.0.75:3000/bonus/Zlpt_Portal into ah-simple

This commit is contained in:
hongchao 2025-02-24 18:06:44 +08:00
commit 57d5123873
8 changed files with 35 additions and 36 deletions

1
.gitignore vendored
View File

@ -8,6 +8,7 @@ pnpm-debug.log*
lerna-debug.log*
node_modules
D:\WorkSpace\2025\AnHui\Zlpt_Portal\D\nodejs
.DS_Store
dist
dist-ssr

2
components.d.ts vendored
View File

@ -29,6 +29,7 @@ declare module 'vue' {
ElEmpty: typeof import('element-plus/es')['ElEmpty']
ElForm: typeof import('element-plus/es')['ElForm']
ElFormItem: typeof import('element-plus/es')['ElFormItem']
ElHeader: typeof import('element-plus/es')['ElHeader']
ElIcon: typeof import('element-plus/es')['ElIcon']
ElImage: typeof import('element-plus/es')['ElImage']
ElInput: typeof import('element-plus/es')['ElInput']
@ -36,6 +37,7 @@ declare module 'vue' {
ElMenu: typeof import('element-plus/es')['ElMenu']
ElMenuItem: typeof import('element-plus/es')['ElMenuItem']
ElOption: typeof import('element-plus/es')['ElOption']
ElPageHeader: typeof import('element-plus/es')['ElPageHeader']
ElPagination: typeof import('element-plus/es')['ElPagination']
ElPopconfirm: typeof import('element-plus/es')['ElPopconfirm']
ElProgress: typeof import('element-plus/es')['ElProgress']

Binary file not shown.

View File

@ -44,8 +44,11 @@ service.interceptors.request.use(
}
if (config.data) {
let data = typeof config.data === 'object' ? JSON.stringify(config.data) : config.data
config.data = encryptWithSM4(data + '|' + hashWithSM3AndSalt(data))
// config.data = data
if (config.headers['encryptRequest'] == 'true') {
config.data = encryptWithSM4(data + '|' + hashWithSM3AndSalt(data))
} else {
config.data = data
}
}
return config
},

View File

@ -703,7 +703,7 @@ const onEditorReady = (editor) => {
onMounted(() => {
getContractListData()
uploadUrlTemp.value = window.location.origin + '/iws/mall-view/contract-template.docx'
uploadUrlTemp.value = window.location.origin + '/iws/mall-view/contract-template-250224.docx'
// getEquipmentTypeApi().then((res: any) => {
// deviceTypeTree.value = res.data
})

View File

@ -22,25 +22,30 @@ const isType: any = computed(() => {
return localStorage.getItem('rolesType')
})
const allList = [
//
interface MenuItem {
title: string
name: string
permission: string[]
}
// ---
const lessorMenus: MenuItem[] = [
{ title: '装备管理', name: 'goodsManagement', permission: ['1'] },
{ title: '出租订单', name: 'orderManagementCz', permission: ['1'] },
{ title: '接单管理', name: 'accept-orders', permission: ['1'] },
// { title: '退', name: 'rent-termination', permission: ['1'] },
// { title: '', name: 'settlement-manage', permission: ['1'] },
{ title: '质检管理', name: 'quality-manage', permission: ['1'] },
// { title: '', name: 'security-certificate', permission: ['1'] },
// { title: '', name: 'tag-manage', permission: ['1'] },
// { title: '', name: 'repair-manage', permission: ['1'] },
{ title: '合同管理', name: 'contract-manage', permission: ['1'] },
]
// ---
const lesseeMenus: MenuItem[] = [
{ title: '需求管理', name: 'sourcingNeed', permission: ['2'] },
{ title: '租赁订单', name: 'orderManagement', permission: ['2'] },
{ title: '收货地址管理', name: 'address-manage', permission: ['2'] },
{ title: '合同管理', name: 'contract-manage', permission: ['1'] },
// { title: '', name: 'quickMessage', permission: ['1'] },
// { title: '', name: 'personalCenter', permission: ['1'] },
// { title: '', name: 'personalCenter', permission: ['2'] },
]
//
const allList: MenuItem[] = [...lessorMenus, ...lesseeMenus]
const rolesType = ref(localStorage.getItem('rolesTypeName') || '出租方')
const menuList: any = computed(() => {
if (rolesType.value == '承租方') return allList.filter((e) => e.permission.includes('2'))

View File

@ -390,17 +390,17 @@ const downloadContract = () => {
// }
}
const confirmFail = async (index: number) => {
const confirmFail = async (item: any) => {
ElMessageBox.confirm('是否确定取消订单?', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
})
.then(() => {
return failApi({ orderId: cardList.value[index].orderId, orderStatus: 99 })
return failApi({ orderId: item.orderId, orderStatus: 99 })
// return removeDeviceApi([row.maId])
})
.then((res) => {
.then((res: any) => {
if (res.code === 200) {
ElMessage({
type: 'success',
@ -926,10 +926,10 @@ const pickUpCodeForm = reactive<any>({
</el-button>
<!-- <el-button type="primary" size="small"> 发起减免 </el-button> -->
<el-button
v-if="item.orderStatus == '2'"
v-if="item.orderStatus == '1' || item.orderStatus == '2'"
type="primary"
size="small"
@click="confirmFail(index)"
@click="confirmFail(item)"
>
取消订单
</el-button>

View File

@ -228,17 +228,18 @@ const confirmPass = async (index: number) => {
}
//
const confirmFail = async (index: number) => {
const confirmFail = async (item: any) => {
// console.log(item.orderId, '-->>>')
ElMessageBox.confirm('是否确定取消?', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
})
.then(() => {
return failApi({ orderId: cardList.value[index].orderId, orderStatus: 99 })
return failApi({ orderId: item.orderId, orderStatus: 99 })
// return removeDeviceApi([row.maId])
})
.then((res) => {
.then((res: any) => {
if (res.code === 200) {
ElMessage({
type: 'success',
@ -731,19 +732,6 @@ const downloadContract = () => {
}
const wordUrl = ref('')
//
const dialogVisiblePickUpCode = ref(false);
//
const pickUpCode = ref('');
const pickUpView = async(item: any) => {
console.log('item',item)
const res: any = await getOrderCodeApi({orderId:item.orderId})
console.log('res',res)
pickUpCode.value = res.data
dialogVisiblePickUpCode.value = true;
};
</script>
<template>
@ -1172,8 +1160,8 @@ const pickUpView = async(item: any) => {
<el-button
size="small"
type="primary"
v-if="item.orderStatus == '2'"
@click="confirmFail(index)"
v-if="item.orderStatus == '1'"
@click="confirmFail(item)"
>
取消订单
</el-button>