维修及配件bug修复
This commit is contained in:
		
							parent
							
								
									a1e01a635f
								
							
						
					
					
						commit
						ffab0a74ae
					
				| 
						 | 
				
			
			@ -10,6 +10,17 @@
 | 
			
		|||
            <uni-col :span="4">
 | 
			
		||||
                <view class="search" @click="">查询</view>
 | 
			
		||||
            </uni-col> -->
 | 
			
		||||
            <uni-col :span="10">
 | 
			
		||||
                <view>
 | 
			
		||||
                    <uni-easyinput 
 | 
			
		||||
                        placeholder="请输入物资名称" 
 | 
			
		||||
                        v-model="searchKeyword" 
 | 
			
		||||
                    />
 | 
			
		||||
                </view>
 | 
			
		||||
            </uni-col>
 | 
			
		||||
            <uni-col :span="4">
 | 
			
		||||
			    <view class="search" @click="search()">查询</view>
 | 
			
		||||
			</uni-col>
 | 
			
		||||
            <uni-col :span="4">
 | 
			
		||||
                <view class="addBtn" @click="addApply">申请</view>
 | 
			
		||||
            </uni-col>
 | 
			
		||||
| 
						 | 
				
			
			@ -17,12 +28,25 @@
 | 
			
		|||
			    <view class="addBtn" @click="goApply()">申请记录</view>
 | 
			
		||||
			</uni-col>
 | 
			
		||||
        </uni-row>
 | 
			
		||||
        <!-- <uni-row :gutter="24" class="search-form"> 
 | 
			
		||||
            <uni-col :span="10">
 | 
			
		||||
                <view>
 | 
			
		||||
                    <uni-easyinput 
 | 
			
		||||
                        placeholder="请输入物资名称" 
 | 
			
		||||
                        v-model="searchKeyword" 
 | 
			
		||||
                    />
 | 
			
		||||
                </view>
 | 
			
		||||
            </uni-col>
 | 
			
		||||
            <uni-col :span="6">
 | 
			
		||||
			    <view class="search" @click="search()">查询</view>
 | 
			
		||||
			</uni-col>
 | 
			
		||||
        </uni-row> -->
 | 
			
		||||
		<uni-row :gutter="24" class="search-form">
 | 
			
		||||
			<uni-col :span="5">
 | 
			
		||||
			    <view style="font-size: 24rpx;">物资类型:</view> 
 | 
			
		||||
			</uni-col>
 | 
			
		||||
			<uni-col :span="19">
 | 
			
		||||
				<scroll-view scroll-x class="select-box">
 | 
			
		||||
				<scroll-view scroll-x class="select-box" ref="nameScrollView">
 | 
			
		||||
                    <view class="select-box-content">
 | 
			
		||||
						<view class="select-box-item" :style="{ color: maId=='' ? 'red':'black' }" @click="getLevelOneList()">
 | 
			
		||||
						    全部
 | 
			
		||||
| 
						 | 
				
			
			@ -110,10 +134,20 @@ const partList = ref([
 | 
			
		|||
    // {modelType:"手扶绞磨机", partName:"离合器轴", typeName:"XJSF-JM-1", storageNum:"20", preNum:"0"},{modelType:"手扶绞磨机", partName:"离合器轴", typeName:"XJSF-JM-2", storageNum:"20", preNum:"0"},{modelType:"手扶绞磨机", partName:"离合器轴", typeName:"XJSF-JM-3", storageNum:"20", preNum:"0"}
 | 
			
		||||
]) //列表数据源
 | 
			
		||||
 | 
			
		||||
const searchKeyword = ref('')
 | 
			
		||||
const nameScrollView = ref(null)
 | 
			
		||||
// --------1---------
 | 
			
		||||
// 类型数据
 | 
			
		||||
const maList = ref([])//一级选择数据
 | 
			
		||||
const maId = ref("")//一级选中id
 | 
			
		||||
 | 
			
		||||
const search = async () => {
 | 
			
		||||
	const res = await selectPartTreeListApi({level:2,id:maId.value,paName:searchKeyword.value,flag:1})
 | 
			
		||||
	modelList.value=res.data.secondList;
 | 
			
		||||
	typeList.value=res.data.thirdList;
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// 获取类型数据(一级)
 | 
			
		||||
const getLevelOneList = async () => {
 | 
			
		||||
	const res = await selectPartTreeListApi({level:1})
 | 
			
		||||
| 
						 | 
				
			
			@ -181,7 +215,7 @@ const chosenLevelThree = async(item) => {
 | 
			
		|||
	}else{
 | 
			
		||||
		let index = partList.value.findIndex(v=>v.partId==item.id)
 | 
			
		||||
		if(index<0){//添加
 | 
			
		||||
			partList.value.push(obj)
 | 
			
		||||
			partList.value.unshift(obj)
 | 
			
		||||
		}else{//已存在
 | 
			
		||||
			uni.showToast({
 | 
			
		||||
				title: '当前领料任务已存在该规格型号!',
 | 
			
		||||
| 
						 | 
				
			
			@ -337,6 +371,7 @@ onLoad(() => {
 | 
			
		|||
                opacity: 0.9;
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
        
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -10,27 +10,35 @@
 | 
			
		|||
            <uni-col :span="4">
 | 
			
		||||
                <view class="search search-btn" @click="search">查询</view>
 | 
			
		||||
            </uni-col>
 | 
			
		||||
 | 
			
		||||
        </uni-row>
 | 
			
		||||
 | 
			
		||||
        <uni-row :gutter="24" class="search-form">
 | 
			
		||||
            <uni-col :span="12">
 | 
			
		||||
                <view class="checkbox-group">
 | 
			
		||||
                    <checkbox-group @change="onChangeAllChecked">
 | 
			
		||||
                        <label>
 | 
			
		||||
                            全选
 | 
			
		||||
                            <checkbox
 | 
			
		||||
                                color="#409eff"
 | 
			
		||||
                                :checked="allChecked"
 | 
			
		||||
                                value="all"
 | 
			
		||||
                            />
 | 
			
		||||
                        </label>
 | 
			
		||||
                    </checkbox-group>
 | 
			
		||||
                </view>
 | 
			
		||||
            </uni-col>
 | 
			
		||||
            <uni-col :span="4">
 | 
			
		||||
                <view class="search qualified" @click="onQualified">合格</view>
 | 
			
		||||
            </uni-col>
 | 
			
		||||
            <uni-col :span="4">
 | 
			
		||||
            <!-- <uni-col :span="4">
 | 
			
		||||
                <view class="search reject" @click="handleReject">驳回</view>
 | 
			
		||||
            </uni-col> -->
 | 
			
		||||
            <uni-col :span="4">
 | 
			
		||||
                <view class="search qualified" @click="handleSubmit">提交</view>
 | 
			
		||||
            </uni-col>
 | 
			
		||||
        </uni-row>
 | 
			
		||||
 | 
			
		||||
        <view class="checkbox-group">
 | 
			
		||||
            <checkbox-group @change="onChangeAllChecked">
 | 
			
		||||
                <label>
 | 
			
		||||
                    全选
 | 
			
		||||
                    <checkbox
 | 
			
		||||
                        color="#409eff"
 | 
			
		||||
                        :checked="allChecked"
 | 
			
		||||
                        value="all"
 | 
			
		||||
                    />
 | 
			
		||||
                </label>
 | 
			
		||||
            </checkbox-group>
 | 
			
		||||
        </view>
 | 
			
		||||
 | 
			
		||||
        <scroll-view scroll-y class="scroll-container">
 | 
			
		||||
            <view
 | 
			
		||||
                v-for="(item, index) in detailsList"
 | 
			
		||||
| 
						 | 
				
			
			@ -129,7 +137,7 @@
 | 
			
		|||
import { ref, onUnmounted, computed } from 'vue'
 | 
			
		||||
import { getRepairDetailsAPI, auditRepairPass } from '@/services/repair/repair.js'
 | 
			
		||||
import { onLoad, onShow } from '@dcloudio/uni-app'
 | 
			
		||||
import {repairRejectAPI} from "../../../services/repair/repair";
 | 
			
		||||
import {repairRejectAPI,repairSubmitAPI} from "../../../services/repair/repair";
 | 
			
		||||
const detailsList = ref([])
 | 
			
		||||
// const query = defineProps() // 获取上级页面传递的路由参数
 | 
			
		||||
const taskId = ref('')
 | 
			
		||||
| 
						 | 
				
			
			@ -224,6 +232,20 @@ const onRepairItem = (item) => {
 | 
			
		|||
    } 
 | 
			
		||||
    
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
const handleSubmit = async () => {
 | 
			
		||||
    // 提交逻辑
 | 
			
		||||
    const res = await repairSubmitAPI([{ taskId: taskId.value }])
 | 
			
		||||
    if (res.code === 200) {
 | 
			
		||||
        uni.showToast({
 | 
			
		||||
            title: '提交成功!',
 | 
			
		||||
            icon: 'none',
 | 
			
		||||
        })
 | 
			
		||||
        uni.navigateBack()
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
// 驳回
 | 
			
		||||
const handleReject = async () => {
 | 
			
		||||
  const isSelect = detailsList.value.some((e) => e.isChecked == true)
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -37,8 +37,8 @@
 | 
			
		|||
 | 
			
		||||
        <scroll-view scroll-y @scrolltolower="onScrollTolower" class="scroll-container">
 | 
			
		||||
            <view class="table-list-item" :key="index" @click="handleItem(item)" v-for="(item, index) in tableList">
 | 
			
		||||
                <uni-swipe-action>
 | 
			
		||||
                    <uni-swipe-action-item @click="onClick($event, item)" :right-options="options">
 | 
			
		||||
                <!-- <uni-swipe-action>
 | 
			
		||||
                    <uni-swipe-action-item @click="onClick($event, item)" :right-options="options"> -->
 | 
			
		||||
                  <div class="title">
 | 
			
		||||
                      <div class="title-left">
 | 
			
		||||
                          <span class="code">{{ item.repairCode }}</span>
 | 
			
		||||
| 
						 | 
				
			
			@ -87,8 +87,8 @@
 | 
			
		|||
                                <view class="cont">{{ item.createBy }}</view>
 | 
			
		||||
                            </uni-col>
 | 
			
		||||
                        </uni-row>
 | 
			
		||||
                    </uni-swipe-action-item>
 | 
			
		||||
                </uni-swipe-action>
 | 
			
		||||
                    <!-- </uni-swipe-action-item>
 | 
			
		||||
                </uni-swipe-action> -->
 | 
			
		||||
            </view>
 | 
			
		||||
            <view class="loading-text">
 | 
			
		||||
                {{ finish ? '没有更多数据了~' : '正在加载...' }}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -10,7 +10,7 @@
 | 
			
		|||
            <uni-col :span="4">
 | 
			
		||||
                <view class="search" @click="getDetailsData">查询</view>
 | 
			
		||||
            </uni-col>
 | 
			
		||||
            <uni-col :span="4">
 | 
			
		||||
            <!-- <uni-col :span="4">
 | 
			
		||||
                <view class="search pass-btn" style="background-color: #19be6b" @tap="handleAllPass"
 | 
			
		||||
                    >通过</view
 | 
			
		||||
                >
 | 
			
		||||
| 
						 | 
				
			
			@ -19,9 +19,9 @@
 | 
			
		|||
                <view class="search reject-btn" style="background-color: #ff4949" @tap="handleAllFail"
 | 
			
		||||
                    >驳回</view
 | 
			
		||||
                >
 | 
			
		||||
            </uni-col>
 | 
			
		||||
            </uni-col> -->
 | 
			
		||||
        </uni-row>
 | 
			
		||||
		<view class="checkbox-group">
 | 
			
		||||
		<!-- <view class="checkbox-group">
 | 
			
		||||
		    <checkbox-group @change="onChangeAllChecked">
 | 
			
		||||
		        <label>
 | 
			
		||||
		            全选
 | 
			
		||||
| 
						 | 
				
			
			@ -35,7 +35,7 @@
 | 
			
		|||
		            />
 | 
			
		||||
		        </label>
 | 
			
		||||
		    </checkbox-group>
 | 
			
		||||
		</view>
 | 
			
		||||
		</view> -->
 | 
			
		||||
       <!-- <view class="table-list-item">
 | 
			
		||||
            <checkbox-group @change="onChangeAllChecked">
 | 
			
		||||
                <label>
 | 
			
		||||
| 
						 | 
				
			
			@ -67,7 +67,7 @@
 | 
			
		|||
                </div>
 | 
			
		||||
                <view class="line"></view>
 | 
			
		||||
                <uni-row :gutter="24">
 | 
			
		||||
                    <uni-col :span="2">
 | 
			
		||||
                    <!-- <uni-col :span="2">
 | 
			
		||||
                        <checkbox-group @change="onChangeChecked(item)">
 | 
			
		||||
                            <label>
 | 
			
		||||
                                <checkbox
 | 
			
		||||
| 
						 | 
				
			
			@ -80,7 +80,7 @@
 | 
			
		|||
                                />
 | 
			
		||||
                            </label>
 | 
			
		||||
                        </checkbox-group>
 | 
			
		||||
                    </uni-col>
 | 
			
		||||
                    </uni-col> -->
 | 
			
		||||
                    <uni-col :span="6">物资名称:</uni-col>
 | 
			
		||||
                    <uni-col :span="16">
 | 
			
		||||
                        <view class="cont">{{ item.machineTypeName }}</view>
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue