修改问题

szh_zidingyibiaoti
sunzehua 2 years ago
parent dc0682a02a
commit 7e94698bdd

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

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

@ -1,5 +1,5 @@
<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-row :gutter="24">
<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"
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
:ref="`fromlabel-${formLabel.label}`"
:labelData="formLabel"
@ -68,7 +68,7 @@
</a-form>
</div>
</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' }">
<vxe-toolbar>
<template #buttons>
@ -100,6 +100,25 @@
<div class="nav"><i class="iconfont icon-shishijifei"></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">
<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>
</template>
<template #tools>
@ -306,9 +325,7 @@
width="40%"
>
<template slot="footer">
<a-button key="back" @click="TaskShippingOrderCompareHandleCancel">
关闭
</a-button>
<a-button key="back" @click="TaskShippingOrderCompareHandleCancel"> </a-button>
</template>
<p class="TaskShippingOrderCompareP">
{{ TaskShippingOrderCompareData.compareTime }}
@ -855,7 +872,7 @@ export default {
next()
},
beforeRouteEnter(to, from, next) {
next(vm => {
next((vm) => {
vm.upDate()
})
},
@ -923,6 +940,7 @@ export default {
// }
}
},
handleDownByBc() {},
//
editingHandleOk() {
const {
@ -932,10 +950,10 @@ export default {
if (!errors) {
values.id = []
const select = this.$refs.xGrid.getCheckboxRecords()
select.forEach(item => {
select.forEach((item) => {
values.id.push(item.id)
})
BookingOrderBachUpdate(values).then(res => {
BookingOrderBachUpdate(values).then((res) => {
if (res.success) {
this.$message.success('编辑成功')
this.editingHandleCancel()
@ -962,7 +980,7 @@ export default {
this.WebVessel = data
}
GetVessellist({ KeyWord: data }).then(res => {
GetVessellist({ KeyWord: data }).then((res) => {
this.vesselData = res.data
})
},
@ -977,12 +995,12 @@ export default {
}
},
portDischargeSearch(data) {
GetPortlist({ KeyWord: data }).then(res => {
GetPortlist({ KeyWord: data }).then((res) => {
this.portDischargeData = res.data
})
},
portDischargeChange(value) {
this.portDischargeData.forEach(item => {
this.portDischargeData.forEach((item) => {
if (item.enName == value) {
setTimeout(() => {
this.editingForm.setFieldsValue({
@ -994,12 +1012,12 @@ export default {
})
},
destinationSearch(data) {
GetPortlist({ KeyWord: data }).then(res => {
GetPortlist({ KeyWord: data }).then((res) => {
this.destinationData = res.data
})
},
destinationChange(value) {
this.destinationData.forEach(item => {
this.destinationData.forEach((item) => {
if (item.enName == value) {
setTimeout(() => {
this.editingForm.setFieldsValue({
@ -1033,7 +1051,7 @@ export default {
const query = {
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 = {}
res.data.map((item, index) => {
switch (item.type) {
@ -1065,11 +1083,11 @@ export default {
},
// - start
getCarrier() {
const Rdata = data => {
const Rdata = (data) => {
let RData = {}
for (var i = 0; i < 26; i++) {
RData[String.fromCharCode(65 + i)] = []
data.forEach(item => {
data.forEach((item) => {
if (String.fromCharCode(65 + i) == item.enName[0].toUpperCase()) {
RData[String.fromCharCode(65 + i)].push(item)
}
@ -1089,8 +1107,8 @@ export default {
'S-U': [],
'V-Z': []
}
Object.keys(Obj).forEach(e => {
Obj[e].forEach(item => {
Object.keys(Obj).forEach((e) => {
Obj[e].forEach((item) => {
RData[item].forEach((Ai, AiIndex) => {
let imgSrc = ''
try {
@ -1106,15 +1124,15 @@ export default {
this.RcarrierData = Data
}
GetCarrierlist()
.then(res => {
.then((res) => {
if (res.code === 200) {
Rdata(res.data)
DjyUserConfigGet({ type: 'booking_memory' })
.then(e => {
.then((e) => {
if (e.data) {
let data = []
JSON.parse(e.data.configJson).forEach(item => {
res.data.forEach(item2 => {
JSON.parse(e.data.configJson).forEach((item) => {
res.data.forEach((item2) => {
if (item == item2.code) {
data.push(item2)
}
@ -1128,7 +1146,7 @@ export default {
})
}
})
.catch(err => {
.catch((err) => {
console.log(err)
})
},
@ -1232,7 +1250,7 @@ export default {
},
getFormData(isReset = false) {
DjyUserConfigGet({ type: 'booking_list_cond' }).then(res => {
DjyUserConfigGet({ type: 'booking_list_cond' }).then((res) => {
this.setFormData(res.data)
})
},
@ -1254,7 +1272,7 @@ export default {
},
getFromSelectData(func, ...args) {
return new Promise((resolve, reject) => {
func(...args).then(res => {
func(...args).then((res) => {
if (res.code === 200) {
resolve(res.data)
} else {
@ -1279,7 +1297,7 @@ export default {
DjyUserConfigAdd({
type: 'booking_list_page',
configJson: JSON.stringify(data)
}).then(res => {
}).then((res) => {
console.log('页码设置成功')
})
},
@ -1372,7 +1390,7 @@ export default {
DjyUserConfigAdd({
type: 'booking_list_cond',
configJson: JSON.stringify(arr)
}).then(res => {
}).then((res) => {
this.$message.success('保存成功')
this.$refs.setForm.handleCancel()
Object.keys(this.$refs).map((label, index) => {
@ -1422,7 +1440,7 @@ export default {
DjyUserConfigAdd({
type: 'booking_list_column',
configJson: JSON.stringify(data)
}).then(res => {
}).then((res) => {
this.$refs.setForm.handleCancel()
})
},
@ -1474,7 +1492,7 @@ export default {
query.firstFlag = true
}
BookingOrderPage(query)
.then(res => {
.then((res) => {
if (res.success) {
let newBookingList = {}
if (query.PageNo !== 1) {
@ -1528,7 +1546,7 @@ export default {
this.ResetType = true
console.log(this.gridOptions)
})
.catch(err => {
.catch((err) => {
console.log(err)
})
},
@ -1564,7 +1582,7 @@ export default {
let data = []
data.push(this.carrierRadio)
if (this.RecentlyCarrierData.length) {
this.RecentlyCarrierData.forEach(item => {
this.RecentlyCarrierData.forEach((item) => {
if (item.code != this.carrierRadio && data.length < 10) {
data.push(item.code)
}
@ -1574,7 +1592,7 @@ export default {
DjyUserConfigAdd({
type: 'booking_memory',
configJson: JSON.stringify(data)
}).then(res => {
}).then((res) => {
this.getCarrier()
this.addVisible = false
this.addNum = Math.round(Math.random() * 1000)
@ -1596,7 +1614,7 @@ export default {
this.moreNumVal
.replace(/\n|\r/g, ',')
.split(',')
.forEach(item => {
.forEach((item) => {
if (item.replace(/\s*/g, '')) {
if (data) {
data = `${data},${item}`
@ -1756,7 +1774,7 @@ export default {
}
SendTrace(arr)
.then(res => {
.then((res) => {
if (res.success) {
const tip = `订阅成功`
this.$message.success(tip)
@ -1768,7 +1786,7 @@ export default {
this.traceValue = []
}
})
.catch(err => {
.catch((err) => {
console.log(err)
})
},
@ -1830,7 +1848,7 @@ export default {
}
const fun = this.emnuCompleteApi(form.label)
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)) {
this.$refs[`fromlabel-${form.label}`][0].$data.dataSourceList = data.rows
} else {
@ -1892,7 +1910,7 @@ export default {
getSelectFirst({ form, index, value }) {
const fun = this.emnuSelectApi(form.label)
if (fun) {
this.getFromSelectData(fun).then(data => {
this.getFromSelectData(fun).then((data) => {
this.formData[index].dataList = data
this.$refs[`fromlabel-${form.label}`][0].$data.dataList = data
})
@ -1915,10 +1933,10 @@ export default {
},
deleteBookingOrder(arr) {
DeleteBookingOrder(arr.toString())
.then(res => {
.then((res) => {
if (res.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.gridOptions.pagerConfig.total = this.gridOptions.pagerConfig.total - arr.length
})
@ -1927,7 +1945,7 @@ export default {
this.$message.error(res.message)
}
})
.catch(err => {
.catch((err) => {
console.log(err)
})
},
@ -1957,7 +1975,7 @@ export default {
}
this.spinning = true
ExcuteShippingOrderCompareBatch(arr)
.then(res => {
.then((res) => {
if (res.success) {
this.spinning = false
if (!res.data.succ) {
@ -1976,7 +1994,7 @@ export default {
this.$message.error(res.data.msg)
}
})
.catch(err => {
.catch((err) => {
console.log(err)
this.spinning = false
})

@ -92,10 +92,15 @@
:showSearch="true"
:filterOption="filterOption"
v-decorator="['truckId']"
@focus="gettruckIdData"
@change="ChangetruckId"
@change="Changeyardid"
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">
{{ item.shortName }}
@ -318,16 +323,21 @@
</a-col>
</a-row>
<a-row>
<a-col :span="8">
<a-form-item label="工厂联系人:" :labelCol="labelCol8" :wrapperCol="wrapperCol8" has-feedback>
<a-col :span="16">
<a-form-item
label="工厂联系人:"
:labelCol="labelCol4"
:wrapperCol="{ xs: { span: 25 }, sm: { span: 21 } }"
has-feedback
>
<a-input v-decorator="['factoryContact']" />
</a-form-item>
</a-col>
<a-col :span="8">
<!-- <a-col :span="8">
<a-form-item label="联系电话:" :labelCol="labelCol8" :wrapperCol="wrapperCol8" has-feedback>
<a-input v-decorator="['factoryTel']" />
</a-form-item>
</a-col>
</a-col> -->
<a-col :span="8">
<a-form-item label="返场时间:" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
<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) => {
this.truckIdData = res.data
})

Loading…
Cancel
Save