diff --git a/src/api/api/formula.ts b/src/api/api/formula.ts index 7b7d27c..e7fc6f6 100644 --- a/src/api/api/formula.ts +++ b/src/api/api/formula.ts @@ -17,4 +17,13 @@ export async function getFormulaList() { dataList = data.Data; }); return dataList; +} + +export async function getFormulaByFTestCode(param){ + let result = 0; + await http.post('/api/Formula/GetFormulaByFTestCode', param || {}).then((data) => { + result = data.Data; + }); + return result; + } \ No newline at end of file diff --git a/src/api/api/view.ts b/src/api/api/view.ts index ae4f3e3..88e6011 100644 --- a/src/api/api/view.ts +++ b/src/api/api/view.ts @@ -9,6 +9,16 @@ export async function getListByTeamId(params) { return result; } +//根据协同ID获取物料视图 +export async function getListByHalfMaterialTeamId(params) { + let result = {}; + await http.post('/api/View/GetListByHalfMaterialTeamId', params).then((data) => { + result = data.Data; + }); + return result; +} + + //保存视图编辑的内容 export async function updateBatchById(params) { let result = {}; diff --git a/src/views/half/components/EditView.vue b/src/views/half/components/EditView.vue index 5e227ec..906b5ff 100644 --- a/src/views/half/components/EditView.vue +++ b/src/views/half/components/EditView.vue @@ -93,7 +93,7 @@ import { ref } from 'vue'; import { - getListByTeamId, + getListByHalfMaterialTeamId, updateBatchById2, updateBatchById3 } from "/src/api/api/view"; @@ -199,7 +199,7 @@ export default { this.initPage(layer.load(2)); }, async initPage(idx) { - let _data = await getListByTeamId({ + let _data = await getListByHalfMaterialTeamId({ teamId: this.dataInfoObj.FTeamID, viewType: this.dataInfoObj.FViewType }); @@ -299,29 +299,33 @@ export default { if (this.dataInfoObj.FCanEdit == 2) { let fType1 = this.typeList[0].find((t) => { - return t.FID === item.FTypeID1 + if(item.FTypeID1){ + return t.FID == item.FTypeID1 + } }); let fType2 = this.typeList[1].find((t) => { - return t.FID === item.FTypeID2 + if(item.FTypeID2){ + return t.FID == item.FTypeID2 + } }) - item.FTypeID1 = fType1.FName; - item.FTypeID2 = fType2.FName; + item.FTypeID1 = fType1?fType1.FName:item.FTypeID1; + item.FTypeID2 = fType2?fType2.FName:item.FTypeID2; } }); let saveId = this.dataInfoObj.FViewType + "_" + this.dataInfoObj.FID; - + localStorage.setItem('EditView' + saveId, JSON.stringify(_data.rows)); this.editColumn = editColumn; this.dataList = _data.rows; this.dataColumn = dataColumn; debugger - this.originalColumns = this.deepCopy(dataColumn); + this.getFreezingColumns(); - this._changeType(_data.rows[0],2); + //this._changeType(_data.rows[0],2); setTimeout(function () { layer.close(idx); }, 500); @@ -435,7 +439,9 @@ export default { let saveId = this.dataInfoObj.FViewType + "_" + this.dataInfoObj.FID; let cacheDataList = JSON.parse(localStorage.getItem('EditView' + saveId)); console.log('cacheDataList', cacheDataList); + this.dataList.forEach((row, index) => { + debugger let cache = cacheDataList[index]; let dataObj = {}; console.log('this.editColumn', this.editColumn); @@ -476,6 +482,7 @@ export default { } }); let updateLog = updateObj.LogList.join("、"); + debugger if (updateLog != "") { delete updateObj.LogList // 发送保存请求 diff --git a/src/views/half/components/EditViewOFF.vue b/src/views/half/components/EditViewOFF.vue index 0f71fa2..5c3d416 100644 --- a/src/views/half/components/EditViewOFF.vue +++ b/src/views/half/components/EditViewOFF.vue @@ -93,7 +93,7 @@ import { ref } from 'vue'; import { - getListByTeamId, + getListByHalfMaterialTeamId, updateBatchById4 } from "/src/api/api/view"; import { @@ -198,15 +198,15 @@ export default { this.initPage(layer.load(2)); }, async initPage(idx) { - let _data = await getListByTeamId({ + let _data = await getListByHalfMaterialTeamId({ teamId: this.dataInfoObj.FTeamID, viewType: this.dataInfoObj.FViewType }); - console.log('_data', _data); debugger + console.log('_data', _data); if (this.dataInfoObj.FViewType == 1 || this.dataInfoObj.FViewType == 10) { - this.inputCodeValue = _data.rows[0]?_data.rows[0].HalfCode:""; - this.inputDescValue = _data.rows[0]?_data.rows[0].HalfDesc:""; + this.inputCodeValue = _data.rows[0] ? _data.rows[0].HalfCode : ""; + this.inputDescValue = _data.rows[0] ? _data.rows[0].HalfDesc : ""; this.isShow = true; } else if (this.dataInfoObj.FViewType == 2 || this.dataInfoObj.FViewType == 3 || this.dataInfoObj.FViewType == 4) { this.isBomShow = true; @@ -215,7 +215,7 @@ export default { this.typeList[0] = _data.types.filter(s => s.FDepth == 1) || []; this.typeList[1] = _data.types.filter(s => s.FDepth != 1) || []; let dataColumn = _data.columns || []; - + let editColumn = dataColumn.filter(it => { let b = false; if (this.dataInfoObj.FCanEdit != 2) { @@ -257,21 +257,24 @@ export default { _data.rows.forEach((item, i) => { columnsList = _data.columns.map(function (items) { - let str = _data.infos[i][items.key + "Type"]; - if (typeof (str) != "undefined") { - switch (str) { - case "1": - return items.cellClass = items.cellClass + " one"; - case "2": - return items.cellClass = items.cellClass + " twe"; - case "3": - return items.cellClass = items.cellClass + " three"; - case "4": - return items.cellClass = items.cellClass + " four"; + let info = _data.infos[i] + if (info) { + let str = info[items.key + "Type"]; + if (typeof (str) != "undefined") { + switch (str) { + case "1": + return items.cellClass = items.cellClass + " one"; + case "2": + return items.cellClass = items.cellClass + " twe"; + case "3": + return items.cellClass = items.cellClass + " three"; + case "4": + return items.cellClass = items.cellClass + " four"; + } } - } + } - return items["cellClass"]=""; + return items["cellClass"] = ""; }) let k3Code = item.FBaseMaterialDesc; if (k3Code.indexOf("@") > 0) { @@ -292,33 +295,72 @@ export default { item[col.key] = info[col.key] || item[col.key] || ""; }); } - item.FTypeID1 = (item.FTypeID1 == 0 || item.FTypeID1 == -1) ? "" : item.FTypeID1; - item.FTypeID2 = (item.FTypeID2 == 0 || item.FTypeID2 == -1) ? "" : item.FTypeID2; + // item.FTypeID1 = (item.FTypeID1 == 0 || item.FTypeID1 == -1) ? "" : item.FTypeID1; + // item.FTypeID2 = (item.FTypeID2 == 0 || item.FTypeID2 == -1) ? "" : item.FTypeID2; + + // if (this.dataInfoObj.FCanEdit == 2) { + // let fType1 = this.typeList[0].find((t) => { + // if(item.FTypeID1){ + // return t.FID == item.FTypeID1 + // } + // }); + + // let fType2 = this.typeList[1].find((t) => { + // if(item.FTypeID2){ + // return t.FID == item.FTypeID2 + // } + // }) + + // item.FTypeID1 = fType1?fType1.FName:item.FTypeID1; + // item.FTypeID2 = fType2?fType2.FName:item.FTypeID2; + //} }); + debugger + let saveId = this.dataInfoObj.FViewType + "_" + this.dataInfoObj.FID; localStorage.setItem('EditView' + saveId, JSON.stringify(_data.rows)); console.log('editColumn', editColumn); this.editColumn = editColumn; - this.dataList = _data.rows; + let $this=this; + this.dataList = _data.rows.map(function(item){ + + if ($this.dataInfoObj.FCanEdit == 2) { + let fType1 = $this.typeList[0].find((t) => { + if(item.FTypeID1){ + return t.FID == item.FTypeID1 + } + }); + + let fType2 = $this.typeList[1].find((t) => { + if(item.FTypeID2){ + return t.FID == item.FTypeID2 + } + }) + + item.FTypeID1 = fType1?fType1.FName:item.FTypeID1; + item.FTypeID2 = fType2?fType2.FName:item.FTypeID2; + } + return item; + }); this.dataColumn = dataColumn; this.originalColumns = this.deepCopy(dataColumn); this.getFreezingColumns(); debugger - this._changeType(_data.rows[0],2); + //this._changeType(_data.rows[0], 2); setTimeout(function () { layer.close(idx); }, 500); }, async getFreezingColumns() { - let result = await GetFreezingColumns(); + let result = await GetFreezingColumns(); let freezingColumns = result.FFreezingColumns if (freezingColumns) { let c_list = freezingColumns.split(",") c_list.forEach(c => { - if(c && c.length > 0) { + if (c && c.length > 0) { this.freezingColumnSetting.push(c) } }) @@ -377,34 +419,34 @@ export default { } this.dataColumn.map(function (item) { - let str = result[item.key + "Type"]; - - if (typeof (str) != "undefined") { - switch (str) { - case "1": - if (typeof (item.cellClass) == "undefined") { - return item["cellClass"] = "one"; - } - return item.cellClass = item.cellClass.split(" ")[0] + " one"; - case "2": - if (typeof (item.cellClass) == "undefined") { - return item["cellClass"] = "twe"; - } - return item.cellClass = item.cellClass.split(" ")[0] + " twe"; - case "3": - if (typeof (item.cellClass) == "undefined") { - return item["cellClass"] = "three"; - } - return item.cellClass = item.cellClass.split(" ")[0] + " three"; - case "4": - if (typeof (item.cellClass) == "undefined") { - return item["cellClass"] = "four"; - } - return item.cellClass = item.cellClass.split(" ")[0] + " four"; - } - } - - return item["cellClass"]=""; + // let str = result[item.key + "Type"]; + + // if (typeof (str) != "undefined") { + // switch (str) { + // case "1": + // if (typeof (item.cellClass) == "undefined") { + // return item["cellClass"] = "one"; + // } + // return item.cellClass = item.cellClass.split(" ")[0] + " one"; + // case "2": + // if (typeof (item.cellClass) == "undefined") { + // return item["cellClass"] = "twe"; + // } + // return item.cellClass = item.cellClass.split(" ")[0] + " twe"; + // case "3": + // if (typeof (item.cellClass) == "undefined") { + // return item["cellClass"] = "three"; + // } + // return item.cellClass = item.cellClass.split(" ")[0] + " three"; + // case "4": + // if (typeof (item.cellClass) == "undefined") { + // return item["cellClass"] = "four"; + // } + // return item.cellClass = item.cellClass.split(" ")[0] + " four"; + // } + // } + + return item["cellClass"] = ""; }) } } @@ -508,9 +550,9 @@ export default { }) this.dataColumn = freezingColumns.concat(this.tmpDataColumn); - + } else { - this.dataColumn = this.tmpDataColumn; + this.dataColumn = this.tmpDataColumn; } this.$nextTick(); }, diff --git a/src/views/half/components/FormulaView.vue b/src/views/half/components/FormulaView.vue index 58c751d..07d50db 100644 --- a/src/views/half/components/FormulaView.vue +++ b/src/views/half/components/FormulaView.vue @@ -11,7 +11,7 @@ } from 'vue'; import { getTeamworkView - } from "/src/api/api/teamwork"; + } from "/src/api/api/halfmaterialteamwork"; export default { setup() { @@ -59,6 +59,10 @@ } }, props: { + dataInfoObj: { + type: Object, + default: () => {}, + }, teamId: { type: String, default: () => "" @@ -81,10 +85,10 @@ let dataList = []; let postData = { - FTeamID: this.teamId, + FTeamID: this.dataInfoObj.FID, FViewType: 2, FType: 1, - HalfId : this.halfId + HalfId : this.dataInfoObj.FMaterialHalfIDs }; let result = await getTeamworkView(postData); @@ -108,7 +112,6 @@ dataList.push(item); }); } - // this.dataColumn = dataColumn; this.dataList = dataList; } diff --git a/src/views/half/components/ShowData1.vue b/src/views/half/components/ShowData1.vue index eceb19c..a831f59 100644 --- a/src/views/half/components/ShowData1.vue +++ b/src/views/half/components/ShowData1.vue @@ -5,9 +5,11 @@
原配方:
-
配方号+版本号+描述
+
{{dataInfoObj.FTestCode}}+{{dataInfoObj.FVersionCode}}+{{dataInfoObj.FDesc.trim()}}
+
+
变更后的配方:
-
配方号+版本号+描述
+
{{dataInfoObj.NewFTestCode}}+{{dataInfoObj.NewFVersionCode}}+{{dataInfoObj.NewFDesc.trim()}}
视图信息 @@ -25,7 +27,10 @@ - + + + + @@ -164,10 +169,12 @@ } from "/src/api/api/user"; import ShowMaterial from './ShowMaterial.vue'; + import FormulaView from './FormulaView.vue'; export default { components: { - ShowMaterial + ShowMaterial, + FormulaView }, setup() { const dataList = ref([]); @@ -187,16 +194,20 @@ //总共有几种视图类型 const viewTypeCount = ref(5); const showEditBox = ref(false); + const showEditBox1 = ref(false); const viewList = ref([]); const viewHeight = ref(500); + const objInfoObj=ref([]); return { dataList, dataColumn, dataProcess, viewTypeCount, showEditBox, + showEditBox1, viewList, - viewHeight + viewHeight, + objInfoObj } }, props: { @@ -212,25 +223,26 @@ //获取视图 async _getViewList() { - this.dataList = [{"name":"新物料视图","seeCode":"1","outCode":"6"},{"name":"受影响的物料视图","seeCode":"5","outCode":"10"},{"name":"配方视图","seeCode":"5","outCode":"10"}]; + debugger + this.dataList = [{"name":"物料视图","code":"1","outCode":"6"},{"name":"配方视图","code":"2","outCode":"10"}]; }, async _getTeamworkView(data, type) { - let viewType = parseInt(type == 1 ? data.seeCode : data.outCode); - if (type == 2) viewType = viewType - this.viewTypeCount; - let postData = { - FTeamID: this.dataInfoObj.FID, - FViewType: viewType, - FType: type, - HalfId : this.dataInfoObj.FMaterialHalfIDs - }; - if (this.dataInfoObj.FProgress == "100" || this.dataInfoObj.FProgress == "100%") { - postData.FFinish = 1; - } + debugger + let idx = layer.load(2); - let result = await getTeamworkView(postData); layer.close(idx); if (type == 1) { - this.showEditBox = true; + + if(data.code==1) + { + this.objInfoObj=this.dataInfoObj; + this.showEditBox = true; + } + else if(data.code==2){ + this.objInfoObj=this.dataInfoObj; + this.showEditBox1 = true; + } + } else { window.open(result); } diff --git a/src/views/half/components/ShowFormula.vue b/src/views/half/components/ShowFormula.vue new file mode 100644 index 0000000..5ca00a0 --- /dev/null +++ b/src/views/half/components/ShowFormula.vue @@ -0,0 +1,104 @@ + + + + + diff --git a/src/views/half/components/ShowMaterial.vue b/src/views/half/components/ShowMaterial.vue index 92514cb..4de56fa 100644 --- a/src/views/half/components/ShowMaterial.vue +++ b/src/views/half/components/ShowMaterial.vue @@ -30,6 +30,11 @@ import { DownMateialView, DownSAP } from "/src/api/api/material"; + +import { + getListByHalfMaterialTeamId +} from "/src/api/api/view" + export default { setup() { const dataColumn = ref([]); @@ -37,14 +42,19 @@ export default { const cellStyle = function (row, column, rowIndex, columnIndex) { return column.style || ""; } + const typeList = ref([ + [], + [] + ]); return { dataColumn, dataList, - cellStyle + cellStyle, + typeList } }, props: { - objInfoObj: { + dataInfoObj: { type: Object, default: () => { }, } @@ -55,8 +65,8 @@ export default { methods: { async _downMateialView() { let result = await DownMateialView({ - FID: this.objInfoObj.FID, - FName: this.objInfoObj.FName + FID: this.dataInfoObj.FID, + FName: this.dataInfoObj.FName }); if (result.Code == "200") { window.location.href = result.Data @@ -64,8 +74,8 @@ export default { }, async _downSAP() { let result = await DownSAP({ - FID: this.objInfoObj.FID, - FName: this.objInfoObj.FName + FID: this.dataInfoObj.FID, + FName: this.dataInfoObj.FName }); if (result.Code == "200") { window.location.href = result.Data @@ -73,8 +83,34 @@ export default { }, //获取角色集合 async _getViewList() { - this.dataColumn = [{"width":"160px","align":"center","title":"一级分类","style":"color:#1E9FFF;background:#ccc !important","key":"FTypeName1","rowspan":1},{"width":"160px","align":"center","title":"二级分类","style":"color:#1E9FFF;background:#ccc !important","key":"FTypeName2","rowspan":1},{"width":"160px","align":"center","title":"K3系统代码","style":"color:#1E9FFF;background:#ccc !important","key":"FK3Code","rowspan":1},{"width":"160px","align":"center","title":"K3系统名称","style":"color:#1E9FFF;background:#ccc !important","key":"FK3Name","rowspan":1},{"width":"160px","align":"center","title":"K3系统短代码","style":"color:#1E9FFF;background:#ccc !important","key":"FK3ShortCode","rowspan":1},{"width":"160px","align":"center","title":"产品试验号","style":"color:#1E9FFF;background:#ccc !important","key":"FTestCode","rowspan":1},{"width":"160px","align":"center","title":"SAP系统代码","style":"color:#1E9FFF;background:#ccc !important","key":"FCode","rowspan":1},{"width":"160px","align":"center","title":"SAP系统描述","style":"color:#1E9FFF;background:#ccc !important","key":"FName","rowspan":1},{"width":"160px","align":"center","title":"物料组","style":"color:#1E9FFF;background:#ccc !important","key":"FMaterialGroup","rowspan":1},{"width":"160px","align":"center","title":"物料主分类","style":"color:#1E9FFF;background:#ccc !important","key":"FMaterialType","rowspan":1},{"width":"160px","align":"center","title":"客供料标识","style":"color:#1E9FFF;background:#ccc !important","key":"FCustomerCode","rowspan":1},{"width":"160px","align":"center","title":"总仓地址","style":"color:#1E9FFF;background:#ccc !important","key":"FStoreHouse","rowspan":1},{"width":"160px","align":"center","title":"BOM录入情况","style":"color:#1E9FFF;background:#ccc !important","key":"FBomEntry","rowspan":1},{"width":"160px","align":"center","title":"线边仓地址","style":"color:#1E9FFF;background:#ccc !important","key":"FLineHouse","rowspan":1},{"width":"160px","align":"center","title":"产品说明","style":"color:#1E9FFF;background:#ccc !important","key":"FProductDesc","rowspan":1},{"width":"160px","align":"center","title":"工作中心","style":"color:#1E9FFF;background:#ccc !important","key":"FWorkCenter","rowspan":1},{"width":"160px","align":"center","title":"工艺说明","style":"color:#1E9FFF;background:#ccc !important","key":"FCraftExplain","rowspan":1},{"width":"160px","align":"center","title":"标识符","style":"color:#1E9FFF;background:#ccc !important","key":"FIidentifier","rowspan":1},{"width":"160px","align":"center","title":"保质期","style":"color:#1E9FFF;background:#ccc !important","key":"FGuaranteePeriod","rowspan":1},{"width":"160px","align":"center","title":"存储条件","style":"color:#1E9FFF;background:#ccc !important","key":"FStorageConditions","rowspan":1},{"width":"160px","align":"center","title":"安全库存","style":"color:#1E9FFF;background:#ccc !important","key":"FSafetyStock","rowspan":1},{"width":"160px","align":"center","title":"触发比例","style":"color:#1E9FFF;background:#ccc !important","key":"FTriggerRatio","rowspan":1},{"width":"160px","align":"center","title":"最小量","style":"color:#1E9FFF;background:#ccc !important","key":"FMinAmount","rowspan":1},{"width":"160px","align":"center","title":"最大量","style":"color:#1E9FFF;background:#ccc !important","key":"FMaxAmount","rowspan":1},{"width":"160px","align":"center","title":"得率","style":"color:#1E9FFF;background:#ccc !important","key":"FYield","rowspan":1},{"width":"160px","align":"center","title":"固损","style":"color:#1E9FFF;background:#ccc !important","key":"FFixedLoss","rowspan":1},{"width":"160px","align":"center","title":"理论得率","style":"color:#1E9FFF;background:#ccc !important","key":"FTheoryYield","rowspan":1},{"width":"160px","align":"center","title":"品质检验1","style":"color:#1E9FFF;background:#ccc !important","key":"FQualityTest1","rowspan":1},{"width":"160px","align":"center","title":"品质检验2","style":"color:#1E9FFF;background:#ccc !important","key":"FQualityTest2","rowspan":1},{"width":"160px","align":"center","title":"行业领域","style":"color:#1E9FFF;","key":"FOrganizeIndustryField","rowspan":1},{"width":"160px","align":"center","title":"物料类型","style":"color:#1E9FFF;","key":"FOrganizeMaterialType","rowspan":1},{"width":"160px","align":"center","title":"工厂","style":"color:#1E9FFF;","key":"FOrganizeFactory","rowspan":1},{"width":"160px","align":"center","title":"库存地点","style":"color:#1E9FFF;","key":"FOrganizeInventoryLocation","rowspan":1},{"width":"160px","align":"center","title":"销售组织","style":"color:#1E9FFF;","key":"FOrganizeSalesOrganize","rowspan":1},{"width":"160px","align":"center","title":"分销渠道","style":"color:#1E9FFF;","key":"FOrganizeDistributionChannel","rowspan":1},{"width":"160px","align":"center","title":"物料编号","style":"color:#009688","key":"FBaseMaterialCode","rowspan":1},{"width":"160px","align":"center","title":"试验号","style":"color:#009688","key":"FBaseTestCode","rowspan":1},{"width":"160px","align":"center","title":"基本计量","style":"color:#009688","key":"FBaseBasicMeter","rowspan":1},{"width":"320px","align":"center","title":"物料描述","style":"color:#009688","key":"FBaseMaterialDesc","rowspan":1},{"width":"160px","align":"center","title":"物料组","style":"color:#009688","key":"FBaseMaterialGroup","rowspan":1},{"width":"160px","align":"center","title":"大小/量纲(规格)","style":"color:#009688","key":"FBaseSpecification","rowspan":1},{"width":"160px","align":"center","title":"物料长文本","style":"color:#009688","key":"FBaseMaterialText","rowspan":1},{"width":"160px","align":"center","title":"标识符:固体/液体","style":"color:#009688","key":"FBaseIdentifier","rowspan":1},{"width":"160px","align":"center","title":"体积单位","style":"color:#009688","key":"FBaseVolumeUnit","rowspan":1},{"width":"160px","align":"center","title":"毛重","style":"color:#009688","key":"FBaseGrossWeight","rowspan":1},{"width":"160px","align":"center","title":"净重","style":"color:#009688","key":"FBaseNetWeight","rowspan":1},{"width":"160px","align":"center","title":"重量单位","style":"color:#009688","key":"FBaseWeightUnit","rowspan":1},{"width":"160px","align":"center","title":"业务量","style":"color:#009688","key":"FBaseBusinessVolume","rowspan":1},{"width":"160px","align":"center","title":"fame号","style":"color:#009688","key":"FBaseFameCode","rowspan":1},{"width":"160px","align":"center","title":"采购组","style":"color:#1E9FFF;","key":"FPurchaseGroup","rowspan":1},{"width":"160px","align":"center","title":"采购单位","style":"color:#1E9FFF;","key":"FPurchaseCompany","rowspan":1},{"width":"160px","align":"center","title":"采购单位数量","style":"color:#1E9FFF;","key":"FPurchaseCompanyCount","rowspan":1},{"width":"160px","align":"center","title":"采购基本单位数量","style":"color:#1E9FFF;","key":"FPurchaseBaseCompanyCount","rowspan":1},{"width":"160px","align":"center","title":"采购价值码","style":"color:#1E9FFF;","key":"FPurchaseValueCode","rowspan":1},{"width":"160px","align":"center","title":"工厂特定状态","style":"color:#1E9FFF;","key":"FPurchaseFactorySpecificStatus","rowspan":1},{"width":"160px","align":"center","title":"自动采购单标识","style":"color:#1E9FFF;","key":"FPurchaseAutoOrder","rowspan":1},{"width":"160px","align":"center","title":"货源清单","style":"color:#1E9FFF;","key":"FPurchaseGoodsSource","rowspan":1},{"width":"160px","align":"center","title":"类别种类","style":"color:#009688","key":"FTypeCategoryType","rowspan":1},{"width":"160px","align":"center","title":"类别","style":"color:#009688","key":"FTypeType","rowspan":1},{"width":"160px","align":"center","title":"交货工厂","style":"color:#1E9FFF;","key":"FSaleDeliveryFactory","rowspan":1},{"width":"160px","align":"center","title":"税金分类","style":"color:#1E9FFF;","key":"FSaleTaxType","rowspan":1},{"width":"160px","align":"center","title":"物料统计组","style":"color:#1E9FFF;","key":"FSaleMaterialStatisticsGroup","rowspan":1},{"width":"160px","align":"center","title":"销售单位","style":"color:#1E9FFF;","key":"FSaleSalesCompany","rowspan":1},{"width":"160px","align":"center","title":"基本单位数量","style":"color:#1E9FFF;","key":"FSaleBaseCompanyCount","rowspan":1},{"width":"160px","align":"center","title":"销售单位数量","style":"color:#1E9FFF;","key":"FSaleSalesCompanyCount","rowspan":1},{"width":"160px","align":"center","title":"科目设置组","style":"color:#1E9FFF;","key":"FSaleAccountSettingGroup","rowspan":1},{"width":"160px","align":"center","title":"普通项目类别组","style":"color:#1E9FFF;","key":"FSaleGeneralProjectCategoryGroup","rowspan":1},{"width":"160px","align":"center","title":"项目类别组","style":"color:#1E9FFF;","key":"FSaleProjectCategoryGroup","rowspan":1},{"width":"160px","align":"center","title":"可用性检查","style":"color:#1E9FFF;","key":"FSaleAvailabilityCheck","rowspan":1},{"width":"160px","align":"center","title":"装载组","style":"color:#1E9FFF;","key":"FSaleOutfitGroup","rowspan":1},{"width":"160px","align":"center","title":"旧物料号","style":"color:#1E9FFF;","key":"FSaleOldMaterialCode","rowspan":1},{"width":"160px","align":"center","title":"存储条件","style":"color:#009688","key":"FStorageConditions","rowspan":1},{"width":"160px","align":"center","title":"批次管理","style":"color:#009688","key":"FStorageBatchManage","rowspan":1},{"width":"160px","align":"center","title":"最大存储期间","style":"color:#009688","key":"FStorageMaxStoragePeriod","rowspan":1},{"width":"160px","align":"center","title":"时间单位","style":"color:#009688","key":"FStorageTimeUnit","rowspan":1},{"width":"160px","align":"center","title":"最小剩余货架寿命","style":"color:#009688","key":"FStorageMinSurplusShelfLife","rowspan":1},{"width":"160px","align":"center","title":"总货架寿命","style":"color:#009688","key":"FStorageTotalShelfLife","rowspan":1},{"width":"160px","align":"center","title":"SLED期间标识","style":"color:#009688","key":"FStorageSLEDCode","rowspan":1},{"width":"160px","align":"center","title":"MRP类型","style":"color:#1E9FFF;","key":"FMRP1Type","rowspan":1},{"width":"160px","align":"center","title":"MRP控制者","style":"color:#1E9FFF;","key":"FMRP1Controller","rowspan":1},{"width":"160px","align":"center","title":"批量大小","style":"color:#1E9FFF;","key":"FMRP1BatchSize","rowspan":1},{"width":"160px","align":"center","title":"最小批量大小","style":"color:#1E9FFF;","key":"FMRP1MinBatchSize","rowspan":1},{"width":"160px","align":"center","title":"最大批量大小","style":"color:#1E9FFF;","key":"FMRP1MaxBatchSize","rowspan":1},{"width":"160px","align":"center","title":"MRP组","style":"color:#1E9FFF;","key":"FMRP1Group","rowspan":1},{"width":"160px","align":"center","title":"舍入值","style":"color:#1E9FFF;","key":"FMRP1RoundValue","rowspan":1},{"width":"160px","align":"center","title":"产品分类","style":"color:#1E9FFF;","key":"FMRP1ProductType","rowspan":1},{"width":"160px","align":"center","title":"客户代码","style":"color:#1E9FFF;","key":"FMRP1CustomerCode","rowspan":1},{"width":"160px","align":"center","title":"大小料","style":"color:#1E9FFF;","key":"FMRP1SizeMaterial","rowspan":1},{"width":"160px","align":"center","title":"小料标准(小于)","style":"color:#1E9FFF;","key":"FMRP1SmallMaterialStandard","rowspan":1},{"width":"160px","align":"center","title":"采购类型","style":"color:#009688","key":"FMRP2PurchaseType","rowspan":1},{"width":"160px","align":"center","title":"计划边际码","style":"color:#009688","key":"FMRP2PlanMarginalCode","rowspan":1},{"width":"160px","align":"center","title":"特殊采购类","style":"color:#009688","key":"FMRP2SpecialProcurement","rowspan":1},{"width":"160px","align":"center","title":"反冲","style":"color:#009688","key":"FMRP2Recoil","rowspan":1},{"width":"160px","align":"center","title":"自制生产时间","style":"color:#009688","key":"FMRP2SelfProductTime","rowspan":1},{"width":"160px","align":"center","title":"计划交货时间","style":"color:#009688","key":"FMRP2PlannDeliveryTime","rowspan":1},{"width":"160px","align":"center","title":"收货处理时间","style":"color:#009688","key":"FMRP2ReceiveProcessTime","rowspan":1},{"width":"160px","align":"center","title":"安全库存","style":"color:#009688","key":"FMRP2SafeStock","rowspan":1},{"width":"160px","align":"center","title":"发货库存地点","style":"color:#009688","key":"FMRP2DeliveryInventoryPlace","rowspan":1},{"width":"160px","align":"center","title":"外部采购仓储地点","style":"color:#009688","key":"FMRP2ExternalStoragePlace","rowspan":1},{"width":"160px","align":"center","title":"策略组","style":"color:#1E9FFF;","key":"FMRP3PolicyGroup","rowspan":1},{"width":"160px","align":"center","title":"消耗模式","style":"color:#1E9FFF;","key":"FMRP3ConsumePattern","rowspan":1},{"width":"160px","align":"center","title":"向前消耗期间","style":"color:#1E9FFF;","key":"FMRP3ForwardConsumePeriod","rowspan":1},{"width":"160px","align":"center","title":"逆向消耗期","style":"color:#1E9FFF;","key":"FMRP3ReverseConsumePeriod","rowspan":1},{"width":"160px","align":"center","title":"混合MRP","style":"color:#1E9FFF;","key":"FMRP3BlendMRP","rowspan":1},{"width":"160px","align":"center","title":"可用性检查","style":"color:#1E9FFF;","key":"FMRP3AvailabilityCheck","rowspan":1},{"width":"160px","align":"center","title":"单独或集中","style":"color:#1E9FFF;","key":"FMRP4AloneOrFocus","rowspan":1},{"width":"160px","align":"center","title":"生产计划参数文件","style":"color:#009688","key":"FPlanProductPlanParam","rowspan":1},{"width":"160px","align":"center","title":"无限制过量交货","style":"color:#009688","key":"FPlanUnlimitedOverDelivery","rowspan":1},{"width":"160px","align":"center","title":"不足交货允差","style":"color:#009688","key":"FPlanUnderDeliveryTolerance","rowspan":1},{"width":"160px","align":"center","title":"过度交货允差","style":"color:#009688","key":"FPlanOverDeliveryTolerance","rowspan":1},{"width":"160px","align":"center","title":"发货单位","style":"color:#009688","key":"FPlanDeliverCompany","rowspan":1},{"width":"160px","align":"center","title":"发货单位数量","style":"color:#009688","key":"FPlanDeliverCompanyCount","rowspan":1},{"width":"160px","align":"center","title":"发货基本单位数量","style":"color:#009688","key":"FPlanBaseCompanyCount","rowspan":1},{"width":"160px","align":"center","title":"检验类型1","style":"color:#1E9FFF;","key":"FQualityType1","rowspan":1},{"width":"160px","align":"center","title":"检验类型2","style":"color:#1E9FFF;","key":"FQualityType2","rowspan":1},{"width":"160px","align":"center","title":"检验类型3","style":"color:#1E9FFF;","key":"FQualityType3","rowspan":1},{"width":"160px","align":"center","title":"检验类型4","style":"color:#1E9FFF;","key":"FQualityType4","rowspan":1},{"width":"160px","align":"center","title":"检验类型5","style":"color:#1E9FFF;","key":"FQualityType5","rowspan":1},{"width":"160px","align":"center","title":"检验类型6","style":"color:#1E9FFF;","key":"FQualityType6","rowspan":1},{"width":"160px","align":"center","title":"价格控制","style":"color:#009688","key":"FAccountPriceControl","rowspan":1},{"width":"160px","align":"center","title":"价格确定","style":"color:#009688","key":"FAccountPriceDetermine","rowspan":1},{"width":"160px","align":"center","title":"价格单位","style":"color:#009688","key":"FAccountPriceUnit","rowspan":1},{"width":"160px","align":"center","title":"评估分类","style":"color:#009688","key":"FAccountAccessType","rowspan":1},{"width":"160px","align":"center","title":"VC: 销售订单库存","style":"color:#009688","key":"FAccountSaleOrderInventory","rowspan":1},{"width":"160px","align":"center","title":"标准价格","style":"color:#009688","key":"FAccountStandardPrice","rowspan":1},{"width":"160px","align":"center","title":"利润中心","style":"color:#009688","key":"FAccountProfitCenter","rowspan":1},{"width":"160px","align":"center","title":"成本核算批量","style":"color:#009688","key":"FAccountCostAccountBatch","rowspan":1}]; - this.dataList=[{"FID":490,"FType":"K1.24.(受托C310)其他自制物料","FDataID":67965,"FMaterialGroup":"","FMaterialType":"","FCustomerCode":"","FStoreHouse":"","FBomEntry":"","FLineHouse":"","FProductDesc":"","FWorkCenter":"","FIidentifier":"","FGuaranteePeriod":"","FStorageConditions":"","FSafetyStock":"","FTriggerRatio":"","FMinAmount":"","FMaxAmount":"","FYield":"","FFixedLoss":"","FTheoryYield":"","FQualityTest1":"","FQualityTest2":"","FAddUser":2,"FAddDate":"2023-04-14T03:11:06.827","FEditUser":0,"FEditDate":"2023-04-14T03:11:06.827","FTypeID1":"","FTypeID2":"","FK3Code":"","FK3Name":"","FK3ShortCode":"","FTestCode":"","FRelationCode":"","FRelationName":"","FOrganizeIndustryField":"M","FOrganizeMaterialType":"ZMAT","FOrganizeFactory":"","FOrganizeInventoryLocation":"","FOrganizeSalesOrganize":"","FOrganizeDistributionChannel":"90","FBaseMaterialCode":"","FBaseTestCode":"","FBaseBasicMeter":"g","FBaseSpecification":"","FBaseMaterialText":"","FBaseIdentifier":"","FBaseVolumeUnit":"M3","FBaseGrossWeight":"","FBaseNetWeight":"","FBaseFameCode":"","FBaseBusinessVolume":"","FPurchaseGroup":"G12","FPurchaseCompany":"","FPurchaseCompanyCount":"","FPurchaseBaseCompanyCount":"","FPurchaseValueCode":"4","FPurchaseFactorySpecificStatus":"","FPurchaseAutoOrder":"X","FPurchaseGoodsSource":"","FTypeCategoryType":"023","FTypeType":"ZBATCLS","FSaleDeliveryFactory":"","FSaleTaxType":"1","FSaleMaterialStatisticsGroup":"1","FSaleSalesCompany":"","FSaleBaseCompanyCount":"","FSaleSalesCompanyCount":"","FSaleAccountSettingGroup":"10","FSaleGeneralProjectCategoryGroup":"","FSaleProjectCategoryGroup":"NORM","FSaleAvailabilityCheck":"02","FSaleOutfitGroup":"0001","FSaleOldMaterialCode":"","FStorageBatchManage":"X","FStorageMaxStoragePeriod":"","FStorageTimeUnit":"","FStorageMinSurplusShelfLife":"1","FStorageTotalShelfLife":"","FStorageSLEDCode":"D","FMRP1Type":"PD","FMRP1ReorderLocation":"","FMRP1RegularBatchSize":"","FMRP1MaxInventorySize":"","FMRP1Controller":"","FMRP1BatchSize":"MB","FMRP1MinBatchSize":"","FMRP1MaxBatchSize":"","FMRP1Group":"0099","FMRP1RoundValue":"","FMRP1ProductType":"","FMRP1CustomerCode":"","FMRP1SizeMaterial":"","FMRP1IgnoreLack":"","FMRP1laminated":"","FMRP1SafeStock":"","FMRP1RequireCount":"","FMRP1SmallMaterialStandard":"","FMRP2PurchaseType":"F","FMRP2PlanMarginalCode":"000","FMRP2SpecialProcurement":"","FMRP2Recoil":"","FMRP2SelfProductTime":"","FMRP2PlannDeliveryTime":"","FMRP2ReceiveProcessTime":"","FMRP2SafeStock":"","FMRP2DeliveryInventoryPlace":"","FMRP2ExternalStoragePlace":"3000","FMRP3PolicyGroup":"40","FMRP3ConsumePattern":"2","FMRP3ForwardConsumePeriod":"365","FMRP3ReverseConsumePeriod":"90","FMRP3BlendMRP":"3","FMRP3AvailabilityCheck":"02","FMRP4AloneOrFocus":"2","FMRP4DiscontinuousIidentifier":"","FMRP4EffectivePeriod":"","FMRP4FollowMaterial":"","FPlanProductPlanParam":"","FPlanUnlimitedOverDelivery":"","FPlanUnderDeliveryTolerance":"","FPlanOverDeliveryTolerance":"","FPlanDeliverCompany":"","FPlanDeliverCompanyCount":"","FPlanBaseCompanyCount":"","FQualityType1":"","FQualityType2":"","FQualityType3":"","FQualityType4":"","FQualityType5":"","FQualityType6":"","FAccountPriceControl":"S","FAccountPriceDetermine":"3","FAccountPriceUnit":"1000","FAccountAccessType":"2000","FAccountSaleOrderInventory":"2010","FAccountStandardPrice":"","FAccountProfitCenter":"PC30","FAccountCostAccountBatch":"1000","FMStorageConditions":"","FTypeID1Type":"0","FTypeID2Type":"0","FK3CodeType":"0","FK3NameType":"0","FK3ShortCodeType":"0","FTestCodeType":"0","FRelationCodeType":"0","FRelationNameType":"0","FSAPCodeType":"0","FSAPDescriptionType":"0","FMaterialGroupType":"0","FMaterialTypeType":"0","FCustomerCodeType":"0","FStoreHouseType":"0","FBomEntryType":"0","FLineHouseType":"0","FProductDescType":"0","FWorkCenterType":"0","FCraftExplainType":"0","FIidentifierType":"0","FGuaranteePeriodType":"0","FStorageConditionsType":"0","FSafetyStockType":"0","FTriggerRatioType":"0","FMinAmountType":"0","FMaxAmountType":"0","FYieldType":"0","FFixedLossType":"0","FTheoryYieldType":"0","FQualityTest1Type":"0","FQualityTest2Type":"0","FOrganizeIndustryFieldType":"0","FOrganizeMaterialTypeType":"0","FOrganizeFactoryType":"0","FOrganizeInventoryLocationType":"0","FOrganizeSalesOrganizeType":"0","FOrganizeDistributionChannelType":"0","FBaseMaterialCodeType":"0","FBaseTestCodeType":"0","FBaseBasicMeterType":"0","FBaseMaterialDescType":"0","FBaseMaterialGroupType":"0","FBaseSpecificationType":"0","FBaseMaterialTextType":"0","FBaseIdentifierType":"0","FBaseVolumeUnitType":"0","FBaseGrossWeightType":"0","FBaseNetWeightType":"0","FBaseWeightUnitType":"0","FBaseFameCodeType":"0","FBaseBusinessVolumeType":"0","FPurchaseGroupType":"0","FPurchaseCompanyType":"0","FPurchaseCompanyCountType":"0","FPurchaseBaseCompanyCountType":"0","FPurchaseValueCodeType":"0","FPurchaseFactorySpecificStatusType":"0","FPurchaseAutoOrderType":"0","FPurchaseGoodsSourceType":"0","FTypeCategoryTypeType":"0","FTypeTypeType":"0","FSaleDeliveryFactoryType":"0","FSaleTaxTypeType":"0","FSaleMaterialStatisticsGroupType":"0","FSaleSalesCompanyType":"0","FSaleBaseCompanyCountType":"0","FSaleSalesCompanyCountType":"0","FSaleAccountSettingGroupType":"0","FSaleGeneralProjectCategoryGroupType":"0","FSaleProjectCategoryGroupType":"0","FSaleAvailabilityCheckType":"0","FSaleOutfitGroupType":"0","FSaleOldMaterialCodeType":"0","FMStorageConditionsType":"0","FStorageBatchManageType":"0","FStorageMaxStoragePeriodType":"0","FStorageTimeUnitType":"0","FStorageMinSurplusShelfLifeType":"0","FStorageTotalShelfLifeType":"0","FStorageSLEDCodeType":"0","FMRP1TypeType":"0","FMRP1ReorderLocationType":"0","FMRP1RegularBatchSizeType":"0","FMRP1MaxInventorySizeType":"0","FMRP1ControllerType":"0","FMRP1BatchSizeType":"0","FMRP1MinBatchSizeType":"0","FMRP1MaxBatchSizeType":"0","FMRP1GroupType":"0","FMRP1RoundValueType":"0","FMRP1ProductTypeType":"0","FMRP1CustomerCodeType":"0","FMRP1SizeMaterialType":"0","FMRP1IgnoreLackType":"0","FMRP1laminatedType":"0","FMRP1SafeStockType":"0","FMRP1RequireCountType":"0","FMRP1SmallMaterialStandardType":"0","FMRP2PurchaseTypeType":"0","FMRP2PlanMarginalCodeType":"0","FMRP2SpecialProcurementType":"0","FMRP2RecoilType":"0","FMRP2SelfProductTimeType":"0","FMRP2PlannDeliveryTimeType":"0","FMRP2ReceiveProcessTimeType":"0","FMRP2SafeStockType":"0","FMRP2DeliveryInventoryPlaceType":"0","FMRP2ExternalStoragePlaceType":"0","FMRP3PolicyGroupType":"0","FMRP3ConsumePatternType":"0","FMRP3ForwardConsumePeriodType":"0","FMRP3ReverseConsumePeriodType":"0","FMRP3BlendMRPType":"0","FMRP3AvailabilityCheckType":"0","FMRP4AloneOrFocusType":"0","FMRP4DiscontinuousIidentifierType":"0","FMRP4EffectivePeriodType":"0","FMRP4FollowMaterialType":"0","FPlanProductPlanParamType":"0","FPlanUnlimitedOverDeliveryType":"0","FPlanUnderDeliveryToleranceType":"0","FPlanOverDeliveryToleranceType":"0","FPlanDeliverCompanyType":"0","FPlanDeliverCompanyCountType":"0","FPlanBaseCompanyCountType":"0","FQualityType1Type":"0","FQualityType2Type":"0","FQualityType3Type":"0","FQualityType4Type":"0","FQualityType5Type":"0","FQualityType6Type":"0","FAccountPriceControlType":"0","FAccountPriceDetermineType":"0","FAccountPriceUnitType":"0","FAccountAccessTypeType":"0","FAccountSaleOrderInventoryType":"0","FAccountStandardPriceType":"0","FAccountProfitCenterType":"0","FAccountCostAccountBatchType":"0","FTypeName1":"","FTypeName2":""}]; + + let _data = await getListByHalfMaterialTeamId({ + teamId: this.dataInfoObj.FID, + viewType: "2" + }); + debugger + this.typeList[0] = _data.types.filter(s => s.FDepth == 1) || []; + this.typeList[1] = _data.types.filter(s => s.FDepth != 1) || []; + this.dataColumn =_data.columns; + let $this=this; + this.dataList =_data.rows.map(function(item){ + let fType1 = $this.typeList[0].find((t) => { + if(item.FTypeID1){ + return t.FID == item.FTypeID1 + } + }); + + let fType2 = $this.typeList[1].find((t) => { + if(item.FTypeID2){ + return t.FID == item.FTypeID2 + } + }); + + item["FTypeID1"]=fType1.FName; + item["FTypeID2"]=fType2.FName; + return item; + + }); }, cancelClick() { this.$emit('cancelClick', false); diff --git a/src/views/half/half.vue b/src/views/half/half.vue index 95ca9bd..75f6887 100644 --- a/src/views/half/half.vue +++ b/src/views/half/half.vue @@ -42,7 +42,7 @@ {{ data.FStateName }} @@ -268,7 +268,9 @@ export default { this.editType = 1; }, - showEditMaterial(i) { + showEditMaterial(i,data) { + debugger + this.objInfoObj=data; this.showEditBox[i] = true; }, _clickSetInfo(data, type) {