| | |
| | | </div>
|
| | | <div class="box_text2">Tel</div>
|
| | | </div>
|
| | | <el-input type="number" :disabled="type != 'add'" v-model="form.tel" placeholder="请输入"></el-input>
|
| | | <el-input :disabled="type != 'add'" v-model="form.tel" placeholder="请输入"></el-input>
|
| | |
|
| | | </div>
|
| | | </el-form-item>
|
| | |
| | | <div class="tip flex">
|
| | | <img class="tip-img" src="@/assets/addOrder/img1@2x.png" alt="" />
|
| | | <div>联系电话和邮箱至少填写其中一项
|
| | | <div>多个邮箱请填写到“其他联系⽅式”</div>
|
| | | <div>多个邮箱请填写到"其他联系⽅式"</div>
|
| | | </div>
|
| | | </div>
|
| | | </div>
|
| | |
| | | <div slot="header" class="clearfix">
|
| | | <span class="clearfix_text">附件 | Attachment</span>
|
| | | </div>
|
| | | <div class="box-carde">
|
| | | <div class="flex">
|
| | | <el-form-item label="Do:" class="w-316" prop="DOFileUrls" label-width="88px">
|
| | |
|
| | | <div class="flex wrap">
|
| | | <el-form-item label="DO:" class="w-316" prop="DOFileUrls" label-width="88px">
|
| | | <el-upload :disabled="type == 'detail'" class="upload-demo" :on-preview="handlePreview"
|
| | | :http-request="handleUpload1" action="#" :on-remove="handleRemove1" :on-exceed="handleExceed"
|
| | | :file-list="fileList1">
|
| | |
| | | <div class="upload_btn">+上传附件</div>
|
| | | </el-upload>
|
| | | </el-form-item>
|
| | | <el-form-item label="PU说明:" class="" prop="PUExplain" label-width="80px">
|
| | | <el-form-item label="PU说明:" class="w-316" prop="PUExplain" label-width="88px">
|
| | | <el-input :disabled="type == 'detail'" v-model="form.PUExplain" placeholder="请输入"></el-input>
|
| | | </el-form-item>
|
| | | </div>
|
| | | <div class="flex">
|
| | | <el-form-item label="POD:" class=" w-316" prop="PODFileUrls" label-width="88px">
|
| | | <el-form-item label="POD:" class="w-316" prop="PODFileUrls" label-width="88px">
|
| | | <el-upload :disabled="type == 'detail'" class="upload-demo" :on-preview="handlePreview"
|
| | | :on-remove="handleRemove3" :http-request="handleUpload3" action="#" :on-exceed="handleExceed"
|
| | | :file-list="fileList3">
|
| | |
| | | <div class="upload_btn">+上传附件</div>
|
| | | </el-upload>
|
| | | </el-form-item>
|
| | | </div>
|
| | | <el-form-item v-if="form.SOC === '是'" label="EIR:" class="w-316" prop="EIRFileUrls" label-width="88px">
|
| | | <el-upload :disabled="type == 'detail'" class="upload-demo" :on-preview="handlePreview"
|
| | | :on-remove="handleRemove5" :http-request="handleUpload5" action="#" :on-exceed="handleExceed"
|
| | | :file-list="fileList5">
|
| | | <div class="upload_btn">+上传附件</div>
|
| | | </el-upload>
|
| | | </el-form-item>
|
| | | </div>
|
| | | </el-card>
|
| | | </div>
|
| | |
| | | fileList2: [],
|
| | | fileList3: [],
|
| | | fileList4: [],
|
| | | fileList5: [],
|
| | | originalFiles: {
|
| | | DOFileUrls: [],
|
| | | PUFileUrls: [],
|
| | | PODFileUrls: [],
|
| | | otherFileUrls: [],
|
| | | EIRFileUrls: []
|
| | | },
|
| | | options: [
|
| | | {
|
| | | value: "20GP",
|
| | |
| | | }).then(resp => {
|
| | | this.form = resp.data
|
| | | this.detailInfo = resp.data
|
| | | // if (resp.data.poundWeight) {
|
| | | // resp.data.poundWeight = resp.data.poundWeight.toFixed(2) * 1
|
| | | // }
|
| | | if (resp.data.DOFileUrls) {
|
| | | resp.data.DOFileUrls.map(item => {
|
| | | this.fileList1.push({ url: item.url, name: item.url.split('ownload/')[1] })
|
| | | })
|
| | | this.originalFiles.DOFileUrls = [...resp.data.DOFileUrls]
|
| | | }
|
| | | if (resp.data.PUFileUrls) {
|
| | | resp.data.PUFileUrls.map(item => {
|
| | | this.fileList2.push({ url: item.url, name: item.url.split('ownload/')[1] })
|
| | | })
|
| | | this.originalFiles.PUFileUrls = [...resp.data.PUFileUrls]
|
| | | }
|
| | | if (resp.data.PODFileUrls) {
|
| | | resp.data.PODFileUrls.map(item => {
|
| | | this.fileList3.push({ url: item.url, name: item.url.split('ownload/')[1] })
|
| | | })
|
| | | this.originalFiles.PODFileUrls = [...resp.data.PODFileUrls]
|
| | | }
|
| | | console.log(resp.data.otherFileUrls,'resp.data.otherFileUrls');
|
| | | |
| | | if (resp.data.otherFileUrls) {
|
| | | console.log(this.fileList4);
|
| | |
|
| | | resp.data.otherFileUrls.map(item => {
|
| | | this.fileList4.push({ url: item.url, name: item.url.split('ownload/')[1] })
|
| | | })
|
| | | |
| | | this.originalFiles.otherFileUrls = [...resp.data.otherFileUrls]
|
| | | }
|
| | | if (resp.data.EIRFileUrls) {
|
| | | resp.data.EIRFileUrls.map(item => {
|
| | | this.fileList5.push({ url: item.url, name: item.url.split('ownload/')[1] })
|
| | | })
|
| | | this.originalFiles.EIRFileUrls = [...resp.data.EIRFileUrls]
|
| | | }
|
| | | })
|
| | | }
|
| | |
| | | this.form.PUFileUrls = this.fileList2.map(item => { return { url: item.url } })
|
| | | this.form.PODFileUrls = this.fileList3.map(item => { return { url: item.url } })
|
| | | this.form.otherFileUrls = this.fileList4.map(item => { return { url: item.url } })
|
| | | this.form.EIRFileUrls = this.fileList5.map(item => { return { url: item.url } })
|
| | | // 添加订单
|
| | | if (this.type === 'add') {
|
| | | if (this.isSave) {
|
| | |
| | | this.fileList2 = []
|
| | | this.fileList3 = []
|
| | | this.fileList4 = []
|
| | | this.fileList5 = []
|
| | | this.$router.go(-1)
|
| | |
|
| | | }
|
| | |
| | | remark: this.form.remark,
|
| | | })
|
| | | }
|
| | | const fileChanges = this.checkFileChanges();
|
| | | edit({
|
| | | ...this.form,
|
| | | ...fileChanges,
|
| | | extra: JSON.parse(localStorage.getItem('userInfo')).extra,
|
| | | orderId: this.orderId
|
| | | }).then(resp => {
|
| | |
| | | this.fileList2 = []
|
| | | this.fileList3 = []
|
| | | this.fileList4 = []
|
| | | this.fileList5 = []
|
| | | this.$router.go(-1)
|
| | |
|
| | | }
|
| | |
| | | },
|
| | | handleRemove4(e) {
|
| | | this.fileList4 = this.fileList4.filter(item => item.uid !== e.uid);
|
| | | },
|
| | | handleRemove5(e) {
|
| | | this.fileList5 = this.fileList5.filter(item => item.uid !== e.uid);
|
| | | },
|
| | |
|
| | | handleExceed(e) {
|
| | |
| | | this.uploadFile(e, obj, 4)
|
| | |
|
| | | },
|
| | | handleUpload5(e) {
|
| | | let obj = {
|
| | | orgId: JSON.parse(localStorage.getItem('userInfo')).extra,
|
| | | fileSize: e.file.size,
|
| | | fileSuffix: e.file.type.split('/')[1],
|
| | | originalName: e.file.name,
|
| | | fileSource: {
|
| | | appId: 'zj0FFk5wx4S05X',
|
| | | formId: 'zj1OvwgwIam0Ge',
|
| | | isDevelop: true,
|
| | | },
|
| | | uploadPath: 'file',
|
| | | uploadTargetType: 'FORM_ROW',
|
| | | }
|
| | | this.uploadFile(e, obj, 5)
|
| | | },
|
| | | checkFileChanges() {
|
| | | const currentDOFiles = this.fileList1.map(f => f.url);
|
| | | const currentPUFiles = this.fileList2.map(f => f.url);
|
| | | const currentPODFiles = this.fileList3.map(f => f.url);
|
| | | const currentOtherFiles = this.fileList4.map(f => f.url);
|
| | | const currentEIRFiles = this.fileList5.map(f => f.url);
|
| | |
|
| | | const originalDOFiles = this.originalFiles.DOFileUrls.map(f => f.url);
|
| | | const originalPUFiles = this.originalFiles.PUFileUrls.map(f => f.url);
|
| | | const originalPODFiles = this.originalFiles.PODFileUrls.map(f => f.url);
|
| | | const originalOtherFiles = this.originalFiles.otherFileUrls.map(f => f.url);
|
| | | const originalEIRFiles = this.originalFiles.EIRFileUrls.map(f => f.url);
|
| | |
|
| | | return {
|
| | | DOFileChange: JSON.stringify(currentDOFiles) !== JSON.stringify(originalDOFiles) ? 1 : 0,
|
| | | PUFileChange: JSON.stringify(currentPUFiles) !== JSON.stringify(originalPUFiles) ? 1 : 0,
|
| | | PODFileChange: JSON.stringify(currentPODFiles) !== JSON.stringify(originalPODFiles) ? 1 : 0,
|
| | | OtherFileChange: JSON.stringify(currentOtherFiles) !== JSON.stringify(originalOtherFiles) ? 1 : 0,
|
| | | EIRFileChange: JSON.stringify(currentEIRFiles) !== JSON.stringify(originalEIRFiles) ? 1 : 0
|
| | | };
|
| | | },
|
| | | },
|
| | | };
|
| | | </script>
|
| | |
| | | }
|
| | |
|
| | | .w-316 {
|
| | | width: 400px;
|
| | | width: 550px;
|
| | | }
|
| | |
|
| | | ::v-deep .el-icon-close-tip {
|