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

45
src/pages/spotCheckOrder/addForm.vue

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

Loading…
Cancel
Save