|
|
@ -20,8 +20,9 @@ |
|
|
|
<view>处理状态:</view> |
|
|
|
<view> |
|
|
|
<u-tag text="待处理" type="warning" mode="light" shape="circle" v-if="item.status==1" :style="{ width: '65px' }" /> |
|
|
|
<!-- <u-tag text="处理中" type="primary" mode="light" shape="circle" v-if="item.status==2" :style="{ width: '65px' }" /> --> |
|
|
|
<u-tag text="已完成" type="success" mode="light" shape="circle" v-if="item.status==2" :style="{ width: '65px' }" /> |
|
|
|
<u-tag text="处理中" type="primary" mode="light" shape="circle" v-if="item.status==2" :style="{ width: '65px' }" /> |
|
|
|
<u-tag text="已完成" type="success" mode="light" shape="circle" v-if="item.status==3" :style="{ width: '65px' }" /> |
|
|
|
<u-tag text="已终止" type="error" mode="light" shape="circle" v-if="item.status==-1" :style="{ width: '65px' }" /> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<view class="dec"> |
|
|
@ -43,17 +44,11 @@ |
|
|
|
<view>返修结果:</view><view>{{item.reworkResult}}</view> |
|
|
|
</view> |
|
|
|
<view class="dec"> |
|
|
|
<view v-if="item.status==1"> |
|
|
|
<u-button size="medium" type="primary" @click="handleItem(item)" >去处理</u-button> |
|
|
|
</view> |
|
|
|
<view v-if="item.status==2"> |
|
|
|
<u-button size="medium" type="error" @click="handleRefuse(item)" >退回</u-button> |
|
|
|
<!-- <u-button size="medium" type="warning" @click="handleSuspend(item)" >终止</u-button> |
|
|
|
<u-button size="medium" type="success" @click="handleSuccess(item)" >完成</u-button> --> |
|
|
|
</view> |
|
|
|
<view v-if="item.status==3"> |
|
|
|
<u-button size="medium" type="error" @click="handleRefuse(item)" >退回</u-button> |
|
|
|
</view> |
|
|
|
<u-button v-if="item.status==1" class="btn" size="medium" type="primary" @click="handleItem(item)" >去处理</u-button> |
|
|
|
<u-button v-if="item.status==2" class="btn" size="medium" type="warning" @click="handleRefuse(item)" >退回</u-button> |
|
|
|
<u-button v-if="item.status==2" class="btn" size="medium" type="error" @click="handleSuspend(item)" >终止</u-button> |
|
|
|
<u-button v-if="item.status==2" class="btn" size="medium" type="success" @click="handleSuccess(item)" >完成</u-button> |
|
|
|
<u-button v-if="item.status==3" class="btn" size="medium" type="warning" @click="handleRefuse(item)" >退回</u-button> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<view style="height: 94rpx;padding-top: 30rpx;"> |
|
|
@ -90,8 +85,8 @@ |
|
|
|
import * as reworkSingleApi from "@/api/mes/reworkSingle/reworkSingleApi.ts" |
|
|
|
const { proxy } = getCurrentInstance() |
|
|
|
const paramData = ref() |
|
|
|
// const tabsList = ref([{name:'待返修'},{name:'返修中'},{name:'已完成'}]) |
|
|
|
const tabsList = ref([{name:'待处理'},{name:'已完成'}]) |
|
|
|
const tabsList = ref([{name:'待返修'},{name:'返修中'},{name:'已完成'},{name:'已终止'}]) |
|
|
|
// const tabsList = ref([{name:'待处理'},{name:'已完成'}]) |
|
|
|
const reworkPersoncode = ref() |
|
|
|
const showType = ref(false) |
|
|
|
const current = ref(0) |
|
|
@ -131,21 +126,22 @@ |
|
|
|
} |
|
|
|
// “去处理”按钮提交事件 |
|
|
|
function handleReceive(){ |
|
|
|
if(reworkPersoncode.value != '' && reworkPersoncode.value.trim() != ''){ |
|
|
|
if(reworkPersoncode.value == '' && reworkPersoncode.value.trim() == ''){ |
|
|
|
proxy.$modal.showToast('请输入返修人员') |
|
|
|
reworkPersoncode.value = null |
|
|
|
return; |
|
|
|
} |
|
|
|
else{ |
|
|
|
paramData.value.reworkPersoncode=reworkPersoncode.value |
|
|
|
changeStatus(2) |
|
|
|
showType.value = false |
|
|
|
} |
|
|
|
else{ |
|
|
|
proxy.$modal.showToast('请输入返修人员') |
|
|
|
reworkPersoncode.value = null |
|
|
|
} |
|
|
|
} |
|
|
|
// 终止按钮提交事件 |
|
|
|
function handleSuspend(index){ |
|
|
|
proxy.$modal.confirm('确定提交吗').then(() => { |
|
|
|
paramData.value = index |
|
|
|
changeStatus(1) |
|
|
|
changeStatus(-1) |
|
|
|
}) |
|
|
|
} |
|
|
|
// 完成按钮提交事件 |
|
|
@ -165,8 +161,8 @@ |
|
|
|
|
|
|
|
// 状态变更通用方法 |
|
|
|
function changeStatus(val){ |
|
|
|
paramData.value.status = val |
|
|
|
proxy.$modal.loading('加载中') |
|
|
|
paramData.value.status = val |
|
|
|
reworkSingleApi.update(paramData.value).then((res) => { |
|
|
|
proxy.$modal.closeLoading() |
|
|
|
if (res.data) { |
|
|
@ -188,8 +184,13 @@ |
|
|
|
} |
|
|
|
|
|
|
|
function tabsChange(curr){ |
|
|
|
current.value = curr |
|
|
|
if(curr == 3 ){ |
|
|
|
params.value.status = -1 |
|
|
|
}else{ |
|
|
|
|
|
|
|
params.value.status = (curr + 1) |
|
|
|
} |
|
|
|
current.value = curr |
|
|
|
params.value.pageNo = 1 |
|
|
|
params.value.pageSize = 5 |
|
|
|
list.value = [] |
|
|
@ -228,6 +229,10 @@ |
|
|
|
</script> |
|
|
|
|
|
|
|
<style lang="scss" scoped> |
|
|
|
.btn{ |
|
|
|
margin-left:5px; |
|
|
|
width:20px |
|
|
|
} |
|
|
|
.container{ |
|
|
|
background: #f5f5f5; |
|
|
|
min-height: 100vh; |
|
|
|