|
@@ -211,12 +211,12 @@
|
|
v-hasPermi="['production:apply:edit']"
|
|
v-hasPermi="['production:apply:edit']"
|
|
icon="el-icon-s-claim"
|
|
icon="el-icon-s-claim"
|
|
>提交申请</el-button>
|
|
>提交申请</el-button>
|
|
- <el-button
|
|
|
|
- size="mini"
|
|
|
|
- type="text"
|
|
|
|
- icon="el-icon-document"
|
|
|
|
- @click="handleDoc(scope.row)"
|
|
|
|
- >上传附件</el-button>
|
|
|
|
|
|
+ <!--<el-button-->
|
|
|
|
+ <!--size="mini"-->
|
|
|
|
+ <!--type="text"-->
|
|
|
|
+ <!--icon="el-icon-document"-->
|
|
|
|
+ <!--@click="handleDoc(scope.row)"-->
|
|
|
|
+ <!-->上传附件</el-button>-->
|
|
<el-button
|
|
<el-button
|
|
size="mini"
|
|
size="mini"
|
|
type="text"
|
|
type="text"
|
|
@@ -327,6 +327,29 @@
|
|
</el-select>
|
|
</el-select>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
</el-descriptions-item>
|
|
</el-descriptions-item>
|
|
|
|
+ <el-descriptions-item label="附件" :span="3">
|
|
|
|
+ <el-form-item label="" prop="fileUrl">
|
|
|
|
+ <el-upload
|
|
|
|
+ ref="doc"
|
|
|
|
+ :limit="5"
|
|
|
|
+ :headers="doc.headers"
|
|
|
|
+ :action="doc.url"
|
|
|
|
+ :disabled="doc.isUploading"
|
|
|
|
+ :on-progress="handleFileDocProgress"
|
|
|
|
+ :on-success="handleFileDocSuccess"
|
|
|
|
+ :on-remove="handleRemove"
|
|
|
|
+ :auto-upload="true"
|
|
|
|
+ :file-list="fileList"
|
|
|
|
+ drag
|
|
|
|
+ >
|
|
|
|
+ <i class="el-icon-upload"></i>
|
|
|
|
+ <div class="el-upload__text">
|
|
|
|
+ {{ $t('将文件拖到此处,或') }}
|
|
|
|
+ <em>{{ $t('点击上传') }}</em>
|
|
|
|
+ </div>
|
|
|
|
+ </el-upload>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ </el-descriptions-item>
|
|
<el-descriptions-item label="登记时间">
|
|
<el-descriptions-item label="登记时间">
|
|
<el-form-item prop="applyDate">
|
|
<el-form-item prop="applyDate">
|
|
<el-date-picker
|
|
<el-date-picker
|
|
@@ -342,7 +365,8 @@
|
|
</el-descriptions>
|
|
</el-descriptions>
|
|
</el-form>
|
|
</el-form>
|
|
<div slot="footer" class="dialog-footer">
|
|
<div slot="footer" class="dialog-footer">
|
|
- <el-button type="primary" @click="submitForm">确 定</el-button>
|
|
|
|
|
|
+ <el-button type="primary" @click="handleSaveAndSubmit">提 交</el-button>
|
|
|
|
+ <el-button @click="submitForm">保 存</el-button>
|
|
<el-button @click="cancel">取 消</el-button>
|
|
<el-button @click="cancel">取 消</el-button>
|
|
</div>
|
|
</div>
|
|
</el-dialog>
|
|
</el-dialog>
|
|
@@ -593,6 +617,7 @@ export default {
|
|
}
|
|
}
|
|
};
|
|
};
|
|
return {
|
|
return {
|
|
|
|
+ fileList: [],
|
|
// 统计至SAI检查台账的数据
|
|
// 统计至SAI检查台账的数据
|
|
saiList: [],
|
|
saiList: [],
|
|
// 是显示用统计至SAI检查台账对话框
|
|
// 是显示用统计至SAI检查台账对话框
|
|
@@ -622,7 +647,7 @@ export default {
|
|
// 设置上传的请求头部
|
|
// 设置上传的请求头部
|
|
headers: { Authorization: "Bearer " + getToken() },
|
|
headers: { Authorization: "Bearer " + getToken() },
|
|
// 上传的地址
|
|
// 上传的地址
|
|
- url: process.env.VUE_APP_BASE_API + "/common/commonfile/uploadFile",
|
|
|
|
|
|
+ url: process.env.VUE_APP_BASE_API + "/production/saiFile/uploadFile",
|
|
commonfileList: null,
|
|
commonfileList: null,
|
|
queryParams: {
|
|
queryParams: {
|
|
pId: null,
|
|
pId: null,
|
|
@@ -852,7 +877,6 @@ export default {
|
|
},
|
|
},
|
|
getFileList() {
|
|
getFileList() {
|
|
allFileList(this.doc.queryParams).then(response => {
|
|
allFileList(this.doc.queryParams).then(response => {
|
|
- console.log(response);
|
|
|
|
this.doc.commonfileList = response;
|
|
this.doc.commonfileList = response;
|
|
});
|
|
});
|
|
},
|
|
},
|
|
@@ -861,11 +885,24 @@ export default {
|
|
this.doc.file = file;
|
|
this.doc.file = file;
|
|
this.doc.isUploading = true;
|
|
this.doc.isUploading = true;
|
|
},
|
|
},
|
|
- /** 附件上传成功处理 */
|
|
|
|
|
|
+ // /** 附件上传成功处理 */
|
|
|
|
+ // handleFileDocSuccess(response, file, fileList) {
|
|
|
|
+ // this.doc.isUploading = false;
|
|
|
|
+ // this.$alert(response.msg, this.$t('导入结果'), { dangerouslyUseHTMLString: true });
|
|
|
|
+ // this.getFileList()
|
|
|
|
+ // },
|
|
|
|
+ //附件上传成功处理
|
|
handleFileDocSuccess(response, file, fileList) {
|
|
handleFileDocSuccess(response, file, fileList) {
|
|
this.doc.isUploading = false;
|
|
this.doc.isUploading = false;
|
|
- this.$alert(response.msg, this.$t('导入结果'), { dangerouslyUseHTMLString: true });
|
|
|
|
- this.getFileList()
|
|
|
|
|
|
+ this.fileList = fileList
|
|
|
|
+ if (response.code == 200){
|
|
|
|
+ this.$alert(this.$t('导入成功'), this.$t('导入结果'), { dangerouslyUseHTMLString: true });
|
|
|
|
+ }else {
|
|
|
|
+ this.$alert(response.msg, this.$t('导入结果'), { dangerouslyUseHTMLString: true });
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ handleRemove (file, fileList) {
|
|
|
|
+ this.fileList = fileList
|
|
},
|
|
},
|
|
/** 删除按钮操作 */
|
|
/** 删除按钮操作 */
|
|
handleDeleteDoc(row) {
|
|
handleDeleteDoc(row) {
|
|
@@ -1202,6 +1239,7 @@ export default {
|
|
/** 新增按钮操作 */
|
|
/** 新增按钮操作 */
|
|
handleAdd() {
|
|
handleAdd() {
|
|
this.reset();
|
|
this.reset();
|
|
|
|
+ this.fileList = [];
|
|
this.open = true;
|
|
this.open = true;
|
|
this.title = "添加SAI开项申请";
|
|
this.title = "添加SAI开项申请";
|
|
// 加载当前登录员工信息
|
|
// 加载当前登录员工信息
|
|
@@ -1221,12 +1259,32 @@ export default {
|
|
if (this.form.unsafeAction != null && this.form.unsafeAction != "") {
|
|
if (this.form.unsafeAction != null && this.form.unsafeAction != "") {
|
|
this.form.unsafeAction = this.form.unsafeAction.toString();
|
|
this.form.unsafeAction = this.form.unsafeAction.toString();
|
|
}
|
|
}
|
|
|
|
+ this.fileList = [];
|
|
|
|
+ if (this.form.files.length > 0) {
|
|
|
|
+ console.log(this.form.files);
|
|
|
|
+ for (let i = 0; i < this.form.files.length; i++) {
|
|
|
|
+ let obj = {}
|
|
|
|
+ obj.name = this.form.files[i].fileName
|
|
|
|
+ obj.response = {};
|
|
|
|
+ obj.response.msg = this.form.files[i].fileUrl
|
|
|
|
+ this.fileList.push(obj)
|
|
|
|
+ }
|
|
|
|
+ }
|
|
this.open = true;
|
|
this.open = true;
|
|
this.title = "修改SAI开项申请";
|
|
this.title = "修改SAI开项申请";
|
|
});
|
|
});
|
|
},
|
|
},
|
|
- /** 新增/修改提交按钮 */
|
|
|
|
|
|
+ /** 新增/修改保存按钮 */
|
|
submitForm() {
|
|
submitForm() {
|
|
|
|
+ this.form.files = []
|
|
|
|
+ if (this.fileList.length > 0) {
|
|
|
|
+ for (let i = 0; i < this.fileList.length; i++) {
|
|
|
|
+ let obj = {}
|
|
|
|
+ obj.fileName = this.fileList[i].name
|
|
|
|
+ obj.fileUrl = this.fileList[i].response.msg
|
|
|
|
+ this.form.files.push(obj)
|
|
|
|
+ }
|
|
|
|
+ }
|
|
this.$refs["form"].validate(valid => {
|
|
this.$refs["form"].validate(valid => {
|
|
if (valid) {
|
|
if (valid) {
|
|
if (this.form.saiApplyId != null) {
|
|
if (this.form.saiApplyId != null) {
|
|
@@ -1245,6 +1303,8 @@ export default {
|
|
}
|
|
}
|
|
});
|
|
});
|
|
},
|
|
},
|
|
|
|
+ /** 新增/修改提交按钮 */
|
|
|
|
+ handleSaveAndSubmit() {},
|
|
/** 统计至SAI检查台账提交按钮 */
|
|
/** 统计至SAI检查台账提交按钮 */
|
|
submitSaiForm() {
|
|
submitSaiForm() {
|
|
for (let i = 0; i < this.saiList.length; i++) {
|
|
for (let i = 0; i < this.saiList.length; i++) {
|