Browse Source

检查预约:检查事项+检查要求全换成下来选项

master
蟑螂恶霸 3 years ago
parent
commit
78cbaccc7a
  1. 42
      src/views/administrative/appointment.vue

42
src/views/administrative/appointment.vue

@ -43,15 +43,17 @@
required
label="检查事项"
:rules="[{ required: true, message: '必填项' }]"
@click="data.showGA = true"
@click="data.showItem = true"
/>
<van-field v-model="submitData.checkItem" v-show="false" />
<van-field
v-model="submitData.checkRequire"
v-model="data.checkRequireText"
required
label="检查要求"
:rules="[{ required: true, message: '必填项' }]"
@click="data.showGA = true"
/>
<van-field v-model="submitData.checkRequire" v-show="false" />
<van-field
v-model="submitData.lawEnforcement"
readonly
@ -96,7 +98,7 @@
<!-- </div>-->
<van-popup v-model:show="data.showLawEnforcerFlag" position="bottom" :style="{ height: '30%' }" />
<Popup :visible="data.popupVisible" :content="data.popupContent" @close="closePopup" @reciveData="reciveData" />
<UserPopup :visible="data.popupVisible" :content="data.popupContent" @close="closePopup" @reciveData="reciveVisible" />
<van-popup v-model:show="data.showTimePicker" position="bottom" :style="{ height: '30%' }" >
<van-date-picker
@ -105,12 +107,18 @@
@cancel="data.showTimePicker = false"
/>
</van-popup>
<van-popup v-model:show="data.showItem" position="bottom" :style="{ height: '30%' }">
<van-picker title="事项"
:columns="data.item_columns"
@confirm="itemConfirm"
@cancel="gaCancel"
/>
</van-popup>
<van-popup v-model:show="data.showGA" position="bottom" :style="{ height: '30%' }">
<van-picker title="要求"
:columns="data.ga_columns"
@confirm="gaConfirm"
@cancel="gaCancel"
@change="gaChange"
/>
</van-popup>
</div>
@ -126,7 +134,7 @@ import { reactive, ref } from "vue";
import { getDict } from "../../api/Home";
import {uploadFile} from "../../util/fileUpload";
//用户筛选弹窗
import Popup from './userFilter.vue';
import UserPopup from './userFilter.vue';
const { useMy, useCommon, useShopCard } = $globalStore;
const router = useRouter();
@ -137,8 +145,11 @@ const data = reactive({
popupVisible: false,
popupContent: '',
showGA:false,
showItem:false,
checkItemText:"",
checkRequireText: "",
ga_columns: [],
item_columns: [],
});
//保存参数
const submitData = reactive({
@ -197,21 +208,29 @@ const showPopup = () =>{
const closePopup = () =>{
data.popupVisible = false;
}
const reciveData = (item) =>{
const reciveVisible = (item) =>{
submitData.lawEnforcerTwo = item.userName;
submitData.lawEnforcerIdTwo = item.userId;
}
/* 检查要求 start */
const gaConfirm = ({ selectedOptions }) => {
data.checkRequireText = selectedOptions[0].text;
submitData.checkRequire = selectedOptions[0].value;
data.showGA = false;
data.showItem = false;
};
/* 检查要求 start */
const itemConfirm = ({ selectedOptions }) => {
data.checkItemText = selectedOptions[0].text;
submitData.checkItem = selectedOptions[0].value;
data.showGA = false;
};
const gaChange = ({ selectedValues }) => {
data.showItem = false;
};
const gaCancel = () => {
data.showGA = false;
data.showItem = false;
}
/* 检查要求 end */
@ -252,6 +271,13 @@ onMounted(() =>{
data.ga_columns.push({ text: success.data[i].dictLabel, value: success.data[i].dictValue })
}
},error=>{});
// 查询检查要求字典信息
getDict({"dictType": "checkItem"}, success => {
for(var i=0; i<success.data.length; i++) {
data.item_columns.push({ text: success.data[i].dictLabel, value: success.data[i].dictValue })
}
},error=>{});
})
const reciveData = (item) =>{

Loading…
Cancel
Save