|
|
|
@ -5,212 +5,116 @@ |
|
|
|
:title="!dataForm.id ? '添加' :'编辑'" |
|
|
|
:close-on-click-modal="false" |
|
|
|
:visible.sync="visible"> |
|
|
|
<el-form :inline="true" label-position="top" label-width="100px" :rules="projectRole"> |
|
|
|
<el-form-item :label="'项目层级'" prop="projectLevel" :rules="projectRole.projectLevel"> |
|
|
|
<el-select v-model="dataForm.projectLevel" style="width: 130px"> |
|
|
|
<el-option label="一级" value=1></el-option> |
|
|
|
<el-option label="二级" value=2></el-option> |
|
|
|
<el-option label="三级" value=3></el-option> |
|
|
|
</el-select> |
|
|
|
<el-form :inline="true" label-position="top" label-width="100px" :rules="dataRole"> |
|
|
|
<el-form-item prop="proofingNo" :rules="dataRole.proofingNo"> |
|
|
|
<span slot="label" style="" @click="getBaseList(501,1)"><a herf="#">打样申请号</a></span> |
|
|
|
<el-input v-model="dataForm.proofingNo" style="width: 130px" readonly @focus="getBaseList(501,1)"></el-input> |
|
|
|
</el-form-item> |
|
|
|
|
|
|
|
<el-form-item :label="'项目号'"> |
|
|
|
<el-input v-model="dataForm.projectId" style="width: 130px" disabled></el-input> |
|
|
|
</el-form-item> |
|
|
|
|
|
|
|
<el-form-item prop="projectType" :rules="projectRole.projectType"> |
|
|
|
<span slot="label" style="" @click="getBaseList(1010,1)"><a herf="#">项目类型</a></span> |
|
|
|
<el-input v-model="dataForm.projectType" style="width: 130px" readonly @focus="getBaseList(1010,1)"></el-input> |
|
|
|
<el-form-item :label="'项目料号'"> |
|
|
|
<el-input v-model="dataForm.testPartNo" style="width: 130px" disabled></el-input> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item prop="customerName" :rules="projectRole.customerName"> |
|
|
|
<span slot="label" style="" @click="getBaseList(102,1)"><a herf="#">所属客户</a></span> |
|
|
|
<el-input v-model="dataForm.customerName" style="width: 130px" readonly @focus="getBaseList(102,1)"></el-input> |
|
|
|
<el-form-item :label="'物料名称'"> |
|
|
|
<el-input v-model="dataForm.partName" style="width: 130px" disabled></el-input> |
|
|
|
</el-form-item> |
|
|
|
</el-form> |
|
|
|
|
|
|
|
<el-form :inline="true" label-position="top" label-width="100px" :rules="projectRole"> |
|
|
|
<el-form-item :label="'项目名称'" prop="projectName" :rules="projectRole.projectName"> |
|
|
|
<el-input v-model="dataForm.projectName" style="width: 562px" ></el-input> |
|
|
|
<el-form :inline="true" label-position="top" label-width="100px" :rules="dataRole"> |
|
|
|
<el-form-item :label="'参数卡编码'" > |
|
|
|
<el-input v-model="dataForm.codeNo" disabled style="width: 130px" ></el-input> |
|
|
|
</el-form-item> |
|
|
|
</el-form> |
|
|
|
<el-form :inline="true" label-position="top" label-width="100px" > |
|
|
|
<el-form-item :label="'项目描述'" > |
|
|
|
<el-input v-model="dataForm.projectDesc" style="width: 562px" ></el-input> |
|
|
|
</el-form-item> |
|
|
|
</el-form> |
|
|
|
<el-form :inline="true" label-position="top" label-width="100px" :rules="projectRole"> |
|
|
|
<el-form-item prop="projectSourceDesc" :rules="projectRole.projectSourceDesc"> |
|
|
|
<span slot="label" style="" @click="getBaseList(1011,1)"><a herf="#">项目来源</a></span> |
|
|
|
<el-input v-model="dataForm.projectSourceDesc" style="width: 130px" readonly @focus="getBaseList(1011,1)"></el-input> |
|
|
|
<el-form-item :label="'版本号'" prop="projectName" :rules="dataRole.revNo"> |
|
|
|
<el-input v-model="dataForm.revNo" style="width: 130px" ></el-input> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item prop="priorityDesc" :rules="projectRole.priorityDesc"> |
|
|
|
<span slot="label" style="" @click="getBaseList(1012,1)"><a herf="#">优先级</a></span> |
|
|
|
<el-input v-model="dataForm.priorityDesc" style="width: 130px" readonly @focus="getBaseList(1012,1)"></el-input> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item :label="'要求日期:'" prop="needDate" :rules="projectRole.needDate"> |
|
|
|
<el-date-picker |
|
|
|
style="width: 130px" |
|
|
|
v-model="dataForm.needDate" |
|
|
|
type="date" |
|
|
|
value-format="yyyy-MM-dd" |
|
|
|
placeholder="选择日期"> |
|
|
|
</el-date-picker> |
|
|
|
<el-form-item prop="quotationOfficer" :rules="dataRole.quotationOfficer"> |
|
|
|
<span slot="label" style="" @click="quotationOfficerChooseModal()"><a herf="#">报价员</a></span> |
|
|
|
<el-input v-model="dataForm.quotationOfficer" readonly style="width: 274px" @focus="quotationOfficerChooseModal()"></el-input> |
|
|
|
</el-form-item> |
|
|
|
</el-form> |
|
|
|
<el-form :inline="true" label-position="top" label-width="100px" :rules="projectRole"> |
|
|
|
<el-form-item prop="projectManagerName" :rules="projectRole.projectManagerName"> |
|
|
|
<span slot="label" style="" @click="managerChooseModal()"><a herf="#">项目经理</a></span> |
|
|
|
<el-input v-model="dataForm.projectManagerName" readonly style="width: 274px" @focus="managerChooseModal()"></el-input> |
|
|
|
<el-form :inline="true" label-position="top" label-width="100px" :rules="dataRole"> |
|
|
|
<el-form-item prop="engineer" :rules="dataRole.engineer"> |
|
|
|
<span slot="label" style="" @click="engineerChooseModal()"><a herf="#">工程师</a></span> |
|
|
|
<el-input v-model="dataForm.engineer" readonly style="width: 274px" @focus="engineerChooseModal()"></el-input> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item prop="projectOwnerName" :rules="projectRole.projectOwnerName"> |
|
|
|
<span slot="label" style="" @click="ownerChooseModal()"><a herf="#">项目负责人</a></span> |
|
|
|
<el-input v-model="dataForm.projectOwnerName" readonly style="width: 274px" @focus="ownerChooseModal()"></el-input> |
|
|
|
<el-form-item prop="technician" :rules="dataRole.technician"> |
|
|
|
<span slot="label" style="" @click="technicianModal()"><a herf="#">技术员</a></span> |
|
|
|
<el-input v-model="dataForm.technician" readonly style="width: 274px" @focus="technicianModal()"></el-input> |
|
|
|
</el-form-item> |
|
|
|
</el-form> |
|
|
|
<el-form :inline="true" label-position="top" label-width="100px" > |
|
|
|
<el-form-item :label="'客户应用/要求'"> |
|
|
|
<el-input v-model="dataForm.customerRemark" style="width: 562px" ></el-input> |
|
|
|
<el-form-item :label="'备注'"> |
|
|
|
<el-input |
|
|
|
type="textarea" |
|
|
|
v-model="dataForm.remark " |
|
|
|
:rows="3" |
|
|
|
resize='none' |
|
|
|
maxlength="120" |
|
|
|
show-word-limit |
|
|
|
style="width: 562px;height: 60px"> |
|
|
|
</el-input> |
|
|
|
</el-form-item> |
|
|
|
</el-form> |
|
|
|
<el-form :inline="true" label-position="top" label-width="100px" > |
|
|
|
<el-form-item :label="'其他要求'"> |
|
|
|
<el-input v-model="dataForm.remark" style="width: 562px" ></el-input> |
|
|
|
</el-form-item> |
|
|
|
</el-form> |
|
|
|
<el-form :inline="true" label-position="top" label-width="100px" :rules="projectRole"> |
|
|
|
<el-form-item prop="userRoleName" :rules="projectRole.userRoleName"> |
|
|
|
<span slot="label" style="" @click="userRollModal()"><a herf="#">项目权限</a></span> |
|
|
|
<el-input v-model="dataForm.userRoleName" style="width: 562px" @focus="userRollModal()"></el-input> |
|
|
|
</el-form-item> |
|
|
|
</el-form> |
|
|
|
<span slot="footer" class="dialog-footer"> |
|
|
|
<div style="margin-top: 60px"> |
|
|
|
<span slot="footer" class="dialog-footer" > |
|
|
|
<el-button type="primary" @click="dataFormSubmit()">{{'确定'}}</el-button> |
|
|
|
<el-button type="primary" @click="visible = false">{{'关闭'}}</el-button> |
|
|
|
</span> |
|
|
|
</div> |
|
|
|
</el-dialog> |
|
|
|
<el-dialog |
|
|
|
width="530px" |
|
|
|
title="项目经理" |
|
|
|
title="报价员" |
|
|
|
:close-on-click-modal="false" |
|
|
|
:visible.sync="managerFlag"> |
|
|
|
<el-transfer v-model="projectManagerList" :props="{ |
|
|
|
:visible.sync="quotationOfficerFlag"> |
|
|
|
<el-transfer v-model="quotationOfficerList" :props="{ |
|
|
|
key: 'operatorId', |
|
|
|
label: 'operatorName' |
|
|
|
}" :data="operatorList" :titles="['未选择', '已选择']"></el-transfer> |
|
|
|
<span slot="footer" class="dialog-footer"> |
|
|
|
<div style="margin-top: 5px"> |
|
|
|
<el-button type="primary" @click="saveManagerList()">确定</el-button> |
|
|
|
<el-button @click="managerFlag = false" type="primary">取消</el-button> |
|
|
|
<el-button type="primary" @click="saveQuotationOfficerList()">确定</el-button> |
|
|
|
<el-button @click="quotationOfficerFlag = false" type="primary">取消</el-button> |
|
|
|
</div> |
|
|
|
</span> |
|
|
|
</el-dialog> |
|
|
|
|
|
|
|
<el-dialog |
|
|
|
width="530px" |
|
|
|
title="项目负责人" |
|
|
|
title="工程师" |
|
|
|
:close-on-click-modal="false" |
|
|
|
:visible.sync="ownerFlag"> |
|
|
|
<el-transfer v-model="projectOwnerList" :props="{ |
|
|
|
:visible.sync="engineerFlag"> |
|
|
|
<el-transfer v-model="engineerList" :props="{ |
|
|
|
key: 'operatorId', |
|
|
|
label: 'operatorName' |
|
|
|
}" :data="operatorList" :titles="['未选择', '已选择']"></el-transfer> |
|
|
|
<span slot="footer" class="dialog-footer"> |
|
|
|
<div style="margin-top: 5px"> |
|
|
|
<el-button type="primary" @click="saveOwnerList()">确定</el-button> |
|
|
|
<el-button @click="ownerFlag = false" type="primary">取消</el-button> |
|
|
|
<el-button type="primary" @click="saveEngineerList()">确定</el-button> |
|
|
|
<el-button @click="engineerFlag = false" type="primary">取消</el-button> |
|
|
|
</div> |
|
|
|
</span> |
|
|
|
</el-dialog> |
|
|
|
|
|
|
|
<el-dialog |
|
|
|
width="530px" |
|
|
|
title="权限" |
|
|
|
title="项目负责人" |
|
|
|
:close-on-click-modal="false" |
|
|
|
:visible.sync="userRoleFlag"> |
|
|
|
<el-table |
|
|
|
:data="userRoleList" |
|
|
|
border |
|
|
|
:height="300" |
|
|
|
v-loading="false" |
|
|
|
style="width: 100%;"> |
|
|
|
<el-table-column |
|
|
|
prop="username" |
|
|
|
header-align="center" |
|
|
|
align="center" |
|
|
|
min-width="35" |
|
|
|
label="账号"> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column |
|
|
|
prop="userDisplay" |
|
|
|
header-align="center" |
|
|
|
align="center" |
|
|
|
min-width="35" |
|
|
|
label="姓名"> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column |
|
|
|
prop="" |
|
|
|
header-align="center" |
|
|
|
align="center" |
|
|
|
min-width="30" |
|
|
|
label=""> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<!-- 如果数据为Y,显示勾选框,否则不勾选 --> |
|
|
|
<el-checkbox v-model="scope.row.checkAll" @change="changeAll(scope.row)"></el-checkbox> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column |
|
|
|
prop="" |
|
|
|
header-align="center" |
|
|
|
align="center" |
|
|
|
min-width="30" |
|
|
|
label="查询"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<!-- 如果数据为Y,显示勾选框,否则不勾选 --> |
|
|
|
<el-checkbox v-model="scope.row.searchCheck" @change="changeCheck(scope.row,1)"></el-checkbox> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column |
|
|
|
prop="" |
|
|
|
header-align="center" |
|
|
|
align="center" |
|
|
|
min-width="30" |
|
|
|
label="修改"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<!-- 如果数据为Y,显示勾选框,否则不勾选 --> |
|
|
|
<el-checkbox v-model="scope.row.updateCheck" @change="changeCheck(scope.row,2)"></el-checkbox> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column |
|
|
|
prop="" |
|
|
|
header-align="center" |
|
|
|
align="center" |
|
|
|
min-width="30" |
|
|
|
label="下载"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<!-- 如果数据为Y,显示勾选框,否则不勾选 --> |
|
|
|
<el-checkbox v-model="scope.row.downCheck" @change="changeCheck(scope.row,3)"></el-checkbox> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column |
|
|
|
prop="" |
|
|
|
header-align="center" |
|
|
|
align="center" |
|
|
|
min-width="30" |
|
|
|
label="删除"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<!-- 如果数据为Y,显示勾选框,否则不勾选 --> |
|
|
|
<el-checkbox v-model="scope.row.deleteCheck" @change="changeCheck(scope.row,4)"></el-checkbox> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
</el-table> |
|
|
|
|
|
|
|
:visible.sync="ownerFlag"> |
|
|
|
<el-transfer v-model="technicianList" :props="{ |
|
|
|
key: 'operatorId', |
|
|
|
label: 'operatorName' |
|
|
|
}" :data="operatorList" :titles="['未选择', '已选择']"></el-transfer> |
|
|
|
<span slot="footer" class="dialog-footer"> |
|
|
|
<div style="margin-top: 5px"> |
|
|
|
<el-button type="primary" @click="saveUserList()">确定</el-button> |
|
|
|
<el-button @click="userRoleFlag = false" type="primary">取消</el-button> |
|
|
|
<el-button type="primary" @click="saveOwnerList()">确定</el-button> |
|
|
|
<el-button @click="ownerFlag = false" type="primary">取消</el-button> |
|
|
|
</div> |
|
|
|
</span> |
|
|
|
</el-dialog> |
|
|
|
|
|
|
|
|
|
|
|
<Chooselist ref="baseList" @getBaseData="getBaseData"></Chooselist> |
|
|
|
</div> |
|
|
|
</template> |
|
|
|
@ -219,7 +123,6 @@ |
|
|
|
import {projectInfoSearch, |
|
|
|
searchOperatorWithSite, |
|
|
|
searchProjectTeamStr, |
|
|
|
searchUserRoll, |
|
|
|
saveProjectInfo, |
|
|
|
} from "@/api/project/project.js" |
|
|
|
import Chooselist from '@/views/modules/common/Chooselist' |
|
|
|
@ -233,109 +136,70 @@ |
|
|
|
tagNo1:'', |
|
|
|
visible: false, |
|
|
|
treeVisible: false, |
|
|
|
managerFlag:false, |
|
|
|
quotationOfficerFlag:false, |
|
|
|
engineerFlag:false, |
|
|
|
userRoleFlag:false, |
|
|
|
ownerFlag:false, |
|
|
|
operatorList:[], |
|
|
|
dataForm: { |
|
|
|
id: 0, |
|
|
|
site:this.$store.state.user.site, |
|
|
|
projectLevel:1, |
|
|
|
proofingNo:'', |
|
|
|
projectId:'', |
|
|
|
projectTypeDb:'', |
|
|
|
projectType:'', |
|
|
|
customerName:'', |
|
|
|
customerId:'', |
|
|
|
projectName:'', |
|
|
|
projectDesc:'', |
|
|
|
needDate:'', |
|
|
|
priority:'', |
|
|
|
projectSource:'', |
|
|
|
priorityDesc:'', |
|
|
|
projectSourceDesc:'', |
|
|
|
projectManagerName:'', |
|
|
|
projectOwnerName:'', |
|
|
|
customerRemark:'', |
|
|
|
codeNo:'', |
|
|
|
testPartNo:'', |
|
|
|
partName:'', |
|
|
|
status:'', |
|
|
|
revNo:'', |
|
|
|
remark:'', |
|
|
|
userRoleName:'', |
|
|
|
projectManagerList:[], |
|
|
|
projectOwnerList:[], |
|
|
|
userRoleList:[], |
|
|
|
technician:'', |
|
|
|
quotationOfficer:'', |
|
|
|
engineer:'', |
|
|
|
quotationOfficerList:[], |
|
|
|
engineerList:[], |
|
|
|
technicianList:[], |
|
|
|
}, |
|
|
|
projectManagerList:[], |
|
|
|
projectOwnerList:[], |
|
|
|
userRoleList:[], |
|
|
|
projectRole: { |
|
|
|
projectLevel: [ |
|
|
|
{ |
|
|
|
required: true, |
|
|
|
message: ' ', |
|
|
|
trigger: 'change' |
|
|
|
} |
|
|
|
], |
|
|
|
projectType: [ |
|
|
|
{ |
|
|
|
required: true, |
|
|
|
message: ' ', |
|
|
|
trigger: 'change' |
|
|
|
} |
|
|
|
], |
|
|
|
customerName: [ |
|
|
|
{ |
|
|
|
required: true, |
|
|
|
message: ' ', |
|
|
|
trigger: 'change' |
|
|
|
} |
|
|
|
], |
|
|
|
projectName: [ |
|
|
|
{ |
|
|
|
required: true, |
|
|
|
message: ' ', |
|
|
|
trigger: 'change' |
|
|
|
} |
|
|
|
], |
|
|
|
projectSourceDesc: [ |
|
|
|
quotationOfficerList:[], |
|
|
|
engineerList:[], |
|
|
|
technicianList:[], |
|
|
|
technicianList:[], |
|
|
|
dataRole: { |
|
|
|
proofingNo: [ |
|
|
|
{ |
|
|
|
required: true, |
|
|
|
message: ' ', |
|
|
|
trigger: 'change' |
|
|
|
} |
|
|
|
], |
|
|
|
priorityDesc: [ |
|
|
|
revNo: [ |
|
|
|
{ |
|
|
|
required: true, |
|
|
|
message: ' ', |
|
|
|
trigger: 'change' |
|
|
|
} |
|
|
|
], |
|
|
|
needDate: [ |
|
|
|
quotationOfficer: [ |
|
|
|
{ |
|
|
|
required: true, |
|
|
|
message: ' ', |
|
|
|
trigger: 'change' |
|
|
|
} |
|
|
|
], |
|
|
|
projectManagerName: [ |
|
|
|
engineer: [ |
|
|
|
{ |
|
|
|
required: true, |
|
|
|
message: ' ', |
|
|
|
trigger: 'change' |
|
|
|
} |
|
|
|
], |
|
|
|
projectOwnerName: [ |
|
|
|
{ |
|
|
|
required: true, |
|
|
|
message: ' ', |
|
|
|
trigger: 'change' |
|
|
|
} |
|
|
|
], |
|
|
|
userRoleName: [ |
|
|
|
technician: [ |
|
|
|
{ |
|
|
|
required: true, |
|
|
|
message: ' ', |
|
|
|
trigger: 'change' |
|
|
|
} |
|
|
|
], |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
@ -349,9 +213,9 @@ |
|
|
|
this.tagNo1 = type |
|
|
|
this.$nextTick(() => { |
|
|
|
let strVal = '' |
|
|
|
if (val === 1010) { |
|
|
|
if (val === 501) { |
|
|
|
if(type==1) { |
|
|
|
strVal = this.dataForm.projectTypeDb |
|
|
|
strVal = '' |
|
|
|
} |
|
|
|
} |
|
|
|
if (val === 102) { |
|
|
|
@ -374,10 +238,12 @@ |
|
|
|
}, |
|
|
|
/* 列表方法的回调 */ |
|
|
|
getBaseData (val) { |
|
|
|
if (this.tagNo === 1010) { |
|
|
|
if (this.tagNo === 501) { |
|
|
|
if(this.tagNo1==1) { |
|
|
|
this.dataForm.projectTypeDb = val.Base_id |
|
|
|
this.dataForm.projectType = val.Base_desc |
|
|
|
this.dataForm.proofingNo = val.Proofing_no |
|
|
|
this.dataForm.projectId = val.Project_id |
|
|
|
this.dataForm.testPartNo = val.Test_part_no |
|
|
|
this.dataForm.partName = val.Part_name |
|
|
|
} |
|
|
|
} |
|
|
|
if (this.tagNo === 102) { |
|
|
|
@ -416,7 +282,7 @@ |
|
|
|
type:'manager', |
|
|
|
} |
|
|
|
searchProjectTeamStr(inData).then(({data}) => { |
|
|
|
this.dataForm.projectManagerList=data.rows |
|
|
|
this.dataForm.quotationOfficerList=data.rows |
|
|
|
}) |
|
|
|
let inData2={ |
|
|
|
site:this.dataForm.site, |
|
|
|
@ -424,115 +290,105 @@ |
|
|
|
type:'owner', |
|
|
|
} |
|
|
|
searchProjectTeamStr(inData2).then(({data}) => { |
|
|
|
this.dataForm.projectOwnerList=data.rows |
|
|
|
}) |
|
|
|
let inData3={ |
|
|
|
site:this.dataForm.site, |
|
|
|
projectId:this.dataForm.projectId, |
|
|
|
} |
|
|
|
searchUserRoll(inData3).then(({data}) => { |
|
|
|
this.dataForm.userRoleList=data.rows |
|
|
|
this.dataForm.technicianList=data.rows |
|
|
|
}) |
|
|
|
|
|
|
|
} |
|
|
|
}) |
|
|
|
}else { |
|
|
|
this.dataForm={ |
|
|
|
id: 0, |
|
|
|
site:this.$store.state.user.site, |
|
|
|
projectLevel:1, |
|
|
|
proofingNo:'', |
|
|
|
projectId:'', |
|
|
|
projectTypeDb:'', |
|
|
|
projectType:'', |
|
|
|
customerName:'', |
|
|
|
customerId:'', |
|
|
|
projectName:'', |
|
|
|
projectDesc:'', |
|
|
|
needDate:'', |
|
|
|
priority:'', |
|
|
|
projectSource:'', |
|
|
|
priorityDesc:'', |
|
|
|
projectSourceDesc:'', |
|
|
|
projectManagerName:'', |
|
|
|
projectOwnerName:'', |
|
|
|
customerRemark:'', |
|
|
|
codeNo:'', |
|
|
|
testPartNo:'', |
|
|
|
partName:'', |
|
|
|
status:'', |
|
|
|
revNo:'', |
|
|
|
remark:'', |
|
|
|
userRoleName:'', |
|
|
|
projectManagerList:[], |
|
|
|
projectOwnerList:[], |
|
|
|
technician:'', |
|
|
|
quotationOfficer:'', |
|
|
|
engineer:'', |
|
|
|
quotationOfficerList:[], |
|
|
|
engineerList:[], |
|
|
|
technicianList:[], |
|
|
|
} |
|
|
|
let inData={ |
|
|
|
site:this.dataForm.site, |
|
|
|
projectId:this.dataForm.projectId, |
|
|
|
} |
|
|
|
searchUserRoll(inData).then(({data}) => { |
|
|
|
this.dataForm.userRoleList=data.rows |
|
|
|
}) |
|
|
|
|
|
|
|
} |
|
|
|
this.visible = true |
|
|
|
}, |
|
|
|
|
|
|
|
managerChooseModal(){ |
|
|
|
quotationOfficerChooseModal(){ |
|
|
|
let inData={ |
|
|
|
site:this.dataForm.site, |
|
|
|
projectId:this.dataForm.projectId, |
|
|
|
} |
|
|
|
searchOperatorWithSite(inData).then(({data}) => { |
|
|
|
this.operatorList=data.rows |
|
|
|
}) |
|
|
|
this.projectManagerList = JSON.parse(JSON.stringify(this.dataForm.projectManagerList)); |
|
|
|
this.managerFlag=true |
|
|
|
this.quotationOfficerList = JSON.parse(JSON.stringify(this.dataForm.quotationOfficerList)); |
|
|
|
this.quotationOfficerFlag=true |
|
|
|
}, |
|
|
|
saveManagerList(){ |
|
|
|
let projectManagerName=''; |
|
|
|
for (let i = 0; i < this.projectManagerList.length; i++) { |
|
|
|
let select= this.operatorList.filter(item => item.operatorId === this.projectManagerList[i]) |
|
|
|
|
|
|
|
saveQuotationOfficerList(){ |
|
|
|
let quotationOfficerName=''; |
|
|
|
for (let i = 0; i < this.quotationOfficerList.length; i++) { |
|
|
|
let select= this.operatorList.filter(item => item.operatorId === this.quotationOfficerList[i]) |
|
|
|
if(select.length>0){ |
|
|
|
projectManagerName+=select[0].operatorName+';' |
|
|
|
quotationOfficerName+=select[0].operatorName+';' |
|
|
|
} |
|
|
|
} |
|
|
|
this.dataForm.projectManagerName=projectManagerName |
|
|
|
this.dataForm.projectManagerList=JSON.parse(JSON.stringify(this.projectManagerList)); |
|
|
|
this.managerFlag=false |
|
|
|
this.dataForm.quotationOfficer=quotationOfficerName |
|
|
|
this.dataForm.quotationOfficerList=JSON.parse(JSON.stringify(this.quotationOfficerList)); |
|
|
|
this.quotationOfficerFlag=false |
|
|
|
}, |
|
|
|
ownerChooseModal(){ |
|
|
|
|
|
|
|
engineerChooseModal(){ |
|
|
|
let inData={ |
|
|
|
site:this.dataForm.site, |
|
|
|
projectId:this.dataForm.projectId, |
|
|
|
} |
|
|
|
searchOperatorWithSite(inData).then(({data}) => { |
|
|
|
this.operatorList=data.rows |
|
|
|
}) |
|
|
|
this.projectOwnerList = JSON.parse(JSON.stringify(this.dataForm.projectOwnerList)); |
|
|
|
this.ownerFlag=true |
|
|
|
this.engineerList = JSON.parse(JSON.stringify(this.dataForm.engineerList)); |
|
|
|
this.engineerFlag=true |
|
|
|
}, |
|
|
|
saveOwnerList(){ |
|
|
|
let projectOwnerName=''; |
|
|
|
for (let i = 0; i < this.projectOwnerList.length; i++) { |
|
|
|
let select= this.operatorList.filter(item => item.operatorId === this.projectOwnerList[i]) |
|
|
|
|
|
|
|
saveEngineerList(){ |
|
|
|
let engineerName=''; |
|
|
|
for (let i = 0; i < this.engineerList.length; i++) { |
|
|
|
let select= this.operatorList.filter(item => item.operatorId === this.engineerList[i]) |
|
|
|
if(select.length>0){ |
|
|
|
projectOwnerName+=select[0].operatorName+';' |
|
|
|
engineerName+=select[0].operatorName+';' |
|
|
|
} |
|
|
|
} |
|
|
|
this.dataForm.projectOwnerName=projectOwnerName |
|
|
|
this.dataForm.projectOwnerList=JSON.parse(JSON.stringify(this.projectOwnerList)); |
|
|
|
this.ownerFlag=false |
|
|
|
this.dataForm.engineer=engineerName |
|
|
|
this.dataForm.engineerList=JSON.parse(JSON.stringify(this.engineerList)); |
|
|
|
this.engineerFlag=false |
|
|
|
}, |
|
|
|
userRollModal(){ |
|
|
|
this.userRoleList=JSON.parse(JSON.stringify(this.dataForm.userRoleList)); |
|
|
|
this.userRoleFlag=true |
|
|
|
technicianModal(){ |
|
|
|
let inData={ |
|
|
|
site:this.dataForm.site, |
|
|
|
} |
|
|
|
searchOperatorWithSite(inData).then(({data}) => { |
|
|
|
this.operatorList=data.rows |
|
|
|
}) |
|
|
|
this.technicianList = JSON.parse(JSON.stringify(this.dataForm.technicianList)); |
|
|
|
this.ownerFlag=true |
|
|
|
}, |
|
|
|
saveUserList(){ |
|
|
|
console.log(this.userRoleList) |
|
|
|
let name= ''; |
|
|
|
for (let i = 0; i < this.userRoleList.length; i++) { |
|
|
|
if(this.userRoleList[i].searchCheck||this.userRoleList[i].updateCheck||this.userRoleList[i].downCheck||this.userRoleList[i].deleteCheck){ |
|
|
|
name+=this.userRoleList[i].userDisplay+';' |
|
|
|
saveOwnerList(){ |
|
|
|
let technicianName=''; |
|
|
|
for (let i = 0; i < this.technicianList.length; i++) { |
|
|
|
let select= this.operatorList.filter(item => item.operatorId === this.technicianList[i]) |
|
|
|
if(select.length>0){ |
|
|
|
technicianName+=select[0].operatorName+';' |
|
|
|
} |
|
|
|
} |
|
|
|
this.dataForm.userRoleName=name |
|
|
|
this.dataForm.userRoleList=JSON.parse(JSON.stringify(this.userRoleList)); |
|
|
|
this.userRoleFlag=false |
|
|
|
this.dataForm.technician=technicianName |
|
|
|
this.dataForm.technicianList=JSON.parse(JSON.stringify(this.technicianList)); |
|
|
|
this.ownerFlag=false |
|
|
|
}, |
|
|
|
|
|
|
|
changeAll(row){ |
|
|
|
if(row.checkAll){ |
|
|
|
row.searchCheck=true; |
|
|
|
@ -592,60 +448,6 @@ |
|
|
|
}, |
|
|
|
// 表单提交 |
|
|
|
dataFormSubmit () { |
|
|
|
if(this.dataForm.projectTypeDb==''||this.dataForm.projectTypeDb==null){ |
|
|
|
this.$alert('请选择项目类型!', '错误', { |
|
|
|
confirmButtonText: '确定' |
|
|
|
}) |
|
|
|
return false; |
|
|
|
} |
|
|
|
if(this.dataForm.customerId==''||this.dataForm.customerId==null){ |
|
|
|
this.$alert('请选择所属客户!', '错误', { |
|
|
|
confirmButtonText: '确定' |
|
|
|
}) |
|
|
|
return false; |
|
|
|
} |
|
|
|
if(this.dataForm.projectName==''||this.dataForm.projectName==null){ |
|
|
|
this.$alert('请输入项目名称!', '错误', { |
|
|
|
confirmButtonText: '确定' |
|
|
|
}) |
|
|
|
return false; |
|
|
|
} |
|
|
|
if(this.dataForm.projectSource==''||this.dataForm.projectSource==null){ |
|
|
|
this.$alert('请选择项目来源!', '错误', { |
|
|
|
confirmButtonText: '确定' |
|
|
|
}) |
|
|
|
return false; |
|
|
|
} |
|
|
|
if(this.dataForm.priority==''||this.dataForm.priority==null){ |
|
|
|
this.$alert('请选择优先级!', '错误', { |
|
|
|
confirmButtonText: '确定' |
|
|
|
}) |
|
|
|
return false; |
|
|
|
} |
|
|
|
if(this.dataForm.needDate==''||this.dataForm.needDate==null){ |
|
|
|
this.$alert('请选择要求日期!', '错误', { |
|
|
|
confirmButtonText: '确定' |
|
|
|
}) |
|
|
|
return false; |
|
|
|
} |
|
|
|
if(this.dataForm.projectManagerName==''||this.dataForm.projectManagerName==null){ |
|
|
|
this.$alert('请选择项目经理!', '错误', { |
|
|
|
confirmButtonText: '确定' |
|
|
|
}) |
|
|
|
return false; |
|
|
|
} |
|
|
|
if(this.dataForm.projectOwnerName==''||this.dataForm.projectOwnerName==null){ |
|
|
|
this.$alert('请选择项目负责人!', '错误', { |
|
|
|
confirmButtonText: '确定' |
|
|
|
}) |
|
|
|
return false; |
|
|
|
} |
|
|
|
if(this.dataForm.userRoleName==''||this.dataForm.userRoleName==null){ |
|
|
|
this.$alert('请选择权限!', '错误', { |
|
|
|
confirmButtonText: '确定' |
|
|
|
}) |
|
|
|
return false; |
|
|
|
} |
|
|
|
saveProjectInfo(this.dataForm).then(({data}) => { |
|
|
|
if (data && data.code === 0) { |
|
|
|
this.$message.success( '操作成功') |
|
|
|
|