Compare commits
	
		
			4 Commits
		
	
	
		
			c5c27d7bd9
			...
			084bd3d7ca
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
|   | 084bd3d7ca | ||
|   | cffc61e4d0 | ||
|   | 0f69768923 | ||
|   | 5cb9610349 | 
| @ -105,6 +105,28 @@ | |||||||
|       > |       > | ||||||
|         全屏 |         全屏 | ||||||
|       </el-button> |       </el-button> | ||||||
|  |       <!-- 打印按钮 --> | ||||||
|  | <!--      <PrintButton--> | ||||||
|  | <!--        :beforePrint="beforePrint"--> | ||||||
|  | <!--        :afterPrint="afterPrint"--> | ||||||
|  | <!--        button-text="打印"--> | ||||||
|  | <!--        style="position: absolute; right: 220px; top: 10px; z-index: 10;"--> | ||||||
|  | <!--      >--> | ||||||
|  | <!--        <template #printContent>--> | ||||||
|  | <!--          <!– 根据文件类型动态显示打印内容 –>--> | ||||||
|  | <!--          <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"> |       <div class="preview-container" ref="previewContainer"> | ||||||
|         <audio v-if="isAudioType" class="preview-iframe" controls> |         <audio v-if="isAudioType" class="preview-iframe" controls> | ||||||
|           <source :src="selectFile.filePath.includes('http') |           <source :src="selectFile.filePath.includes('http') | ||||||
| @ -302,10 +324,15 @@ import {getAccessToken} from '@/utils/auth' | |||||||
| // import  cos from "@/utils/cosUpload" | // import  cos from "@/utils/cosUpload" | ||||||
| import cos from '@/utils/cos' | import cos from '@/utils/cos' | ||||||
| import {getLastPathSegment} from '@/utils/ruoyi' | import {getLastPathSegment} from '@/utils/ruoyi' | ||||||
|  | import PrintButton from '@/components/PrintButton/index.vue'; | ||||||
|  | 
 | ||||||
| 
 | 
 | ||||||
| export default { | export default { | ||||||
|   name: 'index', |   name: 'index', | ||||||
|   components: {driveFileUpload}, |   components: { | ||||||
|  |     driveFileUpload, | ||||||
|  |     PrintButton | ||||||
|  |   }, | ||||||
|   data() { |   data() { | ||||||
|     return { |     return { | ||||||
|       uploadProgress: 0, |       uploadProgress: 0, | ||||||
| @ -416,6 +443,11 @@ export default { | |||||||
|     showIframe() { |     showIframe() { | ||||||
|       // 只在不是图片和音频的时候才显示 iframe |       // 只在不是图片和音频的时候才显示 iframe | ||||||
|       return !this.isImage && !this.isAudioType; |       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() { |   created() { | ||||||
| @ -452,6 +484,13 @@ export default { | |||||||
|         console.log('folderList', this.folderList) |         console.log('folderList', this.folderList) | ||||||
|       }) |       }) | ||||||
|     }, |     }, | ||||||
|  |     beforePrint() { | ||||||
|  |       // 可做 loading 等操作 | ||||||
|  |       return Promise.resolve(); | ||||||
|  |     }, | ||||||
|  |     afterPrint() { | ||||||
|  |       this.$message.success('打印完成'); | ||||||
|  |     }, | ||||||
|     handleFolderChange(e) { |     handleFolderChange(e) { | ||||||
|       // if (e.length === 0) { |       // if (e.length === 0) { | ||||||
|       //   this.form.fatherId = null |       //   this.form.fatherId = null | ||||||
|  | |||||||
| @ -62,10 +62,16 @@ | |||||||
| 
 | 
 | ||||||
|         <el-table v-loading="loading" :data="userList"> |         <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="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" |           <el-table-column label="员工昵称" align="center" key="nickname" prop="nickname" v-if="columns[2].visible" | ||||||
|                            :show-overflow-tooltip="true"/> |                            :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" |           <el-table-column label="部门" align="center" key="deptName" prop="dept.name" v-if="columns[3].visible" | ||||||
|                            :show-overflow-tooltip="true"/> |                            :show-overflow-tooltip="true"/> | ||||||
|           <el-table-column label="手机号码" align="center" key="mobile" prop="mobile" v-if="columns[4].visible" |           <el-table-column label="手机号码" align="center" key="mobile" prop="mobile" v-if="columns[4].visible" | ||||||
| @ -482,8 +488,8 @@ export default { | |||||||
|       // 列信息 |       // 列信息 | ||||||
|       columns: [ |       columns: [ | ||||||
|         {key: 0, label: `员工编号`, visible: true}, |         {key: 0, label: `员工编号`, visible: true}, | ||||||
|         {key: 1, label: `员工名称`, visible: true}, |  | ||||||
|         {key: 2, label: `员工昵称`, visible: true}, |         {key: 2, label: `员工昵称`, visible: true}, | ||||||
|  |         {key: 1, label: `员工名称`, visible: true}, | ||||||
|         {key: 3, label: `部门`, visible: false}, |         {key: 3, label: `部门`, visible: false}, | ||||||
|         {key: 4, label: `手机号码`, visible: true}, |         {key: 4, label: `手机号码`, visible: true}, | ||||||
|         {key: 5, label: `状态`, visible: false}, |         {key: 5, label: `状态`, visible: false}, | ||||||
|  | |||||||
| @ -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){ | export function inspectionDetail(id){ | ||||||
|   return request({ |   return request({ | ||||||
|     url: '/partnerOwn/partner/inspectionDetail', |     url: '/partnerOwn/partner/inspectionDetail', | ||||||
|  | |||||||
| @ -99,7 +99,7 @@ | |||||||
|         </el-select> |         </el-select> | ||||||
|       </el-form-item> |       </el-form-item> | ||||||
| 
 | 
 | ||||||
|       <el-form-item :label="dateTypeLabel" prop="datetimeRange"> |       <el-form-item prop="datetimeRange"> | ||||||
|         <el-date-picker |         <el-date-picker | ||||||
|           v-model="queryParams.datetimeRange" |           v-model="queryParams.datetimeRange" | ||||||
|           type="daterange" |           type="daterange" | ||||||
| @ -195,6 +195,8 @@ | |||||||
|       ></el-table-column> |       ></el-table-column> | ||||||
|       <el-table-column label="客户来源" align="center" prop="customerSource"> |       <el-table-column label="客户来源" align="center" prop="customerSource"> | ||||||
|       </el-table-column> |       </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"> |       <el-table-column label="检测结果" align="center" prop="isPass"> | ||||||
|         <template slot-scope="scope"> |         <template slot-scope="scope"> | ||||||
|           <span v-if="scope.row.isPass == '0'">不合格</span> |           <span v-if="scope.row.isPass == '0'">不合格</span> | ||||||
| @ -221,7 +223,6 @@ | |||||||
|       </el-table-column> |       </el-table-column> | ||||||
|       <el-table-column label="收款时间" align="center" prop="payTime"/> |       <el-table-column label="收款时间" align="center" prop="payTime"/> | ||||||
|       <!--      <el-table-column label="客户" align="center" prop="buyName" />--> |       <!--      <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="workerName"/>--> | ||||||
|       <el-table-column label="接待员手机号" align="center" prop="workerPhone"/> |       <el-table-column label="接待员手机号" align="center" prop="workerPhone"/> | ||||||
|       <el-table-column label="支付方式" align="center" prop="payType"> |       <el-table-column label="支付方式" align="center" prop="payType"> | ||||||
| @ -268,7 +269,8 @@ | |||||||
|             size="mini" |             size="mini" | ||||||
|             type="text" |             type="text" | ||||||
|             icon="el-icon-edit" |             icon="el-icon-edit" | ||||||
|             @click="xinWork(scope.row)" |             @click="settlementWork(scope.row)" | ||||||
|  |             v-if="!scope.row.settlementAmount && !scope.row.realPayMoney" | ||||||
|           > |           > | ||||||
|             结算 |             结算 | ||||||
|           </el-button> |           </el-button> | ||||||
| @ -276,16 +278,25 @@ | |||||||
|             size="mini" |             size="mini" | ||||||
|             type="text" |             type="text" | ||||||
|             icon="el-icon-edit" |             icon="el-icon-edit" | ||||||
|             v-if=" |             @click="xinWork(scope.row)" | ||||||
|               scope.row.status && |             v-if=" (scope.row.cashierConfirm != '1' && scope.row.settlementAmount) || ($auth.hasPermi('cashier_confirm_update') && (scope.row.settlementAmount || scope.row.realPayMoney))" | ||||||
|               scope.row.status == 1 && |           > | ||||||
|               scope.row.isPass && |             收款 | ||||||
|               scope.row.isPass == 1 && |  | ||||||
|               scope.row.makeCert != 1 |  | ||||||
|             " |  | ||||||
|             @click="zhizheng(scope.row)" |  | ||||||
|           >制证 |  | ||||||
|           </el-button> |           </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 |           <el-button | ||||||
|             size="mini" |             size="mini" | ||||||
|             type="text" |             type="text" | ||||||
| @ -331,7 +342,7 @@ | |||||||
|             disabled |             disabled | ||||||
|             style="color: red" |             style="color: red" | ||||||
|           > |           > | ||||||
|             暂未结算 |             暂未收款 | ||||||
|           </el-button> |           </el-button> | ||||||
|           <el-button |           <el-button | ||||||
|             size="mini" |             size="mini" | ||||||
| @ -492,7 +503,7 @@ | |||||||
|           ></el-input-number> |           ></el-input-number> | ||||||
|         </el-form-item> |         </el-form-item> | ||||||
|         <el-form-item label="实付金额"> |         <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> | ||||||
|         <el-form-item label="付款方式"> |         <el-form-item label="付款方式"> | ||||||
|           <!--        <el-input type="text" v-model="receivablesAccount"></el-input>--> |           <!--        <el-input type="text" v-model="receivablesAccount"></el-input>--> | ||||||
| @ -528,6 +539,31 @@ | |||||||
|         <el-button type="primary" @click="tijiao()">确 定</el-button> |         <el-button type="primary" @click="tijiao()">确 定</el-button> | ||||||
|       </el-form> |       </el-form> | ||||||
|     </el-dialog> |     </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 |     <el-dialog | ||||||
|       :title="title" |       :title="title" | ||||||
|       :visible.sync="opendetail" |       :visible.sync="opendetail" | ||||||
| @ -760,9 +796,52 @@ | |||||||
|             <el-button type="primary" @click="handleBatchQuery">筛选</el-button> |             <el-button type="primary" @click="handleBatchQuery">筛选</el-button> | ||||||
|           </el-form-item> |           </el-form-item> | ||||||
|         </el-form> |         </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 |         <el-table | ||||||
|           :data="batchOrderList" |           :data="batchOrderList" | ||||||
|  |           ref="batchTableCn" | ||||||
|           @selection-change="handleBatchSelectionChange" |           @selection-change="handleBatchSelectionChange" | ||||||
|         > |         > | ||||||
|           <el-table-column type="selection" width="55"></el-table-column> |           <el-table-column type="selection" width="55"></el-table-column> | ||||||
| @ -772,8 +851,8 @@ | |||||||
|               }} |               }} | ||||||
|             </template> |             </template> | ||||||
|           </el-table-column> |           </el-table-column> | ||||||
|           <el-table-column label="客户名称" prop="buyName"></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="buyPhone"></el-table-column> | ||||||
|           <el-table-column |           <el-table-column | ||||||
|             label="业务渠道" |             label="业务渠道" | ||||||
|             prop="businessChannel" |             prop="businessChannel" | ||||||
| @ -791,6 +870,8 @@ | |||||||
|             </template> |             </template> | ||||||
|           </el-table-column> |           </el-table-column> | ||||||
|         </el-table> |         </el-table> | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
|       </div> |       </div> | ||||||
|       <div v-show="selectBatchType == 'kj'"> |       <div v-show="selectBatchType == 'kj'"> | ||||||
|         <el-form :inline="true" :model="batchQueryParams" size="small"> |         <el-form :inline="true" :model="batchQueryParams" size="small"> | ||||||
| @ -809,6 +890,7 @@ | |||||||
|           </el-form-item> |           </el-form-item> | ||||||
|         </el-form> |         </el-form> | ||||||
|         <el-table :data="batchOrderList" |         <el-table :data="batchOrderList" | ||||||
|  |                   ref="batchTableKj" | ||||||
|                   @selection-change="handleBatchSelectionChange" |                   @selection-change="handleBatchSelectionChange" | ||||||
|                   style="width: 100%"> |                   style="width: 100%"> | ||||||
|           <el-table-column |           <el-table-column | ||||||
| @ -943,6 +1025,7 @@ | |||||||
|             placeholder="请输入实付金额" |             placeholder="请输入实付金额" | ||||||
|             v-model="settleForm.realPayMoney" |             v-model="settleForm.realPayMoney" | ||||||
|             :precision="2" |             :precision="2" | ||||||
|  |             disabled | ||||||
|             :min="0" |             :min="0" | ||||||
|             controls-position="right" |             controls-position="right" | ||||||
|             style="width: 100%" |             style="width: 100%" | ||||||
| @ -1020,7 +1103,7 @@ import { | |||||||
|   getWeorkNodesById, |   getWeorkNodesById, | ||||||
|   getCustomerSource, |   getCustomerSource, | ||||||
|   batchSettlement, |   batchSettlement, | ||||||
|   getBatchList, |   getBatchList, settlement, | ||||||
| } from "./api/workOrder"; | } from "./api/workOrder"; | ||||||
| import print from "vue-print-nb"; | import print from "vue-print-nb"; | ||||||
| import moment from "moment"; | 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 CashierConfirmForm from "@/views/drivingSchool/DriveSchoolPay/form/cashierConfirmForm.vue"; | ||||||
| import InspectionCashierConfirmForm from "@/views/partner/form/InspectionCashierConfirmForm.vue"; | import InspectionCashierConfirmForm from "@/views/partner/form/InspectionCashierConfirmForm.vue"; | ||||||
| import FileUpload from "@/components/FileUpload/index.vue"; | import FileUpload from "@/components/FileUpload/index.vue"; | ||||||
|  | import PrintButton from "@/components/PrintButton/index.vue"; | ||||||
| 
 | 
 | ||||||
| export default { | export default { | ||||||
|   name: "Info", |   name: "Info", | ||||||
| @ -1043,6 +1127,7 @@ export default { | |||||||
|     print, |     print, | ||||||
|   }, |   }, | ||||||
|   components: { |   components: { | ||||||
|  |     PrintButton, | ||||||
|     InspectionCashierConfirmForm, |     InspectionCashierConfirmForm, | ||||||
|     CashierConfirmForm, |     CashierConfirmForm, | ||||||
|     DictTag, |     DictTag, | ||||||
| @ -1127,13 +1212,18 @@ export default { | |||||||
|       ], |       ], | ||||||
| 
 | 
 | ||||||
|       goodsPrice: 0, |       goodsPrice: 0, | ||||||
|       reduceMoney: "", |       reduceMoney: 0, | ||||||
|       payMoney: "", |       payMoney: 0, | ||||||
|       payType: "", |       payType: "", | ||||||
|       receivablesAccount: "", |       receivablesAccount: "", | ||||||
|       payRemark: "", |       payRemark: "", | ||||||
|       fileUrls: "", |       fileUrls: "", | ||||||
|       inspectionId: "", |       inspectionId: "", | ||||||
|  |       settlementForm: { | ||||||
|  |         settlementAmount: 0, | ||||||
|  |         goodsPrice: 0, | ||||||
|  |         settlementReduceMoney: 0, | ||||||
|  |       }, | ||||||
|       size: "", |       size: "", | ||||||
|       workId: "", |       workId: "", | ||||||
|       // workerList:[], |       // workerList:[], | ||||||
| @ -1168,8 +1258,10 @@ export default { | |||||||
|       // 是否显示弹出层 |       // 是否显示弹出层 | ||||||
|       open: false, |       open: false, | ||||||
|       openxin: false, |       openxin: false, | ||||||
|  |       openSettlementWork: false, | ||||||
|       opendetail: false, |       opendetail: false, | ||||||
|       openhe: false, |       openhe: false, | ||||||
|  |       tableHtml: undefined, | ||||||
|       htmlStr: null, |       htmlStr: null, | ||||||
|       detailForm: [], |       detailForm: [], | ||||||
|       selectInspectionProject: [], |       selectInspectionProject: [], | ||||||
| @ -1191,7 +1283,7 @@ export default { | |||||||
|         rescueStatus: null, |         rescueStatus: null, | ||||||
|         rescueAmount: null, |         rescueAmount: null, | ||||||
|         businessChannel: null, |         businessChannel: null, | ||||||
|         dateType:'jcTime' |         dateType: 'jcTime' | ||||||
|       }, |       }, | ||||||
|       // 表单参数 |       // 表单参数 | ||||||
|       form: {}, |       form: {}, | ||||||
| @ -1308,7 +1400,7 @@ export default { | |||||||
|         pageNum: this.batchQueryParams.pageNum || 1, |         pageNum: this.batchQueryParams.pageNum || 1, | ||||||
|         pageSize: this.batchQueryParams.pageSize || 100, |         pageSize: this.batchQueryParams.pageSize || 100, | ||||||
|         accountingConfirm: '1', |         accountingConfirm: '1', | ||||||
|         dateType:'jcTime' |         dateType: 'jcTime' | ||||||
|       }; |       }; | ||||||
|       if (this.selectBatchType == "cn") { |       if (this.selectBatchType == "cn") { | ||||||
|         listWorkOrder(params).then((response) => { |         listWorkOrder(params).then((response) => { | ||||||
| @ -1461,6 +1553,13 @@ export default { | |||||||
|       } |       } | ||||||
|       this.payMoney = this.goodsPrice / 100 - this.reduceMoney; |       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() { |     batchJisuan() { | ||||||
|       if (this.settleForm.reduceMoney > this.settleForm.goodsPrice) { |       if (this.settleForm.reduceMoney > this.settleForm.goodsPrice) { | ||||||
|         this.settleForm.reduceMoney = this.settleForm.goodsPrice; |         this.settleForm.reduceMoney = this.settleForm.goodsPrice; | ||||||
| @ -1484,6 +1583,14 @@ export default { | |||||||
|       }; |       }; | ||||||
|       offlineCharging(data).then((res) => { |       offlineCharging(data).then((res) => { | ||||||
|         this.openxin = false; |         this.openxin = false; | ||||||
|  |         this.$message.success("收款成功"); | ||||||
|  |         this.getList(); | ||||||
|  |       }); | ||||||
|  |     }, | ||||||
|  |     submitSettlementForm() { | ||||||
|  | 
 | ||||||
|  |       settlement(this.settlementForm).then((res) => { | ||||||
|  |         this.openSettlementWork = false; | ||||||
|         this.$message.success("结算成功"); |         this.$message.success("结算成功"); | ||||||
|         this.getList(); |         this.getList(); | ||||||
|       }); |       }); | ||||||
| @ -1531,14 +1638,35 @@ export default { | |||||||
|         inspectionDetail(row.id).then((res) => { |         inspectionDetail(row.id).then((res) => { | ||||||
|           this.offline = res.data; |           this.offline = res.data; | ||||||
|           this.goodsPrice = res.data.goodsPrice; |           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.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.fileUrls = res.data.files ? res.data.files : []; | ||||||
|           this.payRemark = res.data.payRemark ? res.data.payRemark : null; |           this.payRemark = res.data.payRemark ? res.data.payRemark : null; | ||||||
|           console.log(res); |           console.log(this.payMoney); | ||||||
|         }); |         }); | ||||||
|       this.openxin = true; |       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) { |     detail(row) { | ||||||
|       console.log("点击详情", row); |       console.log("点击详情", row); | ||||||
|       //根据id查询详情 |       //根据id查询详情 | ||||||
| @ -1820,6 +1948,32 @@ export default { | |||||||
|         `info_${new Date().getTime()}.xls` |         `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> | </script> | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user