Browse Source

YT-2079盘点配置表

intex_online20250327
zhaoyiran 3 weeks ago
parent
commit
19fa0935b3
  1. 2
      src/utils/dict.ts
  2. 6
      src/views/wms/countManage/count/countConfig/countConfig.data.ts
  3. 24
      src/views/wms/countManage/count/countConfig/index.vue

2
src/utils/dict.ts

@ -427,5 +427,5 @@ export enum DICT_TYPE {
ISSUE_SOURCE="issue_source",//发料来源
ISSUE_PLAN_TRIAL_RESULT="issue_plan_trial_result",//备料计划试算结果
COUNT_MODE = "count_mode",//盘点模式(1:PAD盘点,2:Excel导入)
INVENTORY_MODE = "inventory_mode",
}

6
src/views/wms/countManage/count/countConfig/countConfig.data.ts

@ -6,8 +6,8 @@ import * as ItembasicApi from '@/api/wms/itembasic'
// 表单校验
export const CountConfigRules = reactive({
itemCode: [required],
available: [required],
concurrencyStamp: [required],
countType: [required],
conversionRate: [required],
})
export const CountConfig = useCrudSchemas(reactive<CrudSchema[]>([
@ -117,6 +117,8 @@ export const CountConfig = useCrudSchemas(reactive<CrudSchema[]>([
label: '盘点模式',
field: 'countType',
sort: 'custom',
dictType: DICT_TYPE.INVENTORY_MODE,
dictClass: 'string',
table: {
width: 180
},

24
src/views/wms/countManage/count/countConfig/index.vue

@ -54,7 +54,14 @@
<Detail ref="detailRef" :isBasic="true" :allSchemas="CountConfig.allSchemas" />
<!-- 导入 -->
<ImportForm ref="importFormRef" url="/wms/count-config/import" :importTemplateData="importTemplateData" @success="importSuccess" />
<ImportForm ref="importFormRef"
url="/wms/count-config/import"
:importTemplateData="importTemplateData"
@success="importSuccess"
:updateIsDisable="true"
:appendIsDisable="true"
:mode="3"
/>
</template>
<script setup lang="ts">
@ -158,6 +165,21 @@ const buttonTableClick = async (val, row) => {
/** 添加/修改操作 */
const basicFormRef = ref()
const openForm = (type: string, row?: any) => {
if(type=='create'){
CountConfig.allSchemas.formSchema.forEach(item =>{
if(item.field == "itemCode"){
item.componentProps.isSearchList = true
item.componentProps.disabled = false
}
})
} else if(type=='update'){
CountConfig.allSchemas.formSchema.forEach(item =>{
if(item.field == "itemCode"){
item.componentProps.isSearchList = false
item.componentProps.disabled = true
}
})
}
basicFormRef.value.open(type, row)
}

Loading…
Cancel
Save