合计: {{ 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 @@
新建
-
复制
-
复制多票
+
复制
+
复制多票
批量编辑
批量VGM
定时订舱
@@ -57,7 +57,7 @@
-
+
@@ -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