|
|
@@ -0,0 +1,154 @@
|
|
|
+<template>
|
|
|
+ <up-modal :show="refuse" title="拒绝说明" showCancelButton @confirm="confirmClose
|
|
|
+ " ref="uModal1" :asyncClose="true">
|
|
|
+ <view style="width: 99%;">
|
|
|
+ <view style="display: flex;align-items: center;margin-bottom: 10px;">
|
|
|
+ 拒绝原因:<picker class="picker" mode="selector" :range="types" range-key="value"
|
|
|
+ @change="changeRefusereason">
|
|
|
+ {{ refusereason || '请选择拒绝原因' }}
|
|
|
+ </picker>
|
|
|
+ </view>
|
|
|
+ <up-textarea v-model="refuseremarks" placeholder="拒绝说明" count></up-textarea>
|
|
|
+ </view>
|
|
|
+ </up-modal>
|
|
|
+
|
|
|
+ <!-- <view class="slot-content">
|
|
|
+ <view class="options-box">
|
|
|
+ 拒绝原因:<view class="option" :class="refusereason == item.value ? 'active' : ''" v-for="item in types"
|
|
|
+ :key="item.value" @click="clickRadio(item.value, 'refusereason')">
|
|
|
+ {{ item.value }}
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ </view> -->
|
|
|
+</template>
|
|
|
+
|
|
|
+<script setup>
|
|
|
+import { getCurrentInstance, ref, defineProps, defineEmits } from 'vue';
|
|
|
+const emit = defineEmits(['callBack'])
|
|
|
+import { onLoad, onShow } from '@dcloudio/uni-app';
|
|
|
+
|
|
|
+const { $Http } = getCurrentInstance().proxy;
|
|
|
+const props = defineProps({
|
|
|
+ callBack: {
|
|
|
+ type: Function
|
|
|
+ }
|
|
|
+});
|
|
|
+
|
|
|
+let refuse = ref(false),
|
|
|
+ types = ref([]),
|
|
|
+ refusereason = ref(""),
|
|
|
+ refuseremarks = ref(""),
|
|
|
+ sa_serviceorderid = 0;
|
|
|
+
|
|
|
+(onLoad(() => {
|
|
|
+ getRefuseType()
|
|
|
+}))
|
|
|
+
|
|
|
+function getRefuseType() {
|
|
|
+ $Http.basic({
|
|
|
+ "classname": "sysmanage.develop.optiontype.optiontype",
|
|
|
+ "method": "optiontypeselect",
|
|
|
+ "content": {
|
|
|
+ "pageNumber": 1,
|
|
|
+ "pageSize": 1000,
|
|
|
+ "typename": "refusereason",
|
|
|
+ }
|
|
|
+ }).then(res => {
|
|
|
+ if (res.code !== 1) return;
|
|
|
+ types.value = res.data;
|
|
|
+ console.log("types", types.value)
|
|
|
+ })
|
|
|
+}
|
|
|
+
|
|
|
+function openRefusefunc(id) {
|
|
|
+ sa_serviceorderid = id;
|
|
|
+ refuse.value = true;
|
|
|
+}
|
|
|
+
|
|
|
+let uModal1 = ref(null);
|
|
|
+
|
|
|
+function confirmClose() {
|
|
|
+ if (refusereason.value == "") {
|
|
|
+ uni.showToast({
|
|
|
+ title: '请选择拒绝原因',
|
|
|
+ icon: 'none'
|
|
|
+ });
|
|
|
+ uModal1.value.loading = false;
|
|
|
+ return;
|
|
|
+ };
|
|
|
+ if (refuseremarks.value.trim() == "") {
|
|
|
+ uni.showToast({
|
|
|
+ title: '请输入拒绝说明',
|
|
|
+ icon: 'none'
|
|
|
+ });
|
|
|
+ uModal1.value.loading = false;
|
|
|
+ return;
|
|
|
+ };
|
|
|
+
|
|
|
+ $Http.basic({
|
|
|
+ "id": 2025072409011703,
|
|
|
+ "content": {
|
|
|
+ sa_serviceorderid,
|
|
|
+ "refusereason": refusereason.value,
|
|
|
+ "refuseremarks": refuseremarks.value
|
|
|
+ }
|
|
|
+ }).then(res => {
|
|
|
+ console.log("拒绝受理", res)
|
|
|
+ uni.showToast({ title: res.code !== 1 ? res.msg : '已拒绝受理', icon: 'none' });
|
|
|
+ if (res.code !== 1) return uModal1.value.loading = false;
|
|
|
+ types.value = res.data;
|
|
|
+ refuse.value = false;
|
|
|
+ emit('callBack', {
|
|
|
+ status: 'refused'
|
|
|
+ });
|
|
|
+ })
|
|
|
+}
|
|
|
+
|
|
|
+function changeRefusereason(e) {
|
|
|
+ let index = e.detail.value;
|
|
|
+ refusereason.value = types.value[index].value;
|
|
|
+}
|
|
|
+
|
|
|
+defineExpose({
|
|
|
+ openRefusefunc
|
|
|
+});
|
|
|
+</script>
|
|
|
+
|
|
|
+<style scoped lang="scss">
|
|
|
+.options-box {
|
|
|
+ position: relative;
|
|
|
+ top: -6rpx;
|
|
|
+ display: flex;
|
|
|
+ flex-wrap: wrap;
|
|
|
+ width: 100%;
|
|
|
+ box-sizing: border-box;
|
|
|
+
|
|
|
+ .option {
|
|
|
+ border: 1px solid #dadbde;
|
|
|
+ border-radius: 8rpx;
|
|
|
+ padding: 10rpx 20rpx;
|
|
|
+ margin-right: 18rpx;
|
|
|
+ margin-top: 12rpx;
|
|
|
+ transition: background-color 0.3s, color 0.3s, border-color 0.3s;
|
|
|
+ text-align: center;
|
|
|
+ min-width: 80rpx;
|
|
|
+ }
|
|
|
+
|
|
|
+ .active {
|
|
|
+ background: #006EF7;
|
|
|
+ color: #fff;
|
|
|
+ border-color: #006EF7;
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+.picker {
|
|
|
+ font-size: 28rpx;
|
|
|
+ color: #606266;
|
|
|
+ padding: 9px;
|
|
|
+ border-radius: 8rpx;
|
|
|
+ border: 2rpx solid #2979FF;
|
|
|
+ color: #2979FF;
|
|
|
+ margin-left: 6rpx;
|
|
|
+ box-sizing: border-box;
|
|
|
+}
|
|
|
+</style>
|