|
|
@ -55,9 +55,11 @@
|
|
|
|
<DsFile
|
|
|
|
<DsFile
|
|
|
|
ref="dsFile"
|
|
|
|
ref="dsFile"
|
|
|
|
fileType="infoclient"
|
|
|
|
fileType="infoclient"
|
|
|
|
|
|
|
|
:dynamicDisabled="3"
|
|
|
|
:TriggerSave="true"
|
|
|
|
:TriggerSave="true"
|
|
|
|
:id="rowId"
|
|
|
|
:id="rowId"
|
|
|
|
@FnTriggerSave="FnTriggerSave"
|
|
|
|
@FnTriggerSave="FnTriggerSave"
|
|
|
|
|
|
|
|
@handleSuccess="handleSuccess"
|
|
|
|
:SetSelect="{
|
|
|
|
:SetSelect="{
|
|
|
|
show: true,
|
|
|
|
show: true,
|
|
|
|
}"
|
|
|
|
}"
|
|
|
@ -123,7 +125,7 @@
|
|
|
|
registerAllModules()
|
|
|
|
registerAllModules()
|
|
|
|
import 'handsontable/dist/handsontable.full.css'
|
|
|
|
import 'handsontable/dist/handsontable.full.css'
|
|
|
|
import { useMessage } from '/@/hooks/web/useMessage'
|
|
|
|
import { useMessage } from '/@/hooks/web/useMessage'
|
|
|
|
const { notification } = useMessage()
|
|
|
|
const { notification, createMessage } = useMessage()
|
|
|
|
import DsFile from '/@/components/File/index.vue'
|
|
|
|
import DsFile from '/@/components/File/index.vue'
|
|
|
|
// 声明Emits
|
|
|
|
// 声明Emits
|
|
|
|
const emit = defineEmits(['success', 'register'])
|
|
|
|
const emit = defineEmits(['success', 'register'])
|
|
|
@ -131,7 +133,6 @@
|
|
|
|
const loading = ref(false)
|
|
|
|
const loading = ref(false)
|
|
|
|
const rowId = ref()
|
|
|
|
const rowId = ref()
|
|
|
|
const activeKey = ref('1')
|
|
|
|
const activeKey = ref('1')
|
|
|
|
const { createMessage } = useMessage()
|
|
|
|
|
|
|
|
const [registerForm, { resetFields, setFieldsValue, validate }] = useForm({
|
|
|
|
const [registerForm, { resetFields, setFieldsValue, validate }] = useForm({
|
|
|
|
labelWidth: 100,
|
|
|
|
labelWidth: 100,
|
|
|
|
schemas: formSchema,
|
|
|
|
schemas: formSchema,
|
|
|
@ -192,7 +193,8 @@
|
|
|
|
setModalProps({ confirmLoading: false, loading: false })
|
|
|
|
setModalProps({ confirmLoading: false, loading: false })
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
async function refresh() {
|
|
|
|
async function refresh(type = false) {
|
|
|
|
|
|
|
|
let MessageArr: any = []
|
|
|
|
list.value.splice(0)
|
|
|
|
list.value.splice(0)
|
|
|
|
const res: any = await ApiInfo({ id: unref(rowId) })
|
|
|
|
const res: any = await ApiInfo({ id: unref(rowId) })
|
|
|
|
if (res.succeeded) {
|
|
|
|
if (res.succeeded) {
|
|
|
@ -203,7 +205,25 @@
|
|
|
|
someCheck.value = false
|
|
|
|
someCheck.value = false
|
|
|
|
res.data.bodyList.forEach((item) => {
|
|
|
|
res.data.bodyList.forEach((item) => {
|
|
|
|
list.value.push({ ...item, selected: false })
|
|
|
|
list.value.push({ ...item, selected: false })
|
|
|
|
|
|
|
|
console.log(item.cntrno)
|
|
|
|
|
|
|
|
if (item.isOnlineId != 1) {
|
|
|
|
|
|
|
|
MessageArr.push(item.cntrno)
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
if (MessageArr.length) {
|
|
|
|
|
|
|
|
let txt = `有${MessageArr.length}个箱号存在问题 需人工处理:`
|
|
|
|
|
|
|
|
for (let i = 0; i < 5; i++) {
|
|
|
|
|
|
|
|
if (MessageArr[i]) {
|
|
|
|
|
|
|
|
txt = i == 0 ? `${txt} ${MessageArr[i]}` : `${txt},\n${MessageArr[i]}`
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
notification.warning({
|
|
|
|
|
|
|
|
message: MessageArr.length > 5 ? `${txt}...` : txt,
|
|
|
|
|
|
|
|
duration: 6000,
|
|
|
|
})
|
|
|
|
})
|
|
|
|
|
|
|
|
} else if (list.value.length) {
|
|
|
|
|
|
|
|
createMessage.success('全部识别成功,自动生成变动。')
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -214,6 +234,22 @@
|
|
|
|
dsFile.value.openFileModel()
|
|
|
|
dsFile.value.openFileModel()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
function handleSuccess(data) {
|
|
|
|
|
|
|
|
const id = data.id.split('.')[0]
|
|
|
|
|
|
|
|
let ApiData: any = {
|
|
|
|
|
|
|
|
id: unref(rowId),
|
|
|
|
|
|
|
|
formName: 'CM_State_Change_TemplatImport',
|
|
|
|
|
|
|
|
tableName: '',
|
|
|
|
|
|
|
|
fileId: id,
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
ApiDealExcel(ApiData).then((res) => {
|
|
|
|
|
|
|
|
if (res.succeeded) {
|
|
|
|
|
|
|
|
activeKey.value = '1'
|
|
|
|
|
|
|
|
refresh(true)
|
|
|
|
|
|
|
|
notification.success({ message: res.message, duration: 3 })
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
}
|
|
|
|
async function DealExcel() {
|
|
|
|
async function DealExcel() {
|
|
|
|
if (!rowId.value) {
|
|
|
|
if (!rowId.value) {
|
|
|
|
await handleSave(false)
|
|
|
|
await handleSave(false)
|
|
|
@ -228,7 +264,7 @@
|
|
|
|
ApiDealExcel(ApiData).then((res) => {
|
|
|
|
ApiDealExcel(ApiData).then((res) => {
|
|
|
|
if (res.succeeded) {
|
|
|
|
if (res.succeeded) {
|
|
|
|
activeKey.value = '1'
|
|
|
|
activeKey.value = '1'
|
|
|
|
refresh()
|
|
|
|
refresh(true)
|
|
|
|
notification.success({ message: res.message, duration: 3 })
|
|
|
|
notification.success({ message: res.message, duration: 3 })
|
|
|
|
}
|
|
|
|
}
|
|
|
|
})
|
|
|
|
})
|
|
|
@ -374,6 +410,11 @@
|
|
|
|
width: 120,
|
|
|
|
width: 120,
|
|
|
|
data: 'ctnFlowState',
|
|
|
|
data: 'ctnFlowState',
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
title: '状态日期',
|
|
|
|
|
|
|
|
width: 120,
|
|
|
|
|
|
|
|
data: 'changeTime',
|
|
|
|
|
|
|
|
},
|
|
|
|
{
|
|
|
|
{
|
|
|
|
title: '当前箱业务状态',
|
|
|
|
title: '当前箱业务状态',
|
|
|
|
width: 120,
|
|
|
|
width: 120,
|
|
|
|