123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499 |
- <template>
- <basic-container>
- <avue-crud :option="option" :data="dataList" ref="crud" v-model="form" :page.sync="page" :search.sync="search"
- :table-loading="loading" :cell-style="cellStyle" @search-change="searchChange" @search-reset="searchReset"
- @selection-change="selectionChange" @current-change="currentChange" @size-change="sizeChange"
- @refresh-change="refreshChange" @on-load="onLoad">
- <template slot="corpIdSearch">
- <!-- <select-component v-model="search.corpId" :configuration="configuration"></select-component>-->
- <el-select v-model="search.corpId" clearable placeholder="请选择">
- <el-option
- v-for="item in corpsList"
- :key="item.id"
- :label="item.cname"
- :value="item.id">
- </el-option>
- </el-select>
- </template>
- <template slot-scope="scope" slot="checkType">
- <span v-if="scope.row.checkType == 'ffsq'">付费申请</span>
- <span v-else-if="scope.row.checkType == 'xsqh'">销售请核</span>
- <span v-else-if="scope.row.checkType == 'cgqh'">采购请核</span>
- <span v-else-if="scope.row.checkType == 'xsgz'">小学部工资审批</span>
- <span v-else-if="scope.row.checkType == 'czgz'">初中部工资审批</span>
- <span v-else-if="scope.row.checkType == 'gzgz'">高中部工资审批</span>
- <span v-else-if="scope.row.checkType == 'hqgz'">后勤工资审批</span>
- <span v-else-if="scope.row.checkType == 'yrygz'">幼儿园工资审批</span>
- <span v-else-if="scope.row.checkType == 'yryhqgz'">幼儿园后勤工资审批</span>
- <span v-else-if="scope.row.checkType == 'ocg'">办公用品采购审批</span>
- <span v-else-if="scope.row.checkType == 'oly'">办公用品领用审批</span>
- <span v-else-if="scope.row.checkType == 'fybx'">费用报销审批</span>
- <span v-else-if="scope.row.checkType == 'jjd'">交接单审批</span>
- <span v-else-if="scope.row.checkType == 'xstpqh'">销售特批请核</span>
- <span v-else-if="scope.row.checkType == 'dldd'">代理订单请核</span>
- <span v-else-if="scope.row.checkType == 'xsjh'">销售机会请核</span>
- <span v-else-if="scope.row.checkType == 'RK'">入库管理审核</span>
- <span v-else-if="scope.row.checkType == 'CK'">出库管理审核</span>
- <span v-else-if="scope.row.checkType == 'PD'">库内盘点审核</span>
- <span v-else-if="scope.row.checkType == 'rzgl'">融资管理审核</span>
- <span v-else-if="scope.row.checkType == 'BUY'">买箱审核</span>
- <span v-else-if="scope.row.checkType == 'SELL'">卖箱审核</span>
- <span v-else-if="scope.row.checkType == 'CKZY'">出口装运</span>
- <span v-else-if="scope.row.checkType == 'JKFC'">进口返程</span>
- <span v-else-if="scope.row.checkType == 'REPAIR'">修箱</span>
- <span v-else-if="scope.row.checkType == 'WASH'">洗箱</span>
- <span v-else-if="scope.row.checkType == 'BGJK'">报关进口</span>
- <span v-else-if="scope.row.checkType == 'BGCK'">报关出口</span>
- <span v-else-if="scope.row.checkType == 'YPJ-XS'">易配件销售</span>
- <span v-else-if="scope.row.checkType == 'YPJ-CG'">易配件采购</span>
- <span v-else-if="scope.row.checkType == 'YPJ-XSJH'">销售计划</span>
- <span v-else-if="scope.row.checkType == 'ZR'">租入</span>
- <span v-else-if="scope.row.checkType == 'ZC'">租出</span>
- <span v-else-if="scope.row.checkType == 'HYCK-DJ'">海运出口</span>
- <span v-else-if="scope.row.checkType == 'HYCK-FY'">海运出口费用</span>
- <span v-else-if="scope.row.checkType == 'HYJK-DJ'">海运进口</span>
- <span v-else-if="scope.row.checkType == 'HYJK-FY'">海运进口费用</span>
- <span v-else-if="scope.row.checkType == 'XSTD'">销售退单请核</span>
- <span v-else-if="scope.row.checkType == 'YPJ-XSTH'">销售退款退货</span>
- <span v-else-if="scope.row.checkType == 'PJTK'">售后</span>
- <span v-else-if="scope.row.checkType == 'PJCG'">采购</span>
- </template>
- <template slot-scope="scope" slot="billNo">
- <span style="color: #1e9fff" @click="billNoDetails(scope.row)">{{scope.row.billNo}}</span>
- </template>
- <!-- <template slot="menuLeft">
- <el-button size="small" type="success" :disabled="selectionList.length == 0" @click.stop="batchCheck">批量审批
- </el-button>
- </template> -->
- <template slot-scope="scope" slot="menu">
- <!-- <el-button type="text" size="small" :disabled="scope.row.operate" @click.stop="jumpPage(scope.row)">查看-->
- <!-- </el-button>-->
- <el-button type="text" size="small" :disabled="scope.row.operate" @click.stop="jumpPage(scope.row)">查看
- </el-button>
- <!--<el-button type="text" size="small" :disabled="scope.row.auditStatus != 'S'" @click.stop="openCheck(scope.row)">-->
- <!-- 审批-->
- <!--</el-button>-->
- <el-button type="text" size="small" :disabled="scope.row.auditStatus != 'S'" @click.stop="handleReportPreview(scope.row.url,scope.row)">
- 审批
- </el-button>
- <el-button type="text" size="small" @click.stop="openCheckSchedule(scope.row)">审批流程
- </el-button>
- </template>
- </avue-crud>
- <el-dialog append-to-body title="审批进度" class="el-dialogDeep" :visible.sync="checkScheduleDialog" width="40%"
- :close-on-click-modal="false" :destroy-on-close="true" :close-on-press-escape="false" v-dialog-drag>
- <check-schedule :checkId="checkId" :batchNo="batchNo" @choceScheduleFun="choceScheduleFun">
- </check-schedule>
- </el-dialog>
- <!--<el-dialog append-to-body title="审批" class="el-dialogDeep" :visible.sync="checkDialog" width="50%"-->
- <!-- :close-on-click-modal="false" :destroy-on-close="true" :close-on-press-escape="false" v-dialog-drag>-->
- <!-- <check :checkData="checkData" :checkDetail="true" :idList="idList" @operationType="operationType"-->
- <!-- @choceCheckFun="choceCheckFun">-->
- <!-- </check>-->
- <!--</el-dialog>-->
- <reportContainerlos style="width: 100%; height: 100vh" ref="reportContainer">
- <check :checkData="checkData" :checkDetail="true" :idList="idList" @operationType="operationType"
- @choceCheckFun="choceCheckFun">
- </check>
- </reportContainerlos>
- </basic-container>
- </template>
- <script>
- import option from "./configuration/mainList.json";
- import option2 from "./configuration/mainList2.json";
- import option3 from "./configuration/mainList3.json";
- import option4 from "./configuration/mainList4.json";
- import { getList, approvePass, financingExcess } from "@/api/approveDataH/main";
- import checkSchedule from "@/components/checkH/checkSchedule";
- import check from "./check";
- import { getUserInfo } from "@/api/system/user";
- import { gainUser } from "@/api/basicData/customerInquiry";
- import {corpsDescListAll} from "../../api/tirePartsMall/salesManagement/saleOrder";
- import reportContainerlos from "@/views/iosBasicData/report-container/report-container-los.vue"
- import {finstlbillsDetail} from "../../api/iosBasicData/finstlbills";
- import {reportsGetReportData} from "@/api/iosBasicData/reports";
- let previousRouterName = "";
- let checkRefresh = "";
- export default {
- components: {
- check,
- checkSchedule,
- reportContainerlos
- },
- data() {
- return {
- corpsList: [],
- loading: false,
- form: {},
- search: {},
- show: true,
- checkDialog: false,
- checkId: "",
- batchNo: "",
- checkScheduleDialog: false,
- detailData: {},
- option: {},
- parentId: 0,
- checkData: {},
- dataList: [],
- idList: [],
- selectionList: [],
- page: {
- pageSize: 10,
- pagerCount: 5,
- total: 0
- },
- query: {},
- configuration: {
- multipleChoices: false,
- multiple: false,
- disabled: false,
- searchShow: true,
- collapseTags: false,
- clearable: true,
- placeholder: "请点击右边按钮选择",
- dicData: []
- }
- };
- },
- created() {
- getUserInfo().then(res => {
- if (res.data.data.billType == 1) {
- this.option = option2;
- } else {
- if (this.$store.getters.userInfo.tenant_id === "681169") {
- this.option = option3;
- }else if (this.$store.getters.userInfo.tenant_id === "673511") {
- this.option = option4;
- }else if (this.$store.getters.userInfo.tenant_id === "064132") {
- this.option = option4;
- } else {
- this.option = option;
- }
- console.log(this.option);
- }
- this.getWorkDicts("auditStatus").then(res => {
- this.findObject(this.option.column, "auditStatus").dicData =
- res.data.data;
- });
- gainUser().then(res => {
- this.findObject(this.option.column, "sendUserId").dicData =
- res.data.data;
- });
- this.getWorkDicts("tire_audit").then(res => {
- this.findObject(this.option.column, "processType").dicData =
- res.data.data;
- });
- });
- // 供应商
- // corpsDescListAll({corpType: "GYS"}).then(res => {
- // this.corpsList = res.data.data
- // })
- },
- mounted() {
- // option.height = window.innerHeight - 200 ;
- },
- activated() {
- if (this.$route.query.check === "refresh") {
- this.onLoad(this.page, this.search);
- }
- },
- methods: {
- // 预览报表
- async handleReportPreview(url,row){
- this.checkData = row
- const res = await reportsGetReportData({
- billId:row.billId,
- reportCode:'FYSH',
- groupCode:2,
- })
- var data = res.data.data.data.map((item,index)=>{
- item.index = index
- item.feeCenterList.forEach(ite=>{
- ite.ppid = index
- })
- return item
- })
- console.log(data,220)
- // 报表取的是最后一项,把第一项的数据赋值给最后一项
- data[data.length - 1].amountDrUsd = data[0].amountDrUsd
- data[data.length - 1].amountDr = data[0].amountDr
- data[data.length - 1].amountCrUsd = data[0].amountCrUsd
- data[data.length - 1].amountCr = data[0].amountCr
- data[data.length - 1].amountProfitUsd = data[0].amountProfitUsd
- data[data.length - 1].amountProfit = data[0].amountProfit
- data[data.length - 1].amountProfitLoc = data[0].amountProfitLoc
- data[data.length - 1].rate = data[0].rate
- data[data.length - 1].grossMargin = data[0].grossMargin
- console.log(row,203)
- Stimulsoft.Base.StiLicense.key = '6vJhGtLLLz2GNviWmUTrhSqnOItdDwjBylQzQcAOiHn0s4gy0Fr5YoUZ9V00Y0igCSFQzwEqYBh/N77k4f0fWXTHW5rqeBNLkaurJDenJ9o97TyqHs9HfvINK18Uwzsc/bG01Rq+x3H3Rf+g7AY92gvWmp7VA2Uxa30Q97f61siWz2dE5kdBVcCnSFzC6awE74JzDcJMj8OuxplqB1CYcpoPcOjKy1PiATlC3UsBaLEXsok1xxtRMQ283r282tkh8XQitsxtTczAJBxijuJNfziYhci2jResWXK51ygOOEbVAxmpflujkJ8oEVHkOA/CjX6bGx05pNZ6oSIu9H8deF94MyqIwcdeirCe60GbIQByQtLimfxbIZnO35X3fs/94av0ODfELqrQEpLrpU6FNeHttvlMc5UVrT4K+8lPbqR8Hq0PFWmFrbVIYSi7tAVFMMe2D1C59NWyLu3AkrD3No7YhLVh7LV0Tttr/8FrcZ8xirBPcMZCIGrRIesrHxOsZH2V8t/t0GXCnLLAWX+TNvdNXkB8cF2y9ZXf1enI064yE5dwMs2fQ0yOUG/xornE'
- // Stimulsoft.Base.StiLicense.Key = '6vJhGtLLLz2GNviWmUTrhSqnOItdDwjBylQzQcAOiHkcgIvwL0jnpsDqRpWg5FI5kt2G7A0tYIcUygBh1sPs7plofUOqPB1a4HBIXJB621mau2oiAIj+ysU7gKUXfjn/D5BocmduNB+ZMiDGPxFrAp3PoD0nYNkkWh8r7gBZ1v/JZSXGE3bQDrCQCNSy6mgby+iFAMV8/PuZ1z77U+Xz3fkpbm6MYQXYp3cQooLGLUti7k1TFWrnawT0iEEDJ2iRcU9wLqn2g9UiWesEZtKwI/UmEI2T7nv5NbgV+CHguu6QU4WWzFpIgW+3LUnKCT/vCDY+ymzgycw9A9+HFSzARiPzgOaAuQYrFDpzhXV+ZeX31AxWlnzjDWqpfluygSNPtGul5gyNt2CEoJD1Yom0VN9fvRonYsMsimkFFx2AwyVpPcs+JfVBtpPbTcZscnzUdmiIvxv8Gcin6sNSibM6in/uUKFt3bVgW/XeMYa7MLGF53kvBSwi78poUDigA2n12SmghLR0AHxyEDIgZGOTbNI33GWu7ZsPBeUdGu55R8w='
- Stimulsoft.Base.Localization.StiLocalization.addLocalizationFile( '/reports/stimulsoft/Localization/zh-CHS.xml', true, 'zh-CHS')
- Stimulsoft.Base.Localization.StiLocalization.setLocalizationFile('/reports/stimulsoft/Localization/zh-CHS.xml' )
- // 工具栏
- var options = new Stimulsoft.Viewer.StiViewerOptions()
- options.height = '100%'
- options.appearance.scrollbarsMode = true
- options.toolbar.showDesignButton = false
- options.toolbar.showAboutButton = false
- options.toolbar.showResourcesButton = false
- options.toolbar.showFullScreenButton = false
- options.toolbar.showOpenButton = false
- options.appearance.showTooltips = false
- options.appearance.showDialogsHelp = false
- options.exports.showExportToDocument = false
- options.toolbar.showParametersButton = true
- options.appearance.bookmarksPrint = true
- options.toolbar.printDestination = Stimulsoft.Viewer.StiPrintDestination.Direct
- options.appearance.htmlRenderMode = Stimulsoft.Report.Export.StiHtmlExportMode.Table
- let viewer = new Stimulsoft.Viewer.StiViewer(options, 'StiViewer', false)
- // 报表
- console.log("创建一个报表实例");
- let report = new window.Stimulsoft.Report.StiReport();
- // 加载文件
- console.log("从url加载报表");
- // report.loadFile("/reports/stimulsoft/demos/SimpleList.mrt");
- // report.load(row.url)
- report.load(res.data.data.url)
- // 加载数据
- var dataSet = new Stimulsoft.System.Data.DataSet(
- 'reportData'
- )
- dataSet.readJson(data)
- report.regData('reportData', 'reportData', dataSet)
- // 从模版和数据加载报表
- // loadReport(report, '', {})
- viewer.report = report;
- this.$refs.reportContainer.showContainer(
- ()=> {
- setTimeout(() => {
- viewer.renderHtml('reportContainer')
- this.createViewerButtons(viewer)
- }, 50)
- },
- ()=>{
- },
- )
- console.log(report,301)
- // var printButton = report.renderedPages[0].components.find(function(c) {
- // return c.name === 'printButton';
- // });
- // // 为按钮控件添加“PrintReport”事件
- // printButton.events.add('PrintReport', handlePrintReport);
- console.log("加载成功完成!");
- },
- createViewerButtons (viewer){
- viewer.jsObject.collections.images['myClose.png'] =
- 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABmJLR0QA/wD/AP+gvaeTAAAA0ElEQVQ4ja3TO05CQRQG4A8iOwAbtYWETndAaecK7NwCKmETtJZsSBNLobEz8ZFIJQ0UnOGSm3DnYviTybzO/895DQXGWGCVGQuMEqkRcwcfuMOLalziCaf4TIe9UG9nyMJmFRzNGoRK1BU4xxx9G7cfwostciGk+x8MqgySwDXe4tU53hVV+MNtTmAoX84JGv9NYgrHyR6DV8wUSW7hItZLm36ZVoVQxsFJLOMsPOrH/h7dQwR2cdxOTEn8DtUbPGc4V2H7Vb4Yqfedf/GYSGt8VUmxgyfuBAAAAABJRU5ErkJggg=='
- const closeBtn = viewer.jsObject.SmallButton(
- 'closeBtn',
- '关闭',
- 'myClose.png'
- )
- const toolbarTable = viewer.jsObject.controls.toolbar.firstChild.firstChild
- const buttonsTable = toolbarTable.rows[0].lastChild.lastChild
- const userButtonCell = buttonsTable.rows[0].insertCell(0)
- userButtonCell.className = 'stiJsViewerClearAllStyles'
- userButtonCell.appendChild(closeBtn)
- let that=this
- closeBtn.action = function() {
- console.log(that.$refs.ReportContainer)
- if (that.$refs.reportContainer)
- that.$refs.reportContainer.hideContainer()
- }
- },
- batchCheck() {
- for (let i = 0; i < this.selectionList.length; i++) {
- if (this.selectionList[i].auditStatus != "S") {
- return this.$message.error("审核状态必须都为待审核状态!");
- } else {
- this.idList.push(this.selectionList[i].id);
- }
- }
- //打开cheack
- this.checkDialog = true;
- },
- operationType() {
- // this.checkDialog = false;
- this.$refs.reportContainer.visible = false
- this.refreshChange();
- this.idList = [];
- },
- // 业务编号跳转详情
- billNoDetails(row){
- this.$router.push({
- path: '/iosBasicData/SeafreightExportF/bills/index',
- query: {
- id:row.billId
- }
- });
- },
- //跳转页面
- jumpPage(row) {
- console.log('row',row);
- console.log(eval("(" + row.pageStatus + ")"))
- if (row.url) {
- if (eval("(" + row.pageStatus + ")")) {
- this.$alert(
- "" +
- row.pageLabel +
- "页面已存在,请关闭" +
- row.pageLabel +
- "页面再进行操作",
- "温馨提示",
- {
- confirmButtonText: "确定",
- type: "warning",
- callback: action => { }
- }
- );
- } else {
- this.$router.$avueRouter.closeTag(row.url);
- this.$router.push({
- path: row.url,
- query: {}
- });
- }
- }
- },
- //审批通过
- pass(row, operate) {
- row.operate = operate;
- this.loading = true;
- approvePass(row)
- .then(res => {
- this.$message.success("操作成功!");
- this.refreshChange();
- })
- .finally(() => {
- this.loading = false;
- });
- },
- openCheck(row) {
- if (row.checkType == 'CK') {
- financingExcess({ id: row.corpId }).then(res => {
- if (res.data.data == '操作成功') {
- this.batch = false; //单条操作
- this.checkDialog = true;
- this.checkData = row;
- } else {
- this.$confirm(res.data.data, {
- confirmButtonText: "确定",
- cancelButtonText: "取消",
- type: "warning"
- }).then(() => {
- this.batch = false; //单条操作
- this.checkDialog = true;
- this.checkData = row;
- })
- }
- })
- } else {
- this.batch = false; //单条操作
- this.checkDialog = true;
- this.checkData = row;
- }
- },
- choceCheckFun() {
- // this.checkDialog = false;
- this.$refs.reportContainer.visible = false
- this.refreshChange();
- },
- openCheckSchedule(row) {
- this.checkId = row.srcBillId;
- this.batchNo = row.batchNo;
- this.checkScheduleDialog = true;
- },
- //关闭审批流程页面
- choceScheduleFun() {
- this.checkScheduleDialog = false;
- },
- //新单打开
- addReceipt(row) { },
- //编辑打开
- editOpen(row, status) {
- this.detailData = {
- id: row.id,
- status: status
- };
- this.show = false;
- },
- //点击搜索按钮触发
- searchChange(params, done) {
- this.query = params;
- this.page.currentPage = 1;
- this.onLoad(this.page, params);
- done();
- },
- searchReset() {
- console.log("1");
- },
- selectionChange(list) {
- this.idList = []
- this.selectionList = list;
- },
- currentChange(val) {
- this.page.currentPage = val;
- },
- sizeChange() {
- console.log("1");
- },
- refreshChange(params) {
- this.onLoad(this.page, params);
- },
- paramsAdjustment(params) {
- params = Object.assign({}, this.search);
- if (!params.auditStatus && params.auditStatus !== "") {
- params.auditStatus = "S";
- }
- return params;
- },
- onLoad(page, params) {
- this.loading = true;
- params = this.paramsAdjustment(params);
- if (params.sendTime) {
- params.applybegintime = params.sendTime[0]
- params.applyendtime = params.sendTime[1]
- delete params.sendTime
- }
- getList(page.currentPage, page.pageSize, params).then(res => {
- this.dataList = res.data.data.records;
- this.page.total = res.data.data.total;
- }).finally(() => {
- this.loading = false;
- });
- },
- cellStyle() {
- return "padding:0;height:40px;";
- }
- }
- };
- </script>
- <style scoped>
- </style>
|