index.vue 24 KB

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