究极更新
This commit is contained in:
parent
49d5c9ab6f
commit
e35c1d64d3
@ -35,6 +35,7 @@
|
||||
:key="index" />
|
||||
</el-steps>
|
||||
</el-descriptions-item>
|
||||
|
||||
<div v-if="formData?.current_check_user_ids?.includes(String(userInfo.id))">
|
||||
<el-descriptions-item label="操作" label-align="left" align="left">
|
||||
<el-form-item label="意见">
|
||||
@ -52,6 +53,9 @@
|
||||
</div>
|
||||
<el-descriptions-item label="操作" label-align="left" align="left"
|
||||
v-if="formData?.check_status == 0 && formData.create_user == userInfo.id">
|
||||
<el-form-item label="意见">
|
||||
<el-input v-model="remark" clearable placeholder="请输入" type="textarea" />
|
||||
</el-form-item>
|
||||
<el-button @click="revokeFn">
|
||||
撤销
|
||||
</el-button>
|
||||
@ -62,7 +66,6 @@
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup name="projectEdit">
|
||||
import Popup from '@/components/popup/index.vue'
|
||||
import { Avatar, Clock } from '@element-plus/icons-vue'
|
||||
import { flowapproveDetail, flowapproveCheck, flowapproveRevoke } from '@/api/approve.ts'
|
||||
import { defineProps } from "vue"
|
||||
@ -76,7 +79,7 @@ const props = defineProps({
|
||||
let activeStep = ref(0)
|
||||
const remark = ref('')
|
||||
|
||||
const emit = defineEmits(['success', 'close'])
|
||||
const emit = defineEmits(['off'])
|
||||
const popupRef = shallowRef<InstanceType<typeof Popup>>()
|
||||
|
||||
// 表单数据
|
||||
@ -133,20 +136,23 @@ const open = () => {
|
||||
|
||||
|
||||
// 撤销申请
|
||||
const revokeFn = () => {
|
||||
flowapproveRevoke({
|
||||
const revokeFn = async () => {
|
||||
await flowapproveRevoke({
|
||||
id: props.approve_id,
|
||||
revoke_reason: remark.value
|
||||
})
|
||||
emit('off')
|
||||
|
||||
}
|
||||
|
||||
// 审核操作
|
||||
const checkFn = (i: Number) => {
|
||||
flowapproveCheck({
|
||||
const checkFn = async (i: Number) => {
|
||||
await flowapproveCheck({
|
||||
id: props.approve_id,
|
||||
check_status: i,
|
||||
check_reason: remark.value
|
||||
})
|
||||
emit('off')
|
||||
}
|
||||
|
||||
const getStep = (item: Object, index: Number) => {
|
||||
|
@ -7,19 +7,11 @@
|
||||
</template>
|
||||
<div>
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="审批分类">
|
||||
<el-select class="flex-1" v-model="formData.flow_type" clearable placeholder="请选择所属分类"
|
||||
@change="getFlowTypeList">
|
||||
<el-option v-for="(item, index) in flowTyprList" :key="index" :label="item.title"
|
||||
:value="(item.id)" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="8">
|
||||
<el-form-item label="审批流程" prop="flow_cate">
|
||||
<el-select class="flex-1" v-model="formData.flow_path" :disabled="!formData.flow_type" clearable
|
||||
@change="getDetail" placeholder="请选择审批类型">
|
||||
<el-select class="flex-1" v-model="formData.flow_path" clearable @change="getDetail"
|
||||
placeholder="请选择审批类型">
|
||||
<el-option v-for="(item, index) in flowTypeList" :key="index" :label="item.name"
|
||||
:value="parseInt(item.id)" />
|
||||
</el-select>
|
||||
@ -45,7 +37,7 @@
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-button @click="submit" type="primary">
|
||||
<el-button @click="submit" type="primary" :disabled="!formData.flow_path">
|
||||
提交
|
||||
</el-button>
|
||||
</el-row>
|
||||
@ -54,61 +46,72 @@
|
||||
</el-card>
|
||||
</template>
|
||||
<script setup>
|
||||
import { ref, reactive, defineProps } from 'vue'
|
||||
import { apiFlowTypeLists, } from '@/api/flow_type'
|
||||
import { apiFlowLists, apiFlowDetail, apiFlowDelete } from '@/api/flow'
|
||||
import { ref, reactive, defineProps, defineEmits } from 'vue'
|
||||
import { apiFlowLists, apiFlowDetail, } from '@/api/flow'
|
||||
import { useRoute } from "vue-router"
|
||||
|
||||
const route = useRoute()
|
||||
const emits = defineEmits(["confirm"]);
|
||||
const props = defineProps({
|
||||
id: Number
|
||||
})
|
||||
|
||||
const emit = defineEmits(['off'])
|
||||
|
||||
|
||||
const formData = reactive({
|
||||
flow_type: "",
|
||||
flow_path: "",
|
||||
path: route.path
|
||||
})
|
||||
|
||||
const flowTyprList = ref([])
|
||||
const getFlowtypeList = async () => {
|
||||
let res = await apiFlowTypeLists()
|
||||
flowTyprList.value = res.lists
|
||||
}
|
||||
|
||||
// 获取对应审批类型
|
||||
const flowTypeList = ref([])
|
||||
|
||||
// 审批流程
|
||||
const flowTypeList = ref([{
|
||||
"id": 1,
|
||||
"name": "fgfdgd",
|
||||
"flow_cate": "1212",
|
||||
"check_type": "固定审批流",
|
||||
"remark": "vcggfhfghfg",
|
||||
"status": "启用",
|
||||
"flow_type": "财务",
|
||||
"org_name": "海之农",
|
||||
"dept_name": "技术部,张伟自己的部门"
|
||||
}])
|
||||
|
||||
|
||||
const getFlowTypeList = async () => {
|
||||
if (!formData.flow_type) return
|
||||
formData.flow_path = ''
|
||||
flowTypeList.value = []
|
||||
let res = await apiFlowLists({
|
||||
flow_cate: formData.flow_type,
|
||||
status: 2
|
||||
})
|
||||
Object.assign(flowTypeList.value, res.lists)
|
||||
|
||||
// let res = await apiFlowLists({ id: 1 })
|
||||
// flowTypeList.value = res
|
||||
|
||||
}
|
||||
|
||||
|
||||
// 获取流程详情
|
||||
const flowDetail = ref({})
|
||||
const getDetail = async () => {
|
||||
let res = await apiFlowDetail({ id: formData.flow_path })
|
||||
flowDetail.value = res
|
||||
//
|
||||
emits("confirm", formData);
|
||||
}
|
||||
|
||||
// 流程说明
|
||||
const getDescr = (item) => { return item.flow_step == 1 ? "当前部门负责人" : (item.flow_user.map(val => ([val.name]))).join(',') }
|
||||
|
||||
// 提交审批
|
||||
const submit = () => {
|
||||
const submit = async () => {
|
||||
// await apiFlowLists({
|
||||
// id: props.id,
|
||||
// as: { ...formData }
|
||||
// })
|
||||
emit('off')
|
||||
|
||||
|
||||
}
|
||||
|
||||
getFlowtypeList()
|
||||
|
||||
const numberToChinese = (num) => {
|
||||
let chineseNum = ["零", "一", "二", "三", "四", "五", "六", "七", "八", "九", "十"];
|
||||
return chineseNum[num];
|
||||
}
|
||||
getFlowTypeList()
|
||||
</script>
|
@ -112,18 +112,16 @@
|
||||
<el-table-column label="报价金额" prop="sale_amount" show-overflow-tooltip />
|
||||
</el-table>
|
||||
</el-row>
|
||||
<!-- <flowProcess></flowProcess> -->
|
||||
<!-- <flowDetail :approve_id="formData?.approve_id" /> -->
|
||||
<flowProcess v-if="false" :id="formData?.id" @off="handleClose"></flowProcess>
|
||||
<flowDetail :approve_id="formData?.approve_id" @off="handleClose" v-else />
|
||||
|
||||
</popup>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup name="customdetail">
|
||||
import type { FormInstance } from 'element-plus'
|
||||
import Popup from '@/components/popup/index.vue'
|
||||
import { apiCustomDetail } from '@/api/custom'
|
||||
import { timeFormat } from '@/utils/util'
|
||||
import { apiBidDocumentExaminationDetailLists } from '@/api/bid_document_examination_detail'
|
||||
import type { PropType } from 'vue'
|
||||
defineProps({
|
||||
@ -133,33 +131,16 @@ defineProps({
|
||||
}
|
||||
})
|
||||
const emit = defineEmits(['success', 'close'])
|
||||
const formRef = shallowRef<FormInstance>()
|
||||
const popupRef = shallowRef<InstanceType<typeof Popup>>()
|
||||
const productList = ref([])
|
||||
const total = ref('')
|
||||
const datas = reactive({
|
||||
provinceOptions: [],
|
||||
cityOptions: [],
|
||||
areaOptions: [],
|
||||
});
|
||||
|
||||
const pager1 = reactive({
|
||||
page_size: 10,
|
||||
page_no: 1,
|
||||
bid_document_examination_id: ""
|
||||
})
|
||||
//条数
|
||||
const handleSizeChange1 = (val: number) => {
|
||||
|
||||
pager1.page_size = val
|
||||
productLists()
|
||||
}
|
||||
|
||||
//分页
|
||||
const handleCurrentChange1 = (val: number) => {
|
||||
|
||||
pager1.page_no = val
|
||||
productLists()
|
||||
}
|
||||
|
||||
// 解决方案列表
|
||||
const productLists = () => {
|
||||
@ -179,19 +160,9 @@ const formData = reactive({
|
||||
|
||||
// 获取详情
|
||||
const setFormData = async (data: Record<any, any>) => {
|
||||
// for (const key in formData) {
|
||||
// if (data[key] != null && data[key] != undefined) {
|
||||
// //@ts-ignore
|
||||
// formData[key] = data[key]
|
||||
|
||||
// }
|
||||
|
||||
// }
|
||||
pager1.bid_document_examination_id = data.id
|
||||
Object.assign(formData, data)
|
||||
productLists()
|
||||
// console.log(formData, '2222222222')
|
||||
|
||||
|
||||
}
|
||||
|
||||
@ -211,7 +182,6 @@ const handleSubmit = async () => {
|
||||
|
||||
//打开弹窗
|
||||
const open = () => {
|
||||
console.log('1111111')
|
||||
popupRef.value?.open()
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user