Browse Source

发货选择月台限制只能选发货口

master
chenfang 10 months ago
parent
commit
7bb6247118
  1. 11
      src/api/wms/customerdock/index.ts
  2. 2
      src/views/wms/deliversettlementManage/deliver/deliverRequestMain/deliverRequestMain.data.ts
  3. 26
      src/views/wms/deliversettlementManage/deliver/deliverRequestMain/index.vue
  4. 33
      src/views/wms/deliversettlementManage/deliverplan/deliverPlanMain/deliverPlanMain.data.ts
  5. 20
      src/views/wms/deliversettlementManage/deliverplan/deliverPlanMain/index.vue

11
src/api/wms/customerdock/index.ts

@ -62,3 +62,14 @@ export const exportCustomerdock = async (params) => {
export const importTemplate = () => { export const importTemplate = () => {
return request.download({ url: '/wms/customerdock/get-import-template' }) return request.download({ url: '/wms/customerdock/get-import-template' })
} }
// 查询客户月台列表
export const pageCustomerCodeToCustomerDock = async (params) => {
if (params.isSearch) {
delete params.isSearch
const data = {...params}
return request.post({ url: '/wms/customerdock/pageCustomerCodeToCustomerDockSenior', data })
} else {
return await request.get({ url: `/wms/customerdock/pageCustomerCodeToCustomerDock`, params })
}
}

2
src/views/wms/deliversettlementManage/deliver/deliverRequestMain/deliverRequestMain.data.ts

@ -146,7 +146,7 @@ export const DeliverRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
searchField: 'code', // 查询弹窗赋值字段 searchField: 'code', // 查询弹窗赋值字段
searchTitle: '客户月台信息', // 查询弹窗标题 searchTitle: '客户月台信息', // 查询弹窗标题
searchAllSchemas: Customerdock.allSchemas, // 查询弹窗所需类 searchAllSchemas: Customerdock.allSchemas, // 查询弹窗所需类
searchPage: CustomerdockApi.getCustomerdockPage, // 查询弹窗所需分页方法 searchPage: CustomerdockApi.pageCustomerCodeToCustomerDock, // 查询弹窗所需分页方法
searchCondition: [{ searchCondition: [{
key: 'available', key: 'available',
value: 'TRUE', value: 'TRUE',

26
src/views/wms/deliversettlementManage/deliver/deliverRequestMain/index.vue

@ -100,6 +100,7 @@ const { t } = useI18n() // 国际化
const route = useRoute() // const route = useRoute() //
const routeName = ref() const routeName = ref()
routeName.value = route.name routeName.value = route.name
const customerCode = ref()
const tableColumns = ref(DeliverRequestMain.allSchemas.tableColumns) const tableColumns = ref(DeliverRequestMain.allSchemas.tableColumns)
const isShowButton = ref(true) const isShowButton = ref(true)
@ -144,6 +145,31 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) =>
item.tableForm.disabled = true item.tableForm.disabled = true
} }
}) })
// tableform
if(formField == 'customerCode'){
console.log(1111,val);
customerCode.value = val[0]['code']
console.log(11112,customerCode.value);
}
DeliverRequestMain.allSchemas.tableFormColumns.map(item => {
if(item.field == 'customerDockCode') {
item.tableForm.searchCondition = [
{
key: 'customerCode',
value: customerCode.value ,
isMainValue: true
}]
item.form.componentProps.searchCondition = [
{
key: 'customerCode',
value: customerCode.value ,
isMainValue: true
}]}
else {
delete item.tableForm.searchCondition
delete item.form.componentProps.searchCondition
}
})
}).catch(err => { }).catch(err => {
console.log(err) console.log(err)
message.error('错误') message.error('错误')

33
src/views/wms/deliversettlementManage/deliverplan/deliverPlanMain/deliverPlanMain.data.ts

@ -10,13 +10,6 @@ import { Customerdock } from '@/views/wms/basicDataManage/customerManage/custome
import * as CustomerItemApi from '@/api/wms/customeritem' import * as CustomerItemApi from '@/api/wms/customeritem'
import { Customeritem } from '@/views/wms/basicDataManage/customerManage/customeritem/customeritem.data' import { Customeritem } from '@/views/wms/basicDataManage/customerManage/customeritem/customeritem.data'
import * as SaleMainApi from '@/api/wms/saleMain'
import * as SaleDetailApi from '@/api/wms/saleDetail'
import { SaleDetail, SaleMain } from '../saleMain/saleMain.data'
import * as ItembasicApi from '@/api/wms/itembasic'
import { Itembasic } from '@/views/wms/basicDataManage/itemManage/itembasic/itembasic.data'
const { t } = useI18n() // 国际化 const { t } = useI18n() // 国际化
/** /**
@ -328,11 +321,11 @@ export const DeliverPlanDetail = useCrudSchemas(reactive<CrudSchema[]>([
}, },
tableForm:{ tableForm:{
isInpuFocusShow: true, // 开启查询弹窗 isInpuFocusShow: true, // 开启查询弹窗
searchListPlaceholder: '请选择物料代码', searchListPlaceholder: '请选择客户月台代码',
searchField: 'code', searchField: 'code',
searchTitle: '物料基础信息', searchTitle: '客户月台基础信息',
searchAllSchemas: Customerdock.allSchemas, searchAllSchemas: Customerdock.allSchemas,
searchPage: CustomerDockApi.getCustomerdockPage, searchPage: CustomerDockApi.pageCustomerCodeToCustomerDock,
searchCondition: [{ searchCondition: [{
key: 'available', key: 'available',
value: 'TRUE', value: 'TRUE',
@ -343,7 +336,25 @@ export const DeliverPlanDetail = useCrudSchemas(reactive<CrudSchema[]>([
isMainValue: true isMainValue: true
}] }]
}, },
isForm: false, form: {
componentProps: {
isSearchList: true,
searchListPlaceholder: '请选择客户月台代码',
searchField: 'code',
searchTitle: '客户月台基础信息',
searchAllSchemas: Customerdock.allSchemas,
searchPage: CustomerDockApi.pageCustomerCodeToCustomerDock,
searchCondition: [{
key: 'available',
value: 'TRUE',
isMainValue: false
},{
key: 'customerCode',
value: 'customerCode',
isMainValue: true
}]
}
},
}, },
{ {
label: '项目', label: '项目',

20
src/views/wms/deliversettlementManage/deliverplan/deliverPlanMain/index.vue

@ -91,6 +91,7 @@ const { t } = useI18n() // 国际化
const route = useRoute() // const route = useRoute() //
const routeName = ref() const routeName = ref()
routeName.value = route.name routeName.value = route.name
const customerCode = ref()
const tableColumns = ref(DeliverPlanMain.allSchemas.tableColumns) const tableColumns = ref(DeliverPlanMain.allSchemas.tableColumns)
// //
@ -101,6 +102,25 @@ const updataTableColumns = (val) => {
// //
const searchTableSuccess = (formField, searchField, val, formRef, type, row ) => { const searchTableSuccess = (formField, searchField, val, formRef, type, row ) => {
nextTick(() => { nextTick(() => {
// tableform
if(formField == 'customerCode'){
customerCode.value = val[0]['code']
}
DeliverPlanDetail.allSchemas.tableFormColumns.map(item => {
if(item.field == 'customerDockCode') {
item.tableForm.searchCondition = [
{
key: 'customerCode',
value: customerCode.value ,
isMainValue: false
}]
item.form.componentProps.searchCondition = [
{
key: 'customerCode',
value: customerCode.value ,
isMainValue: false
}]}
})
if (type == 'tableForm') { if (type == 'tableForm') {
if(formField == 'itemCode') { if(formField == 'itemCode') {
row['uom'] = val[0]['customerUom'] row['uom'] = val[0]['customerUom']

Loading…
Cancel
Save