index.vue 23 KB

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