|
|
@ -205,24 +205,13 @@ |
|
|
|
:key="'供应商和客户Operator'+cur.value" |
|
|
|
/> |
|
|
|
</el-select> |
|
|
|
<el-select key="供应商和客户Value" |
|
|
|
v-model="item.Value" |
|
|
|
:placeholder="`请选择客户`" |
|
|
|
style="flex: 1" |
|
|
|
clearable |
|
|
|
multiple |
|
|
|
collapse-tags |
|
|
|
filterable |
|
|
|
:filter-method="filterMethod" |
|
|
|
:disabled="formData.priority==0&&formType=='update'" |
|
|
|
> |
|
|
|
<el-option |
|
|
|
v-for="cur in options.supplierList" |
|
|
|
:key="'供应商和客户Value'+cur.code" |
|
|
|
:label="cur.name" |
|
|
|
:value="cur.code" |
|
|
|
/> |
|
|
|
</el-select> |
|
|
|
<el-input key="供应商和客户Value" style="flex:1" placeholder="请选择客户" disabled v-model="item.Value" @blur="blurCustomerList"> |
|
|
|
<template #suffix> |
|
|
|
<el-button :disabled="formData.priority==0&&formType=='update'" type="text" plain style="color:var(--el-button-text-color)" @click="searchCustomerList"> |
|
|
|
<Icon icon="ep:search" class="mr-5px" /> |
|
|
|
</el-button> |
|
|
|
</template> |
|
|
|
</el-input> |
|
|
|
</el-form-item> |
|
|
|
|
|
|
|
<!-- 生产线 --> |
|
|
@ -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(',')) |
|
|
|