diff --git a/src/views/main/BookingLedger/detail/modules/preOrder.vue b/src/views/main/BookingLedger/detail/modules/preOrder.vue index 3f39e86..586c619 100644 --- a/src/views/main/BookingLedger/detail/modules/preOrder.vue +++ b/src/views/main/BookingLedger/detail/modules/preOrder.vue @@ -570,7 +570,6 @@
+ + 唛头  + + + + 货物描述  + +
+ +
+
+ +
+
+ +
+ +
+
@@ -1031,6 +1070,8 @@ export default { data() { return { shipperTemplate: '', + visible: false, + modelTitle: '', consigneeTemplate: '', notifypartyTemplate: '', modelType: '', @@ -1595,7 +1636,7 @@ export default { this.modelName = '' }, handleRef() { - if (this.editIndex === 0) { + if (!this.orderList[this.editIndex].isHBL) { const $details = JSON.parse(JSON.stringify(this.details)) const $data = { bookingId: $details.id, @@ -1692,7 +1733,7 @@ export default { $data.notifypartyaddR1 = newArr[1] } this.orderDetails = $data - this.orderList[0] = $data + this.orderList[this.editIndex] = $data this.$forceUpdate() } else { this.$message.warning('只能刷新主提单') @@ -1883,19 +1924,19 @@ export default { yard: $details.yard, ediCtn: [] } - if (isHBL || type === 'enter') { - // $details.ctnInputs.forEach((item) => { - // $data.ediCtn.push({ - // ctnall: item.ctnall, - // cntrno: item.cntrno, - // sealno: item.sealno, - // pkgs: item.pkgs, - // kindpkgs: item.kindpkgs, - // kgs: item.kgs || 0, - // cbm: item.cbm, - // rowKey: item.rowKey - // }) - // }) + if (!isHBL || type === 'enter') { + $details.ctnInputs.forEach((item) => { + $data.ediCtn.push({ + ctnall: item.ctnall, + cntrno: item.cntrno, + sealno: item.sealno, + pkgs: item.pkgs, + kindpkgs: item.kindpkgs, + kgs: item.kgs || 0, + cbm: item.cbm, + rowKey: item.rowKey + }) + }) } if (isHBL && type != 'enter') { console.log('复制主单信息') @@ -1982,12 +2023,17 @@ export default { this.orderList.push($data) }, removeOrder() { - console.log(this.selectArr) if (this.selectArr.length === 0) { this.$message.error('请选择删除单号') return false } - if (this.selectArr.includes(0)) { + const arr = [] + this.selectArr.forEach(item => { + if (!this.orderList[item].isHBL) { + arr.push(1) + } + }) + if (arr.length > 0) { this.$message.error('主单不允许删除') return false } @@ -2122,6 +2168,15 @@ export default { console.log(err) }) }, + handleOpen(type) { + this.modelType = type + if (type === 1) { + this.modelTitle = '唛头' + } else { + this.modelTitle = '货物描述' + } + this.visible = true + }, inputChange({ type, value }) { this.orderDetails[type] = value this.$forceUpdate() diff --git a/src/views/main/BookingLedger/list/index.vue b/src/views/main/BookingLedger/list/index.vue index 275ce0a..9e50e7c 100644 --- a/src/views/main/BookingLedger/list/index.vue +++ b/src/views/main/BookingLedger/list/index.vue @@ -1484,10 +1484,13 @@ export default { if (item.label === 'LINENAME') { item.field = 'lineName' } + if (item.label === 'ETA') { + item.title = '目的港ETA' + } }) const nowTableArr = this.formTableData.map((item, index) => { if (item.field === 'operate') { - item.width = 110 + item.width = 60 } return item.field }) @@ -2744,6 +2747,8 @@ export default { /*列表操作按钮颜色 */ /deep/ .operate-btn { color: @primary-color; + width: 19px; + margin: 0 !important; } /deep/ .operate-btn:hover { diff --git a/src/views/main/BookingLedger/list/modules/formLabel.vue b/src/views/main/BookingLedger/list/modules/formLabel.vue index d85f77c..02b391e 100644 --- a/src/views/main/BookingLedger/list/modules/formLabel.vue +++ b/src/views/main/BookingLedger/list/modules/formLabel.vue @@ -86,7 +86,7 @@
{{ item[labelData.showLabel] }}
@@ -391,23 +391,22 @@ export default { } }, completeSelect(value) { - const val = value.split('-')[1] + const val = value.split('-_-')[1] this.$emit('change', { form: this.labelData, value: val || '' }) }, completeChange(value) { - const val = value ? value.split('-')[1] : '' - const res = val || value || '' - this.$emit('change', { - form: this.labelData, - value: val || value || '' - }) - this.$emit('getCompleteList', { - form: this.labelData, - value: value.includes('-') ? val || '' : value || '' - }) + const val = value ? value.split('-_-')[1] : '' + this.$emit('change', { + form: this.labelData, + value: val || value || '' + }) + this.$emit('getCompleteList', { + form: this.labelData, + value: value.includes('-_-') ? val || '' : value || '' + }) }, completeChangeFirst(value) { if (this.value) { diff --git a/src/views/main/BookingLedger/list/modules/initData.js b/src/views/main/BookingLedger/list/modules/initData.js index 504e8d7..d57bb95 100644 --- a/src/views/main/BookingLedger/list/modules/initData.js +++ b/src/views/main/BookingLedger/list/modules/initData.js @@ -63,7 +63,7 @@ export default { { field: 'operate', title: '操作', - width: 110, + width: 50, noDraggable: true, slots: { default: 'operate' }, fixed: 'right', @@ -223,7 +223,7 @@ export default { sortable: true, slots: { default: 'closingdate' } }, - { field: 'eta', label: 'ETA', width: 160, title: '预计到港日期', showHeaderOverflow: true, sortable: true }, + { field: 'eta', label: 'ETA', width: 160, title: '目的港ETA', showHeaderOverflow: true, sortable: true }, { field: 'portload', label: 'PORTLOAD', width: 160, title: '装货港', showHeaderOverflow: true, sortable: true }, { field: 'shipper', label: 'SHIPPER', width: 160, title: '发货人', showHeaderOverflow: true, sortable: true }, { @@ -490,7 +490,9 @@ export default { title: '装载放行', showHeaderOverflow: true, slots: { default: 'IsZZFX' } - } + }, + { field: 'startETA', label: 'startETA', width: 120, title: '起始港ETA', showHeaderOverflow: true, sortable: true }, + { field: 'startATA', label: 'startATA', width: 120, title: '起始港ATA', showHeaderOverflow: true, sortable: true } ], // ==== 表单部分 ==== condAllData: [ diff --git a/src/views/main/ViewDeletedList/ViewDeletedList.vue b/src/views/main/ViewDeletedList/ViewDeletedList.vue index 471ffef..68f2225 100644 --- a/src/views/main/ViewDeletedList/ViewDeletedList.vue +++ b/src/views/main/ViewDeletedList/ViewDeletedList.vue @@ -214,7 +214,7 @@ import { XCard, setFormModel } from '@/components' import columnSetting from '@/components/tableColumnSetting' import formLabel from './modules/formLabel' import { - BookingOrderPage, + PageDataByBooking, SendTrace, GetVessellist, GetPortlist, @@ -1068,7 +1068,7 @@ export default { if (isInit) { query.firstFlag = true } - BookingOrderPage(query) + PageDataByBooking(query) .then(res => { console.log('BookingOrderPage==>>', query) if (res.success) { diff --git a/src/views/system/ServiceItems/addForm.vue b/src/views/system/ServiceItems/addForm.vue index 7a535a9..9e90c08 100644 --- a/src/views/system/ServiceItems/addForm.vue +++ b/src/views/system/ServiceItems/addForm.vue @@ -44,16 +44,10 @@ 关闭 - - 删除 - - - 取消启用 - - - 启用 - + 保存 + + 保存并启用 @@ -105,6 +99,29 @@ } }) }, + handleSubmitEnable() { + const { form: { validateFields } } = this + this.confirmLoading = true + validateFields((errors, values) => { + if (!errors) { + values.pkId = null + ServiceProjectSavAndEnable(values).then((res) => { + this.confirmLoading = false + if (res.data.succ) { + this.$message.success('新增成功') + this.handleCancel() + this.$emit('ok', values) + } else { + this.$message.error('新增失败:' + res.data.msg) + } + }).finally((res) => { + this.confirmLoading = false + }) + } else { + this.confirmLoading = false + } + }) + }, handleCancel () { this.form.resetFields() this.visible = false diff --git a/src/views/system/ServiceItems/editForm.vue b/src/views/system/ServiceItems/editForm.vue index 9378fe2..17c8496 100644 --- a/src/views/system/ServiceItems/editForm.vue +++ b/src/views/system/ServiceItems/editForm.vue @@ -1,116 +1,135 @@ diff --git a/src/views/system/ServiceItems/index.vue b/src/views/system/ServiceItems/index.vue index c81e6fe..ff14261 100644 --- a/src/views/system/ServiceItems/index.vue +++ b/src/views/system/ServiceItems/index.vue @@ -55,23 +55,30 @@ - +
- 新增 - 启用 - 取消启用 - 作废 +
+ 新增 + 启用 + 取消启用 + + 作废 + +
+ + 编辑 + @@ -85,7 +92,10 @@ import { XCard } from '@/components' import { - ServiceProjectGetPage + ServiceProjectGetPage, + ServiceProjectSetEnable, + ServiceProjectSetUnEnable, + ServiceProjectDelete } from '@/api/modular/system/appManage' import editForm from './editForm' import addForm from './addForm' @@ -183,11 +193,63 @@ export default { }, methods: { handleOk() { - this.$refs.table.refresh() + this.getList() + }, + handleStart() { + if (this.selectedRowKeys.length > 0) { + const data = { + pkId: this.selectedRowKeys.join(',') + } + ServiceProjectSetEnable(data).then(res => { + if (res.data.succ) { + this.$message.success('启用成功') + this.getList() + } else { + this.$message.error(res.data.msg) + } + }) + } else { + this.$message.warning('请选择') + } + }, + handleStop() { + if (this.selectedRowKeys.length > 0) { + const data = { + pkId: this.selectedRowKeys.join(',') + } + ServiceProjectSetUnEnable(data).then(res => { + if (res.data.succ) { + this.$message.success('取消启用成功') + this.getList() + } else { + this.$message.error(res.data.msg) + } + }) + } else { + this.$message.warning('请选择') + } + }, + handleDelete() { + if (this.selectedRowKeys.length > 0) { + const data = { + pkId: this.selectedRowKeys.join(',') + } + ServiceProjectDelete(data).then(res => { + if (res.data.succ) { + this.$message.success('删除成功') + this.getList() + } else { + this.$message.error(res.data.msg) + } + }) + } else { + this.$message.warning('请选择') + } }, handleRefsh() { this.$refs.query.resetFields() this.queryParam = { create: [], update: [] } + this.getList() }, handleSearch() { if (this.queryParam.create.length > 0) { @@ -217,6 +279,7 @@ export default { tablePaginationChange(pagination) { this.pagination.current = pagination.current this.pagination.pageSize = pagination.pageSize + this.getList() }, onSelectChange(selectedRowKeys, selectedRows) { this.selectedRowKeys = selectedRowKeys