|
|
|
@ -55,9 +55,11 @@
|
|
|
|
|
<DsFile
|
|
|
|
|
ref="dsFile"
|
|
|
|
|
fileType="infoclient"
|
|
|
|
|
:dynamicDisabled="3"
|
|
|
|
|
:TriggerSave="true"
|
|
|
|
|
:id="rowId"
|
|
|
|
|
@FnTriggerSave="FnTriggerSave"
|
|
|
|
|
@handleSuccess="handleSuccess"
|
|
|
|
|
:SetSelect="{
|
|
|
|
|
show: true,
|
|
|
|
|
}"
|
|
|
|
@ -123,7 +125,7 @@
|
|
|
|
|
registerAllModules()
|
|
|
|
|
import 'handsontable/dist/handsontable.full.css'
|
|
|
|
|
import { useMessage } from '/@/hooks/web/useMessage'
|
|
|
|
|
const { notification } = useMessage()
|
|
|
|
|
const { notification, createMessage } = useMessage()
|
|
|
|
|
import DsFile from '/@/components/File/index.vue'
|
|
|
|
|
// 声明Emits
|
|
|
|
|
const emit = defineEmits(['success', 'register'])
|
|
|
|
@ -131,7 +133,6 @@
|
|
|
|
|
const loading = ref(false)
|
|
|
|
|
const rowId = ref()
|
|
|
|
|
const activeKey = ref('1')
|
|
|
|
|
const { createMessage } = useMessage()
|
|
|
|
|
const [registerForm, { resetFields, setFieldsValue, validate }] = useForm({
|
|
|
|
|
labelWidth: 100,
|
|
|
|
|
schemas: formSchema,
|
|
|
|
@ -192,7 +193,8 @@
|
|
|
|
|
setModalProps({ confirmLoading: false, loading: false })
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
async function refresh() {
|
|
|
|
|
async function refresh(type = false) {
|
|
|
|
|
let MessageArr: any = []
|
|
|
|
|
list.value.splice(0)
|
|
|
|
|
const res: any = await ApiInfo({ id: unref(rowId) })
|
|
|
|
|
if (res.succeeded) {
|
|
|
|
@ -203,7 +205,25 @@
|
|
|
|
|
someCheck.value = false
|
|
|
|
|
res.data.bodyList.forEach((item) => {
|
|
|
|
|
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()
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
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() {
|
|
|
|
|
if (!rowId.value) {
|
|
|
|
|
await handleSave(false)
|
|
|
|
@ -228,7 +264,7 @@
|
|
|
|
|
ApiDealExcel(ApiData).then((res) => {
|
|
|
|
|
if (res.succeeded) {
|
|
|
|
|
activeKey.value = '1'
|
|
|
|
|
refresh()
|
|
|
|
|
refresh(true)
|
|
|
|
|
notification.success({ message: res.message, duration: 3 })
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
@ -374,6 +410,11 @@
|
|
|
|
|
width: 120,
|
|
|
|
|
data: 'ctnFlowState',
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
title: '状态日期',
|
|
|
|
|
width: 120,
|
|
|
|
|
data: 'changeTime',
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
title: '当前箱业务状态',
|
|
|
|
|
width: 120,
|
|
|
|
|