Browse Source

Merge branch 'master_hella' of http://dev.ccwin-in.com:3000/sfms3.0/sfms3.0-ui into master_hella

master_hella_20240701
zhousq 6 months ago
parent
commit
e40e6e0004
  1. 116
      src/views/wms/basicDataManage/strategySetting/strategy/supplieDeliveryStrategy/AddForm.vue
  2. 14
      src/views/wms/basicDataManage/strategySetting/strategy/upShelfStrategy/AddForm.vue

116
src/views/wms/basicDataManage/strategySetting/strategy/supplieDeliveryStrategy/AddForm.vue

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

14
src/views/wms/basicDataManage/strategySetting/strategy/upShelfStrategy/AddForm.vue

@ -628,7 +628,7 @@ const options = reactive({
],
//
supplierList: [],
orignSupplierList: [],
originSupplierList: [],
//
itemTypeOptions: [
{ value: 'ItemType', label: '物料类型' },
@ -673,21 +673,21 @@ const buttonBaseClick = (val, item) => {
}
//
const getFormSupplierList = async () => {
options.orignSupplierList = await getSupplierList()
options.supplierList = [...options.orignSupplierList]
options.originSupplierList = await getSupplierList()
options.supplierList = [...options.originSupplierList]
}
//
const getFormCustomerList = async () => {
options.supplierList = await getCustomerList()
options.supplierList = [...options.orignSupplierList]
options.supplierList = [...options.originSupplierList]
}
const filterMethod = (query: string) => {
if (query) {
options.supplierList = options.orignSupplierList.filter((item) => {
options.supplierList = options.originSupplierList.filter((item) => {
return item.name.includes(query)
})
} else {
options.supplierList = [...options.orignSupplierList]
options.supplierList = [...options.originSupplierList]
}
}
@ -744,7 +744,7 @@ const filterMethodWarehouseList = (query: string) => {
return item.code.includes(query)
})
} else {
options.warehouseList = []
options.warehouseList = options.originWarehouseList
}
}
// ///

Loading…
Cancel
Save