@@ -28,6 +25,7 @@
diff --git a/src/components/UploadFile/src/UploadFile.vue b/src/components/UploadFile/src/UploadFile.vue
index c8a3b9727..aca50ad51 100644
--- a/src/components/UploadFile/src/UploadFile.vue
+++ b/src/components/UploadFile/src/UploadFile.vue
@@ -20,15 +20,19 @@
:on-preview="handlePreview"
class="upload-file-uploader"
>
-
选取文件
+
{{ title }}
-
+
大小不超过 {{ fileSize }}MB
格式为 {{ fileType.join('/') }} 的文件
+
+
+
+
@@ -56,13 +60,15 @@ const props = defineProps({
limit: propTypes.number.def(5), // 数量限制
autoUpload: propTypes.bool.def(true), // 自动上传
drag: propTypes.bool.def(false), // 拖拽上传
- isShowTip: propTypes.bool.def(true) // 是否显示提示
+ isShowTip: propTypes.bool.def(true), // 是否显示提示
+ isShowFile: propTypes.bool.def(true), // 是否显示上传的文件
+
})
// ========== 上传相关 ==========
const valueRef = ref(props.modelValue)
const uploadRef = ref
()
const uploadList = ref([])
-const fileList = ref(props.modelValue)
+const fileList = props.modelValue && props.modelValue.length > 0 ? ref(props.modelValue) : ref([])
const uploadNumber = ref(0)
const uploadHeaders = ref({
Authorization: 'Bearer ' + getAccessToken(),
@@ -148,7 +154,7 @@ const listToString = (list: UploadUserFile[], separator?: string) => {
:deep(.upload-file-list .el-upload-list__item) {
position: relative;
- margin-bottom: 10px;
+ // margin-bottom: 10px;
line-height: 2;
border: 1px solid #e4e7ed;
}
diff --git a/src/types/components.d.ts b/src/types/components.d.ts
index 8de1f3352..9efecf1c8 100644
--- a/src/types/components.d.ts
+++ b/src/types/components.d.ts
@@ -37,6 +37,7 @@ export type ColProps = {
export type ComponentOptions = {
label?: string
+ type?: string
value?: FormValueType
disabled?: boolean
key?: string | number
diff --git a/src/utils/disposition/tableColumns.ts b/src/utils/disposition/tableColumns.ts
index 9e70c4fc4..0aad4cdd7 100644
--- a/src/utils/disposition/tableColumns.ts
+++ b/src/utils/disposition/tableColumns.ts
@@ -42,11 +42,15 @@ export const ItemBasic = useCrudSchemas(reactive([
sort: 'custom',
dictType: DICT_TYPE.ITEM_STATUS,
dictClass: 'string',
+ isForm: true,
isSearch: true,
isTable: true,
table: {
width: 100
- }
+ } ,
+ form: {
+ component: 'Select',
+ }
},
{
label: '计量单位',
@@ -82,7 +86,10 @@ export const ItemBasic = useCrudSchemas(reactive([
isTable: true,
table: {
width: 120
- }
+ },
+ form: {
+ component: 'Switch',
+ }
},
{
label: '可采购',
@@ -94,7 +101,10 @@ export const ItemBasic = useCrudSchemas(reactive([
isTable: true,
table: {
width: 100
- }
+ },
+ form: {
+ component: 'Radio',
+ }
},
{
label: '可制造',
@@ -106,7 +116,10 @@ export const ItemBasic = useCrudSchemas(reactive([
isTable: true,
table: {
width: 100
- }
+ } ,
+ form: {
+ component: 'Radio',
+ }
},
{
label: '可委外加工',
@@ -118,7 +131,10 @@ export const ItemBasic = useCrudSchemas(reactive([
isTable: true,
table: {
width: 120
- }
+ } ,
+ form: {
+ component: 'Radio',
+ }
},
{
label: '回收件',
@@ -130,7 +146,10 @@ export const ItemBasic = useCrudSchemas(reactive([
isTable: true,
table: {
width: 100
- }
+ },
+ form: {
+ component: 'Radio',
+ }
},
{
label: '虚零件',
@@ -142,7 +161,10 @@ export const ItemBasic = useCrudSchemas(reactive([
isTable: true,
table: {
width: 100
- }
+ } ,
+ form: {
+ component: 'Radio',
+ }
},
{
label: 'ABC类',
@@ -242,7 +264,11 @@ export const ItemBasic = useCrudSchemas(reactive([
sort: 'custom',
table: {
width: 120
- } },
+ },
+ form: {
+ component: 'InputNumber',
+ }
+ },
{
label: '是否可用',
field: 'available',
@@ -253,7 +279,10 @@ export const ItemBasic = useCrudSchemas(reactive([
isTable: true,
table: {
width: 120
- }
+ },
+ form: {
+ component: 'Radio',
+ }
},
{
label: '生效时间',
@@ -266,7 +295,14 @@ export const ItemBasic = useCrudSchemas(reactive([
},
table: {
width: 120
- }
+ } ,
+ form: {
+ component: 'TimePicker',
+ componentProps: {
+ type: 'datetimerange',
+ // disabled:true,
+ }
+ }
},
{
label: '失效时间',
@@ -279,7 +315,12 @@ export const ItemBasic = useCrudSchemas(reactive([
},
table: {
width: 120
- }
+ } ,
+ form: {
+ component: 'TimePicker',
+ // valueFormat: 'YYYY-MM-DD HH:mm:ss',
+ // format: 'YYYY-MM-DD HH:mm:ss',
+ }
},
{
label: '创建时间',
diff --git a/src/views/system/user/UserImportForm.vue b/src/views/system/user/UserImportForm.vue
index ad9eae385..51b1702f9 100644
--- a/src/views/system/user/UserImportForm.vue
+++ b/src/views/system/user/UserImportForm.vue
@@ -127,6 +127,8 @@ const handleExceed = (): void => {
/** 下载模板操作 */
const importTemplate = async () => {
+ console.log(await UserApi.importUserTemplate());
+
const res = await UserApi.importUserTemplate()
download.excel(res, '用户导入模版.xls')
}
diff --git a/src/views/wms/itembasic/ItembasicDetail.vue b/src/views/wms/itembasic/ItembasicDetail.vue
index 6ee9d5264..a603052ac 100644
--- a/src/views/wms/itembasic/ItembasicDetail.vue
+++ b/src/views/wms/itembasic/ItembasicDetail.vue
@@ -109,22 +109,26 @@ const changeRecordData = reactive({
}]
})
const detailData = ref("")//详情数据
-onMounted(async () => {
- // 获取详情
- detailData.value = await getItembasic(query.id)
-})
// 导入附件弹窗所需的参数
const importTemplateData = reactive({
- templateUrl: UserApi.importUserTemplate(),
+ templateUrl: '',
templateTitle: '导入模版99.xls'
})
+onMounted(async () => {
+ // 获取详情
+ detailData.value = await getItembasic(query.id)
+ importTemplateData.templateUrl = await UserApi.importUserTemplate()
+})
+
// 导入成功之后
const importSuccess = () => {
+
}
/** 搜索按钮操作 */
const handleQuery = () => {
+ importFormRef.value.open()
}
/** 重置按钮操作 */
@@ -163,9 +167,7 @@ const current = ref(0)
const { tableObject, tableMethods } = useTable({
getListApi: ItembasicApi.getItembasicPage // 分页接口
})
-console.log(tableObject);
const change = (item, index) => {
- console.log(item);
current.value = index
}
diff --git a/src/views/wms/itembasic/ItembasicForm.vue b/src/views/wms/itembasic/ItembasicForm.vue
index dd0afc5f9..ef09172b1 100644
--- a/src/views/wms/itembasic/ItembasicForm.vue
+++ b/src/views/wms/itembasic/ItembasicForm.vue
@@ -1,19 +1,15 @@