Browse Source

包装信息展示新增按钮、物料代码和物料名称赋值

linshi20240813
TengXF 3 months ago
parent
commit
f8fe927bb7
  1. 10
      src/views/wms/inventoryManage/package/index.vue
  2. 23
      src/views/wms/inventoryManage/package/package.data.ts

10
src/views/wms/inventoryManage/package/index.vue

@ -89,9 +89,11 @@ const searchTableParams = ref([
// //
const searchTableSuccess = (formField, searchField, val, basicFormRef, type, row ) => { const searchTableSuccess = (formField, searchField, val, basicFormRef, type, row ) => {
nextTick(() => { nextTick(() => {
const setV = {} const setV = {}
setV[formField] = val[0][searchField] setV[formField] = val[0][searchField]
basicFormRef.setValues(setV) setV['itemName'] = val[0]['name']
basicFormRef.setValues(setV)
basicFormRef.setValues(setV)
}) })
} }
@ -103,7 +105,7 @@ const { getList, setSearchParams } = tableMethods
// //
const HeadButttondata = [ const HeadButttondata = [
// defaultButtons.defaultAddBtn({hasPermi:'wms:package:create'}), // defaultButtons.defaultAddBtn({hasPermi:'wms:package:create'}), //
// defaultButtons.defaultImportBtn({hasPermi:'wms:package:import'}), // // defaultButtons.defaultImportBtn({hasPermi:'wms:package:import'}), //
defaultButtons.defaultExportBtn({hasPermi:'wms:package:export'}), // defaultButtons.defaultExportBtn({hasPermi:'wms:package:export'}), //
defaultButtons.defaultFreshBtn(null), // defaultButtons.defaultFreshBtn(null), //

23
src/views/wms/inventoryManage/package/package.data.ts

@ -1,5 +1,7 @@
import type { CrudSchema } from '@/hooks/web/useCrudSchemas' import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
import { dateFormatter,dateFormatter2 } from '@/utils/formatTime' import { dateFormatter,dateFormatter2 } from '@/utils/formatTime'
import {Itembasic} from "@/views/wms/basicDataManage/itemManage/itembasic/itembasic.data";
import * as ItembasicApi from "@/api/wms/itembasic";
// 表单校验 // 表单校验
export const PackageRules = reactive({ export const PackageRules = reactive({
@ -31,10 +33,27 @@ export const Package = useCrudSchemas(reactive<CrudSchema[]>([
label: '物料代码', label: '物料代码',
field: 'itemCode', field: 'itemCode',
sort: 'custom', sort: 'custom',
isSearch: true,
table: { table: {
width: 150, width: 150
},
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
enterSearch: true,
isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择物料代码', // 输入框占位文本
searchField: 'code', // 查询弹窗赋值字段
searchTitle: '物料基础信息', // 查询弹窗标题
searchAllSchemas: Itembasic.allSchemas, // 查询弹窗所需类
searchPage: ItembasicApi.getItembasicPage, // 查询弹窗所需分页方法
searchCondition: [{
key: 'available',
value: 'TRUE',
isMainValue: false
}]
}
}, },
isSearch: true
}, },
{ {
label: '物料名称', label: '物料名称',

Loading…
Cancel
Save