修改问题

master
sunzehua 1 year ago
parent ba487f6417
commit 40888fc40f

@ -11,9 +11,10 @@
:filter-option="!this.openSearch ? filterOption : false" :filter-option="!this.openSearch ? filterOption : false"
:dropdownMatchSelectWidth="false" :dropdownMatchSelectWidth="false"
:showArrow="!this.openSearch ? true : true" :showArrow="!this.openSearch ? true : true"
:open="open" :open="open && !disabled"
optionLabelProp="label" optionLabelProp="label"
:notFoundContent="inLoading ? '加载中...' : '暂无数据'" :notFoundContent="inLoading ? '加载中...' : '暂无数据'"
:disabled="disabled"
@focus="getSelectFirst" @focus="getSelectFirst"
@blur="getSelectBlur" @blur="getSelectBlur"
@select="selectOption" @select="selectOption"
@ -111,6 +112,10 @@ export default {
isCopy: { isCopy: {
type: Boolean, type: Boolean,
default: true default: true
},
disabled: {
type: Boolean,
default: false
} }
}, },
data() { data() {

@ -698,7 +698,7 @@ export default {
}, 500) }, 500)
this.$forceUpdate() this.$forceUpdate()
} else if (Object.keys(this.historyData).includes(newId)) { } else if (Object.keys(this.historyData).includes(newId)) {
this.id = !this.$route.query.isCopy ? this.$route.query.id : 0 this.id = this.$route.query.id
const $data = JSON.parse(JSON.stringify(this.historyData[newId])) const $data = JSON.parse(JSON.stringify(this.historyData[newId]))
this.isCopy = this.$route.query.isCopy this.isCopy = this.$route.query.isCopy
this.excuteRules = $data.excuteRules this.excuteRules = $data.excuteRules

@ -420,6 +420,7 @@
> >
<selectView <selectView
type="sale" type="sale"
:disabled="true"
:defaultVal="details.sale" :defaultVal="details.sale"
searchApi="GetSysUserPage" searchApi="GetSysUserPage"
:searchQuery="{ name: '' }" :searchQuery="{ name: '' }"

@ -22,16 +22,16 @@
> >
<a-button class="order-btn" size="small">删除</a-button> <a-button class="order-btn" size="small">删除</a-button>
</a-popconfirm> </a-popconfirm>
<!-- <a-popconfirm <a-button class="order-btn" size="small" @click="sendOrderFun()"></a-button>
title="是否发送当前选中预配舱单?" <a-popconfirm
title="会覆盖当前数据,确认刷新吗?"
ok-text="是" ok-text="是"
cancel-text="否" cancel-text="否"
@confirm="sendOrderFun()" @confirm="handleRef()"
@cancel="cancelRemove" @cancel="cancelRemove"
> --> >
<a-button class="order-btn" size="small" @click="sendOrderFun()"></a-button> <a-button class="order-btn" style="margin-right: 0px !important;" size="small" >刷新</a-button>
<!-- <a-button class="order-btn" style="margin-right: 0px !important;" size="small" @click="handleRef"></a-button> --> </a-popconfirm>
<!-- </a-popconfirm> -->
</div> </div>
<div class="sec-order"> <div class="sec-order">
<template v-for="(sedDetail, sindex) in orderList"> <template v-for="(sedDetail, sindex) in orderList">
@ -1892,7 +1892,108 @@ export default {
this.modelName = '' this.modelName = ''
}, },
handleRef() { handleRef() {
if (this.editIndex === 0) {
const $details = JSON.parse(JSON.stringify(this.details))
const $data = {
bookingId: $details.id,
id: this.orderDetails.id,
mblno: $details.mblno,
hblno: '',
isHBL: false,
etd: $details.etd,
forwarder: $details.shipagency || '',
vessel: $details.vessel,
//
carrier: $details.carrier || '',
carrierid: $details.carrierid || '',
carrierName: $details.carrierName,
shippername: '',
shipperaddR1: '',
shippercountry: '',
shippercountryName: '',
shippertel: '',
consigneename: '',
consigneeaddR1: '',
consigneecountry: '',
consigneecountryName: '',
consigneetel: '',
notifypartyname: '',
notifypartyaddR1: '',
notifypartycountry: '',
voyno: $details.voynoinner,
notifypartycountryName: '',
notifypartytel: '',
portload: $details.portload || 'QINGDAO,CHINA',
portloadid: $details.portloadid || 'CNTAO',
portdischarge: $details.portdischarge,
portdischargeid: $details.portdischargeid,
description: $details.description,
cargoid: $details.cargoid,
tempset: $details.tempset,
tempid: $details.tempid,
reeferf: $details.reeferf,
dclass: $details.dclass,
marks: $details.marks,
dunno: $details.dunno,
dattn: $details.linkman,
dtel: '',
kindpkgs: $details.kindpkgs,
remarks: '',
placedelivery: $details.placereceipt || 'QINGDAO,CHINA',
placedeliveryid: $details.placereceiptid || 'CNTAO',
sendremark: '',
yardid: $details.yardid,
yard: $details.yard,
ediCtn: [
]
}
$details.ctnInputs.forEach((item) => {
$data.ediCtn.push({
ctnall: item.ctnall,
cntrno: item.cntrno,
sealno: item.sealno,
pkgs: item.pkgs,
kindpkgs: item.kindpkgs,
kgs: item.kgs || 0,
cbm: item.cbm,
rowKey: item.rowKey
})
})
if ($data.portloadid) {
$data.shippercountry = 'CN'
$data.shippercountryName = 'CN/中国'
}
if ($data.portdischargeid) {
GetPortlist({ KeyWord: $data.portdischargeid }).then((res) => {
if (res.data) {
$data.consigneecountry = res.data[0].countryCode
$data.consigneecountryName = `${res.data[0].countryCode}/${res.data[0].country}`
$data.notifypartycountry = res.data[0].countryCode
$data.notifypartycountryName = `${res.data[0].countryCode}/${res.data[0].country}`
}
})
}
if ($details.shipper) {
const newArr = $details.shipper.split('\n')
$data.shippername = newArr[0]
$data.shipperaddR1 = newArr[1]
}
if ($details.consignee) {
const newArr = $details.consignee.split('\n')
$data.consigneename = newArr[0]
$data.consigneeaddR1 = newArr[1]
}
if ($details.notifyparty) {
const newArr = $details.notifyparty.split('\n')
$data.notifypartyname = newArr[0]
$data.notifypartyaddR1 = newArr[1]
}
this.orderDetails = $data
this.orderList[0] = $data
this.$forceUpdate()
} else {
this.$message.warning('只能刷新主提单')
}
}, },
handleModelSubmit() { handleModelSubmit() {
if (!this.modelName) { if (!this.modelName) {
@ -2564,30 +2665,6 @@ export default {
return str return str
}, },
saveOrder() { saveOrder() {
// let check = true
// this.$refs.basicFrom.validate(valid => {
// check = valid
// })
// if (!check) {
// this.$message.error('')
// return false
// }
// if (this.orderDetails.ediCtn.length === 0) {
// this.$message.error('')
// return false
// }
// let tableErrTip = ''
// this.orderDetails.ediCtn.map((item, index) => {
// Object.keys(item).map((label, lindex) => {
// if (this.rules.ctnList[label] && this.rules.ctnList[label].required && !item[label]) {
// tableErrTip = `${tableErrTip} ${index + 1}${this.rules.ctnList[label].title},`
// }
// })
// })
// if (tableErrTip !== '') {
// this.$message.error(` ${tableErrTip.substr(0, tableErrTip.length - 1)}`, 3)
// return false
// }
const $data = JSON.parse(JSON.stringify(this.orderDetails)) const $data = JSON.parse(JSON.stringify(this.orderDetails))
console.log($data) console.log($data)
if ($data.isHBL && !$data.hblno) { if ($data.isHBL && !$data.hblno) {

@ -276,7 +276,8 @@ export default {
return option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0 return option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
}, },
handleSelectChange(e) { handleSelectChange(e) {
if (e) { console.log(e)
if (e !== '' && e !== undefined && e !== null) {
if (this.labelData.label === 'bsStatusList') { if (this.labelData.label === 'bsStatusList') {
this.$emit('change', { this.$emit('change', {
form: this.labelData, form: this.labelData,

Loading…
Cancel
Save