diff --git a/src/http/api/contract-manage/index.ts b/src/http/api/contract-manage/index.ts
index 02d86b0..f372b3e 100644
--- a/src/http/api/contract-manage/index.ts
+++ b/src/http/api/contract-manage/index.ts
@@ -15,4 +15,9 @@ export const editContractApi = (data: any = {}) => {
// 合同删除
export const delContractApi = (data: any = {}) => {
return post('/material-mall/contract/del', data)
+}
+
+// 修改状态
+export const updateStatus = (data: any = {}) => {
+ return post('/material-mall/contract/updateStatus', data)
}
\ No newline at end of file
diff --git a/src/http/api/usercenter/seekorder.ts b/src/http/api/usercenter/seekorder.ts
index c4de3dd..ffb91df 100644
--- a/src/http/api/usercenter/seekorder.ts
+++ b/src/http/api/usercenter/seekorder.ts
@@ -26,4 +26,7 @@ export const confirmPriceApi = (data: any) => {
return post('/material-mall/lease-repair/confirmPrice', data)
}
-
+//获取租赁协议详情
+export const getContractDetailApi = (data: any) => {
+ return get('/material-mall/order/leaseAgreement', data)
+}
\ No newline at end of file
diff --git a/src/views/user/contract-manage/index.vue b/src/views/user/contract-manage/index.vue
index f76dfec..d21fbb6 100644
--- a/src/views/user/contract-manage/index.vue
+++ b/src/views/user/contract-manage/index.vue
@@ -90,8 +90,8 @@
@@ -99,7 +99,7 @@
查看
编辑
删除
@@ -131,12 +128,12 @@
-
+ />
{
queryParams.endTime = createTime.value[1]
}
const { data: res }: any = await getContractListApi(queryParams)
- qualityLis.value = res
+ qualityLis.value = res.rows
total.value = res.total
}
@@ -295,9 +293,27 @@ const onReset = () => {
getContractListData()
}
-//状态选择
-const handleStatusChange = (row:any)=>{
+//状态选择
+const handleStatusChange = async(row:any)=>{
+ console.log('111111',row)
+ const id = row.id
+ // if (row.status === 0) {
+ // // If the current row's status is turned on, disable switches for other rows
+ // qualityLis.value.forEach((item:any) => {
+ // if (item !== row) {
+ // item.status = 1; // Set the status of other rows to "off"
+ // }
+ // });
+ // }
+ const res: any = await updateStatus({id,status:row.status})
+ if(res.code === 200){
+ ElMessage({
+ type:'success',
+ message: '状态修改成功',
+ })
+ await getContractListData()
+ }
}
const addAndEditFormRef = ref()
diff --git a/src/views/user/orderManagementCz/components/order-home.vue b/src/views/user/orderManagementCz/components/order-home.vue
index 63d9b5e..bc4d00c 100644
--- a/src/views/user/orderManagementCz/components/order-home.vue
+++ b/src/views/user/orderManagementCz/components/order-home.vue
@@ -5,7 +5,7 @@ import RentTerminationModel from './rent-termination-model.vue'
import CostSettlementModel from './cost-settlement-model.vue'
import Empty from 'components/Empty/index.vue'
import { useRouter } from 'vue-router'
-import { getOrderListApi, passApi, failApi } from 'http/api/usercenter/seekorder'
+import { getOrderListApi, passApi, failApi,getContractDetailApi } from 'http/api/usercenter/seekorder'
import uploadComponent from 'components/uploadComponent/index.vue'
import previewImg from './previewImg/index.vue'
import { ElMessage, ElMessageBox } from 'element-plus'
@@ -609,7 +609,7 @@ const handleViewRepair = (item: any) => {
const settleWordTitle = ref('')
const dialogFormVisibleSettleWord: any = ref(false)
//租赁协议
-const handleViewWord = () => {
+const handleViewWord = async(index: Number, row: any) => {
settleWordTitle.value = '租赁协议'
moneyParams1.value = {
/* 设备状态 */
@@ -618,6 +618,10 @@ const handleViewWord = () => {
insureList: [],
picList: [],
}
+ const orderId = row.orderId
+ const res: any = await getContractDetailApi({ orderId })
+ cardList.value = res.rows
+ total.value = res.total
wordUrl.value = "http://127.0.0.1:29300/statics/2024/12/13/合同模板2_20241213133604A002.doc"
// 打开租赁协议弹框
dialogFormVisibleSettleWord.value = true
@@ -961,7 +965,7 @@ const wordUrl = ref('')
>
订单详情
-
+
租赁协议