更新
This commit is contained in:
@ -1,7 +1,8 @@
|
||||
<template>
|
||||
<div class="personCard relative flex mb10 pointer">
|
||||
<div class="cxbq f14 lh50 tc absolute" v-if="props.item.czzt == '03'">已完成</div>
|
||||
<el-button color="#0072ff" size="small" class="btn_qs f14 tc absolute">签收</el-button>
|
||||
<el-button color="#0072ff" size="small" @click="handleQs(props.item)" v-if="props.item.czzt == '01'" class="btn_qs f14 tc absolute">签收</el-button>
|
||||
<el-button color="#0072ff" size="small" v-if="props.item.czzt == '02'" ref="buttonRef" @click.stop="onClickOutside" class="btn_qs f14 tc absolute">反馈</el-button>
|
||||
<div class="avatarBox relative">
|
||||
<div class="marks f12 absolute" :class="changeBg(props.item.yjJb)">
|
||||
<span>{{ changetText(props.item.yjJb) }}</span>
|
||||
@ -31,11 +32,27 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 虚拟触发 -->
|
||||
<el-popover ref="popoverRef" :visible="isShowVisble" :width="400" :virtual-ref="buttonRef" trigger="click" title="反馈" virtual-triggering >
|
||||
<el-form :model="chooseRow" ref="elRowForm" :inline="true" label-width="100px" :rules="rules">
|
||||
<el-form-item label="反馈内容" prop="fknr" style="width: 100%;">
|
||||
<MOSTY.Other style="width: 100%;" clearable v-model="chooseRow.fknr" type="textarea" placeholder="请输入不通过原因"/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div class="flex just-center mt10">
|
||||
<el-button @click.stop="cancelRowSp">取消</el-button>
|
||||
<el-button type="primary" @click.stop="handleSendSp(props.item)" v-loading="btnloading">确定</el-button>
|
||||
</div>
|
||||
</el-popover>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { qcckGet, qcckPost } from "@/api/qcckApi.js";
|
||||
import * as MOSTY from "@/components/MyComponents/index";
|
||||
import { IdCard } from '@/utils/validate.js'
|
||||
import { defineProps } from "vue";
|
||||
import { defineProps ,ref, reactive,getCurrentInstance } from "vue";
|
||||
const { proxy } = getCurrentInstance();
|
||||
const props = defineProps({
|
||||
item: {
|
||||
type: Object,
|
||||
@ -50,6 +67,49 @@ const props = defineProps({
|
||||
default: ""
|
||||
}
|
||||
});
|
||||
|
||||
const buttonRef = ref()
|
||||
const popoverRef = ref()
|
||||
const elRowForm = ref()
|
||||
const isShowVisble = ref(false)
|
||||
const chooseRow = ref({})
|
||||
const rules = reactive({
|
||||
fknr: [{ required: true, message: "请输入反馈内容", trigger: "blur" }],
|
||||
})
|
||||
|
||||
|
||||
const onClickOutside = () => {
|
||||
isShowVisble.value = true;
|
||||
}
|
||||
|
||||
|
||||
// 处理签收
|
||||
const handleQs = (val) =>{
|
||||
proxy.$confirm("是否确定要签收?", "警告", { type: "warning" }).then(() => {
|
||||
qcckPost({id:val.id}, "/mosty-jmxf/tbYjxx/yjqs").then(() => {
|
||||
val.czzt = '02'
|
||||
proxy.$message({ type: "success", message: "签收成功" });
|
||||
});
|
||||
})
|
||||
}
|
||||
|
||||
// 签收
|
||||
const handleSendSp = (val) =>{
|
||||
elRowForm.value.validate((valid) => {
|
||||
if(!valid) return;
|
||||
let data = { id:val.id,...chooseRow.value }
|
||||
qcckPost(data, "/mosty-jmxf/tbYjxx/yjfk").then(() => {
|
||||
val.czzt = '03';
|
||||
proxy.$message({ type: "success", message: "反馈成功" });
|
||||
cancelRowSp()
|
||||
});
|
||||
})
|
||||
}
|
||||
const cancelRowSp = () =>{
|
||||
chooseRow.value.fknr = '';
|
||||
isShowVisble.value = false;
|
||||
}
|
||||
|
||||
// 切换背景
|
||||
const changeBg = (type) => {
|
||||
switch (type) {
|
||||
|
Reference in New Issue
Block a user