优化
This commit is contained in:
@ -44,7 +44,7 @@
|
||||
<el-table-column label="卷册号" align="center" prop="volumeNo" width="150" />
|
||||
<el-table-column label="流程状态" align="center">
|
||||
<template #default="scope">
|
||||
<dict-tag v-if="scope.row.fileId != null" :options="wf_business_status" :value="scope.row.status" />
|
||||
<dict-tag v-if="scope.row.costEstimation > 0" :options="wf_business_status" :value="scope.row.status" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="变更文件" align="center" width="150">
|
||||
@ -64,19 +64,16 @@
|
||||
<dict-tag :options="design_change_reason_type" :value="scope.row.changeReason ? scope.row.changeReason.split(',') : []" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="图纸状态" align="center">
|
||||
<template #default="scope">
|
||||
<dict-tag v-if="scope.row.fileId != null" :options="wf_business_status" :value="scope.row.auditStatus" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="变更内容" align="center" prop="changeContent" width="150" />
|
||||
<el-table-column label="创建时间" align="center" prop="createTime" width="150" />
|
||||
<el-table-column label="备注" align="center" prop="remark" width="200" />
|
||||
<el-table-column label="操作" align="center" fixed="right" width="300">
|
||||
<template #default="scope">
|
||||
<el-button
|
||||
type="primary"
|
||||
link
|
||||
icon="Upload"
|
||||
@click="handleAddChange(scope.row)"
|
||||
v-if="(scope.row.status == 'finish' || scope.row.costEstimation == '0') && scope.row.auditStatus == 'draft'"
|
||||
>上传</el-button
|
||||
>
|
||||
<el-button
|
||||
type="success"
|
||||
link
|
||||
@ -86,8 +83,31 @@
|
||||
@click="handleViewInfo(scope.row)"
|
||||
>查看</el-button
|
||||
>
|
||||
<el-button type="success" link icon="View" v-hasPermi="['design:designChange:query']" @click="handleViewDetail(scope.row)"
|
||||
>通知单</el-button
|
||||
<el-button
|
||||
type="primary"
|
||||
v-if="scope.row.status == 'draft' && scope.row.costEstimation > 0"
|
||||
link
|
||||
icon="plus"
|
||||
v-hasPermi="['design:designChange:query']"
|
||||
@click="handleViewUpdate(scope.row)"
|
||||
>审核通知单</el-button
|
||||
>
|
||||
<el-button
|
||||
v-if="scope.row.status != 'draft'"
|
||||
type="success"
|
||||
link
|
||||
icon="View"
|
||||
v-hasPermi="['design:designChange:query']"
|
||||
@click="handleViewDetail(scope.row)"
|
||||
>查看通知单</el-button
|
||||
>
|
||||
<el-button
|
||||
type="primary"
|
||||
link
|
||||
icon="Upload"
|
||||
@click="handleAddChange(scope.row)"
|
||||
v-if="(scope.row.status == 'finish' || scope.row.costEstimation == '0') && scope.row.auditStatus == 'draft'"
|
||||
>上传图纸</el-button
|
||||
>
|
||||
<el-button
|
||||
type="warning"
|
||||
@ -210,6 +230,17 @@ const handleAdd = () => {
|
||||
});
|
||||
};
|
||||
/** 查看详情 */
|
||||
const handleViewUpdate = (row) => {
|
||||
proxy.$tab.closePage(proxy.$route);
|
||||
proxy.$router.push({
|
||||
path: `/approval/designChange/indexEdit`,
|
||||
query: {
|
||||
id: row.id,
|
||||
type: 'update'
|
||||
}
|
||||
});
|
||||
};
|
||||
/** 查看详情 */
|
||||
const handleViewDetail = (row) => {
|
||||
proxy.$tab.closePage(proxy.$route);
|
||||
proxy.$router.push({
|
||||
|
@ -145,7 +145,7 @@
|
||||
></el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="费用" prop="costEstimation">
|
||||
<el-input v-model="form.costEstimation" type="number" placeholder="请输入费用" /> </el-form-item
|
||||
<el-input min="0" v-model="form.costEstimation" type="number" placeholder="请输入费用" /> </el-form-item
|
||||
></el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="变更费用估算表" label-width="110px" prop="costEstimationFile">
|
||||
@ -348,8 +348,11 @@ const getInfo = () => {
|
||||
loading.value = true;
|
||||
buttonLoading.value = false;
|
||||
nextTick(async () => {
|
||||
const res = await getDesignChange(routeParams.value.id);
|
||||
let id = routeParams.value.id.split('_')[0];
|
||||
const res = await getDesignChange(id);
|
||||
Object.assign(form.value, res.data);
|
||||
console.log(form.value);
|
||||
|
||||
if (form.value.changeReason.length > 0) {
|
||||
form.value.changeReason = form.value.changeReason.split(',');
|
||||
}
|
||||
@ -374,24 +377,26 @@ const submitForm = (status1: string) => {
|
||||
if (form.value.saveFile && form.value.saveFile.length > 0) {
|
||||
saveFile = form.value.saveFile.join(',');
|
||||
}
|
||||
}
|
||||
leaveFormRef.value?.validate(async (valid: boolean) => {
|
||||
if (valid) {
|
||||
buttonLoading.value = true;
|
||||
var res;
|
||||
res = await addDesignChange({ ...form.value, changeReason, saveFile }).finally(() => (buttonLoading.value = false));
|
||||
if (res.code == 200) {
|
||||
if (form.value.costEstimation == '0') {
|
||||
ElMessage.success('通知成功');
|
||||
goBack();
|
||||
leaveFormRef.value?.validate(async (valid: boolean) => {
|
||||
if (valid) {
|
||||
buttonLoading.value = true;
|
||||
var res;
|
||||
res = await addDesignChange({ ...form.value, changeReason, saveFile }).finally(() => (buttonLoading.value = false));
|
||||
if (res.code == 200) {
|
||||
if (form.value.costEstimation == '0') {
|
||||
ElMessage.success('通知成功');
|
||||
goBack();
|
||||
} else {
|
||||
submit(status.value, res.data);
|
||||
}
|
||||
} else {
|
||||
submit(status.value, res.data);
|
||||
ElMessage.error(res.msg);
|
||||
}
|
||||
} else {
|
||||
ElMessage.error(res.msg);
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
} else {
|
||||
submit(status.value, form.value);
|
||||
}
|
||||
};
|
||||
|
||||
const submitFlow = async () => {
|
||||
@ -429,14 +434,15 @@ const submitCallback = async () => {
|
||||
};
|
||||
//审批
|
||||
const approvalVerifyOpen = async () => {
|
||||
submitVerifyRef.value.openDialog(routeParams.value.taskId, true, routeParams.value.businessId);
|
||||
// submitVerifyRef.value.openDialog(routeParams.value.taskId);
|
||||
// submitVerifyRef.value.openDialog(routeParams.value.taskId, true, routeParams.value.businessId);
|
||||
submitVerifyRef.value.openDialog(routeParams.value.taskId);
|
||||
};
|
||||
// 图纸上传成功之后 开始提交
|
||||
const route = useRoute();
|
||||
const router = useRouter();
|
||||
const submit = async (status, data) => {
|
||||
form.value = data;
|
||||
form.value.id = form.value.id + '_audit';
|
||||
if (status === 'draft') {
|
||||
buttonLoading.value = false;
|
||||
proxy?.$modal.msgSuccess('暂存成功');
|
||||
|
Reference in New Issue
Block a user