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

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

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

@ -1,231 +1,4 @@
{
"code": 0,
"multiCode": "Data_Query_Success",
"count": 0,
"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
}
}
Error converting value {null} to type 'System.Int32'
Path 'preRecord', line 1, position 1531.|Error converting value {null} to type 'System.Int32'
Path 'customsNum', line 1, position 1328.

@ -584,6 +584,15 @@
id: id.value,
})
.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) {
res.data = {
...res.data,

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

@ -78,6 +78,12 @@
</div>
</div>
<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>
<div class="table-no-data" v-if="tableData.length === 0"></div>
</div>
@ -101,6 +107,12 @@
</div>
<a-spin :spinning="!moreSelectLoad">
<div class="model-child-table">
<input
class="ds-tb-check ds-goods-tb-check2"
type="checkbox"
v-model="moreAllCheck"
:indeterminate="moreSomeCheck"
/>
<hot-table
ref="hotTb"
:data="moreData[moreSelectNum]"
@ -165,7 +177,17 @@
import { BasicColumn, BasicTable, useTable } from '/@/components/Table'
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'
const { notification } = useMessage()
import { useRoute } from 'vue-router'
@ -741,6 +763,12 @@
sortConditions: [],
},
}).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)
let data = res.data
totalPkgs.value = 0
@ -1580,6 +1608,51 @@
})
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 = {
height: '400',
@ -1588,11 +1661,15 @@
autoWrapCol: true,
//
rowHeights: 32,
fixedColumnsLeft: 1,
//
// hiddenColumns: {
// columns: [1],
// indicators: true,
// },
//
enterMoves: 'row',
columnSorting: true,
//
afterValidate: function (isValid, value, row, prop, source) {
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 = {
height: '200',
@ -1770,6 +1895,12 @@
})
</script>
<style lang="less" scoped>
.ds-goods-tb-check {
left: 27px;
}
.ds-goods-tb-check2 {
left: 9px;
}
.from-line {
margin: 0 0 10px 0;
overflow: hidden;

Loading…
Cancel
Save