Browse Source

发货策略,补料策略

intex
yufei_wang 2 weeks ago
parent
commit
e5105ab16b
  1. 66
      src/views/wms/basicDataManage/strategySetting/strategy/deliverStrategy/AddForm.vue
  2. 4
      src/views/wms/basicDataManage/strategySetting/strategy/repairMaterialStrategy/AddForm.vue

66
src/views/wms/basicDataManage/strategySetting/strategy/deliverStrategy/AddForm.vue

@ -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(','))

4
src/views/wms/basicDataManage/strategySetting/strategy/repairMaterialStrategy/AddForm.vue

@ -287,7 +287,8 @@
<el-form-item label="邮箱地址"
prop="configuration.emailAddress"
:rules="[
{ required: true, message: '请输入邮箱地址', trigger: 'change' },
{ required: formData.configuration.emailNotification, message: '请输入邮箱地址', trigger: 'change' },
{ validator:validateEmail, message: '请输入正确的邮箱格式', trigger: 'blur'}
]">
<el-input v-model="formData.configuration.emailAddress" />
</el-form-item>
@ -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'

Loading…
Cancel
Save