海运出口 接口默认去除, 箱信息 全选

szh-new
张同海 6 months ago
parent eb30778ccf
commit 5b14d32101

@ -11,7 +11,7 @@
<ActionBar <ActionBar
:data="list" :data="list"
:row="row" :row="row"
:tbType='tbType' :tbType="tbType"
@save="save" @save="save"
@delete="deleteRow" @delete="deleteRow"
@cancel="cancelEdit" @cancel="cancelEdit"
@ -21,19 +21,32 @@
></ActionBar> ></ActionBar>
</div> </div>
<div> <div>
<input class="ds-tb-check" type="checkbox" v-model="allCheck" :indeterminate="someCheck"> <input class="ds-tb-check" type="checkbox" v-model="allCheck" :indeterminate="someCheck" />
<hot-table ref="hotTb" :data="list" :settings="settings"></hot-table> <hot-table ref="hotTb" :data="list" :settings="settings"></hot-table>
</div> </div>
</div> </div>
</a-spin> </a-spin>
</template> </template>
<script lang="ts" setup> <script lang="ts" setup>
import { defineProps, defineEmits, ref, watch, watchEffect, computed, unref, defineComponent, onMounted, reactive, nextTick, provide } from 'vue' import {
defineProps,
defineEmits,
ref,
watch,
watchEffect,
computed,
unref,
defineComponent,
onMounted,
reactive,
nextTick,
provide,
} from 'vue'
// //
import { GetFeeCurrencySelectList, GetFeeCodeSelectList } from '/@/api/common' import { GetFeeCurrencySelectList, GetFeeCodeSelectList } from '/@/api/common'
import { HotTable } from '@handsontable/vue3'; import { HotTable } from '@handsontable/vue3'
import { registerAllModules } from 'handsontable/registry'; import { registerAllModules } from 'handsontable/registry'
import 'handsontable/dist/handsontable.full.min.css'; import 'handsontable/dist/handsontable.full.min.css'
// //
import ActionBar from './actionBar.vue' import ActionBar from './actionBar.vue'
import { feeStatusList } from './columns' import { feeStatusList } from './columns'
@ -43,22 +56,22 @@
import { useMessage } from '/@/hooks/web/useMessage' import { useMessage } from '/@/hooks/web/useMessage'
const { createMessage } = useMessage() const { createMessage } = useMessage()
defineComponent({ defineComponent({
HotTable HotTable,
}) })
registerAllModules() registerAllModules()
const props = defineProps({ const props = defineProps({
// //
tbType: { tbType: {
type: String, type: String,
default: '' default: '',
}, },
// //
broData: { broData: {
type: Array, type: Array,
default: () => { default: () => {
return [] return []
} },
} },
}) })
const emits = defineEmits(['broInsert']) const emits = defineEmits(['broInsert'])
// //
@ -83,7 +96,7 @@
feeCode: '', feeCode: '',
feeName: '', feeName: '',
feeEnName: '', feeEnName: '',
feeType: props.tbType == 'receive' ? 1 : 2 feeType: props.tbType == 'receive' ? 1 : 2,
} }
// //
const list = ref([]) const list = ref([])
@ -101,23 +114,27 @@
type: 'checkbox', type: 'checkbox',
title: ' ', title: ' ',
width: 32, width: 32,
className: "htCenter", className: 'htCenter',
readOnly: false readOnly: false,
}, { },
{
title: '序号', title: '序号',
width: 130, width: 130,
readOnly: true readOnly: true,
}, { },
{
title: '业务编号', title: '业务编号',
width: 130, width: 130,
data: 'businessId', data: 'businessId',
readOnly: true readOnly: true,
}, { },
{
title: '费用状态', title: '费用状态',
width: 120, width: 120,
data: 'feeStatusText', data: 'feeStatusText',
readOnly: true readOnly: true,
}, { },
{
title: props.tbType == 'receive' ? '应收费用名称' : '应付费用名称', title: props.tbType == 'receive' ? '应收费用名称' : '应付费用名称',
width: 130, width: 130,
data: 'feeName', data: 'feeName',
@ -126,12 +143,13 @@
source: async (query, process) => { source: async (query, process) => {
const res = feeDict.value.length ? feeDict.value : (await GetFeeCodeSelectList())?.data const res = feeDict.value.length ? feeDict.value : (await GetFeeCodeSelectList())?.data
if (!feeDict.value.length) feeDict.value = res if (!feeDict.value.length) feeDict.value = res
const dict = res.map(res => { const dict = res.map((res) => {
return res.name return res.name
}) })
process(dict) process(dict)
} },
}, { },
{
title: '费用英文名称', title: '费用英文名称',
width: 130, width: 130,
data: 'feeEnName', data: 'feeEnName',
@ -139,86 +157,97 @@
source: async (query, process) => { source: async (query, process) => {
const res = feeDict.value.length ? feeDict.value : (await GetFeeCodeSelectList())?.data const res = feeDict.value.length ? feeDict.value : (await GetFeeCodeSelectList())?.data
if (!feeDict.value.length) feeDict.value = res if (!feeDict.value.length) feeDict.value = res
const dict = res.map(res => { const dict = res.map((res) => {
return res.enName return res.enName
}) })
process(dict) process(dict)
} },
}, { },
{
title: '客户类别', title: '客户类别',
width: 130, width: 130,
data: 'customerTypeText', data: 'customerTypeText',
type: 'dropdown', type: 'dropdown',
source: async (query, process) => { source: async (query, process) => {
const results = await getDictOption('djy_cust_prop') const results = await getDictOption('djy_cust_prop')
const dict = results.map(item => { const dict = results.map((item) => {
return item.name return item.name
}) })
process(dict) process(dict)
} },
}, { },
{
title: '单位标准', title: '单位标准',
width: 130, width: 130,
data: 'unitText', data: 'unitText',
type: 'dropdown', type: 'dropdown',
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 => { const dict = unitDict.value.map((item) => {
return item.name return item.name
}) })
process(dict) process(dict)
} else { } else {
const results = await feeUnitDict() const results = await feeUnitDict()
unitDict.value = results unitDict.value = results
const dict = results.map(item => { const dict = results.map((item) => {
return item.name return item.name
}) })
process(dict) process(dict)
} }
} },
}, { },
{
title: '不含税单价', title: '不含税单价',
width: 120, width: 120,
data: 'noTaxPrice', data: 'noTaxPrice',
type: 'numeric' type: 'numeric',
}, { },
{
title: '单价', title: '单价',
width: 120, width: 120,
data: 'unitPrice', data: 'unitPrice',
type: 'numeric', type: 'numeric',
format: '0.00' format: '0.00',
}, { },
{
title: '数量', title: '数量',
width: 120, width: 120,
data: 'quantity', data: 'quantity',
type: 'numeric', type: 'numeric',
format: '0' format: '0',
}, { },
{
title: '金额', title: '金额',
width: 120, width: 120,
data: 'amount', data: 'amount',
type: 'numeric' type: 'numeric',
}, { },
{
title: '不含税金额', title: '不含税金额',
width: 120, width: 120,
data: 'noTaxAmount', data: 'noTaxAmount',
type: 'numeric', type: 'numeric',
format: '0.00' format: '0.00',
}, { },
{
title: '税率', title: '税率',
width: 120, width: 120,
data: 'taxRate', data: 'taxRate',
type: 'numeric' type: 'numeric',
}, { },
{
title: '汇率', title: '汇率',
width: 120, width: 120,
data: 'exchangeRate', data: 'exchangeRate',
type: 'numeric' type: 'numeric',
}, { },
{
title: '备注', title: '备注',
width: 120, width: 120,
data: 'note' data: 'note',
}, { },
{
title: '币别', title: '币别',
width: 80, width: 80,
data: 'currency', data: 'currency',
@ -228,105 +257,123 @@
process(currencyDict.value) process(currencyDict.value)
} else { } else {
const results = await GetFeeCurrencySelectList() const results = await GetFeeCurrencySelectList()
const dict = results.data?.map(res => { const dict = results.data?.map((res) => {
return res.codeName return res.codeName
}) })
currencyDict.value = dict currencyDict.value = dict
process(dict) process(dict)
} }
} },
}, { },
{
title: '销项税率', title: '销项税率',
width: 100, width: 100,
data: 'accTaxRate', data: 'accTaxRate',
type: 'numeric' type: 'numeric',
}, { },
{
title: '销项税额', title: '销项税额',
width: 100, width: 100,
data: 'accTaxAmount', data: 'accTaxAmount',
readOnly: true readOnly: true,
}, { },
{
title: '销项金额', title: '销项金额',
width: 100, width: 100,
data: 'accAmount', data: 'accAmount',
readOnly: true readOnly: true,
}, { },
{
title: '是否机密', title: '是否机密',
width: 100, width: 100,
data: 'isOpen', data: 'isOpen',
type: 'checkbox' type: 'checkbox',
}, { },
{
title: '是否垫付', title: '是否垫付',
width: 100, width: 100,
data: 'isAdvancedPay', data: 'isAdvancedPay',
type: 'checkbox' type: 'checkbox',
}, { },
{
title: '是否禁开发票', title: '是否禁开发票',
width: 120, width: 120,
data: 'isInvoice', data: 'isInvoice',
type: 'checkbox' type: 'checkbox',
}, { },
{
title: 'FRT', title: 'FRT',
width: 120, width: 120,
data: 'feeFrt', data: 'feeFrt',
type: 'dropdown', type: 'dropdown',
source: ['PP', 'CC'] source: ['PP', 'CC'],
}, { },
{
title: '录入人', title: '录入人',
width: 100, width: 100,
data: 'submitBy', data: 'submitBy',
readOnly: true readOnly: true,
}, { },
{
title: '录入日期', title: '录入日期',
width: 100, width: 100,
data: 'createTime', data: 'createTime',
readOnly: true readOnly: true,
}, { },
{
title: '结算金额', title: '结算金额',
width: 100, width: 100,
data: 'settlementAmount', data: 'settlementAmount',
readOnly: true readOnly: true,
}, { },
{
title: '已开票金额', title: '已开票金额',
width: 100, width: 100,
data: 'invoiceAmount', data: 'invoiceAmount',
readOnly: true readOnly: true,
}, { },
{
title: '对账编号', title: '对账编号',
width: 100, width: 100,
data: 'debitNo', data: 'debitNo',
readOnly: true readOnly: true,
}, { },
{
title: '修改人', title: '修改人',
width: 100, width: 100,
data: 'submitBy', data: 'submitBy',
readOnly: true readOnly: true,
}, { },
{
title: '修改日期', title: '修改日期',
width: 100, width: 100,
data: 'createTime', data: 'createTime',
readOnly: true readOnly: true,
}, { },
{
title: '发票申请金额', title: '发票申请金额',
width: 100, width: 100,
data: 'orderInvoiceAmount', data: 'orderInvoiceAmount',
readOnly: true readOnly: true,
}, { },
{
title: '未开票金额', title: '未开票金额',
width: 100, width: 100,
data: 'debitNo', data: 'debitNo',
readOnly: true readOnly: true,
}, { },
{
title: '审核人', title: '审核人',
width: 100, width: 100,
data: 'auditOperator', data: 'auditOperator',
readOnly: true readOnly: true,
}, { },
{
title: '审核日期', title: '审核日期',
width: 100, width: 100,
data: 'auditDate', data: 'auditDate',
readOnly: true readOnly: true,
} },
] ]
// //
const settings = { const settings = {
@ -340,7 +387,7 @@
// //
hiddenColumns: { hiddenColumns: {
columns: [1], columns: [1],
indicators: true indicators: true,
}, },
// //
enterMoves: 'row', enterMoves: 'row',
@ -369,11 +416,11 @@
// //
if (source === 'edit' || source === 'Autofill.fill' || source === 'CopyPaste.paste') { if (source === 'edit' || source === 'Autofill.fill' || source === 'CopyPaste.paste') {
let dict = {} let dict = {}
changes.forEach(res => { changes.forEach((res) => {
// //
if (res[1] === 'feeName') { if (res[1] === 'feeName') {
// //
const item = feeDict.value.filter(item => { const item = feeDict.value.filter((item) => {
return item.name === changes[0][3] return item.name === changes[0][3]
}) })
if (item) dict = item[0] if (item) dict = item[0]
@ -393,12 +440,11 @@
}) })
// //
if (changes[0][1] === 'feeEnName') { if (changes[0][1] === 'feeEnName') {
} }
// //
if (changes[0][1] === 'customerTypeText') { if (changes[0][1] === 'customerTypeText') {
getDictOption('djy_cust_prop').then(res => { getDictOption('djy_cust_prop').then((res) => {
const item = res.filter(item => { const item = res.filter((item) => {
return item.name === changes[0][3] return item.name === changes[0][3]
}) })
if (item) dict = item[0] if (item) dict = item[0]
@ -407,7 +453,7 @@
} }
// //
if (changes[0][1] === 'unitText') { if (changes[0][1] === 'unitText') {
const item = unitDict.value.filter(item => { const item = unitDict.value.filter((item) => {
return item.name === changes[0][3] return item.name === changes[0][3]
}) })
if (item) dict = item[0] if (item) dict = item[0]
@ -415,7 +461,7 @@
} }
// //
if (changes[0][1] === 'currencyName') { if (changes[0][1] === 'currencyName') {
const item = currencyDict.value.filter(item => { const item = currencyDict.value.filter((item) => {
return item.name === changes[0][3] return item.name === changes[0][3]
}) })
if (item) dict = item[0] if (item) dict = item[0]
@ -426,20 +472,24 @@
// //
if (changes[0][1] === 'noTaxPrice') { if (changes[0][1] === 'noTaxPrice') {
// //
list.value[index].unitPrice = (changes[0][3] || 0) * ((list.value[index].taxRate || 0) / 100 + 1) list.value[index].unitPrice =
(changes[0][3] || 0) * ((list.value[index].taxRate || 0) / 100 + 1)
// //
list.value[index].amount = (list.value[index].unitPrice || 0) * (list.value[index].quantity || 0) list.value[index].amount =
(list.value[index].unitPrice || 0) * (list.value[index].quantity || 0)
// //
list.value[index].noTaxAmount = (changes[0][3] || 0) * (list.value[index].quantity || 0) list.value[index].noTaxAmount = (changes[0][3] || 0) * (list.value[index].quantity || 0)
} }
// //
if (changes[0][1] === 'unitPrice') { if (changes[0][1] === 'unitPrice') {
// //
list.value[index].noTaxPrice = (changes[0][3] || 0) / ((list.value[index].taxRate || 0) / 100 + 1) list.value[index].noTaxPrice =
(changes[0][3] || 0) / ((list.value[index].taxRate || 0) / 100 + 1)
// //
list.value[index].amount = (changes[0][3] || 0) * (list.value[index].quantity || 0) list.value[index].amount = (changes[0][3] || 0) * (list.value[index].quantity || 0)
// //
list.value[index].noTaxAmount = (list.value[index].noTaxPrice || 0) * (list.value[index].quantity || 0) list.value[index].noTaxAmount =
(list.value[index].noTaxPrice || 0) * (list.value[index].quantity || 0)
} }
// //
if (changes[0][1] === 'quantity') { if (changes[0][1] === 'quantity') {
@ -451,26 +501,30 @@
// //
if (changes[0][1] === 'taxRate') { if (changes[0][1] === 'taxRate') {
// //
list.value[index].noTaxPrice = ((list.value[index].unitPrice || 0) / ((changes[0][3] || 0) / 100 + 1)) list.value[index].noTaxPrice =
(list.value[index].unitPrice || 0) / ((changes[0][3] || 0) / 100 + 1)
// //
list.value[index].noTaxAmount = (list.value[index].noTaxPrice || 0) * (list.value[index].quantity || 0) list.value[index].noTaxAmount =
} (list.value[index].noTaxPrice || 0) * (list.value[index].quantity || 0)
} }
} }
},
} }
// //
const save = () => { const save = () => {
const postData = { const postData = {
BusinessId: '1780891904372772864', BusinessId: '1780891904372772864',
items: list.value.filter(res => { items: list.value.filter((res) => {
return res.feeStatus == 1 return res.feeStatus == 1
}) }),
} }
loading.value = true loading.value = true
SubmitFee(postData).then(res => { SubmitFee(postData)
.then((res) => {
loading.value = false loading.value = false
createMessage.success(res.message) createMessage.success(res.message)
}).catch(() => { })
.catch(() => {
loading.value = false loading.value = false
}) })
} }
@ -482,7 +536,7 @@
} }
// //
const history = (v) => { const history = (v) => {
v.forEach(row => { v.forEach((row) => {
list.value.push(row) list.value.push(row)
}) })
} }
@ -492,20 +546,20 @@
// //
if (v === 1) { if (v === 1) {
let flag = false let flag = false
selectData.forEach(item => { selectData.forEach((item) => {
item.id = '' item.id = ''
item.feeStatus = 1 item.feeStatus = 1
item.feeStatusText = '录入状态' item.feeStatusText = '录入状态'
if (item.selected) flag = true if (item.selected) flag = true
}) })
if (!flag) return createMessage.warning('请勾选要复制的数据!') if (!flag) return createMessage.warning('请勾选要复制的数据!')
const res = selectData.filter(item => { const res = selectData.filter((item) => {
return item.selected return item.selected
}) })
emits('broInsert', res) emits('broInsert', res)
} else { } else {
// //
selectData.forEach(item => { selectData.forEach((item) => {
item.id = '' item.id = ''
item.feeStatus = 1 item.feeStatus = 1
item.feeStatusText = '录入状态' item.feeStatusText = '录入状态'
@ -518,7 +572,7 @@
// //
const deleteRow = async () => { const deleteRow = async () => {
const ids = [] const ids = []
list.value.forEach(item => { list.value.forEach((item) => {
if (item.selected && item.id) ids.push(item.id) if (item.selected && item.id) ids.push(item.id)
}) })
if (ids.length) { if (ids.length) {
@ -527,7 +581,7 @@
loading.value = false loading.value = false
createMessage.success(data.message) createMessage.success(data.message)
} }
const res = list.value.filter(item => { const res = list.value.filter((item) => {
return !item.selected return !item.selected
}) })
list.value = res list.value = res
@ -540,14 +594,15 @@
pageCondition: { pageCondition: {
pageIndex: 1, pageIndex: 1,
pageSize: 1000, pageSize: 1000,
sortConditions: [] sortConditions: [],
}, },
queryCondition: JSON.stringify([ queryCondition: JSON.stringify([
{ FieldName: 'BusinessId', FieldValue: '1780891904372772864', ConditionalType: 1 }, { FieldName: 'BusinessId', FieldValue: '1780891904372772864', ConditionalType: 1 },
{ FieldName: 'FeeType', FieldValue: props.tbType == 'receive' ? 1 : 2, ConditionalType: 1 } { FieldName: 'FeeType', FieldValue: props.tbType == 'receive' ? 1 : 2, ConditionalType: 1 },
]) ]),
} }
GetList(postData).then(res => { GetList(postData)
.then((res) => {
loading.value = false loading.value = false
const { data } = res const { data } = res
data.forEach((item, index) => { data.forEach((item, index) => {
@ -572,11 +627,12 @@
} else { } else {
return return
} }
} },
}) })
} }
hotTb.value.hotInstance.loadData(data) hotTb.value.hotInstance.loadData(data)
}).catch(() => { })
.catch(() => {
loading.value = false loading.value = false
}) })
} }
@ -601,24 +657,25 @@
watchEffect(() => { watchEffect(() => {
// //
if (allCheck.value) { if (allCheck.value) {
list.value.forEach(item => { list.value.forEach((item) => {
item.selected = true item.selected = true
}) })
} else { } else {
// //
list.value.forEach(item => { list.value.forEach((item) => {
item.selected = false item.selected = false
}) })
} }
props.broData.forEach(item => { props.broData.forEach((item) => {
list.value.push(item) list.value.push(item)
}) })
}) })
watch( watch(
list.value, (val) => { list.value,
(val) => {
let a = 0 let a = 0
let b = 0 let b = 0
val.forEach(item => { val.forEach((item) => {
if (item.selected) { if (item.selected) {
a += 1 a += 1
} else { } else {
@ -636,13 +693,14 @@
} else { } else {
someCheck.value = false someCheck.value = false
} }
}, { },
deep: true {
} deep: true,
},
) )
</script> </script>
<style lang='scss'> <style lang="scss">
.cost-entry-receive { .cost-entry-receive {
.flex { .flex {
padding: 5px; padding: 5px;
@ -651,7 +709,7 @@
padding: 0; padding: 0;
margin-top: 10px; margin-top: 10px;
.hot-green { .hot-green {
background: #9ACD32; background: #9acd32;
} }
} }
.handsontableInput { .handsontableInput {

@ -1,231 +1,4 @@
{
"code": 0, Error converting value {null} to type 'System.Int32'
"multiCode": "Data_Query_Success", Path 'preRecord', line 1, position 1531.|Error converting value {null} to type 'System.Int32'
"count": 0, Path 'customsNum', line 1, position 1328.
"message": "查询成功",
"succeeded": true,
"data": {
"ediInfo": null,
"id": "1793191584557305856",
"parentId": "0",
"businessStatus": 0,
"billFeeStatus": 0,
"businessStatusName": null,
"billFeeStatusName": null,
"billFeeStatusTime": "1900-01-01 00:00:00",
"feeStatus": 0,
"isBusinessLocking": false,
"isFeeLocking": false,
"businessDate": "2024-05-22 16:06:04",
"accountDate": "2024-10",
"mblno": "05221605",
"hblno": "05221605",
"customerNo": "2405220004",
"transNo": "",
"customerId": "0",
"customerName": "",
"blType": "拼箱单票",
"shipperId": null,
"consigneeId": null,
"notifyPartyId": null,
"agentId": "0",
"agent": "",
"shipperContent": "",
"consigneeContent": "",
"notifyPartyContent": "",
"agentContent": "",
"yardId": "0",
"yard": "",
"vessel": "",
"vesselId": "0",
"voyno": "",
"etd": null,
"eta": null,
"atd": null,
"ata": null,
"closingDate": null,
"receiptPlace": "",
"receiptPlaceId": "0",
"loadPortId": "0",
"loadPort": "",
"dischargePortId": "0",
"dischargePort": "",
"deliveryPlaceId": "0",
"deliveryPlace": "",
"destinationId": "0",
"destination": "",
"noBill": "",
"copyNoBill": "",
"issueType": "",
"issueDate": null,
"issuePlaceId": "0",
"issuePlace": "",
"blIssueSatus": null,
"prepareAtId": "0",
"prepareAt": "",
"payableAt": "",
"service": "",
"marks": "",
"cntrSealNo": "",
"noPkgs": "",
"description": "",
"goodsName": "",
"goodsId": "0",
"grossWeight": "",
"measurement": "",
"pkgs": null,
"kindPkgs": "",
"kgs": null,
"cbm": null,
"totalNo": "",
"cntrNo": "",
"cntr1": 0,
"cntr2": 0,
"cntr3": 0,
"cntr4": 0,
"cntr5": 0,
"cntr6": 0,
"cntr7": 0,
"cntr8": 0,
"cntr9": 0,
"cntr10": 0,
"otherCntr": 0,
"teu": 0,
"cntrTotal": "",
"operatorId": "0",
"customerService": "0",
"foreignCustomerService": "0",
"laneId": "0",
"lane": "",
"saleId": "0",
"sale": "",
"carrierId": "0",
"carrier": "",
"forwarderId": "0",
"forwarder": "",
"customserId": "0",
"customser": "",
"truckerId": "0",
"trucker": "",
"invoiceNo": "",
"cargoId": "",
"dangerClass": "",
"dangerNo": "",
"dangerPage": "",
"dangerLabel": "",
"reeferQuantity": "",
"temperatureUnit": "",
"temperatureSet": "",
"temperatureMin": "",
"temperatureMax": "",
"sourceId": "0",
"sourceDetailId": "0",
"sourceDetailName": null,
"customsNum": 0,
"contractNo": "",
"bookingType": "",
"bookingNo": "",
"insuranceer": "",
"insuranceNo": "",
"insuranceAmount": null,
"isVoucher": false,
"voucherNo": "",
"remark": "",
"status1": false,
"status2": false,
"status3": false,
"status4": false,
"status5": false,
"isFumigation": false,
"isStorage": false,
"isLand": false,
"isCustoms": false,
"isInspection": false,
"isBooking": false,
"isAgent": false,
"isHBLNO": false,
"service9": false,
"service10": false,
"doc": "0",
"packingType": "",
"wareHouse": "",
"closeDocDate": "0001-01-01 00:00:00",
"intoPortDocDate": "0001-01-01 00:00:00",
"saleDeptId": "0",
"mblFrt": "",
"stlName": "",
"stlDate": "0001-01-01 00:00:00",
"orderType": "",
"orderNo": "",
"operatorCode": "",
"isOperator": false,
"operatorEmail": "",
"operatorTel": "",
"operatorFax": "",
"financialStaffCode": "",
"isFinancialStaff": false,
"financialStaffEmail": "",
"financialStaffTel": "",
"financialStaffFax": "",
"sourceCode": "",
"linkMan": "",
"hsCode": "",
"ediRemark": "",
"mailProjectId": "0",
"irCode": "",
"serviceContractNo": "",
"applyNo": "",
"customNo": "",
"customDate": "0001-01-01 00:00:00",
"enterpriseId": null,
"enterprise": "",
"inspectionNo": "",
"inspectionDate": "0001-01-01 00:00:00",
"tradeTerm": "",
"termDelivery": "",
"clearCustomDate": "1900-01-01 00:00:00",
"insperctService": "",
"shipAgencyId": "0",
"shipAgency": "0",
"humidity": "",
"masterShipperId": null,
"masterConsigneeId": null,
"masterNotifyPartyId": null,
"masterConsigneeContent": "",
"masterNotifyPartyContent": "",
"masterShipperContent": "",
"masterDescription": "",
"isContainerSoc": true,
"tranStatus": "",
"manifestStatus": "",
"isMoreGood": true,
"isPrintReceipt": false,
"vessel2N": "",
"vesselId2N": "0",
"voyno2N": "",
"deliveryDate": "2024-05-22 16:05:37",
"yardATTN": "",
"yardTel": "",
"saleOrgId": "0",
"transport": "",
"transRemark": "",
"preRecord": 0,
"note": "",
"createTime": "2024-05-22 16:06:04",
"closeDocRemark": "0",
"bookingRemark": "0",
"blIssueStatus": 0,
"billSubmitStatus": 0,
"isBookingYZ": null,
"closeVgmDate": null,
"transportCode": "0",
"thirdPayAt": "",
"shipper": "",
"consignee": "",
"notifyParty": "",
"innerVoyno": null,
"secondNotifyPartyId": null,
"secondNotifyParty": null,
"secondNotifyPartyContent": null
}
}

@ -584,6 +584,15 @@
id: id.value, id: id.value,
}) })
.then((res) => { .then((res) => {
// 0 || 0001-01-01 00:00:00
res.data = JSON.parse(
JSON.stringify(res.data)
.replaceAll('"0001-01-01 00:00:00"', '""')
.replaceAll(':"0"', ':""')
.replaceAll(':0,', ':"",'),
)
if (route.query.isCopy) { if (route.query.isCopy) {
res.data = { res.data = {
...res.data, ...res.data,

@ -1,6 +1,5 @@
<template> <template>
<div class="more-edi" :style="{ paddingTop: '20px', paddingBottom: '10px' }"> <div class="more-edi" :style="{ paddingTop: '20px', paddingBottom: '10px' }">
{{ props.details.customDate }}
<BasicForm @register="registerForm" /> <BasicForm @register="registerForm" />
<!-- <a-form ref="RefediFrom" :model="props.details" :rules="rules" v-if="props.details"> <!-- <a-form ref="RefediFrom" :model="props.details" :rules="rules" v-if="props.details">
<div class="normal"> <div class="normal">

@ -78,6 +78,12 @@
</div> </div>
</div> </div>
<div v-if="tableLoaded"> <div v-if="tableLoaded">
<input
class="ds-tb-check ds-goods-tb-check"
type="checkbox"
v-model="allCheck"
:indeterminate="someCheck"
/>
<hot-table ref="hotTb" :data="list" :settings="settings"></hot-table> <hot-table ref="hotTb" :data="list" :settings="settings"></hot-table>
<div class="table-no-data" v-if="tableData.length === 0"></div> <div class="table-no-data" v-if="tableData.length === 0"></div>
</div> </div>
@ -101,6 +107,12 @@
</div> </div>
<a-spin :spinning="!moreSelectLoad"> <a-spin :spinning="!moreSelectLoad">
<div class="model-child-table"> <div class="model-child-table">
<input
class="ds-tb-check ds-goods-tb-check2"
type="checkbox"
v-model="moreAllCheck"
:indeterminate="moreSomeCheck"
/>
<hot-table <hot-table
ref="hotTb" ref="hotTb"
:data="moreData[moreSelectNum]" :data="moreData[moreSelectNum]"
@ -165,7 +177,17 @@
import { BasicColumn, BasicTable, useTable } from '/@/components/Table' import { BasicColumn, BasicTable, useTable } from '/@/components/Table'
import { goodsTablecolumns } from '/@/views/operation/seaexport/columns' import { goodsTablecolumns } from '/@/views/operation/seaexport/columns'
import { ref, Ref, reactive, getCurrentInstance, h, watch, onMounted, computed } from 'vue' import {
ref,
Ref,
watchEffect,
reactive,
getCurrentInstance,
h,
watch,
onMounted,
computed,
} from 'vue'
import { useMessage } from '/@/hooks/web/useMessage' import { useMessage } from '/@/hooks/web/useMessage'
const { notification } = useMessage() const { notification } = useMessage()
import { useRoute } from 'vue-router' import { useRoute } from 'vue-router'
@ -741,6 +763,12 @@
sortConditions: [], sortConditions: [],
}, },
}).then((res) => { }).then((res) => {
res.data = JSON.parse(
JSON.stringify(res.data)
.replaceAll('"0001-01-01 00:00:00"', '""')
.replaceAll(':"0"', ':""')
.replaceAll(':0,', ':"",'),
)
list.value.splice(0) list.value.splice(0)
let data = res.data let data = res.data
totalPkgs.value = 0 totalPkgs.value = 0
@ -1580,6 +1608,51 @@
}) })
return str return str
} }
//
const allCheck = ref(false)
//
const someCheck = ref(false)
watchEffect(() => {
//
if (allCheck.value) {
list.value.forEach((item) => {
item.selected = true
})
} else {
//
list.value.forEach((item) => {
item.selected = false
})
}
})
watch(
list.value,
(val) => {
let a = 0
let b = 0
val.forEach((item) => {
if (item.selected) {
a += 1
} else {
b += 1
}
})
if (a == 0) {
allCheck.value = false
}
if (b == 0) {
allCheck.value = true
}
if (a != 0 && b != 0) {
someCheck.value = true
} else {
someCheck.value = false
}
},
{
deep: true,
},
)
// //
const settings = { const settings = {
height: '400', height: '400',
@ -1588,11 +1661,15 @@
autoWrapCol: true, autoWrapCol: true,
// //
rowHeights: 32, rowHeights: 32,
fixedColumnsLeft: 1,
// //
// hiddenColumns: { // hiddenColumns: {
// columns: [1], // columns: [1],
// indicators: true, // indicators: true,
// }, // },
//
enterMoves: 'row',
columnSorting: true,
// //
afterValidate: function (isValid, value, row, prop, source) { afterValidate: function (isValid, value, row, prop, source) {
if (!isValid) { if (!isValid) {
@ -1743,6 +1820,54 @@
} }
}, },
} }
//
const moreAllCheck = ref(false)
//
const moreSomeCheck = ref(false)
watchEffect(() => {
//
if (moreData.value[moreSelectNum.value]) {
if (moreAllCheck.value) {
moreData.value[moreSelectNum.value].forEach((item) => {
item.selected = true
})
} else {
//
moreData.value[moreSelectNum.value].forEach((item) => {
item.selected = false
})
}
}
})
watch(
moreData.value[moreSelectNum.value],
(val) => {
let a = 0
let b = 0
val.forEach((item) => {
if (item.selected) {
a += 1
} else {
b += 1
}
})
if (a == 0) {
moreAllCheck.value = false
}
if (b == 0) {
moreAllCheck.value = true
}
if (a != 0 && b != 0) {
moreSomeCheck.value = true
} else {
moreSomeCheck.value = false
}
},
{
deep: true,
},
)
// //
const moreSettings = { const moreSettings = {
height: '200', height: '200',
@ -1770,6 +1895,12 @@
}) })
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
.ds-goods-tb-check {
left: 27px;
}
.ds-goods-tb-check2 {
left: 9px;
}
.from-line { .from-line {
margin: 0 0 10px 0; margin: 0 0 10px 0;
overflow: hidden; overflow: hidden;

Loading…
Cancel
Save