db3e259e by lxs

数据定价更新

1 parent 81bcb5df
...@@ -274,10 +274,8 @@ const getDetail = () => { ...@@ -274,10 +274,8 @@ const getDetail = () => {
274 typeMap.value.modelGuid.unshift(mtem); 274 typeMap.value.modelGuid.unshift(mtem);
275 baseConfigFormItems.value[0].options.unshift(mtem); 275 baseConfigFormItems.value[0].options.unshift(mtem);
276 }; 276 };
277 setTimeout(() => { 277 getModelInfo(flowDetail.value.modelGuid);
278 getModelInfo(flowDetail.value.modelGuid); 278 getDataTypeList()
279 getDataTypeList()
280 }, 200)
281 } 279 }
282 }).catch(() => { 280 }).catch(() => {
283 loading.value = false; 281 loading.value = false;
...@@ -374,7 +372,8 @@ const setBuildInFormItems = (buildList) => { ...@@ -374,7 +372,8 @@ const setBuildInFormItems = (buildList) => {
374 buildInData.value.push({ 372 buildInData.value.push({
375 guid: b.guid, 373 guid: b.guid,
376 targetName: buildName, 374 targetName: buildName,
377 targetValue: b.defaultValue || '' 375 targetValue: b.defaultValue || '',
376 isInputParameter: b.isInputParameter,
378 }) 377 })
379 baseConfigFormItems.value.push({ 378 baseConfigFormItems.value.push({
380 label: buildName, 379 label: buildName,
...@@ -385,7 +384,8 @@ const setBuildInFormItems = (buildList) => { ...@@ -385,7 +384,8 @@ const setBuildInFormItems = (buildList) => {
385 inputType: 'moneyNumber', 384 inputType: 'moneyNumber',
386 maxlength: 18, 385 maxlength: 18,
387 clearable: true, 386 clearable: true,
388 disabled: b.isInputParameter != 'Y' 387 disabled: b.isInputParameter != 'Y',
388 required: true
389 }); 389 });
390 baseConfigFormRules.value[buildField] = [ 390 baseConfigFormRules.value[buildField] = [
391 { required: true, message: `请填写${buildName}`, trigger: 'blur' }, 391 { required: true, message: `请填写${buildName}`, trigger: 'blur' },
...@@ -865,9 +865,15 @@ const getCalculateParams = (baseConfigFormObj, baseConfigFormInfo) => { ...@@ -865,9 +865,15 @@ const getCalculateParams = (baseConfigFormObj, baseConfigFormInfo) => {
865 } 865 }
866 } 866 }
867 buildInData.value.map(item => { 867 buildInData.value.map(item => {
868 let targetValue = baseConfigFormInfo[`build_${item.guid}`];
869 if(typeof targetValue === 'string'){
870 if(/^[+-]?\d{1,3}(,\d{3})*(\.\d{2})?$/.test(targetValue)){
871 targetValue = parseFloat(targetValue.replace(/,/g, ''))
872 }
873 }
868 builtInTarget.push({ 874 builtInTarget.push({
869 ...item, 875 ...item,
870 targetValue: baseConfigFormInfo[`build_${item.guid}`], 876 targetValue
871 }) 877 })
872 }) 878 })
873 params.dictionaryJson = Object.keys(dictionaryJson).length ? JSON.stringify(dictionaryJson) : ''; 879 params.dictionaryJson = Object.keys(dictionaryJson).length ? JSON.stringify(dictionaryJson) : '';
...@@ -1060,11 +1066,9 @@ onBeforeMount(() => { ...@@ -1060,11 +1066,9 @@ onBeforeMount(() => {
1060 getDetail(); 1066 getDetail();
1061 } else { 1067 } else {
1062 getDataTypeList(); 1068 getDataTypeList();
1063 getModel()
1064 } 1069 }
1065 }) 1070 })
1066 onMounted(() => { 1071 onMounted(() => {
1067 getModel()
1068 }) 1072 })
1069 </script> 1073 </script>
1070 <template> 1074 <template>
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!