|
|
@@ -174,13 +174,13 @@
|
|
|
@click="handleRepairSuspend(scope.row)"
|
|
|
v-hasPermi="['gxt:repairOrder:suspend']"
|
|
|
><i class="fa fa-stop"></i>挂起</el-button>
|
|
|
-<!-- <el-button-->
|
|
|
-<!-- v-if="(scope.row.workOrderStatus === 'to_finish') && (scope.row.teamLeaderId == userStore.id || userStore.roles.includes('admin'))"-->
|
|
|
-<!-- type="warning"-->
|
|
|
-<!-- link-->
|
|
|
-<!-- @click="handleReturn(scope.row)"-->
|
|
|
-<!-- v-hasPermi="['gxt:repairOrder:return']"-->
|
|
|
-<!-- ><i class="fa fa-sign-in"></i>退回</el-button> <!–结单退回,负责人退回至班长 –>-->
|
|
|
+ <el-button
|
|
|
+ v-if="(scope.row.workOrderStatus === 'to_finish') && (scope.row.teamLeaderId == userStore.id || userStore.roles.includes('admin'))"
|
|
|
+ type="warning"
|
|
|
+ link
|
|
|
+ @click="handleReturn(scope.row)"
|
|
|
+ v-hasPermi="['gxt:repairOrder:return']"
|
|
|
+ ><i class="fa fa-sign-in"></i>退回</el-button> <!--结单退回,负责人退回至班长 -->
|
|
|
<el-button
|
|
|
v-if="scope.row.workOrderStatus === 'return'|| scope.row.workOrderStatus === 'assigned'"
|
|
|
type="warning"
|
|
|
@@ -1267,7 +1267,8 @@
|
|
|
v-model="returnDialogVisible"
|
|
|
:data="returnForm"
|
|
|
:work-order-status-options="gxt_work_order_status"
|
|
|
- :return-type-options="returnForm.workOrderStatus == 'to_finish' ? gxt_return_type : gxt_accept_return_type"
|
|
|
+ :return-type-options="gxt_return_type"
|
|
|
+ :accept-return-type-options="gxt_accept_return_type"
|
|
|
:on-submit="submitReturnFromParent"
|
|
|
@success="handleReturnSuccess"
|
|
|
/>
|
|
|
@@ -2728,12 +2729,13 @@ async function submitFinalizeFromParent(data) {
|
|
|
function handleReturn(row) {
|
|
|
getRepairOrder(row.id).then(response => {
|
|
|
returnForm.value = response.data
|
|
|
- // if (row.workOrderStatus != 'return') {
|
|
|
- returnForm.value.returnType = undefined
|
|
|
+ if (row.workOrderStatus == 'to_finish') {
|
|
|
+ returnForm.value.returnType = '1'
|
|
|
returnForm.value.returnReason = undefined
|
|
|
+ } else {
|
|
|
returnForm.value.acceptReturnType = undefined
|
|
|
returnForm.value.acceptReturnReason = undefined
|
|
|
- // }
|
|
|
+ }
|
|
|
returnDialogVisible.value = true
|
|
|
})
|
|
|
}
|