|
|
@@ -2,34 +2,71 @@
|
|
|
<div>
|
|
|
<basic-container>
|
|
|
<avue-crud :option="option" :table-loading="loading" :data="data" :page.sync="page" :search.sync="query"
|
|
|
- v-model="form" id="out-table" :header-cell-class-name="headerClassName" ref="crud" @row-del="rowDel"
|
|
|
- @search-change="searchChange" @search-reset="searchReset" @selection-change="selectionChange"
|
|
|
- @current-change="currentChange" @size-change="sizeChange" @refresh-change="refreshChange"
|
|
|
+ v-model="form" id="out-table" :header-cell-class-name="headerClassName" ref="crud" @search-change="searchChange"
|
|
|
+ @search-reset="searchReset" @selection-change="selectionChange" @current-change="currentChange"
|
|
|
+ @size-change="sizeChange" @refresh-change="refreshChange"
|
|
|
@resetColumn="resetColumn('crud', 'option', 'optionBack', 500)"
|
|
|
@saveColumn="saveColumn('crud', 'option', 'optionBack', 500)" @on-load="onLoad">
|
|
|
<template slot="menuLeft">
|
|
|
-
|
|
|
- </template>
|
|
|
- <template slot="menu" slot-scope="{ row, index }">
|
|
|
- <el-button size="small" icon="el-icon-edit" type="text" @click="rowEdit(row)">编辑</el-button>
|
|
|
- <el-button size="small" icon="el-icon-delete" type="text" @click="rowDel(row, index)"
|
|
|
- :disabled="row.count > 0">删 除</el-button>
|
|
|
- </template>
|
|
|
- <template slot="sysNo" slot-scope="{ row }">
|
|
|
- <span style="color: #1e9fff;cursor: pointer;" @click="rowEdit(row)">{{ row.sysNo }}</span>
|
|
|
+ <el-button type="success" size="small" :disabled="selectionList.length == 0"
|
|
|
+ @click="allClick('批量修改POD场站')">批量修改POD场站
|
|
|
+ </el-button>
|
|
|
+ <el-button type="warning" size="small" @click="outExport">导 出
|
|
|
+ </el-button>
|
|
|
</template>
|
|
|
</avue-crud>
|
|
|
+ <el-dialog append-to-body title="批量修改POD场站" :visible.sync="podDialog" width="30%" v-dialog-drag>
|
|
|
+ <span>
|
|
|
+ <avue-form v-if='podDialog' ref="form2" v-model="podForm" :option="podOption">
|
|
|
+ <tempalte slot="podStationCname">
|
|
|
+ <dic-select v-model="podForm.podStationCname" placeholder="场站" label="cnName" res="records"
|
|
|
+ :slotRight="true" rightLabel="code"
|
|
|
+ url="/blade-los/bcorps/selectList?current=1&size=5&corpTypeName=场站&status=0" :filterable="true"
|
|
|
+ :remote="true" dataName="cnName" @selectChange="dicChange('podStationCname', $event)"></dic-select>
|
|
|
+ </tempalte>
|
|
|
+ </avue-form>
|
|
|
+ </span>
|
|
|
+ <span slot="footer" class="dialog-footer">
|
|
|
+ <el-button @click="podDialog = false" size="mini">取 消</el-button>
|
|
|
+ <el-button type="primary" @click.stop="podSubmit" size="mini">确 定</el-button>
|
|
|
+ </span>
|
|
|
+ </el-dialog>
|
|
|
</basic-container>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-import { getList, remove } from "@/api/iosBasicData/overdueFee.js";
|
|
|
+import { getList, batchUpdatePodStation } from "@/api/iosBasicData/podStation.js";
|
|
|
+import { defaultDate2 } from "@/util/date";
|
|
|
+import dicSelect from "@/components/dicSelect/main";
|
|
|
+import { getToken } from "@/util/auth";
|
|
|
export default {
|
|
|
data() {
|
|
|
return {
|
|
|
+ podDialog: false,
|
|
|
+ podForm: {},
|
|
|
+ podOption: {
|
|
|
+ menuBtn: false,
|
|
|
+ span: 6,
|
|
|
+ disabled: false,
|
|
|
+ column: [
|
|
|
+ {
|
|
|
+ label: 'POD场站',
|
|
|
+ prop: 'podStationCname',
|
|
|
+ span: 24,
|
|
|
+ rules: [{
|
|
|
+ required: true,
|
|
|
+ message: " ",
|
|
|
+ trigger: "blur"
|
|
|
+ }],
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ },
|
|
|
form: {},
|
|
|
- query: {},
|
|
|
+ query: {
|
|
|
+ whether: '0',
|
|
|
+ actualEtdList: defaultDate2()
|
|
|
+ },
|
|
|
loading: false,
|
|
|
page: {
|
|
|
pageSize: 10,
|
|
|
@@ -42,9 +79,10 @@ export default {
|
|
|
height: 'auto',
|
|
|
calcHeight: 30,
|
|
|
menuWidth: 140,
|
|
|
+ menu:false,
|
|
|
tip: false,
|
|
|
searchShow: true,
|
|
|
- searchMenuSpan: 18,
|
|
|
+ searchMenuSpan: 24,
|
|
|
border: true,
|
|
|
index: true,
|
|
|
addBtn: false,
|
|
|
@@ -58,97 +96,164 @@ export default {
|
|
|
column: [
|
|
|
{
|
|
|
label: '客户',
|
|
|
- prop: 'branchName',
|
|
|
+ prop: 'corpName',
|
|
|
overHidden: true,
|
|
|
},
|
|
|
{
|
|
|
+ label: 'POD场站',
|
|
|
+ prop: 'podStationCname',
|
|
|
+ overHidden: true,
|
|
|
+ search: true,
|
|
|
+ type: "select",
|
|
|
+ filterable: true,
|
|
|
+ remote: true,
|
|
|
+ dicUrl: "/api/blade-los/bports/list?status=0&size=5¤t=1&cnName={{key}}",
|
|
|
+ props: {
|
|
|
+ label: "cnName",
|
|
|
+ value: "cnName",
|
|
|
+ desc: 'code',
|
|
|
+ res: "data.records"
|
|
|
+ }
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '是否录入',
|
|
|
+ prop: 'whether',
|
|
|
+ hide: true,
|
|
|
+ overHidden: true,
|
|
|
+ search: true,
|
|
|
+ type: 'select',
|
|
|
+ dicData: [{
|
|
|
+ label: '否',
|
|
|
+ value: '0'
|
|
|
+ }, {
|
|
|
+ label: '是',
|
|
|
+ value: '1'
|
|
|
+ }]
|
|
|
+ },
|
|
|
+
|
|
|
+ {
|
|
|
label: 'MB/L NO',
|
|
|
- prop: 'type',
|
|
|
+ prop: 'mblno',
|
|
|
overHidden: true,
|
|
|
},
|
|
|
{
|
|
|
label: 'HB/L NO',
|
|
|
- prop: 'type',
|
|
|
+ prop: 'hblno',
|
|
|
overHidden: true,
|
|
|
},
|
|
|
{
|
|
|
- label: '船名',
|
|
|
- prop: 'type',
|
|
|
+ label: 'ETD',
|
|
|
+ prop: 'actualEtd',
|
|
|
+ width: 120,
|
|
|
+ hide: true,
|
|
|
+ search: true,
|
|
|
+ searchProp: 'actualEtdList',
|
|
|
overHidden: true,
|
|
|
+ type: "date",
|
|
|
+ searchRange: true,
|
|
|
+ format: "yyyy-MM-dd",
|
|
|
+ valueFormat: "yyyy-MM-dd"
|
|
|
},
|
|
|
{
|
|
|
- label: '航次',
|
|
|
- prop: 'type',
|
|
|
+ label: '单据类型',
|
|
|
+ prop: 'billType',
|
|
|
+ hide: true,
|
|
|
overHidden: true,
|
|
|
+ search: true,
|
|
|
+ type: 'select',
|
|
|
+ dicData: [
|
|
|
+ {
|
|
|
+ label: '直单',
|
|
|
+ value: 'DD'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '分单',
|
|
|
+ value: 'MH'
|
|
|
+ }
|
|
|
+ ]
|
|
|
},
|
|
|
{
|
|
|
- label: '起运港',
|
|
|
- prop: 'type',
|
|
|
+ label: '船名',
|
|
|
+ prop: 'vesselCnName',
|
|
|
overHidden: true,
|
|
|
+ search: true,
|
|
|
+ type: "select",
|
|
|
+ filterable: true,
|
|
|
+ remote: true,
|
|
|
+ dicUrl: "/api/blade-los/bvessels/list?status=0&size=5¤t=1&cnName={{key}}",
|
|
|
+ props: {
|
|
|
+ label: "cnName",
|
|
|
+ value: "cnName",
|
|
|
+ desc: 'code',
|
|
|
+ res: "data.records"
|
|
|
+ }
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '航次',
|
|
|
+ prop: 'voyageNo',
|
|
|
+ overHidden: true,
|
|
|
+ search: true,
|
|
|
},
|
|
|
{
|
|
|
label: '起运港',
|
|
|
- prop: 'type',
|
|
|
+ prop: 'polName',
|
|
|
overHidden: true,
|
|
|
+ search: true,
|
|
|
+ type: "select",
|
|
|
+ filterable: true,
|
|
|
+ remote: true,
|
|
|
+ dicUrl: "/api/blade-los/bports/list?status=0&size=5¤t=1&cnName={{key}}",
|
|
|
+ props: {
|
|
|
+ label: "cnName",
|
|
|
+ value: "cnName",
|
|
|
+ desc: 'code',
|
|
|
+ res: "data.records"
|
|
|
+ }
|
|
|
},
|
|
|
{
|
|
|
label: '卸货港',
|
|
|
- prop: 'type',
|
|
|
+ prop: 'podName',
|
|
|
overHidden: true,
|
|
|
+ search: true,
|
|
|
+ type: "select",
|
|
|
+ filterable: true,
|
|
|
+ remote: true,
|
|
|
+ dicUrl: "/api/blade-los/bports/list?status=0&size=5¤t=1&cnName={{key}}",
|
|
|
+ props: {
|
|
|
+ label: "cnName",
|
|
|
+ value: "cnName",
|
|
|
+ desc: 'code',
|
|
|
+ res: "data.records"
|
|
|
+ }
|
|
|
},
|
|
|
{
|
|
|
label: '放箱号',
|
|
|
- prop: 'type',
|
|
|
+ prop: 'containerNumber',
|
|
|
overHidden: true,
|
|
|
},
|
|
|
{
|
|
|
label: '箱属',
|
|
|
- prop: 'type',
|
|
|
+ prop: 'boxBelongsTo',
|
|
|
overHidden: true,
|
|
|
},
|
|
|
{
|
|
|
label: '箱号',
|
|
|
- prop: 'type',
|
|
|
+ prop: 'cntrNo',
|
|
|
overHidden: true,
|
|
|
},
|
|
|
{
|
|
|
label: '箱型',
|
|
|
- prop: 'type',
|
|
|
- overHidden: true,
|
|
|
- },
|
|
|
- {
|
|
|
- label: 'POD场站',
|
|
|
- prop: 'type',
|
|
|
- overHidden: true,
|
|
|
- },
|
|
|
- {
|
|
|
- label: "制单人",
|
|
|
- prop: "createUserName",
|
|
|
- overHidden: true,
|
|
|
- }, {
|
|
|
- label: "制单日期",
|
|
|
- prop: "createTime",
|
|
|
- type: "date",
|
|
|
+ prop: 'cntrTypeCode',
|
|
|
overHidden: true,
|
|
|
- format: "yyyy-MM-dd",
|
|
|
- valueFormat: "yyyy-MM-dd HH:mm:ss"
|
|
|
- }, {
|
|
|
- label: "修改人",
|
|
|
- prop: "updateUserName",
|
|
|
- overHidden: true,
|
|
|
- }, {
|
|
|
- label: "修改日期",
|
|
|
- prop: "updateTime",
|
|
|
- type: "date",
|
|
|
- overHidden: true,
|
|
|
- format: "yyyy-MM-dd",
|
|
|
- valueFormat: "yyyy-MM-dd HH:mm:ss"
|
|
|
}
|
|
|
]
|
|
|
},
|
|
|
data: [],
|
|
|
};
|
|
|
},
|
|
|
+ components: {
|
|
|
+ dicSelect
|
|
|
+ },
|
|
|
async created() {
|
|
|
this.option = await this.getColumnData(this.getColumnName(500), this.optionBack);
|
|
|
},
|
|
|
@@ -157,21 +262,56 @@ export default {
|
|
|
}, 100);
|
|
|
},
|
|
|
methods: {
|
|
|
- // 删除
|
|
|
- rowDel(row, index) {
|
|
|
- if (row.item == 1) {
|
|
|
- return this.$message.error("存在明细不允许删除");
|
|
|
+ allClick(name) {
|
|
|
+ if (name == '批量修改POD场站') {
|
|
|
+ this.podForm = {}
|
|
|
+ this.podDialog = true
|
|
|
}
|
|
|
- this.$confirm("确定将选择数据删除?", {
|
|
|
- confirmButtonText: "确定",
|
|
|
- cancelButtonText: "取消",
|
|
|
- type: "warning"
|
|
|
- }).then(() => {
|
|
|
- remove({ ids: row.id }).then(res => {
|
|
|
- this.onLoad(this.page, this.query);
|
|
|
- this.$message.success("成功删除");
|
|
|
- })
|
|
|
- })
|
|
|
+ },
|
|
|
+ dicChange(name, row) {
|
|
|
+ if (name == 'podStationCname') {
|
|
|
+ if (row) {
|
|
|
+ this.podForm.podStationId = row.id
|
|
|
+ this.podForm.podStationCode = row.code
|
|
|
+ this.podForm.podStationEname = row.enName
|
|
|
+ } else {
|
|
|
+ this.podForm.podStationId = null
|
|
|
+ this.podForm.podStationCode = null
|
|
|
+ this.podForm.podStationEname = null
|
|
|
+ this.podForm.podStationCname = null
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
+ podSubmit() {
|
|
|
+ this.$refs["form2"].validate((valid, done) => {
|
|
|
+ done();
|
|
|
+ if (valid) {
|
|
|
+ let ids = []
|
|
|
+ for (let item of this.selectionList) {
|
|
|
+ ids.push(item.id)
|
|
|
+ }
|
|
|
+ let obj = {
|
|
|
+ ids: ids.join(','),
|
|
|
+ ...this.podForm,
|
|
|
+ }
|
|
|
+ const loading = this.$loading({
|
|
|
+ lock: true,
|
|
|
+ text: '加载中',
|
|
|
+ spinner: 'el-icon-loading',
|
|
|
+ background: 'rgba(255,255,255,0.7)'
|
|
|
+ });
|
|
|
+ batchUpdatePodStation(obj).then(res => {
|
|
|
+ this.$message.success("操作成功!");
|
|
|
+ this.refreshChange()
|
|
|
+ this.podDialog = false
|
|
|
+ }).finally(() => {
|
|
|
+ loading.close();
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ });
|
|
|
+
|
|
|
|
|
|
},
|
|
|
searchReset() {
|
|
|
@@ -213,6 +353,31 @@ export default {
|
|
|
this.loading = false;
|
|
|
})
|
|
|
},
|
|
|
+ outExport() {
|
|
|
+ let config = { params: { ...this.query } }
|
|
|
+ if (config.params) {
|
|
|
+ for (const propName of Object.keys(config.params)) {
|
|
|
+ const value = config.params[propName];
|
|
|
+ if (value !== null && typeof (value) !== "undefined") {
|
|
|
+ if (value instanceof Array) {
|
|
|
+ for (const key of Object.keys(value)) {
|
|
|
+ let params = propName + '[' + key + ']';
|
|
|
+ config.params[params] = value[key]
|
|
|
+ }
|
|
|
+ delete config.params[propName]
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ const routeData = this.$router.resolve({
|
|
|
+ path: '/api/blade-los/UpdatePodStation/listExport', //跳转目标窗口的地址
|
|
|
+ query: {
|
|
|
+ ...config.params, //括号内是要传递给新窗口的参数
|
|
|
+ identification: this.url
|
|
|
+ }
|
|
|
+ })
|
|
|
+ window.open(routeData.href.slice(1, routeData.href.length) + '&' + `${this.website.tokenHeader}=${getToken()}`);
|
|
|
+ },
|
|
|
//自定义列保存
|
|
|
async saveColumn(ref, option, optionBack, code) {
|
|
|
/**
|
|
|
@@ -225,8 +390,6 @@ export default {
|
|
|
this.$message.success("保存成功");
|
|
|
//关闭窗口
|
|
|
this.$refs[ref].$refs.dialogColumn.columnBox = false;
|
|
|
- this.selectionList = []
|
|
|
- this.searchReset()
|
|
|
}
|
|
|
},
|
|
|
//自定义列重置
|