|
@@ -9,69 +9,147 @@
|
|
<el-form-item class="divLine">
|
|
<el-form-item class="divLine">
|
|
</el-form-item>
|
|
</el-form-item>
|
|
<el-form-item>
|
|
<el-form-item>
|
|
- <span class="projectTitle">测试用项目001</span>
|
|
|
|
|
|
+ <span class="projectTitle">{{proDetail.projectName}}</span>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
</el-form>
|
|
</el-form>
|
|
</el-col>
|
|
</el-col>
|
|
<el-col :span="24" :style="allDetail">
|
|
<el-col :span="24" :style="allDetail">
|
|
- <el-col :span="24" class="title">项目基本信息</el-col>
|
|
|
|
- <el-col :span="24" class="main">
|
|
|
|
- <el-col :span="6" class="detail">
|
|
|
|
- 项目名称:
|
|
|
|
- <span class="info">{{mould.typeNumber}}</span>
|
|
|
|
- </el-col>
|
|
|
|
- <el-col :span="6" class="detail">
|
|
|
|
- 项目经理:
|
|
|
|
- <span class="info">{{mould.name}}</span>
|
|
|
|
- </el-col>
|
|
|
|
- <el-col :span="6" class="detail">
|
|
|
|
- 生产方公司:
|
|
|
|
- <span class="info">{{mould.lifetime}}</span>
|
|
|
|
- </el-col>
|
|
|
|
- <el-col :span="6" class="detail">
|
|
|
|
- 生产方负责人:
|
|
|
|
- <span class="info">{{mould.initial}}</span>
|
|
|
|
- </el-col>
|
|
|
|
- <el-col :span="24" class="detail">
|
|
|
|
- 项目模具:
|
|
|
|
- <span class="info">{{mould.RFIDcode}}</span>
|
|
|
|
- </el-col>
|
|
|
|
- <el-col :span="24" class="detail">
|
|
|
|
- 资产方人员:
|
|
|
|
- <span class="info">{{mould.mouldNumber}}</span>
|
|
|
|
- </el-col>
|
|
|
|
- <el-col :span="24" class="detail">
|
|
|
|
- 生产方人员:
|
|
|
|
- <span class="info">{{mould.project}}</span>
|
|
|
|
- </el-col>
|
|
|
|
- </el-col>
|
|
|
|
-
|
|
|
|
- <el-col :span="24" class="title">项目文档
|
|
|
|
- <el-upload class="upload-demo" action="customize" :http-request="uploadFile" :show-file-list="false" multiple :limit="5" style="float:right;">
|
|
|
|
- <el-button size="small" type="primary">点击上传</el-button>
|
|
|
|
- </el-upload>
|
|
|
|
|
|
+ <el-col :span="24" class="title">项目基本信息
|
|
|
|
+ <i class="el-icon-edit editDetail" v-if="user.parentId == 1 || user.isManager == 1" @click="edit"></i>
|
|
|
|
+ </el-col>
|
|
|
|
+ <el-col :span="24" class="main">
|
|
|
|
+ <el-col :span="6" class="detail">
|
|
|
|
+ 项目编号:
|
|
|
|
+ <span class="info">{{proDetail.projectNo}}</span>
|
|
</el-col>
|
|
</el-col>
|
|
- <el-col :span="24">
|
|
|
|
- <el-table :data="documents" highlight-current-row v-loading="listLoading" style="width: 100%;height:800px;">
|
|
|
|
- <el-table-column type="index" width="40"></el-table-column>
|
|
|
|
- <el-table-column prop="name" label="名称" sortable></el-table-column>
|
|
|
|
- <el-table-column prop="size" label="大小" width="200" sortable></el-table-column>
|
|
|
|
- <el-table-column prop="uploader" label="上传者" width="200" sortable></el-table-column>
|
|
|
|
- <el-table-column prop="uploadTime" label="上传时间" width="200" sortable></el-table-column>
|
|
|
|
- <el-table-column label="状态" width="200" sortable>
|
|
|
|
- <template slot-scope="scope">
|
|
|
|
- <span v-if="scope.row.state == 0">需要</span>
|
|
|
|
- <span v-else>不需要</span>
|
|
|
|
- </template>
|
|
|
|
- </el-table-column>
|
|
|
|
- <el-table-column label="操作" width="220" sortable>
|
|
|
|
- <el-button size="small">浏览</el-button>
|
|
|
|
- <el-button size="small">下载</el-button>
|
|
|
|
- <el-button size="small" type="danger">删除</el-button>
|
|
|
|
- </el-table-column>
|
|
|
|
- </el-table>
|
|
|
|
|
|
+ <el-col :span="6" class="detail">
|
|
|
|
+ 项目经理:
|
|
|
|
+ <span class="info">{{proDetail.name}}</span>
|
|
|
|
+ </el-col>
|
|
|
|
+ <el-col :span="6" class="detail">
|
|
|
|
+ 资产方审批人:
|
|
|
|
+ <span class="info">{{proDetail.initial}}</span>
|
|
|
|
+ </el-col>
|
|
|
|
+ <el-col :span="6" class="detail">
|
|
|
|
+ 生产方审批人:
|
|
|
|
+ <span class="info">{{proDetail.initial}}</span>
|
|
|
|
+ </el-col>
|
|
|
|
+ <el-col :span="6" class="detail">
|
|
|
|
+ 生产方公司:
|
|
|
|
+ <span class="info">{{proDetail.lifetime}}</span>
|
|
|
|
+ </el-col>
|
|
|
|
+ <el-col :span="24" class="detail">
|
|
|
|
+ 项目模具:
|
|
|
|
+ <span class="info">{{proDetail.RFIDcode}}</span>
|
|
</el-col>
|
|
</el-col>
|
|
|
|
+ <el-col :span="24" class="detail">
|
|
|
|
+ 资产方人员:
|
|
|
|
+ <span class="info">{{proDetail.mouldNumber}}</span>
|
|
|
|
+ </el-col>
|
|
|
|
+ <el-col :span="24" class="detail">
|
|
|
|
+ 生产方人员:
|
|
|
|
+ <span class="info">{{proDetail.project}}</span>
|
|
|
|
+ </el-col>
|
|
|
|
+ </el-col>
|
|
|
|
+
|
|
|
|
+ <el-col :span="24" class="title">项目文档
|
|
|
|
+ <el-upload class="upload-demo" action="customize" :http-request="uploadFile" :show-file-list="false" multiple :limit="5" style="float:right;">
|
|
|
|
+ <el-button size="small" type="primary">点击上传</el-button>
|
|
|
|
+ </el-upload>
|
|
|
|
+ </el-col>
|
|
|
|
+ <el-col :span="24">
|
|
|
|
+ <el-table :data="documents" highlight-current-row v-loading="listLoading" style="width: 100%;height:800px;">
|
|
|
|
+ <el-table-column type="index" width="40"></el-table-column>
|
|
|
|
+ <el-table-column prop="name" label="名称" sortable></el-table-column>
|
|
|
|
+ <el-table-column prop="size" label="大小" width="200" sortable></el-table-column>
|
|
|
|
+ <el-table-column prop="uploader" label="上传者" width="200" sortable></el-table-column>
|
|
|
|
+ <el-table-column prop="uploadTime" label="上传时间" width="200" sortable></el-table-column>
|
|
|
|
+ <el-table-column label="状态" width="200" sortable>
|
|
|
|
+ <template slot-scope="scope">
|
|
|
|
+ <span v-if="scope.row.state == 0">需要</span>
|
|
|
|
+ <span v-else>不需要</span>
|
|
|
|
+ </template>
|
|
|
|
+ </el-table-column>
|
|
|
|
+ <el-table-column label="操作" width="220" sortable>
|
|
|
|
+ <el-button size="small">浏览</el-button>
|
|
|
|
+ <el-button size="small">下载</el-button>
|
|
|
|
+ <el-button size="small" type="danger">删除</el-button>
|
|
|
|
+ </el-table-column>
|
|
|
|
+ </el-table>
|
|
|
|
+ </el-col>
|
|
</el-col>
|
|
</el-col>
|
|
|
|
+
|
|
|
|
+ <!--编辑界面-->
|
|
|
|
+ <el-dialog title="编辑项目" v-if="editFormVisible" :visible.sync="editFormVisible" :close-on-click-modal="false" customClass='customWidth'>
|
|
|
|
+ <el-form :model="editForm" label-width="120px" :rules="formRules" ref="editForm">
|
|
|
|
+ <el-col :span="24">
|
|
|
|
+ <el-form-item label="项目名称" prop="projectName">
|
|
|
|
+ <el-input v-model="editForm.projectName" autocomplete="off" placeholder="请输入项目名称" style="width:510px"></el-input>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ </el-col>
|
|
|
|
+ <el-col :span="24">
|
|
|
|
+ <el-form-item label="生产方公司" prop="customerCompany">
|
|
|
|
+ <el-select v-model="editForm.customerCompany" clearable filterable multiple placeholder="请选择生产方公司" @change="companyChange" value-key='id' style="width:510px">
|
|
|
|
+ <!-- @change="companyChange(0)" -->
|
|
|
|
+ <el-option v-for="item in company" :key="item.id" :label="item.companyName" :value="item">
|
|
|
|
+ </el-option>
|
|
|
|
+ </el-select>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ </el-col>
|
|
|
|
+ <el-col :span="24">
|
|
|
|
+ <el-form-item label="项目经理" prop="managerId">
|
|
|
|
+ <el-select v-model="editForm.managerId" clearable filterable placeholder="请选择项目经理" value-key='id' style="width:510px">
|
|
|
|
+ <el-option v-for="item in charger" :key="item.id" :label="item.username" :value="item">
|
|
|
|
+ </el-option>
|
|
|
|
+ </el-select>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ </el-col>
|
|
|
|
+ <el-col :span="12">
|
|
|
|
+ <el-form-item label="资产方审批人" prop="ownerApproverId">
|
|
|
|
+ <el-select v-model="editForm.ownerApproverId" clearable filterable placeholder="请选择资产方审批人" value-key='id' style="width:190px">
|
|
|
|
+ <el-option v-for="item in charger" :key="item.id" :label="item.username" :value="item">
|
|
|
|
+ </el-option>
|
|
|
|
+ </el-select>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ </el-col>
|
|
|
|
+ <el-col :span="12">
|
|
|
|
+ <el-form-item label="生产方审批人" prop="customerApproverId">
|
|
|
|
+ <el-select v-model="editForm.customerApproverId" clearable filterable placeholder="请选择生产方审批人" value-key='id' style="width:190px">
|
|
|
|
+ <el-option v-for="item in charger" :key="item.id" :label="item.username" :value="item">
|
|
|
|
+ </el-option>
|
|
|
|
+ </el-select>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ </el-col>
|
|
|
|
+ <el-col :span="24">
|
|
|
|
+ <el-form-item label="项目模具">
|
|
|
|
+ <el-select v-model="editForm.userA" clearable filterable multiple placeholder="请选择项目模具" style="width:510px">
|
|
|
|
+ <el-option v-for="item in userA" :key="item.id" :label="item.username" :value="item.id">
|
|
|
|
+ </el-option>
|
|
|
|
+ </el-select>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ </el-col>
|
|
|
|
+ <el-col :span="24">
|
|
|
|
+ <el-form-item label="资产方参与人">
|
|
|
|
+ <el-select v-model="editForm.userA" clearable filterable multiple placeholder="请选择资产方参与人" style="width:510px">
|
|
|
|
+ <el-option v-for="item in userA" :key="item.id" :label="item.username" :value="item.id">
|
|
|
|
+ </el-option>
|
|
|
|
+ </el-select>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ </el-col>
|
|
|
|
+ <el-col :span="24">
|
|
|
|
+ <el-form-item label="生产方参与人">
|
|
|
|
+ <el-select v-model="editForm.userB" clearable filterable multiple placeholder="请选择生产方参与人" style="width:510px">
|
|
|
|
+ <el-option v-for="item in userB" :key="item.id" :label="item.username" :value="item.id">
|
|
|
|
+ </el-option>
|
|
|
|
+ </el-select>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ </el-col>
|
|
|
|
+ </el-form>
|
|
|
|
+ <div slot="footer" class="dialog-footer">
|
|
|
|
+ <el-button @click.native="editFormVisible = false">取消</el-button>
|
|
|
|
+ <el-button type="primary" @click.native="addSubmit" :loading="addLoading">提交</el-button>
|
|
|
|
+ </div>
|
|
|
|
+ </el-dialog>
|
|
</section>
|
|
</section>
|
|
</template>
|
|
</template>
|
|
|
|
|
|
@@ -80,22 +158,10 @@
|
|
export default {
|
|
export default {
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
|
|
+ detailId: this.$route.query.id,
|
|
|
|
+ user: JSON.parse(sessionStorage.getItem('user')),
|
|
//临时数据
|
|
//临时数据
|
|
- mould: {
|
|
|
|
- typeNumber: "MUJU002",
|
|
|
|
- name: "墨模具测试",
|
|
|
|
- project: "墨盒项目",
|
|
|
|
- client: "南京海市蜃楼有限公司",
|
|
|
|
- manufacturer: "南京江宁制造局",
|
|
|
|
- mouldNumber: "MOHE0023",
|
|
|
|
- lifetime: "1年",
|
|
|
|
- initial: "36",
|
|
|
|
- RFIDcode: "RFID1234",
|
|
|
|
- blueprint: true,
|
|
|
|
- BOMtable: true,
|
|
|
|
- partList: false,
|
|
|
|
- standard: false
|
|
|
|
- },
|
|
|
|
|
|
+ proDetail: {},
|
|
documents: [
|
|
documents: [
|
|
{
|
|
{
|
|
name: "墨盒产品验证文档.word",
|
|
name: "墨盒产品验证文档.word",
|
|
@@ -120,7 +186,31 @@
|
|
height: 0
|
|
height: 0
|
|
},
|
|
},
|
|
listLoading: false,
|
|
listLoading: false,
|
|
- activePage: 0
|
|
|
|
|
|
+ activePage: 0,
|
|
|
|
+
|
|
|
|
+ company:[],
|
|
|
|
+ owner: [],
|
|
|
|
+ charger: [],
|
|
|
|
+ formRules: {
|
|
|
|
+ projectName: [
|
|
|
|
+ { required: true, message: '请输入项目名称', trigger: 'blur' }
|
|
|
|
+ ],
|
|
|
|
+ customerCompany: [
|
|
|
|
+ { required: true, message: '请选择客户公司', trigger: 'blur' }
|
|
|
|
+ ],
|
|
|
|
+ managerId: [
|
|
|
|
+ { required: true, message: '请选择项目经理', trigger: ['blur','change'] }
|
|
|
|
+ ]
|
|
|
|
+ },
|
|
|
|
+
|
|
|
|
+ editFormVisible: false,//新增界面是否显示
|
|
|
|
+ addLoading: false,
|
|
|
|
+ //新增界面数据
|
|
|
|
+ editForm: {
|
|
|
|
+ projectName: '',
|
|
|
|
+ customerCompany: [],
|
|
|
|
+ managerId: ''
|
|
|
|
+ }
|
|
};
|
|
};
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
@@ -131,7 +221,89 @@
|
|
handleClick(tab, event) {
|
|
handleClick(tab, event) {
|
|
console.log(tab, event);
|
|
console.log(tab, event);
|
|
},
|
|
},
|
|
|
|
+ //获取详情
|
|
|
|
+ getDetail() {
|
|
|
|
+ this.listLoading = true;
|
|
|
|
+ this.http.post(this.port.project.projectDetail, {
|
|
|
|
+ id: this.detailId
|
|
|
|
+ }, res => {
|
|
|
|
+ if (res.code == "ok") {
|
|
|
|
+ this.proDetail = res.data;
|
|
|
|
+ } else {
|
|
|
|
+ this.$message({
|
|
|
|
+ message: res.msg,
|
|
|
|
+ type: 'error'
|
|
|
|
+ });
|
|
|
|
+ }
|
|
|
|
+ }, error => {
|
|
|
|
+ this.$message({
|
|
|
|
+ message: error,
|
|
|
|
+ type: 'error'
|
|
|
|
+ });
|
|
|
|
+ })
|
|
|
|
+ },
|
|
|
|
+ //获取信息
|
|
|
|
+ getMsg() {
|
|
|
|
+ this.http.post(this.port.project.getUserById, {
|
|
|
|
+ companyIds: this.user.companyId,
|
|
|
|
+ id: this.user.id
|
|
|
|
+ } , res => {
|
|
|
|
+ if (res.code == "ok") {
|
|
|
|
+ var list = res.data , array = [] , owner = [];
|
|
|
|
+ for(var i in list) {
|
|
|
|
+ if(list[i].companyId == this.user.companyId){
|
|
|
|
+ owner.push(list[i])
|
|
|
|
+ } else {
|
|
|
|
+ array.push(list[i])
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ this.charger = res.data;
|
|
|
|
+ this.owner = owner;
|
|
|
|
+ } else {
|
|
|
|
+ this.$message({
|
|
|
|
+ message: res.msg,
|
|
|
|
+ type: 'error'
|
|
|
|
+ });
|
|
|
|
+ }
|
|
|
|
+ }, error => {
|
|
|
|
+ this.$message({
|
|
|
|
+ message: error,
|
|
|
|
+ type: 'error'
|
|
|
|
+ });
|
|
|
|
+ })
|
|
|
|
|
|
|
|
+ this.http.post(this.port.base.companys, {
|
|
|
|
+ parentId: this.user.parentId,
|
|
|
|
+ id: this.user.id
|
|
|
|
+ }, res => {
|
|
|
|
+ if (res.code == "ok") {
|
|
|
|
+ var list = res.data , array = [];
|
|
|
|
+ for(var i in list){
|
|
|
|
+ if(list[i].id != this.user.companyId){
|
|
|
|
+ array.push(list[i])
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ this.company = array;
|
|
|
|
+ } else {
|
|
|
|
+ this.$message({
|
|
|
|
+ message: res.msg,
|
|
|
|
+ type: 'error'
|
|
|
|
+ });
|
|
|
|
+ }
|
|
|
|
+ }, error => {
|
|
|
|
+ this.$message({
|
|
|
|
+ message: error,
|
|
|
|
+ type: 'error'
|
|
|
|
+ });
|
|
|
|
+ })
|
|
|
|
+ },
|
|
|
|
+ edit() {
|
|
|
|
+ this.editFormVisible = true;
|
|
|
|
+ this.editForm = {
|
|
|
|
+ id: this.proDetail.id,
|
|
|
|
+ projectName: this.proDetail.projectName
|
|
|
|
+ }
|
|
|
|
+ },
|
|
//上传
|
|
//上传
|
|
uploadFile(params) {
|
|
uploadFile(params) {
|
|
console.log(params)
|
|
console.log(params)
|
|
@@ -140,9 +312,13 @@
|
|
created() {
|
|
created() {
|
|
let height = window.innerHeight;
|
|
let height = window.innerHeight;
|
|
this.allDetail.height = height - 170 + "px";
|
|
this.allDetail.height = height - 170 + "px";
|
|
|
|
+ const that = this;
|
|
|
|
+ window.onresize = function temp() {
|
|
|
|
+ that.allDetail.height = window.innerHeight - 210;
|
|
|
|
+ };
|
|
},
|
|
},
|
|
mounted() {
|
|
mounted() {
|
|
- var mouldId = this.$route.params.id; //传到当前页面的模具编号
|
|
|
|
|
|
+ this.getDetail();
|
|
}
|
|
}
|
|
};
|
|
};
|
|
</script>
|
|
</script>
|
|
@@ -188,6 +364,12 @@
|
|
top: -5px;
|
|
top: -5px;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ .editDetail {
|
|
|
|
+ margin-left: 10px;
|
|
|
|
+ color:#20a0ff;
|
|
|
|
+ cursor: pointer;
|
|
|
|
+ }
|
|
|
|
+
|
|
.info {
|
|
.info {
|
|
color: grey;
|
|
color: grey;
|
|
}
|
|
}
|