Browse Source

上架策略溢出库位传值改为json串

hella_online_20240828
wangyufei 3 months ago
parent
commit
4b40c6f54d
  1. 9
      src/views/wms/basicDataManage/strategySetting/strategy/upShelfStrategy/AddForm.vue

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

@ -1097,6 +1097,9 @@ const open = async (type: string, strategyCode: string, id?: number) => {
} }
if (data.configuration) { if (data.configuration) {
formData.value.configuration = JSON.parse(data.configuration) formData.value.configuration = JSON.parse(data.configuration)
if(!Array.isArray(formData.value.configuration.overflowLocationCode)&&formData.value.configuration.overflowLocationCode.length>0){
formData.value.configuration.overflowLocationCode = formData.value.configuration.overflowLocationCode.split(',')
}
} }
// //
@ -1198,6 +1201,10 @@ const submitForm = async () => {
Value:str Value:str
} }
}) })
let configuration = {...formData.value.configuration}
if(Array.isArray(configuration.overflowLocationCode)){
configuration.overflowLocationCode = configuration.overflowLocationCode.join(',')
}
let data = { let data = {
id: formData.value.id, id: formData.value.id,
strategyCode: formData.value.strategyCode, // strategyCode: formData.value.strategyCode, //
@ -1207,7 +1214,7 @@ const submitForm = async () => {
status: formData.value.status ? 0 : 1, // status: formData.value.status ? 0 : 1, //
// //
condition: JSON.stringify(arr), condition: JSON.stringify(arr),
configuration: JSON.stringify(formData.value.configuration) configuration:JSON.stringify(configuration)
} }
if (formType.value === 'create') { if (formType.value === 'create') {
await RuleApi.createRule(data) await RuleApi.createRule(data)

Loading…
Cancel
Save