|
|
|
@ -656,7 +656,7 @@ |
|
|
|
<el-form-item :label="'模板'"> |
|
|
|
<el-select v-model="chooseModelData2.codeNo" placeholder="请选择" style="width: 120px"> |
|
|
|
<el-option |
|
|
|
v-for = "i in modelList" |
|
|
|
v-for = "i in modelList2" |
|
|
|
:key = "i.codeNo" |
|
|
|
:label = "i.codeDesc" |
|
|
|
:value = "i.codeNo"> |
|
|
|
@ -775,6 +775,7 @@ |
|
|
|
|
|
|
|
<!-- 上传文件的modal --> |
|
|
|
<changeUploadFile ref="changeUploadFile" @refreshPageTables="getFileData" v-drag></changeUploadFile> |
|
|
|
<upload-file-list ref="changeRef" v-if="modalFlag" folder="change" title="工程变更文件上传" :upload-status="true" :label="'变更单号:'" :file-list.sync="fileData.file" :no="modalData.changeNo" :upload-dialog.sync="uploadDialog"></upload-file-list> |
|
|
|
</div> |
|
|
|
</template> |
|
|
|
|
|
|
|
@ -796,11 +797,14 @@ |
|
|
|
import { |
|
|
|
uploadFile // 文件上传 |
|
|
|
} from '@/api/oss/oss.js' |
|
|
|
import {uploadFileList} from "../../../api/test/testInformation"; |
|
|
|
import DictDataSelect from '../sys/dict-data-select.vue' |
|
|
|
import changeUploadFile from "../base/upload_file.vue" |
|
|
|
import dayjs from "dayjs"; |
|
|
|
import UploadFileList from "../common/uploadFileList.vue"; |
|
|
|
export default { |
|
|
|
components: { |
|
|
|
UploadFileList, |
|
|
|
changeUploadFile, |
|
|
|
DictDataSelect, |
|
|
|
ChooseList |
|
|
|
@ -808,6 +812,7 @@ |
|
|
|
|
|
|
|
data() { |
|
|
|
return { |
|
|
|
uploadDialog: false, |
|
|
|
form: [], |
|
|
|
// 导出 |
|
|
|
exportData: [], |
|
|
|
@ -945,11 +950,19 @@ |
|
|
|
itemDesc: '', |
|
|
|
codeNo: '' |
|
|
|
}, |
|
|
|
fileData: { |
|
|
|
file: [], |
|
|
|
orderRef1: '', |
|
|
|
orderRef2: '', |
|
|
|
fileRemark: '', |
|
|
|
folder: '' |
|
|
|
}, |
|
|
|
// ======== 数据列表 ======== |
|
|
|
dataList: [], |
|
|
|
chooseDataList: [], |
|
|
|
fileList: [], |
|
|
|
modelList: [], |
|
|
|
modelList2: [], |
|
|
|
modelCSList: [], |
|
|
|
itemList: [], |
|
|
|
itemList2: [], |
|
|
|
@ -1681,6 +1694,7 @@ |
|
|
|
created () { |
|
|
|
this.getDataList() |
|
|
|
this.getEcnModel() |
|
|
|
this.getEcnModel2() |
|
|
|
this.getEcnCSModel() |
|
|
|
}, |
|
|
|
|
|
|
|
@ -1911,6 +1925,13 @@ |
|
|
|
createBy: this.$store.state.user.name, |
|
|
|
chooseCSItemList: [] |
|
|
|
} |
|
|
|
this.fileData = { |
|
|
|
file: [], |
|
|
|
orderRef1: '', |
|
|
|
orderRef2: '', |
|
|
|
fileRemark: '', |
|
|
|
folder: '' |
|
|
|
} |
|
|
|
this.chooseItemList = [] |
|
|
|
this.chooseItemList2 = [] |
|
|
|
this.getDepartmentByUserName() |
|
|
|
@ -2006,15 +2027,27 @@ |
|
|
|
} |
|
|
|
this.modalData.detailList = this.chooseDataList |
|
|
|
this.modalData.ecnTypeData = this.form |
|
|
|
this.fileData.orderRef1 = this.modalData.site |
|
|
|
this.fileData.orderRef2 = this.modalData.changeNo |
|
|
|
this.fileData.fileRemark = this.$refs.changeRef.fileRemark |
|
|
|
this.fileData.folder = 'change' |
|
|
|
let tempData = new FormData() |
|
|
|
for (let i in this.fileData) { |
|
|
|
if (i === 'file') { |
|
|
|
for (let j = 0; j < this.fileData.file.length; j++) { |
|
|
|
tempData.append("file", this.fileData.file[j].raw) |
|
|
|
} |
|
|
|
continue |
|
|
|
} |
|
|
|
tempData.append(i, this.fileData[i]) |
|
|
|
} |
|
|
|
changeRequestSave(this.modalData).then(({data}) => { |
|
|
|
if (data && data.code === 0) { |
|
|
|
for (let i = 0; i <this.fileList.length; i++) { |
|
|
|
uploadFile(this.fileList[i]).then(({data}) => { |
|
|
|
if (data.code !== 0) { |
|
|
|
this.$message.warning(data.msg) |
|
|
|
} |
|
|
|
}) |
|
|
|
} |
|
|
|
uploadFileList("/upload/test",tempData).then(({data}) => { |
|
|
|
if (data.code !== 0) { |
|
|
|
this.$message.warning(data.msg) |
|
|
|
} |
|
|
|
}) |
|
|
|
this.getDataList() |
|
|
|
this.basicInformationFlag = false |
|
|
|
this.$message({ |
|
|
|
@ -2229,23 +2262,24 @@ |
|
|
|
dataNo: this.modalData.changeNo, |
|
|
|
fileRemark: '', |
|
|
|
folder: 'change', |
|
|
|
file: [] |
|
|
|
} |
|
|
|
this.uploadDialog = true |
|
|
|
//打开组件 去做新增业务 |
|
|
|
this.$nextTick(() => { |
|
|
|
this.$refs.changeUploadFile.init(currentData) |
|
|
|
}) |
|
|
|
// this.$nextTick(() => { |
|
|
|
// this.$refs.changeUploadFile.init(currentData) |
|
|
|
// }) |
|
|
|
}, |
|
|
|
|
|
|
|
// 得到保存的文件对象 |
|
|
|
getFileData (fData) { |
|
|
|
const formData = new FormData() |
|
|
|
// 片接文件 |
|
|
|
formData.append("file", fData.file) |
|
|
|
formData.append("orderRef1", fData.site) |
|
|
|
formData.append("orderRef2", fData.dataNo) |
|
|
|
formData.append("fileRemark", fData.fileRemark) |
|
|
|
formData.append("folder", fData.folder) |
|
|
|
this.fileList.push(formData) |
|
|
|
this.fileData = { |
|
|
|
file: fData.file, |
|
|
|
orderRef1: fData.site, |
|
|
|
orderRef2: fData.dataNo, |
|
|
|
fileRemark: fData.fileRemark, |
|
|
|
folder: fData.folder |
|
|
|
} |
|
|
|
}, |
|
|
|
|
|
|
|
// 选择ECN种类模态框 |
|
|
|
@ -2312,7 +2346,7 @@ |
|
|
|
itemNo: '', |
|
|
|
itemDesc: '', |
|
|
|
functionType: 'ECN', |
|
|
|
codeNo: this.modelList.length > 0 ? this.modelList[0].codeNo : '' |
|
|
|
codeNo: this.modelList2.length > 0 ? this.modelList2[0].codeNo : '' |
|
|
|
} |
|
|
|
// 先清空缓存选中 |
|
|
|
//this.$nextTick(() => this.$refs.itemTable2.clearSelection()) |
|
|
|
@ -2410,7 +2444,8 @@ |
|
|
|
getEcnModel () { |
|
|
|
let tempData = { |
|
|
|
site: this.$store.state.user.site, |
|
|
|
functionType: 'ECN' |
|
|
|
functionType: 'ECN', |
|
|
|
codeNo: 'E001' |
|
|
|
} |
|
|
|
getEcnModel(tempData).then(({data}) => { |
|
|
|
if (data.code === 0) { |
|
|
|
@ -2419,14 +2454,26 @@ |
|
|
|
}) |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
// =================================== |
|
|
|
// 查询ECN的评估模板 |
|
|
|
getEcnModel2 () { |
|
|
|
let tempData = { |
|
|
|
site: this.$store.state.user.site, |
|
|
|
functionType: 'ECN', |
|
|
|
codeNo: 'E002' |
|
|
|
} |
|
|
|
getEcnModel(tempData).then(({data}) => { |
|
|
|
if (data.code === 0) { |
|
|
|
this.modelList2 = data.rows |
|
|
|
} |
|
|
|
}) |
|
|
|
}, |
|
|
|
|
|
|
|
// 查询会签的模板 |
|
|
|
getEcnCSModel () { |
|
|
|
let tempData = { |
|
|
|
site: this.$store.state.user.site, |
|
|
|
functionType: 'ECN' |
|
|
|
functionType: 'ECN', |
|
|
|
codeNo: 'E003' |
|
|
|
} |
|
|
|
getEcnModel(tempData).then(({data}) => { |
|
|
|
if (data.code === 0) { |
|
|
|
|