leo 2 years ago
commit 116f9550af

@ -1,6 +1,6 @@
<template>
<lay-container fluid="true" class="content-box">
<FormulaView :teamId="dataInfoObj.FTeamID" :dataInfoObj="dataInfoObj" :halfId="dataInfoObj.FMaterialHalfIDs">
<FormulaView v-if="isFormula" @changeFormula="changeFormula" :teamId="dataInfoObj.FTeamID" :dataInfoObj="dataInfoObj" :halfId="dataInfoObj.FMaterialHalfIDs">
</FormulaView>
<lay-layer area="90%" v-model="showFreezingColumnSettingBox" title="固定列设置" :end="closeFreezingSetting">
<FreezingColumnSetting v-if="showFreezingColumnSettingBox" :columns="originalColumns"
@ -191,6 +191,7 @@ export default {
const idx = ref([]);
const materialInfoList = ref([]);
const dataRowsList=ref("");
const isFormula=ref(true);
return {
dataColumn,
dataList,
@ -213,7 +214,8 @@ export default {
infoList,
materialInfoList,
idx,
dataRowsList
dataRowsList,
isFormula
};
},
@ -229,10 +231,10 @@ export default {
},
mounted() {
this.getUserPower();
this.initPage(this.idx);
},
methods: {
async getUserPower() {
this.idx=layer.load(2)
if (this.dataInfoObj.FCanEdit != 2) {
this.userPower[0] = (await getBasicRoleList({
FRoleType: 84,
@ -247,10 +249,10 @@ export default {
Type: 2
}) || []).map(it => parseInt(it.F2))
}
this.initPage(layer.load(2));
this.initPage();
},
async initPage(idx) {
this.idx = idx;
async initPage() {
let idx = this.idx
let _data = await getListByHalfMaterialTeamId({
teamId: this.dataInfoObj.FTeamID,
viewType: this.dataInfoObj.FViewType
@ -355,14 +357,20 @@ export default {
item["info"] = $this.materialInfoList.Data.find(s => s.FDataID == item.FTypeID2);
if(typeof(item["FTypeID1"])=="string")
if(typeof(item["FTypeID1"])=="string"&&item["FTypeID1"]!="")
{
item["FTypeID1"]=parseInt(item["FTypeID1"]);
if(!isNaN(parseInt(item["FTypeID1"])))
{
item["FTypeID1"]=parseInt(item["FTypeID1"]);
}
}
if(typeof(item["FTypeID2"])=="string")
if(typeof(item["FTypeID2"])=="string"&&item["FTypeID2"]!="")
{
item["FTypeID2"]=parseInt(item["FTypeID2"]);
if(!isNaN(parseInt(item["FTypeID2"])))
{
item["FTypeID2"]=parseInt(item["FTypeID2"]);
}
}
let fType1 = $this.typeList[0].find((t) => {
@ -398,6 +406,7 @@ export default {
return item;
});
this.dataColumn = dataColumn;
layer.close(idx);
this.originalColumns = this.deepCopy(dataColumn);
let freezingColumns = freezingCols.FFreezingColumns
@ -416,9 +425,7 @@ export default {
}
//this._changeType(_data.rows[0],2);
setTimeout(function () {
layer.close(idx);
}, 500);
},
cancelClick(isRefresh) {
@ -586,6 +593,10 @@ export default {
},
deepCopy(arr) {
return JSON.parse(JSON.stringify(arr))
},
changeFormula(val){
debugger
this.isFormula=val;
}
}
}

@ -1,6 +1,6 @@
<template>
<lay-container fluid="true" class="content-box">
<FormulaView :teamId="dataInfoObj.FTeamID" :dataInfoObj="dataInfoObj" :halfId="dataInfoObj.FMaterialHalfIDs">
<FormulaView v-if="isFormula" @changeFormula="changeFormula" :teamId="dataInfoObj.FTeamID" :dataInfoObj="dataInfoObj" :halfId="dataInfoObj.FMaterialHalfIDs">
</FormulaView>
<lay-layer area="90%" v-model="showFreezingColumnSettingBox" title="固定列设置" :end="closeFreezingSetting">
<FreezingColumnSetting v-if="showFreezingColumnSettingBox" :columns="originalColumns"
@ -188,6 +188,7 @@ export default {
const materialInfoList = ref([]);
const idx = ref([]);
const dataRowsList=ref("");
const isFormula=ref(true);
return {
dataColumn,
dataList,
@ -209,7 +210,8 @@ export default {
tmpDataColumn,
materialInfoList,
idx,
dataRowsList
dataRowsList,
isFormula
};
},
props: {
@ -359,16 +361,21 @@ export default {
this.dataList = _data.rows.map(function (item) {
item["info"] = $this.materialInfoList.Data.find(s => s.FDataID == item.FTypeID2);
if(typeof(item["FTypeID1"])=="string")
if(typeof(item["FTypeID1"])=="string"&&item["FTypeID1"]!="")
{
item["FTypeID1"]=parseInt(item["FTypeID1"]);
if(!isNaN(parseInt(item["FTypeID1"])))
{
item["FTypeID1"]=parseInt(item["FTypeID1"]);
}
}
if(typeof(item["FTypeID2"])=="string")
if(typeof(item["FTypeID2"])=="string"&&item["FTypeID2"]!="")
{
item["FTypeID2"]=parseInt(item["FTypeID2"]);
if(!isNaN(parseInt(item["FTypeID2"])))
{
item["FTypeID2"]=parseInt(item["FTypeID2"]);
}
}
let fType1 = $this.typeList[0].find((t) => {
if (item.FTypeID1) {
return t.FID == item.FTypeID1
@ -610,6 +617,10 @@ export default {
},
deepCopy(arr) {
return JSON.parse(JSON.stringify(arr))
},
changeFormula(val){
debugger
this.isFormula=val;
}
}
}

@ -77,7 +77,6 @@
},
methods: {
async initPage() {
let ids = layer.load(2)
let dataColumn = [{
type: "number",
title: "序号",
@ -90,7 +89,7 @@
FType: 1,
HalfId : this.dataInfoObj.FMaterialHalfIDs
};
debugger
let result = await getTeamworkView(postData);
let formulaList = result["List1"]
@ -114,7 +113,11 @@
}
// this.dataColumn = dataColumn;
this.dataList = dataList;
layer.close(ids);
if(formulaList.length==0)
{
this.$emit('changeFormula', false);
}
}
}
}

Loading…
Cancel
Save