Merge branch 'zth' into dev

feature-JimuReport-1106-yjl
张同海 1 month ago
commit 8b67535e32

@ -23,6 +23,7 @@
label="文件类型" label="文件类型"
name="typeCode" name="typeCode"
:rules="[{ required: true, message: '请选择文件类型!' }]" :rules="[{ required: true, message: '请选择文件类型!' }]"
v-show="!dynamicDisabled"
> >
<a-select <a-select
v-model:value="formData.typeCode" v-model:value="formData.typeCode"
@ -80,6 +81,7 @@
const { createMessage } = useMessage() const { createMessage } = useMessage()
import DsFileList from './list.vue' import DsFileList from './list.vue'
import { def } from '@vue/shared' import { def } from '@vue/shared'
import { any } from 'vue-types'
const props = defineProps({ const props = defineProps({
// //
maxCount: { maxCount: {
@ -128,33 +130,42 @@
type: Boolean, type: Boolean,
default: false, default: false,
}, },
// 使
dynamicDisabled: {
type: Number,
default: null,
},
}) })
// //
const visible = ref(false) const visible = ref(false)
// loading // loading
const loading = ref(false) const loading = ref(false)
const fileTypeList = ref([]) const fileTypeList = ref([])
const formData = reactive<any>({
typeCode: '',
typeName: '',
fileList: [],
})
// //
const init = () => { const init = () => {
let code = props.fileType ? `${props.fileType}_file_type` : 'file_type' let code = props.fileType ? `${props.fileType}_file_type` : 'file_type'
console.log(code)
getDictOption(code).then((res) => { getDictOption(code).then((res) => {
console.log(res)
fileTypeList.value = res fileTypeList.value = res
})
visible.value = true visible.value = true
formData.typeCode = props.dynamicDisabled
fileTypeList.value.forEach((e: any) => {
if (e.value == props.dynamicDisabled) {
formData.typeName = e.label
}
})
})
} }
// //
const upFileList = ref([]) const upFileList = ref([])
const formData = reactive({
typeCode: '',
typeName: '',
fileList: [],
})
const fields = ref([]) const fields = ref([])
function handleRemove(file: any) { function handleRemove(file: any) {
const index = upFileList.value.indexOf(file) const index = upFileList.value.indexOf(file)
console.log(index)
const newFileList = upFileList.value.slice() const newFileList = upFileList.value.slice()
newFileList.splice(index, 1) newFileList.splice(index, 1)
upFileList.value = newFileList upFileList.value = newFileList
@ -175,7 +186,6 @@
} }
// //
const changeHandle = (v, obj) => { const changeHandle = (v, obj) => {
console.log(v)
const row = fileTypeList.value.filter((item) => { const row = fileTypeList.value.filter((item) => {
return item.value == v return item.value == v
}) })
@ -219,13 +229,13 @@
upFileList.value = [] upFileList.value = []
if (props.showFileList) { if (props.showFileList) {
dsFileList.value.init() dsFileList.value.init()
emits('handleSuccess', { id: res.data })
} else { } else {
emits('handleSuccess') emits('handleSuccess')
} }
createMessage.success('上传成功!') createMessage.success('上传成功!')
}) })
.catch((res) => { .catch((res) => {
console.log(res)
loading.value = false loading.value = false
createMessage.error('上传失败!') createMessage.error('上传失败!')
}) })

@ -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,

@ -66,7 +66,7 @@ export const formSchema: FormSchema[] = [
label: '模板名称', label: '模板名称',
field: 'templetName', field: 'templetName',
component: 'ApiSelect', component: 'ApiSelect',
required: false, required: true,
dynamicDisabled: false, dynamicDisabled: false,
colProps: { span: 6 }, colProps: { span: 6 },
componentProps: ({ formModel }) => { componentProps: ({ formModel }) => {

@ -195,16 +195,13 @@ export const EditformSchema: FormSchema[] = [
label: '注册资金', label: '注册资金',
component: 'DEdit', component: 'DEdit',
colProps: { span: 4 }, colProps: { span: 4 },
defaultValue: 0, defaultValue: '0',
componentProps: (e) => { componentProps: (e) => {
return { return {
onEdit: () => { onEdit: () => {
const { formActionType } = e const { formActionType } = e
formActionType ? formActionType.linkageForm(e) : null formActionType ? formActionType.linkageForm(e) : null
}, },
min: '0',
step: '0.01',
stringMode: true,
} }
}, },
}, },
@ -216,10 +213,10 @@ export const EditformSchema: FormSchema[] = [
colProps: { span: 4 }, colProps: { span: 4 },
componentProps: (e) => { componentProps: (e) => {
return { return {
showTime: true, showTime: false,
allowClear: true, allowClear: true,
format: 'YYYY-MM-DD HH:mm:ss', format: 'YYYY-MM-DD',
valueFormat: 'YYYY-MM-DD HH:mm:ss', valueFormat: 'YYYY-MM-DD',
onEdit: () => { onEdit: () => {
const { formActionType } = e const { formActionType } = e
formActionType ? formActionType.linkageForm(e) : null formActionType ? formActionType.linkageForm(e) : null

@ -111,12 +111,13 @@
</a-select> </a-select>
</span> </span>
</div> </div>
<!-- CustomerOrSupplier.value = 'isSupplier' -->
<div class="ConfigFormBox"> <div class="ConfigFormBox">
<ConfigForm <ConfigForm
:form-schema="formSchema" :form-schema="formSchema"
:isTransfer="true" :isTransfer="true"
name="往来单位-基本信息" :name="CustomerOrSupplier == 'isSupplier' ? '供应商-基本信息' : '客户-基本信息'"
formNo="12" :formNo="CustomerOrSupplier == 'isSupplier' ? '13' : '12'"
> >
<a-button type="link"> <a-button type="link">
<span class="iconfont icon-icon_tianjia"></span> <span class="iconfont icon-icon_tianjia"></span>
@ -360,6 +361,7 @@
const CustomerOrSupplier = ref('') const CustomerOrSupplier = ref('')
// //
const getFormSet = async () => { const getFormSet = async () => {
console.log(permissionsInfo(), 11111111111111111)
let res: any = await GetFormSetListByModule({ permissionId: permissionsInfo().permissionId }) let res: any = await GetFormSetListByModule({ permissionId: permissionsInfo().permissionId })
if (res.succeeded) { if (res.succeeded) {
const { data } = res const { data } = res
@ -408,8 +410,6 @@
ChangeArrclientTag(false) ChangeArrclientTag(false)
}) })
function ChangeArrclientTag(type) { function ChangeArrclientTag(type) {
console.log(type, 11111111111111)
// //
const ArrclientTagList = [ const ArrclientTagList = [
'isController', 'isController',
@ -616,8 +616,6 @@
} }
const linkageForm = (e) => { const linkageForm = (e) => {
console.log(e)
let Data = DIYformSchema.value.length ? DIYformSchema.value : formSchema let Data = DIYformSchema.value.length ? DIYformSchema.value : formSchema
Data.forEach((item) => { Data.forEach((item) => {
if (item.field == e.schema.field) { if (item.field == e.schema.field) {

@ -643,16 +643,9 @@ export const formSchema: FormSchema[] = [
{ {
field: 'registeredCapital', field: 'registeredCapital',
label: '注册资金', label: '注册资金',
component: 'InputNumber', component: 'Input',
colProps: { span: 4 }, colProps: { span: 4 },
defaultValue: 0, defaultValue: '0',
componentProps: () => {
return {
min: '0',
step: '0.01',
stringMode: true,
}
},
}, },
{ {
field: 'registrationTime', field: 'registrationTime',
@ -661,10 +654,10 @@ export const formSchema: FormSchema[] = [
colProps: { span: 4 }, colProps: { span: 4 },
componentProps: () => { componentProps: () => {
return { return {
showTime: true, showTime: false,
allowClear: true, allowClear: true,
format: 'YYYY-MM-DD HH:mm:ss', format: 'YYYY-MM-DD',
valueFormat: 'YYYY-MM-DD HH:mm:ss', valueFormat: 'YYYY-MM-DD',
} }
}, },
}, },

Loading…
Cancel
Save