备注
@@ -230,7 +265,9 @@ import {
ExcuteRulesOceanBooking,
BookingOrderDownload,
BookingOrderDeleteRemark,
- SaveServiceItem
+ SaveServiceItem,
+ BookingOrderGetGoodsStatusList,
+ BookingOrderSaveGoodsStatus
} from '@/api/modular/main/BookingLedger'
export default {
@@ -275,11 +312,22 @@ export default {
uploading: false,
realTimePercent: null,
bookingServiceItem: [],
+ booGoodsStatusItem: [],
bookingAttachType: [],
attachName: '',
attachCode: '',
- editRemarkVal: null
- // locaService: [],
+ editRemarkVal: null,
+ GoodsStatusVisible: false,
+ GoodsStatusEditData: {},
+ StatusVisibleForm: this.$form.createForm(this),
+ labelCol: {
+ xs: { span: 24 },
+ sm: { span: 7 }
+ },
+ wrapperCol: {
+ xs: { span: 24 },
+ sm: { span: 15 }
+ }
// serviceData: []
}
},
@@ -291,6 +339,18 @@ export default {
return this.details.item.map((item, index) => {
return item.code
})
+ },
+ locaGoodsStatus() {
+ if (!this.details) {
+ return []
+ }
+ if (this.details.goodsStatus) {
+ return this.details.goodsStatus.map((item, index) => {
+ return item.systemCode
+ })
+ } else {
+ return []
+ }
}
},
created() {
@@ -316,6 +376,9 @@ export default {
init() {
this.bookingAttachType = this.$options.filters['dictData']('booking_attach_type')
this.bookingServiceItem = this.$options.filters['dictData']('booking_service_item')
+ BookingOrderGetGoodsStatusList({ bookingId: this.id }).then(res => {
+ this.booGoodsStatusItem = res.data
+ })
},
// 校验
checkFun() {
@@ -490,6 +553,7 @@ export default {
this.details.log[index].showMore = !this.details.log[index].showMore
this.$forceUpdate()
},
+
saveService(data) {
if (!this.id) {
this.$message.error('请先保存主单')
@@ -522,6 +586,136 @@ export default {
.catch(err => {
console.log(err)
})
+ },
+ GoodsStatusHandleOk() {
+ const {
+ StatusVisibleForm: { validateFields }
+ } = this
+ this.GoodsStatusVisible = true
+ validateFields((errors, values) => {
+ if (!errors) {
+ for (const key in values) {
+ console.log(key, 1)
+ if (typeof values[key] === 'object' && !(values[key] === null)) {
+ values[key] = JSON.stringify(values[key])
+ }
+ }
+ console.log('计算时间')
+ console.log(values.finishTime)
+ let date = ''
+ if (values.finishTime._d) {
+ date = new Date(+new Date(values.finishTime._d) + 8 * 3600 * 1000)
+ } else {
+ console.log(values.finishTime.split('"'))
+ if (values.finishTime.split('"').length == 3) {
+ date = new Date(+new Date(values.finishTime.split('"')[1]))
+ } else {
+ date = new Date(+new Date(values.finishTime) + 8 * 3600 * 1000)
+ }
+ }
+ console.log(date)
+ let data = {
+ finishTime: date.toISOString(),
+ remark: values.remark
+ }
+ console.log(this.GoodsStatusEditData, data)
+ let AData = { ...this.GoodsStatusEditData, ...data }
+ console.log(AData)
+ // this.saveGoodsStatus(this.GoodsStatusEditData)
+ console.log('改变样式及数据')
+ if (!this.id) {
+ this.$message.error('请先保存主单')
+ return false
+ }
+ if (!this.locaGoodsStatus.includes(this.GoodsStatusEditData.systemCode)) {
+ this.locaGoodsStatus.push(this.GoodsStatusEditData.systemCode)
+ this.details.goodsStatus.push({ ...this.GoodsStatusEditData })
+ }
+ console.log('编辑请求数据')
+ let ApiData = {
+ bookingId: this.id,
+ item: []
+ }
+ this.details.goodsStatus.forEach(item => {
+ if (item.systemCode == AData.systemCode) {
+ console.log(true)
+ ApiData.item.push(AData)
+ } else {
+ console.log(false)
+ ApiData.item.push(item)
+ }
+ })
+ console.log('走接口')
+ BookingOrderSaveGoodsStatus(ApiData)
+ .then(res => {
+ if (res.success) {
+ this.booGoodsStatusItem = ApiData.item
+ // this.$emit('upDateRight')
+ console.log('== 货物状态设置成功 ==')
+ this.$message.success('货物状态设置成功')
+ this.GoodsStatusVisible = false
+ }
+ })
+ .catch(err => {
+ console.log(err)
+ })
+ } else {
+ // this.GoodsStatusVisible = false
+ }
+ })
+ // this.GoodsStatusVisible = false
+ },
+ FnOpenEdit(data) {
+ console.log(data)
+ setTimeout(() => {
+ console.log(data)
+ this.StatusVisibleForm.setFieldsValue({
+ finishTime: data.finishTime ? data.finishTime : '',
+ remark: data.remark ? data.remark : ''
+ })
+ this.GoodsStatusEditData = data
+ this.GoodsStatusVisible = true
+ }, 100)
+ },
+ saveGoodsStatus(data) {
+ console.log(data)
+ if (!this.id) {
+ this.$message.error('请先保存主单')
+ return false
+ }
+ if (!this.locaGoodsStatus.includes(data.systemCode)) {
+ this.locaGoodsStatus.push(data.systemCode)
+ this.details.goodsStatus.push({ ...data })
+ this.savegoodsStatusItem(data, 'push')
+ } else {
+ const index = this.locaGoodsStatus.indexOf(data.systemCode)
+ this.locaGoodsStatus.splice(index, 1)
+ this.details.goodsStatus.splice(index, 1)
+ this.savegoodsStatusItem(data, 'splice')
+ }
+ console.log('== 修改货物状态 ==', this.locaGoodsStatus, this.details.goodsStatus)
+ },
+ savegoodsStatusItem(data, type) {
+ let ApiData = {
+ bookingId: this.id,
+ item: this.details.goodsStatus
+ }
+ if (type == 'push') {
+ let date = new Date(+new Date() + 8 * 3600 * 1000)
+ ApiData.item[ApiData.item.length - 1].finishTime = date.toISOString()
+ }
+ console.log(ApiData)
+ BookingOrderSaveGoodsStatus(ApiData)
+ .then(res => {
+ if (res.success) {
+ // this.booGoodsStatusItem = ApiData.item
+ // this.$emit('upDateRight')
+ console.log('== 货物状态设置成功 ==')
+ }
+ })
+ .catch(err => {
+ console.log(err)
+ })
}
}
}
diff --git a/src/views/main/BookingLedger/detail/style/rightContent.less b/src/views/main/BookingLedger/detail/style/rightContent.less
index 3c7f3b1..6fcaddd 100644
--- a/src/views/main/BookingLedger/detail/style/rightContent.less
+++ b/src/views/main/BookingLedger/detail/style/rightContent.less
@@ -107,7 +107,21 @@
margin-right: 10px;
font-size: 13px;
cursor: pointer;
+ position: relative;
+ .edit{
+ width: 17px;
+ height: 17px;
+ border-radius: 0 3px 0 0;
+ background: #c9c9c9;
+ display: none;
+ position: absolute;
+ right: -1px;
+ top: -1px;
+ text-align: center;
+ line-height: 17px;
+ }
&:hover {
+
border: 1px dashed @primary-color;
position: relative;
&::before {
@@ -121,6 +135,9 @@
left: 0;
border-radius: 4px;
}
+ .edit{
+ display: block;
+ }
}
&.active {
background: @primary-color;
From 204deef7b62f8a286fa946756e409e4b4319783c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E5=BC=A0=E5=90=8C=E6=B5=B7?= <963808678@qq.com>
Date: Fri, 24 Mar 2023 11:55:04 +0800
Subject: [PATCH 3/5] 3/24
---
.../detail/modules/rightContent.vue | 37 ++++++++++++++++---
1 file changed, 32 insertions(+), 5 deletions(-)
diff --git a/src/views/main/BookingLedger/detail/modules/rightContent.vue b/src/views/main/BookingLedger/detail/modules/rightContent.vue
index 6b01cb4..15a9ec5 100644
--- a/src/views/main/BookingLedger/detail/modules/rightContent.vue
+++ b/src/views/main/BookingLedger/detail/modules/rightContent.vue
@@ -621,7 +621,7 @@ export default {
console.log(this.GoodsStatusEditData, data)
let AData = { ...this.GoodsStatusEditData, ...data }
console.log(AData)
- // this.saveGoodsStatus(this.GoodsStatusEditData)
+
console.log('改变样式及数据')
if (!this.id) {
this.$message.error('请先保存主单')
@@ -688,10 +688,37 @@ export default {
this.details.goodsStatus.push({ ...data })
this.savegoodsStatusItem(data, 'push')
} else {
- const index = this.locaGoodsStatus.indexOf(data.systemCode)
- this.locaGoodsStatus.splice(index, 1)
- this.details.goodsStatus.splice(index, 1)
- this.savegoodsStatusItem(data, 'splice')
+ let that = this
+ this.$confirm({
+ title: '是否取消',
+ okText: '是',
+ okType: 'danger',
+ cancelText: '否',
+ onOk() {
+ const index = that.locaGoodsStatus.indexOf(data.systemCode)
+ that.locaGoodsStatus.splice(index, 1)
+ that.details.goodsStatus.splice(index, 1)
+ that.savegoodsStatusItem(data, 'splice')
+ },
+ onCancel() {
+ console.log('Cancel')
+ return false
+ }
+ })
+ // this.$Modal.confirm({
+ // title: () => '是否取消?',
+ // icon: () => createVNode(ExclamationCircleOutlined),
+ // okText: () => '是',
+ // okType: 'danger',
+ // cancelText: () => '否',
+ // onOk() {
+
+ // },
+ // onCancel() {
+ // console.log('Cancel')
+ // return false
+ // }
+ // })
}
console.log('== 修改货物状态 ==', this.locaGoodsStatus, this.details.goodsStatus)
},
From 17d8cea28c034a42ad98a12ba560675ab91e2080 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E5=BC=A0=E5=90=8C=E6=B5=B7?= <963808678@qq.com>
Date: Fri, 24 Mar 2023 14:28:55 +0800
Subject: [PATCH 4/5] 3/24
---
.../BookingLedger/detail/modules/rightContent.vue | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/src/views/main/BookingLedger/detail/modules/rightContent.vue b/src/views/main/BookingLedger/detail/modules/rightContent.vue
index 15a9ec5..af829e1 100644
--- a/src/views/main/BookingLedger/detail/modules/rightContent.vue
+++ b/src/views/main/BookingLedger/detail/modules/rightContent.vue
@@ -345,9 +345,16 @@ export default {
return []
}
if (this.details.goodsStatus) {
- return this.details.goodsStatus.map((item, index) => {
- return item.systemCode
+ // return this.details.goodsStatus.map((item, index) => {
+ // return item.systemCode
+ // })
+ let data = []
+ this.details.goodsStatus.forEach(item => {
+ if (item.finishTime) {
+ data.push(item.systemCode)
+ }
})
+ return data
} else {
return []
}
From 72099b6031b7434aae47799cd1de111d007b4e8e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E5=BC=A0=E5=90=8C=E6=B5=B7?= <963808678@qq.com>
Date: Fri, 24 Mar 2023 14:41:47 +0800
Subject: [PATCH 5/5] 3/24
---
src/views/main/DjyTenantConfig/index.vue | 14 ++++++++------
1 file changed, 8 insertions(+), 6 deletions(-)
diff --git a/src/views/main/DjyTenantConfig/index.vue b/src/views/main/DjyTenantConfig/index.vue
index 2d63a3c..3efafcb 100644
--- a/src/views/main/DjyTenantConfig/index.vue
+++ b/src/views/main/DjyTenantConfig/index.vue
@@ -1,6 +1,6 @@
-
+ -->
@@ -41,7 +41,7 @@
resizable
round
:loading="loading"
- height="600px"
+ height="700px"
empty-text="没有更多数据了!"
>
@@ -128,10 +128,12 @@ export default {
}
})
this.DisplayLoadData = Rdata
+ this.init()
},
FnReset() {
- this.queryParam = {}
+ this.queryParam = { currentPage: 1, pageSize: 9999, Type: 'booking_default_value' }
this.DisplayLoadData = this.loadData
+ this.init()
},
confirm(e) {
this.FnDel(e)