修改问题

master
sunzehua 1 year ago
parent 4b133bce7b
commit 48c95b43d7

@ -3,7 +3,11 @@
<a-card :bodyStyle="tstyle" :bordered="false">
<div class="title"><i class="iconfont icon-ERP_zhuyi"></i><span>注意事项</span>
<a-icon class="rule-icon" @click="handleOpenRule({}, 1)" type="setting" theme="filled" />
<a-icon type="reload" @click="checkFun" title="重新校验" style="color: rgb(30,144,255);margin-left: 10px;cursor: pointer;" />
<a-icon
type="reload"
@click="checkFun"
title="重新校验"
style="color: rgb(30,144,255);margin-left: 10px;cursor: pointer;" />
</div>
<div class="content">
<div class="tip" v-if="excuteRules.length > 0">
@ -22,7 +26,7 @@
</div>
<div class="tip" v-else-if="excuteRulesType === 'fail'">
<div class="rules-label"><i class="iconfont icon-shibai Warning"></i>
<span>校验失败</span> <a-button size="small" type="link" class="btn" @click="checkFun"> </a-button>
<span>校验失败</span> <a-button size="small" type="link" class="btn" @click="checkFun"> </a-button>
</div>
</div>
<div class="tip no-data" v-else>
@ -35,16 +39,18 @@
</a-card>
<a-card :bodyStyle="tstyle" :bordered="false">
<div class="title"><i class="iconfont icon-fuwu"></i><span>服务项目</span></div>
<div class="content">
<div
class="items"
v-for="(serive, sindex) in bookingServiceItem"
:key="sindex"
:class="{ active: locaService.includes(serive.code) }"
@click="saveService(serive)">
{{ serive.name }}
<a-spin :spinning="seriveLoading">
<div class="content">
<div
class="items"
v-for="(serive, sindex) in bookingServiceItem"
:key="sindex"
:class="{ active: serive.isYield }"
@click="saveService(serive)">
{{ serive.projectName }}
</div>
</div>
</div>
</a-spin>
</a-card>
<a-card :bodyStyle="tstyle" :bordered="false">
<div class="title"><i class="iconfont icon-shijian1"></i><span>船舶动态
@ -119,47 +125,57 @@
</a-card>
<a-card :bodyStyle="tstyle" :bordered="false">
<a-spin :spinning="spinning" :delay="delayTime">
<div class="title"><i class="iconfont icon-fuwu"></i><span>货物状态</span></div>
<div class="title"><i class="iconfont icon-fuwu"></i><span>货物状态</span>
<a-switch style="margin-left: 15px;" size="small" v-model="changeGoods" />
</div>
<div class="content">
<a-tooltip v-for="(serive, sindex) in booGoodsStatusItem" :key="`${serive.configId}_${sindex}`">
<template v-if="serive.finishTime || serive.remark" #title>
<p v-if="serive.finishTime">{{ serive.finishTime }}</p>
<p v-if="serive.remark">{{ serive.remark }}</p>
<p v-if="serive.extData">{{ serive.extData }}</p>
</template>
<div class="box-list">
<div
class="items"
:class="{ active: serive.finishTime, active1: serive.remark }"
@click="saveGoodsStatus(serive)">
{{ serive.statusName }}
<div class="edit" @click.stop="FnOpenEdit(serive)"><a-icon type="edit" /></div>
v-for="(serive, sindex) in booGoodsStatusItem"
:class="{ isBr: changeGoods && serive.isBr }"
:key="`${serive.configId}_${sindex}`">
<a-tooltip>
<template v-if="(serive.actDate || serive.actRemark) && !serive.isBr" #title>
<p v-if="serive.actDate">{{ serive.actDate }}</p>
<p v-if="serive.actRemark">{{ serive.actRemark }}</p>
<p v-if="serive.actVal">{{ serive.actVal }}</p>
</template>
<div v-if="!changeGoods" style="display: flex;align-items: center;margin-top: 10px;">
<div
class="items"
v-if="!changeGoods && !serive.isBr"
:class="{ active: serive.isYield, active1: serive.actRemark && !serive.isYield }"
@click="saveGoodsStatus(serive)">
{{ serive.showName }}
<div class="edit" @click.stop="FnOpenEdit(serive)"><a-icon type="edit" /></div>
</div>
<!-- <div
class="box-line"
style="margin: 0 5px 0 0;"
v-if="changeGoods && !serive.isEnd && !serive.isBr"
:class="{ active: serive.isYield }"></div> -->
</div>
<div v-if="changeGoods && !serive.isBr" class="goods-box">
<div class="goods-content" :class="{ active: serive.isYield }" @click="saveGoodsStatus(serive)">
<!-- <div class="round" :class="{ active: serive.isYield }">
<a-icon v-if="serive.isYield" style="color:rgb(48,172,214);font-size: 10px;" type="check" />
</div> -->
<a-icon v-if="serive.isYield" class="serve-icon" type="check-circle" />
<div v-else class="round">
</div>
<div class="showName">{{ serive.showName }}</div>
</div>
<!-- <a-icon type="right" style="color: rgb(179, 175, 175);" /> -->
<div class="box-line" v-if="changeGoods && !serive.isEnd" :class="{ active: serive.isYield }"></div>
<div class="box-edit" @click.stop="FnOpenEdit(serive)"><a-icon type="edit" /></div>
</div>
</a-tooltip>
</div>
</a-tooltip>
<br />
</div>
</div>
</a-spin>
</a-card>
<a-modal v-model="GoodsStatusVisible" width="600px" title="编辑" @ok="GoodsStatusHandleOk">
<a-form :form="StatusVisibleForm">
<a-row>
<a-col :span="12">
<a-form-item label="完成时间" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
<a-date-picker show-time placeholder="完成时间" v-decorator="['finishTime']" />
</a-form-item>
</a-col>
<a-col :span="12" v-if="GoodsStatusEditData.systemCode == 'SQXS'">
<a-form-item label="显示天数" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
<a-input placeholder="请输入显示天数" v-decorator="['extData']" />
</a-form-item>
</a-col>
<a-col :span="24">
<a-form-item label="备注" :labelCol="labelCol2" :wrapperCol="wrapperCol2" has-feedback>
<!-- <a-input placeholder="请输入备注" v-decorator="['remark']" /> -->
<a-textarea placeholder="请输入备注" v-decorator="['remark']" :auto-size="{ minRows: 2 }" />
</a-form-item>
</a-col>
</a-row>
</a-form>
</a-modal>
<a-card :bodyStyle="tstyle" :bordered="false">
<div class="title">
<i class="iconfont icon-beizhu1"></i><span>备注</span>
@ -285,7 +301,34 @@
</div>
</a-collapse-panel>
</a-collapse>
<a-modal v-model="GoodsStatusVisible" width="600px" title="编辑" @ok="GoodsStatusHandleOk">
<a-spin :spinning="goodStatusLoading">
<a-form :form="StatusVisibleForm">
<a-row>
<a-col :span="12">
<a-form-item label="完成时间" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
<a-date-picker
valueFormat="YYYY-MM-DD HH:00:00"
show-time
placeholder="完成时间"
v-decorator="['setActDate']" />
</a-form-item>
</a-col>
<a-col :span="12" v-if="GoodsStatusEditData.statusSKUCode == 'SQXS'">
<a-form-item label="显示天数" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
<a-input placeholder="请输入显示天数" v-decorator="['setActVal']" />
</a-form-item>
</a-col>
<a-col :span="24">
<a-form-item label="备注" :labelCol="labelCol2" :wrapperCol="wrapperCol2" has-feedback>
<!-- <a-input placeholder="请输入备注" v-decorator="['remark']" /> -->
<a-textarea placeholder="请输入备注" v-decorator="['actRemark']" :auto-size="{ minRows: 2 }" />
</a-form-item>
</a-col>
</a-row>
</a-form>
</a-spin>
</a-modal>
<a-modal
title="新增备注"
:width="700"
@ -349,22 +392,16 @@
<a-form-item v-if="roleData.ruleNotice" label="规则提示">
{{ roleData.ruleNotice }}
</a-form-item>
<a-form-item v-if="type==1" label="意见类型">
<a-select
placeholder="请选择意见类型"
default-value="ADD"
style="width: 200px;margin-right: 10px;">
<a-form-item v-if="type == 1" label="意见类型">
<a-select placeholder="请选择意见类型" default-value="ADD" style="width: 200px;margin-right: 10px;">
<a-select-option value="ADD">
新增
</a-select-option>
</a-select>
<span>当前状态:{{ ruleLog.length > 0 ? ruleLog[0].statusName : '' }}</span>
</a-form-item>
<a-form-item v-if="type==2" label="意见类型">
<a-select
placeholder="请选择意见类型"
default-value="MODIFY"
style="width: 200px;margin-right: 10px;">
<a-form-item v-if="type == 2" label="意见类型">
<a-select placeholder="请选择意见类型" default-value="MODIFY" style="width: 200px;margin-right: 10px;">
<a-select-option value="MODIFY">
修改
</a-select-option>
@ -386,25 +423,15 @@
</a-form>
</a-spin>>
</a-modal>
<a-modal
:title="Cqtitle"
:width="600"
:visible="atdFlag"
:maskClosable="false"
@cancel="atdFlag=false">
<a-modal :title="Cqtitle" :width="600" :visible="atdFlag" :maskClosable="false" @cancel="atdFlag = false">
<a-spin :spinning="atdLoading">
<div>
<a-date-picker valueFormat="YYYY-MM-DD HH:mm" show-time v-model="atdTime" />
</div>
</a-spin>
<template slot="footer">
<a-popconfirm
title="确定修改吗"
ok-text="确定"
cancel-text="取消"
@confirm="handleSubimtAtd"
>
<a-button type="primary" style="color: white;" >确定</a-button>
<a-popconfirm title="确定修改吗" ok-text="" cancel-text="" @confirm="handleSubimtAtd">
<a-button type="primary" style="color: white;">确定</a-button>
</a-popconfirm>
</template>
</a-modal>
@ -423,7 +450,13 @@ import {
refreshSailingDate,
GetRuleOpinionLog,
SubmitRule0pinion,
SaveDataInList
SaveDataInList,
GetSeryiceProjectList,
CancelSeryiceProject,
SaveServiceProject,
GetServiceStatusList,
SaveServiceStatus,
CancelServiceStatus
} from '@/api/modular/main/BookingLedger'
export default {
@ -457,7 +490,9 @@ export default {
ruleLog: [],
spinningRule: false,
StatusVisibleFlag: true,
goodStatusLoading: false,
id: this.id,
seriveLoading: false,
ruleForm: this.$form.createForm(this),
isCopy: this.$route.query.isCopy,
tstyle: { padding: '0 15px 15px', 'margin-bottom': '10px', background: '#fff' },
@ -479,7 +514,9 @@ export default {
bookingServiceItem: [],
atdLoading: false,
booGoodsStatusItem: [],
time: null,
bookingAttachType: [],
changeGoods: true,
attachName: '',
attachCode: '',
editRemarkVal: null,
@ -522,7 +559,7 @@ export default {
if (this.details.goodsStatus) {
const data = []
this.details.goodsStatus.forEach(item => {
if (item.finishTime || item.remark) {
if (item.setActDate || item.remark) {
data.push(item.configId)
}
})
@ -683,32 +720,69 @@ 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
this.$emit('handleComplete')
if (this.$route.query.isCopy) {
this.booGoodsStatusItem.forEach(item => {
delete item.isPublic
delete item.finishUserId
delete item.finishTime
delete item.finishUser
delete item.remark
delete item.extData
})
if (this.details.goodsStatus) {
this.details.goodsStatus.forEach(item => {
delete item.isPublic
delete item.finishUserId
delete item.finishTime
delete item.finishUser
delete item.remark
delete item.extData
})
this.getServiceItemList(1)
this.getStatusServiceList(1)
},
getStatusServiceList(type, code) {
const data = {
bookingId: this.$route.query.id,
queryType: 2
}
if (type == 2) {
this.booGoodsStatusItem.forEach(item => {
if (item.statusSKUCode == code) {
item.isYield = !item.isYield
}
})
}
this.spinning = true
GetServiceStatusList(data).then(res => {
if (res.data.succ) {
// res.data.ext.forEach((item, index) => {
// item.isBr = false
// console.log(item.isBr, index)
// if (item.isEnd) {
// console.log(index)
// res.data.ext.splice(index + 1, 0, { isBr: true })
// }
// })
for (let i = 0; i < res.data.ext.length; i++) {
if (res.data.ext[i].isEnd) {
res.data.ext.splice(i + 1, 0, { isBr: true })
}
}
this.booGoodsStatusItem = res.data.ext
} else {
this.$message.error(res.message)
}
this.spinning = false
})
},
getServiceItemList(type, code) {
if (type == 1) {
this.seriveLoading = true
const data = {
bookingId: this.$route.query.id,
queryType: 0
}
GetSeryiceProjectList(data).then(res => {
if (res.data.succ) {
this.bookingServiceItem = res.data.ext
} else {
this.$message.error(res.msg)
}
this.seriveLoading = false
})
} else {
// this.bookingServiceItem.forEach(item => {
// if (item.projectCode == code) {
// item.isYield = !item.isYield
// }
// })
this.spinning = true
this.getStatusServiceList(1)
}
},
checkFun() {
this.$message.loading({ content: '校验中...' })
ExcuteRulesOceanBooking(this.id)
@ -890,39 +964,64 @@ export default {
this.details.log[index].showMore = !this.details.log[index].showMore
this.$forceUpdate()
},
stopTimer() {
window.clearTimeout(this.time);
},
saveService(data) {
var date = new Date();
console.log(date.valueOf())
if (!this.id) {
this.$message.error('请先保存主单')
return false
}
if (!this.locaService.includes(data.code)) {
this.locaService.push(data.code)
this.details.item.push({
code: data.code,
value: data.name
const obj = {
bookingId: this.$route.query.id,
projectCodes: [data.projectCode]
}
// this.seriveLoading = true
if (!data.isYield) {
this.bookingServiceItem.forEach(item => {
if (item.projectCode == data.projectCode) {
item.isYield = !item.isYield
}
})
SaveServiceProject(obj).then(res => {
if (res.data.succ) {
if (this.time !== null) {
this.stopTimer()
}
this.time = setTimeout(() => {
this.spinning = true
this.getServiceItemList(2, data.projectCode)
}, 500)
} else {
this.$message.error(res.message)
this.spinning = false
this.getServiceItemList(1)
}
})
} else {
const index = this.locaService.indexOf(data.code)
this.locaService.splice(index, 1)
this.details.item.splice(index, 1)
}
this.saveServiceItem()
},
saveServiceItem() {
SaveServiceItem({
bookingId: this.id,
item: this.details.item
})
.then(res => {
if (res.success) {
console.log('== 服务项目设置成功 ==')
this.bookingServiceItem.forEach(item => {
if (item.projectCode == data.projectCode) {
item.isYield = !item.isYield
}
})
.catch(err => {
console.log(err)
CancelSeryiceProject(obj).then(res => {
if (res.data.succ) {
if (this.time !== null) {
this.stopTimer()
}
this.time = setTimeout(() => {
this.spinning = true
this.getServiceItemList(2, data.projectCode)
}, 500)
} else {
this.$message.error(res.message)
this.spinning = false
this.getServiceItemList(1)
}
})
}
},
GoodsStatusHandleOk() {
const {
@ -937,79 +1036,67 @@ export default {
}
}
let date = ''
if (values.finishTime) {
if (values.finishTime._d) {
date = new Date(+new Date(values.finishTime._d) + 8 * 3600 * 1000)
} else {
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)
}
}
}
const data = {
finishTime: date ? date.toISOString() : '',
remark: values.remark,
extData: values.extData
}
const AData = { ...this.GoodsStatusEditData, ...data }
if (!this.id) {
this.$message.error('请先保存主单')
return false
bookingId: this.$route.query.id,
statusCodes: [{
setActDate: values.setActDate,
actRemark: values.actRemark,
setActVal: values.setActVal,
statusCode: this.GoodsStatusEditData.statusSKUCode
}]
}
if (!this.locaGoodsStatus.includes(this.GoodsStatusEditData.configId)) {
this.locaGoodsStatus.push(this.GoodsStatusEditData.configId)
this.details.goodsStatus.push({ ...AData })
}
const ApiData = {
bookingId: this.id,
item: []
}
console.log(this.details.goodsStatus)
this.details.goodsStatus.forEach(item => {
if (item.finishTime || item.remark) {
if (item.configId == this.GoodsStatusEditData.configId) {
ApiData.item.push(AData)
} else {
ApiData.item.push(item)
}
this.goodStatusLoading = true
SaveServiceStatus(data).then(res => {
if (res.data.succ) {
this.GoodsStatusVisible = false
this.getStatusServiceList(1)
} else {
this.$message.error(res.data.msg)
}
this.goodStatusLoading = false
})
BookingOrderSaveGoodsStatus(ApiData)
.then(res => {
if (res.success) {
// let data = []
// this.booGoodsStatusItem.forEach(item => {
// let type = true
// ApiData.item.forEach(item2 => {
// if (item.configId == item2.configId) {
// type = false
// data.push(item2)
// }
// })
// if (type) {
// data.push(item)
// }
// })
this.$nextTick(() => {
this.booGoodsStatusItem = res.data
this.$emit('inGoodsSave', true)
this.details.goodsStatus = res.data
setTimeout(() => {
this.$emit('inGoodsSave', false)
}, 400)
})
this.$message.success('货物状态设置成功')
this.GoodsStatusVisible = false
}
})
.catch(err => {
console.log(err)
})
// const AData = { ...this.GoodsStatusEditData, ...data }
// if (!this.id) {
// this.$message.error('')
// return false
// }
// if (!this.locaGoodsStatus.includes(this.GoodsStatusEditData.configId)) {
// this.locaGoodsStatus.push(this.GoodsStatusEditData.configId)
// this.details.goodsStatus.push({ ...AData })
// }
// const ApiData = {
// bookingId: this.id,
// item: []
// }
// console.log(this.details.goodsStatus)
// this.details.goodsStatus.forEach(item => {
// if (item.setActDate || item.remark) {
// if (item.configId == this.GoodsStatusEditData.configId) {
// ApiData.item.push(AData)
// } else {
// ApiData.item.push(item)
// }
// }
// })
// BookingOrderSaveGoodsStatus(ApiData)
// .then(res => {
// if (res.success) {
// this.$nextTick(() => {
// this.booGoodsStatusItem = res.data
// this.$emit('inGoodsSave', true)
// this.details.goodsStatus = res.data
// setTimeout(() => {
// this.$emit('inGoodsSave', false)
// }, 400)
// })
// this.$message.success('')
// this.GoodsStatusVisible = false
// }
// })
// .catch(err => {
// console.log(err)
// })
} else {
console.log(errors, values)
}
@ -1026,12 +1113,11 @@ export default {
this.GoodsStatusVisible = true
this.$nextTick(() => {
this.StatusVisibleForm.setFieldsValue({
finishTime: data.finishTime ? data.finishTime : '',
remark: data.remark ? data.remark : '',
extData: data.extData ? data.extData : ''
setActDate: data.actDate ? data.actDate : '',
actRemark: data.actRemark ? data.actRemark : '',
setActVal: data.actVal ? data.actVal : ''
})
})
console.log(this.GoodsStatusEditData)
}, 100)
},
saveGoodsStatus(data) {
@ -1039,38 +1125,76 @@ export default {
this.$message.error('请先保存')
return false
}
if (!this.locaGoodsStatus.includes(data.configId) || !data.finishTime) {
// this.locaGoodsStatus.push(data.configId)
// this.details.goodsStatus.push({ ...data })
this.savegoodsStatusItem(data, 'push')
const obj = {
bookingId: this.$route.query.id,
statusCodes: [
{ statusCode: data.statusSKUCode }
]
}
// this.spinning = true
this.$store.commit('SET_SAVENEEDNUMBER', this.$route.query.id)
if (!data.isYield) {
this.booGoodsStatusItem.forEach(item => {
if (item.statusSKUCode == data.statusSKUCode) {
item.isYield = !item.isYield
}
})
SaveServiceStatus(obj).then(res => {
if (res.data.succ) {
} else {
this.$message.error(res.data.msg)
this.getStatusServiceList(1)
}
this.spinning = false
})
} else {
const that = this
this.$confirm({
title: '是否取消',
okText: '是',
okType: 'danger',
cancelText: '否',
onOk() {
const index = that.locaGoodsStatus.indexOf(data.configId)
that.locaGoodsStatus.splice(index, 1)
that.details.goodsStatus.forEach((item, index2) => {
if (item.configId == data.configId) {
that.$emit('inGoodsSave', true)
that.details.goodsStatus.splice(index2, 1)
setTimeout(() => {
that.$emit('inGoodsSave', false)
}, 1200)
}
})
that.savegoodsStatusItem(data, 'splice')
},
onCancel() {
return false
this.booGoodsStatusItem.forEach(item => {
if (item.statusSKUCode == data.statusSKUCode) {
item.isYield = !item.isYield
}
})
CancelServiceStatus(obj).then(res => {
if (res.data.succ) {
} else {
this.$message.error(res.data.msg)
this.getStatusServiceList(1)
}
this.spinning = false
})
}
// if (!this.locaGoodsStatus.includes(data.configId) || !data.setActDate) {
// // this.locaGoodsStatus.push(data.configId)
// // this.details.goodsStatus.push({ ...data })
// this.savegoodsStatusItem(data, 'push')
// } else {
// const that = this
// this.$confirm({
// title: '',
// okText: '',
// okType: 'danger',
// cancelText: '',
// onOk() {
// const index = that.locaGoodsStatus.indexOf(data.configId)
// that.locaGoodsStatus.splice(index, 1)
// that.details.goodsStatus.forEach((item, index2) => {
// if (item.configId == data.configId) {
// that.$emit('inGoodsSave', true)
// that.details.goodsStatus.splice(index2, 1)
// setTimeout(() => {
// that.$emit('inGoodsSave', false)
// }, 1200)
// }
// })
// that.savegoodsStatusItem(data, 'splice')
// },
// onCancel() {
// return false
// }
// })
// }
},
savegoodsStatusItem(data, type) {
const ApiData = {
@ -1078,20 +1202,20 @@ export default {
item: []
}
this.details.goodsStatus.forEach(item => {
if (item.finishTime || item.remark) {
if (item.setActDate || item.remark) {
ApiData.item.push(item)
}
})
if (type === 'push' && !data.remark) {
const date = new Date(+new Date() + 8 * 3600 * 1000)
ApiData.item.push({ ...data, finishTime: date.toISOString() })
ApiData.item.push({ ...data, setActDate: date.toISOString() })
}
if (type === 'push' && data.remark) {
const date = new Date(+new Date() + 8 * 3600 * 1000)
ApiData.item.forEach(ite => {
if (ite.systemCode === data.systemCode) {
ite.finishTime = date.toISOString()
ite.setActDate = date.toISOString()
}
})
}
@ -1123,6 +1247,7 @@ export default {
.active1 {
border: 1px solid #13c2c2 !important;
padding: 0 8px !important;
}
.rule-icon {
@ -1148,4 +1273,100 @@ export default {
font-weight: 400;
}
}
.box-list {
display: flex;
flex-wrap: wrap;
}
.goods-box {
display: flex;
align-items: center;
padding: 2px;
position: relative;
cursor: pointer;
align-items: flex-start;
margin-top: 5px;
&:hover {
.goods-content {
// border: 1px dashed rgb(19, 194, 194);
// background-color: rgb(237, 251, 251);
}
.box-edit {
display: block;
}
}
.goods-content {
// display: flex;
border: 1px dashed white;
font-size: 14px;
font-weight: bold;
&.active {
color: rgb(48, 172, 214);
}
}
.serve-icon {
font-size: 22px;
display: block;
margin: 0 auto;
margin-bottom: 5px;
}
.round {
width: 22px;
height: 22px;
line-height: 15px;
border-radius: 50%;
// margin-right: 3px;
margin: 0 auto;
font-size: 15px;
text-align: center;
border: 2px solid rgb(146, 146, 146);
margin-bottom: 5px;
&.active {
border: 1px solid rgb(48, 172, 214);
}
}
.box-edit {
width: 17px;
height: 17px;
border-radius: 0 3px 0 0;
// background: #c9c9c9;
display: none;
position: absolute;
left: 0px;
top: -1px;
text-align: center;
line-height: 17px;
}
}
.showName {
width: 48px;
font-size: 12px;
text-align: center;
}
.box-line {
height: 1px;
width: 10px;
background: rgb(179, 175, 175);
// margin-left: 3px;
margin-top: 10px;
&.active {
border: 1px solid rgb(48, 172, 214);
}
}
.isBr {
width: 100%;
}
</style>

@ -607,12 +607,13 @@
<span class="TaskShippingOrderCompareSpan">{{ formatSheet.total }}</span>
</span>
<a-switch :checked="formatFlag" @change="formatFlag=!formatFlag" />
</p>
<div class="TaskShippingOrderCompareMainBox" style="height: 600px;">
<div v-if="!formatFlag" class="TaskShippingOrderCompareMainBox" style="height: 600px;">
<div class="TaskShippingOrderCompareMain">
<div class="TaskShippingOrderCompareMainHeader">
<div>
<p>提单号本地数据</p>
<p>提单号</p>
<div style="width: 100%;height: 1px;border-bottom: 1px dashed;margin: 5px 0;"></div>
<p>{{ formatSheet.mBlNo }}</p>
</div>
@ -621,45 +622,132 @@
v-for="(item, index) in formatSheet.showDetailList"
:key="index"
style="display: flex;margin-top: 15px;"
v-show="item.pCode != 'ContaList'">
v-show="item.pCode != 'ContaList' && item.isDiff">
<p style="padding-top: 4px;" v-if="item.msg">
<a-icon style="color: rgb(194,5,5);font-size: 18px;margin-right: 35px;" type="close-circle" theme="filled" />
</p>
<p v-if="item.isDiff" style="width: 100px;margin-right: 40px;">{{ item.fieldName }}:</p>
<p v-if="item.isDiff" style="width: 90px;margin-right: 20px;">{{ item.fieldName }}:</p>
<div v-if="item.isDiff" style="width:60%">
<p style="margin-bottom: 15px;">{{ item.reqVal }}
<span style="margin-left: 10px;font-weight: bold;">(本地)</span>
</p>
<span v-html="item.mergeHtml"></span>
<span style="margin-left: 10px;font-weight: bold;">(格式单)</span>
<div style="display: flex;">
<a-icon style="margin-top: 4px;margin-right: 5px;color: rgb(0,153,204);" type="right-circle" />
<span style="margin-right: 10px;font-weight: bold;width: 42px;flex-shrink:0;">本地</span>
<div style="margin-bottom: 15px;">{{ item.reqVal }}</div>
</div>
<div style="display: flex;">
<a-icon style="margin-top: 4px;margin-right: 5px;color: rgb(100,163,90);" type="right-circle" />
<span style="margin-right: 10px;font-weight: bold;width: 42px;flex-shrink:0;">格式单</span>
<div v-html="item.mergeHtml"></div>
</div>
</div>
</div>
</div>
<div class="TaskShippingOrderCompareMain">
<div>
<div>
<p>箱信息本地数据</p>
<p>箱信息</p>
<div style="width: 100%;height: 1px;border-bottom: 1px dashed;margin: 5px 0;"></div>
<div>箱号:{{ formatSheet.primaryKey }}</div>
</div>
</div>
<div
v-for="(item, index) in formatSheet.showDetailList"
:key="index"
v-show="item.pCode == 'ContaList'"
v-show="item.pCode == 'ContaList' && item.isDiff"
style="display: flex;margin-top: 15px;align-items: flex-start;"
>
<div v-if="item.fieldName == '箱号'">:{{ item.reqVal }}</div>
<p style="padding-top: 4px;" v-if="item.msg">
<a-icon style="color: rgb(194,5,5);font-size: 18px;margin-right: 35px;" type="close-circle" theme="filled" />
</p>
<p v-if="item.isDiff" style="width: 100px;margin-right: 40px;">{{ item.fieldName }}:</p>
<p v-if="item.isDiff" style="width: 90px;margin-right: 20px;">{{ item.fieldName }}:</p>
<div v-if="item.isDiff" style="width:60%">
<p style="margin-bottom: 15px;">{{ item.reqVal }}
<span style="margin-left: 10px;font-weight: bold;">(本地)</span>
<div style="display: flex;">
<a-icon style="margin-top: 4px;margin-right: 5px;color: rgb(0,153,204);" type="right-circle" />
<span style="margin-right: 10px;font-weight: bold;width: 42px;flex-shrink:0;">本地</span>
<div style="margin-bottom: 15px;">{{ item.reqVal }}</div>
</div>
<div style="display: flex;">
<a-icon style="margin-top: 4px;margin-right: 5px;color: rgb(100,163,90);" type="right-circle" />
<span style="margin-right: 10px;font-weight: bold;width: 42px;flex-shrink:0;">格式单</span>
<div v-html="item.mergeHtml"></div>
</div>
</div>
</div>
</div>
</div>
<div v-else class="TaskShippingOrderCompareMainBox" style="height: 600px;">
<div class="TaskShippingOrderCompareMain">
<div class="TaskShippingOrderCompareMainHeader">
<div>
<p>提单号</p>
<div style="width: 100%;height: 1px;border-bottom: 1px dashed;margin: 5px 0;"></div>
<p>{{ formatSheet.mBlNo }}</p>
</div>
</div>
<div
v-for="(item, index) in formatSheet.showDetailList"
:key="index"
style="display: flex;margin-top: 15px;"
v-show="item.pCode != 'ContaList'">
<p style="padding-top: 4px;" v-if="item.msg">
<a-icon style="color: rgb(194,5,5);font-size: 18px;margin-right: 35px;" type="close-circle" theme="filled" />
</p>
<p style="padding-top: 4px;" v-else>
<a-icon style="color: rgb(0,153,68);font-size: 18px;margin-right: 35px;" type="check-circle" theme="filled" />
</p>
<p style="width: 90px;margin-right: 20px;">{{ item.fieldName }}:</p>
<div style="width:60%">
<div style="display: flex;">
<a-icon style="margin-top: 4px;margin-right: 5px;color: rgb(0,153,204);" type="right-circle" />
<span style="margin-right: 10px;font-weight: bold;width: 42px;flex-shrink:0;">本地</span>
<div style="margin-bottom: 15px;">{{ item.reqVal }}</div>
</div>
<div style="display: flex;">
<a-icon style="margin-top: 4px;margin-right: 5px;color: rgb(100,163,90);" type="right-circle" />
<span style="margin-right: 10px;font-weight: bold;width: 42px;flex-shrink:0;">格式单</span>
<div v-if="item.isDiff" v-html="item.mergeHtml"></div>
<div v-else v-html="item.reqVal"></div>
</div>
</div>
</div>
</div>
<div class="TaskShippingOrderCompareMain">
<div>
<div>
<p>箱信息</p>
<div style="width: 100%;height: 1px;border-bottom: 1px dashed;margin: 5px 0;"></div>
<!-- <div>箱号:{{ formatSheet.primaryKey }}</div> -->
</div>
</div>
<div
v-for="(item, index) in formatSheet.showDetailList"
:key="index"
v-show="item.pCode == 'ContaList'"
style="display: flex;margin-top: 15px;align-items: flex-start;"
>
<div v-if="item.fieldName=='箱号'">:{{ item.primaryKey }}</div>
<div style="display: flex;align-items: flex-start;" v-else>
<p style="padding-top: 4px;" v-if="item.msg">
<a-icon style="color: rgb(194,5,5);font-size: 18px;margin-right: 35px;" type="close-circle" theme="filled" />
</p>
<p style="padding-top: 4px;" v-else>
<a-icon style="color: rgb(0,153,68);font-size: 18px;margin-right: 35px;" type="check-circle" theme="filled" />
</p>
<span v-html="item.mergeHtml"></span>
<span style="margin-left: 10px;font-weight: bold;">(格式单)</span>
<p style="width: 90px;margin-right: 20px;flex-shrink:0">{{ item.fieldName }}:</p>
<div style="width:60%">
<div style="display: flex;">
<a-icon style="margin-top: 4px;margin-right: 5px;color: rgb(0,153,204);" type="right-circle" />
<span style="margin-right: 10px;font-weight: bold;width: 42px;flex-shrink:0;">本地</span>
<div style="margin-bottom: 15px;">{{ item.reqVal }}</div>
</div>
<div style="display: flex;">
<a-icon style="margin-top: 4px;margin-right: 5px;color: rgb(100,163,90);" type="right-circle" />
<span style="margin-right: 10px;font-weight: bold;width: 42px;flex-shrink:0;">格式单</span>
<div v-if="item.isDiff" v-html="item.mergeHtml"></div>
<div v-else v-html="item.reqVal"></div>
</div>
</div>
</div>
</div>
</div>
</div>
@ -1168,7 +1256,8 @@ export default {
bcObj: {},
txxpLoading: false,
txxpFlag: false,
formatPdf: ''
formatPdf: '',
formatFlag: false
}
},
computed: {
@ -2465,6 +2554,11 @@ export default {
this.formatSheet = res.data.extra
this.formatSheet.total = res.data.total
this.formatSheetVisible = true
this.formatSheet.showDetailList.forEach(item => {
if (item.pCode === 'ContaList') {
this.formatSheet.primaryKey = item.primaryKey
}
})
} else {
this.$message.success(res.data.msg)
}

Loading…
Cancel
Save