海运出口bug调整

szh-new
lijingjia 3 months ago
parent 3390c99751
commit ca5e2ad560

@ -52,11 +52,11 @@
},
label: { type: String }
},
emits: ['change', 'update:value'],
emits: ['blur', 'update:value'],
setup(props, { emit }) {
const attrs = useAttrs()
const { t } = useI18n()
const [state] = useRuleFormItem(props, 'value', 'change')
const [state] = useRuleFormItem(props, 'value', 'blur')
//
const cutList = attrs.value.slice || []
function emitChange() {
@ -138,7 +138,8 @@
return text.replace(/ \s*$/gm, '')
}
//
const textareaBlur = () => {
const textareaBlur = (_, ...args) => {
emit('blur', _, ...args)
if (cutList.length == 0 || !state.value) return
state.value = ToCDB(state.value).toUpperCase()
//

@ -22,6 +22,7 @@ export function useRuleFormItem<T extends Recordable, K extends keyof T, V = Unw
key?: K,
changeEvent?,
emitData?: Ref<any[]>,
flag
): [WritableComputedRef<V>, (val: V) => void, DeepReadonly<V>]
export function useRuleFormItem<T extends Recordable>(

@ -990,6 +990,11 @@ export const storageColumns: BasicColumn[] = [
dataIndex: 'slotBookingNo',
width: 100,
},
{
title: '箱型箱量(余量)',
dataIndex: 'ctnStat',
width: 120
},
{
title: '合约号',
dataIndex: 'contractNo',
@ -1039,11 +1044,6 @@ export const storageColumns: BasicColumn[] = [
title: '订舱编号',
dataIndex: 'slotNo',
width: 150
},
{
title: '箱型箱量(余量)',
dataIndex: 'ctnStat',
width: 120
}
]

@ -103,7 +103,7 @@
businessType="1"
>
<span>
<a-button v-repeat v-if="route.query.status != 'WAIT_ORDER_AUDIT' && route.query.source != 'Complete'" @click="completeTask(null)" type="primary">
<a-button v-repeat v-if="route.query.status != 'WAIT_ORDER_AUDIT' && route.query.source != 'Complete'" @click="completeTask(null, null)" type="primary">
{{ completeText }}
</a-button>
</span>
@ -307,9 +307,6 @@
if (route.query.id && !id.value) {
id.value = route.query.id
}
bookingDetails.value = {
orderContactList: []
}
if (id.value) {
//
excuteRules.value = []
@ -334,6 +331,9 @@
id: id.value,
})
.then(async (res) => {
bookingDetails.value = {
orderContactList: []
}
if (route.query.isCopy) {
res.data = {
...res.data,
@ -378,7 +378,6 @@
//
const goodsForm = await RefcargoInfo.value.validateFields()
//
console.log(goodsForm.ctnPriceInfo)
if (goodsForm.ctnPriceInfo && goodsForm.ctnPriceInfo.length) {
for (let i = 0; i < goodsForm.ctnPriceInfo.length; i++) {
if (!goodsForm.ctnPriceInfo[i].ctn) {
@ -651,7 +650,7 @@
businessType: '1',
taskTypeName: type || route.query.status
}
completeTask(type)
completeTask(type, true)
if (type) postData['hasCabin'] = true
loading.value = true
await CreateTask(postData).then(res => {
@ -814,7 +813,7 @@
})
}
//
const completeTask = (type) => {
const completeTask = (type, b) => {
const { fullPath } = route //
const postData = {
businessId: id.value,
@ -825,7 +824,7 @@
}
if (type) postData.autoCreateNext = false
SetTaskStatus(postData).then(res => {
createMessage.success('操作成功!')
if (!b) createMessage.success('操作成功!')
tabStore.closeTabByKey(fullPath, router)
})
}

@ -452,7 +452,6 @@ export const mailingInfoFormSchemaL: FormSchema[] = [
return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0
},
onChange: (e, obj) => {
console.log(e, obj)
if (e && obj) {
formModel.shipperId = obj.id
formModel.shipperContent = obj.content
@ -540,7 +539,7 @@ export const mailingInfoFormSchemaL: FormSchema[] = [
}
if (e === undefined && obj === undefined) {
formModel.notifyPartyId = null
formModel.notifyPartyContent = null
formModel.notifyPartyContent = ''
formModel.notifyParty = ''
}
}

@ -217,7 +217,6 @@
emitter.emit('seaAddNotes', item.value)
} else if (item.key == 'customerName') {
//
console.log(item)
emitter.emit('customerBack', item.value)
}
}

@ -49,7 +49,9 @@
style="width: 66px"
:fieldNames="{
label: 'ctnName',
value: 'id'
value: 'id',
ctnCode: 'ediCode',
ctnSize: 'ctnSize'
}"
:options="optionsStore.getOptionsByCode('GetCtnSelectList')"
:filter-option="filterOption"
@ -58,7 +60,7 @@
</a-select>
<div class="ctn-price-box">
<span>箱量<i style="color: red;">*</i></span>
<a-input-number v-model:value="item.ctnNum" size="small" :min="0" :max="999999999" placeholder="箱量" />
<a-input-number v-model:value="item.ctnNum" size="small" :min="0" :max="999999999" placeholder="箱量" @change="ctnNumChange($event, item)" />
</div>
<div class="ctn-price-box">
<span>报价<i style="color: red;">*</i></span>
@ -105,6 +107,7 @@
import { ref, watch, onMounted, computed } from 'vue'
import { useRoute } from 'vue-router'
import { getDictOption } from '/@/utils/dictUtil'
import emitter from '/@/utils/Bus'
import { BatchDelBusinessCtnPrice } from '/@/views/operation/seaexport/api/BookingLedger'
import { useOptionsStore } from '/@/store/modules/options'
import GoodsTable from '/@/views/baseinfo/goods/index.vue'
@ -425,48 +428,62 @@
// })
// }
})
function SetTOTALNO(SS) {
let DSS = SS.toString()
const i = DSS.indexOf('\n')
let num = 0
let strKind = ''
let enCapital = ''
if (i > 0) {
const slist = DSS.split('\n')
for (let i = 0; i < slist.length; i += 1) {
const member = slist[i]
const strNum: any = GetStringNum(member)
if (i == 0) {
strKind = member.substring(strNum.length)
}
num = parseFloat(num).add(parseFloat(strNum))
}
if (strKind !== '') {
enCapital = strKind
} else {
strKind = props.details.kindpkgs
enCapital = ToEn(num).toUpperCase() + ' ' + strKind + ' ONLY.'
}
} else {
const strNum: any = GetStringNum(DSS)
strKind = DSS.substring(strNum.length)
if (strKind !== '') {
enCapital = strKind
} else {
strKind = props.details.kindpkgs
enCapital = 'SAY:' + ToEn(strNum).toUpperCase() + ' ' + strKind + ' ONLY.'
}
}
return enCapital
}
// function SetTOTALNO(SS) {
// let DSS = SS.toString()
// const i = DSS.indexOf('\n')
// let num = 0
// let strKind = ''
// let enCapital = ''
// if (i > 0) {
// const slist = DSS.split('\n')
// for (let i = 0; i < slist.length; i += 1) {
// const member = slist[i]
// const strNum: any = GetStringNum(member)
// if (i == 0) {
// strKind = member.substring(strNum.length)
// }
// num = parseFloat(num).add(parseFloat(strNum))
// }
// if (strKind !== '') {
// enCapital = strKind
// } else {
// strKind = props.details.kindpkgs
// enCapital = ToEn(num).toUpperCase() + ' ' + strKind + ' ONLY.'
// }
// } else {
// const strNum: any = GetStringNum(DSS)
// strKind = DSS.substring(strNum.length)
// if (strKind !== '') {
// enCapital = strKind
// } else {
// strKind = props.details.kindpkgs
// enCapital = 'SAY:' + ToEn(strNum).toUpperCase() + ' ' + strKind + ' ONLY.'
// }
// }
// return enCapital
// }
//
const ctnChange = (v, item) => {
console.log(item)
let data = {}
optionsStore.getOptionsByCode('GetCtnSelectList').forEach(row => {
if (row.id == v) {
item.ctn = row.ctnName
data = row
}
})
//
emitter.emit('ctnTable', data)
}
// change
const ctnNumChange = (v, item) => {
let data = {}
optionsStore.getOptionsByCode('GetCtnSelectList').forEach(row => {
if (row.ctnName == item.ctn) {
data = row
}
})
//
emitter.emit('ctnNumTable', { item, data })
}
function ToEn(a) {
// eslint-disable-next-line no-array-constructor

@ -236,7 +236,7 @@
BatchDelOpCtnDetail,
GetCtnSelectList,
} from '/@/views/operation/seaexport/api/BookingLedger'
import { ref, Ref, watchEffect, watch, onMounted, nextTick } from 'vue'
import { ref, Ref, watchEffect, watch, onMounted, nextTick, onUnmounted } from 'vue'
import { useMessage } from '/@/hooks/web/useMessage'
const { notification, createMessage } = useMessage()
import { useRoute } from 'vue-router'
@ -245,6 +245,7 @@
import { getDictOption } from '/@/utils/dictUtil'
import { GetPackageSelectList } from '/@/views/operation/seaexport/api/BookingLedger'
import { createVNode } from 'vue'
import emitter from '/@/utils/Bus'
import { Modal } from 'ant-design-vue'
registerAllModules()
import * as XLSX from 'xlsx'
@ -269,11 +270,7 @@
if (nval.id) {
GetCtnList(nval)
}
},
{
deep: true,
immediate: true,
},
}
)
//
const hotmain = ref(null)
@ -326,7 +323,6 @@
// (process)
source: async (query, process) => {
const res = (await GetCtnSelectList({ queryKey: query }))?.data
if (!ctnDict.value.length) ctnDict.value = res
const dict = res.map((res) => {
return res.ctnName
})
@ -856,9 +852,7 @@
// )
const { data } = res
if (data.length == 0) {
list.value = [{
selectd: false
}]
list.value = [{}]
} else {
list.value = []
totalPkgs.value = 0
@ -1567,6 +1561,7 @@
}
}
function handleRefsh() {
alert(1)
GetCtnList(props.details)
}
function handleOpen() {
@ -1667,7 +1662,7 @@
fixedColumnsLeft: 1,
//
hiddenColumns: {
columns: [1, 2, 3],
columns: [1, 2, 3, 6],
indicators: true,
},
//
@ -1781,7 +1776,6 @@
}
//
if (changes[0][1] === 'ctnNum') {
console.log(ctnDict.value)
let RData = 0
list.value.forEach((e) => {
if (e.ctnNum) {
@ -1797,7 +1791,7 @@
}
})
totalCtn.value = RData
if (list.value[changes[0][0]]['teu'] && changes[0][3]) {
if (teu && changes[0][3]) {
list.value[changes[0][0]]['teu'] = parseInt(teu) * parseInt(changes[0][3])
}
}
@ -1990,6 +1984,60 @@
}
}
})
//
emitter.on('ctnNumTable', (data) => {
list.value.forEach(item => {
if (item.ctn == data.item.ctn) {
item.ctnNum = data.item.ctnNum
if (data.data.teu) {
item['teu'] = Number(data.data.teu) * (Number(item.ctnNum) || 0)
}
}
})
})
//
emitter.on('ctnTable', (data) => {
const cList = list.value
if (cList && cList.length) {
let flag = true
cList.forEach(item => {
if (item.ctn == data.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
})
}
}
} else {
cList.push({
ctnCode: data.ediCode,
ctn: data.ctnName,
size: data.ctnSize
})
}
})
})
onUnmounted(() => {
emitter.off('ctnTable')
emitter.off('ctnNumTable')
})
defineExpose({
list,

@ -185,11 +185,11 @@
templateName: '',
content: ''
}
if (key == 'shipper') {
if (key == '2') {
postData.id = model.shipperId
postData.templateName = model.shipper
postData.content = model.shipperContent
} else if (key == 'consignee') {
} else if (key == '1') {
postData.id = model.consigneeId
postData.templateName = model.consignee
postData.content = model.consigneeContent
@ -208,9 +208,9 @@
//
temFlag.value = true
let content = ''
if (key == 'shipper') {
if (key == '2') {
content = model.shipperContent
} else if (key == 'consignee') {
} else if (key == '1') {
content = model.consigneeContent
} else {
content = model.notifyPartyContent

Loading…
Cancel
Save