jinhui.wang

特殊规格页面增加,航班输入长度限制增加

......@@ -60,7 +60,7 @@ export function downloadExcel(data) {
})
}
//释放
//释放
export function releaseCargo(data) {
return request({
url: '/cargo/releaseCargo',
......
import request from '@/utils/request'
//特殊规则查询
/**
* @param page * 页数
* @param size * 页长
* @param shipperAccount shipperAccount集合
*/
export function queryShipperAccountRule(data) {
return request({
url: 'shipperAccount/queryShipperAccountRule',
method: 'post',
data: data
})
}
//特殊规则新增
/**
* @param id ID (修改必填)
* @param shipperAccount * shipperAccount
* @param flightNo * 航班号
* @param flightRoute * 航线
* @param flightDate * 航班日期
* @param groupAllWeight 预配重量
* @param includeUrsa * ursa包含
* @param notIncludeUrsa ursa不包含
* @param classificationList 申报类型
* @param serviceCodeList servceCode
*/
export function saveOrUpdate(data) {
return request({
url: 'shipperAccount/saveOrUpdate',
method: 'post',
data: data
})
}
//特殊规则详情
/**
* @param id * ID
*/
export function queryShipperAccountRuleById(data) {
return request({
url: 'shipperAccount/queryShipperAccountRuleById',
method: 'post',
data: data
})
}
//特殊规则删除
/**
* @param accsFlightNo * 航班号
* @param shipperAccount * shipperAccount
* @param status * 状态 0 停用 1启用 2 已删除
*/
export function changeStatusById(data) {
return request({
url: '/shipperAccount/changeStatusById',
method: 'post',
data: data
})
}
\ No newline at end of file
......@@ -539,6 +539,18 @@ let tableHeaders = {
status: 1
},
{
columnChineseName: "预留特殊舱位重量",
columnName: "accountTotalWeight",
columnWidth: "130",
status: 1
},
{
columnChineseName: "特殊舱位已配重量",
columnName: "accountAllocatedWeight",
columnWidth: "130",
status: 1
},
{
columnChineseName: "已配体积(m³)",
columnName: "alloctedVolume",
columnWidth: "120",
......@@ -1493,87 +1505,64 @@ let tableHeaders = {
//特殊配舱规则
"superAllocation": [
{
columnChineseName: "ShipperAccount",
columnChineseName: "发件人账号",
columnName: "shipperAccount",
columnWidth: "",
ext1: "",
status: 1
},
{
columnChineseName: "原航班",
columnName: "accsFlightNo",
columnWidth: "150",
ext1: "",
status: 1
},
{
columnChineseName: "操作人",
columnName: "updateUserName",
columnWidth: "100",
ext1: "",
status: 1
},
{
columnChineseName: "操作时间",
columnName: "updateTime",
columnWidth: "200",
ext1: "",
status: 1
},
],
"newSuperAllocation": [
{
columnChineseName: "航班日期",
columnName: "",
columnName: "flightDate",
columnWidth: "",
ext1: "",
status: 1
},
{
columnChineseName: "航班号",
columnName: "",
columnName: "flightNo",
columnWidth: "",
ext1: "",
status: 1
},
{
columnChineseName: "航线",
columnName: "",
columnName: "flightRoute",
columnWidth: "",
ext1: "",
status: 1
},
{
columnChineseName: "URSA",
columnName: "",
columnName: "includeUrsa",
columnWidth: "",
ext1: "",
status: 1
},
{
columnChineseName: "申报类型",
columnName: "",
columnName: "classification",
columnWidth: "",
ext1: "",
status: 1
},
{
columnChineseName: "服务类型",
columnName: "",
columnName: "serviceCode",
columnWidth: "",
ext1: "",
status: 1
},
{
columnChineseName: "预留位",
columnName: "",
columnChineseName: "预留位",
columnName: "groupAllWeight",
columnWidth: "",
ext1: "",
status: 1
},
{
columnChineseName: "已配位",
columnName: "",
columnChineseName: "已配位",
columnName: "accountAllocatedWeight",
columnWidth: "",
ext1: "",
status: 1
......
......@@ -14,7 +14,7 @@
<el-form ref="form" class="form-header" label-position="right" label-width="auto"
style="width: 400px; margin: 30px auto" :model="formData" :rules="rules">
<el-form-item label="航班号" prop="fltNo">
<el-input class="formItem" v-model="fltNo" size="medium" placeholder="请输入航班号" maxlength="10"
<el-input class="formItem" v-model="fltNo" size="medium" placeholder="请输入航班号" maxlength="50"
style="width: 350px" @change="dateChange"></el-input>
</el-form-item>
<el-form-item label="航班日期:" prop="fltDate">
......
......@@ -81,7 +81,7 @@
<el-row>
<el-col :span="8">
<el-form-item label="原航班" prop="sourceFlightNo">
<el-input v-model="form.sourceFlightNo" placeholder="请输入原航班号" maxlength="10" />
<el-input v-model="form.sourceFlightNo" placeholder="请输入原航班号" maxlength="50" />
</el-form-item>
</el-col>
<el-col :span="8">
......
......@@ -89,7 +89,7 @@
<el-col :span="12">
<el-form-item label="航班号" prop="fltNo">
<el-input class="wid80" @blur="blurfltNo" :disabled="formdisabled.fltNo" v-model="form.fltNo"
placeholder="请输入航班号" maxlength="10" />
placeholder="请输入航班号" maxlength="50" />
</el-form-item>
</el-col>
<el-col :span="12">
......
......@@ -509,7 +509,7 @@ export default {
this.$refs.newTables.clearTable();
this.cargoTotal();
},
//释放
//释放
release() {
let idList = []
this.selectTable.map(item => {
......@@ -532,7 +532,7 @@ export default {
val === item.id ? item.msg = item.msg + '正在释放中,请勿重复释放。' : ''
})
res.data['noFlight'].map(val => {
val === item.id ? item.msg = item.msg + '已释放位。' : ''
val === item.id ? item.msg = item.msg + '已释放位。' : ''
})
res.data['pushFalse'].map(val => {
val === item.id ? item.msg = item.msg + '该货物配舱结果已回推ACCS,不能释放。' : ''
......
This diff is collapsed. Click to expand it.
<template>
<div style="padding:20px 0">
<el-form class="form-header" ref="dictForm" label-width="auto" label-position="left" style="margin-bottom:10px"
@submit.native.prevent size="small">
<el-row>
<el-col :span="6">
<el-form-item label="发件人账号">
<el-input type="textarea" v-model="selectionData.shipperAccount" placeholder="请输入发件人账号,多个以“;”分割"
maxlength="50" rows="4" />
</el-form-item>
</el-col>
</el-row>
</el-form>
<div style="margin-left:20px;margin-bottom:10px">
<el-button icon="el-icon-search" type="primary" size="small" @click="selection(1)">查 询
</el-button>
<el-button icon="el-icon-plus" type="primary" size="small" @click="add">添 加
</el-button>
</div>
<Tables ref="supserAllocation" ductName="supserAllocation" :data="tableData" :headerData="tableHeader"
:selection="false" :order="true" :selectFixed="false" :pagination="true" :totalCount="totalCount"
:loading="loading" :limitSize="selectionData.size" :page="selectionData.page"
layout="total,prev, pager, next, jumper, ->" :pageSizes="[100]" :height="tableHeight"
@currentChange="currentChange">
<template slot="optionColumn">
<el-table-column label="操作" width="250" align="center">
<template slot-scope="scope">
<el-button size="mini" type="text" icon="el-icon-edit" @click="update(scope.row,'update')">修改
</el-button>
<el-button type="text" v-if="scope.row.status === 1" size="mini" icon="el-icon-video-pause"
@click="changeStatus(scope.row)">
停 用</el-button>
<el-button type="text" v-if="scope.row.status === 0" size="mini" icon="el-icon-video-pause"
@click="changeStatus(scope.row)">
启 用</el-button>
<el-button type="text" icon="el-icon-document-copy" size="mini"
@click="update(scope.row,'copy')">复 制
</el-button>
<el-button size="mini" type="text" icon="el-icon-delete" style="color:#ff4949"
@click="del(scope.row)">删除</el-button>
</template>
</el-table-column>
</template>
</Tables>
<Dialog :dialogVisible="dialogVisible" :ruleData="ruleData" :status="dialogStatus" @close="close" />
</div>
</template>
<script>
import { queryShipperAccountRule, changeStatusById, queryShipperAccountRuleById } from "@/api/supserAllocation"
import Dialog from './dialog.vue';
export default {
name: 'SuperAllocation',
components: {
Dialog
},
data() {
return {
selectionData: {
shipperAccount: null,
page: 1,
size: 20,
},
tableData: [],
tableHeader: this.tableHeaders['superAllocation'],
ruleData: {
classificationList: [],
serviceCodeList: []
},
dialogStatus: 'add',
tableHeight: null,
totalCount: 0,
dialogVisible: false,
loading: false,
}
},
created() {
},
mounted() {
this.tableHeight = window.innerHeight - this.$refs.supserAllocation.$el.offsetHeight - 250
this.selection(1)
},
methods: {
//查询
selection(val) {
this.tableData = []
this.loading = true
if (val === 1) {
this.selectionData.page = 1
}
queryShipperAccountRule(this.selectionData).then(res => {
this.loading = false
if (res.code === 200) {
this.tableData = res.data.list
this.totalCount = res.data.total
} else {
this.msgWarning(res.msg)
}
}).catch(err => {
this.loading = false
console.log(err)
})
},
//新增
add() {
this.dialogStatus = 'add'
this.dialogVisible = true
},
//修改
update(val, status) {
this.dialogStatus = status
queryShipperAccountRuleById({ id: val.id }).then(res => {
if (res.code === 200) {
this.ruleData = res.data
if (this.ruleData.classificationList == null || this.ruleData.classificationList.length < 1) {
this.ruleData.classificationList = []
}
if (this.ruleData.serviceCodeList == null || this.ruleData.serviceCodeList.length < 1) {
this.ruleData.serviceCodeList = []
}
if (status == 'copy') {
this.ruleData.id = undefined
}
this.dialogVisible = true
} else {
this.msgWarning(res.msg)
}
}).catch(err => {
console.log(err)
})
},
//删除
del(val) {
this.$confirm("是否要删除记录!", "注意!", {
confirmButtonText: "确定",
cancelButtonText: '取消',
type: "warning",
}).then(() => {
changeStatusById({ id: val.id, status: 2 }).then(res => {
if (res.code === 200) {
this.msgSuccess('删除成功!')
this.selection(1)
} else {
this.msgWarning(res.msg)
}
}).catch(err => {
console.log(err)
})
}).catch(() => { })
},
//停用启用
changeStatus(val) {
let status = 0
let tip = ''
if (val.status == 0) {
status = 1
tip = '启用'
} else if (val.status == 1) {
status = 0
tip = '停用'
}
this.$confirm(`是否要${tip}记录!`, "注意!", {
confirmButtonText: "确定",
cancelButtonText: '取消',
type: "warning",
}).then(() => {
changeStatusById({ id: val.id, status: status }).then(res => {
if (res.code === 200) {
this.msgSuccess(tip + '成功!')
this.selection(1)
} else {
this.msgWarning(res.msg)
}
}).catch(err => {
console.log(err)
})
}).catch(() => { })
},
//复制
copy(val) {
this.dialogStatus = 'copy'
this.ruleData = JSON.parse(JSON.stringify(val))
this.ruleData.id = undefined
this.dialogVisible = true
},
//关闭
close() {
this.dialogVisible = false
this.ruleData = {}
this.selection(1)
},
//翻页
currentChange(val) {
this.selectionData.page = val.page
this.selection()
},
}
}
</script>
<style lang="scss" scoped>
</style>
\ No newline at end of file