|
|
@@ -1,14 +1,16 @@
|
|
|
<template>
|
|
|
<div class="app-container">
|
|
|
<el-form :model="queryParams" ref="queryRef" :inline="true" v-show="showSearch" label-width="100px">
|
|
|
- <el-form-item label="汇总月份" prop="summaryMonth">
|
|
|
+ <el-form-item label="汇总月份" prop="summaryMonthRange">
|
|
|
<el-date-picker
|
|
|
- v-model="queryParams.summaryMonth"
|
|
|
- type="month"
|
|
|
- placeholder="选择月"
|
|
|
+ v-model="summaryMonthRange"
|
|
|
+ type="monthrange"
|
|
|
+ range-separator="-"
|
|
|
clearable
|
|
|
format="YYYY.MM"
|
|
|
value-format="YYYY.MM"
|
|
|
+ start-placeholder="开始月份"
|
|
|
+ end-placeholder="结束月份"
|
|
|
@change="handleQuery">
|
|
|
</el-date-picker>
|
|
|
</el-form-item>
|
|
|
@@ -94,7 +96,7 @@
|
|
|
</el-table-column>
|
|
|
<el-table-column label="应付金额" align="center" prop="payableAmount" />
|
|
|
<el-table-column label="交易笔数" align="center" prop="transactionCount" />
|
|
|
- <el-table-column label="账单状态" align="center" prop="status" >
|
|
|
+ <el-table-column label="账单状态" align="center" prop="status" width="120px" >
|
|
|
<template #default="scope">
|
|
|
<dict-tag :options="monthly_report_status" :value="scope.row.status" />
|
|
|
</template>
|
|
|
@@ -106,12 +108,13 @@
|
|
|
<el-table-column label="电子发票ofd地址" align="center" prop="bwDzfpOfdUrl" />
|
|
|
<el-table-column label="电子发票xml地址" align="center" prop="bwDzfpXmlUrl" />
|
|
|
<el-table-column label="备注" align="center" prop="remark" />
|
|
|
-<!-- <el-table-column label="操作" align="center" class-name="small-padding fixed-width" fixed="right" width="160">-->
|
|
|
-<!-- <template #default="scope">-->
|
|
|
-<!-- <el-button link type="primary" icon="Edit" @click="handleUpdate(scope.row)" v-hasPermi="['system:monthSummary:edit']">修改</el-button>-->
|
|
|
+ <el-table-column label="操作" align="center" class-name="small-padding fixed-width" fixed="right">
|
|
|
+ <template #default="scope">
|
|
|
+ <el-button link type="primary" @click="handleDuizhang(scope.row)" v-if="scope.row.status == 1">对账</el-button>
|
|
|
+ <el-button link type="primary" @click="handleKaipiao(scope.row)" v-if="scope.row.status == 2">开票</el-button>
|
|
|
<!-- <el-button link type="primary" icon="Delete" @click="handleDelete(scope.row)" v-hasPermi="['system:monthSummary:remove']">删除</el-button>-->
|
|
|
-<!-- </template>-->
|
|
|
-<!-- </el-table-column>-->
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
</el-table>
|
|
|
|
|
|
<pagination
|
|
|
@@ -123,7 +126,7 @@
|
|
|
/>
|
|
|
|
|
|
<!-- 添加或修改财务月度汇总对话框 -->
|
|
|
- <el-dialog :title="title" v-model="open" width="70%" append-to-body>
|
|
|
+ <el-dialog title="title" v-model="open" width="70%" append-to-body>
|
|
|
<el-form ref="monthSummaryRef" :model="form" :rules="rules" :inline="true" label-width="160px">
|
|
|
<el-form-item label="汇总月份" prop="summaryMonth">
|
|
|
<el-date-picker
|
|
|
@@ -179,12 +182,92 @@
|
|
|
</div>
|
|
|
</template>
|
|
|
</el-dialog>
|
|
|
-
|
|
|
+ <el-dialog title="对账" v-model="openDuizhang" width="40%" append-to-body>
|
|
|
+ <div class="info">
|
|
|
+ <div>
|
|
|
+ <span class="label">已勾选运单:</span>
|
|
|
+ <span class="label">共<span class="font-red">{{form.transactionCount}}</span>票</span>
|
|
|
+ </div>
|
|
|
+ <div>
|
|
|
+ <span class="label">账单费用:</span>
|
|
|
+ <span class="label">应付金额<span class="font-red">{{form.payableAmount}}</span>元</span>
|
|
|
+ </div>
|
|
|
+ <div>
|
|
|
+ <span class="label">注意:对账一经完成,无法修改,请谨慎操作。</span>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <template #footer>
|
|
|
+ <div class="dialog-footer">
|
|
|
+ <el-button type="danger" @click="submitFormDZ">确 认</el-button>
|
|
|
+ <el-button @click="openDuizhang = false">取 消</el-button>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ </el-dialog>
|
|
|
+ <!-- 开票 -->
|
|
|
+ <el-dialog title="申请开票" v-model="openKaipiao" width="70%" append-to-body>
|
|
|
+ <el-form ref="formKPRef" :model="formKP" :rules="rulesKP" label-width="160px">
|
|
|
+ <el-row>
|
|
|
+ <el-col :span="24">
|
|
|
+ <el-form-item label="开票金额共:" prop="BigDecimal">
|
|
|
+ <div class="font-red">{{formKP.BigDecimal}}</div>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="12">
|
|
|
+ <el-form-item label="发票抬头" prop="invoiceName">
|
|
|
+ <el-input v-model="formKP.invoiceName" placeholder="请填写发票抬头" disabled />
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="12">
|
|
|
+ <el-form-item label="纳税人识别号" prop="invoiceNum">
|
|
|
+ <el-input v-model="formKP.invoiceNum" placeholder="请填写购买方纳税人识别号" disabled />
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="12">
|
|
|
+ <el-form-item label="收票人邮箱" prop="email">
|
|
|
+ <el-input v-model="formKP.email" placeholder="请填写收票人邮箱" />
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="12">
|
|
|
+ <el-form-item label="地址" prop="companyAddress">
|
|
|
+ <el-input v-model="formKP.companyAddress" placeholder="请填写准确的地址" />
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="12">
|
|
|
+ <el-form-item label="电话" prop="phone">
|
|
|
+ <el-input v-model="formKP.phone" placeholder="请填写7位或以上的电话号码" />
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="12">
|
|
|
+ <el-form-item label="开户银行" prop="openBank">
|
|
|
+ <el-input v-model="formKP.openBank" placeholder="请填写购买方开户行" />
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="12">
|
|
|
+ <el-form-item label="银行账号" prop="bankAccount">
|
|
|
+ <el-input v-model="formKP.bankAccount" placeholder="请填写购买方银行账号" />
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="12">
|
|
|
+ <el-form-item label="备注说明" prop="remark">
|
|
|
+ <el-input v-model="formKP.remark" placeholder="请填写需要在发票备注栏中显示的内容" />
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ </el-form>
|
|
|
+ <template #footer>
|
|
|
+ <div class="dialog-footer">
|
|
|
+ <el-button type="primary" @click="submitFormKP">确 定</el-button>
|
|
|
+ <el-button @click="openKaipiao = false">取 消</el-button>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ </el-dialog>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
<script setup name="MonthSummary">
|
|
|
-import { listMonthSummary, getMonthSummary, delMonthSummary, addMonthSummary, updateMonthSummary,costDetailsList } from "@/api/logistics/monthSummary"
|
|
|
+import { listMonthSummary, getMonthSummary, delMonthSummary, addMonthSummary, updateMonthSummary,invoiceIssuance } from "@/api/logistics/monthSummary"
|
|
|
+import { getDept } from "@/api/system/dept"
|
|
|
+
|
|
|
import auth from '@/plugins/auth'
|
|
|
const { proxy } = getCurrentInstance()
|
|
|
const { monthly_report_status } = proxy.useDict("monthly_report_status")
|
|
|
@@ -218,6 +301,7 @@ const data = reactive({
|
|
|
bwDzfpPdfUrl: null,
|
|
|
bwDzfpOfdUrl: null,
|
|
|
bwDzfpXmlUrl: null,
|
|
|
+
|
|
|
},
|
|
|
monthly_report_status:[],
|
|
|
rules: {
|
|
|
@@ -239,6 +323,26 @@ const data = reactive({
|
|
|
})
|
|
|
|
|
|
const { queryParams, form, rules } = toRefs(data)
|
|
|
+const openDuizhang = ref(false);
|
|
|
+const summaryMonthRange = ref([]);
|
|
|
+const openKaipiao = ref(false);
|
|
|
+const formKP = reactive({
|
|
|
+ invoiceName: '',
|
|
|
+ invoiceNum: '',
|
|
|
+ email: '',
|
|
|
+ companyAddress: '',
|
|
|
+ phone: '',
|
|
|
+ openBank: '',
|
|
|
+ bankAccount: '',
|
|
|
+ remark: '',
|
|
|
+ BigDecimal: 0
|
|
|
+});
|
|
|
+const rulesKP = {
|
|
|
+ invoiceName: [
|
|
|
+ { required: true, message: '请填写发票抬头', trigger: 'blur' },
|
|
|
+ ],
|
|
|
+}
|
|
|
+const formKPRef = ref(null)
|
|
|
|
|
|
/** 查询财务月度汇总列表 */
|
|
|
function getList() {
|
|
|
@@ -282,12 +386,20 @@ function reset() {
|
|
|
|
|
|
/** 搜索按钮操作 */
|
|
|
function handleQuery() {
|
|
|
- queryParams.value.pageNum = 1
|
|
|
+ queryParams.value.pageNum = 1;
|
|
|
+ if(summaryMonthRange.value.length > 0){
|
|
|
+ queryParams.value.summaryMonth = summaryMonthRange.value[0];
|
|
|
+ queryParams.value.summaryMonthEnd = summaryMonthRange.value[1];
|
|
|
+ }else{
|
|
|
+ queryParams.value.summaryMonth = null;
|
|
|
+ queryParams.value.summaryMonthEnd = null;
|
|
|
+ }
|
|
|
getList()
|
|
|
}
|
|
|
|
|
|
/** 重置按钮操作 */
|
|
|
function resetQuery() {
|
|
|
+ summaryMonthRange.value =[];
|
|
|
proxy.resetForm("queryRef")
|
|
|
handleQuery()
|
|
|
}
|
|
|
@@ -348,7 +460,61 @@ function handleDelete(row) {
|
|
|
proxy.$modal.msgSuccess("删除成功")
|
|
|
}).catch(() => {})
|
|
|
}
|
|
|
-
|
|
|
+// 点击对账
|
|
|
+function handleDuizhang(row){
|
|
|
+ form.value = row;
|
|
|
+ openDuizhang.value = true;
|
|
|
+}
|
|
|
+// 对账确认
|
|
|
+function submitFormDZ(){
|
|
|
+ let obj = {
|
|
|
+ summaryId:form.value.summaryId,
|
|
|
+ status:2
|
|
|
+ }
|
|
|
+ updateMonthSummary(obj).then(response => {
|
|
|
+ proxy.$modal.msgSuccess("修改成功")
|
|
|
+ openDuizhang.value = false
|
|
|
+ getList()
|
|
|
+ })
|
|
|
+}
|
|
|
+// 点击开票
|
|
|
+function handleKaipiao(row){
|
|
|
+ getDept(row.deptId).then(response => {
|
|
|
+ proxy.$nextTick(() => {
|
|
|
+ Object.assign(formKP, {
|
|
|
+ invoiceName: response.data.invoiceName || '',
|
|
|
+ invoiceNum: response.data.invoiceNum || '',
|
|
|
+ email: response.data.email || '',
|
|
|
+ companyAddress: response.data.companyAddress || '',
|
|
|
+ phone: response.data.phone || '',
|
|
|
+ openBank: response.data.openBank || '',
|
|
|
+ bankAccount: response.data.bankAccount || '',
|
|
|
+ remark: response.data.remark || '',
|
|
|
+ BigDecimal: row.payableAmount || 0
|
|
|
+ });
|
|
|
+ openKaipiao.value = true;
|
|
|
+ });
|
|
|
+ }).catch(error => {
|
|
|
+ console.error('获取部门信息失败:', error);
|
|
|
+ proxy.$modal.msgError('获取开票信息失败');
|
|
|
+ });
|
|
|
+}
|
|
|
+function submitFormKP(){
|
|
|
+ let obj = {
|
|
|
+ khmc:formKP.invoiceName,
|
|
|
+ khsh:formKP.invoiceNum,
|
|
|
+ hsje:formKP.BigDecimal,
|
|
|
+ khdzdh:`${formKP.companyAddress} ${formKP.phone}`,
|
|
|
+ khyhzh:`${formKP.openBank} ${formKP.bankAccount}`,
|
|
|
+ gmfMobile:`${formKP.phone}`,
|
|
|
+ gmfEmail:`${formKP.email}`,
|
|
|
+ bz:`${formKP.remark}`,
|
|
|
+ }
|
|
|
+ invoiceIssuance(obj).then(response => {
|
|
|
+ proxy.$modal.msgSuccess("开票申请成功");
|
|
|
+ openKaipiao.value = false;
|
|
|
+ })
|
|
|
+}
|
|
|
/** 导出按钮操作 */
|
|
|
function handleExport() {
|
|
|
proxy.download('system/monthSummary/export', {
|
|
|
@@ -366,11 +532,14 @@ function detailClick(row){
|
|
|
}
|
|
|
})
|
|
|
}
|
|
|
-console.log(window['hasPermi'])
|
|
|
getList()
|
|
|
</script>
|
|
|
<style scoped>
|
|
|
-.fontBlue{
|
|
|
- color: #2D71FF;
|
|
|
+.font-red{
|
|
|
+ color: #E4161F;
|
|
|
+}
|
|
|
+.info .label{
|
|
|
+ font-size: 14px;
|
|
|
+ color: #666;
|
|
|
}
|
|
|
</style>
|