Commit 3806fd9a authored by zhoutong's avatar zhoutong

操作页面的步骤增加权限

parent 1cc46338
......@@ -143,6 +143,17 @@ export function billCreate(data) {
});
}
/**
* 获得提单补料pdf
*/
export function getBoxLadingBillPdf(params) {
return request({
url: "/ecw/box-lading-bill/getBoxLadingBillPdf",
method: "get",
params,
});
}
/**
* 驳船
*
......
......@@ -69,6 +69,7 @@
<el-button type="primary" @click="onSubmit(1)">{{$t('保存')}}</el-button>
<el-button type="success" @click="onSubmit(2)">{{$t('提交')}}</el-button>
<el-button @click="cancel">{{$t('关闭')}}</el-button>
<el-button :disabled="shipmentObj.ladingBillInfo == null" @click="download">{{$t('下载提单确认件')}}</el-button>
</el-row>
</div>
</template>
......@@ -80,9 +81,10 @@ import userSelect from "./common/userSelect.vue";
import ladingSelect from "./common/ladingSelect.vue";
import { getUnitList } from "@/api/ecw/unit";
import { getCabinetPage } from "@/api/ecw/cabinet";
import { billCreate } from "@/api/ecw/boxSea";
import { billCreate, getBoxLadingBillPdf } from "@/api/ecw/boxSea";
import { getSupplier } from "@/api/ecw/supplier";
import { formatNumberString, constantDict, serviceMsg } from "../utils";
import FileSaver from 'file-saver'
/**
* 提单补料
......@@ -132,7 +134,6 @@ export default {
...oldData,
packageUnit: oldData.packageUnit === 0 ? undefined : oldData.packageUnit,
};
console.log(this.shipmentObj)
this.$set(this.subMaterialObj,'agentId',this.shipmentObj.agentInfo?.agentId||undefined)
this.$set(this.subMaterialObj,'soNo',this.shipmentObj.bookSeaInfo?.sono||undefined)
this.$set(this.subMaterialObj,'markNo',"N/M")
......@@ -166,6 +167,7 @@ export default {
operateType,
}).then((res) => {
serviceMsg(res, this).then(() => {
this.download()
this.cancel("submit");
});
});
......@@ -176,6 +178,12 @@ export default {
cancel(type) {
this.$emit("closeDialog", type);
},
download() {
getBoxLadingBillPdf({shipmentId: this.shipmentObj.id}).then(res=>{
let blob = new Blob([res], {type: "application/pdf"})
FileSaver.saveAs(blob, this.$t('提单确认件'));
})
}
},
};
</script>
......
......@@ -46,6 +46,7 @@ import unloadingWidget from "./nodePage/unloading/index.vue";
import settlementWidget from "./nodePage/settlement.vue";
import reviewWidget from "./nodePage/review.vue";
import tallyWidget from "./nodePage/tally/index.vue";
import {checkPermi} from '@/utils/permission'
/**
* 海运流程图
......@@ -131,10 +132,10 @@ export default {
},
/** 节点点击 */
nodeClick(currIndex, node) {
// if () {
// this.$message.error(this.$t("没有此操作的权限"));
// return;
// }
if (!checkPermi(['box:'+node.type+':show'])) {
this.$message.error(this.$t("没有此操作的权限"));
return;
}
if (currIndex > this.currIndex) {
this.$message.error(this.$t("请先完成上一步"));
return;
......
......@@ -2,7 +2,7 @@
<div class="app-seaStepDetail">
<el-scrollbar :vertical="true" viewClass="shipping-step">
<template v-for="(step, index) in flatSeaStep">
<div :key="index" v-if="shipmentObj[step.voName] && columnsMapping[step.voName]" class="step-table">
<div :key="index" v-if="shipmentObj[step.voName] && columnsMapping[step.voName] && checkPermi(['box:'+step.type+':show'])" class="step-table">
<div class="step-title">{{step.title}}</div>
<div v-for="(data, index) in columnsMapping[step.voName]" :key="index" class="step-content">
<p>{{data.title}}</p>
......@@ -17,6 +17,7 @@
<script>
import dayjs from "dayjs";
import * as _C from "./utils";
import {checkPermi} from '@/utils/permission'
export default {
name: "seaStepDetail",
......@@ -32,6 +33,7 @@ export default {
};
},
methods: {
checkPermi, // 检查权限
getObjInfo(voName, data) {
const { key, type } = data;
let val = this.shipmentObj[voName]?.[key] ?? "";
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment