Browse Source

客户物料form表单可编辑

master_hella_20240701
wangyufei 5 months ago
parent
commit
4317826659
  1. 2
      src/views/wms/basicDataManage/customerManage/customeritem/customeritem.data.ts
  2. 24
      src/views/wms/basicDataManage/customerManage/customeritem/index.vue

2
src/views/wms/basicDataManage/customerManage/customeritem/customeritem.data.ts

@ -26,6 +26,7 @@ export const Customeritem = useCrudSchemas(reactive<CrudSchema[]>([
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
enterSearch:true,
isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择客户代码', // 输入框占位文本
searchField: 'code', // 查询弹窗赋值字段
@ -51,6 +52,7 @@ export const Customeritem = useCrudSchemas(reactive<CrudSchema[]>([
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
enterSearch: true,
isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择物料代码', // 输入框占位文本
searchField: 'code', // 查询弹窗赋值字段

24
src/views/wms/basicDataManage/customerManage/customeritem/index.vue

@ -41,12 +41,15 @@
<!-- 表单弹窗添加/修改 -->
<BasicForm
ref="basicFormRef"
:isOpenSearchTable="true"
fieldTableColumn="itemCode"
@success="formsSuccess"
:rules="CustomeritemRules"
:formAllSchemas="Customeritem.allSchemas"
:apiUpdate="CustomeritemApi.updateCustomeritem"
:apiCreate="CustomeritemApi.createCustomeritem"
@searchTableSuccess="searchTableSuccess"
@onEnter="onEnter"
:isBusiness="false"
/>
@ -66,6 +69,8 @@ import * as defaultButtons from '@/utils/disposition/defaultButtons'
import TableHead from '@/components/TableHead/src/TableHead.vue'
import ImportForm from '@/components/ImportForm/src/ImportForm.vue'
import Detail from '@/components/Detail/src/Detail.vue'
import * as ItembasicApi from '@/api/wms/itembasic'
import { Itembasic } from '../../itemManage/itembasic/itembasic.data'
defineOptions({ name: 'Customeritem' })
@ -199,7 +204,24 @@ const formsSuccess = async (formType,data) => {
basicFormRef.value.dialogVisible = false
getList()
}
const onEnter = async (field,value)=>{
console.log(field,value)
if(field=='itemCode'){
basicFormRef.value.opensearchTable('itemCode', 'code', '物料基础信息', Itembasic.allSchemas, ItembasicApi.getItembasicPage,[{
key: 'available',
value: 'TRUE',
action: '==',
isSearch: true,
isMainValue: false
},{
key: 'code',
value: value,
action: '==',
isSearch: true,
isMainValue: false
}])
}
}
//
const searchTableSuccess = (formField, searchField, val, formRef) => {
nextTick(() => {

Loading…
Cancel
Save