Browse Source

客户退货申请--发货记录单号根据客户代码查询

master_hella_20240701
yufei0306 6 months ago
parent
commit
ff7980cb56
  1. 10
      README.md
  2. 6
      src/components/BasicForm/src/BasicForm.vue
  3. 65
      src/views/wms/deliversettlementManage/customerreturn/customerreturnRequestMain/customerreturnRequestMain.data.ts
  4. 33
      src/views/wms/deliversettlementManage/customerreturn/customerreturnRequestMain/index.vue

10
README.md

@ -21,6 +21,16 @@ form: {
message: '请选择生产线信息!', // 当前置条件为空时 弹出信息提示
isMainValue: true // 表示查询条件是主表的字段的值
},
{
key: 'customerCode', // 查询列表中字段
value: 'customerCode', // 指查询具体值
action: '==', // 查询拼接条件
isSearch: true, // 使用自定义拼接条件
isMainValue: false // 拼接条件必须要 false 同时不能与 isMainValue: true 同用
isFormModel:true, // filters中添加筛选的数据--取于formModel
required:true, // 前置添加必有,和isFormModel结合使用
message: '请选择客户代码!', // 前置添加没填的提示语
}
{
key:'available', // 查询列表中字段
value:'TRUE', // 指查询具体值

6
src/components/BasicForm/src/BasicForm.vue

@ -396,6 +396,12 @@ const opensearchTable = (
if (searchCondition[i].isSearch) {
if (searchCondition[i].isFormModel) {
//formModel
if(searchCondition[i].required){
if (formRef.value.formModel[searchCondition[i].value] == '' ||formRef.value.formModel[searchCondition[i].value] == undefined) {
message.warning(searchCondition[i].message?searchCondition[i].message:'前置条件未选择!')
return
}
}
filters.push({
action: searchCondition[i].action,
column: searchCondition[i].key,

65
src/views/wms/deliversettlementManage/customerreturn/customerreturnRequestMain/customerreturnRequestMain.data.ts

@ -78,6 +78,32 @@ export const CustomerreturnRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
},
isSearch: true,
},
{
label: '客户代码',
field: 'customerCode',
sort: 'custom',
table: {
width: 150
},
isSearch: true,
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
enterSearch: true,
isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择客户代码', // 输入框占位文本
searchField: 'code', // 查询弹窗赋值字段
searchTitle: '客户信息', // 查询弹窗标题
searchAllSchemas: Customer.allSchemas, // 查询弹窗所需类
searchPage: CustomerApi.getCustomerPage, // 查询弹窗所需分页方法
searchCondition: [{
key: 'available',
value: 'TRUE',
isMainValue: false
}]
}
}
},
{
label: '发货记录单号',
field: 'deliverRecordNumber',
@ -107,35 +133,22 @@ export const CustomerreturnRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
action: 'betweeen', // 查询拼接条件
isSearch: true, // 使用自定义拼接条件
isMainValue: false // 拼接条件必须要 false 同时不能与 isMainValue: true 同用
}]
}
}
},
{
label: '客户代码',
field: 'customerCode',
sort: 'custom',
table: {
width: 150
},
isSearch: true,
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择客户代码', // 输入框占位文本
searchField: 'code', // 查询弹窗赋值字段
searchTitle: '客户信息', // 查询弹窗标题
searchAllSchemas: Customer.allSchemas, // 查询弹窗所需类
searchPage: CustomerApi.getCustomerPage, // 查询弹窗所需分页方法
searchCondition: [{
key: 'available',
value: 'TRUE',
isMainValue: false
}]
},
{
key: 'customerCode', // 查询列表中字段
value: 'customerCode', // 指查询具体值
action: '==', // 查询拼接条件
isSearch: true, // 使用自定义拼接条件
isFormModel:true, // filters中添加筛选的数据--取于formModel
required:true, // 前置添加必有
message: '请选择客户代码!', // 前置添加没填的提示语
isMainValue: false // 拼接条件必须要 false 同时不能与 isMainValue: true 同用
}
]
}
}
},
{
label: '发货计划单号',
field: 'deliverPlanNumber',

33
src/views/wms/deliversettlementManage/customerreturn/customerreturnRequestMain/index.vue

@ -58,6 +58,8 @@
@searchTableSuccess="searchTableSuccess"
@submitForm="submitForm"
:isShowButton = isShowButton
@onEnter="onEnter"
/>
<!-- 详情 -->
@ -88,6 +90,7 @@
:isShowReduceButton="false"
@submitForm="submitFormLabel"
@searchTableSuccess="searchTableSuccess"
/>
<!-- 标签打印 -->
<SearchTable style="width:905px" ref="showLabelRef" @searchTableSuccess="showLabelSuccess" />
@ -104,6 +107,7 @@ import { CustomerreturnRequestMain,CustomerreturnRequestMainRules,Customerreturn
import * as CustomerreturnRequestMainApi from '@/api/wms/customerreturnRequestMain'
import * as CustomerreturnRequestDetailApi from '@/api/wms/customerreturnRequestDetail'
import * as defaultButtons from '@/utils/disposition/defaultButtons'
import { DeliverRecordMain,DeliverRecordDetail } from '../../deliver/deliverRecordMain/deliverRecordMain.data'
import * as DeliverRecordDetailApi from '@/api/wms/deliverRecordDetail'
import {
SupplierdeliverRequestPackage
@ -129,7 +133,34 @@ const isShowButton = ref(true)
const updataTableColumns = (val) => {
tableColumns.value = val
}
const onEnter = async (field,value)=>{
console.log('onEnter',field,value)
const dateTime = new Date().getTime()
if(field=='customerCode'){
//---
formRef.value.opensearchTable('deliverRecordNumber', 'number', '发货记录信息', DeliverRecordMain.allSchemas, DeliverRecordDetailApi.getDeliverRecordDetailPage,[{
key: 'available',
value: 'TRUE',
isMainValue: false
},
{
key: 'createTime', //
value: dateTime - 30 * 24 * 60 * 60 * 1000 + "," + dateTime, //
action: 'betweeen', //
isSearch: true, // 使
isMainValue: false // false isMainValue: true
},
{
key: 'customerCode', //
value: 'customerCode', //
action: '==', //
isSearch: true, // 使
isFormModel:true,
isMainValue: false // false isMainValue: true
}
],undefined,undefined,null,true,DeliverRecordDetail.allSchemas)
}
}
//
const searchTableSuccess = (formField, searchField, val, formRef, type, row ) => {
nextTick(() => {

Loading…
Cancel
Save