主分单的集装箱数据污染问题修复

szh-new
lijingjia 2 months ago
parent ed5b93c86c
commit fc33ea1120

@ -427,7 +427,7 @@
} }
// //
const submitRP = () => { const submitRP = () => {
submitAll()
} }
// //
const submitAll = () => { const submitAll = () => {

@ -27,7 +27,7 @@
import { useDesign } from '/@/hooks/web/useDesign' import { useDesign } from '/@/hooks/web/useDesign'
import { useI18n } from '/@/hooks/web/useI18n' import { useI18n } from '/@/hooks/web/useI18n'
import { useTabDropdown } from '../useTabDropdown' import { useTabDropdown } from '../useTabDropdown'
import { useRoute } from 'vue-router'
export default defineComponent({ export default defineComponent({
name: 'TabContent', name: 'TabContent',
components: { Dropdown, Icon }, components: { Dropdown, Icon },
@ -41,14 +41,17 @@
setup(props) { setup(props) {
const { prefixCls } = useDesign('multiple-tabs-content') const { prefixCls } = useDesign('multiple-tabs-content')
const { t } = useI18n() const { t } = useI18n()
const route = useRoute()
const getTitle = computed(() => { const getTitle = computed(() => {
const { tabItem: { meta } = {} } = props const { tabItem: { meta } = {} } = props
return meta && t(meta.title as string) return meta && t(meta.title as string)
}) })
function RText(data) { function RText(data) {
let Rdata = '' let Rdata = ''
if (data == '海运出口-详情') { if (route?.query?.tabName) {
// tab
Rdata = route.query.tabName
} else if (data == '海运出口-详情') {
if (props.tabItem.query.isCopy) { if (props.tabItem.query.isCopy) {
if (props.tabItem.query.copyId) { if (props.tabItem.query.copyId) {
Rdata = `海运出口-复制${Number(props.tabItem.query.copyId) + 1}` Rdata = `海运出口-复制${Number(props.tabItem.query.copyId) + 1}`

@ -32,7 +32,7 @@
</a-button> </a-button>
<a-button :loading="dloading" @click="copyMainBill" type="link"> <a-button :loading="dloading" @click="copyMainBill" type="link">
<span v-show="!dloading" class="iconfont icon-a-17Btuichu"></span> <span v-show="!dloading" class="iconfont icon-a-17Btuichu"></span>
调入主单信息 调入主单集装箱信息
</a-button> </a-button>
</div> </div>
<hot-table ref="hotTb" :data="list" :settings="settings"> <hot-table ref="hotTb" :data="list" :settings="settings">
@ -41,10 +41,10 @@
</div> </div>
</template> </template>
<script lang="ts" setup> <script lang="ts" setup>
import { ref, nextTick, defineProps, defineComponent, onMounted, defineExpose } from 'vue' import { ref, nextTick, defineProps, defineComponent, onMounted, defineExpose, watch } from 'vue'
import { HotTable } from '@handsontable/vue3' import { HotTable } from '@handsontable/vue3'
import 'handsontable/dist/handsontable.full.min.css' import 'handsontable/dist/handsontable.full.min.css'
import { GetOpCtnList } from '/@/views/operation/seaexport/api/BookingLedger' import { GetOpCtnList, BatchDelBillManageCtn } from '/@/views/operation/seaexport/api/BookingLedger'
import { GetCtnSelectList, GetPackageSelectList } from '/@/api/common' import { GetCtnSelectList, GetPackageSelectList } from '/@/api/common'
// //
import { useMessage } from '/@/hooks/web/useMessage' import { useMessage } from '/@/hooks/web/useMessage'
@ -60,6 +60,8 @@
setFieldsValue: { setFieldsValue: {
type: Function type: Function
}, },
// id
mainId: { type: String },
// //
ctnInfo: { ctnInfo: {
type: Array, type: Array,
@ -249,13 +251,36 @@
deleteFlag.value = true deleteFlag.value = true
} }
// //
const deleteRow = () => { const deleteRow = async (type) => {
const res = list.value.filter(item => { const ids = []
return !item.selected if (type) {
list.value.forEach((item) => {
ids.push(item.id)
}) })
} else {
list.value.forEach((item) => {
if (item.selected && item.id) ids.push(item.id)
})
}
if (ids.length) {
const data = await BatchDelBillManageCtn({ ids, id: props.mainId })
if (!type) createMessage.success(data.message)
}
deleteFlag.value = false deleteFlag.value = false
list.value = res for (let i = 0; i < list.value.length; i++) {
hotTb.value.hotInstance.loadData(res) if (list.value[i].selected) {
list.value.splice(i, 1)
i--
}
}
hotTb.value.hotInstance.loadData(list.value)
// const res = list.value.filter(item => {
// return !item.selected
// })
// deleteFlag.value = false
// list.value = res
// hotmain.value.hotInstance.loadData(list.value)
} }
// //
const cancelDelete = () => { const cancelDelete = () => {
@ -263,7 +288,7 @@
} }
const dloading = ref(false) const dloading = ref(false)
// //
const copyMainBill = () => { const copyMainBill = async () => {
const postData = { const postData = {
queryCondition: JSON.stringify([ queryCondition: JSON.stringify([
{ {
@ -279,6 +304,7 @@
} }
} }
dloading.value = true dloading.value = true
await deleteRow('imp')
GetOpCtnList(postData).then(res => { GetOpCtnList(postData).then(res => {
dloading.value = false dloading.value = false
const { data } = res const { data } = res
@ -288,7 +314,7 @@
selected: false, selected: false,
ctn: item.ctn, ctn: item.ctn,
ctnId: item.ctnId, ctnId: item.ctnId,
id: item.id, id: null,
ctnNum: item.ctnNum, ctnNum: item.ctnNum,
cntrNo: item.cntrNo, cntrNo: item.cntrNo,
sealNo: item.sealNo, sealNo: item.sealNo,
@ -298,7 +324,8 @@
kgs: item.kgs, kgs: item.kgs,
cbm: item.cbm, cbm: item.cbm,
tareWeight: item.tareWeight, tareWeight: item.tareWeight,
note: item.note note: item.note,
pid: props.mainId
} }
}) })
list.value = hlist list.value = hlist
@ -379,6 +406,14 @@
list.value = props.ctnInfo list.value = props.ctnInfo
hot.loadData(props.ctnInfo) hot.loadData(props.ctnInfo)
}) })
watch(
() => props.ctnInfo,
(v) => {
list.value = v
const hot = hotTb.value.hotInstance
hot.loadData(v)
}
)
defineExpose({ defineExpose({
list, list,
init init

@ -213,7 +213,7 @@ export const formSchema1: FormSchema[] = [
show: false, show: false,
}, },
{ {
field: 'agent', field: 'agentName',
label: '国外代理', label: '国外代理',
component: 'ApiSelect', component: 'ApiSelect',
required: true, required: true,

@ -98,6 +98,7 @@
<container <container
ref="contBox" ref="contBox"
:id="id" :id="id"
:mainId="activeId"
:setFieldsValue="setFieldsValue3" :setFieldsValue="setFieldsValue3"
:ctnInfo="ctnInfo" :ctnInfo="ctnInfo"
></container> ></container>
@ -164,6 +165,7 @@
<ladingHistory <ladingHistory
:id="id" :id="id"
:reload="init" :reload="init"
:details="details"
ref="ladHistory" ref="ladHistory"
/> />
<DsPrint ref="dsPrint" code="sea_freight_export" temCode="op_sea_export_billmanage" :paramJsonStr="busids" /> <DsPrint ref="dsPrint" code="sea_freight_export" temCode="op_sea_export_billmanage" :paramJsonStr="busids" />
@ -176,14 +178,13 @@
import { BasicForm, useForm } from '/@/components/Form/index' import { BasicForm, useForm } from '/@/components/Form/index'
// //
import DsPrint from '/@/components/Print/index.vue' import DsPrint from '/@/components/Print/index.vue'
import { GetSeaExportBillManageList } from '../../api/BookingLedger'
import { formSchema1, formSchema2, formSchema3, formSchema4, formSchema5, formSchema6 } from './ladingInfo' import { formSchema1, formSchema2, formSchema3, formSchema4, formSchema5, formSchema6 } from './ladingInfo'
import { getOptions } from '/@/hooks/dict' import { getOptions } from '/@/hooks/dict'
// //
const container = defineAsyncComponent(() => import("./container.vue")) const container = defineAsyncComponent(() => import("./container.vue"))
// //
const ladingHistory = defineAsyncComponent(() => import("./ladingHistory.vue")) const ladingHistory = defineAsyncComponent(() => import("./ladingHistory.vue"))
import { EditSeaExportBillManage, BatchDelBillManage, BatchDelBillManageCtn, GetSeaExportBillManageInfo } from '../../api/BookingLedger' import { EditSeaExportBillManage, BatchDelBillManage, GetSeaExportBillManageList, GetSeaExportBillManageInfo } from '../../api/BookingLedger'
// //
import { useMessage } from '/@/hooks/web/useMessage' import { useMessage } from '/@/hooks/web/useMessage'
const { createMessage } = useMessage() const { createMessage } = useMessage()
@ -329,6 +330,7 @@
formData.cntrSealNo = row.cntrSealNo formData.cntrSealNo = row.cntrSealNo
formData.description = row.description formData.description = row.description
formData.marks = row.marks formData.marks = row.marks
ctnInfo.value = row.ctnInfo
}) })
} }
} }
@ -708,9 +710,10 @@
formData.cntrSealNo = props.details.cntrSealNo formData.cntrSealNo = props.details.cntrSealNo
formData.description = props.details.description formData.description = props.details.description
formData.marks = props.details.marks formData.marks = props.details.marks
// id // id()
if (props.details.ctnInfo && props.details.ctnInfo.length) { if (props.details.ctnInfo && props.details.ctnInfo.length) {
props.details.ctnInfo.forEach(item => { const ctnInfos = JSON.parse(JSON.stringify(props.details.ctnInfo))
ctnInfos.forEach(item => {
item.id = '' item.id = ''
item.bsno = '' item.bsno = ''
}) })

@ -380,6 +380,8 @@
getFormSet(null) getFormSet(null)
} }
} }
// true
let copyFlag = false
// //
function getDetail() { function getDetail() {
if (inPageLoading.value) { if (inPageLoading.value) {
@ -397,7 +399,7 @@
orderContactList: [] orderContactList: []
} }
// //
if (route.query.source == 'copy') { if (route.query.source == 'copy' && !copyFlag) {
res.data = { res.data = {
...res.data, ...res.data,
id: null, id: null,
@ -421,6 +423,10 @@
if (!res.data.ctnPriceInfo.length) { if (!res.data.ctnPriceInfo.length) {
res.data.ctnPriceInfo = [{}] res.data.ctnPriceInfo = [{}]
} }
//
if (res.data.stlDate) {
res.data.stlDate = res.data.stlDate.split(' ')[0]
}
bookingDetails.value = res.data bookingDetails.value = res.data
// //
// if (res.data.businessStatusName == '' && route.query.taskId) { // if (res.data.businessStatusName == '' && route.query.taskId) {
@ -461,7 +467,6 @@
createMessage.warning(err?.errorFields[0]?.errors[0]) createMessage.warning(err?.errorFields[0]?.errors[0])
throw Error() throw Error()
}) })
console.log(ctnPriceData.value[0].show)
// //
if (goodsForm.ctnPriceInfo && goodsForm.ctnPriceInfo.length && ctnPriceData.value.length && ctnPriceData.value[0].show !== false) { if (goodsForm.ctnPriceInfo && goodsForm.ctnPriceInfo.length && ctnPriceData.value.length && ctnPriceData.value[0].show !== false) {
for (let i = 0; i < goodsForm.ctnPriceInfo.length; i++) { for (let i = 0; i < goodsForm.ctnPriceInfo.length; i++) {
@ -541,7 +546,10 @@
go(`/BookingDetail?id=${res.data}&source=edit`) go(`/BookingDetail?id=${res.data}&source=edit`)
}, 50) }, 50)
} }
if (route.query.source != 'copy') init() init()
if (route.query.source == 'copy') {
copyFlag = true
}
} }
}) })
.catch(() => { .catch(() => {
@ -921,6 +929,13 @@
const completeTask = async (type, b) => { const completeTask = async (type, b) => {
const status = route.query.status const status = route.query.status
const { fullPath } = route // const { fullPath } = route //
//
if (status == 'WAIT_BOOKING') {
const baseinfoForm = await RefbasicInfo.value.validate()
if (!(baseinfoForm.bookingNo || baseinfoForm.mblno)) {
return createMessage.warning('请填写订舱编号或主提单号!')
}
}
if (status == 'ORDER_AUDIT_REJECTED') { if (status == 'ORDER_AUDIT_REJECTED') {
SubmitAudit({ SubmitAudit({
businessId: id.value, businessId: id.value,
@ -966,7 +981,7 @@
position: absolute; position: absolute;
z-index: 900; z-index: 900;
right: 22px; right: 22px;
top: 10px; top: -38px;
>span { >span {
display: inline-block; display: inline-block;
width: 100px; width: 100px;
@ -1011,7 +1026,7 @@
} }
} }
.ds-sea-child-tab { .ds-sea-child-tab {
margin-right: 16px; padding-right: 16px;
.ant-tabs-nav { .ant-tabs-nav {
height: 32px; height: 32px;
background: #f5f9fc; background: #f5f9fc;

@ -51,7 +51,7 @@
label: 'ctnName', label: 'ctnName',
value: 'ctnName' value: 'ctnName'
}" }"
@dropdown-visible-change="handleFetch" @dropdown-visible-change="handleFetch(item.ctn)"
:options="ctnOptions" :options="ctnOptions"
:filter-option="filterOption" :filter-option="filterOption"
@change="ctnChange($event, item)" @change="ctnChange($event, item)"
@ -414,6 +414,7 @@
if (nval.cargoId) cargoId.value = nval.cargoId if (nval.cargoId) cargoId.value = nval.cargoId
} }
}) })
let oldVal = null
// //
const ctnChange = (v, item) => { const ctnChange = (v, item) => {
let data = {} let data = {}
@ -424,7 +425,7 @@
} }
}) })
// //
emitter.emit('ctnTable', data) emitter.emit('ctnTable', { n: data, o: oldVal })
} }
// change // change
const ctnNumChange = (v, item) => { const ctnNumChange = (v, item) => {
@ -463,7 +464,8 @@
return g return g
} }
const ctnOptions = ref([]) const ctnOptions = ref([])
const handleFetch = () => { const handleFetch = (v) => {
oldVal = v
if (ctnOptions.value.length) return if (ctnOptions.value.length) return
GetCtnSelectList().then(res => { GetCtnSelectList().then(res => {
ctnOptions.value = res.data ctnOptions.value = res.data
@ -611,6 +613,9 @@
</script> </script>
<style lang="less"> <style lang="less">
.ds-goods-info { .ds-goods-info {
.ant-input-number-handler-wrap {
display: none;
}
h4 { h4 {
margin-bottom: 0!important; margin-bottom: 0!important;
color: black; color: black;

@ -2003,36 +2003,44 @@
if (cList && cList.length) { if (cList && cList.length) {
let flag = true let flag = true
cList.forEach(item => { cList.forEach(item => {
if (item.ctn == data.ctnName) { if (item.ctn == data.o) {
item.ctn = data.n.ctnName
flag = false flag = false
} }
}) })
if (flag) { if (flag) {
if (cList && cList.length) {
if (!cList[0].ctn) {
cList[0].ctn = data.ctnName
cList[0].ctnCode = data.ediCode
cList[0].tareWeight = data.ctnWeight
} else {
cList.push({
ctn: data.ctnName,
ctnCode: data.ediCode,
tareWeight: data.ctnWeight
})
}
} else {
cList.push({ cList.push({
ctn: data.ctnName, ctn: data.n.ctnName,
ctnCode: data.ediCode, ctnCode: data.n.ediCode,
tareWeight: data.ctnWeight tareWeight: data.n.ctnWeight
}) })
} }
} // if (flag) {
// if (cList && cList.length) {
// if (!cList[0].ctn) {
// cList[0].ctn = data.n.ctnName
// cList[0].ctnCode = data.n.ediCode
// cList[0].tareWeight = data.n.ctnWeight
// } else {
// cList.push({
// ctn: data.n.ctnName,
// ctnCode: data.n.ediCode,
// tareWeight: data.n.ctnWeight
// })
// }
// } else {
// cList.push({
// ctn: data.n.ctnName,
// ctnCode: data.n.ediCode,
// tareWeight: data.n.ctnWeight
// })
// }
// }
} else { } else {
cList.push({ cList.push({
ctnCode: data.ediCode, ctnCode: data.n.ediCode,
ctn: data.ctnName, ctn: data.n.ctnName,
size: data.ctnSize size: data.n.ctnSize
}) })
} }
}) })

@ -6,11 +6,11 @@
><i class="iconfont icon-52" style="margin-left: 30px"></i>上传BC并放舱</a-button ><i class="iconfont icon-52" style="margin-left: 30px"></i>上传BC并放舱</a-button
> >
</template> </template>
<a-button v-repeat v-if="source == 'edit' || status == 'WAIT_BOOKING'" type="link" @click="openModel('bookingSpace')"> <a-button v-repeat v-if="source == 'edit' || source == 'copy' || status == 'WAIT_BOOKING'" type="link" @click="openModel('bookingSpace')">
<span class="iconfont icon-gongdanqueren"></span> <span class="iconfont icon-gongdanqueren"></span>
订舱 订舱
</a-button> </a-button>
<a-button v-if="source == 'edit' || status == 'WAIT_SI'" type="link" @click="openModel('cutOff')"> <a-button v-if="source == 'edit' || source == 'copy' || source == 'copy' || status == 'WAIT_SI'" type="link" @click="openModel('cutOff')">
<span class="iconfont icon-lanjie"></span> <span class="iconfont icon-lanjie"></span>
截单 截单
</a-button> </a-button>
@ -20,53 +20,53 @@
cancel-text="否" cancel-text="否"
@confirm="openModel('vgm')" @confirm="openModel('vgm')"
> >
<a-button v-if="source == 'edit' || status == 'WAIT_VGM'" type="link"> <a-button v-if="source == 'edit' || source == 'copy' || status == 'WAIT_VGM'" type="link">
<span class="iconfont icon-lanjie"></span> <span class="iconfont icon-lanjie"></span>
VGM VGM
</a-button> </a-button>
</a-popconfirm> </a-popconfirm>
<a-button v-if="source == 'edit'" type="link" @click="openModel('trace')"> <a-button v-if="source == 'edit' || source == 'copy'" type="link" @click="openModel('trace')">
<span class="iconfont icon-dingwei"></span> <span class="iconfont icon-dingwei"></span>
运踪 运踪
</a-button> </a-button>
<a-button v-if="source == 'edit' || status == 'WAIT_CANGDAN'" type="link" @click="openPreOrderFun"> <a-button v-if="source == 'edit' || source == 'copy' || status == 'WAIT_CANGDAN'" type="link" @click="openPreOrderFun">
<span class="iconfont icon-chuanfanguanli-chuanfanshenqing"></span> <span class="iconfont icon-chuanfanguanli-chuanfanshenqing"></span>
舱单 舱单
</a-button> </a-button>
<a-button v-if="source == 'edit'" type="link" @click="openModel('paper')"> <a-button v-if="source == 'edit' || source == 'copy'" type="link" @click="openModel('paper')">
<span class="iconfont icon-touzijilu"></span> <span class="iconfont icon-touzijilu"></span>
下货纸 下货纸
</a-button> </a-button>
<a-button v-if="source == 'edit' || status == 'WAIT_SPACE_RELEASE'" type="link" @click="FnOpBusinessYard"> <a-button v-if="source == 'edit' || source == 'copy' || status == 'WAIT_SPACE_RELEASE'" type="link" @click="FnOpBusinessYard">
<span class="iconfont icon-a-fahuodaifahuo"></span> <span class="iconfont icon-a-fahuodaifahuo"></span>
放舱 放舱
</a-button> </a-button>
<a-button v-if="source == 'edit'" type="link" @click="FnOpBusinessTruck"> <a-button v-if="source == 'edit' || source == 'copy'" type="link" @click="FnOpBusinessTruck">
<span class="iconfont icon-yunshu1"></span> <span class="iconfont icon-yunshu1"></span>
派车 派车
</a-button> </a-button>
<a-button v-if="source == 'edit'" type="link" v-repeat @click="FnTxxpLink"> <a-button v-if="source == 'edit' || source == 'copy'" type="link" v-repeat @click="FnTxxpLink">
<span class="iconfont icon-a-xiaopiaofapiao-01"></span> <span class="iconfont icon-a-xiaopiaofapiao-01"></span>
小票 小票
</a-button> </a-button>
<a-upload <a-upload
v-if="source == 'edit'" v-if="source == 'edit' || source == 'copy'"
:file-list="fileList" :file-list="fileList"
accept=".pdf" accept=".pdf"
:before-upload="beforeUpload" :before-upload="beforeUpload"
name="file" name="file"
:customRequest="uploadFile" :customRequest="uploadFile"
> >
<a-button v-if="source == 'edit'" type="link" v-repeat @click="ShowOCR"> <a-button v-if="source == 'edit' || source == 'copy'" type="link" v-repeat @click="ShowOCR">
<span class="iconfont icon-OCR"></span> <span class="iconfont icon-OCR"></span>
OCR OCR
</a-button> </a-button>
</a-upload> </a-upload>
<a-button v-if="source == 'edit'" type="link" v-repeat @click="handleSubmitTelex"> <a-button v-if="source == 'edit' || source == 'copy'" type="link" v-repeat @click="handleSubmitTelex">
<span class="iconfont icon-lunchuan"></span> <span class="iconfont icon-lunchuan"></span>
电放 电放
</a-button> </a-button>
<a-button :loading="bhLoading" v-if="source == 'edit'" type="link" v-repeat @click="printBh"> <a-button :loading="bhLoading" v-if="source == 'edit' || source == 'copy'" type="link" v-repeat @click="printBh">
<span v-show="!bhLoading" class="iconfont icon-weibiaoti--"></span> <span v-show="!bhLoading" class="iconfont icon-weibiaoti--"></span>
保函 保函
</a-button> </a-button>

@ -13,7 +13,7 @@
<Divider type="horizontal" /> <Divider type="horizontal" />
<div> <div>
<div class="iconfont"><span style="color: #7A8798;"><span class="iconfont icon-chakan mr5"></span>会计期间</span>{{ details.accountDate }}</div> <div class="iconfont"><span style="color: #7A8798;"><span class="iconfont icon-chakan mr5"></span>会计期间</span>{{ details.accountDate }}</div>
<div class="iconfont"><span style="color: #7A8798;"><span class="iconfont icon-calendar mr5"></span>日期</span>{{ details.stlDate }}<span v-if="details.stlName">({{ details.stlName }})</span></div> <div class="iconfont"><span style="color: #7A8798;"><span class="iconfont icon-calendar mr5"></span>结日期</span>{{ details.stlDate }}<span v-if="details.stlName">({{ details.stlName }})</span></div>
</div> </div>
<div class="lock-box"> <div class="lock-box">
<a-dropdown> <a-dropdown>

@ -1191,7 +1191,8 @@
source: data.tasK_USER_STATUS, source: data.tasK_USER_STATUS,
taskId: data.id, taskId: data.id,
status: statusFlag ? data.tasK_TYPE : 'n', status: statusFlag ? data.tasK_TYPE : 'n',
}, tabName: data.tasK_TYPE_NAME
}
}) })
break break
default: default:

Loading…
Cancel
Save