维修及配件bug修复

This commit is contained in:
hongchao 2025-07-24 15:22:31 +08:00
parent a1e01a635f
commit ffab0a74ae
4 changed files with 84 additions and 27 deletions

View File

@ -10,6 +10,17 @@
<uni-col :span="4"> <uni-col :span="4">
<view class="search" @click="">查询</view> <view class="search" @click="">查询</view>
</uni-col> --> </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"> <uni-col :span="4">
<view class="addBtn" @click="addApply">申请</view> <view class="addBtn" @click="addApply">申请</view>
</uni-col> </uni-col>
@ -17,12 +28,25 @@
<view class="addBtn" @click="goApply()">申请记录</view> <view class="addBtn" @click="goApply()">申请记录</view>
</uni-col> </uni-col>
</uni-row> </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-row :gutter="24" class="search-form">
<uni-col :span="5"> <uni-col :span="5">
<view style="font-size: 24rpx;">物资类型</view> <view style="font-size: 24rpx;">物资类型</view>
</uni-col> </uni-col>
<uni-col :span="19"> <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-content">
<view class="select-box-item" :style="{ color: maId=='' ? 'red':'black' }" @click="getLevelOneList()"> <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"} // {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--------- // --------1---------
// //
const maList = ref([])// const maList = ref([])//
const maId = ref("")//id 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 getLevelOneList = async () => {
const res = await selectPartTreeListApi({level:1}) const res = await selectPartTreeListApi({level:1})
@ -181,7 +215,7 @@ const chosenLevelThree = async(item) => {
}else{ }else{
let index = partList.value.findIndex(v=>v.partId==item.id) let index = partList.value.findIndex(v=>v.partId==item.id)
if(index<0){//添加 if(index<0){//添加
partList.value.push(obj) partList.value.unshift(obj)
}else{// }else{//
uni.showToast({ uni.showToast({
title: '当前领料任务已存在该规格型号!', title: '当前领料任务已存在该规格型号!',
@ -337,6 +371,7 @@ onLoad(() => {
opacity: 0.9; opacity: 0.9;
} }
} }
} }
} }

View File

@ -10,27 +10,35 @@
<uni-col :span="4"> <uni-col :span="4">
<view class="search search-btn" @click="search">查询</view> <view class="search search-btn" @click="search">查询</view>
</uni-col> </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"> <uni-col :span="4">
<view class="search qualified" @click="onQualified">合格</view> <view class="search qualified" @click="onQualified">合格</view>
</uni-col> </uni-col>
<uni-col :span="4"> <!-- <uni-col :span="4">
<view class="search reject" @click="handleReject">驳回</view> <view class="search reject" @click="handleReject">驳回</view>
</uni-col> -->
<uni-col :span="4">
<view class="search qualified" @click="handleSubmit">提交</view>
</uni-col> </uni-col>
</uni-row> </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"> <scroll-view scroll-y class="scroll-container">
<view <view
v-for="(item, index) in detailsList" v-for="(item, index) in detailsList"
@ -129,7 +137,7 @@
import { ref, onUnmounted, computed } from 'vue' import { ref, onUnmounted, computed } from 'vue'
import { getRepairDetailsAPI, auditRepairPass } from '@/services/repair/repair.js' import { getRepairDetailsAPI, auditRepairPass } from '@/services/repair/repair.js'
import { onLoad, onShow } from '@dcloudio/uni-app' import { onLoad, onShow } from '@dcloudio/uni-app'
import {repairRejectAPI} from "../../../services/repair/repair"; import {repairRejectAPI,repairSubmitAPI} from "../../../services/repair/repair";
const detailsList = ref([]) const detailsList = ref([])
// const query = defineProps() // // const query = defineProps() //
const taskId = ref('') 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 handleReject = async () => {
const isSelect = detailsList.value.some((e) => e.isChecked == true) const isSelect = detailsList.value.some((e) => e.isChecked == true)

View File

@ -37,8 +37,8 @@
<scroll-view scroll-y @scrolltolower="onScrollTolower" class="scroll-container"> <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"> <view class="table-list-item" :key="index" @click="handleItem(item)" v-for="(item, index) in tableList">
<uni-swipe-action> <!-- <uni-swipe-action>
<uni-swipe-action-item @click="onClick($event, item)" :right-options="options"> <uni-swipe-action-item @click="onClick($event, item)" :right-options="options"> -->
<div class="title"> <div class="title">
<div class="title-left"> <div class="title-left">
<span class="code">{{ item.repairCode }}</span> <span class="code">{{ item.repairCode }}</span>
@ -87,8 +87,8 @@
<view class="cont">{{ item.createBy }}</view> <view class="cont">{{ item.createBy }}</view>
</uni-col> </uni-col>
</uni-row> </uni-row>
</uni-swipe-action-item> <!-- </uni-swipe-action-item>
</uni-swipe-action> </uni-swipe-action> -->
</view> </view>
<view class="loading-text"> <view class="loading-text">
{{ finish ? '没有更多数据了~' : '正在加载...' }} {{ finish ? '没有更多数据了~' : '正在加载...' }}

View File

@ -10,7 +10,7 @@
<uni-col :span="4"> <uni-col :span="4">
<view class="search" @click="getDetailsData">查询</view> <view class="search" @click="getDetailsData">查询</view>
</uni-col> </uni-col>
<uni-col :span="4"> <!-- <uni-col :span="4">
<view class="search pass-btn" style="background-color: #19be6b" @tap="handleAllPass" <view class="search pass-btn" style="background-color: #19be6b" @tap="handleAllPass"
>通过</view >通过</view
> >
@ -19,9 +19,9 @@
<view class="search reject-btn" style="background-color: #ff4949" @tap="handleAllFail" <view class="search reject-btn" style="background-color: #ff4949" @tap="handleAllFail"
>驳回</view >驳回</view
> >
</uni-col> </uni-col> -->
</uni-row> </uni-row>
<view class="checkbox-group"> <!-- <view class="checkbox-group">
<checkbox-group @change="onChangeAllChecked"> <checkbox-group @change="onChangeAllChecked">
<label> <label>
全选 全选
@ -35,7 +35,7 @@
/> />
</label> </label>
</checkbox-group> </checkbox-group>
</view> </view> -->
<!-- <view class="table-list-item"> <!-- <view class="table-list-item">
<checkbox-group @change="onChangeAllChecked"> <checkbox-group @change="onChangeAllChecked">
<label> <label>
@ -67,7 +67,7 @@
</div> </div>
<view class="line"></view> <view class="line"></view>
<uni-row :gutter="24"> <uni-row :gutter="24">
<uni-col :span="2"> <!-- <uni-col :span="2">
<checkbox-group @change="onChangeChecked(item)"> <checkbox-group @change="onChangeChecked(item)">
<label> <label>
<checkbox <checkbox
@ -80,7 +80,7 @@
/> />
</label> </label>
</checkbox-group> </checkbox-group>
</uni-col> </uni-col> -->
<uni-col :span="6">物资名称</uni-col> <uni-col :span="6">物资名称</uni-col>
<uni-col :span="16"> <uni-col :span="16">
<view class="cont">{{ item.machineTypeName }}</view> <view class="cont">{{ item.machineTypeName }}</view>