修改权限

master
Yang 3 years ago
parent 02d272acdf
commit 375a815747

@ -213,14 +213,19 @@ export default {
}, },
methods: { methods: {
async getUserPower() { async getUserPower() {
debugger
if (this.dataInfoObj.FCanEdit != 2) { if (this.dataInfoObj.FCanEdit != 2) {
this.userPower[0] = (await getBasicRoleList({ this.userPower[0] = (await getBasicRoleList({
FRoleType: 84, FRoleType: 84,
FViewType: this.dataInfoObj.FViewType FViewType: this.dataInfoObj.FViewType,
TeamId:this.dataInfoObj.FTeamID,
Type:0
}) || []).map(it => parseInt(it.F2)) }) || []).map(it => parseInt(it.F2))
this.userPower[1] = (await getBasicRoleList({ this.userPower[1] = (await getBasicRoleList({
FRoleType: 44, FRoleType: 44,
FViewType: this.dataInfoObj.FViewType FViewType: this.dataInfoObj.FViewType,
TeamId:this.dataInfoObj.FTeamID,
Type:0
}) || []).map(it => parseInt(it.F2)) }) || []).map(it => parseInt(it.F2))
} }
this.initPage(layer.load(2)); this.initPage(layer.load(2));
@ -479,14 +484,13 @@ export default {
this.dataList.forEach((row, index) => { this.dataList.forEach((row, index) => {
let cache = cacheDataList[index]; let cache = cacheDataList[index];
let dataObj = {}; let dataObj = {};
debugger
if (!row["FTypeID1"] || !row["FTypeID2"]) { if (row["FTypeID1"]==-1 || row["FTypeID2"]==-1||row["FTypeID1"]==''||row["FTypeID2"]=='') {
layer.msg("请先为所有物料选择分类", { icon : 2, time: 1000}); layer.msg("请先为所有物料选择分类", { icon : 2, time: 1000});
layer.close(idx); layer.close(idx);
allTypeSelected = false allTypeSelected = false;
return return false;
} }
for (let col of this.editColumn) { for (let col of this.editColumn) {
let valTemp = row[col.key]; let valTemp = row[col.key];
if (this.dataInfoObj.FViewType == 10) { if (this.dataInfoObj.FViewType == 10) {

@ -80,6 +80,7 @@
mounted() { mounted() {
this.factoryLists = JSON.parse(JSON.stringify(this.factoryList)); this.factoryLists = JSON.parse(JSON.stringify(this.factoryList));
this.stateLists = JSON.parse(JSON.stringify(this.stateList)); this.stateLists = JSON.parse(JSON.stringify(this.stateList));
debugger
let userInfo = JSON.parse(JSON.stringify(this.userInfoObj)); let userInfo = JSON.parse(JSON.stringify(this.userInfoObj));
userInfo.FUser = userInfo.FUser || " "; userInfo.FUser = userInfo.FUser || " ";
userInfo.FPassword = userInfo.FPassword || "123456"; userInfo.FPassword = userInfo.FPassword || "123456";

@ -141,6 +141,7 @@ export default {
mounted() { mounted() {
//this.factoryLists = JSON.parse(JSON.stringify(this.factoryList)); //this.factoryLists = JSON.parse(JSON.stringify(this.factoryList));
this.stateLists = JSON.parse(JSON.stringify(this.stateList)); this.stateLists = JSON.parse(JSON.stringify(this.stateList));
debugger
let userInfo = JSON.parse(JSON.stringify(this.userInfoObj)); let userInfo = JSON.parse(JSON.stringify(this.userInfoObj));
userInfo.FUser = userInfo.FUser || " "; userInfo.FUser = userInfo.FUser || " ";
userInfo.FPassword = userInfo.FPassword || "123456"; userInfo.FPassword = userInfo.FPassword || "123456";
@ -198,7 +199,7 @@ export default {
this.userInfo.FUser = this.userInfo.FUser.trim(); this.userInfo.FUser = this.userInfo.FUser.trim();
this.userInfo.FPassword = this.userInfo.FPassword.trim(); this.userInfo.FPassword = this.userInfo.FPassword.trim();
this.userInfo.FName = this.userInfo.FName.trim(); this.userInfo.FName = this.userInfo.FName.trim();
debugger
//this.userInfo.FFactoryID = this.userInfo.FFactoryID.trim(); //this.userInfo.FFactoryID = this.userInfo.FFactoryID.trim();
//this.userInfo.FRoleID = this.userInfo.FRoleID || -1; //this.userInfo.FRoleID = this.userInfo.FRoleID || -1;
//this.userInfo.FRoleName = role == null ? "" : role.FName; //this.userInfo.FRoleName = role == null ? "" : role.FName;

@ -283,7 +283,6 @@
if (type == 4) { if (type == 4) {
childList = item.FChild.filter(s => s.FType == 40) childList = item.FChild.filter(s => s.FType == 40)
} }
if (childList && childList.length > 0) { if (childList && childList.length > 0) {
has = childList == 0; has = childList == 0;
childList.forEach((child) => { childList.forEach((child) => {
@ -303,7 +302,7 @@
return ids; return ids;
} }
debugger
let result = await saveRolePower({ let result = await saveRolePower({
FRoleId: this.roleInfo.FID, FRoleId: this.roleInfo.FID,
FMenuId: this.tabIndex == 1 ? getIds(this.menuList).join(',') : null, FMenuId: this.tabIndex == 1 ? getIds(this.menuList).join(',') : null,

@ -224,11 +224,15 @@ export default {
if (this.dataInfoObj.FCanEdit != 2) { if (this.dataInfoObj.FCanEdit != 2) {
this.userPower[0] = (await getBasicRoleList({ this.userPower[0] = (await getBasicRoleList({
FRoleType: 84, FRoleType: 84,
FViewType: this.dataInfoObj.FViewType FViewType: this.dataInfoObj.FViewType,
TeamId:this.dataInfoObj.FTeamID,
Type:2
}) || []).map(it => parseInt(it.F2)) }) || []).map(it => parseInt(it.F2))
this.userPower[1] = (await getBasicRoleList({ this.userPower[1] = (await getBasicRoleList({
FRoleType: 44, FRoleType: 44,
FViewType: this.dataInfoObj.FViewType FViewType: this.dataInfoObj.FViewType,
TeamId:this.dataInfoObj.FTeamID,
Type:2
}) || []).map(it => parseInt(it.F2)) }) || []).map(it => parseInt(it.F2))
} }
this.initPage(layer.load(2)); this.initPage(layer.load(2));
@ -476,7 +480,7 @@ export default {
let cache = cacheDataList[index]; let cache = cacheDataList[index];
let dataObj = {}; let dataObj = {};
debugger debugger
if (row["FTypeID1"]==-1 || row["FTypeID2"]==-1) { if (row["FTypeID1"]==-1 || row["FTypeID2"]==-1||row["FTypeID1"]==''||row["FTypeID2"]==''){
layer.msg("请先为所有物料选择分类", { icon : 2, time: 1000}); layer.msg("请先为所有物料选择分类", { icon : 2, time: 1000});
layer.close(idx); layer.close(idx);
allTypeSelected = false; allTypeSelected = false;

@ -216,11 +216,15 @@ export default {
if (this.dataInfoObj.FCanEdit != 2) { if (this.dataInfoObj.FCanEdit != 2) {
this.userPower[0] = (await getBasicRoleList({ this.userPower[0] = (await getBasicRoleList({
FRoleType: 84, FRoleType: 84,
FViewType: this.dataInfoObj.FViewType FViewType: this.dataInfoObj.FViewType,
TeamId:this.dataInfoObj.FTeamID,
Type:2
}) || []).map(it => parseInt(it.F2)) }) || []).map(it => parseInt(it.F2))
this.userPower[1] = (await getBasicRoleList({ this.userPower[1] = (await getBasicRoleList({
FRoleType: 44, FRoleType: 44,
FViewType: this.dataInfoObj.FViewType FViewType: this.dataInfoObj.FViewType,
TeamId:this.dataInfoObj.FTeamID,
Type:2
}) || []).map(it => parseInt(it.F2)) }) || []).map(it => parseInt(it.F2))
} }
this.initPage(layer.load(2)); this.initPage(layer.load(2));
@ -465,7 +469,7 @@ export default {
this.dataList.forEach((row, index) => { this.dataList.forEach((row, index) => {
let cache = cacheDataList[index]; let cache = cacheDataList[index];
let dataObj = {}; let dataObj = {};
if (!row["FTypeID1"] || !row["FTypeID2"]) { if (row["FTypeID1"]==-1 || row["FTypeID2"]==-1||row["FTypeID1"]==''||row["FTypeID2"]==''){
layer.msg("请先为所有物料选择分类", { icon : 2, time: 1000}); layer.msg("请先为所有物料选择分类", { icon : 2, time: 1000});
layer.close(idx); layer.close(idx);
allTypeSelected = false; allTypeSelected = false;

@ -6,23 +6,23 @@
<lay-card> <lay-card>
<lay-form :model="searchObj" class="search-box"> <lay-form :model="searchObj" class="search-box">
<lay-row class="search-items"> <lay-row class="search-items">
<lay-form-item label="物料号" prop="FSaleCode"> <lay-form-item label="新试验号" prop="FTestCode">
<lay-input v-model="searchObj.FSaleCode"></lay-input> <lay-input v-model="searchObj.FTestCode"></lay-input>
</lay-form-item> </lay-form-item>
<lay-form-item label="类型" prop="FType"> <!-- <lay-form-item label="类型" prop="FType">
<lay-select v-model="searchObj.FType"> <lay-select v-model="searchObj.FType">
<lay-select-option v-for="(tIdv, tIdx) in typeList" :key="tIdx" :value="tIdv.FValue" <lay-select-option v-for="(tIdv, tIdx) in typeList" :key="tIdx" :value="tIdv.FValue"
:label="tIdv.FName"></lay-select-option> :label="tIdv.FName"></lay-select-option>
</lay-select> </lay-select>
</lay-form-item> </lay-form-item> -->
<lay-form-item v-if="postData.FState != 99" label="事项状态" prop="FState"> <lay-form-item v-if="postData.FState != 99" label="状态" prop="FState">
<lay-select v-model="searchObj.FState"> <lay-select v-model="searchObj.FState">
<lay-select-option v-for="(tv, tx) in stateList" :key="tx" :value="tv.id" <lay-select-option v-for="(tv, tx) in stateList" :key="tx" :value="tv.id"
:label="tv.name"></lay-select-option> :label="tv.name"></lay-select-option>
</lay-select> </lay-select>
</lay-form-item> </lay-form-item>
<lay-form-item label="发起日期" prop="FDateRange"> <lay-form-item label="发起日期" prop="FAddDate">
<lay-date-picker v-model="searchObj.FDateRange" range placeholder="type : date"> <lay-date-picker v-model="searchObj.FAddDate" range placeholder="type : date">
</lay-date-picker> </lay-date-picker>
</lay-form-item> </lay-form-item>
</lay-row> </lay-row>

@ -5,8 +5,8 @@
<lay-card> <lay-card>
<lay-form :model="searchObj" class="search-box"> <lay-form :model="searchObj" class="search-box">
<lay-row class="search-items"> <lay-row class="search-items">
<lay-form-item label="物料号" prop="FSaleCode"> <lay-form-item label="新试验号" prop="FTestCode">
<lay-input v-model="searchObj.FSaleCode"></lay-input> <lay-input v-model="searchObj.FTestCode"></lay-input>
</lay-form-item> </lay-form-item>
<lay-form-item label="当前流程" prop="FType"> <lay-form-item label="当前流程" prop="FType">
<lay-select v-model="searchObj.FType"> <lay-select v-model="searchObj.FType">
@ -14,7 +14,7 @@
:label="tIdv.FName"></lay-select-option> :label="tIdv.FName"></lay-select-option>
</lay-select> </lay-select>
</lay-form-item> </lay-form-item>
<lay-form-item v-if="postData.FState != 99" label="事项状态" prop="FState"> <lay-form-item v-if="postData.FState != 99" label="状态" prop="FState">
<lay-select v-model="searchObj.FState"> <lay-select v-model="searchObj.FState">
<lay-select-option v-for="(tv, tx) in stateList" :key="tx" :value="tv.id" <lay-select-option v-for="(tv, tx) in stateList" :key="tx" :value="tv.id"
:label="tv.name"></lay-select-option> :label="tv.name"></lay-select-option>
@ -237,7 +237,7 @@ export default {
} }
}, },
async _getTypeList() { async _getTypeList() {
this.typeList = await getBasicList(33) || []; this.typeList = await getBasicList(45) || [];
}, },
// //
async _getPageList(isFirst, showOk) { async _getPageList(isFirst, showOk) {

@ -220,12 +220,16 @@ export default {
async getUserPower() { async getUserPower() {
if (this.dataInfoObj.FCanEdit != 2) { if (this.dataInfoObj.FCanEdit != 2) {
this.userPower[0] = (await getBasicRoleList({ this.userPower[0] = (await getBasicRoleList({
FRoleType: 40, FRoleType: 84,
FViewType: this.dataInfoObj.FViewType FViewType: this.dataInfoObj.FViewType,
TeamId:this.dataInfoObj.FTeamID,
Type:1
}) || []).map(it => parseInt(it.F2)) }) || []).map(it => parseInt(it.F2))
this.userPower[1] = (await getBasicRoleList({ this.userPower[1] = (await getBasicRoleList({
FRoleType: 44, FRoleType: 44,
FViewType: this.dataInfoObj.FViewType FViewType: this.dataInfoObj.FViewType,
TeamId:this.dataInfoObj.FTeamID,
Type:1
}) || []).map(it => parseInt(it.F2)) }) || []).map(it => parseInt(it.F2))
} }
this.initPage(layer.load(2)); this.initPage(layer.load(2));
@ -495,7 +499,7 @@ export default {
let cache = cacheDataList[index]; let cache = cacheDataList[index];
let dataObj = {}; let dataObj = {};
debugger debugger
if (row["FTypeID1"]==-1 || row["FTypeID2"]==-1) { if (row["FTypeID1"]==-1 || row["FTypeID2"]==-1||row["FTypeID1"]==''||row["FTypeID2"]=='') {
layer.close(idx); layer.close(idx);
layer.msg("请先为所有物料选择分类", { icon : 2, time: 1000}); layer.msg("请先为所有物料选择分类", { icon : 2, time: 1000});
allTypeSelected = false allTypeSelected = false

Loading…
Cancel
Save