|
@@ -7,9 +7,9 @@
|
|
|
</el-button>
|
|
</el-button>
|
|
|
</div>
|
|
</div>
|
|
|
<div class="add-customer-btn">
|
|
<div class="add-customer-btn">
|
|
|
- <el-button size="small" style="margin-right: 8px" :disabled="!form.id" @click="$refs.print.openDialog()">预 览
|
|
|
|
|
|
|
+ <el-button size="small" :disabled="!form.id" @click="$refs.print.openDialog()">预 览
|
|
|
</el-button>
|
|
</el-button>
|
|
|
- <el-button v-if="roleName.indexOf('admin') != -1" size="small" style="margin-right: 8px" :disabled="!form.id"
|
|
|
|
|
|
|
+ <el-button v-if="roleName.indexOf('admin') != -1" size="small" :disabled="!form.id"
|
|
|
@click="$refs.report.openDialog()">报表设计
|
|
@click="$refs.report.openDialog()">报表设计
|
|
|
</el-button>
|
|
</el-button>
|
|
|
<!-- <el-button class="el-button--small-yh" style="margin-left: 6px;" type="danger" size="small"
|
|
<!-- <el-button class="el-button--small-yh" style="margin-left: 6px;" type="danger" size="small"
|
|
@@ -28,9 +28,20 @@
|
|
|
<el-button v-if="form.id" class="el-button--small-yh" style="margin-left: 6px;" type="success" size="small"
|
|
<el-button v-if="form.id" class="el-button--small-yh" style="margin-left: 6px;" type="success" size="small"
|
|
|
:disabled="form.status != 0 || form.issueStatus == 1" @click="application">运费申请
|
|
:disabled="form.status != 0 || form.issueStatus == 1" @click="application">运费申请
|
|
|
</el-button>
|
|
</el-button>
|
|
|
- <el-button v-if="form.status == 1" class="el-button--small-yh" style="margin-left: 6px;" type="danger"
|
|
|
|
|
|
|
+ <el-button v-if="form.status == 1" class="el-button--small-yh" style="margin-left: 6px;" type="danger"
|
|
|
size="small" @click="revokeApplication">撤销单据请核
|
|
size="small" @click="revokeApplication">撤销单据请核
|
|
|
</el-button>
|
|
</el-button>
|
|
|
|
|
+ <el-dropdown style="line-height: 0" v-if="importTemplate == 1">
|
|
|
|
|
+ <el-button size="small" type="warning" style="margin-left: 8px"
|
|
|
|
|
+ :disabled="form.status > 0 || showLock || !form.id">
|
|
|
|
|
+ 导入模板<i class="el-icon-arrow-down el-icon--right"></i>
|
|
|
|
|
+ </el-button>
|
|
|
|
|
+ <el-dropdown-menu slot="dropdown">
|
|
|
|
|
+ <el-dropdown-item v-for="item in imporiData" :key="item.id" @click.native="importData2(item.id)">{{
|
|
|
|
|
+ item.name }}
|
|
|
|
|
+ </el-dropdown-item>
|
|
|
|
|
+ </el-dropdown-menu>
|
|
|
|
|
+ </el-dropdown>
|
|
|
<el-dropdown style="line-height: 0">
|
|
<el-dropdown style="line-height: 0">
|
|
|
<el-button class="el-button--small-yh" style="margin-left: 6px;" type="warning" :disabled="!form.id"
|
|
<el-button class="el-button--small-yh" style="margin-left: 6px;" type="warning" :disabled="!form.id"
|
|
|
size="small">
|
|
size="small">
|
|
@@ -388,6 +399,13 @@
|
|
|
<check-schedule :checkId="checkId" :batchNo="batchNo" @choceScheduleFun="choceScheduleFun"></check-schedule>
|
|
<check-schedule :checkId="checkId" :batchNo="batchNo" @choceScheduleFun="choceScheduleFun"></check-schedule>
|
|
|
</el-dialog>
|
|
</el-dialog>
|
|
|
<freight-rate ref="freightRate" @importData="importData" />
|
|
<freight-rate ref="freightRate" @importData="importData" />
|
|
|
|
|
+ <!--导入模板-->
|
|
|
|
|
+ <el-dialog title="导入模板" append-to-body :visible.sync="excelBox" width="555px" :close-on-click-modal="false"
|
|
|
|
|
+ v-dialog-drag>
|
|
|
|
|
+ <avue-form v-if="excelBox" :option="excelOption" v-model="excelForm" :upload-before="uploadBefore"
|
|
|
|
|
+ :upload-after="onSuccess">
|
|
|
|
|
+ </avue-form>
|
|
|
|
|
+ </el-dialog>
|
|
|
</div>
|
|
</div>
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
@@ -405,10 +423,41 @@ import { getDicinit } from "@/api/dicSelect/index";
|
|
|
import _ from "lodash";
|
|
import _ from "lodash";
|
|
|
import { Header } from "element-ui";
|
|
import { Header } from "element-ui";
|
|
|
import { dateFormat } from "@/util/date";
|
|
import { dateFormat } from "@/util/date";
|
|
|
|
|
+import { isProcurement } from "@/api/basicData/configuration";
|
|
|
export default {
|
|
export default {
|
|
|
name: "detailsPage",
|
|
name: "detailsPage",
|
|
|
data() {
|
|
data() {
|
|
|
return {
|
|
return {
|
|
|
|
|
+ excelForm: {},
|
|
|
|
|
+ excelLoading: false,
|
|
|
|
|
+ excelOption: {
|
|
|
|
|
+ submitBtn: false,
|
|
|
|
|
+ emptyBtn: false,
|
|
|
|
|
+ column: [
|
|
|
|
|
+ {
|
|
|
|
|
+ label: "模板上传",
|
|
|
|
|
+ prop: "excelFile",
|
|
|
|
|
+ type: "upload",
|
|
|
|
|
+ drag: true,
|
|
|
|
|
+ loadText: "模板上传中,请稍等",
|
|
|
|
|
+ span: 24,
|
|
|
|
|
+ propsHttp: {
|
|
|
|
|
+ res: "data"
|
|
|
|
|
+ },
|
|
|
|
|
+ tip: "请上传 .xls,.xlsx 标准格式文件",
|
|
|
|
|
+ action: "api/blade-los/templateImport/importOne"
|
|
|
|
|
+ }
|
|
|
|
|
+ ]
|
|
|
|
|
+ },
|
|
|
|
|
+ excelBox: false,
|
|
|
|
|
+ imporiData: [
|
|
|
|
|
+ // { id: 0, name: '导入 ONE 模板' },
|
|
|
|
|
+ // { id: 1, name: '导入 PIL 订舱模板' },
|
|
|
|
|
+ // { id: 2, name: '导入截单格式' },
|
|
|
|
|
+ // { id: 3, name: '导入海信提单' },
|
|
|
|
|
+ { id: 4, name: '提单样本' }
|
|
|
|
|
+ ],
|
|
|
|
|
+ importTemplate: null,
|
|
|
selectionTemplateList: [],
|
|
selectionTemplateList: [],
|
|
|
selectionfeecList: [],
|
|
selectionfeecList: [],
|
|
|
feeType: null,
|
|
feeType: null,
|
|
@@ -951,7 +1000,9 @@ export default {
|
|
|
this.option = await this.getColumnData(this.getColumnName(502), this.optionBack);
|
|
this.option = await this.getColumnData(this.getColumnName(502), this.optionBack);
|
|
|
this.feecOption = await this.getColumnData(this.getColumnName(235.2), this.feecOptionBack);
|
|
this.feecOption = await this.getColumnData(this.getColumnName(235.2), this.feecOptionBack);
|
|
|
this.saveLocalCurrency(JSON.parse(localStorage.getItem('sysitemData')).deptId)
|
|
this.saveLocalCurrency(JSON.parse(localStorage.getItem('sysitemData')).deptId)
|
|
|
- console.log(this.detailData)
|
|
|
|
|
|
|
+ isProcurement({ "param": "import.template" }).then(res => {
|
|
|
|
|
+ this.importTemplate = res.data.data
|
|
|
|
|
+ })
|
|
|
if (this.detailData && this.detailData.id) {
|
|
if (this.detailData && this.detailData.id) {
|
|
|
this.getDetails(this.detailData.id)
|
|
this.getDetails(this.detailData.id)
|
|
|
}
|
|
}
|
|
@@ -975,6 +1026,63 @@ export default {
|
|
|
this.saveLocalCurrency(this.deptId)
|
|
this.saveLocalCurrency(this.deptId)
|
|
|
},
|
|
},
|
|
|
methods: {
|
|
methods: {
|
|
|
|
|
+ //文档导入
|
|
|
|
|
+ importData2(row) {
|
|
|
|
|
+ if (row == 0) {
|
|
|
|
|
+ this.excelOption.column[0].action = `/api/blade-los/templateImport/importOne?billId=${this.form.id}`
|
|
|
|
|
+ } else if (row == 1) {
|
|
|
|
|
+ this.excelOption.column[0].action = `/api/blade-los/templateImport/importPilBooking?billId=${this.form.id}`
|
|
|
|
|
+ } else if (row == 2) {
|
|
|
|
|
+ this.excelOption.column[0].action = `/api/blade-los/templateImport/importPilCutOffOrders?billId=${this.form.id}`
|
|
|
|
|
+ } else if (row == 3) {
|
|
|
|
|
+ this.excelOption.column[0].action = `/api/blade-los/templateImport/importHisenseBill?billId=${this.form.id}`
|
|
|
|
|
+ } else if (row == 4) {
|
|
|
|
|
+ this.excelOption.column[0].action = `/api/blade-los/templateImport/importBills?billId=${this.form.id}`
|
|
|
|
|
+ }
|
|
|
|
|
+ this.excelBox = true
|
|
|
|
|
+ },
|
|
|
|
|
+ // 上传成功
|
|
|
|
|
+ onSuccess(res, done, loading, column) {
|
|
|
|
|
+ loading = true
|
|
|
|
|
+ if (Object.keys(res).length) {
|
|
|
|
|
+ // loading = false;
|
|
|
|
|
+ this.$confirm('此操作将覆盖数据, 是否继续?', '提示', {
|
|
|
|
|
+ confirmButtonText: '确定',
|
|
|
|
|
+ cancelButtonText: '取消',
|
|
|
|
|
+ type: 'warning'
|
|
|
|
|
+ }).then(() => {
|
|
|
|
|
+ // this.form = res;
|
|
|
|
|
+ Object.keys(res).forEach(key => {
|
|
|
|
|
+ if (res[key]) {
|
|
|
|
|
+ if (key != 'detail') {
|
|
|
|
|
+ // this.form[key] = res[key]
|
|
|
|
|
+ this.$set(this.form, key, res[key])
|
|
|
|
|
+ }
|
|
|
|
|
+ if (key == 'detail') {
|
|
|
|
|
+ Object.keys(res.detail).forEach(key => {
|
|
|
|
|
+ if (res.detail[key]) {
|
|
|
|
|
+ // this.form.detail[key] = res.detail[key]
|
|
|
|
|
+ this.$set(this.form.detail, key, res.detail[key])
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+ this.excelBox = false;
|
|
|
|
|
+ this.$message.success("导入成功!");
|
|
|
|
|
+ loading = false;
|
|
|
|
|
+ done();
|
|
|
|
|
+ }).catch(() => {
|
|
|
|
|
+ this.excelBox = false;
|
|
|
|
|
+ loading = false;
|
|
|
|
|
+ done();
|
|
|
|
|
+ });
|
|
|
|
|
+ } else {
|
|
|
|
|
+ loading = false;
|
|
|
|
|
+ done();
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
countChange(row) {
|
|
countChange(row) {
|
|
|
if (row.curCode == this.getLocalCurrency()) {
|
|
if (row.curCode == this.getLocalCurrency()) {
|
|
|
row.amountCNY = _.round(_.multiply(row.price, row.quantity), 2)
|
|
row.amountCNY = _.round(_.multiply(row.price, row.quantity), 2)
|