11 changed files with 3443 additions and 217 deletions
-
14src/api/part/bomManagement.js
-
28src/api/part/partInformation.js
-
7src/api/part/routingManagement.js
-
99src/api/test/testInformation.js
-
273src/views/modules/part/bomManagement.vue
-
427src/views/modules/part/partInformation.vue
-
175src/views/modules/part/routingManagement.vue
-
10src/views/modules/proofing/requestForProofing.vue
-
10src/views/modules/quotation/requestForQuote.vue
-
2481src/views/modules/test/requestForTest.vue
-
136src/views/modules/test/test_upload_file.vue
@ -0,0 +1,99 @@ |
|||
import { createAPI } from "@/utils/httpRequest.js"; |
|||
|
|||
/** |
|||
* 测试信息列表查询 |
|||
* @param data |
|||
* @returns {*} |
|||
*/ |
|||
export const testInformationSearch = data => createAPI(`/plm/testInformation/testInformationSearch`,'post',data) |
|||
/** |
|||
* 测试信息新增 |
|||
* @param data |
|||
* @returns {*} |
|||
*/ |
|||
export const testInformationSave = data => createAPI(`/plm/testInformation/testInformationSave`,'post',data) |
|||
/** |
|||
* 测试信息编辑 |
|||
* @param data |
|||
* @returns {*} |
|||
*/ |
|||
export const testInformationEdit = data => createAPI(`/plm/testInformation/testInformationEdit`,'post',data) |
|||
/** |
|||
* 测试信息删除 |
|||
* @param data |
|||
* @returns {*} |
|||
*/ |
|||
export const testInformationDelete = data => createAPI(`/plm/testInformation/testInformationDelete`,'post',data) |
|||
/** |
|||
* 获取产品列表 |
|||
* @param data |
|||
* @returns {*} |
|||
*/ |
|||
export const getProjectPartList = data => createAPI(`/plm/testInformation/getProjectPartList`,'post',data) |
|||
/** |
|||
* 获取测试结果对象 |
|||
* @param data |
|||
* @returns {*} |
|||
*/ |
|||
export const testResultSearch = data => createAPI(`/plm/testInformation/testResultSearch`,'post',data) |
|||
/** |
|||
* 检查测试进度 |
|||
* @param data |
|||
* @returns {*} |
|||
*/ |
|||
export const checkTestStatus = data => createAPI(`/plm/testInformation/checkTestStatus`,'post',data) |
|||
/** |
|||
* 获取测试单附件列表 |
|||
* @param data |
|||
* @returns {*} |
|||
*/ |
|||
export const getFileContentList = data => createAPI(`/plm/testInformation/getFileContentList`,'post',data) |
|||
/** |
|||
* 文件删除 |
|||
* @param data |
|||
* @returns {*} |
|||
*/ |
|||
export const deleteTestFile = data => createAPI(`/plm/testInformation/deleteTestFile`,'post',data) |
|||
/** |
|||
* 保存测试结果 |
|||
* @param data |
|||
* @returns {*} |
|||
*/ |
|||
export const saveTestResult = data => createAPI(`/plm/testInformation/saveTestResult`,'post',data) |
|||
/** |
|||
* 保存送样结果 |
|||
* @param data |
|||
* @returns {*} |
|||
*/ |
|||
export const saveSubmitResult = data => createAPI(`/plm/testInformation/saveSubmitResult`,'post',data) |
|||
/** |
|||
* 保存客户回复 |
|||
* @param data |
|||
* @returns {*} |
|||
*/ |
|||
export const saveCustomerResponse = data => createAPI(`/plm/testInformation/saveCustomerResponse`,'post',data) |
|||
/** |
|||
* 获取项目信息 |
|||
* @param data |
|||
* @returns {*} |
|||
*/ |
|||
export const getProjectInformation = data => createAPI(`/plm/testInformation/getProjectInformation`,'post',data) |
|||
/** |
|||
* 获取客户信息 |
|||
* @param data |
|||
* @returns {*} |
|||
*/ |
|||
export const getCustomerInformation = data => createAPI(`/plm/testInformation/getCustomerInformation`,'post',data) |
|||
/** |
|||
* 关闭模态框删除文件 |
|||
* @param data |
|||
* @returns {*} |
|||
*/ |
|||
export const closeModalDeleteFile = data => createAPI(`/plm/testInformation/closeModalDeleteFile`,'post',data) |
|||
/** |
|||
* 批量文件删除 |
|||
* @param data |
|||
* @returns {*} |
|||
*/ |
|||
export const batchDeleteTestFile = data => createAPI(`/plm/testInformation/batchDeleteTestFile`,'post',data) |
|||
|
|||
2481
src/views/modules/test/requestForTest.vue
File diff suppressed because it is too large
View File
File diff suppressed because it is too large
View File
@ -0,0 +1,136 @@ |
|||
<template> |
|||
<div class="customer-css"> |
|||
<el-dialog :title="pageData.titleCon" :close-on-click-modal="false" :visible.sync="visible" width="390px" style="height: 520px;" class="customer-dialog"> |
|||
<el-form :inline="true" label-position="top" label-width="80px"> |
|||
<el-row> |
|||
<el-col :span="12"> |
|||
<el-form-item class="customer-item" label="测试单号:" > |
|||
<el-input v-model="pageData.testNo" readonly style="width: 120px"></el-input> |
|||
<!-- <el-select v-model="pageData.testNo" placeholder="请选择" style="width: 120px;">--> |
|||
<!-- <el-option--> |
|||
<!-- v-for = "item in options"--> |
|||
<!-- :key = "item.key"--> |
|||
<!-- :label = "item.value"--> |
|||
<!-- :value = "item.value">--> |
|||
<!-- </el-option>--> |
|||
<!-- </el-select>--> |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row> |
|||
<el-col :span="24"> |
|||
<el-upload class="customer-upload" drag |
|||
action="javascript:void(0);" ref="uploadFile" :limit="1" |
|||
:before-upload="beforeUploadHandle" :on-change="onChange" |
|||
accept="*" :auto-upload="false" |
|||
style="text-align: left;"> |
|||
<i class="el-icon-upload"></i> |
|||
<div class="el-upload__text">将文件拖到此处,或<em>点击上传</em></div> |
|||
</el-upload> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row> |
|||
<el-col :span="24" style="margin-bottom: 30px;"> |
|||
<el-form-item class="customer-item" label="备注:" > |
|||
<el-input type="textarea" style="width: 360px;" placeholder="请输入内容" v-model="pageData.fileRemark"></el-input> |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row> |
|||
</el-row> |
|||
</el-form> |
|||
<span slot="footer" class="dialog-footer"> |
|||
<el-button type="primary" @click="saveUploadFile()">保存</el-button> |
|||
<el-button type="primary" @click="closeDialog">关闭</el-button> |
|||
</span> |
|||
</el-dialog> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import { |
|||
uploadFile // 文件上传 |
|||
} from '@/api/quotation/quotationInformation.js' |
|||
export default { |
|||
data() { |
|||
return { |
|||
folder: '', |
|||
visible: false, |
|||
fileList: [], |
|||
pageData: { |
|||
titleCon: '', |
|||
site: this.$store.state.user.site, |
|||
createBy: this.$store.state.user.name, |
|||
testNo: '', |
|||
fileRemark: '', |
|||
folder: '', |
|||
// options: [] |
|||
}, |
|||
// options: [], |
|||
dataListLoading: false, |
|||
} |
|||
}, |
|||
methods: { |
|||
// 初始化组件的参数 |
|||
init(currentRow) { |
|||
// 初始化参数 |
|||
this.pageData = JSON.parse(JSON.stringify(currentRow)) |
|||
// this.options = this.pageData.options |
|||
this.folder = this.pageData.folder |
|||
// 打开页面 |
|||
this.visible = true |
|||
}, |
|||
// 上传之前 |
|||
beforeUploadHandle(file) {}, |
|||
/*选择上传文件时*/ |
|||
onChange(file){ |
|||
this.fileList.push(file) |
|||
}, |
|||
/*关闭modal*/ |
|||
closeDialog(){ |
|||
this.fileList = [] |
|||
// 刷新报工的页面 |
|||
this.$emit('refreshPageTables') |
|||
//关闭当前的页面 |
|||
this.visible = false |
|||
}, |
|||
/*保修当前的数据*/ |
|||
saveUploadFile(){ |
|||
let remark = this.pageData.fileRemark |
|||
if(remark == null || remark == undefined){ |
|||
remark = '' |
|||
} |
|||
/*判断文件是否上传*/ |
|||
if(this.fileList == null || this.fileList.length === 0){ |
|||
this.$message.error("请先上传文件!") |
|||
return false |
|||
} |
|||
// if(this.pageData.testNo === '' || this.pageData.testNo == null){ |
|||
// this.$message.error("请选择测试单号!") |
|||
// return false |
|||
// } |
|||
const formData = new FormData() |
|||
//片接文件 |
|||
formData.append("file", this.fileList[0].raw) |
|||
formData.append("folder", this.folder) |
|||
formData.append("orderRef1", this.pageData.site) |
|||
formData.append("orderRef2", this.pageData.testNo) |
|||
formData.append("fileRemark", remark) |
|||
uploadFile(formData).then(({data}) => { |
|||
if (data.code === 0) { |
|||
this.$message.success(data.msg) |
|||
// 清空文件上传记录 |
|||
this.$refs.uploadFile.clearFiles() |
|||
this.pageData.fileRemark = '' |
|||
this.fileList = [] |
|||
}else { |
|||
this.$message.warning(data.msg) |
|||
} |
|||
}) |
|||
} |
|||
}, |
|||
} |
|||
</script> |
|||
<style scoped lang="scss"> |
|||
|
|||
</style> |
|||
Write
Preview
Loading…
Cancel
Save
Reference in new issue