Merge branch 'zth' into dev

feature-JimuReport-1106-yjl
张同海 4 weeks ago
commit 8b67535e32

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

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

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

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

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

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

Loading…
Cancel
Save