index.vue 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620
  1. <template>
  2. <basic-container>
  3. <avue-crud :option="option" :data="dataList" ref="crud" v-model="form" :page.sync="page" :search.sync="search"
  4. :table-loading="loading" :cell-style="cellStyle" @search-change="searchChange" @search-reset="searchReset"
  5. @selection-change="selectionChange" @current-change="currentChange" @size-change="sizeChange"
  6. @refresh-change="refreshChange" @on-load="onLoad">
  7. <template slot="corpIdSearch">
  8. <!-- <select-component v-model="search.corpId" :configuration="configuration"></select-component>-->
  9. <el-select v-model="search.corpId" clearable placeholder="请选择">
  10. <el-option
  11. v-for="item in corpsList"
  12. :key="item.id"
  13. :label="item.cname"
  14. :value="item.id">
  15. </el-option>
  16. </el-select>
  17. </template>
  18. <template slot-scope="scope" slot="checkType">
  19. <span v-if="scope.row.checkType == 'HYCK-FFSQ'">付费申请</span>
  20. <span v-if="scope.row.checkType == 'HYCK-FPSQ'">发票申请</span>
  21. <span v-else-if="scope.row.checkType == 'HYCK-DJ'">海运出口</span>
  22. <span v-else-if="scope.row.checkType == 'HYCK-FY'">海运出口费用</span>
  23. <span v-else-if="scope.row.checkType == 'HYJK-DJ'">海运进口</span>
  24. <span v-else-if="scope.row.checkType == 'HYJK-FY'">海运进口费用</span>
  25. <span v-else-if="scope.row.checkType == 'sea-approve'">海运出口AMEND</span>
  26. <span v-else-if="scope.row.checkType == 'sia-approve'">海运进口AMEND</span>
  27. <span v-else-if="scope.row.checkType == 'aea-approve'">空运出口AMEND</span>
  28. <span v-else-if="scope.row.checkType == 'aia-approve'">空运进口AMEND</span>
  29. <span v-else-if="scope.row.checkType == 'KYCK-DJ'">空运出口</span>
  30. <span v-else-if="scope.row.checkType == 'KYJK-DJ'">空运进口</span>
  31. <span v-else-if="scope.row.checkType == 'BGSE'">海运出口报关</span>
  32. <span v-else-if="scope.row.checkType == 'BGSI'">海运进口报关</span>
  33. <span v-else-if="scope.row.checkType == 'BGAE'">空运出口报关</span>
  34. <span v-else-if="scope.row.checkType == 'BGAI'">空运进口报关</span>
  35. <span v-else-if="scope.row.checkType == 'FFSQ-SK'">贸易代理货款付费申请</span>
  36. <span v-else-if="scope.row.checkType == 'MYDL'">贸易代理单据审核</span>
  37. <span v-else-if="scope.row.checkType == 'YSQR-C'">贸易代理货款付费确认</span>
  38. <span v-else-if="scope.row.checkType == 'YSQR-D'">贸易代理货款收费确认</span>
  39. </template>
  40. <template slot-scope="scope" slot="billNo">
  41. <span style="color: #1e9fff;cursor: pointer;" @click="billNoDetails(scope.row)">{{scope.row.billNo}}</span>
  42. </template>
  43. <!-- <template slot="menuLeft">
  44. <el-button size="small" type="success" :disabled="selectionList.length == 0" @click.stop="batchCheck">批量审批
  45. </el-button>
  46. </template> -->
  47. <template slot-scope="scope" slot="menu">
  48. <!-- <el-button type="text" size="small" :disabled="scope.row.operate" @click.stop="jumpPage(scope.row)">查看-->
  49. <!-- </el-button>-->
  50. <el-button type="text" size="small" :disabled="scope.row.operate" @click.stop="jumpPage(scope.row)">查看
  51. </el-button>
  52. <el-button type="text" size="small"
  53. v-if="scope.row.checkType == 'HYCK-DJ'"
  54. :disabled="scope.row.auditStatus != 'S'"
  55. @click.stop="printWindowfun(scope.row,'HYCK-DJ')">审批
  56. </el-button>
  57. <el-button type="text" size="small"
  58. v-else-if="scope.row.checkType == 'HYJK-DJ'"
  59. :disabled="scope.row.auditStatus != 'S'"
  60. @click.stop="printWindowfun(scope.row,'HYJK-DJ')">审批
  61. </el-button>
  62. <el-button type="text" size="small"
  63. v-else-if="scope.row.checkType == 'KYCK-DJ'"
  64. :disabled="scope.row.auditStatus != 'S'"
  65. @click.stop="printWindowfun(scope.row,'KYCK-DJ')">审批
  66. </el-button>
  67. <el-button type="text" size="small"
  68. v-else-if="scope.row.checkType == 'KYJK-DJ'"
  69. :disabled="scope.row.auditStatus != 'S'"
  70. @click.stop="printWindowfun(scope.row,'KYJK-DJ')">审批
  71. </el-button>
  72. <el-button type="text" size="small"
  73. v-else-if="scope.row.checkType == 'HYCK-FFSQ'"
  74. :disabled="scope.row.auditStatus != 'S'"
  75. @click.stop="printWindowfun(scope.row,'HYCK-FFSQ')">审批
  76. </el-button>
  77. <el-button type="text" size="small"
  78. v-else-if="scope.row.checkType == 'sea-approve'"
  79. :disabled="scope.row.auditStatus != 'S'"
  80. @click.stop="printWindowfun(scope.row,'sea-approve')">审批
  81. </el-button>
  82. <el-button type="text" size="small"
  83. v-else-if="scope.row.checkType == 'sia-approve'"
  84. :disabled="scope.row.auditStatus != 'S'"
  85. @click.stop="printWindowfun(scope.row,'sia-approve')">审批
  86. </el-button>
  87. <el-button type="text" size="small"
  88. v-else-if="scope.row.checkType == 'aea-approve'"
  89. :disabled="scope.row.auditStatus != 'S'"
  90. @click.stop="printWindowfun(scope.row,'aea-approve')">审批
  91. </el-button>
  92. <el-button type="text" size="small"
  93. v-else-if="scope.row.checkType == 'aia-approve'"
  94. :disabled="scope.row.auditStatus != 'S'"
  95. @click.stop="printWindowfun(scope.row,'aia-approve')">审批
  96. </el-button>
  97. <el-button type="text" size="small"
  98. v-else
  99. :disabled="scope.row.auditStatus != 'S'"
  100. @click.stop="openCheck(scope.row)">审批
  101. </el-button>
  102. <el-button type="text" size="small" @click.stop="openCheckSchedule(scope.row)">审批流程
  103. </el-button>
  104. </template>
  105. </avue-crud>
  106. <el-dialog append-to-body title="审批进度" class="el-dialogDeep" :visible.sync="checkScheduleDialog" width="40%"
  107. :close-on-click-modal="false" :destroy-on-close="true" :close-on-press-escape="false" v-dialog-drag>
  108. <check-schedule :checkId="checkId" :batchNo="batchNo" @choceScheduleFun="choceScheduleFun">
  109. </check-schedule>
  110. </el-dialog>
  111. <!--单个审批-->
  112. <el-dialog append-to-body title="审批" class="el-dialogDeep" :visible.sync="checkDialog" width="50%"
  113. :close-on-click-modal="false" :destroy-on-close="true" :close-on-press-escape="false" v-dialog-drag>
  114. <check :checkData="checkData" :checkDetail="true" :idList="idList" @operationType="operationTypeFFSQ"
  115. @choceCheckFun="choceCheckFFSQ">
  116. </check>
  117. </el-dialog>
  118. <!--报表+审批-->
  119. <reportContainerlos style="width: 100%; height: 100vh" ref="reportContainer">
  120. <check :checkData="checkData" :checkDetail="true" :idList="idList" @operationType="operationType"
  121. @choceCheckFun="choceCheckFun">
  122. </check>
  123. </reportContainerlos>
  124. <!--<el-dialog-->
  125. <!-- title="打印"-->
  126. <!-- :visible.sync="selectPrintingDialog"-->
  127. <!-- append-to-body-->
  128. <!-- width="70%"-->
  129. <!-- :before-close="handleClose">-->
  130. <!-- <div>-->
  131. <!-- <reportformsList ref="reportformsList" @reportRadio="reportRadio"></reportformsList>-->
  132. <!-- </div>-->
  133. <!-- <span slot="footer" class="dialog-footer">-->
  134. <!-- <el-button size="small" @click="selectPrintingDialog = false;">取 消</el-button>-->
  135. <!-- </span>-->
  136. <!--</el-dialog>-->
  137. </basic-container>
  138. </template>
  139. <script>
  140. import option from "./configuration/mainList.json";
  141. import option2 from "./configuration/mainList2.json";
  142. import option3 from "./configuration/mainList3.json";
  143. import option4 from "./configuration/mainList4.json";
  144. import { getList, approvePass, financingExcess } from "@/api/approveDataH/main";
  145. import checkSchedule from "@/components/checkH/checkSchedule";
  146. import check from "./check";
  147. import { getUserInfo } from "@/api/system/user";
  148. import { gainUser } from "@/api/basicData/customerInquiry";
  149. import {corpsDescListAll} from "../../api/tirePartsMall/salesManagement/saleOrder";
  150. import reportContainerlos from "@/views/iosBasicData/report-container/report-container-los.vue"
  151. import {finstlbillsDetail} from "../../api/iosBasicData/finstlbills";
  152. import {reportsGetReportData} from "@/api/iosBasicData/reports";
  153. import reportformsList from "@/views/iosBasicData/SeafreightExportF/bills/assembly/reportformsList.vue";
  154. import {getList as getreportsList} from "@/api/iosBasicData/reports";
  155. let previousRouterName = "";
  156. let checkRefresh = "";
  157. export default {
  158. components: {
  159. reportformsList,
  160. check,
  161. checkSchedule,
  162. reportContainerlos
  163. },
  164. data() {
  165. return {
  166. selectPrintingDialog:false, // 打印弹窗
  167. reportsData:{}, // 当前要审核数据
  168. reportlist:[], // 报表数据
  169. corpsList: [],
  170. loading: false,
  171. form: {},
  172. search: {},
  173. show: true,
  174. checkDialog: false,
  175. checkId: "",
  176. batchNo: "",
  177. checkScheduleDialog: false,
  178. detailData: {},
  179. option: {},
  180. parentId: 0,
  181. checkData: {},
  182. dataList: [],
  183. idList: [],
  184. selectionList: [],
  185. page: {
  186. pageSize: 10,
  187. pagerCount: 5,
  188. total: 0
  189. },
  190. query: {},
  191. configuration: {
  192. multipleChoices: false,
  193. multiple: false,
  194. disabled: false,
  195. searchShow: true,
  196. collapseTags: false,
  197. clearable: true,
  198. placeholder: "请点击右边按钮选择",
  199. dicData: []
  200. }
  201. };
  202. },
  203. created() {
  204. getUserInfo().then(res => {
  205. if (res.data.data.billType == 1) {
  206. this.option = option2;
  207. } else {
  208. if (this.$store.getters.userInfo.tenant_id === "681169") {
  209. this.option = option3;
  210. }else if (this.$store.getters.userInfo.tenant_id === "673511") {
  211. this.option = option4;
  212. }else if (this.$store.getters.userInfo.tenant_id === "064132") {
  213. this.option = option4;
  214. } else {
  215. this.option = option;
  216. }
  217. }
  218. this.getWorkDicts("auditStatus").then(res => {
  219. this.findObject(this.option.column, "auditStatus").dicData =
  220. res.data.data;
  221. });
  222. gainUser().then(res => {
  223. this.findObject(this.option.column, "sendUserId").dicData =
  224. res.data.data;
  225. });
  226. this.getWorkDicts("tire_audit").then(res => {
  227. this.findObject(this.option.column, "processType").dicData =
  228. res.data.data;
  229. });
  230. });
  231. // 供应商
  232. // corpsDescListAll({corpType: "GYS"}).then(res => {
  233. // this.corpsList = res.data.data
  234. // })
  235. },
  236. mounted() {
  237. // option.height = window.innerHeight - 200 ;
  238. },
  239. activated() {
  240. if (this.$route.query.check === "refresh") {
  241. this.onLoad(this.page, this.search);
  242. }
  243. },
  244. methods: {
  245. // 点击审核弹出打印表格
  246. printWindowfun(row,type){
  247. // 当时选择的数据
  248. this.reportsData = row
  249. this.checkData = row
  250. let obj = {}
  251. if (type == 'HYCK-DJ') {
  252. obj = {
  253. businessType:'HYCK',
  254. classifyCode:'业务',
  255. groupCode:'销售报告'
  256. }
  257. }else if (type == 'HYJK-DJ') {
  258. obj = {
  259. businessType:'HYJK',
  260. classifyCode:'业务',
  261. groupCode:'销售报告'
  262. }
  263. } else if (type == 'KYCK-DJ') {
  264. obj = {
  265. businessType:'KYCK',
  266. classifyCode:'业务',
  267. groupCode:'销售报告'
  268. }
  269. }else if (type == 'KYJK-DJ') {
  270. obj = {
  271. businessType:'KYJK',
  272. classifyCode:'业务',
  273. groupCode:'销售报告'
  274. }
  275. } else if (type == 'HYCK-FFSQ') {
  276. obj = {
  277. businessType:'FFSQ',
  278. classifyCode:'付费申请',
  279. groupCode:'付费申请'
  280. }
  281. }else if (type == 'sea-approve') {
  282. obj = {
  283. businessType:'AMEND',
  284. classifyCode:'AMENDSE',
  285. groupCode:'SE'
  286. }
  287. }else if (type == 'sia-approve') {
  288. obj = {
  289. businessType:'AMEND',
  290. classifyCode:'AMENDSI',
  291. groupCode:'SI'
  292. }
  293. }else if (type == 'aea-approve') {
  294. obj = {
  295. businessType:'AMEND',
  296. classifyCode:'AMENDAE',
  297. groupCode:'AE'
  298. }
  299. }else if (type == 'aia-approve') {
  300. obj = {
  301. businessType:'AMEND',
  302. classifyCode:'AMENDAI',
  303. groupCode:'AI'
  304. }
  305. }else {}
  306. getreportsList(1, 10, obj).then(res=>{
  307. this.reportRadio(res.data.data.records[0])
  308. })
  309. // this.selectPrintingDialog = true
  310. // let page = {
  311. // pageSize: 10,
  312. // currentPage: 1,
  313. // total: 0
  314. // }
  315. // this.$nextTick(()=>{
  316. // this.$refs.reportformsList.onLoad(page,{
  317. // businessType:'HYCK',
  318. // classifyCode:'业务',
  319. // groupCode:'销售报告'
  320. // })
  321. // })
  322. },
  323. // 获取报表数据
  324. reportRadio(val){
  325. console.log(val,240)
  326. reportsGetReportData({
  327. billId:this.reportsData.billId,
  328. reportCode:val.classifyCode,
  329. groupCode:val.groupCode,
  330. type:val.businessType
  331. }).then(res=>{
  332. // 关闭弹窗
  333. this.selectPrintingDialog = false
  334. this.handleReportPreview(val.url,res.data.data.data)
  335. })
  336. },
  337. // 关闭弹窗
  338. handleClose(done) {
  339. done()
  340. },
  341. // 预览报表
  342. handleReportPreview(url,data){
  343. this.reportlist = data // 存一下数据 打印的时候需要传
  344. Stimulsoft.Base.StiLicense.key = '6vJhGtLLLz2GNviWmUTrhSqnOItdDwjBylQzQcAOiHn0s4gy0Fr5YoUZ9V00Y0igCSFQzwEqYBh/N77k4f0fWXTHW5rqeBNLkaurJDenJ9o97TyqHs9HfvINK18Uwzsc/bG01Rq+x3H3Rf+g7AY92gvWmp7VA2Uxa30Q97f61siWz2dE5kdBVcCnSFzC6awE74JzDcJMj8OuxplqB1CYcpoPcOjKy1PiATlC3UsBaLEXsok1xxtRMQ283r282tkh8XQitsxtTczAJBxijuJNfziYhci2jResWXK51ygOOEbVAxmpflujkJ8oEVHkOA/CjX6bGx05pNZ6oSIu9H8deF94MyqIwcdeirCe60GbIQByQtLimfxbIZnO35X3fs/94av0ODfELqrQEpLrpU6FNeHttvlMc5UVrT4K+8lPbqR8Hq0PFWmFrbVIYSi7tAVFMMe2D1C59NWyLu3AkrD3No7YhLVh7LV0Tttr/8FrcZ8xirBPcMZCIGrRIesrHxOsZH2V8t/t0GXCnLLAWX+TNvdNXkB8cF2y9ZXf1enI064yE5dwMs2fQ0yOUG/xornE'
  345. // Stimulsoft.Base.StiLicense.Key = '6vJhGtLLLz2GNviWmUTrhSqnOItdDwjBylQzQcAOiHkcgIvwL0jnpsDqRpWg5FI5kt2G7A0tYIcUygBh1sPs7plofUOqPB1a4HBIXJB621mau2oiAIj+ysU7gKUXfjn/D5BocmduNB+ZMiDGPxFrAp3PoD0nYNkkWh8r7gBZ1v/JZSXGE3bQDrCQCNSy6mgby+iFAMV8/PuZ1z77U+Xz3fkpbm6MYQXYp3cQooLGLUti7k1TFWrnawT0iEEDJ2iRcU9wLqn2g9UiWesEZtKwI/UmEI2T7nv5NbgV+CHguu6QU4WWzFpIgW+3LUnKCT/vCDY+ymzgycw9A9+HFSzARiPzgOaAuQYrFDpzhXV+ZeX31AxWlnzjDWqpfluygSNPtGul5gyNt2CEoJD1Yom0VN9fvRonYsMsimkFFx2AwyVpPcs+JfVBtpPbTcZscnzUdmiIvxv8Gcin6sNSibM6in/uUKFt3bVgW/XeMYa7MLGF53kvBSwi78poUDigA2n12SmghLR0AHxyEDIgZGOTbNI33GWu7ZsPBeUdGu55R8w='
  346. Stimulsoft.Base.Localization.StiLocalization.addLocalizationFile( '/reports/stimulsoft/Localization/zh-CHS.xml', true, 'zh-CHS')
  347. Stimulsoft.Base.Localization.StiLocalization.setLocalizationFile('/reports/stimulsoft/Localization/zh-CHS.xml' )
  348. // 工具栏
  349. var options = new Stimulsoft.Viewer.StiViewerOptions()
  350. options.height = '100%'
  351. options.appearance.scrollbarsMode = true
  352. options.toolbar.showDesignButton = false
  353. options.toolbar.showAboutButton = false
  354. options.toolbar.showResourcesButton = false
  355. options.toolbar.showFullScreenButton = false
  356. options.toolbar.showOpenButton = false
  357. options.appearance.showTooltips = false
  358. options.appearance.showDialogsHelp = false
  359. options.exports.showExportToDocument = false
  360. options.toolbar.showParametersButton = true
  361. options.appearance.bookmarksPrint = true
  362. options.toolbar.printDestination = Stimulsoft.Viewer.StiPrintDestination.Direct
  363. options.appearance.htmlRenderMode = Stimulsoft.Report.Export.StiHtmlExportMode.Table
  364. let viewer = new Stimulsoft.Viewer.StiViewer(options, 'StiViewer', false)
  365. // 报表
  366. console.log("创建一个报表实例");
  367. let report = new window.Stimulsoft.Report.StiReport();
  368. // 加载文件
  369. console.log("从url加载报表");
  370. // report.loadFile("/reports/stimulsoft/demos/SimpleList.mrt");
  371. // report.load(row.url)
  372. report.load(url)
  373. // 加载数据
  374. var dataSet = new Stimulsoft.System.Data.DataSet(
  375. 'reportData'
  376. )
  377. dataSet.readJson(data)
  378. report.regData('reportData', 'reportData', dataSet)
  379. // 从模版和数据加载报表
  380. // loadReport(report, '', {})
  381. viewer.report = report;
  382. this.$refs.reportContainer.showContainer(
  383. ()=> {
  384. setTimeout(() => {
  385. viewer.renderHtml('reportContainer')
  386. this.createViewerButtons(viewer)
  387. }, 50)
  388. },
  389. ()=>{
  390. },
  391. )
  392. console.log(report,301)
  393. // var printButton = report.renderedPages[0].components.find(function(c) {
  394. // return c.name === 'printButton';
  395. // });
  396. // // 为按钮控件添加“PrintReport”事件
  397. // printButton.events.add('PrintReport', handlePrintReport);
  398. console.log("加载成功完成!");
  399. },
  400. // 报表的按钮
  401. createViewerButtons (viewer){
  402. viewer.jsObject.collections.images['myClose.png'] =
  403. 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABmJLR0QA/wD/AP+gvaeTAAAA0ElEQVQ4ja3TO05CQRQG4A8iOwAbtYWETndAaecK7NwCKmETtJZsSBNLobEz8ZFIJQ0UnOGSm3DnYviTybzO/895DQXGWGCVGQuMEqkRcwcfuMOLalziCaf4TIe9UG9nyMJmFRzNGoRK1BU4xxx9G7cfwostciGk+x8MqgySwDXe4tU53hVV+MNtTmAoX84JGv9NYgrHyR6DV8wUSW7hItZLm36ZVoVQxsFJLOMsPOrH/h7dQwR2cdxOTEn8DtUbPGc4V2H7Vb4Yqfedf/GYSGt8VUmxgyfuBAAAAABJRU5ErkJggg=='
  404. const closeBtn = viewer.jsObject.SmallButton(
  405. 'closeBtn',
  406. '关闭',
  407. 'myClose.png'
  408. )
  409. const toolbarTable = viewer.jsObject.controls.toolbar.firstChild.firstChild
  410. const buttonsTable = toolbarTable.rows[0].lastChild.lastChild
  411. const userButtonCell = buttonsTable.rows[0].insertCell(0)
  412. userButtonCell.className = 'stiJsViewerClearAllStyles'
  413. userButtonCell.appendChild(closeBtn)
  414. let that = this
  415. closeBtn.action = function() {
  416. console.log(that.$refs.ReportContainer)
  417. if (that.$refs.reportContainer)
  418. that.$refs.reportContainer.hideContainer()
  419. }
  420. },
  421. batchCheck() {
  422. for (let i = 0; i < this.selectionList.length; i++) {
  423. if (this.selectionList[i].auditStatus != "S") {
  424. return this.$message.error("审核状态必须都为待审核状态!");
  425. } else {
  426. this.idList.push(this.selectionList[i].id);
  427. }
  428. }
  429. //打开cheack
  430. this.checkDialog = true;
  431. },
  432. operationType() {
  433. // this.checkDialog = false;
  434. this.$refs.reportContainer.visible = false
  435. this.refreshChange();
  436. this.idList = [];
  437. },
  438. operationTypeFFSQ() {
  439. this.checkDialog = false;
  440. this.refreshChange();
  441. this.idList = [];
  442. },
  443. // 业务编号跳转详情
  444. billNoDetails(row){
  445. this.$router.push({
  446. path: '/iosBasicData/SeafreightExportF/bills/index',
  447. query: {
  448. id:row.billId
  449. }
  450. });
  451. },
  452. //跳转页面
  453. jumpPage(row) {
  454. console.log('row',row);
  455. if (row.url) {
  456. if (row.pageStatus&&eval("(" + row.pageStatus + ")")) {
  457. this.$alert(
  458. "" +
  459. row.pageLabel +
  460. "页面已存在,请关闭" +
  461. row.pageLabel +
  462. "页面再进行操作",
  463. "温馨提示",
  464. {
  465. confirmButtonText: "确定",
  466. type: "warning",
  467. callback: action => { }
  468. }
  469. );
  470. } else {
  471. this.$router.$avueRouter.closeTag(row.url);
  472. this.$router.push({
  473. path: row.url,
  474. query: {
  475. billId:row.billId
  476. }
  477. });
  478. }
  479. }else {
  480. this.$message.warning('当前数据无法跳转')
  481. }
  482. },
  483. //审批通过
  484. pass(row, operate) {
  485. row.operate = operate;
  486. this.loading = true;
  487. approvePass(row)
  488. .then(res => {
  489. this.$message.success("操作成功!");
  490. this.refreshChange();
  491. })
  492. .finally(() => {
  493. this.loading = false;
  494. });
  495. },
  496. openCheck(row) {
  497. if (row.checkType == 'CK') {
  498. financingExcess({ id: row.corpId }).then(res => {
  499. if (res.data.data == '操作成功') {
  500. this.batch = false; //单条操作
  501. this.checkDialog = true;
  502. this.checkData = row;
  503. } else {
  504. this.$confirm(res.data.data, {
  505. confirmButtonText: "确定",
  506. cancelButtonText: "取消",
  507. type: "warning"
  508. }).then(() => {
  509. this.batch = false; //单条操作
  510. this.checkDialog = true;
  511. this.checkData = row;
  512. })
  513. }
  514. })
  515. } else {
  516. this.batch = false; //单条操作
  517. this.checkDialog = true;
  518. this.checkData = row;
  519. }
  520. },
  521. choceCheckFun() {
  522. // this.checkDialog = false;
  523. this.$refs.reportContainer.visible = false
  524. this.refreshChange();
  525. },
  526. choceCheckFFSQ() {
  527. this.checkDialog = false;
  528. this.refreshChange();
  529. },
  530. openCheckSchedule(row) {
  531. this.checkId = row.srcBillId;
  532. this.batchNo = row.batchNo;
  533. this.checkScheduleDialog = true;
  534. },
  535. //关闭审批流程页面
  536. choceScheduleFun() {
  537. this.checkScheduleDialog = false;
  538. },
  539. //新单打开
  540. addReceipt(row) { },
  541. //编辑打开
  542. editOpen(row, status) {
  543. this.detailData = {
  544. id: row.id,
  545. status: status
  546. };
  547. this.show = false;
  548. },
  549. //点击搜索按钮触发
  550. searchChange(params, done) {
  551. this.query = params;
  552. this.page.currentPage = 1;
  553. this.onLoad(this.page, params);
  554. done();
  555. },
  556. searchReset() {
  557. console.log("1");
  558. },
  559. selectionChange(list) {
  560. this.idList = []
  561. this.selectionList = list;
  562. },
  563. currentChange(val) {
  564. this.page.currentPage = val;
  565. },
  566. sizeChange() {
  567. console.log("1");
  568. },
  569. refreshChange(params) {
  570. this.onLoad(this.page, params);
  571. },
  572. paramsAdjustment(params) {
  573. params = Object.assign({}, this.search);
  574. if (!params.auditStatus && params.auditStatus !== "") {
  575. params.auditStatus = "S";
  576. }
  577. return params;
  578. },
  579. onLoad(page, params) {
  580. this.loading = true;
  581. params = this.paramsAdjustment(params);
  582. if (params.sendTime) {
  583. params.applybegintime = params.sendTime[0]
  584. params.applyendtime = params.sendTime[1]
  585. delete params.sendTime
  586. }
  587. getList(page.currentPage, page.pageSize, params).then(res => {
  588. this.dataList = res.data.data.records;
  589. this.page.total = res.data.data.total;
  590. }).finally(() => {
  591. this.loading = false;
  592. });
  593. },
  594. cellStyle() {
  595. return "padding:0;height:40px;";
  596. }
  597. }
  598. };
  599. </script>
  600. <style scoped>
  601. </style>