Browse Source

2024.7.13 产品文档收集-项目信息进一步优化

java8
yuejiayang 2 years ago
parent
commit
96a976d8b8
  1. 5
      package-lock.json
  2. 1
      package.json
  3. 2
      src/element-ui/index.js
  4. 86
      src/views/modules/common/uploadFileList1.vue
  5. 53
      src/views/modules/eam/com_project_proof_record.vue
  6. 116
      src/views/modules/eam/eamProjectInfo.vue

5
package-lock.json

@ -10553,6 +10553,11 @@
}
}
},
"moment": {
"version": "2.30.1",
"resolved": "https://mirrors.cloud.tencent.com/npm/moment/-/moment-2.30.1.tgz",
"integrity": "sha512-uEmtNhbDOrWPFS+hdjFCBfy9f2YoyzRpwcl+DqpC6taX21FzsTLQVbMV/W7PzNSX6x/bhC1zA3c2UQ5NzH6how=="
},
"move-concurrently": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/move-concurrently/-/move-concurrently-1.0.1.tgz",

1
package.json

@ -27,6 +27,7 @@
"gulp-replace": "1.0.0",
"gulp-shell": "0.8.0",
"lodash": "4.17.5",
"moment": "^2.30.1",
"node-sass": "4.13.1",
"npm": "^6.9.0",
"pubsub-js": "^1.9.3",

2
src/element-ui/index.js

@ -151,7 +151,7 @@ Vue.prototype.$ELEMENT = {size: 'medium'}
Vue.prototype.$message = function (msg) {
let msgObj = {
message: msg.message ? msg.message : msg,
duration: 2000
duration: msg.duration || 2000
}
let msgType = msg.type || ""
switch (msgType) {

86
src/views/modules/common/uploadFileList1.vue

@ -93,27 +93,21 @@ export default {
default: ''
},
isEditable: Boolean,
},
computed: {
displayValue() {
if (this.noType === null || this.noType === undefined) {
return this.noDesc
}else {
return this.noType
}
}
isMassProductionStage: Boolean,
},
data () {
return {
//fileRemark: '',
fileName: '',
noType1: '',
conclusion: '',
documentGroupDesc: '',
conclusionList: [
{conclusion: '合格'},
{conclusion: '不合格'},
{conclusion: '让步接受'},
{conclusion: 'N/A'}
],
conclusion:'',
//
documentClickRow: {},
bu : this.site + "-" + this.buNo,
@ -136,6 +130,47 @@ export default {
}
}
},
computed: {
displayValue() {
if (this.noType === null || this.noType === undefined) {
return this.noDesc
}else {
return this.noType
}
},
documentGroupDescJudgment() {
if (this.id !== '-1') {
return '常规'
} else {
return '其他'
}
},
conclusionDefaultValue() {
if (this.isMassProductionStage) {
return 'N/A';
}else {
return this.isEditable ? 'N/A' : '';
}
}
},
watch: {
conclusionDefaultValue(newValue) {
this.conclusion = newValue;
}
},
created() {
this.conclusion = this.conclusionDefaultValue;
},
beforeDestroy() {
//
if (this.isMassProductionStage) {
this.conclusion = 'N/A';
}else if (this.isEditable) {
this.conclusion = 'N/A';
}else {
this.conclusion = '';
}
},
methods: {
triggerUpload() {
this.fileName = ''; //
@ -148,6 +183,15 @@ export default {
//this.fileRemark = ''
this.$refs.uploadFile.clearFiles()
this.$emit("update:fileList", [])
this.fileName = ''; //
this.noType = '';
if (this.isMassProductionStage) {
this.conclusion = 'N/A';
}else if (this.isEditable) {
this.conclusion = 'N/A';
}else {
this.conclusion = '';
}
},
onRemove(file, fileList) {
this.$emit("update:fileList", fileList)
@ -191,17 +235,20 @@ export default {
this.$message.success(data.msg);
this.fileList = [];
this.fileName = '';
this.noType = '';
// this.$emit('get-document-list');
// this.$emit('get-proof-document');
} else {
this.$message.warning(data.msg);
this.fileList = [];
this.fileName = '';
this.noType = '';
}
}).catch((error) => {
this.$message.error(error);
this.fileList = [];
this.fileName = '';
this.noType = '';
});
},
changeCurrentRow1 (row, oldRow) {
@ -284,6 +331,9 @@ export default {
}
return row.documentType
},
validateField(fieldName) {
this.$refs.validateField(fieldName);
},
// getDocumentList() {
// getDocumentList(this.modalData).then(({data}) => {
// if (data && data.code === 0) {
@ -340,16 +390,16 @@ export default {
<el-input v-model="proofingId" readonly style="width: 170px;" class="red-text"></el-input>
</el-form-item>
</el-form>
<el-form :inline="true" label-position="top" label-width="80px" :rules="rules" style="margin-left: 7px;margin-top: -5px;">
<el-form :inline="true" label-position="top" label-width="80px" style="margin-left: 7px;margin-top: -5px;">
<el-form-item label=" ">
<a href="javascript:void(0);" @click="triggerUpload">点击选择文件</a>
<tr></tr>
<el-input v-model="this.fileName" readonly placeholder="文件名称" style="width: 423px"></el-input>
<el-form-item label="文类型" v-if="isEditable" :rules="rules.noType" prop="noType" style="margin-top: -18px;margin-left: 11px;">
<el-input v-model="noType" :readonly="!isEditable" style="width: 170px"></el-input>
<el-form-item label="文类型" v-if="isEditable" :rules="rules.noType" prop="noType" style="margin-top: -18px;margin-left: 11px;">
<el-input v-model="noType" :readonly="!isEditable" style="width: 170px" @blur="validateField('noType')" @change="validateField('noType')"></el-input>
</el-form-item>
<el-form-item label="结论" prop="conclusion" :rules="rules.conclusion" style="margin-top: -18px;">
<el-select v-model="conclusion" placeholder="请选择" clearable style="width: 110px;">
<el-form-item label="结论" prop="conclusion" v-if="!isMassProductionStage" :rules="rules.conclusion" style="margin-top: -18px;">
<el-select v-model="conclusion" placeholder="请选择" clearable style="width: 110px;" @blur="validateField('conclusion')" @change="validateField('conclusion')">
<el-option
v-for = "i in conclusionList"
:key = "i.conclusion"
@ -359,10 +409,10 @@ export default {
</el-select>
</el-form-item>
<el-form-item label="文档种类" style="margin-top: -18px;" v-if="this.id === '-1'">
<el-input readonly style="width: 110px;" :value="'其他'" class="red-text"></el-input>
<el-input readonly style="width: 110px;" :value="documentGroupDescJudgment"></el-input>
</el-form-item>
<el-form-item label="文档种类" style="margin-top: -18px;" v-if="this.id !== '-1'">
<el-input readonly style="width: 110px;" :value="'常规'" class="red-text"></el-input>
<el-input readonly style="width: 110px;" :value="documentGroupDescJudgment"></el-input>
</el-form-item>
<el-button type="primary" @click="upload">上传</el-button>
<el-upload drag :file-list="fileList"
@ -424,7 +474,7 @@ export default {
</el-form>
<span slot="footer" class="dialog-footer">
<el-button @click="$emit('update:uploadDialog',false);this.fileName = '';">关闭</el-button>
<el-button @click="$emit('update:uploadDialog',false);this.fileList = [];this.fileName = '';this.conclusion='';this.noType = '';">关闭</el-button>
</span>
</el-dialog>
</div>

53
src/views/modules/eam/com_project_proof_record.vue

@ -69,7 +69,7 @@
<template slot-scope="scope">
<a type="primary" size="small" v-if="scope.row.documentDefinitionListId !== '-1'" @click="uploadFile(scope.row)">上传文件</a>
<a type="text" size="small" v-if="scope.row.documentDefinitionListId !== '-1'" @click="addOrUpdateHandle(scope.row.projectId)">提醒</a>
<a type="text" size="small" @click="proofDocumentDelete(scope.row)">删除</a>
<a type="text" size="small" v-if="scope.row.documentId !== null" @click="proofDocumentDelete(scope.row)">删除</a>
</template>
</el-table-column>
<el-table-column label="序号" type="index" align="center" :index="indexMethod"></el-table-column>
@ -229,7 +229,7 @@
<el-button type="primary" icon="el-icon-upload" style="margin-top: -5px" @click="addDocumentTypeFlag = true">新增</el-button>
<el-table
height="200"
:data="proofDocumentList"
:data="proofDocumentListDefinition"
border
style="width: 100%;">
<el-table-column
@ -259,7 +259,7 @@
</el-table-column>
</el-table>
<div slot="footer" class="dialog-footer">
<el-button @click="documentListVisible = false">关闭</el-button>
<el-button @click="documentListVisible = false;this.proofDocumentListDefinition = [];">关闭</el-button>
</div>
</el-dialog>
@ -481,6 +481,7 @@
currentRow:'',
fileContentList:[],
proofDocumentList:[],
proofDocumentListDefinition:[],
fileList: [],
documentNo: '', // ID
documentNoType: '',//
@ -851,10 +852,10 @@
{
userId: this.$store.state.user.name,
functionId: 101001014,
serialNumber: '101001014Table1CAdditionalInfo',
serialNumber: '101001014Table1Conclusion',
tableId: "101001014Table1",
tableName: "打样文档表",
columnProp: 'cAdditionalInfo',
columnProp: 'conclusion',
headerAlign: "center",
align: "center",
columnLabel: '结论',
@ -866,6 +867,24 @@
fixed: '',
columnWidth: 70,
},
{
userId: this.$store.state.user.name,
functionId: 101001014,
serialNumber: '101001014Table1DocumentGroupDesc',
tableId: "101001014Table1",
tableName: "打样文档表",
columnProp: 'documentGroupDesc',
headerAlign: "center",
align: "center",
columnLabel: '文档种类',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 80,
},
{
userId: this.$store.state.user.name,
functionId: 103001,
@ -875,7 +894,7 @@
columnProp: 'createDate',
headerAlign: 'center',
align: 'center',
columnLabel: '创建时间',
columnLabel: '上传时间',
columnHidden: false,
columnImage: false,
columnSortable: false,
@ -893,7 +912,7 @@
columnProp: 'createdBy',
headerAlign: 'center',
align: 'center',
columnLabel: '创建人',
columnLabel: '上传人',
columnHidden: false,
columnImage: false,
columnSortable: false,
@ -1165,6 +1184,7 @@
},
documentListVisibleFalse() {
this.documentListVisible = false
this.proofDocumentListDefinition = []
},
addDocumentList(row) {
this.documentListVisible = true
@ -1183,6 +1203,12 @@
limit: 1000
}
this.documentTypeData.proofingNo = row.proofingNo
// proofDocumentList
for (let i = 0; i < this.proofDocumentList.length; i++) {
if (this.proofDocumentList[i].documentTypeId !== 'N/A') {
this.proofDocumentListDefinition.push(this.proofDocumentList[i])
}
}
},
updateProofingRecord(row) {
this.proofingRecordVisible = true
@ -1285,7 +1311,11 @@
}
//
else {
this.$message.warning(data.msg)
this.$message({
message: data.msg,
type: 'warning',
duration: 3000 //
});
}
})
},
@ -1341,7 +1371,7 @@
site: row.site,
username: this.$store.state.user.name,
buNo: row.buNo,
proofingId: row.proofingNo,
proofingNo: row.proofingNo,
projectId: row.projectId,
projectDesc: row.projectDesc,
customerId: row.customerNo,
@ -1359,11 +1389,11 @@
}
if (tempData.createBy !== tempData.username) {
this.$message({
message: '只能删除自己创建的打样文档',
message: '只能删除上传人的上传打样文档',
type: 'warning'
})
}else {
this.$confirm('是否删除该打样文档?', '提示', {
this.$confirm('是否删除该打样文档的文件?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
@ -1605,7 +1635,6 @@
this.fileList = []
this.documentClickRow = {
documentTypeId: '', // ID
documentType: '' , //
id: '-1'
};
this.uploadDialog = true

116
src/views/modules/eam/eamProjectInfo.vue

@ -737,9 +737,9 @@
fixed="left"
label="操作">
<template slot-scope="scope">
<a type="primary" @click="uploadFile(scope.row)">上传文件</a>
<a type="text" size="small" @click="addOrUpdateHandle(scope.row.projectId)">提醒</a>
<a type="text" size="small" @click="massProductionDocumentDelete(scope.row)">删除</a>
<a type="primary" v-if="scope.row.documentDefinitionListId !== '-1'" @click="uploadFile(scope.row)">上传文件</a>
<a type="text" size="small" v-if="scope.row.documentDefinitionListId !== '-1'" @click="addOrUpdateHandle(scope.row.projectId)">提醒</a>
<a type="text" size="small" v-if="shouldShowDelete(scope.row)" @click="massProductionDocumentDelete(scope.row)">删除</a>
</template>
</el-table-column>
<el-table-column label="序号" type="index" align="center" :index="indexMethod"></el-table-column>
@ -780,7 +780,7 @@
<el-table-column
header-align="center"
align="center"
width="100"
width="70"
fixed="left"
label="操作">
<template slot-scope="scope">
@ -839,7 +839,7 @@
<el-table-column header-align="center" align="center" prop="confirmFlag" label="是否确认"></el-table-column>
<el-table-column header-align="center" align="center" prop="confirmedBy" label="实际确认人"></el-table-column>
<el-table-column header-align="center" align="center" prop="remark" label="备注"></el-table-column>
<el-table-column header-align="center" align="center" prop="confirmedDate" label="实际确认日期"></el-table-column>
<el-table-column header-align="center" align="center" prop="confirmedDate" label="实际确认时间"></el-table-column>
<el-table-column header-align="center" align="center" prop="createDate" label="推送时间"></el-table-column>
<el-table-column header-align="center" align="center" prop="createBy" label="推送人"></el-table-column>
<el-table-column
@ -897,7 +897,7 @@
<el-button type="primary" icon="el-icon-upload" style="margin-top: -5px" @click="addProjectDocumentTypeFlag = true">新增</el-button>
<el-table
height="200"
:data="projectOtherDocumentList"
:data="proofDocumentListDefinition"
border
style="width: 100%;">
<el-table-column
@ -1207,10 +1207,10 @@
<upload-file-list-1 folder="projectOtherDocument" title="上传文档" :file-list.sync="fileList" :label="'文档类型ID:'" :no="otherDocumentCurrentRow.documentTypeId" :no-type="otherDocumentCurrentRow.documentType"
:proofing-id='proofingCurrentRow.proofingId' :bu="proofingCurrentRow.buNo" :site="proofingCurrentRow.site" :upload-dialog.sync="uploadDialog" :no-desc="otherDocumentCurrentRow.documentDesc" :id="otherDocumentCurrentRow.id"
:project-id="proofingCurrentRow.projectId" :project-desc="proofingCurrentRow.projectDesc" :document-type="proofingCurrentRow.documentType"
:project-id="proofingCurrentRow.projectId" :project-desc="proofingCurrentRow.projectDesc" :document-type="proofingCurrentRow.documentType" :conclusion="'N/A'"
:customer-no="proofingCurrentRow.customerNo" :customer-desc="proofingCurrentRow.customerDesc" :test-part-no="proofingCurrentRow.testPartNo"
:part-desc="proofingCurrentRow.partDesc" :column-file-content-array="columnFileContentArray" :proof-document-list="projectOtherDocumentList"
path="/upload/test" :is-editable="isEditable"></upload-file-list-1>
path="/upload/test" :is-editable="isEditable" :is-mass-production-stage="isMassProductionStage"></upload-file-list-1>
<Chooselist ref="baseList" @getBaseData="getBaseData"></Chooselist>
@ -1264,6 +1264,8 @@ import {
uploadProjectFile
} from "../../../api/eam/eamProject";
import row from "element-ui/packages/row";
import moment from 'moment';
import 'moment/locale/zh-cn';
import {downLoadObjectFile} from "../../../api/eam/eam_object_list";
/*打样记录組件*/
@ -1358,6 +1360,7 @@ import {downLoadObjectFile} from "../../../api/eam/eam_object_list";
projectAllDocumentList: [],
projectAllDocumentList1: [],
projectAllDocumentConfirmatorList: [],
proofDocumentListDefinition: [],
confirmProgressPusherList: [],
confirmProgressDocumentList: [],
projectConfirmatorFileList: [],
@ -1387,6 +1390,7 @@ import {downLoadObjectFile} from "../../../api/eam/eam_object_list";
MFGlag:false,
uploadDialog:false,
isEditable: true,
isMassProductionStage: true,
projectDocumentListVisible: false,
addProjectDocumentTypeFlag: false,
projectProductionValidationDocumentVisible: false,
@ -2014,7 +2018,7 @@ import {downLoadObjectFile} from "../../../api/eam/eam_object_list";
sortLv: 0,
status: true,
fixed: '',
columnWidth: 120,
columnWidth: 180,
},
//
{
@ -2054,6 +2058,24 @@ import {downLoadObjectFile} from "../../../api/eam/eam_object_list";
fixed: '',
columnWidth: 70,
},
{
userId: this.$store.state.user.name,
functionId: 101001014,
serialNumber: '101001014Table1DocumentGroupDesc',
tableId: "101001014Table1",
tableName: "打样文档表",
columnProp: 'documentGroupDesc',
headerAlign: "center",
align: "center",
columnLabel: '文档种类',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 70,
},
{
userId: this.$store.state.user.name,
functionId: 103001,
@ -2070,7 +2092,7 @@ import {downLoadObjectFile} from "../../../api/eam/eam_object_list";
sortLv: 0,
status: true,
fixed: '',
columnWidth: 160
columnWidth: 120
},
{
userId: this.$store.state.user.name,
@ -2182,7 +2204,7 @@ import {downLoadObjectFile} from "../../../api/eam/eam_object_list";
sortLv: 0,
status: true,
fixed: '',
columnWidth: 120,
columnWidth: 80,
},
{
userId: this.$store.state.user.name,
@ -2218,7 +2240,7 @@ import {downLoadObjectFile} from "../../../api/eam/eam_object_list";
sortLv: 0,
status: true,
fixed: '',
columnWidth: 120,
columnWidth: 180,
},
//
{
@ -2258,6 +2280,24 @@ import {downLoadObjectFile} from "../../../api/eam/eam_object_list";
fixed: '',
columnWidth: 70,
},
{
userId: this.$store.state.user.name,
functionId: 101001014,
serialNumber: '101001014Table1DocumentGroupDesc',
tableId: "101001014Table1",
tableName: "打样文档表",
columnProp: 'documentGroupDesc',
headerAlign: "center",
align: "center",
columnLabel: '文档种类',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 70,
},
{
userId: this.$store.state.user.name,
functionId: 103001,
@ -2274,7 +2314,7 @@ import {downLoadObjectFile} from "../../../api/eam/eam_object_list";
sortLv: 0,
status: true,
fixed: '',
columnWidth: 160
columnWidth: 130
},
{
userId: this.$store.state.user.name,
@ -3444,7 +3484,6 @@ import {downLoadObjectFile} from "../../../api/eam/eam_object_list";
this.otherDocumentCurrentRow = {
proofingId: '*',
documentTypeId: '', // ID
documentType: '' , //
id: '-1'
};
this.uploadDialog = true
@ -3458,7 +3497,7 @@ import {downLoadObjectFile} from "../../../api/eam/eam_object_list";
site: row.site,
username: this.$store.state.user.name,
buNo: row.buNo,
proofingId: row.proofingNo,
proofingNo: row.proofingNo,
projectId: row.projectId,
projectDesc: row.projectDesc,
customerId: row.customerNo,
@ -3480,7 +3519,7 @@ import {downLoadObjectFile} from "../../../api/eam/eam_object_list";
type: 'warning'
})
}else {
this.$confirm('是否删除该转量产阶段文档?', '提示', {
this.$confirm('是否删除该转量产阶段文档的文件?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
@ -3606,11 +3645,17 @@ import {downLoadObjectFile} from "../../../api/eam/eam_object_list";
page: 1
}
this.getProjectOtherDocument()
// proofDocumentList
for (let i = 0; i < this.projectOtherDocumentList.length; i++) {
if (this.projectOtherDocumentList[i].documentTypeId !== 'N/A') {
this.proofDocumentListDefinition.push(this.projectOtherDocumentList[i])
}
}
this.projectDocumentListVisible = true
},
projectDocumentListVisibleFalse() {
this.projectDocumentListVisible = false
this.proofDocumentListDefinition = []
},
deleteProjectDocumentType(row) {
this.$confirm('是否删除该文档清单?', '提示', {
@ -3799,19 +3844,13 @@ import {downLoadObjectFile} from "../../../api/eam/eam_object_list";
.then(confirmatorResults => {
let allConfirmatorSuccess = confirmatorResults.every(result => result.data && result.data.code === 0);
if (allConfirmatorSuccess) {
let saveDocumentPromises = this.selectedDocumentItems.map(item => {
let inData = {
site: this.proofingCurrentRow.site,
orderRef1: this.proofingCurrentRow.projectId,
itemNo: '',
documentType: item.documentType,
documentId: item.documentId,
createBy: this.$store.state.user.name
};
return this.handleDocumentSave(inData);
});
Promise.all(saveDocumentPromises)
let inData = {
site: this.proofingCurrentRow.site,
orderRef1: this.proofingCurrentRow.projectId,
selectedDocumentItems: this.selectedDocumentItems,
}
let saveDocumentPromises = this.handleDocumentSave(inData);
saveDocumentPromises
.then(() => {
this.$message({
message: '新增成功',
@ -4026,7 +4065,7 @@ import {downLoadObjectFile} from "../../../api/eam/eam_object_list";
confirmedDate: new Date(),
createBy: row.createBy,
createDate: row.createDate,
confirmedBy: this.$store.state.user.name,
confirmedBy: this.$store.state.user.userDisplay,
documentId: row.documentId,
remark: row.remark
}
@ -4099,6 +4138,8 @@ import {downLoadObjectFile} from "../../../api/eam/eam_object_list";
this.$refs.uploadFile.$el.querySelector('input').click()
},
saveUploadFile(){
this.confirmData.confirmedDate = moment(this.confirmData.confirmedDate).utcOffset('+8').format('YYYY-MM-DD HH:mm:ss');
this.confirmData.confirmedBy = this.$store.state.user.userDisplay;
console.log('this.confirmData',this.confirmData)
updateProjectDocumentConfirm(this.confirmData) .then(({data}) => {
if (data.code === 0) {
@ -4179,7 +4220,7 @@ import {downLoadObjectFile} from "../../../api/eam/eam_object_list";
confirmedDate: new Date(),
createBy: row.createBy,
createDate: row.createDate,
confirmedBy: this.$store.state.user.name,
confirmedBy: this.$store.state.user.userDisplay,
documentId: row.documentId,
remark: row.remark
}
@ -4199,7 +4240,7 @@ import {downLoadObjectFile} from "../../../api/eam/eam_object_list";
this.viewDocumentFileVisible = true
},
deleteFile(row) {
if (this.confirmData.confirmedBy === this.$store.state.user.name) {
if (this.confirmData.confirmedBy === this.$store.state.user.userDisplay) {
this.$confirm('是否删除该文件?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
@ -4240,6 +4281,15 @@ import {downLoadObjectFile} from "../../../api/eam/eam_object_list";
})
}
},
shouldShowDelete(row) {
console.log('row.documentId',row.documentId)
console.log('row.projectPhase',row.projectPhase)
console.log('Y/N',row.documentId !== null || row.projectPhase !== 'SOP文档')
//
if (row.projectPhase === 'SOP文档') {
return false
}else return row.documentId !== null;
},
//
viewFile(row) {
//

Loading…
Cancel
Save