更新
This commit is contained in:
@ -1,7 +1,8 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="personCard relative flex mb10 pointer">
|
<div class="personCard relative flex mb10 pointer">
|
||||||
<div class="cxbq f14 lh50 tc absolute" v-if="props.item.czzt == '03'">已完成</div>
|
<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="avatarBox relative">
|
||||||
<div class="marks f12 absolute" :class="changeBg(props.item.yjJb)">
|
<div class="marks f12 absolute" :class="changeBg(props.item.yjJb)">
|
||||||
<span>{{ changetText(props.item.yjJb) }}</span>
|
<span>{{ changetText(props.item.yjJb) }}</span>
|
||||||
@ -31,11 +32,27 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</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>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
|
import { qcckGet, qcckPost } from "@/api/qcckApi.js";
|
||||||
|
import * as MOSTY from "@/components/MyComponents/index";
|
||||||
import { IdCard } from '@/utils/validate.js'
|
import { IdCard } from '@/utils/validate.js'
|
||||||
import { defineProps } from "vue";
|
import { defineProps ,ref, reactive,getCurrentInstance } from "vue";
|
||||||
|
const { proxy } = getCurrentInstance();
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
item: {
|
item: {
|
||||||
type: Object,
|
type: Object,
|
||||||
@ -50,6 +67,49 @@ const props = defineProps({
|
|||||||
default: ""
|
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) => {
|
const changeBg = (type) => {
|
||||||
switch (type) {
|
switch (type) {
|
||||||
|
@ -45,7 +45,8 @@
|
|||||||
<!-- 操作 -->
|
<!-- 操作 -->
|
||||||
<template #controls="{ row }">
|
<template #controls="{ row }">
|
||||||
<el-link size="small" type="success" @click="addEdit('edit', row)">编辑</el-link>
|
<el-link size="small" type="success" @click="addEdit('edit', row)">编辑</el-link>
|
||||||
<el-popover placement="left" :visible="row.visible" :width="400" trigger="click">
|
|
||||||
|
<!-- <el-popover placement="left" :visible="row.visible" :width="400" trigger="click">
|
||||||
<template #reference>
|
<template #reference>
|
||||||
<el-link size="small" type="primary" @click.stop="handleSh(row)">审核</el-link>
|
<el-link size="small" type="primary" @click.stop="handleSh(row)">审核</el-link>
|
||||||
</template>
|
</template>
|
||||||
@ -70,7 +71,7 @@
|
|||||||
<el-button size="small" @click.stop="cancel(row)">取消</el-button>
|
<el-button size="small" @click.stop="cancel(row)">取消</el-button>
|
||||||
<el-button size="small" type="primary" @click.stop="handleSumbit(row)">确定</el-button>
|
<el-button size="small" type="primary" @click.stop="handleSumbit(row)">确定</el-button>
|
||||||
</div>
|
</div>
|
||||||
</el-popover>
|
</el-popover> -->
|
||||||
|
|
||||||
<el-link size="small" type="danger" @click="delDictItem(row.id)">删除</el-link>
|
<el-link size="small" type="danger" @click="delDictItem(row.id)">删除</el-link>
|
||||||
<!-- 续报 == 编辑 -->
|
<!-- 续报 == 编辑 -->
|
||||||
|
Reference in New Issue
Block a user