5b98d11d by lxs Committed by lihua

数据定价更新

1 parent 1c07c6e6
......@@ -120,6 +120,9 @@ export const filterCascaderData = (data, field, val, type = 'disabled') => {
}
// 数字千分位 保留两位小数
export const changeNum = (num, fixed = 0, round = false) => {
if(num === '' || num === null || num === undefined){
return '';
}
num = parseFloat(num);
if (round) {
let parts = num.toFixed(fixed).split(".")
......
......@@ -203,7 +203,7 @@ const getDiseaseData = () => {
const getDataCatalog = () => {
return getDamCatalogList({ dataType: userData.superTubeFlag == 'Y' ? "P" : "D", sceneType: "D" }).then((res: any) => {
if (res.code == proxy.$passCode) {
const data = res.data.records || [];
const data = res.data || [];
typeMap.value.dataResourceGuid = JSON.parse(JSON.stringify(data));
let item = baseConfigFormItems.value.find(item => item.field == 'dataResourceGuid');
if (item) {
......
......@@ -730,7 +730,7 @@ const setSignatoryTableInfo = (row, isEdit = false) => {
},
{
label: "默认值", field: "defaultValue", width: 180, align: 'right', getName: (scope) => {
return scope.row.defaultValue !== null && scope.row.defaultValue !== '' ? changeNum(scope.row.defaultValue, 2) : '-'
return changeNum(scope.row.defaultValue, 2) || '-'
}
},
{
......
......@@ -667,9 +667,6 @@ const clickCreateGroup = () => {
formItems.value.map(item => {
if (item.field === 'orderNum') {
item.default = null;
} else if(item.field === 'damGuid'){
item.options = productList.value;
item.default = '';
} else {
item.default = "";
}
......@@ -956,6 +953,7 @@ const getProducts = () => {
if (res.code == proxy.$passCode) {
const data = res.data || [];
productList.value = data;
formItems.value.at(-2).options = data;
}
})
}
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!