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

szh-new
lijingjia 2 months ago
parent ed5b93c86c
commit fc33ea1120

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

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

@ -32,7 +32,7 @@
</a-button>
<a-button :loading="dloading" @click="copyMainBill" type="link">
<span v-show="!dloading" class="iconfont icon-a-17Btuichu"></span>
调入主单信息
调入主单集装箱信息
</a-button>
</div>
<hot-table ref="hotTb" :data="list" :settings="settings">
@ -41,10 +41,10 @@
</div>
</template>
<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 '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 { useMessage } from '/@/hooks/web/useMessage'
@ -60,6 +60,8 @@
setFieldsValue: {
type: Function
},
// id
mainId: { type: String },
//
ctnInfo: {
type: Array,
@ -249,13 +251,36 @@
deleteFlag.value = true
}
//
const deleteRow = () => {
const res = list.value.filter(item => {
return !item.selected
})
const deleteRow = async (type) => {
const ids = []
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
list.value = res
hotTb.value.hotInstance.loadData(res)
for (let i = 0; i < list.value.length; i++) {
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 = () => {
@ -263,7 +288,7 @@
}
const dloading = ref(false)
//
const copyMainBill = () => {
const copyMainBill = async () => {
const postData = {
queryCondition: JSON.stringify([
{
@ -279,6 +304,7 @@
}
}
dloading.value = true
await deleteRow('imp')
GetOpCtnList(postData).then(res => {
dloading.value = false
const { data } = res
@ -288,7 +314,7 @@
selected: false,
ctn: item.ctn,
ctnId: item.ctnId,
id: item.id,
id: null,
ctnNum: item.ctnNum,
cntrNo: item.cntrNo,
sealNo: item.sealNo,
@ -298,7 +324,8 @@
kgs: item.kgs,
cbm: item.cbm,
tareWeight: item.tareWeight,
note: item.note
note: item.note,
pid: props.mainId
}
})
list.value = hlist
@ -379,6 +406,14 @@
list.value = props.ctnInfo
hot.loadData(props.ctnInfo)
})
watch(
() => props.ctnInfo,
(v) => {
list.value = v
const hot = hotTb.value.hotInstance
hot.loadData(v)
}
)
defineExpose({
list,
init

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

@ -98,6 +98,7 @@
<container
ref="contBox"
:id="id"
:mainId="activeId"
:setFieldsValue="setFieldsValue3"
:ctnInfo="ctnInfo"
></container>
@ -164,6 +165,7 @@
<ladingHistory
:id="id"
:reload="init"
:details="details"
ref="ladHistory"
/>
<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 DsPrint from '/@/components/Print/index.vue'
import { GetSeaExportBillManageList } from '../../api/BookingLedger'
import { formSchema1, formSchema2, formSchema3, formSchema4, formSchema5, formSchema6 } from './ladingInfo'
import { getOptions } from '/@/hooks/dict'
//
const container = defineAsyncComponent(() => import("./container.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'
const { createMessage } = useMessage()
@ -329,6 +330,7 @@
formData.cntrSealNo = row.cntrSealNo
formData.description = row.description
formData.marks = row.marks
ctnInfo.value = row.ctnInfo
})
}
}
@ -708,9 +710,10 @@
formData.cntrSealNo = props.details.cntrSealNo
formData.description = props.details.description
formData.marks = props.details.marks
// id
// id()
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.bsno = ''
})

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

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

@ -2003,36 +2003,44 @@
if (cList && cList.length) {
let flag = true
cList.forEach(item => {
if (item.ctn == data.ctnName) {
if (item.ctn == data.o) {
item.ctn = data.n.ctnName
flag = false
}
})
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({
ctn: data.ctnName,
ctnCode: data.ediCode,
tareWeight: data.ctnWeight
})
}
cList.push({
ctn: data.n.ctnName,
ctnCode: data.n.ediCode,
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 {
cList.push({
ctnCode: data.ediCode,
ctn: data.ctnName,
size: data.ctnSize
ctnCode: data.n.ediCode,
ctn: data.n.ctnName,
size: data.n.ctnSize
})
}
})

@ -6,11 +6,11 @@
><i class="iconfont icon-52" style="margin-left: 30px"></i>上传BC并放舱</a-button
>
</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>
订舱
</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>
截单
</a-button>
@ -20,53 +20,53 @@
cancel-text="否"
@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>
VGM
</a-button>
</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>
运踪
</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>
舱单
</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>
下货纸
</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>
放舱
</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>
派车
</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>
小票
</a-button>
<a-upload
v-if="source == 'edit'"
v-if="source == 'edit' || source == 'copy'"
:file-list="fileList"
accept=".pdf"
:before-upload="beforeUpload"
name="file"
: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>
OCR
</a-button>
</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>
电放
</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>
保函
</a-button>

@ -13,7 +13,7 @@
<Divider type="horizontal" />
<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 class="lock-box">
<a-dropdown>

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

Loading…
Cancel
Save