szh_zidingyibiaoti
张同海 2 years ago
commit 25a663ce03

@ -1,5 +1,6 @@
{ {
"printWidth": 120, "printWidth": 120,
"semi": false, "semi": false,
"singleQuote": true "singleQuote": true,
"trailingComma": "none"
} }

@ -35,7 +35,7 @@
:table-data="tableData" :table-data="tableData"
borderY borderY
ref="tableRef" ref="tableRef"
style="min-width:970;" style="min-width: 970"
:cell-autofill-option="cellAutofillOption" :cell-autofill-option="cellAutofillOption"
:editOption="editOption" :editOption="editOption"
:rowKeyFieldName="rowKeyName" :rowKeyFieldName="rowKeyName"
@ -71,7 +71,7 @@
> >
<div class="model-content"> <div class="model-content">
<ve-table <ve-table
style="width: 100%;" style="width: 100%"
:columns="modelColumns" :columns="modelColumns"
:table-data="tableData" :table-data="tableData"
:radio-option="radioOption" :radio-option="radioOption"
@ -178,7 +178,7 @@ export default {
allow-clear={true} allow-clear={true}
style="width: 90px" style="width: 90px"
filter-option={this.filterOption} filter-option={this.filterOption}
on-change={val => { on-change={(val) => {
// console.log('== change ==') // console.log('== change ==')
if (val !== undefined) { if (val !== undefined) {
const data = this.ctnallList[val] const data = this.ctnallList[val]
@ -192,11 +192,11 @@ export default {
this.tableData[rowIndex].ctncode = '' this.tableData[rowIndex].ctncode = ''
} }
}} }}
on-focus={val => { on-focus={(val) => {
// console.log('== focus ==') // console.log('== focus ==')
this.ctnallViewIndex = rowIndex this.ctnallViewIndex = rowIndex
}} }}
on-blur={val => { on-blur={(val) => {
// - // -
// console.log('== blur ==', this.ctnallViewIndex, rowIndex) // console.log('== blur ==', this.ctnallViewIndex, rowIndex)
this.ctnallViewIndex = null this.ctnallViewIndex = null
@ -303,7 +303,7 @@ export default {
filter-option={this.filterOption} filter-option={this.filterOption}
style="width: 120px" style="width: 120px"
class="kindpkgsView" class="kindpkgsView"
on-change={val => { on-change={(val) => {
if (val !== undefined) { if (val !== undefined) {
const data = this.packageList[val] const data = this.packageList[val]
this.tableData[rowIndex].kindpkgs = data.name this.tableData[rowIndex].kindpkgs = data.name
@ -346,11 +346,11 @@ export default {
val: row['kindpkgs'] val: row['kindpkgs']
}) })
}} }}
on-focus={val => { on-focus={(val) => {
this.kindpkgsViewIndex = rowIndex this.kindpkgsViewIndex = rowIndex
// console.log('==', rowIndex, this.kindpkgsViewIndex) // console.log('==', rowIndex, this.kindpkgsViewIndex)
}} }}
on-blur={val => { on-blur={(val) => {
// - // -
this.kindpkgsViewIndex = null this.kindpkgsViewIndex = null
// console.log('==', rowIndex, this.kindpkgsViewIndex) // console.log('==', rowIndex, this.kindpkgsViewIndex)
@ -364,7 +364,7 @@ export default {
// this.setCellSelection(rowIndex, 'kgs') // this.setCellSelection(rowIndex, 'kgs')
// }, 200) // }, 200)
}} }}
on-input={val => { on-input={(val) => {
// console.log('== input - ==', val) // console.log('== input - ==', val)
}} }}
> >
@ -442,7 +442,7 @@ export default {
value={row['weightype']} value={row['weightype']}
option-filter-prop="children" option-filter-prop="children"
style="width: 80px" style="width: 80px"
on-change={val => { on-change={(val) => {
this.tableData[rowIndex].weightype = val this.tableData[rowIndex].weightype = val
row['weightype'] = val row['weightype'] = val
if (row['weightype'] === '累加') { if (row['weightype'] === '累加') {
@ -602,7 +602,7 @@ export default {
value={row['kindpkgs']} value={row['kindpkgs']}
option-filter-prop="children" option-filter-prop="children"
style="width: 120px" style="width: 120px"
on-change={val => { on-change={(val) => {
const data = this.packageList[val] const data = this.packageList[val]
row['kindpkgs'] = data.name row['kindpkgs'] = data.name
this.childTableData[rowIndex].kindpkgs = data.name this.childTableData[rowIndex].kindpkgs = data.name
@ -1075,10 +1075,10 @@ export default {
if (nval) { if (nval) {
const editDom = document.getElementsByClassName('ve-table-edit-input')[0] const editDom = document.getElementsByClassName('ve-table-edit-input')[0]
// console.log('', editDom) // console.log('', editDom)
editDom.addEventListener('focus', e => { editDom.addEventListener('focus', (e) => {
// console.log('== ==', this.cellSelectionOption.enable) // console.log('== ==', this.cellSelectionOption.enable)
// if (!this.cellSelectionOption.enable) { return false } // if (!this.cellSelectionOption.enable) { return false }
document.onkeydown = event => { document.onkeydown = (event) => {
// - start // - start
if (event.key === 'Backspace' && this.ctnallViewIndex !== null) { if (event.key === 'Backspace' && this.ctnallViewIndex !== null) {
const val = document const val = document
@ -1449,10 +1449,10 @@ export default {
bookingId: this.id, bookingId: this.id,
isWeb: false isWeb: false
}) })
.then(res => { .then((res) => {
if (res.success) { if (res.success) {
let type = true let type = true
this.tableData.forEach(item => { this.tableData.forEach((item) => {
if (item.sealno || item.cntrno) { if (item.sealno || item.cntrno) {
this.$message.error('请清空所有箱封号后再引入') this.$message.error('请清空所有箱封号后再引入')
type = false type = false
@ -1527,7 +1527,7 @@ export default {
} }
this.sealnoLoading = false this.sealnoLoading = false
}) })
.catch(err => { .catch((err) => {
console.log(err) console.log(err)
this.sealnoLoading = false this.sealnoLoading = false
}) })
@ -1542,18 +1542,24 @@ export default {
bookingId: this.id, bookingId: this.id,
isWeb: false isWeb: false
}) })
.then(res => { .then((res) => {
if (res.success) { if (res.success) {
const data = JSON.parse(res.data) const data = JSON.parse(res.data)
const addTable = [] const addTable = []
const cntrnoArr = [] const cntrnoArr = []
let kindpkgsOld = ''
this.tableData.map((item, index) => { this.tableData.map((item, index) => {
console.log(item.kindpkgs)
if (!item.cntrno) { if (!item.cntrno) {
// delete this.tableData[index] // delete this.tableData[index]
this.tableData.splice(index, 1) this.tableData.splice(index, 1)
} else { } else {
cntrnoArr.push(item.cntrno) cntrnoArr.push(item.cntrno)
} }
console.log(item.kindpkgs)
if (item.kindpkgs !== '') {
kindpkgsOld = item.kindpkgs
}
}) })
const lastNum = this.tableData.length > 0 ? Number(this.tableData[this.tableData.length - 1].rowKey) + 1 : 0 const lastNum = this.tableData.length > 0 ? Number(this.tableData[this.tableData.length - 1].rowKey) + 1 : 0
data.map((item, index) => { data.map((item, index) => {
@ -1565,7 +1571,7 @@ export default {
cntrno: item.CNTRNO, cntrno: item.CNTRNO,
sealno: item.SEALNO, sealno: item.SEALNO,
pkgs: item.PKGS, pkgs: item.PKGS,
kindpkgs: item.KINDPKGS, kindpkgs: kindpkgsOld || item.KINDPKGS,
kgs: item.KGS, kgs: item.KGS,
cbm: item.CBM, cbm: item.CBM,
tareweight: item.TAREWEIGHT, tareweight: item.TAREWEIGHT,
@ -1581,7 +1587,7 @@ export default {
cntrno: item.CNTRNO, cntrno: item.CNTRNO,
sealno: item.SEALNO, sealno: item.SEALNO,
pkgs: item.PKGS, pkgs: item.PKGS,
kindpkgs: item.KINDPKGS, kindpkgs: kindpkgsOld || item.KINDPKGS,
kgs: item.KGS, kgs: item.KGS,
cbm: item.CBM, cbm: item.CBM,
tareweight: item.TAREWEIGHT, tareweight: item.TAREWEIGHT,
@ -1594,13 +1600,14 @@ export default {
}) })
this.tableData = [...this.tableData, ...addTable] this.tableData = [...this.tableData, ...addTable]
console.log(this.tableData)
this.$forceUpdate() this.$forceUpdate()
} else { } else {
this.$message.error(res.message) this.$message.error(res.message)
} }
this.YarnLoading = false this.YarnLoading = false
}) })
.catch(err => { .catch((err) => {
console.log(err) console.log(err)
this.YarnLoading = false this.YarnLoading = false
}) })
@ -1695,7 +1702,7 @@ export default {
bookingId: this.id, bookingId: this.id,
isWeb: false isWeb: false
}) })
.then(res => { .then((res) => {
if (res.success) { if (res.success) {
const data = JSON.parse(res.data) const data = JSON.parse(res.data)
const addTable = [] const addTable = []
@ -1757,7 +1764,7 @@ export default {
} }
this.WeightLoading = false this.WeightLoading = false
}) })
.catch(err => { .catch((err) => {
console.log(err) console.log(err)
this.WeightLoading = false this.WeightLoading = false
}) })

@ -963,7 +963,7 @@ export default {
}, wait) }, wait)
}, },
checkbasic() { checkbasic() {
this.$refs.mailingFrom.validate(valid => { this.$refs.mailingFrom.validate((valid) => {
if (valid) { if (valid) {
return true return true
} else { } else {
@ -1008,14 +1008,14 @@ export default {
content: this.modelContent, content: this.modelContent,
remark: '' remark: ''
}) })
.then(res => { .then((res) => {
if (res.success) { if (res.success) {
this.$message.success('保存成功') this.$message.success('保存成功')
this.handleModelCancel() this.handleModelCancel()
this.$forceUpdate() this.$forceUpdate()
} }
}) })
.catch(err => { .catch((err) => {
console.log(err) console.log(err)
}) })
}, },
@ -1317,6 +1317,7 @@ export default {
val += k val += k
} }
this.details[type] = val this.details[type] = val
console.log(this.details.shipper.split('\n'))
this.$forceUpdate() this.$forceUpdate()
}, },
inputChange({ type, value }) { inputChange({ type, value }) {

@ -94,7 +94,7 @@
</a-col> </a-col>
</template> </template>
</a-row> </a-row>
<a-row class="from-box" :gutter="10" style="padding-left: 17px;"> <a-row class="from-box" :gutter="10" style="padding-left: 17px">
<a-col :xs="12" :sm="12" :md="12" :lg="8" :xl="5"> <a-col :xs="12" :sm="12" :md="12" :lg="8" :xl="5">
<a-form-model-item <a-form-model-item
class="pre-from-label" class="pre-from-label"
@ -185,7 +185,7 @@
:showLabel="['cnName', 'code']" :showLabel="['cnName', 'code']"
:openSearch="false" :openSearch="false"
@change="getSelectViewRes" @change="getSelectViewRes"
style="flex: 1; margin-top: -4px;" style="flex: 1; margin-top: -4px"
></selectView> ></selectView>
</a-form-model-item> </a-form-model-item>
</a-col> </a-col>
@ -1120,7 +1120,7 @@
:showLabel="['name', 'showCode']" :showLabel="['name', 'showCode']"
:openSearch="false" :openSearch="false"
@change="getSelectViewRes" @change="getSelectViewRes"
style="width:200px;" style="width: 200px"
></selectView> ></selectView>
</a-form-model-item> </a-form-model-item>
</div> </div>
@ -1440,7 +1440,7 @@ export default {
allow-clear={true} allow-clear={true}
style="width: 120px" style="width: 120px"
filter-option={this.filterOption} filter-option={this.filterOption}
on-change={val => { on-change={(val) => {
// console.log('== change ==') // console.log('== change ==')
if (val !== undefined) { if (val !== undefined) {
const data = this.ctnallList[val] const data = this.ctnallList[val]
@ -1454,13 +1454,13 @@ export default {
// this.orderDetails.ediCtn[rowIndex].ctncode = '' // this.orderDetails.ediCtn[rowIndex].ctncode = ''
} }
}} }}
on-focus={val => { on-focus={(val) => {
// this.ctnallViewIndex = rowIndex // this.ctnallViewIndex = rowIndex
}} }}
on-blur={val => { on-blur={(val) => {
// this.ctnallViewIndex = null // this.ctnallViewIndex = null
}} }}
on-inputKeydown={val => { on-inputKeydown={(val) => {
if (val.key == 'Backspace') { if (val.key == 'Backspace') {
setTimeout(() => { setTimeout(() => {
val.target.value = val.target.value.slice(0, -1) val.target.value = val.target.value.slice(0, -1)
@ -1549,7 +1549,7 @@ export default {
filter-option={this.filterOption} filter-option={this.filterOption}
style="width: 120px" style="width: 120px"
class="pre-kindpkgsView" class="pre-kindpkgsView"
on-change={val => { on-change={(val) => {
if (val !== undefined) { if (val !== undefined) {
const data = this.packageList[val] const data = this.packageList[val]
this.orderDetails.ediCtn[rowIndex].kindpkgs = data.name this.orderDetails.ediCtn[rowIndex].kindpkgs = data.name
@ -1589,13 +1589,13 @@ export default {
} }
this.orderDetails.kindpkgs = row['kindpkgs'] this.orderDetails.kindpkgs = row['kindpkgs']
}} }}
on-focus={val => { on-focus={(val) => {
this.kindpkgsViewIndex = rowIndex this.kindpkgsViewIndex = rowIndex
}} }}
on-blur={val => { on-blur={(val) => {
this.kindpkgsViewIndex = null this.kindpkgsViewIndex = null
}} }}
on-inputKeydown={val => { on-inputKeydown={(val) => {
if (val.key == 'Backspace') { if (val.key == 'Backspace') {
setTimeout(() => { setTimeout(() => {
val.target.value = val.target.value.slice(0, -1) val.target.value = val.target.value.slice(0, -1)
@ -1912,14 +1912,14 @@ export default {
country: this.orderDetails[`${this.modelType}countryName`], country: this.orderDetails[`${this.modelType}countryName`],
tel: this.orderDetails[`${this.modelType}tel`] tel: this.orderDetails[`${this.modelType}tel`]
}) })
.then(res => { .then((res) => {
if (res.success) { if (res.success) {
this.$message.success('保存成功') this.$message.success('保存成功')
this.handleModelCancel() this.handleModelCancel()
this.$forceUpdate() this.$forceUpdate()
} }
}) })
.catch(err => { .catch((err) => {
console.log(err) console.log(err)
}) })
}, },
@ -1943,7 +1943,7 @@ export default {
total(type) { total(type) {
let Rdata = 0 let Rdata = 0
if (this.orderDetails.ediCtn) { if (this.orderDetails.ediCtn) {
this.orderDetails.ediCtn.forEach(item => { this.orderDetails.ediCtn.forEach((item) => {
Rdata = parseFloat(Rdata) + parseFloat(item[type]) || 0 Rdata = parseFloat(Rdata) + parseFloat(item[type]) || 0
}) })
} }
@ -1995,7 +1995,7 @@ export default {
getPageESeaeEdi({ getPageESeaeEdi({
bookingId: this.id bookingId: this.id
}) })
.then(res => { .then((res) => {
if (!res.success) { if (!res.success) {
this.$message.error(res.message) this.$message.error(res.message)
} }
@ -2014,7 +2014,7 @@ export default {
} }
this.preOrderLoad = true this.preOrderLoad = true
}) })
.catch(err => { .catch((err) => {
console.log(err) console.log(err)
}) })
}, },
@ -2089,7 +2089,7 @@ export default {
} }
console.log(type, 'type') console.log(type, 'type')
if (isHBL || type == 'enter') { if (isHBL || type == 'enter') {
$details.ctnInputs.forEach(item => { $details.ctnInputs.forEach((item) => {
$data.ediCtn.push({ $data.ediCtn.push({
ctnall: item.ctnall, ctnall: item.ctnall,
cntrno: item.cntrno, cntrno: item.cntrno,
@ -2105,7 +2105,7 @@ export default {
if (isHBL && type != 'enter') { if (isHBL && type != 'enter') {
console.log('复制主单信息') console.log('复制主单信息')
console.log(this.orderList, this.orderDetails) console.log(this.orderList, this.orderDetails)
this.orderList.forEach(item => { this.orderList.forEach((item) => {
if (!item.isHBL) { if (!item.isHBL) {
$data.shippername = item.shippername $data.shippername = item.shippername
$data.shipperaddR1 = item.shipperaddR1 $data.shipperaddR1 = item.shipperaddR1
@ -2126,7 +2126,7 @@ export default {
$data.forwarder = item.forwarder $data.forwarder = item.forwarder
$data.carrier = item.carrier $data.carrier = item.carrier
$data.ediCtn = item.ediCtn $data.ediCtn = item.ediCtn
$data.ediCtn.forEach(e => { $data.ediCtn.forEach((e) => {
delete e.id delete e.id
}) })
} }
@ -2144,12 +2144,28 @@ export default {
// }) // })
// } // }
if ($data.portdischargeid) { if ($data.portdischargeid) {
GetPortlist({ KeyWord: $data.portdischargeid }).then(res => { GetPortlist({ KeyWord: $data.portdischargeid }).then((res) => {
console.log(res.data[0], 'res.data[0]') console.log(res.data[0], 'res.data[0]')
$data.consigneecountry = res.data[0].countryCode $data.consigneecountry = res.data[0].countryCode
$data.consigneecountryName = `${res.data[0].countryCode}/${res.data[0].cnName}` $data.consigneecountryName = `${res.data[0].countryCode}/${res.data[0].cnName}`
}) })
} }
if ($details.shipper) {
const newArr = $details.shipper.split('\n')
$data.shippername = newArr[0]
$data.shipperaddR1 = newArr[0]
}
if ($details.consignee) {
const newArr = $details.consignee.split('\n')
$data.consigneename = newArr[0]
$data.consigneeaddR1 = newArr[0]
}
if ($details.notifyparty) {
const newArr = $details.notifyparty.split('\n')
$data.notifypartyname = newArr[0]
$data.notifypartyaddR1 = newArr[0]
}
// if ($data.placedeliveryid) { // if ($data.placedeliveryid) {
// $data.consigneecountry = 'CN' // $data.consigneecountry = 'CN'
// $data.consigneecountryName = '' // $data.consigneecountryName = ''
@ -2196,7 +2212,7 @@ export default {
} }
const query = this.$qs.stringify({ Ids: removeArr.toString() }, { arrayFormat: 'repeat' }) const query = this.$qs.stringify({ Ids: removeArr.toString() }, { arrayFormat: 'repeat' })
seaeEdiDelete(query) seaeEdiDelete(query)
.then(res => { .then((res) => {
if (res.success) { if (res.success) {
this.removeFun() this.removeFun()
} else { } else {
@ -2204,7 +2220,7 @@ export default {
this.removeFun(tempArr) this.removeFun(tempArr)
} }
}) })
.catch(err => { .catch((err) => {
console.log(err) console.log(err)
}) })
}, },
@ -2284,7 +2300,7 @@ export default {
console.log('== 即将发送单号 ==', sendArr) console.log('== 即将发送单号 ==', sendArr)
const query = this.$qs.stringify({ Ids: sendArr.toString() }, { arrayFormat: 'repeat' }) const query = this.$qs.stringify({ Ids: sendArr.toString() }, { arrayFormat: 'repeat' })
seaeEdiCustEDI(query) seaeEdiCustEDI(query)
.then(res => { .then((res) => {
if (res.success) { if (res.success) {
this.$message.success('发送成功') this.$message.success('发送成功')
this.selectArr.map((item, index) => { this.selectArr.map((item, index) => {
@ -2294,7 +2310,7 @@ export default {
this.$message.error(res.message) this.$message.error(res.message)
} }
}) })
.catch(err => { .catch((err) => {
console.log(err) console.log(err)
}) })
}, },
@ -2575,7 +2591,7 @@ export default {
delete item.rowKey delete item.rowKey
}) })
seaeEdiSave($data) seaeEdiSave($data)
.then(res => { .then((res) => {
if (res.success) { if (res.success) {
this.$message.success('保存成功') this.$message.success('保存成功')
res.data[0].ediCtn.map((item, index) => { res.data[0].ediCtn.map((item, index) => {
@ -2589,7 +2605,7 @@ export default {
this.selectArr = [] this.selectArr = []
} }
}) })
.catch(err => { .catch((err) => {
console.log(err) console.log(err)
}) })
}, },
@ -2670,7 +2686,7 @@ export default {
{ arrayFormat: 'repeat' } { arrayFormat: 'repeat' }
) )
seaeEdiCustEDI(query) seaeEdiCustEDI(query)
.then(res => { .then((res) => {
this.sendLoading = false this.sendLoading = false
if (res.success) { if (res.success) {
let tip = '' let tip = ''
@ -2696,7 +2712,7 @@ export default {
this.$message.error(res.message) this.$message.error(res.message)
} }
}) })
.catch(err => { .catch((err) => {
this.sendLoading = false this.sendLoading = false
console.log(err) console.log(err)
}) })

Loading…
Cancel
Save