|
|
@@ -32,15 +32,14 @@
|
|
|
<div style="margin-top: 50px">
|
|
|
<trade-card title="基础信息">
|
|
|
<avue-form :option="optionForm" v-model="form" ref="form">
|
|
|
- <tempalte slot="polCname">
|
|
|
- <dic-select v-model="form.polCname" placeholder="起运港" key="id" label="cnName" res="records"
|
|
|
- url="/blade-los/bports/list" :filterable="true" :remote="true" dataName="cnName"
|
|
|
- @selectChange="dicChange('polCname', $event)"></dic-select>
|
|
|
+ <tempalte slot="year">
|
|
|
+ <el-date-picker v-model="form.year" type="year" placeholder="选择日期" format="yyyy" value-format="yyyy"
|
|
|
+ @change="dicChange('year', $event)">
|
|
|
+ </el-date-picker>
|
|
|
</tempalte>
|
|
|
- <tempalte slot="podCname">
|
|
|
- <dic-select v-model="form.podCname" placeholder="目的港" key="id" label="cnName" res="records"
|
|
|
- url="/blade-los/bports/list" :filterable="true" :remote="true" dataName="cnName"
|
|
|
- @selectChange="dicChange('podCname', $event)"></dic-select>
|
|
|
+ <tempalte slot="week">
|
|
|
+ <el-input-number style="width: 100%;" v-model="form.week" @change="dicChange('week', $event)"
|
|
|
+ placeholder="请输入 周" size="small" :controls="false"></el-input-number>
|
|
|
</tempalte>
|
|
|
</avue-form>
|
|
|
</trade-card>
|
|
|
@@ -142,15 +141,15 @@ import dicSelect from "@/components/dicSelect/main";
|
|
|
import checkSchedule from "@/components/checkH/checkSchedule.vue";
|
|
|
import businessReports from "@/components/tradeAgency/businessReports.vue";
|
|
|
import reports from "@/components/tradeAgency/reports.vue";
|
|
|
-import { dateFormat } from "@/util/date";
|
|
|
-import { bcurrencyGetExrate } from "@/api/iosBasicData/rateManagement";
|
|
|
import { getToken } from "@/util/auth";
|
|
|
+import { getWeekNumber, getWeeksInYear, getYearDate } from "@/util/date";
|
|
|
import _ from "lodash";
|
|
|
import { Header } from "element-ui";
|
|
|
export default {
|
|
|
name: "detailsPage",
|
|
|
data() {
|
|
|
return {
|
|
|
+ weekMax: 1,
|
|
|
boxSelectionList: [],
|
|
|
rulesList: [],
|
|
|
excelBox: false,
|
|
|
@@ -181,58 +180,6 @@ export default {
|
|
|
}
|
|
|
]
|
|
|
},
|
|
|
- activationForm: {},
|
|
|
- activationOption: {
|
|
|
- menuBtn: false,
|
|
|
- span: 6,
|
|
|
- disabled: false,
|
|
|
- column: [
|
|
|
- {
|
|
|
- label: '放箱号',
|
|
|
- prop: 'containerNumber',
|
|
|
- span: 24,
|
|
|
- rules: [{
|
|
|
- required: true,
|
|
|
- message: " ",
|
|
|
- trigger: "blur"
|
|
|
- }],
|
|
|
- },
|
|
|
- {
|
|
|
- label: '起运港',
|
|
|
- prop: 'polCname',
|
|
|
- span: 24,
|
|
|
- rules: [{
|
|
|
- required: true,
|
|
|
- message: " ",
|
|
|
- trigger: "blur"
|
|
|
- }],
|
|
|
- },
|
|
|
- {
|
|
|
- label: '目的港',
|
|
|
- prop: 'podCname',
|
|
|
- span: 24,
|
|
|
- rules: [{
|
|
|
- required: true,
|
|
|
- message: " ",
|
|
|
- trigger: "blur"
|
|
|
- }],
|
|
|
- },
|
|
|
- {
|
|
|
- label: '启用日期',
|
|
|
- prop: 'activationDate',
|
|
|
- span: 24,
|
|
|
- type: "date",
|
|
|
- format: "yyyy-MM-dd",
|
|
|
- valueFormat: "yyyy-MM-dd HH:mm:ss",
|
|
|
- rules: [{
|
|
|
- required: true,
|
|
|
- message: "",
|
|
|
- trigger: "blur"
|
|
|
- }]
|
|
|
- },
|
|
|
- ]
|
|
|
- },
|
|
|
- activationDialog: false,
|
|
|
itemCIds: null,
|
|
|
feeType: null,
|
|
|
selectionList: [],
|
|
|
@@ -244,8 +191,11 @@ export default {
|
|
|
editButton: false,
|
|
|
editDisabled: false,
|
|
|
form: {
|
|
|
- type: "DXCB",
|
|
|
boxAdjustmentCostList: [],
|
|
|
+ year: getWeekNumber().year,
|
|
|
+ week: getWeekNumber().weekNumber,
|
|
|
+ startDate: getWeekNumber().mondayDate,
|
|
|
+ endDate: getWeekNumber().sundayDate
|
|
|
},
|
|
|
oldForm: {},
|
|
|
optionForm: {
|
|
|
@@ -255,24 +205,40 @@ export default {
|
|
|
labelWidth: 100,
|
|
|
column: [
|
|
|
{
|
|
|
- label: '起运港',
|
|
|
- prop: 'polCname',
|
|
|
+ label: "所属公司",
|
|
|
+ prop: "branchName",
|
|
|
disabled: false,
|
|
|
- rules: [{
|
|
|
- required: true,
|
|
|
- message: " ",
|
|
|
- trigger: "blur"
|
|
|
- }],
|
|
|
},
|
|
|
{
|
|
|
- label: '目的港',
|
|
|
- prop: 'podCname',
|
|
|
+ label: "年",
|
|
|
+ prop: "year",
|
|
|
+ // type: 'year',
|
|
|
+ disabled: false,
|
|
|
+ // format: "yyyy",
|
|
|
+ // valueFormat: "yyyy"
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "WEEK",
|
|
|
+ prop: "week",
|
|
|
disabled: false,
|
|
|
- rules: [{
|
|
|
- required: true,
|
|
|
- message: " ",
|
|
|
- trigger: "blur"
|
|
|
- }],
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "开始日期",
|
|
|
+ prop: "startDate",
|
|
|
+ disabled: false,
|
|
|
+ search: true,
|
|
|
+ type: "date",
|
|
|
+ format: "yyyy-MM-dd",
|
|
|
+ valueFormat: "yyyy-MM-dd",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "结束日期",
|
|
|
+ prop: "endDate",
|
|
|
+ disabled: false,
|
|
|
+ search: true,
|
|
|
+ type: "date",
|
|
|
+ format: "yyyy-MM-dd",
|
|
|
+ valueFormat: "yyyy-MM-dd",
|
|
|
},
|
|
|
{
|
|
|
label: '备注',
|
|
|
@@ -908,7 +874,6 @@ export default {
|
|
|
feeCenterListD: [],
|
|
|
feeCenterListC: [],
|
|
|
roleName: [],
|
|
|
- updateSearchKey: new Date().getTime(),
|
|
|
}
|
|
|
},
|
|
|
components: {
|
|
|
@@ -923,16 +888,17 @@ export default {
|
|
|
async created() {
|
|
|
this.roleName = localStorage.getItem('roleName').split(',')
|
|
|
this.option = await this.getColumnData(this.getColumnName(483), this.optionBack);
|
|
|
- if (this.detailData.id) {
|
|
|
+ this.weekMax = getWeeksInYear(getYearDate())
|
|
|
+ if (this.detailData && this.detailData.id) {
|
|
|
// this.editButton = true
|
|
|
// this.editDisabled = true
|
|
|
// this.optionForm.disabled = true
|
|
|
this.getDetail(this.detailData.id)
|
|
|
}
|
|
|
- if (this.$route.query.params) {
|
|
|
+ if (this.$route.query && this.$route.query.params) {
|
|
|
this.getDetail(this.$route.query.params)
|
|
|
}
|
|
|
- if (this.detailData.copyId) {
|
|
|
+ if (this.detailData && this.detailData.copyId) {
|
|
|
this.getCopydate(this.detailData.copyId)
|
|
|
}
|
|
|
},
|
|
|
@@ -962,30 +928,17 @@ export default {
|
|
|
);
|
|
|
},
|
|
|
dicChange(name, row) {
|
|
|
-
|
|
|
- if (name == 'podCname') {
|
|
|
+ if (name == 'year') {
|
|
|
if (row) {
|
|
|
- this.form.podId = row.id
|
|
|
- this.form.podCode = row.code
|
|
|
- this.form.podEname = row.enName
|
|
|
+ this.weekMax = getWeeksInYear(row)
|
|
|
+ this.form.week =0
|
|
|
+ console.log(this.form)
|
|
|
} else {
|
|
|
- this.form.podId = null
|
|
|
- this.form.podCode = null
|
|
|
- this.form.podEname = null
|
|
|
- this.form.podCname = null
|
|
|
+ this.form.week =0
|
|
|
}
|
|
|
}
|
|
|
- if (name == 'polCname') {
|
|
|
- if (row) {
|
|
|
- this.form.polId = row.id
|
|
|
- this.form.polCode = row.code
|
|
|
- this.form.polEname = row.enName
|
|
|
- } else {
|
|
|
- this.form.polId = null
|
|
|
- this.form.polCode = null
|
|
|
- this.form.polEname = null
|
|
|
- this.form.polCname = null
|
|
|
- }
|
|
|
+ if(name=='week'){
|
|
|
+
|
|
|
}
|
|
|
},
|
|
|
rowDicChange(name, row, el, index) {
|
|
|
@@ -1301,7 +1254,7 @@ export default {
|
|
|
}
|
|
|
if (name == 'D费用批量删除') {
|
|
|
for (let row of this.selectionfeedList) {
|
|
|
- if (row.automaticGenerated==1) {
|
|
|
+ if (row.automaticGenerated == 1) {
|
|
|
return this.$message.error("系统自动生成的费用不允许删除");
|
|
|
}
|
|
|
}
|
|
|
@@ -1381,7 +1334,7 @@ export default {
|
|
|
}
|
|
|
if (name == 'C费用批量删除') {
|
|
|
for (let row of this.selectionfeecList) {
|
|
|
- if (row.automaticGenerated==1) {
|
|
|
+ if (row.automaticGenerated == 1) {
|
|
|
return this.$message.error("系统自动生成的费用不允许删除");
|
|
|
}
|
|
|
}
|