diff --git a/src/api/modular/main/BookingLedger.js b/src/api/modular/main/BookingLedger.js index aa1243d..e494510 100644 --- a/src/api/modular/main/BookingLedger.js +++ b/src/api/modular/main/BookingLedger.js @@ -67,7 +67,7 @@ export function GetVessellist(parameter) { */ export function GetSysUserPage(parameter) { return axios({ - url: '/sysUser/page', + url: '/sysUser/GetTenantUser', method: 'get', params: parameter }) diff --git a/src/views/main/BookingLedger/detail/components/ediMore.vue b/src/views/main/BookingLedger/detail/components/ediMore.vue index 882d2ba..feb1e4f 100644 --- a/src/views/main/BookingLedger/detail/components/ediMore.vue +++ b/src/views/main/BookingLedger/detail/components/ediMore.vue @@ -11,7 +11,7 @@ > @@ -37,6 +37,7 @@ > @@ -49,6 +50,7 @@ > @@ -61,6 +63,7 @@ > diff --git a/src/views/main/BookingLedger/detail/components/sedOrder.vue b/src/views/main/BookingLedger/detail/components/sedOrder.vue index c9da777..be4f28f 100644 --- a/src/views/main/BookingLedger/detail/components/sedOrder.vue +++ b/src/views/main/BookingLedger/detail/components/sedOrder.vue @@ -139,6 +139,7 @@ export default { isNoSave: true, // 基本信息 customername: '', + customerid: '', carrier: '', carrierid: this.type, forwarder: '', @@ -226,7 +227,13 @@ export default { freightpayer: '', scaccode: '', itncode: '', - iscontainersoc: 0 + iscontainersoc: 0, + bookingEDIExt: { + weiTuoFang: '', + ediAttn: '', + ediAttnTel: '', + ediAttnMail: '' + }, } this.editDetails = data this.editIndex = this.sedOrderList.length @@ -246,7 +253,6 @@ export default { // this.init() }, saveFun () { - debugger if (this.editDetails.id !== 0) { this.bookingOrderUpdate() } else { @@ -262,7 +268,6 @@ export default { } let data = JSON.parse(JSON.stringify(this.editDetails)) delete data.isNoSave - debugger BookingOrderUpdate(data) .then((res) => { if (res.success) { diff --git a/src/views/main/BookingLedger/detail/index.vue b/src/views/main/BookingLedger/detail/index.vue index 6f0f1c6..f1d544a 100644 --- a/src/views/main/BookingLedger/detail/index.vue +++ b/src/views/main/BookingLedger/detail/index.vue @@ -74,6 +74,7 @@ export default { return { type: this.$route.query.type, id: this.$route.query.id, + isCopy: this.$route.query.isCopy || false, inPageLoading: false, bookingDetails: {}, tabBarStyle: { @@ -82,22 +83,29 @@ export default { }, excuteRules: [], isAdd: false, - moreStr: '' + moreStr: '', } }, watch: { bookingDetails: { handler (nval, oval) { - console.log('父级 -- 数据改变', nval) + // console.log('父级 -- 数据改变', nval) }, deep: true }, - '$route': 'init' + '$route': 'routerChange' }, created() { this.init() }, methods: { + routerChange () { + console.log('路由变化') + this.id = this.$route.query.id + this.type = this.$route.query.type + this.isCopy = this.$route.query.isCopy || false + this.init() + }, init() { this.bookingDetails = {} if (this.id) { @@ -109,6 +117,7 @@ export default { parentId: 0, // 基本信息 customername: '', + customerid: '', carrier: '', carrierid: this.type, forwarder: '', @@ -169,7 +178,7 @@ export default { issueplace: '', issueplaceid: '', nobill: 'THREE', - copynobilll: 'ONE', + copynobilll: 'THREE', prepardat: '', payableat: '', blfrt: '', @@ -197,6 +206,12 @@ export default { scaccode: '', itncode: '', iscontainersoc: 0, + bookingEDIExt: { + weiTuoFang: '', + ediAttn: '', + ediAttnTel: '', + ediAttnMail: '' + }, // 分单信息未添加 hbList: [] } @@ -228,6 +243,9 @@ export default { }, getDetail() { + if (this.inPageLoading) { + return false + } this.inPageLoading = true this.$message.loading({ content: '加载中...' }); BookingOrderGet({ @@ -237,6 +255,10 @@ export default { this.inPageLoading = false this.$message.destroy() this.$message.success({ content: '加载完成' }) + if (this.isCopy) { + res.data.mblno = '' + this.isAdd = true + } this.$set(this, 'bookingDetails', res.data) this.$forceUpdate() }) @@ -258,9 +280,12 @@ export default { } const _data = JSON.parse(JSON.stringify(this.bookingDetails)) delete _data.hbList + console.log(JSON.stringify(_data)) BookingOrderUpdate(_data) .then((res) => { if (res.success) { + this.isCopy = false + this.isAdd = false this.$message.success('保存成功') this.init() this.$forceUpdate() @@ -285,7 +310,6 @@ export default { .then((res) => { if (res.success) { this.isAdd = false - debugger this.id = res.data this.$message.success('保存成功') this.init() diff --git a/src/views/main/BookingLedger/detail/modules/basicInfo.vue b/src/views/main/BookingLedger/detail/modules/basicInfo.vue index e865b4f..e8db36c 100644 --- a/src/views/main/BookingLedger/detail/modules/basicInfo.vue +++ b/src/views/main/BookingLedger/detail/modules/basicInfo.vue @@ -760,10 +760,12 @@ export default { }, customerSelect(value) { this.details.customername = value + const index = this['customerDataArr'].indexOf(value) + this.details.customerid = this.customerData[index].id }, customerChange(value) { // this.getCustomer(value) - this.getDjyCustomerpage(value, 'customer', 'djy_cust_prop') + this.getDjyCustomerpage(value, 'customer', 'consignor') }, // 客户 - end @@ -881,18 +883,18 @@ export default { // 团队成员 - start getUserList(name = '', type) { GetSysUserPage({ - SearchValue: name + name: name }) .then(res => { - if (res.code === 200) { + if (res.success) { if (type === 'sale') { - this.saleUserList = res.data.rows + this.saleUserList = res.data } else if (type === 'op') { - this.opUserList = res.data.rows + this.opUserList = res.data } else if (type === 'doc') { - this.docUserList = res.data.rows + this.docUserList = res.data } else if (type === 'custservice') { - this.custserviceUserList = res.data.rows + this.custserviceUserList = res.data } } }) diff --git a/src/views/main/BookingLedger/detail/modules/billInfo.vue b/src/views/main/BookingLedger/detail/modules/billInfo.vue index 59a7cd7..cc1f0b4 100644 --- a/src/views/main/BookingLedger/detail/modules/billInfo.vue +++ b/src/views/main/BookingLedger/detail/modules/billInfo.vue @@ -90,7 +90,7 @@ - + ONE diff --git a/src/views/main/BookingLedger/detail/modules/cargoInfo.vue b/src/views/main/BookingLedger/detail/modules/cargoInfo.vue index 6319dd4..daa370f 100644 --- a/src/views/main/BookingLedger/detail/modules/cargoInfo.vue +++ b/src/views/main/BookingLedger/detail/modules/cargoInfo.vue @@ -64,8 +64,7 @@ export default { }, data() { return { - showKey: ['1'], - moreIndex: 0 + showKey: ['1'] } }, watch: { diff --git a/src/views/main/BookingLedger/detail/modules/goodsTable.vue b/src/views/main/BookingLedger/detail/modules/goodsTable.vue index 7843909..349c283 100644 --- a/src/views/main/BookingLedger/detail/modules/goodsTable.vue +++ b/src/views/main/BookingLedger/detail/modules/goodsTable.vue @@ -7,7 +7,7 @@ 删除 多品名 引入场站数据 - 引入箱皮重 + 引入箱皮重
合计: {{ totalCtnall }} @@ -851,6 +851,10 @@ export default { console.log(err) }) }, + + importWeight () { + + }, log({ data, selectionRangeIndexes, selectionRangeKeys }) { console.log('data::', data); console.log('selectionRangeIndexes::', selectionRangeIndexes); diff --git a/src/views/main/BookingLedger/detail/modules/mailingInfo.vue b/src/views/main/BookingLedger/detail/modules/mailingInfo.vue index 058bc33..e335d1a 100644 --- a/src/views/main/BookingLedger/detail/modules/mailingInfo.vue +++ b/src/views/main/BookingLedger/detail/modules/mailingInfo.vue @@ -617,7 +617,8 @@ export default { modelType: '', modelName: '', yardType: '', - yardVisible: false + yardVisible: false, + customerModelconfirm: false } }, watch: { @@ -1117,7 +1118,7 @@ export default { this.modelName = '' }, - changeCode(num, type) { + changeCodeRemove(num, type) { const newStr = this.details[type].replace(/\n|\r/g, '') console.log(newStr) const indexs = [] @@ -1232,6 +1233,39 @@ export default { this.details[field] = str1 this.$emit('spliceMore', strStar + str2) } + }, + + changeCode (len, type) { + const value = this.details[type] + var textArr = value.match(/.+[\n]*/g); // 按行匹配 + var subValue = ""; + + for (var j = 0; j < textArr.length; j++) { + var subArr = textArr[j].match(/[\w]+[ ]*[\n]*|[\d]+[ ]*[\n]*|[^\w\d]+[ ]*[\n]*/g); + var count = 0; + for (var i = 0; i < subArr.length; i++) { + count += subArr[i].replace(/\n/g, "").length; + while (count > len) { + subValue += "\n"; + count = subArr[i].replace(/\n/g, "").length; + if (count > len) { + subValue += subArr[i].substring(0, len); + subValue += "\n"; + subArr[i] = subArr[i].substring(len); + count = subArr[i].replace(/\n/g, "").length; + } + } + subValue += subArr[i]; + } + if (j + 1 < textArr.length) + {subValue += "\n";} + } + subValue = subValue.replace(/[\n]+/g, "\n"); // 多个换行变为一个换行 + subValue = subValue.replace(/[ ]+[\n]+/g, '\n'); // 去除每行末尾空格 + subValue = subValue.replace(/[ ]+$/g, ''); // 去除末行空格 + + this.details[type] = subValue + this.$forceUpdate() } } } diff --git a/src/views/main/BookingLedger/list/index.vue b/src/views/main/BookingLedger/list/index.vue index 2946dc5..5514f20 100644 --- a/src/views/main/BookingLedger/list/index.vue +++ b/src/views/main/BookingLedger/list/index.vue @@ -4,8 +4,8 @@ - + @@ -371,6 +371,9 @@ export default { console.log('=新的clomn=', this.columns) this.$forceUpdate() }, + handledbclick ({row}) { + this.editColumns(row) + }, editColumns(row) { console.log(row) this.$router.push({ name: 'BookingDetail', query: { id: row.id, type: row.carrierid } }) @@ -413,8 +416,33 @@ export default { addBooking() { this.addVisible = !this.addVisible }, - addBooking1() { - this.$router.push({ name: 'BookingDetail', query: { id: 22 } }) + copyBooking() { + const select = this.$refs.xGrid.getCheckboxRecords() + const pkIdArr = select.map((item, index) => { + return item.id + }) + if (pkIdArr.length > 1) { + this.$message.error('请选择一条数据') + return false + } else if (pkIdArr.length === 0) { + this.$message.error('请至少选择一条数据') + return false + } + this.$router.push({ name: 'BookingDetail', query: { id: pkIdArr[0], isCopy: true } }) + }, + copyBookingMore() { + const select = this.$refs.xGrid.getCheckboxRecords() + const pkIdArr = select.map((item, index) => { + return item.id + }) + if (pkIdArr.length === 0) { + this.$message.error('请至少选择一条数据') + return false + } + // 有问题 + // pkIdArr.map((item, index) => { + // this.$router.push({ name: 'BookingDetail', query: { id: item, isCopy: true } }) + // }) }, addSubmit() { this.addVisible = false