Commit 3806fd9a authored by zhoutong's avatar zhoutong

操作页面的步骤增加权限

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