任务台

szh-new
lijingjia 4 months ago
parent c352e85263
commit ff662374d8

@ -1636,7 +1636,7 @@
// //
if (source === 'edit' || source === 'Autofill.fill' || source === 'CopyPaste.paste') { if (source === 'edit' || source === 'Autofill.fill' || source === 'CopyPaste.paste') {
let dict: any = {} let dict: any = {}
//
if (changes[0][1] === 'ctn') { if (changes[0][1] === 'ctn') {
const res = ctnDict.value.length ? ctnDict.value : (await GetCtnSelectList())?.data const res = ctnDict.value.length ? ctnDict.value : (await GetCtnSelectList())?.data
if (!ctnDict.value.length) ctnDict.value = res if (!ctnDict.value.length) ctnDict.value = res
@ -1644,7 +1644,7 @@
return item.ctnName === changes[0][3] return item.ctnName === changes[0][3]
}) })
if (item) dict = item[0] if (item) dict = item[0]
console.log(dict)
list.value[changes[0][0]]['ctn'] = dict?.ctnName list.value[changes[0][0]]['ctn'] = dict?.ctnName
list.value[changes[0][0]]['ctnCode'] = dict?.edicode list.value[changes[0][0]]['ctnCode'] = dict?.edicode
list.value[changes[0][0]]['size'] = dict?.ctnSize list.value[changes[0][0]]['size'] = dict?.ctnSize
@ -1654,6 +1654,7 @@
OTeu.value = dict.teu OTeu.value = dict.teu
} }
list.value[changes[0][0]]['tareWeight'] = dict?.ctnWeight list.value[changes[0][0]]['tareWeight'] = dict?.ctnWeight
console.log(list.value)
} }
if (changes[0][1] === 'kindPkgsName') { if (changes[0][1] === 'kindPkgsName') {
const res = kindPkgsDict.value.length const res = kindPkgsDict.value.length

@ -9,11 +9,11 @@
<a-tabs @change="tabChange" v-model:activeKey="activeKey"> <a-tabs @change="tabChange" v-model:activeKey="activeKey">
<a-tab-pane key="0" tab="机构信息"> <a-tab-pane key="0" tab="机构信息">
<BasicForm @register="registerForm"> <BasicForm @register="registerForm">
<template #isDepartment="item"> <template #isDepartment="{ model }">
<a-switch @change="changeIsDepartment" v-model:checked="item.values.isDepartment" /> <span class="s-txt" :class="{ 's-active': item.values.isDepartment }">{{ item.values.isDepartment ? '是' : '否'}}</span> <a-switch @change="changeIsDepartment" v-model:checked="model.isDepartment" /> <span class="s-txt" :class="{ 's-active': model.isDepartment }">{{ model.isDepartment ? '是' : '否'}}</span>
</template> </template>
<template #status="item"> <template #status="{ model }">
<a-switch @change="changeStatus" v-model:checked="item.values.status" /> <span class="s-txt" :class="{ 's-active': item.values.status }">{{ item.values.status ? '启用' : '禁用'}}</span> <a-switch @change="changeStatus" v-model:checked="model.status" /> <span class="s-txt" :class="{ 's-active': model.status }">{{ model.status ? '启用' : '禁用'}}</span>
</template> </template>
</BasicForm> </BasicForm>
</a-tab-pane> </a-tab-pane>

@ -400,12 +400,6 @@ export const formSchema: FormSchema[] = [
component: 'Switch', component: 'Switch',
label: '是否部门标识', label: '是否部门标识',
required: true, required: true,
componentProps: {
options: [
{ label: '是', value: true },
{ label: '否', value: false },
],
},
defaultValue: false, defaultValue: false,
colProps: { colProps: {
span: 6, span: 6,

@ -137,6 +137,7 @@
}) })
} }
async function handleSelect(key: string, e) { async function handleSelect(key: string, e) {
console.log(e)
if (e.selectedNodes[0]) { if (e.selectedNodes[0]) {
ParentId.value = e.selectedNodes[0].value ParentId.value = e.selectedNodes[0].value
} else { } else {

Loading…
Cancel
Save