修改问题

master
sunzehua 1 year ago
parent 30ef61961f
commit 3198ccedbd

@ -1137,3 +1137,17 @@ export function SaveBookingTxxp (parameter) {
params: parameter
})
}
export function GetEnableStatusDictTreeList (parameter) {
return axios({
url: '/ServiceWorkFlowBase/GetEnableStatusDictTreeList',
method: 'get'
})
}
export function GetEnableProjectDictTreeList (parameter) {
return axios({
url: '/ServiceWorkFlowBase/GetEnableProjectDictTreeList',
method: 'get'
})
}

@ -173,7 +173,7 @@ export default {
if (data.isCopy) {
name = '订舱复制'
} else {
name = `${data.mblno}详情`
name = `${data.mblno ? data.mblno : ''}详情`
}
} else {
name = '订舱新增'

@ -142,7 +142,9 @@ export default {
'setBookingSourcePage',
'setBookingInitData',
'setCodeCountryList',
'setdpTreeList'
'setdpTreeList',
'setStatusDict',
'setProjectDict'
]),
//
setMenus() {
@ -179,6 +181,8 @@ export default {
this.setBookingSourcePage()
this.setBookingInitData()
this.setdpTreeList()
this.setStatusDict()
this.setProjectDict()
}
}
}

@ -37,6 +37,8 @@ const getters = {
saveFlag: state => state.booking.saveFlag,
firstFlag: state => state.user.firstFlag,
topDown: state => state.booking.topDown,
statusDIct: state => state.booking.statusDIct,
projectDict: state => state.booking.projectDict,
dpTreeList: state => state.booking.dpTreeList,
inBookingDetailsSave: state => state.booking.inBookingDetailsSave,
kdAddData: state => state.KD.kdAddData

@ -9,7 +9,9 @@ import {
GetAllSelectData,
BookingSourcePage,
CodeCountryList,
sysOrgTreeList
sysOrgTreeList,
GetEnableStatusDictTreeList,
GetEnableProjectDictTreeList
} from '@/api/modular/main/BookingLedger'
const booking = {
@ -19,6 +21,8 @@ const booking = {
dpTreeList: [],
copyPages: { number: 0, path: '' },
yardList: [],
statusDIct: [],
projectDict: [],
saveNeedNumber: '',
deleteId: '',
topDown: false,
@ -119,6 +123,12 @@ const booking = {
},
SET_SAVETOPDOWN: (state, bool) => {
state.topDown = bool
},
SET_STATUSDICT: (state, list) => {
state.statusDIct = list
},
SET_PROJECTDICT: (state, list) => {
state.projectDict = list
}
},
@ -173,6 +183,48 @@ const booking = {
})
})
},
setStatusDict({ commit }, obj) {
return new Promise(resolve => {
GetEnableStatusDictTreeList()
.then(response => {
if (response.success) {
if (response.data) {
const data = response.data[0].children
commit('SET_STATUSDICT', data)
resolve(response.data)
}
} else {
// eslint-disable-next-line no-undef
reject(new Error(data.message))
}
})
.catch(error => {
// eslint-disable-next-line no-undef
reject(error)
})
})
},
setProjectDict({ commit }, obj) {
return new Promise(resolve => {
GetEnableProjectDictTreeList()
.then(response => {
if (response.success) {
if (response.data) {
const data = response.data[0].children
commit('SET_PROJECTDICT', data)
resolve(response.data)
}
} else {
// eslint-disable-next-line no-undef
reject(new Error(data.message))
}
})
.catch(error => {
// eslint-disable-next-line no-undef
reject(error)
})
})
},
setPackageList({ commit }, obj) {
return new Promise(resolve => {
GetPackage({

@ -743,7 +743,6 @@ export default {
this.bookingDetails = { ...JSON.parse(JSON.stringify(initDetail)), ...copyData }
} else {
this.bookingDetails = $data.bookingDetails
console.log(this.topDown)
if (this.topDown) {
this.getDetail()
}
@ -1111,15 +1110,20 @@ export default {
? item.weighkgs
: this.calc(Number(item['kgs']), Number(item['tareweight']), '+')
}
})
}
if (res.data.ctnInputs.length > 0) {
res.data.ctnInputs.map((item, index) => {
item.pkgs = item.pkgs ? item.pkgs : ''
item.kgs = item.kgs ? item.kgs : ''
item.cbm = item.cbm ? item.cbm : ''
item.tareweight = item.tareweight ? item.tareweight : ''
item.weighkgs = item.weighkgs ? item.weighkgs : ''
if (!item.cntrno) {
item.cntrno = ''
}
if (!item.sealno) {
item.sealno = ''
}
if (!item.weighdate) {
item.weighdate = ''
}
})
}
if (res.data.hbList.length > 0) {

@ -626,7 +626,7 @@ import {
BookingOrderContactPage,
DjyCustomerContacts
} from '@/api/modular/main/BookingLedger'
import { mapGetters } from 'vuex'
let timer
export default {
components: {
@ -901,6 +901,11 @@ export default {
created() {
this.init()
},
computed: {
...mapGetters([
'projectDict'
])
},
methods: {
refresh() {
this.$forceUpdate()
@ -1137,6 +1142,7 @@ export default {
this.$forceUpdate()
},
getSelectViewRes({ type, res }) {
console.log( type, res)
if (type === 'customername') {
this.details.customername = res.shortName || ''
this.details.customerid = Number(res.id) || ''
@ -1166,7 +1172,7 @@ export default {
})
}
const data = []
this.$options.filters['dictData']('booking_service_item').forEach((item) => {
this.projectDict.forEach((item) => {
WserviceItem.forEach((item2) => {
if (item.code == item2) {
data.push(item)

@ -193,7 +193,8 @@ export default {
'blfrtList',
'lineList',
'bookingInitData',
'dpTreeList'
'dpTreeList',
'statusDIct'
])
},
mounted() { },
@ -386,7 +387,6 @@ export default {
newArr = item
}
})
console.log(newArr)
return newArr.children
}
},

@ -329,6 +329,7 @@
<script>
import { DjyCustomerAdd, DjyCustomerEdit } from '@/api/modular/main/CustomerInformationManagement'
import { GetSysUserPage } from '@/api/modular/main/BookingLedger'
import { mapGetters } from 'vuex'
export default {
data() {
return {
@ -392,10 +393,15 @@ export default {
}
}
},
computed: {
...mapGetters([
'projectDict'
])
},
mounted() {
this.TypeData = this.$options.filters['dictData']('djy_cust_contact_role')
this.propStringData = this.$options.filters['dictData']('djy_cust_prop')
this.bookingServiceItem = this.$options.filters['dictData']('booking_service_item')
this.bookingServiceItem = this.projectDict
},
methods: {
insertAddress() {

@ -328,6 +328,7 @@
<script>
import { DjyCustomerEdit, DjyCustomerDetail } from '@/api/modular/main/CustomerInformationManagement'
import { GetSysUserPage } from '@/api/modular/main/BookingLedger'
import { mapGetters } from 'vuex'
export default {
data() {
return {
@ -378,12 +379,17 @@ export default {
this.init()
}
},
computed: {
...mapGetters([
'projectDict'
])
},
mounted() {
this.init()
},
methods: {
init() {
this.bookingServiceItem = this.$options.filters['dictData']('booking_service_item')
this.bookingServiceItem = this.projectDict
DjyCustomerDetail({ id: this.$route.query.id }).then(res => {
if (res.data) {
this.Data = res.data

@ -273,6 +273,7 @@
<script>
import { DjyCustomerEdit, DjyCustomerDetail } from '@/api/modular/main/CustomerInformationManagement'
import { GetSysUserPage } from '@/api/modular/main/BookingLedger'
import { mapGetters } from 'vuex'
export default {
data() {
return {
@ -325,9 +326,14 @@ export default {
mounted() {
this.init()
},
computed: {
...mapGetters([
'projectDict'
])
},
methods: {
init() {
this.bookingServiceItem = this.$options.filters['dictData']('booking_service_item')
this.bookingServiceItem = this.projectDict
DjyCustomerDetail({ id: this.$route.query.id }).then(res => {
if (res.data) {
this.Data = res.data

Loading…
Cancel
Save