|
@@ -36,7 +36,7 @@
|
|
|
|
|
|
<div style="display: flex;">
|
|
|
<el-button type="danger" size="small" icon="Position" v-show="form.status ==3"
|
|
|
- @click="changeStauts4" v-hasPermi="['business:invoice:reverseAudit']">反审核</el-button>
|
|
|
+ @click="uauditFlag = true" v-hasPermi="['business:invoice:reverseAudit']">反审核</el-button>
|
|
|
</div>
|
|
|
|
|
|
</el-button-group>
|
|
@@ -57,6 +57,7 @@
|
|
|
</div>
|
|
|
<div class="Y-scrollbar" style="position: absolute; top: 32px; bottom: 0; width: 100%; overflow: auto">
|
|
|
</div>
|
|
|
+
|
|
|
<el-form ref="invoiceRef" class="master-container" :model="form" :rules="rules" label-width="170px">
|
|
|
<el-row :gutter="30">
|
|
|
<el-col :span="12">
|
|
@@ -235,6 +236,17 @@
|
|
|
|
|
|
</el-row>
|
|
|
</el-form>
|
|
|
+ <el-table :data="tableData" style="width: 800px; display: flex; margin: 0 auto auto auto;">
|
|
|
+ <el-table-column type="index" width="50" />
|
|
|
+ <el-table-column prop="createTime" label="操作时间" width="180" />
|
|
|
+ <el-table-column prop="nickName" label="操作人" width="180" />
|
|
|
+ <el-table-column prop="invoiceStatus" label="操作内容" >
|
|
|
+ <template #default="scope">
|
|
|
+ {{statusFormat(scope.row.invoiceStatus)}}
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="remark" label="说明" />
|
|
|
+ </el-table>
|
|
|
</div>
|
|
|
</el-drawer>
|
|
|
|
|
@@ -261,8 +273,8 @@
|
|
|
<el-form ref="formRef" :model="form" :rules="returnRules" label-width="100px">
|
|
|
<el-row :gutter="30">
|
|
|
<el-col :span="12">
|
|
|
- <el-form-item label="退回原因" prop="refuseReason">
|
|
|
- <el-input :autosize="{ minRows: 2, maxRows: 4 }" type="textarea" v-model="form.refuseReason"
|
|
|
+ <el-form-item label="退回原因" prop="returnReason">
|
|
|
+ <el-input :autosize="{ minRows: 2, maxRows: 4 }" type="textarea" v-model="form.returnReason"
|
|
|
placeholder="请输入退回原因" size="small" />
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
@@ -273,7 +285,23 @@
|
|
|
<el-button @click="returnFlag = false">取 消</el-button>
|
|
|
</template>
|
|
|
</el-dialog>
|
|
|
-
|
|
|
+ <el-dialog title="反审核原因" v-model="uauditFlag" width="620px" append-to-body draggable
|
|
|
+ :close-on-click-modal="false">
|
|
|
+ <el-form ref="formRef" :model="form" :rules="uauditRules" label-width="100px">
|
|
|
+ <el-row :gutter="30">
|
|
|
+ <el-col :span="12">
|
|
|
+ <el-form-item label="反审核原因" prop="uauditReason">
|
|
|
+ <el-input :autosize="{ minRows: 2, maxRows: 4 }" type="textarea" v-model="form.uauditReason"
|
|
|
+ placeholder="请输入退回原因" size="small" />
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ </el-form>
|
|
|
+ <template #footer>
|
|
|
+ <el-button type="primary" @click="changeStauts4">确 定</el-button>
|
|
|
+ <el-button @click="uauditFlag = false">取 消</el-button>
|
|
|
+ </template>
|
|
|
+ </el-dialog>
|
|
|
<el-dialog title="开票审核通过" v-model="passFlag" width="70%" append-to-body draggable :close-on-click-modal="false">
|
|
|
<el-form ref="formRef" :model="form" :rules="passRules" label-width="100px">
|
|
|
<el-row :gutter="30">
|
|
@@ -345,11 +373,11 @@
|
|
|
</div>
|
|
|
</template>
|
|
|
<script setup>
|
|
|
- import { getInvoice, getCollectionToAmount, addInvoice, getInfoByName, updateInvoice } from "@/api/business/invoice";
|
|
|
+ import { getInvoice, getCollectionToAmount, addInvoice, getInfoByName, updateInvoice,getRecordList} from "@/api/business/invoice";
|
|
|
import { getInfoByTenantId } from "@/api/business/info";
|
|
|
import DialogContractChoice from "./ContractChoice";
|
|
|
import { getToken, getTenant } from "@/utils/auth";
|
|
|
- import contractForm from "@/views/business/crm/order/form.vue";
|
|
|
+ import contractForm from "@/views/business/crm/order/formView.vue";
|
|
|
import dragUpload from "@/components/dragUpload"
|
|
|
import useUserStore from "@/store/modules/user";
|
|
|
import { uploadFile } from "@/api/tool/file";
|
|
@@ -374,10 +402,12 @@
|
|
|
const refuseFlag = ref(false)
|
|
|
const returnFlag = ref(false)
|
|
|
const passFlag = ref(false)
|
|
|
+ const uauditFlag = ref(false)
|
|
|
const editStatus = ref(false)
|
|
|
const allowAmount = ref(0)
|
|
|
const fileList = ref([]);
|
|
|
const isFullscreen = ref(false)
|
|
|
+ const tableData = ref([]);
|
|
|
const webHost = import.meta.env.VITE_APP_BASE_API
|
|
|
const data = reactive({
|
|
|
form: {},
|
|
@@ -395,7 +425,7 @@
|
|
|
invoiceType: [{ required: true, trigger: "change", message: "请选择发票类型" }],
|
|
|
},
|
|
|
returnRules: {
|
|
|
- refuseReason: [{ required: true, trigger: "blur", message: "请输入退回原因" }],
|
|
|
+ returnReason: [{ required: true, trigger: "blur", message: "请输入退回原因" }],
|
|
|
},
|
|
|
refuseRules: {
|
|
|
refuseReason: [{ required: true, trigger: "blur", message: "请输入拒绝原因" }],
|
|
@@ -403,9 +433,12 @@
|
|
|
passRules: {
|
|
|
evidenceFile: [{ required: true, trigger: "blur", message: "请上传图片" }],
|
|
|
invoiceTime: [{ required: true, trigger: "change", message: "请选择开票时间" }],
|
|
|
- }
|
|
|
+ },
|
|
|
+ uauditRules: {
|
|
|
+ uauditReason: [{ required: true, trigger: "blur", message: "请输入反审核原因" }],
|
|
|
+ },
|
|
|
});
|
|
|
- const { form, rules, returnRules, refuseRules, passRules } = toRefs(data);
|
|
|
+ const { form, rules, returnRules, refuseRules, passRules,uauditRules } = toRefs(data);
|
|
|
/*********************** 方法区 ****************************/
|
|
|
/** 打开抽屉 */
|
|
|
function open(id) {
|
|
@@ -421,11 +454,15 @@
|
|
|
allowAmount.value = res.data
|
|
|
})
|
|
|
})
|
|
|
+ getRecordList(id).then((res)=>{
|
|
|
+ tableData.value = res.rows;
|
|
|
+ });
|
|
|
} else {
|
|
|
editStatus.value = true
|
|
|
title.value = "添加发票信息"
|
|
|
getCodeInfo()
|
|
|
}
|
|
|
+
|
|
|
}
|
|
|
function openEvidience() {
|
|
|
|
|
@@ -534,7 +571,7 @@
|
|
|
});
|
|
|
}
|
|
|
function changeStauts2() {
|
|
|
- if (form.value.refuseReason === "" || form.value.refuseReason == null) {
|
|
|
+ if (form.value.returnReason === "" || form.value.returnReason == null) {
|
|
|
proxy.$modal.msgError("请填写退回原因");
|
|
|
return;
|
|
|
}
|
|
@@ -548,23 +585,18 @@
|
|
|
}
|
|
|
|
|
|
function changeStauts4() {
|
|
|
- proxy.$modal
|
|
|
- .confirm("您确认要反审核当前数据吗?")
|
|
|
- .then(() => {
|
|
|
- visible.value = true;
|
|
|
- form.value.status = 1
|
|
|
- updateInvoice(form.value).then(response => {
|
|
|
- proxy.$modal.msgSuccess("修改成功");
|
|
|
- visible.value = false;
|
|
|
- getList.value()
|
|
|
- });
|
|
|
- })
|
|
|
- .catch(() => {
|
|
|
- proxy.$modal.msg("已取消");
|
|
|
- });
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
+ if (form.value.uauditReason === "" || form.value.uauditReason == null) {
|
|
|
+ proxy.$modal.msgError("请填写反审核原因");
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ visible.value = true;
|
|
|
+ form.value.status = 5
|
|
|
+ updateInvoice(form.value).then(response => {
|
|
|
+ proxy.$modal.msgSuccess("修改成功");
|
|
|
+ visible.value = false;
|
|
|
+ uauditFlag.value = false;
|
|
|
+ getList.value()
|
|
|
+ })
|
|
|
}
|
|
|
function changeStauts3() {
|
|
|
console.log(form.value.refuseReason);
|
|
@@ -644,7 +676,24 @@
|
|
|
form.value = response.data
|
|
|
})
|
|
|
}
|
|
|
-
|
|
|
+const statusFormat = (invoiceStatus)=>{
|
|
|
+ switch (invoiceStatus){
|
|
|
+ case 0:
|
|
|
+ return "待提交";
|
|
|
+ case 1:
|
|
|
+ return "提交";
|
|
|
+ case 2:
|
|
|
+ return "拒绝";
|
|
|
+ case 3:
|
|
|
+ return "审核";
|
|
|
+ case 4:
|
|
|
+ return "退回";
|
|
|
+ case 5:
|
|
|
+ return "反审核";
|
|
|
+ default:
|
|
|
+ return "";
|
|
|
+ }
|
|
|
+}
|
|
|
/** 暴露给父组件的方法 */
|
|
|
defineExpose({
|
|
|
open
|