Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Fedex
/
imac-vue
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
jinhui.wang
2022-09-28 15:59:29 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
886130eedb2eeec1e46485899fea02bc27986f5d
886130ee
1 parent
fec704c3
特殊规格页面增加,航班输入长度限制增加
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
600 additions
and
40 deletions
src/api/cargoSelect.js
src/api/supserAllocation.js
src/assets/languages/tableHeaders.js
src/views/allocationConfig/cargoAllocation/info.vue
src/views/allocationConfig/flightRandConfig/index.vue
src/views/basicInformation/flightInformationMaintenance/index.vue
src/views/basicInformation/queryCargo/index.vue
src/views/systemConfig/superAllocation/dialog.vue
src/views/systemConfig/superAllocation/index.vue
src/api/cargoSelect.js
View file @
886130e
...
...
@@ -60,7 +60,7 @@ export function downloadExcel(data) {
})
}
//释放
仓
位
//释放
舱
位
export
function
releaseCargo
(
data
)
{
return
request
({
url
:
'/cargo/releaseCargo'
,
...
...
src/api/supserAllocation.js
0 → 100644
View file @
886130e
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
src/assets/languages/tableHeaders.js
View file @
886130e
...
...
@@ -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
...
...
src/views/allocationConfig/cargoAllocation/info.vue
View file @
886130e
...
...
@@ -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="
1
0"
<el-input class="formItem" v-model="fltNo" size="medium" placeholder="请输入航班号" maxlength="
5
0"
style="width: 350px" @change="dateChange"></el-input>
</el-form-item>
<el-form-item label="航班日期:" prop="fltDate">
...
...
src/views/allocationConfig/flightRandConfig/index.vue
View file @
886130e
...
...
@@ -81,7 +81,7 @@
<el-row>
<el-col :span="8">
<el-form-item label="原航班" prop="sourceFlightNo">
<el-input v-model="form.sourceFlightNo" placeholder="请输入原航班号" maxlength="
1
0" />
<el-input v-model="form.sourceFlightNo" placeholder="请输入原航班号" maxlength="
5
0" />
</el-form-item>
</el-col>
<el-col :span="8">
...
...
src/views/basicInformation/flightInformationMaintenance/index.vue
View file @
886130e
...
...
@@ -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="
1
0" />
placeholder="请输入航班号" maxlength="
5
0" />
</el-form-item>
</el-col>
<el-col :span="12">
...
...
src/views/basicInformation/queryCargo/index.vue
View file @
886130e
...
...
@@ -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,不能释放。' : ''
...
...
src/views/systemConfig/superAllocation/dialog.vue
0 → 100644
View file @
886130e
<template>
<div>
<el-dialog :title="title" :visible.sync="dialogVisible" width="60%" top="8vh" :before-close="close"
append-to-body :close-on-click-modal="false" @submit.native.prevent>
<el-form class="form-header" ref="superAllocationForm" :model="formData" label-width="auto"
label-position="left" style="margin-bottom:10px" @submit.native.prevent size="small" :rules="rules">
<el-row>
<el-col :span="22">
<el-form-item label="发件人账号" prop="shipperAccount">
<el-input type="textarea" v-model="formData.shipperAccount" placeholder="请输入发件人账号,多个以“;”分割"
maxlength="50" rows="4" :disabled="disabled" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="航班号" prop="flightNo">
<el-input class="formItem" ref="flightNoFormItem" v-focus v-model="formData.flightNo"
placeholder="请输入航班号" @change="getRoute" :disabled="disabled">
</el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="航班日期" prop="flightDate">
<el-date-picker class="formItem" v-model="formData.flightDate" type="date"
placeholder="选择日期" value-format="yyyy-MM-dd" @change="getRoute" :disabled="disabled">
</el-date-picker>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item label="航线" prop="flightRoute">
<el-select class="formItem" v-model="formData.flightRoute" placeholder="未设置"
:disabled="routeList.length == 0 || disabled" @change="routeChange">
<el-option v-for="(item, index) in routeList" :label="item.route" :value="item.route"
:key="item.id">
<Tooltips :content="item.route" :refName="item.route"></Tooltips>
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="预留舱位(KG)" prop="groupAllWeight">
<el-input class="formItem" v-model="formData.groupAllWeight" placeholder="请输入预留舱位"
oninput="value=value.replace(/[^\d\.\-]/g,'')">
</el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item label="URSA包含" prop="includeUrsa">
<el-input class="formItem" v-model="formData.includeUrsa"
placeholder="URSA之间用分号分隔,例:F2;F3;P_" type="textarea" rows="3" maxlength="100">
</el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="URSA不包含" prop="notIncludeUrsa">
<el-input class="formItem" v-model="formData.notIncludeUrsa"
placeholder="URSA之间用分号分隔,例:F2;F3;P_" type="textarea" rows="3" maxlength="100">
</el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<el-form-item label="申报类别" prop="classificationList">
<el-card shadow="never" style="width: 95%">
<el-checkbox-group v-model="formData.classificationList">
<el-row>
<el-col v-for="item in checkBoxItem.cargoType" :span="2" :key="item.id">
<el-checkbox v-if="item.status === 1" :label="item.chineseName"
:name="item.chineseName" :key="item.code">
<Tooltips :content="item.chineseName" :refName="item.chineseName">
</Tooltips>
</el-checkbox>
</el-col>
</el-row>
</el-checkbox-group>
</el-card>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<el-form-item label="Service Code" prop="serviceCodeList">
<el-card shadow="never" style="width: 95%">
<el-checkbox-group v-model="formData.serviceCodeList">
<el-row>
<el-col v-for="item in checkBoxItem.serviceCode" :span="2" :key="item.id">
<el-checkbox
v-if="item.status === 1 || checkBoxItem.serviceCode.includes(item.chineseName)"
:label="item.chineseName" :name="item.chineseName"
:disabled="checkBoxItem.serviceCode.includes(item.chineseName) && item.status == 0"
:key="item.code">
<Tooltips :content="item.chineseName" :refName="item.chineseName">
</Tooltips>
</el-checkbox>
</el-col>
</el-row>
</el-checkbox-group>
</el-card>
</el-form-item>
</el-col>
</el-row>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button type="primary" :loading="loading" @click="submit">确 定</el-button>
<el-button @click="close">取 消</el-button>
</span>
</el-dialog>
</div>
</template>
<script>
import { findFlightRoute } from "@/api/cargoSelect";
import { allDictData } from "@/api/destinationFlight";
import { saveOrUpdate } from "@/api/supserAllocation"
export default {
name: '',
props: {
dialogVisible: {
type: Boolean,
default: false
},
ruleData: {
type: Object,
default: null
},
status: {
type: String,
default: ''
}
},
data() {
return {
formData: {
flightNo: '',
flightDate: '',
flightRoute: null,
classificationList: [],
serviceCodeList: []
},
routeList: [],
checkBoxItem: {
cargoType: [],
serviceCode: []
},
rules: {
shipperAccount: [
{
required: true,
message: "发件人账号不能为空",
trigger: "blur",
},
],
flightDate: [
{
required: true,
message: "航班日期不能为空",
trigger: "blur",
},
],
flightNo: [
{
required: true,
message: "航班号不能为空",
trigger: "blur",
},
],
flightRoute: [
{
required: true,
message: "航线不能为空",
trigger: "change",
},
],
groupAllWeight: [
{
required: true,
message: "预留舱位不能为空",
trigger: "blur",
},
],
includeUrsa: [
{
required: true,
message: "URSA不能为空",
trigger: "blur",
},
],
},
title: '',
loading: false,
disabled: false
}
},
created() {
this.getCheckData()
},
watch: {
dialogVisible(val) {
if (val) {
if (this.status == 'add') {
this.title = '新增'
this.$nextTick(() => {
this.$refs["superAllocationForm"].clearValidate();
})
} else if (this.status == 'update') {
this.title = '修改'
this.formData = this.ruleData
this.disabled = true
this.getRoute(1)
} else if (this.status == 'copy') {
this.title = '复制'
this.formData = this.ruleData
this.getRoute(1)
}
}
}
},
methods: {
//获取复选框数据
getCheckData() {
allDictData().then(res => {
if (res.code === 200) {
this.checkBoxItem.cargoType = res.data.cargoType
this.checkBoxItem.serviceCode = res.data.serviceCode
} else {
this.msgWarning(res.msg)
}
}).catch(err => {
console.log(err)
})
},
//获取航线
getRoute(val) {
this.routeList = []
if (val != 1) {
this.formData.flightRoute = null
}
this.formData.flightNo = this.formData.flightNo.toUpperCase()
let obj = {
fltNo: this.formData.flightNo,
fltDate: this.formData.flightDate
}
findFlightRoute(obj).then(res => {
if (res.code === 200) {
this.routeList = res.data
} else {
this.msgWarning(res.msg)
}
}).catch(err => {
console.log(err)
})
},
//提交
submit() {
this.$refs["superAllocationForm"].validate((valid) => {
if (valid) {
this.loading = true
this.formData.shipperAccount = this.formData.shipperAccount.replace(/;/g, ";")
this.formData.includeUrsa = this.formData.includeUrsa.replace(/;/g, ";")
if (this.formData.notIncludeUrsa && this.formData.notIncludeUrsa != null && this.formData.notIncludeUrsa != '') {
this.formData.notIncludeUrsa = this.formData.notIncludeUrsa.replace(/;/g, ";")
}
saveOrUpdate(this.formData).then(res => {
this.loading = false
if (res.code === 200) {
this.msgSuccess('操作成功!')
this.close()
} else {
this.msgWarning(res.msg)
}
}).catch(err => {
this.loading = false
console.log(err)
})
}
})
},
routeChange() {
this.$forceUpdate()
},
close() {
this.formData = {
flightNo: '',
flightDate: '',
classificationList: [],
serviceCodeList: []
}
this.$refs["superAllocationForm"].clearValidate();
this.routeList = []
this.disabled = false
this.$emit('close')
}
}
}
</script>
<style lang="scss" scoped>
</style>
\ No newline at end of file
src/views/systemConfig/superAllocation/index.vue
0 → 100644
View file @
886130e
<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
Please
register
or
login
to post a comment