未符合项整改数据库新增bug

This commit is contained in:
宋伟佳
2021-12-13 15:16:55 +08:00
parent f76ea7f534
commit dbd1b05461
2 changed files with 63 additions and 44 deletions
+2 -4
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,productId,reason, responsibleUnit, productLine, productName,productId,reason,
dutyEngineer, authEngineer, qaEngineer, planCloseTime) { dutyEngineer, authEngineer, qaEngineer, planCloseTime) {
const data = { const data = {
closeState, closeState,
@@ -79,7 +79,6 @@ export function addUn(
productName, //项目名称 productName, //项目名称
productId, //项目编号 productId, //项目编号
reason, //不合规项目 reason, //不合规项目
responsibleUnit, //责任部门
dutyEngineer, //责任工程师 dutyEngineer, //责任工程师
authEngineer, //认证工程师 authEngineer, //认证工程师
qaEngineer, //质量工程师 qaEngineer, //质量工程师
@@ -96,7 +95,7 @@ export function addUn(
export function editUn( export function editUn(
closeState, standId, standSerialNumber, standName, closeState, standId, standSerialNumber, standName,
itemsNum, itemsName, productType, itemsNum, itemsName, productType,
productLine, productName, reason, responsibleUnit, productLine, productName, reason,
dutyEngineer, authEngineer, qaEngineer, planCloseTime, id) { dutyEngineer, authEngineer, qaEngineer, planCloseTime, id) {
const data = { const data = {
closeState, closeState,
@@ -109,7 +108,6 @@ export function editUn(
productLine, //产品线 productLine, //产品线
productName, //项目名称 productName, //项目名称
reason, //不合规项目 reason, //不合规项目
responsibleUnit, //责任部门
dutyEngineer, //责任工程师 dutyEngineer, //责任工程师
authEngineer, //认证工程师 authEngineer, //认证工程师
qaEngineer, //质量工程师 qaEngineer, //质量工程师
@@ -250,7 +250,7 @@
<div class="seeItem">{{ historySeeForm.responsibleUnit }}</div> <div class="seeItem">{{ historySeeForm.responsibleUnit }}</div>
</el-form-item> </el-form-item>
<el-form-item class="add-form-item" label="责任工程师:"> <el-form-item class="add-form-item" label="责任工程师:">
<div class="seeItem">{{ historySeeForm.dutyEngineer }}</div> <div class="seeItem">{{ historySeeForm.dutyEngineerName }}</div>
</el-form-item> </el-form-item>
<el-form-item class="add-form-item" label="认证工程师:"> <el-form-item class="add-form-item" label="认证工程师:">
<div class="seeItem">{{ historySeeForm.authEngineer }}</div> <div class="seeItem">{{ historySeeForm.authEngineer }}</div>
@@ -418,8 +418,9 @@
<el-form-item prop="standSerialNumber" label="标准号" style="width: 100%; margin-right:10px" <el-form-item prop="standSerialNumber" label="标准号" style="width: 100%; margin-right:10px"
class="add-form-item"> class="add-form-item">
<el-input <el-input
readonly
v-model="addForm.standSerialNumber" v-model="addForm.standSerialNumber"
placeholder="请输入标准名称" placeholder="请输入标准"
/> />
<el-button <el-button
type="primary" type="primary"
@@ -432,7 +433,7 @@
<el-form-item prop="standName" label="标准名称" style="width: 100%; margin-right:10px" <el-form-item prop="standName" label="标准名称" style="width: 100%; margin-right:10px"
class="add-form-item"> class="add-form-item">
<el-input <el-input
:disabled="true" readonly
v-model="addForm.standName" v-model="addForm.standName"
placeholder="请输入标准名称" placeholder="请输入标准名称"
/> />
@@ -487,14 +488,14 @@
placeholder="请输入项目编号" placeholder="请输入项目编号"
/> />
</el-form-item> </el-form-item>
<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-->
v-model="addForm.responsibleUnit" <!-- v-model="addForm.responsibleUnit"-->
placeholder="请输入责任部门" <!-- placeholder="请输入责任部门"-->
@click.native="choiceZRBM" <!-- @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"
class="add-form-item"> class="add-form-item">
<el-input <el-input
@@ -502,10 +503,10 @@
placeholder="请输入不合规项目" placeholder="请输入不合规项目"
:maxlength="500" /> :maxlength="500" />
</el-form-item> </el-form-item>
<el-form-item prop="dutyEngineer" label="责任工程师" style="width: 100%; margin-right:10px" <el-form-item prop="dutyEngineerName" label="责任工程师" style="width: 100%; margin-right:10px"
class="add-form-item"> class="add-form-item">
<el-input <el-input
v-model="addForm.dutyEngineer" v-model="addForm.dutyEngineerName"
placeholder="请输入责任工程师" placeholder="请输入责任工程师"
@click.native="choiceZRR" @click.native="choiceZRR"
/> />
@@ -775,22 +776,22 @@ export default {
}, //表单数据 }, //表单数据
formRules: { formRules: {
standSerialNumber: [ standSerialNumber: [
{ required: true, message: "请输入标准号", trigger: "blur" } { required: true, message: "请输入标准号", trigger: "change" }
], ],
standName: [ standName: [
{ required: true, message: "请输入标准名称", trigger: "blur" } { required: true, message: "请输入标准名称", trigger: "change" }
],
itemsNum: [
{ required: true, message: "请输入条款号", trigger: "change" }
],
itemsName: [
{ required: true, message: "请输入条款名称", trigger: "change" }
], ],
// itemsNum: [
// { required: true, message: "请输入条款号", trigger: "blur" }
// ],
// itemsName: [
// { required: true, message: "请输入条款名称", trigger: "blur" }
// ],
productType: [ productType: [
{ required: true, message: "请输入产品类型", trigger: "blur" } { required: true, message: "请输入产品类型", trigger: "change" }
], ],
productLine: [ productLine: [
{ required: true, message: "请输入产品线", trigger: "blur" } { required: true, message: "请输入产品线", trigger: "change" }
], ],
productName: [ productName: [
{ required: true, message: "请输入项目名称", trigger: "change" } { required: true, message: "请输入项目名称", trigger: "change" }
@@ -799,16 +800,16 @@ export default {
{ required: true, message: "请输入项目编号", trigger: "change" } { required: true, message: "请输入项目编号", trigger: "change" }
], ],
reason: [ reason: [
{ required: true, message: "请输入不合规项目", trigger: "blur" } { required: true, message: "请输入不合规项目", trigger: "change" }
],
responsibleUnit: [
{ required: true, message: "请输入责任部门", trigger: "blur" }
], ],
// responsibleUnit: [
// { required: true, message: "请输入责任部门", trigger: "change" }
// ],
dutyEngineerName: [ dutyEngineerName: [
{ required: true, message: "请输入责任工程师", trigger: "blur" } { required: true, message: "请输入责任工程师", trigger: "change" }
], ],
planCloseTime: [ planCloseTime: [
{ required: true, message: "请选择计划关闭时间", trigger: "blur" } { required: true, message: "请选择计划关闭时间", trigger: "change" }
] ]
}, },
drawerTable: false, //表单模态窗 drawerTable: false, //表单模态窗
@@ -907,15 +908,18 @@ export default {
}, },
//确认添加标准 //确认添加标准
okStand(){ okStand(){
if(this.standList > 1){ if(this.standList.length > 1){
this.$message.warning('您只能选择一条标准进行添加') this.$message.warning('您只能选择一条标准进行添加')
}else if(this.standList < 1){ }else if(this.standList.length < 1){
this.$message.warning('请至少选择一条数据进行添加') this.$message.warning('请至少选择一条数据进行添加')
}else{ }else{
this.addForm.standId = this.standList[0].id this.addForm.standId = this.standList[0].id
this.addForm.standName = this.standList[0].standName this.addForm.standName = this.standList[0].standName
this.addForm.standSerialNumber = this.standList[0].standSort + '-' + this.standList[0].standNumber + '-' + this.standList[0].standYear this.addForm.standSerialNumber = this.standList[0].standSort + '-' + this.standList[0].standNumber + '-' + this.standList[0].standYear
this.dialogTableVisible = false this.dialogTableVisible = false
if(this.addForm.standName){
this.$refs.addForm.validateField('standName');
}
} }
}, },
//添加标准select的改变 //添加标准select的改变
@@ -1094,7 +1098,7 @@ export default {
const productName = this.addForm.productName; const productName = this.addForm.productName;
const productId = this.addForm.productId; const productId = this.addForm.productId;
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;
const authEngineer = this.addForm.authEngineer; const authEngineer = this.addForm.authEngineer;
const qaEngineer = this.addForm.qaEngineer; const qaEngineer = this.addForm.qaEngineer;
@@ -1107,7 +1111,7 @@ export default {
closeState, standId, standSerialNumber, closeState, standId, standSerialNumber,
standName, itemsNum, itemsName, productType, standName, itemsNum, itemsName, productType,
productLine, productName, productId,reason, productLine, productName, productId,reason,
responsibleUnit, dutyEngineer, dutyEngineer,
authEngineer, qaEngineer, planCloseTime).then(res => { authEngineer, qaEngineer, planCloseTime).then(res => {
if (res.ok) { if (res.ok) {
this.submiting = false this.submiting = false
@@ -1128,7 +1132,7 @@ export default {
editUn( editUn(
closeState, standId, standSerialNumber, closeState, standId, standSerialNumber,
standName, itemsNum, itemsName, productType, standName, itemsNum, itemsName, productType,
productLine, productName, reason, responsibleUnit, productLine, productName, reason,
dutyEngineer, authEngineer, qaEngineer, dutyEngineer, authEngineer, qaEngineer,
planCloseTime, id).then(res => { planCloseTime, id).then(res => {
if (res.ok) { if (res.ok) {
@@ -1197,8 +1201,8 @@ export default {
this.$http.get("sarStandardsInfo/sar-standards-info/getSarStandardsInfoPageByWk1", { this.$http.get("sarStandardsInfo/sar-standards-info/getSarStandardsInfoPageByWk1", {
standType: this.standardSearch.standType, standType: this.standardSearch.standType,
standNumber: this.standardSearch.standNumber, standNumber: this.standardSearch.standNumber,
page: this.pageNo, page: this.page,
pageSize: this.pageSizeNo pageSize: this.pageSize
}, { }, {
_this: this _this: this
}, res => { }, res => {
@@ -1258,13 +1262,24 @@ export default {
let routeUrl = this.$router.resolve({ let routeUrl = this.$router.resolve({
name: "OtherStandardDetails", name: "OtherStandardDetails",
params: { params: {
id: item.standId, id: item.id,
pageType: "FOREIGN_STAND" pageType: "INLAND_STAND"
// pageType: item.standType + '_STAND'
} }
}); });
window.open(routeUrl.href, "_blank"); window.open(routeUrl.href, "_blank");
}, },
// 点击查看
// handlePreview(item) {
// let routeUrl = this.$router.resolve({
// name: "OtherStandardDetails",
// params: {
// id: item.standId,
// pageType: "FOREIGN_STAND"
// // pageType: item.standType + '_STAND'
// }
// });
// window.open(routeUrl.href, "_blank");
// },
detailsStandard(item) { detailsStandard(item) {
this.$http.post("lawss/sarTestItem/validateStandNumber", { this.$http.post("lawss/sarTestItem/validateStandNumber", {
standNumber: item.standNum standNumber: item.standNum
@@ -1341,7 +1356,13 @@ export default {
this.roleShowflag = true this.roleShowflag = true
}, },
drawerCheck(data) { drawerCheck(data) {
this.addForm.dutyEngineer = data[0].name // this.addForm.dutyEngineer = data[0].id
// this.addForm.dutyEngineerName = data[0].name
this.$set(this.addForm, 'dutyEngineer', data[0].id)
this.$set(this.addForm, 'dutyEngineerName', data[0].name)
if(this.addForm.dutyEngineerName){
this.$refs.addForm.validateField('dutyEngineerName');
}
this.roleShowflag = false this.roleShowflag = false
}, },
/** 选择认证工程师和质量工程师 */ /** 选择认证工程师和质量工程师 */