From e5105ab16b75715353ca1af4ff58831e3c249433 Mon Sep 17 00:00:00 2001 From: yufei_wang <2267742828@qq.com> Date: Fri, 15 Nov 2024 17:20:52 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8F=91=E8=B4=A7=E7=AD=96=E7=95=A5=EF=BC=8C?= =?UTF-8?q?=E8=A1=A5=E6=96=99=E7=AD=96=E7=95=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../strategy/deliverStrategy/AddForm.vue | 66 ++++++++++++++----- .../repairMaterialStrategy/AddForm.vue | 4 +- 2 files changed, 51 insertions(+), 19 deletions(-) diff --git a/src/views/wms/basicDataManage/strategySetting/strategy/deliverStrategy/AddForm.vue b/src/views/wms/basicDataManage/strategySetting/strategy/deliverStrategy/AddForm.vue index 849c8a15c..5c8ceaa67 100644 --- a/src/views/wms/basicDataManage/strategySetting/strategy/deliverStrategy/AddForm.vue +++ b/src/views/wms/basicDataManage/strategySetting/strategy/deliverStrategy/AddForm.vue @@ -205,24 +205,13 @@ :key="'供应商和客户Operator'+cur.value" /> - - - + + + @@ -495,6 +484,8 @@ import { Transactiontype } from '@/views/wms/basicDataManage/documentSetting/tra import { Productionline } from '@/views/wms/basicDataManage/factoryModeling/productionline/productionline.data' import * as ProductionlineApi from '@/api/wms/productionline' +import { Customer, CustomerRules } from '@/views/wms/basicDataManage/customerManage/customer/customer.data' +import * as CustomerApi from '@/api/wms/customer' const { t } = useI18n() // 国际化 @@ -831,6 +822,37 @@ const blurWarehouse = async ()=>{ }) } +// 供应商和客户 +const searchCustomerList = ()=>{ + searchTableRef.value.open( + '请选择客户', + Customer.allSchemas, + CustomerApi.getCustomerPage, + 'CustomerCode', + 'code', + true, + undefined, + undefined, + undefined + ) +} + +const blurCustomerList = async ()=>{ + let customerCode = formData.value.condition.find(item=>item['ParamCode']=='CustomerCode') + if(customerCode&&customerCode.Value){ + let verifyRes = await CustomerApi.getCustomerPage({ + code:customerCode.Value + }) + console.log('客户',verifyRes) + if(verifyRes&&verifyRes.length>0){ + let verifyList = verifyRes.map(item=>(item['code'])) + let codeList = customerCode.Value.split(',') + customerCode.Value = codeList.filter(item=>verifyList.indexOf(item)>-1).join(',') + }else{ + customerCode.Value = '' + } + } +} // 生产线 const searchTransactionType = ()=>{ searchTableRef.value.open( @@ -930,6 +952,14 @@ const searchTableSuccess = (formField, searchField, val, type, row) => { } return } + if(formField == 'CustomerCode'){ + //客户 + let customerCode = formData.value.condition.find(item=>item['ParamCode']=='CustomerCode') + if(customerCode){ + customerCode.Value = val.map(item=>(item['code'])).join(',') + } + return + } // let searchTableTitle = warehouseType.value == 'WarehouseCode'?'请选择仓库':warehouseType.value == 'AreaCode'?'请选择库区':warehouseType.value == 'LocationGroupCode'?'请选择库位组':warehouseType.value == 'LocationCode'?'请选择库位':'' console.log('searchTableSuccess',formField, searchField, val, type, row) console.log(val.map(item=>(item['code'])).join(',')) diff --git a/src/views/wms/basicDataManage/strategySetting/strategy/repairMaterialStrategy/AddForm.vue b/src/views/wms/basicDataManage/strategySetting/strategy/repairMaterialStrategy/AddForm.vue index a1861151d..180f8ff8a 100644 --- a/src/views/wms/basicDataManage/strategySetting/strategy/repairMaterialStrategy/AddForm.vue +++ b/src/views/wms/basicDataManage/strategySetting/strategy/repairMaterialStrategy/AddForm.vue @@ -287,7 +287,8 @@ @@ -311,6 +312,7 @@ import { getLocationgroupList } from '@/api/wms/locationgroup' import { getLocationList } from '@/api/wms/location' import * as RuleApi from '@/api/wms/rule' import { isString } from '@/utils/is' +import { validateHanset, validateEmail } from '@/utils/validator' import { DICT_TYPE, getStrDictOptions } from '@/utils/dict'