Browse Source

fix: 报修确认标题

master
songguoqiang 7 months ago
parent
commit
6e4c1771df
  1. 15
      src/pages/repairOrder/index.vue
  2. 45
      src/pages/spotCheckOrder/addForm.vue

15
src/pages/repairOrder/index.vue

@ -2,7 +2,7 @@
<!-- 维修工单 -->
<view class="container">
<u-navbar back-icon-color='#fff' :background="{ background: '#409eff'}" back-text="" title-color='#fff'
:title="title">
:title="params.flag == 2 ? '报修确认' : '维修工单'">
<template v-slot:right v-if="params.flag!='2'">
<u-icon name="plus" color="#fff" size="36" style="padding-right: 30rpx;" @click="addForm"></u-icon>
</template>
@ -80,7 +80,6 @@
pageSize: 10,
type: '',
})
const title = ref('维修工单');
const status = ref('loadmore') //
const list = ref([])
function itemClick(item, index) {
@ -110,14 +109,10 @@
onLoad((option) => {
if (option.type) params.value.type = option.type;
if (option.flag) params.value.flag = option.flag;
if(params.value.flag&&params.value.flag==2){
title.value = "报修确认"
}else{
title.value = "维修工单"
}
nextTick(() => {
//
});
// nextTick(() => {
// //
// if (option.flag) params.value.flag = option.flag;
// });
})
onShow(() => {
params.value.pageNo = 1

45
src/pages/spotCheckOrder/addForm.vue

@ -50,9 +50,27 @@
<view>{{item.equipmentParts}}</view>
</view>
<view class="dec">
<view style="margin-right: 20rpx;">是否符合:</view><u-switch v-model="item.isConform1"></u-switch>
<!-- <view style="margin-right: 20rpx;">是否符合:</view><u-switch v-model="item.isConform1"></u-switch> -->
<u-radio-group v-model="item.isConform" @change="radioGroupChange">
<!-- <u-radio
@change="radioChange"
v-for="(item, index) in list" :key="index"
:name="item.name"
:disabled="item.disabled"
>
{{item.name}}
</u-radio> -->
<u-radio name="TRUE">符合</u-radio>
<u-radio name="FALSE">不符合</u-radio>
</u-radio-group>
</view>
<!-- <view class="dec">
<view style="margin-right: 20rpx;">是否符合:</view>
<input type="radio" v-model="item.isConform1" value="true">
<input type="radio" v-model="item.isConform1" value="false">
</view> -->
</u-col>
</u-row>
</view>
@ -90,6 +108,18 @@
const loading = ref(false)
const type = ref('')
const list = ref([{
name: 'apple',
disabled: false
},
{
name: 'banner',
disabled: false
},
{
name: 'orange',
disabled: false
}])
const form = ref({
describes: "",
deviceNumber: '',
@ -142,6 +172,9 @@
deviceApi.getSubList(data).then((res) => {
if (res.data) {
subList.value = res.data
subList.value.forEach(item=>{
item.isConform = 'TRUE'
})
} else {
proxy.$modal.showToast(`找不到该${type.value=='DEVICE'?'设备' : '模具'}`)
}
@ -166,9 +199,9 @@
proxy.$modal.showToast('该设备无检修项目')
return;
}
subList.value.forEach(item=>{
item.isConform = !item.isConform1 ? 'FALSE' : 'TRUE'
})
// subList.value.forEach(item=>{
// item.isConform = !item.isConform1 ? 'FALSE' : 'TRUE'
// })
const data = {
describes:form.value.describes,
deviceNumber:form.value.deviceNumber,
@ -239,6 +272,10 @@
form.value.maintenances = uni.getStorageSync('user').nickname
})
function radioGroupChange(e) {
console.log(e);
}
</script>
<style lang="scss" scoped>

Loading…
Cancel
Save