Merge branch 'master' into repair

This commit is contained in:
xyc 2025-08-12 15:33:01 +08:00
commit 084bd3d7ca
4 changed files with 236 additions and 28 deletions

View File

@ -105,6 +105,28 @@
>
全屏
</el-button>
<!-- 打印按钮 -->
<!-- <PrintButton-->
<!-- :beforePrint="beforePrint"-->
<!-- :afterPrint="afterPrint"-->
<!-- button-text="打印"-->
<!-- style="position: absolute; right: 220px; top: 10px; z-index: 10;"-->
<!-- >-->
<!-- <template #printContent>-->
<!-- &lt;!&ndash; 根据文件类型动态显示打印内容 &ndash;&gt;-->
<!-- <iframe-->
<!-- v-if="!isImage && !isAudioType"-->
<!-- :src="fileUrlMethod"-->
<!-- style="width: 100%; height: 100vh; border: none"-->
<!-- />-->
<!-- <div v-else-if="isImage" style="text-align: center; padding: 20px">-->
<!-- <img :src="previewSrc" style="max-width: 100%; max-height: 100vh;" />-->
<!-- </div>-->
<!-- <div v-else>-->
<!-- <p>当前类型不支持打印</p>-->
<!-- </div>-->
<!-- </template>-->
<!-- </PrintButton>-->
<div class="preview-container" ref="previewContainer">
<audio v-if="isAudioType" class="preview-iframe" controls>
<source :src="selectFile.filePath.includes('http')
@ -302,10 +324,15 @@ import {getAccessToken} from '@/utils/auth'
// import cos from "@/utils/cosUpload"
import cos from '@/utils/cos'
import {getLastPathSegment} from '@/utils/ruoyi'
import PrintButton from '@/components/PrintButton/index.vue';
export default {
name: 'index',
components: {driveFileUpload},
components: {
driveFileUpload,
PrintButton
},
data() {
return {
uploadProgress: 0,
@ -416,6 +443,11 @@ export default {
showIframe() {
// iframe
return !this.isImage && !this.isAudioType;
},
previewSrc() {
return this.selectFile.filePath.includes('http')
? this.inspectionFileUrl + this.selectFile.filePath.replace(/^.*?uploads\//, 'uploads/')
: this.imageUrl + this.selectFile.filePath;
}
},
created() {
@ -452,6 +484,13 @@ export default {
console.log('folderList', this.folderList)
})
},
beforePrint() {
// loading
return Promise.resolve();
},
afterPrint() {
this.$message.success('打印完成');
},
handleFolderChange(e) {
// if (e.length === 0) {
// this.form.fatherId = null

View File

@ -62,10 +62,16 @@
<el-table v-loading="loading" :data="userList">
<el-table-column label="员工编号" align="center" key="id" prop="id" v-if="columns[0].visible"/>
<el-table-column label="员工账号" align="center" key="username" prop="username" v-if="columns[1].visible"
:show-overflow-tooltip="true"/>
<el-table-column label="员工昵称" align="center" key="nickname" prop="nickname" v-if="columns[2].visible"
:show-overflow-tooltip="true"/>
<el-table-column label="员工岗位" align="center" key="nickname" prop="nickname"
:show-overflow-tooltip="true"/>
<el-table-column label="性别" align="center" key="nickname" prop="nickname"
:show-overflow-tooltip="true"/>
<el-table-column label="年龄" align="center" key="nickname" prop="nickname"
:show-overflow-tooltip="true"/>
<el-table-column label="员工账号" align="center" key="username" prop="username" v-if="columns[1].visible"
:show-overflow-tooltip="true"/>
<el-table-column label="部门" align="center" key="deptName" prop="dept.name" v-if="columns[3].visible"
:show-overflow-tooltip="true"/>
<el-table-column label="手机号码" align="center" key="mobile" prop="mobile" v-if="columns[4].visible"
@ -482,8 +488,8 @@ export default {
//
columns: [
{key: 0, label: `员工编号`, visible: true},
{key: 1, label: `员工名称`, visible: true},
{key: 2, label: `员工昵称`, visible: true},
{key: 1, label: `员工名称`, visible: true},
{key: 3, label: `部门`, visible: false},
{key: 4, label: `手机号码`, visible: true},
{key: 5, label: `状态`, visible: false},

View File

@ -59,6 +59,15 @@ export function offlineCharging(data){
})
}
export function settlement(data){
return request({
url: '/partnerOwn/partner/settlement',
method: 'post',
data:data
})
}
export function inspectionDetail(id){
return request({
url: '/partnerOwn/partner/inspectionDetail',

View File

@ -99,7 +99,7 @@
</el-select>
</el-form-item>
<el-form-item :label="dateTypeLabel" prop="datetimeRange">
<el-form-item prop="datetimeRange">
<el-date-picker
v-model="queryParams.datetimeRange"
type="daterange"
@ -195,6 +195,8 @@
></el-table-column>
<el-table-column label="客户来源" align="center" prop="customerSource">
</el-table-column>
<el-table-column label="车主姓名" prop="buyName"></el-table-column>
<el-table-column label="车主手机号" prop="buyPhone"></el-table-column>
<el-table-column label="检测结果" align="center" prop="isPass">
<template slot-scope="scope">
<span v-if="scope.row.isPass == '0'">不合格</span>
@ -221,7 +223,6 @@
</el-table-column>
<el-table-column label="收款时间" align="center" prop="payTime"/>
<!-- <el-table-column label="客户" align="center" prop="buyName" />-->
<el-table-column label="客户手机号" align="center" prop="buyPhone"/>
<!-- <el-table-column label="接待员" align="center" prop="workerName"/>-->
<el-table-column label="接待员手机号" align="center" prop="workerPhone"/>
<el-table-column label="支付方式" align="center" prop="payType">
@ -268,7 +269,8 @@
size="mini"
type="text"
icon="el-icon-edit"
@click="xinWork(scope.row)"
@click="settlementWork(scope.row)"
v-if="!scope.row.settlementAmount && !scope.row.realPayMoney"
>
结算
</el-button>
@ -276,16 +278,25 @@
size="mini"
type="text"
icon="el-icon-edit"
v-if="
scope.row.status &&
scope.row.status == 1 &&
scope.row.isPass &&
scope.row.isPass == 1 &&
scope.row.makeCert != 1
"
@click="zhizheng(scope.row)"
>制证
@click="xinWork(scope.row)"
v-if=" (scope.row.cashierConfirm != '1' && scope.row.settlementAmount) || ($auth.hasPermi('cashier_confirm_update') && (scope.row.settlementAmount || scope.row.realPayMoney))"
>
收款
</el-button>
<!-- <el-button-->
<!-- size="mini"-->
<!-- type="text"-->
<!-- icon="el-icon-edit"-->
<!-- v-if="-->
<!-- scope.row.status &&-->
<!-- scope.row.status == 1 &&-->
<!-- scope.row.isPass &&-->
<!-- scope.row.isPass == 1 &&-->
<!-- scope.row.makeCert != 1-->
<!-- "-->
<!-- @click="zhizheng(scope.row)"-->
<!-- >制证-->
<!-- </el-button>-->
<el-button
size="mini"
type="text"
@ -331,7 +342,7 @@
disabled
style="color: red"
>
暂未结算
暂未收款
</el-button>
<el-button
size="mini"
@ -492,7 +503,7 @@
></el-input-number>
</el-form-item>
<el-form-item label="实付金额">
<el-input-number type="text" v-model="payMoney"></el-input-number>
<el-input-number type="text" disabled v-model="payMoney"></el-input-number>
</el-form-item>
<el-form-item label="付款方式">
<!-- <el-input type="text" v-model="receivablesAccount"></el-input>-->
@ -528,6 +539,31 @@
<el-button type="primary" @click="tijiao()"> </el-button>
</el-form>
</el-dialog>
<el-dialog
title="结算"
:visible.sync="openSettlementWork"
width="800px"
append-to-body
>
<el-form ref="form" :model="settlementForm" :rules="rules" label-width="120px">
<el-form-item label="商品价格">
<span>{{ settlementForm.goodsPrice / 100 }}</span>
</el-form-item>
<el-form-item label="优惠金额">
<el-input-number
:min="0"
@input="jisuanSetlementMoney"
:max="settlementForm.goodsPrice / 100"
type="text"
v-model="settlementForm.settlementReduceMoney"
></el-input-number>
</el-form-item>
<el-form-item label="实付金额">
<el-input-number type="text" disabled v-model="settlementForm.settlementAmount"></el-input-number>
</el-form-item>
<el-button type="primary" @click="submitSettlementForm()"> </el-button>
</el-form>
</el-dialog>
<el-dialog
:title="title"
:visible.sync="opendetail"
@ -760,9 +796,52 @@
<el-button type="primary" @click="handleBatchQuery">筛选</el-button>
</el-form-item>
</el-form>
<!-- 原组件直接用 -->
<print-button
button-text="打印"
type="primary"
size="medium"
icon="el-icon-printer"
:printTitle="batchType === 'cn' ? '批量结算列表' : '批量审核列表'"
>
<template v-slot:printContent>
<div>
<h2 style="text-align: center; margin-bottom: 20px;">
{{ batchType === 'cn' ? '批量结算列表' : '批量审核列表' }}
</h2>
<table class="print-table" cellspacing="0" cellpadding="0" border="1">
<thead>
<tr>
<th>车牌号</th>
<th>车主姓名</th>
<th>业务渠道</th>
<th>客户来源</th>
<th>检测项目</th>
<th>上线时间</th>
<th>应收金额</th>
</tr>
</thead>
<tbody>
<tr v-for="item in batchOrderList" :key="item.id || item.carNum || item.buyPhone">
<td>{{ item.carNum || item.certificateNum || '----' }}</td>
<td>{{ item.buyName }}</td>
<td>{{ item.businessChannel }}</td>
<td>{{ item.customerSource }}</td>
<td>{{ item.skuName }}</td>
<td>{{ item.startTime }}</td>
<td>{{ (item.goodsPrice / 100).toFixed(2) }}</td>
</tr>
</tbody>
</table>
</div>
</template>
</print-button>
<el-table
:data="batchOrderList"
ref="batchTableCn"
@selection-change="handleBatchSelectionChange"
>
<el-table-column type="selection" width="55"></el-table-column>
@ -772,8 +851,8 @@
}}
</template>
</el-table-column>
<el-table-column label="客户名称" prop="buyName"></el-table-column>
<el-table-column label="客户手机号" prop="buyPhone"></el-table-column>
<el-table-column label="车主姓名" prop="buyName"></el-table-column>
<el-table-column label="车主手机号" prop="buyPhone"></el-table-column>
<el-table-column
label="业务渠道"
prop="businessChannel"
@ -791,6 +870,8 @@
</template>
</el-table-column>
</el-table>
</div>
<div v-show="selectBatchType == 'kj'">
<el-form :inline="true" :model="batchQueryParams" size="small">
@ -809,8 +890,9 @@
</el-form-item>
</el-form>
<el-table :data="batchOrderList"
ref="batchTableKj"
@selection-change="handleBatchSelectionChange"
style="width: 100%">
style="width: 100%">
<el-table-column
type="selection"
width="55">
@ -943,6 +1025,7 @@
placeholder="请输入实付金额"
v-model="settleForm.realPayMoney"
:precision="2"
disabled
:min="0"
controls-position="right"
style="width: 100%"
@ -1020,7 +1103,7 @@ import {
getWeorkNodesById,
getCustomerSource,
batchSettlement,
getBatchList,
getBatchList, settlement,
} from "./api/workOrder";
import print from "vue-print-nb";
import moment from "moment";
@ -1029,6 +1112,7 @@ import DictTag from "@/components/DictTagOld/index.vue";
import CashierConfirmForm from "@/views/drivingSchool/DriveSchoolPay/form/cashierConfirmForm.vue";
import InspectionCashierConfirmForm from "@/views/partner/form/InspectionCashierConfirmForm.vue";
import FileUpload from "@/components/FileUpload/index.vue";
import PrintButton from "@/components/PrintButton/index.vue";
export default {
name: "Info",
@ -1043,6 +1127,7 @@ export default {
print,
},
components: {
PrintButton,
InspectionCashierConfirmForm,
CashierConfirmForm,
DictTag,
@ -1127,13 +1212,18 @@ export default {
],
goodsPrice: 0,
reduceMoney: "",
payMoney: "",
reduceMoney: 0,
payMoney: 0,
payType: "",
receivablesAccount: "",
payRemark: "",
fileUrls: "",
inspectionId: "",
settlementForm: {
settlementAmount: 0,
goodsPrice: 0,
settlementReduceMoney: 0,
},
size: "",
workId: "",
// workerList:[],
@ -1168,8 +1258,10 @@ export default {
//
open: false,
openxin: false,
openSettlementWork: false,
opendetail: false,
openhe: false,
tableHtml: undefined,
htmlStr: null,
detailForm: [],
selectInspectionProject: [],
@ -1191,7 +1283,7 @@ export default {
rescueStatus: null,
rescueAmount: null,
businessChannel: null,
dateType:'jcTime'
dateType: 'jcTime'
},
//
form: {},
@ -1308,7 +1400,7 @@ export default {
pageNum: this.batchQueryParams.pageNum || 1,
pageSize: this.batchQueryParams.pageSize || 100,
accountingConfirm: '1',
dateType:'jcTime'
dateType: 'jcTime'
};
if (this.selectBatchType == "cn") {
listWorkOrder(params).then((response) => {
@ -1461,6 +1553,13 @@ export default {
}
this.payMoney = this.goodsPrice / 100 - this.reduceMoney;
},
jisuanSetlementMoney() {
console.log('执行了算')
if (this.settlementForm.settlementReduceMoney > this.settlementForm.goodsPrice / 100) {
this.settlementForm.settlementReduceMoney = this.settlementForm.goodsPrice / 100;
}
this.settlementForm.settlementAmount = this.settlementForm.goodsPrice / 100 - this.settlementForm.settlementReduceMoney;
},
batchJisuan() {
if (this.settleForm.reduceMoney > this.settleForm.goodsPrice) {
this.settleForm.reduceMoney = this.settleForm.goodsPrice;
@ -1484,6 +1583,14 @@ export default {
};
offlineCharging(data).then((res) => {
this.openxin = false;
this.$message.success("收款成功");
this.getList();
});
},
submitSettlementForm() {
settlement(this.settlementForm).then((res) => {
this.openSettlementWork = false;
this.$message.success("结算成功");
this.getList();
});
@ -1531,14 +1638,35 @@ export default {
inspectionDetail(row.id).then((res) => {
this.offline = res.data;
this.goodsPrice = res.data.goodsPrice;
this.payMoney = res.data.payMoney ? res.data.payMoney / 100 : null;
if (res.data.payMoney) {
this.payMoney = res.data.payMoney ? res.data.payMoney / 100 : 0;
console.log('执行哈哈哈哈',res.data.payMoney)
} else {
this.payMoney = res.data.settlementAmount ? res.data.settlementAmount / 100 : 0;
console.log('kukuku',res.data.settlementAmount)
}
if (res.data.settlementReduceMoney && res.data.settlementReduceMoney != 0) {
this.reduceMoney = res.data.settlementReduceMoney ? res.data.settlementReduceMoney / 100 : 0;
} else {
this.reduceMoney = res.data.reduceMoney ? res.data.reduceMoney / 100 : 0;
}
this.payType = res.data.payType ? res.data.payType : null;
this.receivablesAccount = res.data.receivablesAccount ? res.data.receivablesAccount : null;
this.fileUrls = res.data.files ? res.data.files : [];
this.payRemark = res.data.payRemark ? res.data.payRemark : null;
console.log(res);
console.log(this.payMoney);
});
this.openxin = true;
},
async settlementWork(row) {
this.settlementForm.inspectionId = row.id;
this.settlementForm.settlementReduceMoney = 0
await inspectionDetail(row.id).then((res) => {
this.settlementForm.goodsPrice = res.data.goodsPrice;
this.settlementForm.settlementAmount = res.data.goodsPrice / 100;
});
this.openSettlementWork = true;
},
detail(row) {
console.log("点击详情", row);
//id
@ -1820,6 +1948,32 @@ export default {
`info_${new Date().getTime()}.xls`
);
},
getTableHtml() {
// DOM
const tableRef = this.selectBatchType === 'cn' ? this.$refs.batchTableCn : this.$refs.batchTableKj;
if (!tableRef) return '';
// HTML
const tableDom = tableRef.$el.cloneNode(true);
// Element UI
let styles = '';
document.querySelectorAll('link[rel="stylesheet"]').forEach(link => {
styles += `<link rel="stylesheet" href="${link.href}">`;
});
console.log('styles', styles)
return styles + tableDom.outerHTML;
},
beforePrint() {
this.tableHtml = this.getTableHtml(); // HTML
console.log('tableHtml', this.tableHtml)
//
return Promise.resolve();
},
afterPrint() {
console.log('打印完成');
}
},
};
</script>