Merge remote-tracking branch 'origin/develop' into develop

This commit is contained in:
Superman_Main
2021-12-01 15:37:52 +08:00
6 changed files with 252 additions and 185 deletions
+2 -1
View File
@@ -65,7 +65,7 @@ export function meetingByMonth(params) {
export function addUn( export function addUn(
closeState,standId, standSerialNumber, standName, closeState,standId, standSerialNumber, standName,
itemsNum, itemsName, productType, itemsNum, itemsName, productType,
productLine, productName, reason, responsibleUnit, productLine, productName,productId,reason, responsibleUnit,
dutyEngineer, authEngineer, qaEngineer, planCloseTime) { dutyEngineer, authEngineer, qaEngineer, planCloseTime) {
const data = { const data = {
closeState, closeState,
@@ -77,6 +77,7 @@ export function addUn(
productType, productType,
productLine, //产品线 productLine, //产品线
productName, //项目名称 productName, //项目名称
productId, //项目编号
reason, //不合规项目 reason, //不合规项目
responsibleUnit, //责任部门 responsibleUnit, //责任部门
dutyEngineer, //责任工程师 dutyEngineer, //责任工程师
@@ -54,8 +54,8 @@
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<pagination :page="page" :total="total" @pageChange="pageChange" <!-- <pagination :page="page" :total="total" @pageChange="pageChange"-->
@pageSizeChange="pageSizeChange"></pagination> <!-- @pageSizeChange="pageSizeChange"></pagination>-->
</div> </div>
<!--满足--> <!--满足-->
@@ -135,6 +135,11 @@
<template slot="title">填写信息</template> <template slot="title">填写信息</template>
</process-title> </process-title>
<div class="tableTitle"> <div class="tableTitle">
<div class="tableButton">
<el-button :disabled="acceptShow" class="common-button-primary add-button" type="primary" size="mini"
@click="batchEdit">批量编辑
</el-button>
</div>
</div> </div>
<el-table <el-table
ref="multipleTable" ref="multipleTable"
@@ -143,7 +148,7 @@
style="width: 100%" style="width: 100%"
border border
@selection-change="selectStandChange" @selection-change="selectStandChange"
height="56%" height="48%"
:header-cell-style="{background: '#e8e8e8', color: '#333333', fontSize: '16px', :header-cell-style="{background: '#e8e8e8', color: '#333333', fontSize: '16px',
fontWeight: 'bold', fontFamily: 'MicrosoftYaHei-Bold'}"> fontWeight: 'bold', fontFamily: 'MicrosoftYaHei-Bold'}">
<el-table-column <el-table-column
@@ -211,10 +216,6 @@
<span>{{ scope.row.zCCSSRQ ? $moment(scope.row.zCCSSRQ).format("YYYY-MM-DD") : "" }}</span> <span>{{ scope.row.zCCSSRQ ? $moment(scope.row.zCCSSRQ).format("YYYY-MM-DD") : "" }}</span>
</template> </template>
</el-table-column> </el-table-column>
<!-- <el-table-column-->
<!-- prop="productType"-->
<!-- align="center"-->
<!-- label="在研产品">-->
<el-table-column <el-table-column
prop="researchCompliance" prop="researchCompliance"
align="center" align="center"
@@ -233,6 +234,7 @@
<el-input <el-input
v-else v-else
:disabled="acceptShow" :disabled="acceptShow"
clearable
@click.native="handlePrice(scope.row)" @click.native="handlePrice(scope.row)"
v-model="dataList[scope.$index].complianceReasons" v-model="dataList[scope.$index].complianceReasons"
placeholder="请输入合规原因" placeholder="请输入合规原因"
@@ -309,6 +311,7 @@
:disabled="acceptShow" :disabled="acceptShow"
class="datePickLen" class="datePickLen"
clearable clearable
value-format="yyyy-MM-dd HH:mm:ss"
@click.native="handlePrice(scope.row)" @click.native="handlePrice(scope.row)"
v-model="dataList[scope.$index].completionTime" v-model="dataList[scope.$index].completionTime"
type="date" type="date"
@@ -317,104 +320,6 @@
</template> </template>
</el-table-column> </el-table-column>
</el-table-column> </el-table-column>
<!-- </el-table-column>-->
<!-- <el-table-column-->
<!-- align="center"-->
<!-- label="在产产品">-->
<!-- <el-table-column-->
<!-- prop="productionCompliance"-->
<!-- align="center"-->
<!-- width="160"-->
<!-- label="合规(具体情况)">-->
<!-- <template slot-scope="scope">-->
<!-- <el-input-->
<!-- v-if="dataList[scope.$index].zcNoCompliance && dataList[scope.$index].zcNoCompliance.length>0-->
<!-- || dataList[scope.$index].zcCountermeasures && dataList[scope.$index].zcCountermeasures>0-->
<!-- || dataList[scope.$index].zcCompletionTime && dataList[scope.$index].zcCompletionTime !== null"-->
<!-- disabled-->
<!-- v-model="dataList[scope.$index].zcComplianceReasons"-->
<!-- placeholder="请输入合规原因"-->
<!-- >-->
<!-- </el-input>-->
<!-- <el-input-->
<!-- v-else-->
<!-- v-model="dataList[scope.$index].zcComplianceReasons"-->
<!-- placeholder="请输入合规原因"-->
<!-- >-->
<!-- </el-input>-->
<!-- </template>-->
<!-- </el-table-column>-->
<!-- <el-table-column-->
<!-- align="center"-->
<!-- width="160"-->
<!-- label="不合规">-->
<!-- <el-table-column-->
<!-- prop="productionNonCompliance"-->
<!-- align="center"-->
<!-- width="170"-->
<!-- label="不合规项目">-->
<!-- <template slot-scope="scope">-->
<!-- <el-input-->
<!-- v-if="dataList[scope.$index].zcComplianceReasons && dataList[scope.$index].zcComplianceReasons.length>0"-->
<!-- disabled-->
<!-- v-model="dataList[scope.$index].zcNoCompliance"-->
<!-- placeholder="请输入不合规项目"-->
<!-- >-->
<!-- </el-input>-->
<!-- <el-input-->
<!-- v-else-->
<!-- v-model="dataList[scope.$index].zcNoCompliance"-->
<!-- placeholder="请输入不合规项目"-->
<!-- >-->
<!-- </el-input>-->
<!-- </template>-->
<!-- </el-table-column>-->
<!-- <el-table-column-->
<!-- prop="productionCountermeasures"-->
<!-- align="center"-->
<!-- width="160"-->
<!-- label="应对措施">-->
<!-- <template slot-scope="scope">-->
<!-- <el-input-->
<!-- v-if="dataList[scope.$index].zcComplianceReasons && dataList[scope.$index].zcComplianceReasons.length>0"-->
<!-- disabled-->
<!-- v-model="dataList[scope.$index].zcCountermeasures"-->
<!-- placeholder="请输入应对措施"-->
<!-- >-->
<!-- </el-input>-->
<!-- <el-input-->
<!-- v-else-->
<!-- v-model="dataList[scope.$index].zcCountermeasures"-->
<!-- placeholder="请输入应对措施"-->
<!-- >-->
<!-- </el-input>-->
<!-- </template>-->
<!-- </el-table-column>-->
<!-- <el-table-column-->
<!-- prop="productionCompletionTime"-->
<!-- align="center"-->
<!-- width="140"-->
<!-- label="完成时间">-->
<!-- <template slot-scope="scope">-->
<!-- <el-date-picker-->
<!-- v-if="dataList[scope.$index].zcComplianceReasons && dataList[scope.$index].zcComplianceReasons.length>0"-->
<!-- disabled-->
<!-- v-model="dataList[scope.$index].zcCompletionTime"-->
<!-- type="date"-->
<!-- placeholder="请选择日期">-->
<!-- </el-date-picker>-->
<!-- <el-date-picker-->
<!-- v-else-->
<!-- class="datePickLen"-->
<!-- clearable-->
<!-- v-model="dataList[scope.$index].zcCompletionTime"-->
<!-- type="date"-->
<!-- placeholder="请选择日期">-->
<!-- </el-date-picker>-->
<!-- </template>-->
<!-- </el-table-column>-->
<!-- </el-table-column>-->
<!-- </el-table-column>-->
</el-table> </el-table>
</div> </div>
<div> <div>
@@ -525,6 +430,96 @@
@checkedRole="checkedTransferRole" @checkedRole="checkedTransferRole"
:nodeList="nodeList" :nodeList="nodeList"
></Role-tree> ></Role-tree>
<!-- 批量编辑弹窗-->
<el-drawer
title="批量填写"
:visible.sync="modalShowFlag"
:wrapperClosable="false"
size="800px">
<div class="demo-drawer-content">
<el-form :model="batchEditForm" class="label-input-form" ref="projectComplianceForm" label-width="150">
<!-- <el-divider><span><b>在研产品</b></span></el-divider>-->
<el-formItem label="合规原因" class="add-form-item">
<el-input
v-if="batchEditForm.noCompliance && batchEditForm.noCompliance.length>0
|| batchEditForm.countermeasures && batchEditForm.countermeasures.length>0
|| batchEditForm.completionTime && batchEditForm.completionTime !== null"
disabled
v-model="batchEditForm.complianceReasons"
placeholder="请输入合规原因"
>
</el-input>
<el-input
v-else
:disabled="acceptShow"
v-model="batchEditForm.complianceReasons"
placeholder="请输入合规原因"
>
</el-input>
</el-formItem>
<el-form-item label="不合规项目" class="add-form-item">
<el-input
v-if="batchEditForm.complianceReasons && batchEditForm.complianceReasons.length>0"
disabled
v-model="batchEditForm.noCompliance"
placeholder="请输入不合规项目"
>
</el-input>
<el-input
v-else
:disabled="acceptShow"
v-model="batchEditForm.noCompliance"
placeholder="请输入不合规项目"
>
</el-input>
</el-form-item>
<el-form-item label="不合规应对措施" class="add-form-item">
<el-input
v-if="batchEditForm.complianceReasons && batchEditForm.complianceReasons.length>0"
disabled
v-model="batchEditForm.countermeasures"
placeholder="请输入不合规应对措施"
>
</el-input>
<el-input
v-else
:disabled="acceptShow"
v-model="batchEditForm.countermeasures"
placeholder="请输入不合规应对措施"
>
</el-input>
</el-form-item>
<el-form-item label="完成时间" class="add-form-item">
<el-date-picker
v-if="batchEditForm.complianceReasons && batchEditForm.complianceReasons.length>0"
disabled
v-model="batchEditForm.completionTime"
type="date"
placeholder="请选择日期">
</el-date-picker>
<el-date-picker
v-else
:disabled="acceptShow"
class="datePickLen"
clearable
value-format="yyyy-MM-dd HH:mm:ss"
v-model="batchEditForm.completionTime"
type="date"
placeholder="请选择日期">
</el-date-picker>
</el-form-item>
<br>
</el-form>
</div>
<div class="demo-drawer-footer">
<el-button class="common-button-primary" size="mini" icon="el-icon-check" type="primary"
@click="saveBatchEditForm">
确定
</el-button>
<el-button class="common-button-default" size="mini" icon="el-icon-close" @click="cancelBatchEditForm">取消
</el-button>
</div>
</el-drawer>
</div> </div>
</template> </template>
@@ -546,12 +541,24 @@ export default {
return { return {
//折叠的标志,true为折叠,false为不折叠 //折叠的标志,true为折叠,false为不折叠
foldFormFlag: false, foldFormFlag: false,
comFlag: true, comFlag: 0,
nodeList:[], nodeList:[],
drawerTitle:'', drawerTitle:'',
isTransfer: false, isTransfer: false,
// 调整处理人抽屉状态 // 调整处理人抽屉状态
drawerModal: false, drawerModal: false,
modalShowFlag: false, // 批量编辑开关
batchEditForm: {
// 在研产品
// 合规
complianceReasons: "",
// 不合规
noCompliance: "",
// 应对措施
countermeasures: "",
// 完成时间
completionTime: "",
},
detailData: [], detailData: [],
sarProStateTableHeight: null, // 项目列表高度 sarProStateTableHeight: null, // 项目列表高度
// 当前流程类型(1待办/2已办) // 当前流程类型(1待办/2已办)
@@ -735,6 +742,12 @@ export default {
item.implementer = this.$store.getters.userInfo.userName; item.implementer = this.$store.getters.userInfo.userName;
}); });
this.dataList = item.step3DTOS; this.dataList = item.step3DTOS;
this.dataList.forEach(item => {
this.$set(item,'complianceReasons', '')
this.$set(item,'noCompliance', '')
this.$set(item,'countermeasures', '')
this.$set(item,'completionTime', '')
})
} else { } else {
this.dataList = item.dataList; this.dataList = item.dataList;
@@ -800,40 +813,76 @@ export default {
}, },
handlePrice(row){ handlePrice(row){
if(row.complianceReasons !== '' || (row.noCompliance !== '' && row.countermeasures !== '' && row.completionTime !== '') || (row.complianceReasons === '' && row.noCompliance === '' && row.countermeasures === '' && row.completionTime === '')){ if(row.complianceReasons !== '' || (row.noCompliance !== '' && row.countermeasures !== '' && row.completionTime !== '') || (row.complianceReasons === '' && row.noCompliance === '' && row.countermeasures === '' && row.completionTime === '')){
this.comFlag = true this.comFlag = 0
}else{ }else{
this.comFlag = false this.comFlag = this.comFlag + 1
} }
}, },
//提交事件 //提交事件
handleSubmit() { handleSubmit() {
if(!this.comFlag) { if(this.comFlag > 0) {
this.$message.warning('请填写完整的不符合项信息') this.$message.warning('请填写完整的不符合项信息')
}else{ }else{
this.listForm.prcCreateUser = this.$store.getters.userInfo.userId; // this.listForm.prcCreateUser = this.$store.getters.userInfo.userId;
this.listForm.commentText = this.commentText; // this.listForm.commentText = this.commentText;
this.listForm.approvalOpinion = ""; // this.listForm.approvalOpinion = "";
this.listForm.signFlag = ""; // this.listForm.signFlag = "";
this.listForm.dataList = this.dataList; // this.listForm.dataList = this.dataList;
const json = JSON.stringify(this.listForm); // const json = JSON.stringify(this.listForm);
this.isSubmit = true; // this.isSubmit = true;
this.$http.post("lawss/activiti/completeTask", { // this.$http.post("lawss/activiti/completeTask", {
taskIds: this.taskIds, // taskIds: this.taskIds,
userId: this.userId, // userId: this.userId,
json: json // json: json
}, { // }, {
_this: this // _this: this
}, res => { // }, res => {
if (res.success) { // if (res.success) {
this.$message.success(res.message); // this.$message.success(res.message);
this.$router.push("/processCenter"); // this.$router.push("/processCenter");
} // }
this.isSubmit = false; // this.isSubmit = false;
}, e => { // }, e => {
//
}); // });
} }
}, },
//批量编辑
batchEdit() {
if (this.selectList.length > 0) {
//合规
this.batchEditForm.complianceReasons = "";
//不合规
this.batchEditForm.noCompliance = "";
//应对措施
this.batchEditForm.countermeasures = "";
//完成时间
this.batchEditForm.completionTime = "";
this.modalShowFlag = true;
} else {
this.$message.warning("请选择要编辑的数据");
}
},
//批量编辑确定按钮事件
saveBatchEditForm() {
this.dataList.forEach(item => {
this.selectList.forEach(items => {
if (item.id === items) {
item.complianceReasons = this.batchEditForm.complianceReasons;
//不合规
item.noCompliance = this.batchEditForm.noCompliance;
//应对措施
item.countermeasures = this.batchEditForm.countermeasures;
//完成时间
item.completionTime = this.batchEditForm.completionTime;
}
});
});
this.modalShowFlag = false;
},
cancelBatchEditForm() {
this.modalShowFlag = false;
},
//标准表格选择框改变 //标准表格选择框改变
selectStandChange(data) { selectStandChange(data) {
this.selectList = []; this.selectList = [];
@@ -456,7 +456,7 @@
></Role-tree> ></Role-tree>
<el-drawer <el-drawer
title="批量填写" title="批量填写"
:visible.sync="modalshowflag" :visible.sync="modalShowFlag"
:wrapperClosable="false" :wrapperClosable="false"
size="800px"> size="800px">
<div class="demo-drawer-content"> <div class="demo-drawer-content">
@@ -531,32 +531,6 @@
</el-date-picker> </el-date-picker>
</el-form-item> </el-form-item>
<br> <br>
<!-- <el-divider><span><b>在产产品</b></span></el-divider>-->
<!-- <el-formItem label="合规原因" class="add-form-item">-->
<!-- <el-input-->
<!-- v-model="batchEditForm.zcComplianceReasons"-->
<!-- placeholder="请输入合规原因"-->
<!-- ></el-input>-->
<!-- </el-formItem>-->
<!-- <el-form-item label="不合规项目" class="add-form-item">-->
<!-- <el-input-->
<!-- v-model="batchEditForm.zcNoCompliance"-->
<!-- placeholder="请输入不合规项目"-->
<!-- ></el-input>-->
<!-- </el-form-item>-->
<!-- <el-form-item label="不合规应对措施" class="add-form-item">-->
<!-- <el-input-->
<!-- v-model="batchEditForm.zcCountermeasures"-->
<!-- placeholder="请输入不合规应对措施"-->
<!-- ></el-input>-->
<!-- </el-form-item>-->
<!-- <el-form-item label="完成时间" class="add-form-item">-->
<!-- <el-date-picker-->
<!-- v-model="batchEditForm.zcCompletionTime"-->
<!-- type="date"-->
<!-- placeholder="选择日期">-->
<!-- </el-date-picker>-->
<!-- </el-form-item>-->
</el-form> </el-form>
</div> </div>
<div class="demo-drawer-footer"> <div class="demo-drawer-footer">
@@ -628,7 +602,7 @@ export default {
todoId: "", todoId: "",
showColumn: true, showColumn: true,
drawerTitle: "", //drawer标题 drawerTitle: "", //drawer标题
modalshowflag: false, // drawer开关 modalShowFlag: false, // drawer开关
selectList: [], selectList: [],
treeData: [], // 人员数据 treeData: [], // 人员数据
roleForm: { roleForm: {
@@ -723,10 +697,10 @@ export default {
} }
}); });
}); });
this.modalshowflag = false; this.modalShowFlag = false;
}, },
cancelBatchEditForm() { cancelBatchEditForm() {
this.modalshowflag = false; this.modalShowFlag = false;
}, },
//批量编辑 //批量编辑
batchEdit() { batchEdit() {
@@ -739,15 +713,7 @@ export default {
this.batchEditForm.countermeasures = ""; this.batchEditForm.countermeasures = "";
//完成时间 //完成时间
this.batchEditForm.completionTime = ""; this.batchEditForm.completionTime = "";
//合规 this.modalShowFlag = true;
this.batchEditForm.zcComplianceReasons = "";
//不合规
this.batchEditForm.zcNoCompliance = "";
//应对措施
this.batchEditForm.zcCountermeasures = "";
//完成时间
this.batchEditForm.zcCompletionTime = "";
this.modalshowflag = true;
} else { } else {
this.$message.warning("请选择要编辑的数据"); this.$message.warning("请选择要编辑的数据");
} }
@@ -932,14 +932,14 @@
:disabled="formdisableflag" :disabled="formdisableflag"
></custom-SVPPS> ></custom-SVPPS>
</template> </template>
<template v-else-if="field.attrField === 'XCXSSRQ' || field.attrField === 'ZCCSSRQ'"> <template v-else-if="field.attrField === 'XCXSSRQ' || field.attrField === 'ZCCSSRQ' || field.attrField === 'SSRQ'">
<custom-date-pick <custom-date-pick-group
v-if="field.attrField !== 'ZCCSSRQGJ' && field.attrField !== 'XCXSSRQGJ' && field.attrField !== 'SSRQGJ' " v-if="field.attrField !== 'ZCCSSRQGJ' && field.attrField !== 'XCXSSRQGJ' && field.attrField !== 'SSRQGJ' "
:key="field.attrField" :key="field.attrField"
:config="field" :config="field"
v-model="sarStandardsInfoEO[field.attrField]" v-model="sarStandardsInfoEO[field.attrField]"
:disabled="formdisableflag" :disabled="formdisableflag"
></custom-date-pick> ></custom-date-pick-group>
</template> </template>
<template v-else-if="field.attrType === 'DATE_PIC_OPTS'"> <template v-else-if="field.attrType === 'DATE_PIC_OPTS'">
<custom-date-pick-group <custom-date-pick-group
@@ -137,10 +137,6 @@
prop="productType" prop="productType"
width="100" width="100"
label="产品类型"> label="产品类型">
<!-- <template slot-scope="scope">
<div v-if="scope.row.productType === 'research'">在研</div>
<div v-if="scope.row.productType === 'product'">在产</div>
</template>-->
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="productLine" prop="productLine"
@@ -161,6 +157,7 @@
<el-table-column <el-table-column
prop="responsibleUnit" prop="responsibleUnit"
width="180" width="180"
show-overflow-tooltip
label="责任部门"> label="责任部门">
</el-table-column> </el-table-column>
<el-table-column <el-table-column
@@ -428,6 +425,14 @@
></el-option> ></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item prop="projectNumber" label="项目编号" style="width: 100%; margin-right:10px"
class="add-form-item">
<el-input
:disabled="true"
v-model="addForm.projectNumber"
placeholder="请输入项目编号"
/>
</el-form-item>
<el-form-item prop="productType" label="产品类型" style="width: 100%; margin-right:10px" <el-form-item prop="productType" label="产品类型" style="width: 100%; margin-right:10px"
class="add-form-item"> class="add-form-item">
<el-input <el-input
@@ -486,9 +491,9 @@
<el-form-item prop="responsibleUnit" label="责任部门" style="width: 100%; margin-right:10px" <el-form-item prop="responsibleUnit" label="责任部门" style="width: 100%; margin-right:10px"
class="add-form-item"> class="add-form-item">
<el-input <el-input
:disabled="true"
v-model="addForm.responsibleUnit" v-model="addForm.responsibleUnit"
placeholder="请输入责任部门" placeholder="请输入责任部门"
@click.native="choiceZRBM"
/> />
</el-form-item> </el-form-item>
<el-form-item prop="reason" label="不合规项目" style="width: 100%; margin-right:10px" <el-form-item prop="reason" label="不合规项目" style="width: 100%; margin-right:10px"
@@ -543,6 +548,7 @@
class="common-button-primary" class="common-button-primary"
icon="el-icon-check" icon="el-icon-check"
type="primary" type="primary"
:loading="submiting"
@click="submit">提交 @click="submit">提交
</el-button> </el-button>
<el-button <el-button
@@ -566,6 +572,12 @@
:nodeList="nodeListMore" :nodeList="nodeListMore"
@checkedRole="drawerMore" @checkedRole="drawerMore"
/> />
<MechanismTree
is-title="选择部门信息"
:is-visible.sync="modalshowflagZRBM"
:nodeList="nodeListZRBM"
@checkedRole="drawerCheckZRBM"
/>
</div> </div>
</template> </template>
@@ -599,6 +611,7 @@ export default {
itemsNum: "", //条款号 itemsNum: "", //条款号
itemsName: "", //条款名称 itemsName: "", //条款名称
productType: "", productType: "",
projectNumber: "",
productLine: "", //产品线 productLine: "", //产品线
productName: "", //项目名称 productName: "", //项目名称
reason: "", //不合规项目 reason: "", //不合规项目
@@ -630,6 +643,9 @@ export default {
productName: [ productName: [
{ required: true, message: "请输入项目名称", trigger: "change" } { required: true, message: "请输入项目名称", trigger: "change" }
], ],
projectNumber: [
{ required: true, message: "请输入项目编号", trigger: "change" }
],
reason: [ reason: [
{ required: true, message: "请输入不合规项目", trigger: "blur" } { required: true, message: "请输入不合规项目", trigger: "blur" }
], ],
@@ -671,12 +687,19 @@ export default {
// 新增编辑框的disabled // 新增编辑框的disabled
serialNumber: true, serialNumber: true,
// 提交按钮loading
submiting: false,
// 选择人(单选)
roleShowflag: false, roleShowflag: false,
nodeList: [], nodeList: [],
// 选择人(多选)
titleMore: '', titleMore: '',
nodeListMore: [], nodeListMore: [],
roleShowMore: false, roleShowMore: false,
// 选择责任部门
nodeListZRBM: [],
modalshowflagZRBM: false
}; };
}, },
methods: { methods: {
@@ -877,6 +900,7 @@ export default {
const productType = this.addForm.productType; const productType = this.addForm.productType;
const productLine = this.addForm.productLine; const productLine = this.addForm.productLine;
const productName = this.addForm.productName; const productName = this.addForm.productName;
const productId = this.addForm.projectNumber;
const reason = this.addForm.reason; const reason = this.addForm.reason;
const responsibleUnit = this.addForm.responsibleUnit; const responsibleUnit = this.addForm.responsibleUnit;
const dutyEngineer = this.addForm.dutyEngineer; const dutyEngineer = this.addForm.dutyEngineer;
@@ -886,13 +910,15 @@ export default {
if (this.drawerTitle === "新增") { if (this.drawerTitle === "新增") {
this.$refs["addForm"].validate((valid) => { this.$refs["addForm"].validate((valid) => {
if (valid) { if (valid) {
this.submiting = true
addUn( addUn(
closeState, standId, standSerialNumber, closeState, standId, standSerialNumber,
standName, itemsNum, itemsName, productType, standName, itemsNum, itemsName, productType,
productLine, productName, reason, productLine, productName, productId,reason,
responsibleUnit, dutyEngineer, responsibleUnit, dutyEngineer,
authEngineer, qaEngineer, planCloseTime).then(res => { authEngineer, qaEngineer, planCloseTime).then(res => {
if (res.ok) { if (res.ok) {
this.submiting = false
this.$message.success("新增成功"); this.$message.success("新增成功");
this.drawerTable = false; this.drawerTable = false;
this.getTableByPage(); this.getTableByPage();
@@ -900,11 +926,13 @@ export default {
}); });
} else { } else {
this.$message.warning("请完善基础信息"); this.$message.warning("请完善基础信息");
this.submiting = false
} }
}); });
} else { } else {
this.$refs["addForm"].validate((valid) => { this.$refs["addForm"].validate((valid) => {
if (valid) { if (valid) {
this.submiting = true
editUn( editUn(
closeState, standId, standSerialNumber, closeState, standId, standSerialNumber,
standName, itemsNum, itemsName, productType, standName, itemsNum, itemsName, productType,
@@ -912,6 +940,7 @@ export default {
dutyEngineer, authEngineer, qaEngineer, dutyEngineer, authEngineer, qaEngineer,
planCloseTime, id).then(res => { planCloseTime, id).then(res => {
if (res.ok) { if (res.ok) {
this.submiting = false
this.$message.success("编辑成功"); this.$message.success("编辑成功");
this.drawerTable = false; this.drawerTable = false;
this.getTableByPage(); this.getTableByPage();
@@ -919,6 +948,7 @@ export default {
}); });
} else { } else {
this.$message.warning("请完善基础信息"); this.$message.warning("请完善基础信息");
this.submiting = false
} }
}); });
} }
@@ -954,7 +984,7 @@ export default {
} }
}); });
this.dataList = res.data.records; this.dataList = res.data.records;
this.dataList.forEach(item => { /*this.dataList.forEach(item => {
// 责任部门转换 // 责任部门转换
if (item.zrbm !== null || item.zrbm !== "") { if (item.zrbm !== null || item.zrbm !== "") {
let k = (item.zrbm || "").split(","); let k = (item.zrbm || "").split(",");
@@ -967,7 +997,7 @@ export default {
} }
} }
} }
}); });*/
}); });
}, },
//新增事件 //新增事件
@@ -1063,12 +1093,13 @@ export default {
/** 项目名称change事件 */ /** 项目名称change事件 */
handleChange(val) { handleChange(val) {
console.log(val);
if (this.drawerTitle === '编辑') { if (this.drawerTitle === '编辑') {
this.addForm.standName = '' this.addForm.standName = ''
this.addForm.standSerialNumber = '' this.addForm.standSerialNumber = ''
this.addForm.responsibleUnit = ''
} }
this.addForm.productId = val.id this.addForm.productId = val.id
this.addForm.projectNumber = val.projectNumber
this.addForm.productLine = val.productLine this.addForm.productLine = val.productLine
this.addForm.productName = val.projectName this.addForm.productName = val.projectName
this.addForm.productType = val.projectPlatfor this.addForm.productType = val.projectPlatfor
@@ -1080,7 +1111,6 @@ export default {
standChange(item) { standChange(item) {
this.addForm.standName = item.standName this.addForm.standName = item.standName
this.addForm.standSerialNumber = item.standSort + '-' + item.standNumber + '-' + item.standYear this.addForm.standSerialNumber = item.standSort + '-' + item.standNumber + '-' + item.standYear
this.addForm.responsibleUnit = item.zrbm || "--";
}, },
/** 责任工程师选择 */ /** 责任工程师选择 */
choiceZRR(type, title, id) { choiceZRR(type, title, id) {
@@ -1120,6 +1150,27 @@ export default {
this.roleShowMore = true this.roleShowMore = true
}, },
/** 选择责任部门 */
choiceZRBM(type, title, id) {
this.nodeListZRBM = []
this.nodeListZRBM.push(id)
this.modalshowflagZRBM = true
},
drawerCheckZRBM(data) {
let idList = ''
let nameList = ''
data.forEach(item => {
if (nameList.length > 0) {
nameList += ','
idList += ','
}
idList += item.id
nameList += item.name
})
this.addForm.responsibleUnit = nameList;
},
}, },
mounted() { mounted() {
//查询已维护的项目 //查询已维护的项目