This commit is contained in:
		
							parent
							
								
									6ce7237725
								
							
						
					
					
						commit
						e66dc97ac3
					
				| 
						 | 
				
			
			@ -204,8 +204,15 @@ const uploadSignUrl = async (base64Data) => {
 | 
			
		|||
            console.log('🚀 ~ success: ~ params:', params)
 | 
			
		||||
            const res = await updateLeaseApplyInfoSign(params)
 | 
			
		||||
            console.log('🚀 ~ uploadImg-领料 ~ res:', res)
 | 
			
		||||
            uni.showToast({ title: '签名成功'})
 | 
			
		||||
            uni.navigateBack()
 | 
			
		||||
            uni.showToast({
 | 
			
		||||
                title: '签名成功',
 | 
			
		||||
                mask: true,
 | 
			
		||||
                success: () => {
 | 
			
		||||
                    setTimeout(() => {
 | 
			
		||||
                        uni.navigateBack()
 | 
			
		||||
                    }, 1000)
 | 
			
		||||
                },
 | 
			
		||||
            })
 | 
			
		||||
        } else if (opts.isToolsLease) {
 | 
			
		||||
            const params = {
 | 
			
		||||
                id: opts.id,
 | 
			
		||||
| 
						 | 
				
			
			@ -215,10 +222,17 @@ const uploadSignUrl = async (base64Data) => {
 | 
			
		|||
                publishTask: opts.publishTask || '',
 | 
			
		||||
            }
 | 
			
		||||
            console.log('🚀 ~ success: ~ params:', params)
 | 
			
		||||
            uni.showToast({ title: '签名成功'})
 | 
			
		||||
            const res = await toolsLeaseApplyInfoSign(params)
 | 
			
		||||
            console.log('🚀 ~ uploadImg-领料 ~ res:', res)
 | 
			
		||||
            uni.navigateBack()
 | 
			
		||||
            uni.showToast({
 | 
			
		||||
                title: '签名成功',
 | 
			
		||||
                mask: true,
 | 
			
		||||
                success: () => {
 | 
			
		||||
                    setTimeout(() => {
 | 
			
		||||
                        uni.navigateBack()
 | 
			
		||||
                    }, 1000)
 | 
			
		||||
                },
 | 
			
		||||
            })
 | 
			
		||||
        } else if (opts.isAuthorize) {
 | 
			
		||||
            const params = {
 | 
			
		||||
                parentId: opts.id,
 | 
			
		||||
| 
						 | 
				
			
			@ -226,9 +240,16 @@ const uploadSignUrl = async (base64Data) => {
 | 
			
		|||
                signType: signType.value,
 | 
			
		||||
            }
 | 
			
		||||
            const res = await updateLeaseApplyInfoSignApi(params)
 | 
			
		||||
            uni.showToast({ title: '签名成功'})
 | 
			
		||||
            console.log('🚀 ~ uploadSignUrl ~ 项目部授权:', res)
 | 
			
		||||
            uni.navigateBack()
 | 
			
		||||
            uni.showToast({
 | 
			
		||||
                title: '签名成功',
 | 
			
		||||
                mask: true,
 | 
			
		||||
                success: () => {
 | 
			
		||||
                    setTimeout(() => {
 | 
			
		||||
                        uni.navigateBack()
 | 
			
		||||
                    }, 1000)
 | 
			
		||||
                },
 | 
			
		||||
            })
 | 
			
		||||
        } else if (opts.isBack) {
 | 
			
		||||
            const params = {
 | 
			
		||||
                id: opts.id,
 | 
			
		||||
| 
						 | 
				
			
			@ -237,9 +258,16 @@ const uploadSignUrl = async (base64Data) => {
 | 
			
		|||
            }
 | 
			
		||||
            console.log('🚀 ~ success: ~ params:', params)
 | 
			
		||||
            const res = await updateSignById(params)
 | 
			
		||||
            uni.showToast({ title: '签名成功'})
 | 
			
		||||
            console.log('🚀 ~ uploadImg-退料 ~ res:', res)
 | 
			
		||||
            uni.navigateBack()
 | 
			
		||||
            uni.showToast({
 | 
			
		||||
                title: '签名成功',
 | 
			
		||||
                mask: true,
 | 
			
		||||
                success: () => {
 | 
			
		||||
                    setTimeout(() => {
 | 
			
		||||
                        uni.navigateBack()
 | 
			
		||||
                    }, 1000)
 | 
			
		||||
                },
 | 
			
		||||
            })
 | 
			
		||||
        } else {
 | 
			
		||||
            const params = {
 | 
			
		||||
                signUrl: signUrl,
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -145,57 +145,66 @@ const getOutboundDetailsData = async () => {
 | 
			
		|||
    console.log('publishTask:', leaseApplyInfo.value.publishTask);
 | 
			
		||||
    console.log('publishTask type:', typeof leaseApplyInfo.value.publishTask);
 | 
			
		||||
 | 
			
		||||
    let res;
 | 
			
		||||
    if (leaseApplyInfo.value.publishTask === null || leaseApplyInfo.value.publishTask == "") {
 | 
			
		||||
        console.log("Condition: publishTask is null or empty string");
 | 
			
		||||
        // 如果 publishTask 为空,则只传递两个参数
 | 
			
		||||
        console.log("yyyyyyyyyyyyyyyyyyyy");
 | 
			
		||||
        const { data } = await getOutboundDetailsAPI(
 | 
			
		||||
            leaseApplyInfo.value.parentId,
 | 
			
		||||
            keyWord.value
 | 
			
		||||
        );
 | 
			
		||||
        res = data;
 | 
			
		||||
        console.log('🚀 ~ getOutboundDetailsData ~ res:', res);
 | 
			
		||||
    } else {
 | 
			
		||||
        console.log("Condition: publishTask is not null and not empty string");
 | 
			
		||||
        // 如果 publishTask 不为空,则传递三个参数
 | 
			
		||||
        const { data } = await getOutboundDetailsAPITwo(
 | 
			
		||||
            leaseApplyInfo.value.parentId,
 | 
			
		||||
            keyWord.value,
 | 
			
		||||
            leaseApplyInfo.value.publishTask
 | 
			
		||||
        );
 | 
			
		||||
        res = data;
 | 
			
		||||
        console.log("xxxxxxxxxxx", res);
 | 
			
		||||
    try {
 | 
			
		||||
        uni.showLoading({
 | 
			
		||||
            title: '加载中...',
 | 
			
		||||
            mask: true
 | 
			
		||||
        })
 | 
			
		||||
        let res;
 | 
			
		||||
        if (leaseApplyInfo.value.publishTask === null || leaseApplyInfo.value.publishTask == "") {
 | 
			
		||||
            console.log("Condition: publishTask is null or empty string");
 | 
			
		||||
            // 如果 publishTask 为空,则只传递两个参数
 | 
			
		||||
            console.log("yyyyyyyyyyyyyyyyyyyy");
 | 
			
		||||
            const { data } = await getOutboundDetailsAPI(
 | 
			
		||||
                leaseApplyInfo.value.parentId,
 | 
			
		||||
                keyWord.value
 | 
			
		||||
            );
 | 
			
		||||
            res = data;
 | 
			
		||||
            console.log('🚀 ~ getOutboundDetailsData ~ res:', res);
 | 
			
		||||
        } else {
 | 
			
		||||
            console.log("Condition: publishTask is not null and not empty string");
 | 
			
		||||
            // 如果 publishTask 不为空,则传递三个参数
 | 
			
		||||
            const { data } = await getOutboundDetailsAPITwo(
 | 
			
		||||
                leaseApplyInfo.value.parentId,
 | 
			
		||||
                keyWord.value,
 | 
			
		||||
                leaseApplyInfo.value.publishTask
 | 
			
		||||
            );
 | 
			
		||||
            res = data;
 | 
			
		||||
            console.log("xxxxxxxxxxx", res);
 | 
			
		||||
        }
 | 
			
		||||
        
 | 
			
		||||
        detailsList.value = res.leaseApplyDetailsList;
 | 
			
		||||
        leaseApplyInfo.value.taskId = res.leaseApplyInfo.taskId; 
 | 
			
		||||
        leaseApplyInfo.value.typeId = res.leaseApplyInfo.typeId; 
 | 
			
		||||
        leaseApplyInfo.value.leaseUnitId = res.leaseApplyInfo.leaseUnitId;
 | 
			
		||||
        leaseApplyInfo.value.leaseUnit = res.leaseApplyInfo.leaseUnit;
 | 
			
		||||
        leaseApplyInfo.value.leaseProjectId = res.leaseApplyInfo.leaseProjectId;
 | 
			
		||||
        leaseApplyInfo.value.leaseProject = res.leaseApplyInfo.leaseProject;
 | 
			
		||||
        taskStatus.value = res.leaseApplyInfo.taskStatus;
 | 
			
		||||
        if(taskStatus.value==3){
 | 
			
		||||
            options.value = [
 | 
			
		||||
                { 	text: '出库',style: {backgroundColor: '#84c649',color: '#fff',fontSize: '28rpx'}	},
 | 
			
		||||
                // {	text: '退回',style: {backgroundColor: '#ed6042',color: '#fff',fontSize: '28rpx'}	},
 | 
			
		||||
                {   text: '查看',style: {backgroundColor: '#3784fb',color: '#fff',fontSize: '28rpx'}	}
 | 
			
		||||
            ];
 | 
			
		||||
            options2.value = [
 | 
			
		||||
                // {	text: '退回',style: {backgroundColor: '#ed6042',color: '#fff',fontSize: '28rpx'}},
 | 
			
		||||
                {   text: '查看',style: {backgroundColor: '#3784fb',color: '#fff',fontSize: '28rpx'}}
 | 
			
		||||
            ]
 | 
			
		||||
        }else if(taskStatus.value==4){
 | 
			
		||||
            options.value = [
 | 
			
		||||
                { 	text: '出库',style: {backgroundColor: '#84c649',color: '#fff',fontSize: '28rpx'}	}, 
 | 
			
		||||
                {   text: '查看',style: {backgroundColor: '#3784fb',color: '#fff',fontSize: '28rpx'}	}
 | 
			
		||||
            ];
 | 
			
		||||
            options2.value = [ 
 | 
			
		||||
                {   text: '查看',style: {backgroundColor: '#3784fb',color: '#fff',fontSize: '28rpx'}}
 | 
			
		||||
            ]
 | 
			
		||||
        }
 | 
			
		||||
    } catch (error) {
 | 
			
		||||
        console.log('🚀 ~ getOutboundDetailsData ~ error:', error)
 | 
			
		||||
    } finally {
 | 
			
		||||
        uni.hideLoading()
 | 
			
		||||
    }
 | 
			
		||||
    
 | 
			
		||||
    detailsList.value = res.leaseApplyDetailsList;
 | 
			
		||||
    leaseApplyInfo.value.taskId = res.leaseApplyInfo.taskId; 
 | 
			
		||||
    leaseApplyInfo.value.typeId = res.leaseApplyInfo.typeId; 
 | 
			
		||||
	leaseApplyInfo.value.leaseUnitId = res.leaseApplyInfo.leaseUnitId;
 | 
			
		||||
	leaseApplyInfo.value.leaseUnit = res.leaseApplyInfo.leaseUnit;
 | 
			
		||||
	leaseApplyInfo.value.leaseProjectId = res.leaseApplyInfo.leaseProjectId;
 | 
			
		||||
	leaseApplyInfo.value.leaseProject = res.leaseApplyInfo.leaseProject;
 | 
			
		||||
	taskStatus.value = res.leaseApplyInfo.taskStatus;
 | 
			
		||||
	if(taskStatus.value==3){
 | 
			
		||||
		options.value = [
 | 
			
		||||
		    { 	text: '出库',style: {backgroundColor: '#84c649',color: '#fff',fontSize: '28rpx'}	},
 | 
			
		||||
			// {	text: '退回',style: {backgroundColor: '#ed6042',color: '#fff',fontSize: '28rpx'}	},
 | 
			
		||||
			{   text: '查看',style: {backgroundColor: '#3784fb',color: '#fff',fontSize: '28rpx'}	}
 | 
			
		||||
		];
 | 
			
		||||
		options2.value = [
 | 
			
		||||
			// {	text: '退回',style: {backgroundColor: '#ed6042',color: '#fff',fontSize: '28rpx'}},
 | 
			
		||||
		    {   text: '查看',style: {backgroundColor: '#3784fb',color: '#fff',fontSize: '28rpx'}}
 | 
			
		||||
		]
 | 
			
		||||
	}else if(taskStatus.value==4){
 | 
			
		||||
		options.value = [
 | 
			
		||||
			{ 	text: '出库',style: {backgroundColor: '#84c649',color: '#fff',fontSize: '28rpx'}	}, 
 | 
			
		||||
			{   text: '查看',style: {backgroundColor: '#3784fb',color: '#fff',fontSize: '28rpx'}	}
 | 
			
		||||
		];
 | 
			
		||||
		options2.value = [ 
 | 
			
		||||
			{   text: '查看',style: {backgroundColor: '#3784fb',color: '#fff',fontSize: '28rpx'}}
 | 
			
		||||
		]
 | 
			
		||||
	}
 | 
			
		||||
	 
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// 数量退回
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -89,49 +89,41 @@
 | 
			
		|||
                         </uni-col>
 | 
			
		||||
                     </uni-row>
 | 
			
		||||
                     <uni-row :gutter="24">
 | 
			
		||||
                         <uni-col :span="2" style="color: transparent">{{ index + 1 }}</uni-col>
 | 
			
		||||
                         <uni-col :span="6">规格型号:</uni-col>
 | 
			
		||||
                         <uni-col :span="16">
 | 
			
		||||
                             <view class="cont">{{ item.specificationType }}</view>
 | 
			
		||||
                         </uni-col>
 | 
			
		||||
                     </uni-row>
 | 
			
		||||
                     <uni-row :gutter="24">
 | 
			
		||||
                         <uni-col :span="2" style="color: transparent">{{ index + 1 }}</uni-col>
 | 
			
		||||
                         <uni-col :span="6">单位:</uni-col>
 | 
			
		||||
                         <uni-col :span="16">
 | 
			
		||||
                             <view class="cont">{{ item.unitName }}</view>
 | 
			
		||||
                         </uni-col>
 | 
			
		||||
                     </uni-row>
 | 
			
		||||
                     <uni-row :gutter="24">
 | 
			
		||||
                         <uni-col :span="2" style="color: transparent">{{ index + 1 }}</uni-col>
 | 
			
		||||
                         <uni-col :span="6">退料数量:</uni-col>
 | 
			
		||||
                         <uni-col :span="16">
 | 
			
		||||
                             <view class="cont">{{ item.repairNum }}</view>
 | 
			
		||||
                         </uni-col>
 | 
			
		||||
                         <uni-col :span="8">退料:{{ item.repairNum }}</uni-col>
 | 
			
		||||
                         <uni-col :span="8">已修:{{ item.repairedNum }}</uni-col>
 | 
			
		||||
                         <uni-col :span="8">报废:{{ item.scrapNum }}</uni-col>
 | 
			
		||||
                     </uni-row>
 | 
			
		||||
                     <uni-row :gutter="24">
 | 
			
		||||
                         <uni-col :span="2" style="color: transparent">{{ index + 1 }}</uni-col>
 | 
			
		||||
                     <!-- <uni-row :gutter="24">
 | 
			
		||||
                         <uni-col :span="6">已修数量:</uni-col>
 | 
			
		||||
                         <uni-col :span="16">
 | 
			
		||||
                             <view class="cont">{{ item.repairedNum }}</view>
 | 
			
		||||
                         </uni-col>
 | 
			
		||||
                     </uni-row> 
 | 
			
		||||
                     <uni-row :gutter="24">
 | 
			
		||||
                         <uni-col :span="2" style="color: transparent">{{ index + 1 }}</uni-col>
 | 
			
		||||
                         <uni-col :span="6">报废数量:</uni-col>
 | 
			
		||||
                         <uni-col :span="16">
 | 
			
		||||
                             <view class="cont">{{ item.scrapNum }}</view>
 | 
			
		||||
                         </uni-col>
 | 
			
		||||
                     </uni-row>
 | 
			
		||||
                     </uni-row> -->
 | 
			
		||||
                     <uni-row :gutter="24" v-if="item.manageType == 0">
 | 
			
		||||
                         <uni-col :span="2" style="color: transparent">{{ index + 1 }}</uni-col>
 | 
			
		||||
                         <uni-col :span="6">设备编码:</uni-col>
 | 
			
		||||
                         <uni-col :span="16">
 | 
			
		||||
                             <view class="cont">{{ item.maCode }}</view>
 | 
			
		||||
                         </uni-col>
 | 
			
		||||
                     </uni-row>
 | 
			
		||||
                     <uni-row :gutter="24">
 | 
			
		||||
                         <uni-col :span="2" style="color: transparent">{{ index + 1 }}</uni-col>
 | 
			
		||||
                         <uni-col :span="6">管理模式:</uni-col>
 | 
			
		||||
                         <uni-col :span="16">
 | 
			
		||||
                             <uni-tag
 | 
			
		||||
| 
						 | 
				
			
			@ -413,7 +405,7 @@ onUnmounted(() => {
 | 
			
		|||
        .table-list-item {
 | 
			
		||||
            background-color: #fff;
 | 
			
		||||
            border-radius: 20rpx;
 | 
			
		||||
            padding: 24rpx;
 | 
			
		||||
            padding: 6rpx 24rpx;
 | 
			
		||||
            margin-bottom: 24rpx;
 | 
			
		||||
            box-shadow: 0 4rpx 16rpx rgba(0, 0, 0, 0.06);
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -502,4 +494,7 @@ onUnmounted(() => {
 | 
			
		|||
    color: #8c8c8c;
 | 
			
		||||
    padding: 24rpx 0;
 | 
			
		||||
}
 | 
			
		||||
.page-container .scroll-container .table-list-item .uni-row {
 | 
			
		||||
    padding: 3px 0 !important;
 | 
			
		||||
}
 | 
			
		||||
</style>
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue