|
@@ -122,6 +122,66 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
</el-form-item>
|
|
|
+ <el-form-item label="设备订购合同:" class="maget_ty">
|
|
|
+ <div class="forieu" style="width: 618px">
|
|
|
+ <div class="bure burert">
|
|
|
+ <el-upload
|
|
|
+ :action="defaultSettings.urls + process+'/common/upload'"
|
|
|
+ list-type="picture-card"
|
|
|
+ :on-preview="handlePictureCardPreview"
|
|
|
+ :on-remove="handleRemove3"
|
|
|
+ :on-success="handleOnsuccess3"
|
|
|
+ :file-list="orderContractPhotoList"
|
|
|
+ :disabled = "disfal"
|
|
|
+ >
|
|
|
+ <i class="el-icon-plus"></i>
|
|
|
+ <!-- <el-button slot="trigger" size="small" type="primary"
|
|
|
+ >选取文件</el-button
|
|
|
+ >
|
|
|
+ <el-button
|
|
|
+ style="margin-left: 10px"
|
|
|
+ size="small"
|
|
|
+ type="primary"
|
|
|
+ @click="submitUpload"
|
|
|
+ >上传到服务器</el-button
|
|
|
+ > -->
|
|
|
+ </el-upload>
|
|
|
+ <el-dialog :visible.sync="dialogVisible">
|
|
|
+ <img width="100%" :src="dialogImageUrl" alt="" />
|
|
|
+ </el-dialog>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="到资清单:" class="maget_ty">
|
|
|
+ <div class="forieu" style="width: 618px">
|
|
|
+ <div class="bure burert">
|
|
|
+ <el-upload
|
|
|
+ :action="defaultSettings.urls + process+'/common/upload'"
|
|
|
+ list-type="picture-card"
|
|
|
+ :on-preview="handlePictureCardPreview"
|
|
|
+ :on-remove="handleRemove2"
|
|
|
+ :on-success="handleOnsuccess2"
|
|
|
+ :file-list="arrivalListPhotoList"
|
|
|
+ :disabled = "disfal"
|
|
|
+ >
|
|
|
+ <i class="el-icon-plus"></i>
|
|
|
+ <!-- <el-button slot="trigger" size="small" type="primary"
|
|
|
+ >选取文件</el-button
|
|
|
+ >
|
|
|
+ <el-button
|
|
|
+ style="margin-left: 10px"
|
|
|
+ size="small"
|
|
|
+ type="primary"
|
|
|
+ @click="submitUpload"
|
|
|
+ >上传到服务器</el-button
|
|
|
+ > -->
|
|
|
+ </el-upload>
|
|
|
+ <el-dialog :visible.sync="dialogVisible">
|
|
|
+ <img width="100%" :src="dialogImageUrl" alt="" />
|
|
|
+ </el-dialog>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </el-form-item>
|
|
|
<el-form-item> </el-form-item>
|
|
|
<el-form-item label=" 项目入规(限):" prop="isOk">
|
|
|
<el-select
|
|
@@ -189,6 +249,8 @@ export default {
|
|
|
dialogImageUrl: false,
|
|
|
|
|
|
productPhotoList: [],
|
|
|
+ arrivalListPhotoList: [],
|
|
|
+ orderContractPhotoList: [],
|
|
|
|
|
|
//数据字典
|
|
|
typeOptions: {},
|
|
@@ -231,9 +293,18 @@ export default {
|
|
|
getProduct(that.bmProjectId).then((response) => {
|
|
|
if (response.data) {
|
|
|
that.form = response.data;
|
|
|
+ // 投产图片
|
|
|
if (that.form.productPhoto.length > 0) {
|
|
|
this.productPhotoList = JSON.parse(that.form.productPhoto);
|
|
|
}
|
|
|
+ // 到资清单
|
|
|
+ if (that.form.arrivalListPhoto.length > 0) {
|
|
|
+ this.arrivalListPhotoList = JSON.parse(that.form.arrivalListPhoto);
|
|
|
+ }
|
|
|
+ // 设备订购合同
|
|
|
+ if (that.form.orderContractPhoto.length > 0) {
|
|
|
+ this.orderContractPhotoList = JSON.parse(that.form.orderContractPhoto);
|
|
|
+ }
|
|
|
}
|
|
|
});
|
|
|
},
|
|
@@ -277,6 +348,8 @@ export default {
|
|
|
okDate: null,
|
|
|
};
|
|
|
this.productPhotoList = [];
|
|
|
+ this.arrivalListPhotoList = [];
|
|
|
+ this.orderContractPhotoList = [];
|
|
|
},
|
|
|
//上传图片
|
|
|
handleSuccpermit(response, file, fileList) {
|
|
@@ -311,6 +384,14 @@ export default {
|
|
|
this.msgError("请先选择投产图片");
|
|
|
return;
|
|
|
}
|
|
|
+ if (this.arrivalListPhotoList.length == 0) {
|
|
|
+ this.msgError("请先选择到资清单图片");
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ if (this.orderContractPhotoList.length == 0) {
|
|
|
+ this.msgError("请先选择设备订购合同图片");
|
|
|
+ return;
|
|
|
+ }
|
|
|
this.productPhotoList.forEach((item, index) => {
|
|
|
var obj = {};
|
|
|
obj.name = item.response.fileName;
|
|
@@ -320,6 +401,24 @@ export default {
|
|
|
});
|
|
|
this.form.productPhoto = JSON.stringify(tmp);
|
|
|
|
|
|
+ this.arrivalListPhotoList.forEach((item, index) => {
|
|
|
+ var obj = {};
|
|
|
+ obj.name = item.response.fileName;
|
|
|
+ obj.uid = item.uid;
|
|
|
+ obj.url = item.response.url;
|
|
|
+ tmp[index] = obj;
|
|
|
+ });
|
|
|
+ this.form.arrivalListPhoto = JSON.stringify(tmp);
|
|
|
+
|
|
|
+ this.orderContractPhotoList.forEach((item, index) => {
|
|
|
+ var obj = {};
|
|
|
+ obj.name = item.response.fileName;
|
|
|
+ obj.uid = item.uid;
|
|
|
+ obj.url = item.response.url;
|
|
|
+ tmp[index] = obj;
|
|
|
+ });
|
|
|
+ this.form.orderContractPhoto = JSON.stringify(tmp);
|
|
|
+
|
|
|
this.$refs["form"].validate((valid) => {
|
|
|
if (valid) {
|
|
|
if (this.form.id != null) {
|
|
@@ -347,6 +446,18 @@ export default {
|
|
|
handleRemove(file, fileList) {
|
|
|
this.productPhotoList = fileList;
|
|
|
},
|
|
|
+ handleOnsuccess2(response, file, fileList) {
|
|
|
+ this.arrivalListPhotoList = fileList;
|
|
|
+ },
|
|
|
+ handleRemove2(file, fileList) {
|
|
|
+ this.arrivalListPhotoList = fileList;
|
|
|
+ },
|
|
|
+ handleOnsuccess3(response, file, fileList) {
|
|
|
+ this.orderContractPhotoList = fileList;
|
|
|
+ },
|
|
|
+ handleRemove3(file, fileList) {
|
|
|
+ this.orderContractPhotoList = fileList;
|
|
|
+ },
|
|
|
handlePictureCardPreview(file) {
|
|
|
this.dialogImageUrl = file.url;
|
|
|
this.dialogVisible = true;
|