Browse Source

上架策略去掉库存事务 添加业务类型

hella_online_20240919
yufei_wang 2 months ago
parent
commit
2475236378
  1. 61
      src/views/wms/basicDataManage/strategySetting/strategy/upShelfStrategy/AddForm.vue

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

@ -291,7 +291,7 @@
</el-select>
</el-form-item>
<!-- 库存事务 -->
<el-form-item key="库存事务formItem" label="库存事务" class="err-120" v-if="index == 5">
<!-- <el-form-item key="库存事务formItem" label="库存事务" class="err-120" v-if="index == 5">
<el-select key="库存事务Operator"
v-model="item.Operator"
placeholder="请选择范围"
@ -305,12 +305,6 @@
:key="'库存事务Operator'+cur.value"
/>
</el-select>
<!-- <el-input key="库存事务Value"
v-model="item.Value"
placeholder="请输入库存事务,多个库存事务以逗号分隔"
clearable
style="flex: 1"
/> -->
<el-input key="库存事务Value" style="flex:1" placeholder="请选择库存事务" disabled v-model="item.Value" @blur="blurTransactionType">
<template #suffix>
<el-button :disabled="formData.name=='默认规则'&&formType=='update'" type="text" plain style="color:var(--el-button-text-color)" @click="searchTransactionType">
@ -318,6 +312,29 @@
</el-button>
</template>
</el-input>
</el-form-item> -->
<!-- 业务类型 -->
<el-form-item key="业务类型formItem" label="业务类型" class="err-120" v-if="index == 6">
<el-select key="业务类型Operator"
v-model="item.Operator"
placeholder="请选择范围"
style="width: 110px; margin-right: 10px"
:disabled="formData.name=='默认规则'&&formType=='update'"
>
<el-option
:label="cur.label"
:value="cur.value"
v-for="cur in options.rangeOptions1"
:key="'业务类型Operator'+cur.value"
/>
</el-select>
<el-input key="业务类型Value" style="flex:1" placeholder="请选择业务类型" disabled v-model="item.Value" @blur="blurTransactionType">
<template #suffix>
<el-button :disabled="formData.name=='默认规则'&&formType=='update'" type="text" plain style="color:var(--el-button-text-color)" @click="searchBusinessType">
<Icon icon="ep:search" class="mr-5px" />
</el-button>
</template>
</el-input>
</el-form-item>
</el-col>
</el-row>
@ -630,6 +647,8 @@ import { DICT_TYPE, getStrDictOptions } from '@/utils/dict'
import { isString } from '@/utils/is'
import * as TransactiontypeApi from '@/api/wms/transactiontype'
import { Transactiontype } from '@/views/wms/basicDataManage/documentSetting/transactiontype/transactiontype.data'
import * as BusinesstypeApi from '@/api/wms/businesstype'
import { Businesstype } from '@/views/wms/basicDataManage/documentSetting/businesstype/businesstype.data'
const { t } = useI18n() //
const message = useMessage() //
@ -666,7 +685,9 @@ const formData = ref({
//
{ ParamCode: 'StorageType', Operator: 'IN', Value: [] },
//
{ ParamCode: 'TransactionType', Operator: 'IN', Value: '' }
{ ParamCode: 'TransactionType', Operator: 'IN', Value: '' },
//
{ ParamCode: 'BusinessType', Operator: 'IN', Value: '' },
],
configuration: {
//
@ -1003,6 +1024,20 @@ const blurWarehouse = async ()=>{
})
}
//
const searchBusinessType = ()=>{
searchTableRef.value.open(
'请选择业务类型',
Businesstype.allSchemas,
BusinesstypeApi.getBusinesstypePage,
'BusinessType',
'code',
true,
undefined,
undefined,
undefined
)
}
//
const searchTransactionType = ()=>{
searchTableRef.value.open(
@ -1045,6 +1080,12 @@ const searchTableSuccess = (formField, searchField, val, type, row) => {
transactionType.Value = val.map(item=>(item['code'])).join(',')
}
return
}else if(formField=='BusinessType'){
let businessType = formData.value.condition.find(item=>item['ParamCode']=='BusinessType')
if(businessType){
businessType.Value = val.map(item=>(item['code'])).join(',')
}
return
}
formData.value.configuration[warehouseType.value] = val.map(item=>(item['code'])).join(',')
let fields = ['WarehouseCode','AreaCode','LocationGroupCode','LocationCode']
@ -1271,7 +1312,9 @@ const resetForm = () => {
//
{ ParamCode: 'StorageType', Operator: 'IN', Value: [] },
//
{ ParamCode: 'TransactionType', Operator: 'IN', Value: '' }
{ ParamCode: 'TransactionType', Operator: 'IN', Value: '' },
//
{ ParamCode: 'BusinessType', Operator: 'IN', Value: '' },
],
configuration: {
//

Loading…
Cancel
Save