修改列表等

dev
lilu 2 years ago
parent 9e9bf94531
commit 5892f647f5

@ -32,14 +32,12 @@ export default {
this.closeThat(val)
})
.$on('rename', ({ key, name }) => {
// console.log('rename', key, name)
try {
const item = this.pages.find(item => item.path === key)
item.meta.customTitle = name
this.$forceUpdate()
} catch (e) {}
})
console.log('== 路由新增 ==', this.$route, this.$route.fullPath, this.fullPathList)
this.pages.push(this.$route)
this.fullPathList.push(this.$route.fullPath)
this.selectedLastPath()
@ -48,10 +46,8 @@ export default {
...mapActions(['setNeedSavePages']),
onEdit(targetKey, action) {
const _that = this
console.log('== 路由编辑 start ==', this.fullPathList, this.page)
if (targetKey.includes('BookingDetail')) {
if (Object.keys(this.needSavePages).includes(targetKey) && (this.needSavePages[targetKey].details || this.needSavePages[targetKey].hbList)) {
console.log('== 理由编辑 - 有未保存数据 biu 弹窗出现 ==', this.fullPathList, this.page)
this.$confirm({
title: '请确认无未保存数据!',
content: '当点击确定按钮时,此页面 将会关闭。',
@ -75,15 +71,12 @@ export default {
} else {
this[action](targetKey)
}
console.log(' === 路由编辑 end ==', this.fullPathList, this.page)
},
remove(targetKey) {
this.pages = this.pages.filter(page => page.fullPath !== targetKey)
this.fullPathList = this.fullPathList.filter(path => path !== targetKey)
console.log('== 关闭 ==', this.pages, this.fullPathList)
//
if (!this.fullPathList.includes(this.activeKey)) {
console.log('=== 最后一个标签页 ===')
this.selectedLastPath()
}
},
@ -93,7 +86,6 @@ export default {
// content menu
closeThat(e) {
console.log('=== 测试点4 ===', this.fullPathList)
//
if (this.fullPathList.length > 1) {
this.remove(e)
@ -102,7 +94,6 @@ export default {
}
},
closeLeft(e) {
console.log('=== 测试点1 ===', this.fullPathList)
const currentIndex = this.fullPathList.indexOf(e)
if (currentIndex > 0) {
this.fullPathList.forEach((item, index) => {
@ -115,7 +106,6 @@ export default {
}
},
closeRight(e) {
console.log('=== 测试点2 ===')
const currentIndex = this.fullPathList.indexOf(e)
if (currentIndex < this.fullPathList.length - 1) {
this.fullPathList.forEach((item, index) => {
@ -128,7 +118,6 @@ export default {
}
},
closeAll(e) {
console.log('=== 测试点3 ===')
const currentIndex = this.fullPathList.indexOf(e)
this.fullPathList.forEach((item, index) => {
if (index !== currentIndex) {
@ -159,7 +148,6 @@ export default {
},
// render
renderTabPane(title, keyPath) {
// console.log(title, keyPath)
let name = title
let data = Object.fromEntries(new URLSearchParams(keyPath.split('?')[1]))
const menu = this.renderTabPaneMenu(keyPath)
@ -201,7 +189,6 @@ export default {
this.fullPathList = this.pages.map((item, index) => {
return item.fullPath
})
console.log('=== 路由切换 === - pages: ', this.pages, ', fullPathList: ', this.fullPathList)
},
activeKey: function(newPathKey) {
this.$router.push({ path: newPathKey })

@ -135,7 +135,6 @@ export default {
setMenus () {
const routes = convertRoutes(this.mainMenu.find(item => item.path === '/'))
this.menus = (routes && routes.children) || []
console.log("setMenus",this.menus);
},
toggle () {
this.collapsed = !this.collapsed

@ -12,7 +12,7 @@
prop="bookingEDIExt.sendCode"
>
<!-- <a-input :allowClear="true" v-model="details.bookingEDIExt.sendCode" /> -->
<inputView type="sendCode" :parentVal="details.sendCode" @getInputChange="inputChange"/>
<inputView type="sendCode" :parentVal="details.bookingEDIExt.sendCode" @getInputChange="inputChange"/>
</a-form-model-item>
</a-col>
<a-col :span="8">
@ -194,7 +194,7 @@
prop="freightpayer"
>
<!-- <a-input :allowClear="true" v-model="details.freightpayer" /> -->
<inputView type="freightpayer" :parentVal="details.bookingEDIExt.freightpayer" @getInputChange="inputChange"/>
<inputView type="freightpayer" :parentVal="details.freightpayer" @getInputChange="inputChange"/>
</a-form-model-item>
</a-col>
<a-col :span="23">
@ -512,13 +512,13 @@ export default {
this.details.bookingEDIExt.salerCodeName = val.split('|')[1]
},
inputChange ({ type, value }) {
const bookingEDIExtArr = ['receiveCode', 'ediAttn', 'ediAttnTel', 'ediAttnMail', 'amsConsignee', 'amsNotifyParty', 'opEName', 'opTel', 'opEmail', 'goodsName', 'orderRemark', 'freightpayer', 'consigneeEdiCode', 'shipperEdiCode', 'notifyCdoe', 'emanifestHbl', 'acihbl']
const bookingEDIExtArr = ['sendCode', 'receiveCode', 'ediAttn', 'ediAttnTel', 'ediAttnMail', 'amsConsignee', 'amsNotifyParty', 'opEName', 'opTel', 'opEmail', 'goodsName', 'orderRemark', 'consigneeEdiCode', 'shipperEdiCode', 'notifyCdoe', 'emanifestHbl', 'acihbl']
if (bookingEDIExtArr.includes(type)) {
this.details.bookingEDIExt[type] = value
console.log(this.details.bookingEDIExt[type])
// console.log(this.details.bookingEDIExt[type])
} else {
this.details[type] = value
console.log(this.details[type])
// console.log(this.details[type])
}
this.$forceUpdate()
}
@ -612,4 +612,8 @@ export default {
/deep/ form .has-feedback .ant-calendar-picker-icon, form .has-feedback .ant-time-picker-icon, form .has-feedback .ant-calendar-picker-clear, form .has-feedback .ant-time-picker-clear{
right: 10px !important;
}
/deep/ .ant-input-affix-wrapper{
color: rgba(0, 0, 0, 0.25) !important;
}
</style>

@ -294,7 +294,6 @@ export default {
watch: {
parSedOrderList: {
handler(nval, oval) {
console.log('分单 - 更新了列表', nval, oval)
const _data = JSON.parse(JSON.stringify(nval))
if (_data.length > 0) {
if (!_data[this.editIndex].bookingEDIExt) {
@ -306,12 +305,9 @@ export default {
}
}
this.editDetails = _data[this.editIndex]
// console.log('data', this.editDetails.isNoSave)
this.inSecLoad = true
// console.log('', this.inSecLoad)
setTimeout(() => {
this.inSecLoad = false
// console.log('', this.inSecLoad)
}, 200)
} else {
this.editDetails = null
@ -348,7 +344,6 @@ export default {
},
editDetails: {
handler(nval, oval) {
console.log('1. === 编辑数据更新 ===', nval, oval)
if (!this.inSave) {
this.$emit('changeHB', this.sedOrderList)
}
@ -577,7 +572,6 @@ export default {
} else {
// edi
Object.keys(this.ediRules).map((item, index) => {
console.log(this.editDetails[item.split('.')[0]][item.split('.')[1]])
if (this.checkFrom.includes(item) && !this.editDetails[item.split('.')[0]][item.split('.')[1]]) {
this.hasEdiRules = true
}
@ -598,7 +592,6 @@ export default {
this.editDetails.ctnInputs.map((item, index) => {
Object.keys(item).map((label, lindex) => {
if (this.tableRules[label] && this.tableRules[label].required && !item[label]) {
console.log('这里需要必填: ', label, this.tableRules[label].message)
tableErrTip = `${tableErrTip} 序号${index + 1}${this.tableRules[label].title}未填写,`
}
})

@ -607,6 +607,8 @@ export default {
this.inPageLoading = false
if (this.bookingDetails.hbList && this.bookingDetails.hbList.length > 0) {
this.Showtabs = true
} else {
this.Showtabs = false
}
setTimeout(() => {
this.inChildLoading = false
@ -629,13 +631,13 @@ export default {
this.mainOrderActiveKey = $data.mainOrderActiveKey
this.isCopy = this.$route.query.isCopy
this.inPageLoading = false
// console.log('== ==', $data.isCopy, this.$route.query.isCopy, this.isCopy)
if (this.isCopy && !$data.isCopy) {
// console.log('== , ==')
this.bookingDetails.mblno = ''
}
if (this.bookingDetails.hbList && this.bookingDetails.hbList.length > 0) {
this.Showtabs = true
} else {
this.Showtabs = false
}
setTimeout(() => {
this.inChildLoading = false
@ -657,6 +659,8 @@ export default {
this.inPageLoading = false
if (this.bookingDetails.hbList && this.bookingDetails.hbList.length > 0) {
this.Showtabs = true
} else {
this.Showtabs = false
}
// console.log('== ==', $data.isCopy, this.$route.query.isCopy, this.isCopy)
if (this.isCopy && !$data.isCopy) {

@ -1701,6 +1701,10 @@ export default {
right: 10px !important;
}
/deep/ .ant-calendar-picker-clear{
color: rgba(0, 0, 0, 0.25) !important;
}
// .ant-calendar-picker-input{
// padding: 0 4px;
// }

@ -424,7 +424,6 @@ export default {
type: 'billInfo'
})
}
console.log(nval.issuetype)
this.$forceUpdate()
},
deep: true
@ -710,11 +709,9 @@ export default {
// ===== ====
handleCopyNoChange(value) {
this.details.copynobill = value
console.log(this.details.copynobill)
},
handleNoChange(value) {
this.details.nobill = value
console.log(this.details.nobill)
}
}
}
@ -829,4 +826,8 @@ export default {
margin-bottom: 5px !important;
}
}
/deep/ .ant-calendar-picker-clear{
color: rgba(0, 0, 0, 0.25) !important;
}
</style>

@ -73,6 +73,9 @@ export default {
<style lang="less">
.input-content{
position: relative;
overflow: hidden;
width: 100%;
height: 100%;
.input-box {
width: 100%;
}

@ -548,13 +548,13 @@
prop="pkgs"
>
<div class="line-box">
<inputView type="pkgs" :parentVal="details.pkgs" inputType="number" @getInputChange="inputChange"/>
<!-- <inputView type="pkgs" :parentVal="details.pkgs" inputType="number" @getInputChange="inputChange"/> -->
<a-input :allowClear="true" v-model="details.pkgs" type="number" @change="changePkgs"/>
<i class="iconfont icon-bianji1 edit-icon" @click="editTextEntryModel('pkgs')"></i>
<!-- <a-input :allowClear="true" v-model="details.pkgs" type="number" @change="changePkgs"/> -->
</div>
</a-form-model-item>
</a-col>
<a-col :span="12">
<a-col :span="12" style="overflow:hidden;">
<a-form-model-item
class="from-label"
label="包装"
@ -576,7 +576,7 @@
/>
</a-form-model-item>
</a-col>
<a-col :span="12">
<a-col :span="12" style="overflow:hidden;">
<a-form-model-item
class="from-label kgs-line-box"
label="毛重"
@ -586,14 +586,14 @@
prop="kgs"
>
<div class="line-box">
<inputView type="kgs" :parentVal="details.kgs" @getInputChange="inputChange"/>
<!-- <a-input :allowClear="true" v-model="details.kgs" /> -->
<!-- <inputView type="kgs" :parentVal="details.kgs" @getInputChange="inputChange"/> -->
<a-input :allowClear="true" v-model="details.kgs" />
<i class="iconfont icon-bianji1 edit-icon" @click="editTextEntryModel('kgs')"></i>
<span class="unit">KGS</span>
</div>
</a-form-model-item>
</a-col>
<a-col :span="12">
<a-col :span="12" style="overflow:hidden;">
<a-form-model-item
class="from-label cbm-line-box"
label="尺寸"
@ -603,8 +603,8 @@
prop="cbm"
>
<div class="line-box">
<inputView type="cbm" :parentVal="details.cbm" @getInputChange="inputChange"/>
<!-- <a-input :allowClear="true" v-model="details.cbm" /> -->
<!-- <inputView type="cbm" :parentVal="details.cbm" @getInputChange="inputChange"/> -->
<a-input :allowClear="true" v-model="details.cbm" />
<i class="iconfont icon-bianji1 edit-icon" @click="editTextEntryModel('cbm')"></i>
<span class="unit">CBM</span>
</div>
@ -1097,12 +1097,9 @@ export default {
},
checkbasic () {
this.$refs.mailingFrom.validate(valid => {
console.log(valid)
if (valid) {
console.log('验证成功!');
return true;
} else {
console.log('验证失败!');
return false;
}
});
@ -2291,5 +2288,20 @@ export default {
right: 48px !important;
}
}
/deep/ .ant-input-suffix{
color: rgba(0, 0, 0, 0.25);
display: none;
}
/deep/ .ant-input-affix-wrapper:hover {
.ant-input-suffix{
display: block;
}
}
/deep/ .ant-calendar-picker-clear{
color: rgba(0, 0, 0, 0.25) !important;
}
// }
</style>

@ -24,12 +24,13 @@
v-if="(findex < 4 && !advanced) || advanced"
class="from-label"
>
<a-form-item :label="formLabel.title" v-if="ResetType">
<a-form-item :label="formLabel.title">
<formLabel
:ref="`fromlabel-${formLabel.label}`"
:labelData="formLabel"
@change="formChange"
:formRes="formRes"
:resetType="ResetType"
@change="formChange"
@pressEnter="pressEnterFun"
></formLabel>
</a-form-item>
@ -566,7 +567,6 @@ export default {
this.formAllData = JSON.parse(JSON.stringify(initData.condAllData))
this.fromTableAllData = JSON.parse(JSON.stringify(initData.columnsAllData))
this.tableHeight = document.body.clientHeight - 300
console.log('table-height', this.tableHeight)
this.getFormData()
this.getTableList()
this.getPageSize()
@ -652,7 +652,6 @@ export default {
destinationChange(value) {
this.destinationData.forEach(item => {
if (item.enName == value) {
console.log(item)
setTimeout(() => {
this.editingForm.setFieldsValue({
...this.editingForm.getFieldsValue(),
@ -733,7 +732,6 @@ export default {
} else {
this.formBtnCol = 24 - len * 4
}
console.log('== 测试宽度1 ==', this.formBtnCol)
this.$forceUpdate()
})
},
@ -770,7 +768,6 @@ export default {
},
handlePageChange({ currentPage, pageSize }) {
if (this.gridOptions.pagerConfig.pageSize !== pageSize) {
console.log('pagesize变化', pageSize)
this.editPageSizeSave(pageSize)
}
this.gridOptions.pagerConfig.currentPage = currentPage
@ -794,7 +791,6 @@ export default {
DjyUserConfigGet({ type: 'booking_list_page' }).then(res => {
if (res.data && JSON.parse(res.data.configJson)) {
this.gridOptions.pagerConfig.pageSize = JSON.parse(res.data.configJson).pageSize
console.log('获取到pageSize ', this.gridOptions.pagerConfig.pageSize)
this.getList()
this.$forceUpdate()
}
@ -816,7 +812,6 @@ export default {
// this.formBtnCol = 24 - len * 4
this.formBtnCol = 24 - len * 4 === 4 ? 24 : 24 - len * 4
}
console.log('== 测试宽度2 ==', this.formBtnCol)
},
tableRefresh() {
let data = { ...this.formRes }
@ -866,7 +861,9 @@ export default {
this.$refs[label][0].$data.value = ''
}
})
this.ResetType = true
setTimeout(() => {
this.ResetType = true
}, 100)
},
submitForm(data) {
@ -1175,7 +1172,6 @@ export default {
}
let errorTip = ''
select.map((item, index) => {
console.log(item)
if (this.traceValue.includes('1') && (!item.yard || !item.yardid)) {
errorTip = `单号${item.mblno}未选择场站`
}

@ -4,10 +4,10 @@
<a-input v-model="value" @change="changeInput" @pressEnter="$emit('pressEnter')"/>
</template>
<template v-else-if="labelData.type == 'date'">
<a-date-picker format="YYYY-MM-DD" @change="changeDate" />
<a-date-picker format="YYYY-MM-DD" @change="changeDate" v-model="value"/>
</template>
<template v-else-if="labelData.type == 'dateRange'">
<a-range-picker format="YYYY-MM-DD" @change="changeRangeDate" />
<a-range-picker format="YYYY-MM-DD" @change="changeRangeDate" v-model="value"/>
</template>
<template v-else-if="labelData.type == 'select'">
<a-select
@ -32,17 +32,21 @@ export default {
formRes: {
type: Object,
required: false
},
resetType: {
type: Boolean,
default: true
}
},
watch: {
formRes: {
handler(nval, oval) {
// console.log('', nval, oval)
// if (Object.keys(nval).length > 0 && nval && oval) {
// this.value = nval[this.labelData.type]
// }
},
deep: true
resetType (nval, oval) {
if (!nval) {
this.value = ''
// this.$emit('change', {
// form: this.labelData,
// value: ''
// })
}
}
},
data() {

Loading…
Cancel
Save