11.5禅道

feature-JimuReport-1106-yjl
lijingjia 4 weeks ago
parent b0bf774fe3
commit 5f3ac5831e

@ -261,6 +261,13 @@
type: String, type: String,
default: null, default: null,
}, },
//
printData: {
type: Array,
default: () => {
return []
}
},
// //
create: { create: {
type: Function, type: Function,
@ -312,7 +319,7 @@
const saveFlag = ref(false) const saveFlag = ref(false)
const copyFlag = ref(false) const copyFlag = ref(false)
const openPrint = () => { const openPrint = () => {
dsPrint.value.init() dsPrint.value.init(props.printData)
} }
// //
const copyHandle = async () => { const copyHandle = async () => {

@ -178,6 +178,7 @@
import HColSet from '/@/components/HColSet/index.vue' import HColSet from '/@/components/HColSet/index.vue'
import { ApplyDeletion, GetPrintInfo, ApplyBusinessAudit, Withdraw, WithdrawBusiness } from './api' import { ApplyDeletion, GetPrintInfo, ApplyBusinessAudit, Withdraw, WithdrawBusiness } from './api'
import { useModal } from '/@/components/Modal' import { useModal } from '/@/components/Modal'
import { clearCopyRow } from './components/hooks'
// //
import DsPrint from '/@/components/Print/index.vue' import DsPrint from '/@/components/Print/index.vue'
const [registerModal, { openModal }] = useModal() const [registerModal, { openModal }] = useModal()
@ -243,16 +244,7 @@
if (needCopy.length == 0) return createMessage.warning('请勾选要复制的费用!') if (needCopy.length == 0) return createMessage.warning('请勾选要复制的费用!')
needCopy.forEach(item => { needCopy.forEach(item => {
item.selected = false item.selected = false
const deepCopyRow = JSON.parse(JSON.stringify(item)) const deepCopyRow = clearCopyRow(JSON.parse(JSON.stringify(item)))
deepCopyRow.id = ''
deepCopyRow.feeStatus = 1
deepCopyRow.feeStatusText = '录入状态'
deepCopyRow.settlementAmount = null
deepCopyRow.orderInvoiceAmount = null
deepCopyRow.invoiceAmountRest = null
deepCopyRow.invoiceAmount = null
deepCopyRow.auditOperator = null
deepCopyRow.auditDate = null
props.data.push(deepCopyRow) props.data.push(deepCopyRow)
}) })
} }

@ -0,0 +1,26 @@
/*
* @Desc:
* @Author: lijj
* @Date: 2024-11-05 14:29:20
*/
// 复制数据,清空指定字段
export function clearCopyRow(obj) {
obj.id = null
obj.feeStatus = 1
obj.feeStatusText = '录入状态'
obj.settlementAmount = null
obj.orderInvoiceAmount = null
obj.invoiceAmountRest = null
obj.invoiceAmount = null
obj.auditOperator = null
obj.auditDate = null
obj.createByName = null
obj.createTime = null
obj.createBy = null
obj.debitNo = null
obj.updateTime = null
obj.updateByName = null
obj.updateBy = null
return obj
}

@ -64,6 +64,8 @@
// //
import { GetSupplierAndClientListByCode } from '/@/api/common' import { GetSupplierAndClientListByCode } from '/@/api/common'
import { useMessage } from '/@/hooks/web/useMessage' import { useMessage } from '/@/hooks/web/useMessage'
//
import { clearCopyRow } from './components/hooks'
// //
import { getDictOption } from '/@/utils/dictUtil' import { getDictOption } from '/@/utils/dictUtil'
// handsontable hooks // handsontable hooks
@ -72,6 +74,7 @@
import { GetFeeCurrencyExchangeList } from '/@/views/fee/exchangeRate/api' import { GetFeeCurrencyExchangeList } from '/@/views/fee/exchangeRate/api'
import { updateColumns } from '/@/hooks/web/common' import { updateColumns } from '/@/hooks/web/common'
import { useAppStore } from '/@/store/modules/app' import { useAppStore } from '/@/store/modules/app'
import { Item } from 'ant-design-vue/lib/menu'
const appStore = useAppStore() const appStore = useAppStore()
const { createMessage } = useMessage() const { createMessage } = useMessage()
defineComponent({ defineComponent({
@ -261,9 +264,10 @@
visible: true, visible: true,
source: async (query, process) => { source: async (query, process) => {
if (unitDict.value && unitDict.value.length) { if (unitDict.value && unitDict.value.length) {
const dict = unitDict.value.map((item) => { let dict = unitDict.value.map((item) => {
return item.label return item.label
}) })
dict = Array.from(new Set(dict))
process(dict) process(dict)
} }
}, },
@ -612,7 +616,9 @@
if (props?.details?.ctnInfo && props?.details?.ctnInfo?.length) { if (props?.details?.ctnInfo && props?.details?.ctnInfo?.length) {
list.value[changes[0][0]]['unitText'] = props.details.ctnInfo[0].ctn list.value[changes[0][0]]['unitText'] = props.details.ctnInfo[0].ctn
list.value[changes[0][0]]['unit'] = props.details.ctnInfo[0].ctnCode list.value[changes[0][0]]['unit'] = props.details.ctnInfo[0].ctnCode
list.value[changes[0][0]]['quantity'] = props.details.ctnInfo[0].ctnNum GetUnitSelectInfo({ code: list.value[changes[0][0]]['unitText'], businessId: props.id, businessType: props.type }).then(res => {
list.value[changes[0][0]]['quantity'] = res.data.quantity
})
} }
} else if (dict.defaultUnit == 'CNTR') { } else if (dict.defaultUnit == 'CNTR') {
// //
@ -632,10 +638,15 @@
GetUnitSelectInfo({ code: dict?.name, businessId: props.id, businessType: props.type }).then(res => { GetUnitSelectInfo({ code: dict?.name, businessId: props.id, businessType: props.type }).then(res => {
list.value[changes[0][0]]['quantity'] = res.data.quantity list.value[changes[0][0]]['quantity'] = res.data.quantity
}) })
} else {
if (list.value[changes[0][0]]['unit'] == 'Bill') {
// 1()
list.value[changes[0][0]]['quantity'] = 1
} else { } else {
list.value[changes[0][0]]['quantity'] = 0 list.value[changes[0][0]]['quantity'] = 0
} }
} }
}
// //
getDictOption('djy_cust_prop').then((res) => { getDictOption('djy_cust_prop').then((res) => {
const item = res.filter((item) => { const item = res.filter((item) => {
@ -914,9 +925,7 @@
if (v === 1) { if (v === 1) {
let flag = false let flag = false
selectData.forEach((item) => { selectData.forEach((item) => {
item.id = '' item = clearCopyRow(Item)
item.feeStatus = 1
item.feeStatusText = '录入状态'
if (props.tbType == 'receive') { if (props.tbType == 'receive') {
item.feeType = 2 item.feeType = 2
} else { } else {
@ -965,9 +974,7 @@
} else { } else {
// //
selectData.forEach((item) => { selectData.forEach((item) => {
item.id = '' item = clearCopyRow(Item)
item.feeStatus = 1
item.feeStatusText = '录入状态'
item.selected = false item.selected = false
if (props.tbType == 'receive') { if (props.tbType == 'receive') {
item.feeType = 2 item.feeType = 2

@ -130,7 +130,7 @@
const init = (v) => { const init = (v) => {
printData.value = v printData.value = v
visible.value = true visible.value = true
if (v) { if (v && v.length) {
// ids // ids
ids.value = v.map((item) => { ids.value = v.map((item) => {
return item.id return item.id
@ -149,17 +149,17 @@
ConditionalList: [ ConditionalList: [
{ {
Key: 1, Key: 1,
Value: { FieldName: 'carrierId', FieldValue: props.cid, ConditionalType: 0 }, Value: { FieldName: 'carrierId', FieldValue: props.cid, ConditionalType: 0 }
}, },
{ {
Key: 1, Key: 1,
Value: { FieldName: 'carrierId', FieldValue: 0, ConditionalType: 11 }, Value: { FieldName: 'carrierId', FieldValue: 0, ConditionalType: 11 }
}, }
], ]
}, }
}, }
], ]
}, }
] ]
// if (temCodes.length) { // if (temCodes.length) {
// const ConditionalList = { // const ConditionalList = {
@ -264,6 +264,7 @@
}) })
}) })
} else { } else {
console.log(item)
if (item.isUseDataSource) { if (item.isUseDataSource) {
const userStore = useUserStore() const userStore = useUserStore()
const postData = { const postData = {

@ -10,12 +10,12 @@
<!-- 保存按钮组 --> <!-- 保存按钮组 -->
<ActionBar <ActionBar
:id="route.query.id" :id="route.query.id"
code="sea_freight_export" code="fee_payapplication"
name="hyck" name="hyck"
:save="save" :save="save"
:submit="submit" :submit="submit"
:delete="deleteItem" :delete="deleteItem"
:paramJsonStr="'{id:' + route.query.id + '}'" :printData="feeData"
:showBtns="['save', 'delete', 'submit', 'print', 'next', 'last']" :showBtns="['save', 'delete', 'submit', 'print', 'next', 'last']"
layout="horizontal" layout="horizontal"
></ActionBar> ></ActionBar>

@ -664,15 +664,13 @@ export const formSchema3: FormSchema[] = [
label: '总件数', label: '总件数',
field: 'pkgs', field: 'pkgs',
component: 'Input', component: 'Input',
colProps: { span: 12 }, colProps: { span: 12 }
dynamicDisabled: true,
}, },
{ {
label: '包装', label: '包装',
field: 'kindPkgsName', field: 'kindPkgsName',
component: 'Input', component: 'Input',
colProps: { span: 12 }, colProps: { span: 12 }
dynamicDisabled: true,
}, },
{ {
label: '', label: '',

@ -455,7 +455,6 @@
res.data.stlDate = res.data.stlDate.split(' ')[0] res.data.stlDate = res.data.stlDate.split(' ')[0]
} }
bookingDetails.value = res.data bookingDetails.value = res.data
console.log(bookingDetails.value)
// //
inPageLoading.value = false inPageLoading.value = false
}) })
@ -567,6 +566,18 @@
} }
} }
} }
// code
let serviceItem = ''
const seriveItems = RefrightContent.value.bookingServiceItem
if (seriveItems && seriveItems.length) {
const sitems = seriveItems.filter(item => {
return item.isYield == true
})
const codes = sitems.map(item => {
return item.projectCode
})
serviceItem = String(codes)
}
// post // post
const postData = { const postData = {
...baseinfoForm, ...baseinfoForm,
@ -577,7 +588,10 @@
...customerForm, ...customerForm,
...noteForm, ...noteForm,
ediInfo: ediFrom, ediInfo: ediFrom,
ctnInfo ctnInfo,
soRemark: ediFrom.soRemark,
closeDocRemark: ediFrom.closeDocRemark,
serviceItem
} }
// //
if (postData.closingDate && postData.closingDate.length == 13) { if (postData.closingDate && postData.closingDate.length == 13) {
@ -998,6 +1012,7 @@
Withdraw(postData).then(res => { Withdraw(postData).then(res => {
if (res.succeeded) { if (res.succeeded) {
createMessage.success('撤销成功!') createMessage.success('撤销成功!')
RefrightContent.value.getStatusServiceList(1, null)
} }
init() init()
}) })
@ -1026,10 +1041,10 @@
businessType: '1', businessType: '1',
taskTypeName: type || route.query.status taskTypeName: type || route.query.status
} }
completeTask(type, true) await completeTask(type, true)
if (type) postData['hasCabin'] = true if (type) postData['hasCabin'] = true
loading.value = true loading.value = true
await CreateTask(postData).then(res => { CreateTask(postData).then(res => {
loading.value = false loading.value = false
if (!b) createMessage.success(res.message) if (!b) createMessage.success(res.message)
}).catch(() => { }).catch(() => {
@ -1181,12 +1196,16 @@
if (res.data) { if (res.data) {
// //
const shippingSpaceType = RefbasicInfo.value.formData.shippingSpaceType const shippingSpaceType = RefbasicInfo.value.formData.shippingSpaceType
if (shippingSpaceType == 'xc') { if (shippingSpaceType == 'xc' && route.query.status == 'WAIT_ORDER_AUDIT') {
// //
sspace.value.init() sspace.value.init()
} else { } else {
// //
if (route.query.status == 'WAIT_ORDER_AUDIT') {
seaExportTaskAudit(remark, true) seaExportTaskAudit(remark, true)
} else {
seaExportTaskAudit(remark, false)
}
} }
} else { } else {
// //
@ -1231,12 +1250,14 @@
return createMessage.warning('请填写订舱编号或主提单号!') return createMessage.warning('请填写订舱编号或主提单号!')
} }
} }
return new Promise((resolve) => {
if (status == 'ORDER_AUDIT_REJECTED') { if (status == 'ORDER_AUDIT_REJECTED') {
SubmitAudit({ SubmitAudit({
businessId: id.value, businessId: id.value,
businessType: 1, businessType: 1,
taskTypeName: 'WAIT_ORDER_AUDIT' taskTypeName: 'WAIT_ORDER_AUDIT'
}).then(res => { }).then(res => {
resolve(res)
tabStore.closeTabByKey(fullPath, router) tabStore.closeTabByKey(fullPath, router)
}) })
} else if (status == 'WAIT_SI_REJECT') { } else if (status == 'WAIT_SI_REJECT') {
@ -1245,6 +1266,7 @@
businessType: 1, businessType: 1,
taskTypeName: 'WAIT_SI' taskTypeName: 'WAIT_SI'
}).then(res => { }).then(res => {
resolve(res)
tabStore.closeTabByKey(fullPath, router) tabStore.closeTabByKey(fullPath, router)
}) })
} else { } else {
@ -1258,9 +1280,11 @@
if (type) postData.autoCreateNext = false if (type) postData.autoCreateNext = false
SetTaskStatus(postData).then(res => { SetTaskStatus(postData).then(res => {
if (!b) createMessage.success('操作成功!') if (!b) createMessage.success('操作成功!')
resolve(res)
tabStore.closeTabByKey(fullPath, router) tabStore.closeTabByKey(fullPath, router)
}) })
} }
})
} }
watch( watch(
() => copyFlag, () => copyFlag,

@ -227,7 +227,7 @@
const data = getFieldsValue2() const data = getFieldsValue2()
console.log(data) console.log(data)
let gData = [{}] let gData = [{}]
if (data.ctnGoodsInfo.length != 0) gData = data.ctnGoodsInfo if (data?.ctnGoodsInfo?.length != 0) gData = data.ctnGoodsInfo
ctnGoodsInfo.value = gData ctnGoodsInfo.value = gData
} }
const handleOk = () => { const handleOk = () => {

@ -46,7 +46,11 @@
() => props.details, () => props.details,
(nval) => { (nval) => {
if (nval.ediInfo) { if (nval.ediInfo) {
setFieldsValue(nval.ediInfo) setFieldsValue({
...nval.ediInfo,
soRemark: props.details.soRemark,
closeDocRemark: props.details.closeDocRemark
})
} }
} }
) )
@ -73,7 +77,9 @@
}) })
}) })
setFieldsValue({ setFieldsValue({
...props.details.ediInfo ...props.details.ediInfo,
soRemark: props.details.soRemark,
closeDocRemark: props.details.closeDocRemark
}) })
}) })
defineExpose({ defineExpose({

@ -1490,11 +1490,9 @@
]) ])
// 退 // 退
const returnCabin = () => { const returnCabin = () => {
// 退 // 退
const etd = props.details.etd if (!props?.details?.isBooking) {
const now = new Date() return createMessage.warning('该订单暂未订舱!')
if (!props?.details?.isBooking || new Date(etd) < now) {
return createMessage.warning('未订舱或已开船不可退舱!')
} }
returnCabinFlag.value = true returnCabinFlag.value = true
} }

@ -1116,7 +1116,9 @@
init, init,
open, open,
flag, flag,
cancelGoodsStatus cancelGoodsStatus,
getStatusServiceList,
bookingServiceItem
}) })
</script> </script>
<style lang="less"> <style lang="less">

Loading…
Cancel
Save