箱状态查询调整 以及 租箱租入 识别excel 调整

szh-new
张同海 2 months ago
parent 5f60e19578
commit 0e256e626e

@ -123,6 +123,11 @@
show: false, show: false,
}, },
}, },
// ID
TriggerSave: {
type: Boolean,
default: false,
},
}) })
// //
const visible = ref(false) const visible = ref(false)
@ -180,15 +185,19 @@
// //
const openFileModel = () => { const openFileModel = () => {
if (props.TriggerSave && !props.id) {
emits('FnTriggerSave')
} else {
if (!props.id) { if (!props.id) {
return createMessage.warning('未检索到业务id请先保存数据') return createMessage.warning('未检索到业务id请先保存数据')
} }
init() init()
} }
}
const fileForm = ref(null) const fileForm = ref(null)
// //
const dsFileList = ref(null) const dsFileList = ref(null)
const emits = defineEmits(['handleSuccess']) const emits = defineEmits(['handleSuccess', 'FnTriggerSave'])
// //
const handleOk = async () => { const handleOk = async () => {
const res = await fileForm.value.validateFields() const res = await fileForm.value.validateFields()
@ -237,6 +246,7 @@
defineExpose({ defineExpose({
init, init,
dsFileList, dsFileList,
openFileModel,
}) })
</script> </script>
<style></style> <style></style>

@ -183,7 +183,7 @@ export const searchFormSchema: FormSchema[] = [
field: 'cntrno', field: 'cntrno',
label: '箱号', label: '箱号',
component: 'Input', component: 'Input',
colProps: { span: 4 }, colProps: { span: 8 },
}, },
{ {
field: 'ctnOwner', field: 'ctnOwner',

@ -50,7 +50,18 @@
}) })
}, },
beforeFetch: (p) => { beforeFetch: (p) => {
return formatParams(p, ['ctnOwner', 'ctnSourceId', 'isOnlineId', 'portid']) let Rdata = formatParams(p, ['ctnOwner', 'ctnSourceId', 'isOnlineId', 'portid'])
if (!!p.cntrno) {
let data = JSON.parse(Rdata.queryCondition)
data.forEach((item, index) => {
if (item.FieldName == 'cntrno') {
console.log(item)
item.ConditionalType = 15
}
})
Rdata.queryCondition = JSON.stringify(data)
}
return Rdata
}, },
columns, columns,
formConfig: { formConfig: {

@ -86,11 +86,14 @@
</div> </div>
</div> </div>
</a-tab-pane> </a-tab-pane>
<a-tab-pane key="2" tab="电子文档" :disabled="!rowId"> <!-- <a-tab-pane key="2" tab="电子文档" :disabled="!rowId"> -->
<a-tab-pane key="2" tab="电子文档">
<DsFile <DsFile
ref="dsFile" ref="dsFile"
fileType="infoclient" fileType="infoclient"
:TriggerSave="true"
:id="rowId" :id="rowId"
@FnTriggerSave="FnTriggerSave"
:SetSelect="{ :SetSelect="{
show: true, show: true,
}" }"
@ -286,6 +289,7 @@
}) })
}) })
} }
function GetListDetail() { function GetListDetail() {
ApiListDetail({ ApiListDetail({
queryCondition: `[{ FieldName: 'Pid', FieldValue: '${rowId.value}', ConditionalType: 1 }]`, queryCondition: `[{ FieldName: 'Pid', FieldValue: '${rowId.value}', ConditionalType: 1 }]`,
@ -366,8 +370,16 @@
} }
} }
const dsFile = ref() const dsFile = ref()
function DealExcel() { async function FnTriggerSave() {
await handleSave(false)
if (rowId.value) { if (rowId.value) {
dsFile.value.openFileModel()
}
}
async function DealExcel() {
if (!rowId.value) {
await handleSave(false)
}
if (dsFile.value.dsFileList.SelectId) { if (dsFile.value.dsFileList.SelectId) {
let ApiData: any = { let ApiData: any = {
id: unref(rowId), id: unref(rowId),
@ -383,9 +395,6 @@
} else { } else {
notification.warning({ message: '请先在电子文档中勾选一个文件。', duration: 3 }) notification.warning({ message: '请先在电子文档中勾选一个文件。', duration: 3 })
} }
} else {
notification.warning({ message: '请先保存', duration: 3 })
}
} }
async function handleSave(exit) { async function handleSave(exit) {
try { try {

Loading…
Cancel
Save