szh_zidingyibiaoti
张同海 2 years ago
commit d507ae1d20

@ -42,6 +42,7 @@
"node-sass": "^4.12.0",
"nprogress": "^0.2.0",
"print-js": "^1.0.63",
"qs": "^6.11.1",
"raphael": "^2.3.0",
"sass-loader": "^7.1.0",
"screenfull": "^5.1.0",

@ -738,3 +738,11 @@ export function GetServiceItemList(parameter) {
params: parameter
})
}
// 获取多个自定义消息
export function DjyUserConfigMulti(parameter) {
return axios({
url: '/DjyUserConfig/multi?' + parameter,
method: 'get'
})
}

@ -29,6 +29,7 @@ import VXETable from 'vxe-table'
import 'vxe-table/lib/style.css'
import 'vue-easytable/libs/theme-default/index.css'
import VueEasytable from 'vue-easytable'
import qs from 'qs';
Vue.use(VXETable)
Vue.use(VueContextMenu)
@ -43,6 +44,7 @@ Vue.prototype.hasPerm = hasBtnPermission
Vue.prototype.applocation = sysApplication
Vue.prototype.$bus = new Vue()
Vue.config.productionTip = false
Vue.prototype.$qs = qs;
new Vue({
router,

@ -5,6 +5,7 @@
:class="!Showtabs ? 'Showtabs' : ''"
:tabBarStyle="tabBarStyle"
:activeKey="tabActiveKey"
:animated="Object.keys($refs).includes('sedOrder') ? false : true"
@change="changeTab"
>
<a-tab-pane key="1" tab="主单信息">
@ -710,6 +711,7 @@ export default {
delete item.id
})
}
// debugger
if (res.data.hbList && res.data.hbList.length > 0) {
this.Showtabs = true
}
@ -1065,7 +1067,7 @@ export default {
this.tabActiveKey = e
setTimeout(() => {
_this.$refs.sedOrder.init(_this.bookingDetails.hbList)
}, 200)
}, 100)
},
//
addSedList() {
@ -1232,4 +1234,10 @@ export default {
</script>
<style lang="less" scoped>
@import url('./style/index.less');
.Showtabs {
/deep/ .ant-tabs-top-bar {
display: none !important;
}
}
</style>

@ -953,7 +953,7 @@ export default {
console.log('=== 获取到选择数据 ===', type, res)
if (type === 'customername') {
this.details.customername = res.shortName || ''
this.details.customerid = res.id || ''
this.details.customerid = res.codeName || ''
if (res.op) {
this.details.op = res.op
this.details.opid = res.opid
@ -988,8 +988,8 @@ export default {
this.details.shipagency = res.name || ''
this.details.shipagencyid = res.code || ''
} else if (['sale', 'op', 'doc', 'custservice', 'route'].includes(type)) {
this[type] = res.name || ''
this[`${type}id`] = res.id || ''
this.details[type] = res.name || ''
this.details[`${type}id`] = res.id || ''
}
console.log('== 选中 ==', this.details, type)
}

@ -34,8 +34,8 @@
class="items"
v-for="(serive, sindex) in bookingServiceItem"
:key="sindex"
:class="{ active: locaService.includes(serive.name) }"
@click="saveService(serive.name)"
:class="{ active: locaService.includes(serive.code) }"
@click="saveService(serive)"
>
{{ serive.name }}
</div>
@ -175,8 +175,8 @@
<div class="line">改为</div>
</template>
<div class="new">
<span class="o-title">{{ child.field || '字段' }}:</span
><span class="content">{{ child.newValue }}</span>
<span class="o-title" v-if="log.type != 'Trace'">{{ child.field || '' }}:</span>
<span class="content">{{ child.newValue }}</span>
</div>
</div>
</div>
@ -297,7 +297,8 @@ export default {
attachName: '',
attachCode: '',
locaService: [],
editRemarkVal: null
editRemarkVal: null,
serviceData: []
}
},
created() {
@ -331,29 +332,22 @@ export default {
this.getBookingLog()
this.getLog()
this.getLocal()
// this.getServiceItem()
},
getLocal() {
this.bookingAttachType = this.$options.filters['dictData']('booking_attach_type')
this.bookingServiceItem = this.$options.filters['dictData']('booking_service_item')
// -
let items = null
if (window.localStorage.getItem('locaService')) {
items = JSON.parse(window.localStorage.getItem('locaService'))[this.id]
}
this.locaService = items || []
},
getLocal() {
this.bookingServiceItem = this.$options.filters['dictData']('booking_service_item')
console.log('== 服务项目 ==', this.bookingServiceItem)
this.bookingAttachType = this.$options.filters['dictData']('booking_attach_type')
},
getServiceItem () {
GetServiceItemList({
bookingId: this.id
this.bookingServiceItem.map((item, index) => {
if (this.locaService.includes(item.code)) {
this.serviceData.push(item)
}
})
.then(res => {
debugger
if (res.success) { }
})
.catch((err) => {
console.log(err)
})
console.log('== 服务项目 ==', this.bookingServiceItem, this.serviceData)
},
//
checkFun() {
@ -573,16 +567,35 @@ export default {
this.logList[index].showMore = !this.logList[index].showMore
this.$forceUpdate()
},
saveService(name) {
if (!this.locaService.includes(name)) {
this.locaService.push(name)
saveService(data) {
if (!this.locaService.includes(data.code)) {
this.locaService.push(data.code)
this.serviceData.push(data)
} else {
this.locaService.splice(this.locaService.indexOf(name), 1)
const index = this.locaService.indexOf(data.code)
this.locaService.splice(index, 1)
this.serviceData.splice(index, 1)
}
const value = {}
this.$set(value, this.id, this.locaService)
window.localStorage.setItem('locaService', JSON.stringify(value))
}
console.log('== 修改服务 ==', this.locaService, this.serviceData)
this.saveServiceItem()
// const value = {}
// this.$set(value, this.id, this.locaService)
// window.localStorage.setItem('locaService', JSON.stringify(value))
},
saveServiceItem () {
SaveServiceItem({
bookingId: this.id,
item: this.serviceData
})
.then(res => {
if (res.success) {
console.log('== 服务项目设置成功 ==')
}
})
.catch((err) => {
console.log(err)
})
},
}
}
</script>

@ -8,7 +8,7 @@
:allowClear="true"
:filter-option="!this.openSearch ? filterOption : false"
:dropdownMatchSelectWidth="false"
:showArrow="!this.openSearch ? true : false"
:showArrow="!this.openSearch ? true : true"
optionLabelProp="label"
:notFoundContent="inLoading ? '加载中...' : '暂无数据'"
@focus="getSelectFirst"

@ -1,8 +1,4 @@
.Showtabs {
> .ant-tabs-top-bar {
display: none;
}
}
.base-tit {
font-size: 14px;

@ -2,15 +2,6 @@
<div>
<a-row :gutter="24">
<a-col :md="24" :sm="24" style="padding: 0 0 0 0" class="content-box">
<!-- <div class="nav-box">
<div class="nav" @click="addBooking"><i class="iconfont icon-jiahao2fill"></i>新建</div>
<div class="nav" @click="copyBooking"><i class="iconfont icon-fuzhi"></i>复制</div>
<div class="nav" @click="copyBookingMore"><i class="iconfont icon-fuzhi1"></i>复制多票</div>
<div class="nav"><i class="iconfont icon-bianjiwenjian"></i>批量编辑</div>
<div class="nav"><i class="iconfont icon-shujushangchuan-shixin"></i>批量VGM</div>
<div class="nav"><i class="iconfont icon-shishijifei"></i>定时订舱</div>
<div class="nav"><i class="iconfont icon-xiaopiaodayin"></i>小票状态</div>
</div> -->
<x-card class="content-nav">
<div slot="content" class="table-page-search-wrapper">
<a-form layout="inline">
@ -483,7 +474,8 @@ import {
Codeissuetypelist,
GetFrt,
GetService,
GetForwarderlist
GetForwarderlist,
DjyUserConfigMulti
} from '@/api/modular/main/BookingLedger'
import initData from './modules/initData'
@ -618,7 +610,7 @@ export default {
beforeRouteEnter (to, from, next) {
// console.log('')
next(vm => {
console.log('== 进入路由 - beforeRouteEnter ==', vm.inAddSave)
console.log('== 进入路由 - beforeRouteEnter ==', vm.formRes)
vm.createdInit()
vm.onresize()
})
@ -640,6 +632,7 @@ export default {
this.getTableList()
this.getPageSize()
this.getCarrier()
// this.getConfigUser()
},
onresize () {
// console.log('=== ===')
@ -757,6 +750,29 @@ export default {
}
this.getTableList()
},
//
getConfigUser() {
//
const query = {
typeArr: ['booking_list_cond', 'booking_list_column', 'booking_list_page']
}
DjyUserConfigMulti(this.$qs.stringify(query, { arrayFormat: 'repeat' })).then(res => {
console.log('批量获取自定义数据', res)
res.data.map((item, index) => {
switch (item.type) {
case 'booking_list_cond':
this.setFormData(item)
break
case 'booking_list_column':
this.setTableList(item)
break
case 'booking_list_page':
this.setPageSize(item)
break
}
})
})
},
// - start
getCarrier() {
const Rdata = data => {
@ -817,6 +833,99 @@ export default {
console.log(err)
})
},
setFormData (data, isReset = false) {
if (data && JSON.parse(data.configJson).length) {
const arr = JSON.parse(data.configJson)
const nowData = []
const moreData = []
arr.map((item, index) => {
this.formAllData.map((fitem, findex) => {
if (fitem.label === item) {
nowData.push(fitem)
}
})
})
this.formAllData.map((item, index) => {
if (!arr.includes(item.label)) {
moreData.push(item)
}
})
this.formData = nowData
this.formMoreData = moreData
} else {
const nowData = this.formData.map((item, index) => {
return item.label
})
const moreData = []
this.formAllData.map((item, index) => {
if (!nowData.includes(item.label)) {
moreData.push(item)
}
})
this.formMoreData = moreData
}
this.formData.map((item, index) => {
this.$set(this.formRes, item.label, this.formRes[item.label] || '')
// select
if (item.type === 'select') {
if (['NOBILL', 'CARGOID'].includes(item.label)) {
item.dataList = item.data
setTimeout(() => {
this.$refs[`fromlabel-${item.label}`][0].$data.dataList = item.data
}, 300)
}
}
})
console.log('== 获取到form, 准备获取列表 ==', isReset, this.formRes)
if (!isReset) {
this.getList(this.formRes)
}
const len = this.formData.length % 4
if (this.formData.length === 4 || this.formData.length > 4) {
this.formBtnCol = 8
} else {
this.formBtnCol = 24 - len * 4
}
this.$forceUpdate()
},
setTableList (data) {
if (data && JSON.parse(data.configJson).length) {
this.gridOptions.columns = JSON.parse(data.configJson)
this.formTableData = JSON.parse(data.configJson)
const nowTableArr = this.formTableData.map((item, index) => {
return item.field
})
const moreTableArr = []
this.fromTableAllData.map((item, index) => {
if (!nowTableArr.includes(item.field)) {
moreTableArr.push(item)
}
})
this.formMoreTableData = moreTableArr
this.$forceUpdate()
} else {
const nowTableArr = this.formTableData.map((item, index) => {
return item.field
})
const moreTableArr = []
this.fromTableAllData.map((item, index) => {
if (!nowTableArr.includes(item.field)) {
moreTableArr.push(item)
}
})
this.formMoreTableData = moreTableArr
this.$forceUpdate()
}
},
setPageSize (data) {
if (data && JSON.parse(data.configJson)) {
this.gridOptions.pagerConfig.pageSize = JSON.parse(data.configJson).pageSize
this.getList(this.formRes)
this.$forceUpdate()
}
},
//
getFormData(isReset = false) {
DjyUserConfigGet({ type: 'booking_list_cond' }).then(res => {
if (res.data && JSON.parse(res.data.configJson).length) {
@ -861,6 +970,7 @@ export default {
}
}
})
console.log('== 获取到form, 准备获取列表 ==', isReset, this.formRes)
if (!isReset) {
this.getList(this.formRes)
}
@ -889,11 +999,8 @@ export default {
},
//
getFromSelectData(func, ...args) {
// debugger
return new Promise((resolve, reject) => {
// debugger
func(...args).then(res => {
// debugger
if (res.code === 200) {
resolve(res.data)
} else {
@ -959,7 +1066,7 @@ 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
this.getList()
this.getList(this.formRes)
this.$forceUpdate()
}
})
@ -982,7 +1089,7 @@ export default {
}
},
tableRefresh() {
let data = { ...this.formRes }
const data = { ...this.formRes }
this.init(this.formRes)
this.formRes = data
},
@ -1052,6 +1159,7 @@ export default {
this.$refs[label][0].$data.value = ''
}
})
this.getFormData()
this.init()
})
},
@ -1064,8 +1172,8 @@ export default {
} else if (form.type === 'date') {
this.formRes[form.label] = value
} else if (form.type === 'dateRange') {
this.formRes[form.resLabel[0]] = value[0]
this.formRes[form.resLabel[1]] = value[1]
this.formRes[form.resLabel[0]] = value[0] || ''
this.formRes[form.resLabel[1]] = value[1] || ''
} else if (form.type === 'select') {
this.formRes[form.label] = value
} else if (form.type === 'complete') {

@ -7,7 +7,7 @@
<a-date-picker format="YYYY-MM-DD" @change="changeDate" v-model="value"/>
</template>
<template v-else-if="labelData.type == 'dateRange'">
<a-range-picker style="overflow: hidden;margin-top:3px;" format="YYYY-MM-DD" @change="changeRangeDate" v-model="dateVal"/>
<a-range-picker style="overflow: hidden;margin-top:3px;" format="YYYY-MM-DD" @change="changeRangeDate" @calendarChange="openChangeRangeDate" v-model="dateVal"/>
</template>
<template v-else-if="labelData.type == 'select'">
<a-select
@ -137,13 +137,51 @@ export default {
})
},
changeRangeDate(e, mode) {
console.log('== date-range ==', e, mode)
// this.value = mode
this.$emit('change', {
form: this.labelData,
value: mode
})
},
openChangeRangeDate (e) {
// let arr = []
// e.map((item, index) => {
// if (item._d) {
// const date = this.formatDate(item._d).substr(0, 10)
// arr.push(date)
// console.log(date)
// }
// })
// this.$emit('change', {
// form: this.labelData,
// value: arr
// })
},
formatDate (now) {
var date = new Date(now)
var y = date.getFullYear() //
var m = date.getMonth() + 1 // js1
if (m < 10) {
m = '0' + m;
}
var d = date.getDate() //
if (d < 10) {
d = '0' + d;
}
var h = date.getHours() //
if (h < 10) {
h = '0' + h;
}
var min = date.getMinutes() //
if (min < 10) {
min = '0' + min;
}
var s = date.getSeconds() //
if (s < 10) {
s = '0' + s;
}
//
return y + '-' + m + '-' + d + ' ' + h + ':' + min + ':' + s
},
// == ==
filterOption(input, option) {
return option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0

@ -110,12 +110,7 @@ export default {
},
// LARA
laraPaperRegistFun() {
let query = ''
this.taskPKIds.map((item, index) => {
query += `PKIds=${item}&`
})
query = query.substring()
console.log(query)
const query = this.$qs.stringify({ PKIds: this.taskPKIds }, { arrayFormat: 'repeat' })
LaraPaperRegist(query)
.then((res) => {
if (res.success) {

@ -1002,12 +1002,7 @@ export default {
this.$message.error('请选择数据')
return false
}
let query = ''
pkIdArr.map((item, index) => {
query += `PKIds=${item}&`
})
query = query.substring(0, query.length - 1)
console.log(query)
const query = this.$qs.stringify({ PKIds: pkIdArr }, { arrayFormat: 'repeat' })
ManualReCompareBC(query).then(res => {
if (res.success) {
this.$message.success('重新比对完成')
@ -1072,12 +1067,7 @@ export default {
this.$message.error('请选择数据')
return false
}
let query = ''
pkIdArr.map((item, index) => {
query += `PKIds=${item}&`
})
query = query.substring(0, query.length - 1)
console.log(query)
const query = this.$qs.stringify({ PKIds: pkIdArr }, { arrayFormat: 'repeat' })
LaraPaperCalc(query)
.then(res => {
if (res.success) {

@ -8659,6 +8659,11 @@ object-inspect@^1.8.0:
resolved "https://registry.npm.taobao.org/object-inspect/download/object-inspect-1.9.0.tgz?cache=0&sync_timestamp=1606804226254&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fobject-inspect%2Fdownload%2Fobject-inspect-1.9.0.tgz"
integrity sha1-yQUh104RJ7ZyZt7TOUrWEWmGUzo=
object-inspect@^1.9.0:
version "1.12.3"
resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.12.3.tgz#ba62dffd67ee256c8c086dfae69e016cd1f198b9"
integrity sha512-geUvdk7c+eizMNUDkRpW1wJwgfOiOeHbxBR/hLXK1aT6zmVSO0jsQcs7fj6MGw89jC/cjGfLcNOrtMYtGqm81g==
object-inspect@~1.7.0:
version "1.7.0"
resolved "https://registry.npm.taobao.org/object-inspect/download/object-inspect-1.7.0.tgz?cache=0&sync_timestamp=1606804226254&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fobject-inspect%2Fdownload%2Fobject-inspect-1.7.0.tgz"
@ -9794,6 +9799,13 @@ qs@6.7.0:
resolved "https://registry.npm.taobao.org/qs/download/qs-6.7.0.tgz?cache=0&sync_timestamp=1610598174727&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fqs%2Fdownload%2Fqs-6.7.0.tgz"
integrity sha1-QdwaAV49WB8WIXdr4xr7KHapsbw=
qs@^6.11.1:
version "6.11.1"
resolved "https://registry.yarnpkg.com/qs/-/qs-6.11.1.tgz#6c29dff97f0c0060765911ba65cbc9764186109f"
integrity sha512-0wsrzgTz/kAVIeuxSjnpGC56rzYtr6JT/2BwEvMaPhFIoYa1aGO8LbzuU1R0uUYQkLpWBTOj0l/CLAJB64J6nQ==
dependencies:
side-channel "^1.0.4"
qs@~6.5.2:
version "6.5.2"
resolved "https://registry.npm.taobao.org/qs/download/qs-6.5.2.tgz?cache=0&sync_timestamp=1610598174727&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fqs%2Fdownload%2Fqs-6.5.2.tgz"
@ -10622,6 +10634,15 @@ shellwords@^0.1.1:
resolved "https://registry.npm.taobao.org/shellwords/download/shellwords-0.1.1.tgz"
integrity sha1-1rkYHBpI05cyTISHHvvPxz/AZUs=
side-channel@^1.0.4:
version "1.0.4"
resolved "https://registry.yarnpkg.com/side-channel/-/side-channel-1.0.4.tgz#efce5c8fdc104ee751b25c58d4290011fa5ea2cf"
integrity sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==
dependencies:
call-bind "^1.0.0"
get-intrinsic "^1.0.2"
object-inspect "^1.9.0"
sigmund@^1.0.1:
version "1.0.1"
resolved "https://registry.npm.taobao.org/sigmund/download/sigmund-1.0.1.tgz"
@ -12110,6 +12131,11 @@ vuex@^3.1.1:
resolved "https://registry.npm.taobao.org/vuex/download/vuex-3.6.0.tgz?cache=0&sync_timestamp=1606318263999&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fvuex%2Fdownload%2Fvuex-3.6.0.tgz"
integrity sha1-le+lalj3YHwTWwUzUIM6CeAaqBM=
vxe-table@^3.6.6:
version "3.6.11"
resolved "https://registry.yarnpkg.com/vxe-table/-/vxe-table-3.6.11.tgz#e95da0507b37082e6d4881d274e5fee2760ad7f0"
integrity sha512-0qkxmbV0RkciRn4YL7eQVQ1YODmw1RP2WUg2wfk6Y3XGdQGBBpKCuWrv/GfCFrTtfWoHKo9Hs6I2MZsZ5LkAUA==
w3c-hr-time@^1.0.1:
version "1.0.2"
resolved "https://registry.npm.taobao.org/w3c-hr-time/download/w3c-hr-time-1.0.2.tgz"
@ -12489,6 +12515,11 @@ ws@^7.0.0:
resolved "https://registry.npm.taobao.org/ws/download/ws-7.4.2.tgz?cache=0&sync_timestamp=1609271380166&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fws%2Fdownload%2Fws-7.4.2.tgz"
integrity sha1-eCEABI5U6zb+mEM2OrHGhnKyYd0=
xe-utils@^3.5.7:
version "3.5.7"
resolved "https://registry.yarnpkg.com/xe-utils/-/xe-utils-3.5.7.tgz#2c885852dfadd5c8beeffdc1f884f8ceb962c669"
integrity sha512-3H+fDBKBR2wLJgyA7k9C/w1Xljx6Maml5ukV0WDY06HjYyGs2FEz6XhcwRCLIDXX4pBP3Gu0nX9DbCeuuRA2Ew==
xml-name-validator@^3.0.0:
version "3.0.0"
resolved "https://registry.npm.taobao.org/xml-name-validator/download/xml-name-validator-3.0.0.tgz"

Loading…
Cancel
Save