修改问题

szh_zidingyibiaoti
sunzehua 2 years ago
parent dc0682a02a
commit 7e94698bdd

@ -52,7 +52,7 @@
:defaultVal="details.goodsname" :defaultVal="details.goodsname"
searchApi="getGoodsname" searchApi="getGoodsname"
:searchQuery="{ queryItem: '', top: 50 }" :searchQuery="{ queryItem: '', top: 50 }"
:showLabel="['goodsCode', 'goodsNameEN']" :showLabel="['goodsNameEN', 'goodsCode']"
:openSearch="true" :openSearch="true"
@change="getSelectViewRes" @change="getSelectViewRes"
style="width: 75%;max-width:210px;" style="width: 75%;max-width:210px;"

@ -293,6 +293,7 @@ export default {
edit: false, edit: false,
width: 130, width: 130,
renderBodyCell: ({ row, column, rowIndex }, h) => { renderBodyCell: ({ row, column, rowIndex }, h) => {
this.openEdit = true
return ( return (
<a-select <a-select
size="small" size="small"
@ -1104,47 +1105,32 @@ export default {
'== 当前是否允许编辑 ==', '== 当前是否允许编辑 ==',
this.cellSelectionOption.enable this.cellSelectionOption.enable
) )
// console.log(':' + event.key + ':' + event.keyCode, document.activeElement); const arr = []
// if ([37, 38, 39, 40, 9].includes(event.keyCode)) { if (document.getElementsByClassName('ant-select-dropdown').length > 0) {
// event = window.event || event; document.getElementsByClassName('ant-select-dropdown').forEach((item) => {
// if (event.stopPropagation) { const style = item.style
// event.stopPropagation(); if (style.display !== 'none') {
// event.preventDefault() arr.push(1)
// } else { }
// event.cancelBubble = true; })
// } }
// // this.openKeyDown = true if (arr.length === 0) {
// setTimeout(() => { this.cellSelectionOption.enable = true
// const activeDom = document.getElementsByClassName('ve-table-cell-selection')[0].firstChild if ([37, 38, 39, 40, 9].includes(event.keyCode)) {
// if (this.isDOM(activeDom)) { if (arr.length === 0) {
// const isCtnall = activeDom.classList.contains('ctnallView') // this.openKeyDown = true
// const isKindpkgs = activeDom.classList.contains('kindpkgsView')
// if (isCtnall) { setTimeout(() => {
// console.log('== table ==') const activeDom = document.getElementsByClassName('ve-table-cell-selection')[0].firstChild
// activeDom.click() if (this.isDOM(activeDom)) {
// // this.cellSelectionOption.enable = false activeDom.click()
// // setTimeout(() => { }
// // this.cellAutofillOption = false }, 200)
// // this.rowKeyName = false }
// // this.tableData.map((item, index) => { }
// // delete item.rowKey } else {
// // }) this.cellSelectionOption.enable = false
// // }, 300) }
// }
// if (isKindpkgs) {
// activeDom.click()
// // this.cellSelectionOption.enable = false
// // setTimeout(() => {
// // this.cellAutofillOption = false
// // this.rowKeyName = false
// // this.tableData.map((item, index) => {
// // delete item.rowKey
// // })
// // }, 300)
// }
// }
// }, 600)
// }
} }
}) })
} }

@ -1,5 +1,5 @@
<template> <template>
<div style="margin-top: -16px;margin-left:-4px;margin-right:-4px;" @click="pageClick"> <div style="margin-top: -16px; margin-left: -4px; margin-right: -4px" @click="pageClick">
<a-spin tip="Loading..." :spinning="spinning"> <a-spin tip="Loading..." :spinning="spinning">
<a-row :gutter="24"> <a-row :gutter="24">
<a-col :md="24" :sm="24" style="padding: 0 0 0 0" class="content-box"> <a-col :md="24" :sm="24" style="padding: 0 0 0 0" class="content-box">
@ -16,7 +16,7 @@
v-show="(findex < 4 && !advanced) || advanced" v-show="(findex < 4 && !advanced) || advanced"
class="from-label" class="from-label"
> >
<a-form-item style="padding-left:10px;padding-right:10px;" :label="formLabel.title"> <a-form-item style="padding-left: 10px; padding-right: 10px" :label="formLabel.title">
<formLabel <formLabel
:ref="`fromlabel-${formLabel.label}`" :ref="`fromlabel-${formLabel.label}`"
:labelData="formLabel" :labelData="formLabel"
@ -68,7 +68,7 @@
</a-form> </a-form>
</div> </div>
</x-card> </x-card>
<x-card class="content-table" style="margin-top:-6px;"> <x-card class="content-table" style="margin-top: -6px">
<div slot="content" class="table-page-search-wrapper" :style="{ marginTop: '-8px' }"> <div slot="content" class="table-page-search-wrapper" :style="{ marginTop: '-8px' }">
<vxe-toolbar> <vxe-toolbar>
<template #buttons> <template #buttons>
@ -100,6 +100,25 @@
<div class="nav"><i class="iconfont icon-shishijifei"></i>定时订舱</div> <div class="nav"><i class="iconfont icon-shishijifei"></i>定时订舱</div>
<div class="nav"><i class="iconfont icon-xiaopiaodayin"></i>小票状态</div> <div class="nav"><i class="iconfont icon-xiaopiaodayin"></i>小票状态</div>
<div class="nav" @click="openTraceModel"><i class="iconfont icon-yunshu1"></i>运踪订阅</div> <div class="nav" @click="openTraceModel"><i class="iconfont icon-yunshu1"></i>运踪订阅</div>
<div class="nav">
<a-dropdown>
<span> <i class="iconfont icon-xiaopiaodayin"></i>船公司文件 </span>
<a-menu slot="overlay">
<a-menu-item>
<a @click="handleDownByBc" href="javascript:;">BC下载</a>
</a-menu-item>
<a-menu-item>
<a href="javascript:;">DRAFT下载</a>
</a-menu-item>
<a-menu-item>
<a href="javascript:;">到港时间更新</a>
</a-menu-item>
<a-menu-item>
<a href="javascript:;">舱位分配查询</a>
</a-menu-item>
</a-menu>
</a-dropdown>
</div>
</div> </div>
</template> </template>
<template #tools> <template #tools>
@ -306,9 +325,7 @@
width="40%" width="40%"
> >
<template slot="footer"> <template slot="footer">
<a-button key="back" @click="TaskShippingOrderCompareHandleCancel"> <a-button key="back" @click="TaskShippingOrderCompareHandleCancel"> </a-button>
关闭
</a-button>
</template> </template>
<p class="TaskShippingOrderCompareP"> <p class="TaskShippingOrderCompareP">
{{ TaskShippingOrderCompareData.compareTime }} {{ TaskShippingOrderCompareData.compareTime }}
@ -855,7 +872,7 @@ export default {
next() next()
}, },
beforeRouteEnter(to, from, next) { beforeRouteEnter(to, from, next) {
next(vm => { next((vm) => {
vm.upDate() vm.upDate()
}) })
}, },
@ -923,6 +940,7 @@ export default {
// } // }
} }
}, },
handleDownByBc() {},
// //
editingHandleOk() { editingHandleOk() {
const { const {
@ -932,10 +950,10 @@ export default {
if (!errors) { if (!errors) {
values.id = [] values.id = []
const select = this.$refs.xGrid.getCheckboxRecords() const select = this.$refs.xGrid.getCheckboxRecords()
select.forEach(item => { select.forEach((item) => {
values.id.push(item.id) values.id.push(item.id)
}) })
BookingOrderBachUpdate(values).then(res => { BookingOrderBachUpdate(values).then((res) => {
if (res.success) { if (res.success) {
this.$message.success('编辑成功') this.$message.success('编辑成功')
this.editingHandleCancel() this.editingHandleCancel()
@ -962,7 +980,7 @@ export default {
this.WebVessel = data this.WebVessel = data
} }
GetVessellist({ KeyWord: data }).then(res => { GetVessellist({ KeyWord: data }).then((res) => {
this.vesselData = res.data this.vesselData = res.data
}) })
}, },
@ -977,12 +995,12 @@ export default {
} }
}, },
portDischargeSearch(data) { portDischargeSearch(data) {
GetPortlist({ KeyWord: data }).then(res => { GetPortlist({ KeyWord: data }).then((res) => {
this.portDischargeData = res.data this.portDischargeData = res.data
}) })
}, },
portDischargeChange(value) { portDischargeChange(value) {
this.portDischargeData.forEach(item => { this.portDischargeData.forEach((item) => {
if (item.enName == value) { if (item.enName == value) {
setTimeout(() => { setTimeout(() => {
this.editingForm.setFieldsValue({ this.editingForm.setFieldsValue({
@ -994,12 +1012,12 @@ export default {
}) })
}, },
destinationSearch(data) { destinationSearch(data) {
GetPortlist({ KeyWord: data }).then(res => { GetPortlist({ KeyWord: data }).then((res) => {
this.destinationData = res.data this.destinationData = res.data
}) })
}, },
destinationChange(value) { destinationChange(value) {
this.destinationData.forEach(item => { this.destinationData.forEach((item) => {
if (item.enName == value) { if (item.enName == value) {
setTimeout(() => { setTimeout(() => {
this.editingForm.setFieldsValue({ this.editingForm.setFieldsValue({
@ -1033,7 +1051,7 @@ export default {
const query = { const query = {
typeArr: ['booking_list_cond', 'booking_list_column', 'booking_list_page'] typeArr: ['booking_list_cond', 'booking_list_column', 'booking_list_page']
} }
DjyUserConfigMulti(this.$qs.stringify(query, { arrayFormat: 'repeat' })).then(res => { DjyUserConfigMulti(this.$qs.stringify(query, { arrayFormat: 'repeat' })).then((res) => {
const $data = {} const $data = {}
res.data.map((item, index) => { res.data.map((item, index) => {
switch (item.type) { switch (item.type) {
@ -1065,11 +1083,11 @@ export default {
}, },
// - start // - start
getCarrier() { getCarrier() {
const Rdata = data => { const Rdata = (data) => {
let RData = {} let RData = {}
for (var i = 0; i < 26; i++) { for (var i = 0; i < 26; i++) {
RData[String.fromCharCode(65 + i)] = [] RData[String.fromCharCode(65 + i)] = []
data.forEach(item => { data.forEach((item) => {
if (String.fromCharCode(65 + i) == item.enName[0].toUpperCase()) { if (String.fromCharCode(65 + i) == item.enName[0].toUpperCase()) {
RData[String.fromCharCode(65 + i)].push(item) RData[String.fromCharCode(65 + i)].push(item)
} }
@ -1089,8 +1107,8 @@ export default {
'S-U': [], 'S-U': [],
'V-Z': [] 'V-Z': []
} }
Object.keys(Obj).forEach(e => { Object.keys(Obj).forEach((e) => {
Obj[e].forEach(item => { Obj[e].forEach((item) => {
RData[item].forEach((Ai, AiIndex) => { RData[item].forEach((Ai, AiIndex) => {
let imgSrc = '' let imgSrc = ''
try { try {
@ -1106,15 +1124,15 @@ export default {
this.RcarrierData = Data this.RcarrierData = Data
} }
GetCarrierlist() GetCarrierlist()
.then(res => { .then((res) => {
if (res.code === 200) { if (res.code === 200) {
Rdata(res.data) Rdata(res.data)
DjyUserConfigGet({ type: 'booking_memory' }) DjyUserConfigGet({ type: 'booking_memory' })
.then(e => { .then((e) => {
if (e.data) { if (e.data) {
let data = [] let data = []
JSON.parse(e.data.configJson).forEach(item => { JSON.parse(e.data.configJson).forEach((item) => {
res.data.forEach(item2 => { res.data.forEach((item2) => {
if (item == item2.code) { if (item == item2.code) {
data.push(item2) data.push(item2)
} }
@ -1128,7 +1146,7 @@ export default {
}) })
} }
}) })
.catch(err => { .catch((err) => {
console.log(err) console.log(err)
}) })
}, },
@ -1232,7 +1250,7 @@ export default {
}, },
getFormData(isReset = false) { getFormData(isReset = false) {
DjyUserConfigGet({ type: 'booking_list_cond' }).then(res => { DjyUserConfigGet({ type: 'booking_list_cond' }).then((res) => {
this.setFormData(res.data) this.setFormData(res.data)
}) })
}, },
@ -1254,7 +1272,7 @@ export default {
}, },
getFromSelectData(func, ...args) { getFromSelectData(func, ...args) {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
func(...args).then(res => { func(...args).then((res) => {
if (res.code === 200) { if (res.code === 200) {
resolve(res.data) resolve(res.data)
} else { } else {
@ -1279,7 +1297,7 @@ export default {
DjyUserConfigAdd({ DjyUserConfigAdd({
type: 'booking_list_page', type: 'booking_list_page',
configJson: JSON.stringify(data) configJson: JSON.stringify(data)
}).then(res => { }).then((res) => {
console.log('页码设置成功') console.log('页码设置成功')
}) })
}, },
@ -1372,7 +1390,7 @@ export default {
DjyUserConfigAdd({ DjyUserConfigAdd({
type: 'booking_list_cond', type: 'booking_list_cond',
configJson: JSON.stringify(arr) configJson: JSON.stringify(arr)
}).then(res => { }).then((res) => {
this.$message.success('保存成功') this.$message.success('保存成功')
this.$refs.setForm.handleCancel() this.$refs.setForm.handleCancel()
Object.keys(this.$refs).map((label, index) => { Object.keys(this.$refs).map((label, index) => {
@ -1422,7 +1440,7 @@ export default {
DjyUserConfigAdd({ DjyUserConfigAdd({
type: 'booking_list_column', type: 'booking_list_column',
configJson: JSON.stringify(data) configJson: JSON.stringify(data)
}).then(res => { }).then((res) => {
this.$refs.setForm.handleCancel() this.$refs.setForm.handleCancel()
}) })
}, },
@ -1474,7 +1492,7 @@ export default {
query.firstFlag = true query.firstFlag = true
} }
BookingOrderPage(query) BookingOrderPage(query)
.then(res => { .then((res) => {
if (res.success) { if (res.success) {
let newBookingList = {} let newBookingList = {}
if (query.PageNo !== 1) { if (query.PageNo !== 1) {
@ -1528,7 +1546,7 @@ export default {
this.ResetType = true this.ResetType = true
console.log(this.gridOptions) console.log(this.gridOptions)
}) })
.catch(err => { .catch((err) => {
console.log(err) console.log(err)
}) })
}, },
@ -1564,7 +1582,7 @@ export default {
let data = [] let data = []
data.push(this.carrierRadio) data.push(this.carrierRadio)
if (this.RecentlyCarrierData.length) { if (this.RecentlyCarrierData.length) {
this.RecentlyCarrierData.forEach(item => { this.RecentlyCarrierData.forEach((item) => {
if (item.code != this.carrierRadio && data.length < 10) { if (item.code != this.carrierRadio && data.length < 10) {
data.push(item.code) data.push(item.code)
} }
@ -1574,7 +1592,7 @@ export default {
DjyUserConfigAdd({ DjyUserConfigAdd({
type: 'booking_memory', type: 'booking_memory',
configJson: JSON.stringify(data) configJson: JSON.stringify(data)
}).then(res => { }).then((res) => {
this.getCarrier() this.getCarrier()
this.addVisible = false this.addVisible = false
this.addNum = Math.round(Math.random() * 1000) this.addNum = Math.round(Math.random() * 1000)
@ -1596,7 +1614,7 @@ export default {
this.moreNumVal this.moreNumVal
.replace(/\n|\r/g, ',') .replace(/\n|\r/g, ',')
.split(',') .split(',')
.forEach(item => { .forEach((item) => {
if (item.replace(/\s*/g, '')) { if (item.replace(/\s*/g, '')) {
if (data) { if (data) {
data = `${data},${item}` data = `${data},${item}`
@ -1756,7 +1774,7 @@ export default {
} }
SendTrace(arr) SendTrace(arr)
.then(res => { .then((res) => {
if (res.success) { if (res.success) {
const tip = `订阅成功` const tip = `订阅成功`
this.$message.success(tip) this.$message.success(tip)
@ -1768,7 +1786,7 @@ export default {
this.traceValue = [] this.traceValue = []
} }
}) })
.catch(err => { .catch((err) => {
console.log(err) console.log(err)
}) })
}, },
@ -1830,7 +1848,7 @@ export default {
} }
const fun = this.emnuCompleteApi(form.label) const fun = this.emnuCompleteApi(form.label)
if (fun) { if (fun) {
this.getFromSelectData(this.emnuCompleteApi(form.label), query).then(data => { this.getFromSelectData(this.emnuCompleteApi(form.label), query).then((data) => {
if (['CUSTOMERNAME', 'FORWARDER', 'CUSTOMSER', 'AGENTID', 'TRUCKER'].includes(form.label)) { if (['CUSTOMERNAME', 'FORWARDER', 'CUSTOMSER', 'AGENTID', 'TRUCKER'].includes(form.label)) {
this.$refs[`fromlabel-${form.label}`][0].$data.dataSourceList = data.rows this.$refs[`fromlabel-${form.label}`][0].$data.dataSourceList = data.rows
} else { } else {
@ -1892,7 +1910,7 @@ export default {
getSelectFirst({ form, index, value }) { getSelectFirst({ form, index, value }) {
const fun = this.emnuSelectApi(form.label) const fun = this.emnuSelectApi(form.label)
if (fun) { if (fun) {
this.getFromSelectData(fun).then(data => { this.getFromSelectData(fun).then((data) => {
this.formData[index].dataList = data this.formData[index].dataList = data
this.$refs[`fromlabel-${form.label}`][0].$data.dataList = data this.$refs[`fromlabel-${form.label}`][0].$data.dataList = data
}) })
@ -1915,10 +1933,10 @@ export default {
}, },
deleteBookingOrder(arr) { deleteBookingOrder(arr) {
DeleteBookingOrder(arr.toString()) DeleteBookingOrder(arr.toString())
.then(res => { .then((res) => {
if (res.success) { if (res.success) {
this.$message.success('删除成功') this.$message.success('删除成功')
const _data = this.gridOptions.data.filter(item => !arr.includes(item.id)) const _data = this.gridOptions.data.filter((item) => !arr.includes(item.id))
this.$refs.xGrid.reloadData(_data).then(() => { this.$refs.xGrid.reloadData(_data).then(() => {
this.gridOptions.pagerConfig.total = this.gridOptions.pagerConfig.total - arr.length this.gridOptions.pagerConfig.total = this.gridOptions.pagerConfig.total - arr.length
}) })
@ -1927,7 +1945,7 @@ export default {
this.$message.error(res.message) this.$message.error(res.message)
} }
}) })
.catch(err => { .catch((err) => {
console.log(err) console.log(err)
}) })
}, },
@ -1957,7 +1975,7 @@ export default {
} }
this.spinning = true this.spinning = true
ExcuteShippingOrderCompareBatch(arr) ExcuteShippingOrderCompareBatch(arr)
.then(res => { .then((res) => {
if (res.success) { if (res.success) {
this.spinning = false this.spinning = false
if (!res.data.succ) { if (!res.data.succ) {
@ -1976,7 +1994,7 @@ export default {
this.$message.error(res.data.msg) this.$message.error(res.data.msg)
} }
}) })
.catch(err => { .catch((err) => {
console.log(err) console.log(err)
this.spinning = false this.spinning = false
}) })

@ -92,10 +92,15 @@
:showSearch="true" :showSearch="true"
:filterOption="filterOption" :filterOption="filterOption"
v-decorator="['truckId']" v-decorator="['truckId']"
@focus="gettruckIdData" @change="Changeyardid"
@change="ChangetruckId"
allowClear allowClear
:disabled="taskPKId ? false : true" :default-active-first-option="false"
:show-arrow="false"
:filter-option="false"
:not-found-content="null"
show-search
@search="gettruckIdData"
@focus="gettruckIdData"
> >
<a-select-option v-for="item in truckIdData" :key="item.id" :value="item.id"> <a-select-option v-for="item in truckIdData" :key="item.id" :value="item.id">
{{ item.shortName }} {{ item.shortName }}
@ -318,16 +323,21 @@
</a-col> </a-col>
</a-row> </a-row>
<a-row> <a-row>
<a-col :span="8"> <a-col :span="16">
<a-form-item label="工厂联系人:" :labelCol="labelCol8" :wrapperCol="wrapperCol8" has-feedback> <a-form-item
label="工厂联系人:"
:labelCol="labelCol4"
:wrapperCol="{ xs: { span: 25 }, sm: { span: 21 } }"
has-feedback
>
<a-input v-decorator="['factoryContact']" /> <a-input v-decorator="['factoryContact']" />
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :span="8"> <!-- <a-col :span="8">
<a-form-item label="联系电话:" :labelCol="labelCol8" :wrapperCol="wrapperCol8" has-feedback> <a-form-item label="联系电话:" :labelCol="labelCol8" :wrapperCol="wrapperCol8" has-feedback>
<a-input v-decorator="['factoryTel']" /> <a-input v-decorator="['factoryTel']" />
</a-form-item> </a-form-item>
</a-col> </a-col> -->
<a-col :span="8"> <a-col :span="8">
<a-form-item label="返场时间:" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback> <a-form-item label="返场时间:" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
<a-date-picker v-decorator="['returnTime']" /> <a-date-picker v-decorator="['returnTime']" />
@ -1200,7 +1210,8 @@ export default {
} }
}) })
}, },
gettruckIdData(name = '', type) { gettruckIdData(name, type) {
console.log(name)
DjyCustomerQuerytDjyCustomerInfo({ queryType: 'fleet', queryItem: name }).then((res) => { DjyCustomerQuerytDjyCustomerInfo({ queryType: 'fleet', queryItem: name }).then((res) => {
this.truckIdData = res.data this.truckIdData = res.data
}) })

Loading…
Cancel
Save