|
@ -16,7 +16,7 @@ |
|
|
<el-row> |
|
|
<el-row> |
|
|
<el-col :span="24"> |
|
|
<el-col :span="24"> |
|
|
<el-form-item label="代码" prop="strategyCode"> |
|
|
<el-form-item label="代码" prop="strategyCode"> |
|
|
<el-input |
|
|
<el-input key="strategyCode" |
|
|
v-model="formData.strategyCode" |
|
|
v-model="formData.strategyCode" |
|
|
placeholder="请输入代码" |
|
|
placeholder="请输入代码" |
|
|
clearable |
|
|
clearable |
|
@ -26,38 +26,38 @@ |
|
|
</el-col> |
|
|
</el-col> |
|
|
<el-col :span="24"> |
|
|
<el-col :span="24"> |
|
|
<el-form-item label="名称" prop="name"> |
|
|
<el-form-item label="名称" prop="name"> |
|
|
<el-input v-model="formData.name" placeholder="请输入名称" clearable /> |
|
|
<el-input key="name" v-model="formData.name" placeholder="请输入名称" clearable /> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
</el-col> |
|
|
</el-col> |
|
|
<el-col :span="24"> |
|
|
<el-col :span="24"> |
|
|
<el-form-item label="描述" prop="description"> |
|
|
<el-form-item label="描述" prop="description"> |
|
|
<el-input v-model="formData.description" placeholder="请输入描述" clearable /> |
|
|
<el-input key="description" v-model="formData.description" placeholder="请输入描述" clearable /> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
</el-col> |
|
|
</el-col> |
|
|
<el-col :span="12"> |
|
|
<el-col :span="12"> |
|
|
<el-form-item label="优先级" prop="priority"> |
|
|
<el-form-item label="优先级" prop="priority"> |
|
|
<el-input-number v-model="formData.priority" :min="0" /> |
|
|
<el-input-number key="priority" v-model="formData.priority" :min="0" /> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
</el-col> |
|
|
</el-col> |
|
|
<el-col :span="12"> |
|
|
<el-col :span="12"> |
|
|
<el-form-item label="状态" prop="status"> |
|
|
<el-form-item label="状态" prop="status"> |
|
|
<el-switch v-model="formData.status" /> |
|
|
<el-switch key="status" v-model="formData.status" /> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
</el-col> |
|
|
</el-col> |
|
|
</el-row> |
|
|
</el-row> |
|
|
</div> |
|
|
</div> |
|
|
<!-- 规则条件 --> |
|
|
<!-- 规则条件 --> |
|
|
<div class="item mt-20px"> |
|
|
<div key="规则条件" class="item mt-20px"> |
|
|
<div class="title">规则条件</div> |
|
|
<div key="规则条件title" class="title">规则条件</div> |
|
|
<el-row> |
|
|
<el-row key="规则条件row"> |
|
|
<el-col :span="24" v-for="(item, index) in formData.condition" :key="index"> |
|
|
<el-col :span="24" v-for="(item, index) in formData.condition" :key="'规则条件row'+index"> |
|
|
<!-- 供应商类型 --> |
|
|
<!-- 供应商类型 --> |
|
|
<el-form-item |
|
|
<el-form-item key="供应商类型formItem" |
|
|
v-if="item.ParamCode == 'SupplierType'" |
|
|
v-if="item.ParamCode == 'SupplierType'" |
|
|
label="供应商类型" |
|
|
label="供应商类型" |
|
|
class="flex-top err-120" |
|
|
class="flex-top err-120" |
|
|
> |
|
|
> |
|
|
<el-select |
|
|
<el-select key="供应商类型Operator" |
|
|
v-model="item.Operator" |
|
|
v-model="item.Operator" |
|
|
placeholder="请选择范围" |
|
|
placeholder="请选择范围" |
|
|
style="width: 110px; margin-right: 10px" |
|
|
style="width: 110px; margin-right: 10px" |
|
@ -66,10 +66,10 @@ |
|
|
:label="cur.label" |
|
|
:label="cur.label" |
|
|
:value="cur.value" |
|
|
:value="cur.value" |
|
|
v-for="cur in options.supplierTypeRangeOptions" |
|
|
v-for="cur in options.supplierTypeRangeOptions" |
|
|
:key="cur.value" |
|
|
:key="'供应商类型Operator'+cur.value" |
|
|
/> |
|
|
/> |
|
|
</el-select> |
|
|
</el-select> |
|
|
<el-select |
|
|
<el-select key="供应商类型Value" |
|
|
v-model="item.Value" |
|
|
v-model="item.Value" |
|
|
placeholder="请选择供应商类型" |
|
|
placeholder="请选择供应商类型" |
|
|
style="flex: 1" |
|
|
style="flex: 1" |
|
@ -78,19 +78,19 @@ |
|
|
> |
|
|
> |
|
|
<el-option |
|
|
<el-option |
|
|
v-for="dict in getStrDictOptions(DICT_TYPE.SUPPLIER_TYPE)" |
|
|
v-for="dict in getStrDictOptions(DICT_TYPE.SUPPLIER_TYPE)" |
|
|
:key="dict.value" |
|
|
:key="'供应商类型Value'+dict.value" |
|
|
:label="dict.label" |
|
|
:label="dict.label" |
|
|
:value="dict.value" |
|
|
:value="dict.value" |
|
|
/> |
|
|
/> |
|
|
</el-select> |
|
|
</el-select> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
<!-- 供应商 --> |
|
|
<!-- 供应商 --> |
|
|
<el-form-item |
|
|
<el-form-item key="供应商formItem" |
|
|
v-else-if="item.ParamCode == 'SupplierCode'" |
|
|
v-else-if="item.ParamCode == 'SupplierCode'" |
|
|
label="供应商" |
|
|
label="供应商" |
|
|
class="err-120" |
|
|
class="err-120" |
|
|
> |
|
|
> |
|
|
<el-select |
|
|
<el-select key="供应商Operator" |
|
|
v-model="item.Operator" |
|
|
v-model="item.Operator" |
|
|
placeholder="请选择范围" |
|
|
placeholder="请选择范围" |
|
|
style="width: 110px; margin-right: 10px" |
|
|
style="width: 110px; margin-right: 10px" |
|
@ -99,10 +99,10 @@ |
|
|
:label="cur.label" |
|
|
:label="cur.label" |
|
|
:value="cur.value" |
|
|
:value="cur.value" |
|
|
v-for="cur in options.supplierRangeOptions" |
|
|
v-for="cur in options.supplierRangeOptions" |
|
|
:key="cur.value" |
|
|
:key="'供应商Operator'+cur.value" |
|
|
/> |
|
|
/> |
|
|
</el-select> |
|
|
</el-select> |
|
|
<el-select |
|
|
<el-select key="供应商Value" |
|
|
v-model="item.Value" |
|
|
v-model="item.Value" |
|
|
placeholder="请选择供应商" |
|
|
placeholder="请选择供应商" |
|
|
style="flex: 1" |
|
|
style="flex: 1" |
|
@ -112,19 +112,19 @@ |
|
|
> |
|
|
> |
|
|
<el-option |
|
|
<el-option |
|
|
v-for="cur in options.supplierList" |
|
|
v-for="cur in options.supplierList" |
|
|
:key="cur.code" |
|
|
:key="'供应商Value'+cur.code" |
|
|
:label="cur.name" |
|
|
:label="cur.name" |
|
|
:value="cur.code" |
|
|
:value="cur.code" |
|
|
/> |
|
|
/> |
|
|
</el-select> |
|
|
</el-select> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
<!-- 星期几 --> |
|
|
<!-- 星期几 --> |
|
|
<el-form-item |
|
|
<el-form-item key="星期几formItem" |
|
|
v-else-if="item.ParamCode == 'Weekday'" |
|
|
v-else-if="item.ParamCode == 'Weekday'" |
|
|
label="星期几" |
|
|
label="星期几" |
|
|
class="flex-top err-120" |
|
|
class="flex-top err-120" |
|
|
> |
|
|
> |
|
|
<el-select |
|
|
<el-select key="星期几Operator" |
|
|
v-model="item.Operator" |
|
|
v-model="item.Operator" |
|
|
placeholder="请选择范围" |
|
|
placeholder="请选择范围" |
|
|
style="width: 110px; margin-right: 10px" |
|
|
style="width: 110px; margin-right: 10px" |
|
@ -133,7 +133,7 @@ |
|
|
:label="cur.label" |
|
|
:label="cur.label" |
|
|
:value="cur.value" |
|
|
:value="cur.value" |
|
|
v-for="cur in options.weekRangeOptions" |
|
|
v-for="cur in options.weekRangeOptions" |
|
|
:key="cur.value" |
|
|
:key="'星期几Operator'+cur.value" |
|
|
/> |
|
|
/> |
|
|
</el-select> |
|
|
</el-select> |
|
|
<div class="checkbox"> |
|
|
<div class="checkbox"> |
|
@ -141,7 +141,7 @@ |
|
|
<el-checkbox |
|
|
<el-checkbox |
|
|
:label="cur.label" |
|
|
:label="cur.label" |
|
|
v-for="cur in options.weekOptions" |
|
|
v-for="cur in options.weekOptions" |
|
|
:key="cur.value" |
|
|
:key="'星期几Value'+cur.value" |
|
|
/> |
|
|
/> |
|
|
</el-checkbox-group> |
|
|
</el-checkbox-group> |
|
|
</div> |
|
|
</div> |
|
@ -150,14 +150,14 @@ |
|
|
</el-row> |
|
|
</el-row> |
|
|
</div> |
|
|
</div> |
|
|
<!-- 规则配置 --> |
|
|
<!-- 规则配置 --> |
|
|
<div class="item mt-20px"> |
|
|
<div class="item mt-20px" key="规则配置"> |
|
|
<div class="title">规则配置</div> |
|
|
<div class="title" key="规则配置title">规则配置</div> |
|
|
<el-row> |
|
|
<el-row key="规则配置Row"> |
|
|
<!-- 开始时间 --> |
|
|
<!-- 开始时间 --> |
|
|
<el-col :span="24"> |
|
|
<el-col :span="24" key="规则配置Col"> |
|
|
<!-- 开始时间 --> |
|
|
<!-- 开始时间 --> |
|
|
<el-form-item label="开始时间" prop="BeginTime"> |
|
|
<el-form-item key="开始时间formItem" label="开始时间" prop="BeginTime"> |
|
|
<el-time-select |
|
|
<el-time-select key="开始时间time" |
|
|
v-model="formData.configuration.BeginTime" |
|
|
v-model="formData.configuration.BeginTime" |
|
|
start="00:00" |
|
|
start="00:00" |
|
|
end="23:59" |
|
|
end="23:59" |
|
@ -167,8 +167,8 @@ |
|
|
/> |
|
|
/> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
<!-- 结束时间 --> |
|
|
<!-- 结束时间 --> |
|
|
<el-form-item label="结束时间" prop="EndTime"> |
|
|
<el-form-item key="结束时间formItem" label="结束时间" prop="EndTime"> |
|
|
<el-time-select |
|
|
<el-time-select key="结束时间time" |
|
|
v-model="formData.configuration.EndTime" |
|
|
v-model="formData.configuration.EndTime" |
|
|
start="00:00" |
|
|
start="00:00" |
|
|
end="23:59" |
|
|
end="23:59" |
|
@ -178,8 +178,8 @@ |
|
|
/> |
|
|
/> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
<!-- 仓库 --> |
|
|
<!-- 仓库 --> |
|
|
<el-form-item label="仓库" prop="WarehouseCode"> |
|
|
<el-form-item key="仓库formItem" label="仓库" prop="WarehouseCode"> |
|
|
<el-select |
|
|
<el-select key="仓库" |
|
|
v-model="formData.configuration.WarehouseCode" |
|
|
v-model="formData.configuration.WarehouseCode" |
|
|
:placeholder="`请选择${ |
|
|
:placeholder="`请选择${ |
|
|
formData.configuration.WarehouseCode == 'WarehouseCode' |
|
|
formData.configuration.WarehouseCode == 'WarehouseCode' |
|
@ -196,49 +196,51 @@ |
|
|
> |
|
|
> |
|
|
<el-option |
|
|
<el-option |
|
|
v-for="cur in options.warehouseList" |
|
|
v-for="cur in options.warehouseList" |
|
|
:key="cur.code" |
|
|
:key="'仓库'+cur.code" |
|
|
:label="cur.code" |
|
|
:label="cur.code" |
|
|
:value="cur.code" |
|
|
:value="cur.code" |
|
|
/> |
|
|
/> |
|
|
</el-select> |
|
|
</el-select> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
<!-- 月台 --> |
|
|
<!-- 月台 --> |
|
|
<el-form-item label="月台" prop="DockCode"> |
|
|
<el-form-item key="月台formItem" label="月台" prop="DockCode"> |
|
|
<el-select |
|
|
<el-select key="月台" |
|
|
v-model="formData.configuration.DockCode" |
|
|
v-model="formData.configuration.DockCode" |
|
|
placeholder="请选择月台" |
|
|
placeholder="请选择月台" |
|
|
clearable |
|
|
clearable |
|
|
> |
|
|
> |
|
|
<el-option |
|
|
<el-option |
|
|
v-for="cur in options.dockList" |
|
|
v-for="cur in options.dockList" |
|
|
:key="cur.code" |
|
|
:key="'月台'+cur.code" |
|
|
:label="cur.code" |
|
|
:label="cur.code" |
|
|
:value="cur.code" |
|
|
:value="cur.code" |
|
|
/> |
|
|
/> |
|
|
</el-select> |
|
|
</el-select> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
<!-- 在途库位 --> |
|
|
<!-- 在途库位 --> |
|
|
<el-form-item label="在途库位" prop="OnTheWayLocationCode"> |
|
|
<el-form-item key="在途库位formItem" label="在途库位" prop="OnTheWayLocationCode"> |
|
|
<el-select |
|
|
<el-select key="在途库位" |
|
|
v-model="formData.configuration.OnTheWayLocationCode" |
|
|
v-model="formData.configuration.OnTheWayLocationCode" |
|
|
placeholder="请选择在途库位" |
|
|
placeholder="请选择在途库位" |
|
|
clearable |
|
|
clearable |
|
|
|
|
|
filterable |
|
|
|
|
|
:filter-method="filterMethodFromLocation" |
|
|
> |
|
|
> |
|
|
<el-option |
|
|
<el-option |
|
|
v-for="cur in options.locationList" |
|
|
v-for="cur in options.locationList" |
|
|
:key="cur.code" |
|
|
:key="'在途库位'+cur.code" |
|
|
:label="cur.code" |
|
|
:label="cur.code" |
|
|
:value="cur.code" |
|
|
:value="cur.code" |
|
|
/> |
|
|
/> |
|
|
</el-select> |
|
|
</el-select> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
<!-- 收货人 --> |
|
|
<!-- 收货人 --> |
|
|
<el-form-item label="收货人" prop="Receiver"> |
|
|
<el-form-item key="收货人formItem" label="收货人" prop="Receiver"> |
|
|
<el-input v-model="formData.configuration.Receiver" placeholder="请输入收货人名称" clearable /> |
|
|
<el-input key="收货人" v-model="formData.configuration.Receiver" placeholder="请输入收货人名称" clearable /> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
<!-- 在途库位 --> |
|
|
<!-- 在途库位 --> |
|
|
<el-form-item label="联系电话" prop="configuration.PhoneNumber"> |
|
|
<el-form-item key="联系电话formItem" label="联系电话" prop="configuration.PhoneNumber"> |
|
|
<el-input v-model="formData.configuration.PhoneNumber" placeholder="请输入联系电话" clearable /> |
|
|
<el-input key="联系电话" v-model="formData.configuration.PhoneNumber" placeholder="请输入联系电话" clearable /> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
</el-col> |
|
|
</el-col> |
|
|
</el-row> |
|
|
</el-row> |
|
@ -363,7 +365,8 @@ const options = reactive({ |
|
|
//月台列表 |
|
|
//月台列表 |
|
|
dockList: [], |
|
|
dockList: [], |
|
|
//在途库位列表 |
|
|
//在途库位列表 |
|
|
locationList: [] |
|
|
locationList: [], |
|
|
|
|
|
originLocationList: [] |
|
|
}) |
|
|
}) |
|
|
// 弹窗按钮 |
|
|
// 弹窗按钮 |
|
|
const Butttondata = ref([ |
|
|
const Butttondata = ref([ |
|
@ -407,15 +410,35 @@ const getFormWarehouseList = async () => { |
|
|
const getFormDockList = async () => { |
|
|
const getFormDockList = async () => { |
|
|
options.dockList = await getDockList() |
|
|
options.dockList = await getDockList() |
|
|
} |
|
|
} |
|
|
|
|
|
const filterMethodFromLocation = (query: string) => { |
|
|
|
|
|
if (query) { |
|
|
|
|
|
options.locationList = options.originLocationList.filter((item) => { |
|
|
|
|
|
return item?.code.includes(query) |
|
|
|
|
|
}) |
|
|
|
|
|
} else { |
|
|
|
|
|
options.locationList = options.originLocationList |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
// 获取库位列表 |
|
|
// 获取库位列表 |
|
|
const getFormLocationList = async () => { |
|
|
const getFormLocationList = async () => { |
|
|
|
|
|
if(!options.locationList || options.locationList.length==0){ |
|
|
options.locationList = await getLocationList({ type: 'TRANSPORT' }) |
|
|
options.locationList = await getLocationList({ type: 'TRANSPORT' }) |
|
|
|
|
|
options.originLocationList = [...options.locationList] |
|
|
|
|
|
}else{ |
|
|
|
|
|
options.locationList = [] |
|
|
|
|
|
let timer = setTimeout(()=>{ |
|
|
|
|
|
options.locationList = options.originLocationList |
|
|
|
|
|
if(timer){ |
|
|
|
|
|
clearTimeout(timer) |
|
|
|
|
|
} |
|
|
|
|
|
},2000) |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
getFormSupplierList() |
|
|
getFormSupplierList() |
|
|
getFormWarehouseList() |
|
|
getFormWarehouseList() |
|
|
getFormDockList() |
|
|
getFormDockList() |
|
|
getFormLocationList() |
|
|
|
|
|
|
|
|
|
|
|
/** 打开弹窗 */ |
|
|
/** 打开弹窗 */ |
|
|
const open = async (type: string, strategyCode: string, id?: number) => { |
|
|
const open = async (type: string, strategyCode: string, id?: number) => { |
|
@ -469,6 +492,7 @@ const open = async (type: string, strategyCode: string, id?: number) => { |
|
|
defaultButtons.formCloseBtn(null) // 关闭 |
|
|
defaultButtons.formCloseBtn(null) // 关闭 |
|
|
] |
|
|
] |
|
|
} |
|
|
} |
|
|
|
|
|
getFormLocationList() |
|
|
} |
|
|
} |
|
|
defineExpose({ open }) // 提供 open 方法,用于打开弹窗 |
|
|
defineExpose({ open }) // 提供 open 方法,用于打开弹窗 |
|
|
|
|
|
|
|
|