KouJin 1 rok temu
rodzic
commit
286e74484e

+ 4 - 0
src/api/DeliveryWarehouse/DeliveryWarehouseSelect/index.ts

@@ -27,4 +27,8 @@ export const DeliveryWarehouseSelectApi = {
27 27
   exportExcel: async (params: any) => {
28 28
     return await request.download({ url: `/coding/delivery/exportExcel`, params })
29 29
   }
30
+,
31
+  getDwAndKq: async (params: any) => {
32
+    return await request.get({ url: `/coding/dwxx/getDwAndKq`, params })
33
+  }
30 34
 }

+ 1 - 0
src/api/DeliveryWarehouse/DeliveryWarehouseSelect/interface/CwxxRespVO.ts

@@ -2,6 +2,7 @@
2 2
  * 管理后台 - 财务信息 Response VO
3 3
  */
4 4
 export interface CwxxRespVO {
5
+  index?: number;
5 6
   /**
6 7
    * 雪花id
7 8
    */

+ 2 - 0
src/api/DeliveryWarehouse/DeliveryWarehouseSelect/interface/DeliverySaveVO.ts

@@ -11,6 +11,8 @@ import {
11 11
 export interface DeliverySaveVO {
12 12
   dwxxReqVO?: DwxxSaveReqVO; // 单位信息
13 13
   kqxxReqVO?: KqxxSaveReqVO; // 库区信息
14
+  kqxxReqVOList?: KqxxSaveReqVO[]; // 库区信息
14 15
   caxxReqVOList?: CaxxSaveReqVO[]; // 仓房信息列表
15 16
   cwxxReqVO?: CwxxRespVO; // 财务信息
17
+  cwxxReqVOList?: CwxxRespVO[]; // 财务信息
16 18
 }

+ 3 - 1
src/api/DeliveryWarehouse/DeliveryWarehouseSelect/interface/KqxxSaveReqVO.ts

@@ -2,6 +2,8 @@
2 2
  * 管理后台 - 库区信息; 新增/修改 Request VO
3 3
  */
4 4
 export interface KqxxSaveReqVO {
5
+  index?: number;
6
+  kqId?: number;
5 7
   /**
6 8
    * 主键
7 9
    */
@@ -11,7 +13,7 @@ export interface KqxxSaveReqVO {
11 13
    * 单位id
12 14
    */
13 15
   dwid?: number; // Java 的 Long 对应 TypeScript 的 number
14
-
16
+  areaCode:string;
15 17
   /**
16 18
    * 库区名称
17 19
    */

+ 2 - 0
src/components/Dialog/src/Dialog.vue

@@ -84,6 +84,7 @@ const myDialogClass2 = ref()
84 84
           >
85 85
             <Icon
86 86
               v-if="fullscreen"
87
+              :size="haveHeader ? 12 : 20"
87 88
               class="is-hover  mr-10px cursor-pointer"
88 89
               :icon="isFullscreen ? 'radix-icons:exit-full-screen' : 'radix-icons:enter-full-screen'"
89 90
               :color=" haveHeader ? 'color-[#fff]' : 'var(--el-color-info)'"
@@ -91,6 +92,7 @@ const myDialogClass2 = ref()
91 92
               @click="toggleFull"
92 93
             />
93 94
             <Icon
95
+              :size="haveHeader ? 12 : 20"
94 96
               class="is-hover color-[#fff] cursor-pointer"
95 97
               icon="ep:close"
96 98
               hover-color="var(--el-color-primary)"

+ 4 - 1
src/components/MyRadio/MyRadioItem.vue

@@ -5,6 +5,7 @@
5 5
       :name="groupName"
6 6
       :value="props.name"
7 7
       v-model="localValue"
8
+      :disabled="props.disabled"
8 9
       @change="handleChange" />
9 10
     <span class="name">
10 11
       <slot name="name">{{ props.name }}</slot>
@@ -21,10 +22,12 @@ import { inject, computed } from 'vue';
21 22
 
22 23
 interface RadioItemProps {
23 24
   name: string;
25
+  disabled:boolean
24 26
 }
25 27
 
26 28
 const props = withDefaults(defineProps<RadioItemProps>(), {
27
-  name: '' // 确保提供默认值或验证此为必填项
29
+  name: '' ,// 确保提供默认值或验证此为必填项,
30
+  disabled: false
28 31
 });
29 32
 
30 33
 const radioGroup = inject<{ currentValue: Ref<string | number> }>('radioGroup');

+ 21 - 0
src/components/Title/index.vue

@@ -0,0 +1,21 @@
1
+<script setup lang="ts">
2
+
3
+const props = defineProps({
4
+  title: {
5
+    type: String,
6
+    default: ''
7
+  }
8
+})
9
+
10
+
11
+</script>
12
+
13
+<template>
14
+   <div class="relative flex lh-50px  justify-start">
15
+       <div style="background: var(--el-color-primary)" class="w-5px  mt-13px mr-10px ml-0px h-26px"></div> <h2>{{ props.title}}</h2>
16
+   </div>
17
+</template>
18
+
19
+<style scoped lang="scss">
20
+
21
+</style>

+ 16 - 8
src/components/UploadFile/src/UploadImgs.vue

@@ -138,19 +138,27 @@ const uploadSuccess: UploadProps['onSuccess'] = (res: any): void => {
138 138
 // 监听模型绑定值变动
139 139
 watch(
140 140
   () => props.modelValue,
141
-  (val: string | string[]) => {
141
+  (val) => {
142 142
     if (!val) {
143
-      fileList.value = [] // fix:处理掉缓存,表单重置后上传组件的内容并没有重置
144
-      return
143
+      fileList.value = [] // 处理掉缓存,表单重置后上传组件的内容并没有重置
144
+      return;
145 145
     }
146 146
 
147
-    fileList.value = [] // 保障数据为空
148
-    fileList.value.push(
149
-      ...(val as string[]).map((url) => ({ name: url.substring(url.lastIndexOf('/') + 1), url }))
150
-    )
147
+    fileList.value = []; // 确保数据为空
148
+
149
+    // 检查 val 是否是数组,如果是,则处理;如果不是,进行适当的错误处理或跳过。
150
+    if (Array.isArray(val)) {
151
+      fileList.value.push(
152
+        ...val.map((url) => ({ name: url.substring(url.lastIndexOf('/') + 1), url }))
153
+      );
154
+    } else if (typeof val === 'string') { // 如果 val 是字符串,直接处理它。
155
+      fileList.value.push({ name: val.substring(val.lastIndexOf('/') + 1), url: val });
156
+    } else {
157
+      console.error('Expected an array of strings or a single string, but got:', typeof val);
158
+    }
151 159
   },
152 160
   { immediate: true, deep: true }
153
-)
161
+);
154 162
 
155 163
 watch(()=>fileList.value,()=>{
156 164
   console.log(fileList.value,'ss')

+ 2 - 0
src/components/index.ts

@@ -3,10 +3,12 @@ import { Icon } from './Icon'
3 3
 import NumberPairInput from './NumberPairInput/index.vue'
4 4
 import MyRadio from './MyRadio/index.vue'
5 5
 import MyRadioItem from './MyRadio/MyRadioItem.vue'
6
+import Title from './Title/index.vue'
6 7
 
7 8
 export const setupGlobCom = (app: App<Element>): void => {
8 9
   app.component('Icon', Icon)
9 10
   app.component('NumberPairInput', NumberPairInput)
10 11
   app.component('MyRadio', MyRadio)
11 12
   app.component('MyRadioItem', MyRadioItem)
13
+  app.component('Title', Title)
12 14
 }

Plik diff jest za duży
+ 512 - 355
src/views/DeliveryWarehouse/compontents/CreateForm.vue


+ 4 - 4
src/views/DeliveryWarehouse/compontents/Form.vue

@@ -56,7 +56,6 @@
56 56
 </template>
57 57
 <script lang="ts" setup>
58 58
 import {ref} from 'vue'
59
-import {useI18n} from 'vue-i18n'
60 59
 import {DeliveryWarehouseSelectApi} from '@/api/DeliveryWarehouse/DeliveryWarehouseSelect'
61 60
 import {DICT_TYPE} from '@/utils/dict'
62 61
 import {TableColumnData, TableRowSelection} from "@arco-design/web-vue";
@@ -98,8 +97,7 @@ interface TableRow {
98 97
 // 组件配置
99 98
 defineOptions({name: 'DeliveryWarehouseSelectForm'})
100 99
 
101
-// 国际化
102
-const {t} = useI18n()
100
+
103 101
 // 组件状态
104 102
 const dialogVisible = ref(false)
105 103
 const dialogTitle = ref('仓房列表')
@@ -196,7 +194,7 @@ const rowSelection = reactive<TableRowSelection>({
196 194
   showCheckedAll: true,
197 195
   onlyCurrent: false,
198 196
 });
199
-const selectedKeys = ref<(string | number)[] | undefined>([])
197
+const selectedKeys = ref<(string | number)[]>([])
200 198
 
201 199
 
202 200
 /**
@@ -311,6 +309,8 @@ const submitForm = async () => {
311 309
       ...queryParams.value
312 310
     }
313 311
     if (formType.value === 'select') {
312
+       //存储id的list,找到对应id的数据
313
+      submitData.storeRespVOList = list.value.filter((item) => selectedKeys.value.includes(item.id))
314 314
       await DeliveryWarehouseSelectApi.submitSelectList(submitData)
315 315
       Message.success("数据已提交到备选交收库")
316 316
     } else if (formType.value == 'back') {