预配舱单

szh_zidingyibiaoti
lilu 2 years ago
parent a0e8ddcf7d
commit 490f7fea7d

@ -35,7 +35,7 @@
<div class="order-box" :key="sindex"> <div class="order-box" :key="sindex">
<a-checkbox class="check-btn" @change="checkOrderChange($event, sindex)" /> <a-checkbox class="check-btn" @change="checkOrderChange($event, sindex)" />
<span class="order-label" :class="{'active': sindex == editIndex}" @click.stop="changeOrder(sindex)"> <span class="order-label" :class="{'active': sindex == editIndex}" @click.stop="changeOrder(sindex)">
<a-tag class="tag" v-if="sedDetail.state" :color="sedDetail.state==='已' ? '#00CC00' : ''">{{ sedDetail.state }}</a-tag> <a-tag class="tag" v-if="sedDetail.state" :color="sedDetail.state==='已发' ? '#00CC00' : ''">{{ sedDetail.state }}</a-tag>
<!-- <a-tag class="tag" v-if="sedDetail.state">{{ sedDetail.state }}</a-tag> --> <!-- <a-tag class="tag" v-if="sedDetail.state">{{ sedDetail.state }}</a-tag> -->
<template v-if="!sedDetail.isHBL">{{ sedDetail.mblno || '' }}</template> <template v-if="!sedDetail.isHBL">{{ sedDetail.mblno || '' }}</template>
<template v-else>{{ sindex + 1 }}: {{ sedDetail.hblno || '' }}</template> <template v-else>{{ sindex + 1 }}: {{ sedDetail.hblno || '' }}</template>
@ -1631,9 +1631,9 @@ export default {
sendOption: [ sendOption: [
{ label: '新增', value: '0' }, { label: '新增', value: '0' },
{ label: '修改', value: '1' }, { label: '修改', value: '1' },
{ label: '删除', value: '2' }, { label: '删除', value: '2' }
{ label: '保存', value: '3' }, // { label: '', value: '3' },
{ label: '作废', value: '4' } // { label: '', value: '4' }
], ],
sendRemarkVal: '', sendRemarkVal: '',
sendArr: [] sendArr: []
@ -2194,15 +2194,15 @@ export default {
let tempstr1 = '' let tempstr1 = ''
this.selectArr.map((item, index) => { this.selectArr.map((item, index) => {
if (this.orderList[item].id !== 0) { if (this.orderList[item].id !== 0) {
if (this.orderList[item].state === '已录入') { // if (this.orderList[item].state === '') {
sendArr.push(this.orderList[item].id) sendArr.push(this.orderList[item].id)
} else { // } else {
if (this.orderList[item].isHBL) { // if (this.orderList[item].isHBL) {
tempstr1 += `分提单${this.orderList[item].hblno ? this.orderList[item].hblno : item}` // tempstr1 += `${this.orderList[item].hblno ? this.orderList[item].hblno : item}`
} else { // } else {
tempstr1 += `主提单${this.orderList[item].mblno ? this.orderList[item].mblno : item}` // tempstr1 += `${this.orderList[item].mblno ? this.orderList[item].mblno : item}`
} // }
} // }
} else { } else {
if (this.orderList[item].isHBL) { if (this.orderList[item].isHBL) {
tempstr += `分提单${this.orderList[item].hblno ? this.orderList[item].hblno : item}` tempstr += `分提单${this.orderList[item].hblno ? this.orderList[item].hblno : item}`
@ -2216,10 +2216,10 @@ export default {
this.$message.error(`${tempstr}需要先保存再进行发送`) this.$message.error(`${tempstr}需要先保存再进行发送`)
return false return false
} }
if (tempstr1) { // if (tempstr1) {
this.$message.error(`${tempstr1}已发送,无需重复发送`) // this.$message.error(`${tempstr1}`)
return false // return false
} // }
if (sendArr.length === 0) { if (sendArr.length === 0) {
this.$message.error('暂无可发送舱单') this.$message.error('暂无可发送舱单')
return false return false
@ -2249,9 +2249,23 @@ export default {
}, { arrayFormat: 'repeat' }) }, { arrayFormat: 'repeat' })
seaeEdiCustEDI(query).then((res) => { seaeEdiCustEDI(query).then((res) => {
if (res.success) { if (res.success) {
this.$message.success('发送成功') let tip = ''
if (this.sendType == '0') {
tip = '新增发送成功'
} else if (this.sendType == '1') {
tip = '修改发送成功'
} else if (this.sendType == '2') {
tip = '删除发送成功'
}
this.$message.success(tip)
this.selectArr.map((item, index) => { this.selectArr.map((item, index) => {
this.orderList[item].state = '已发送' if (this.sendType == '0') {
this.orderList[item].state = '已直发'
} else if (this.sendType == '1') {
this.orderList[item].state = '已直发'
} else if (this.sendType == '2') {
this.orderList[item].state = '已删除'
}
}) })
this.sendClose() this.sendClose()
} else { } else {

Loading…
Cancel
Save