| | |
| | | </el-table-column> |
| | | <el-table-column label="订单类型" width="100"> |
| | | <template slot-scope="scope"> |
| | | <el-tag effect="dark" size="mini" style="font-size: 8px;">{{scope.row.order_type}}</el-tag> |
| | | <el-tag effect="dark" size="mini" style="font-size: 8px;">{{ scope.row.order_type }}</el-tag> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="code" label="合同编号" width="220"> |
| | |
| | | <template slot-scope="scope"> |
| | | <span style="color: #34BD66;" v-if="scope.row.type == 1">通过</span> |
| | | <span style="color: #E84738;" v-else-if="scope.row.type == 0">不通过</span> |
| | | <span v-else>{{null}}</span> |
| | | <span v-else>{{ null }}</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="操作" width="220"> |
| | | <template slot-scope="scope"> |
| | | <span class="table_do" @click="changeShowDetail(scope.row)"> 查看详情 </span> |
| | | <span class="table_do" @click="downloadFile(scope.row)"> 下载附件 </span> |
| | | <span class="table_do" v-if="scope.row.type == 2" @click="saleCheck(scope)"> 审核 </span> |
| | | <span class="table_do" v-else> </span> |
| | | <span class="table_do" v-if="scope.row.type == 2" |
| | |
| | | this.selectRawInspectsList() |
| | | }, |
| | | methods: { |
| | | downloadFile(row) { |
| | | let baseIp = "http://192.168.18.16:9999" |
| | | this.axios.post(this.$api.url.saleDownload, { |
| | | id: row.id |
| | | }).then(res => { |
| | | const fileUrls = []; // 文件的urls |
| | | res.data.forEach(item=>{ |
| | | let url=baseIp+item |
| | | fileUrls.push(url) |
| | | }) |
| | | const downloadFile = (url, fileName) => { |
| | | const link = document.createElement('a'); |
| | | link.href = url; |
| | | link.download = fileName; |
| | | // link.style.display = 'none'; |
| | | document.body.appendChild(link); |
| | | link.click(); |
| | | document.body.removeChild(link); |
| | | }; |
| | | |
| | | console.log(fileUrls); |
| | | fileUrls.forEach((url, index) => { |
| | | let s=url.split(".") |
| | | const fileName = row.name+`附件(${index + 1}).`+s[s.length-1]; |
| | | downloadFile(url, fileName); |
| | | }); |
| | | }) |
| | | }, |
| | | closeDialog() { |
| | | this.addData = { |
| | | orderNumber: null, |
| | |
| | | message: '同步假成功(◕ᴗ◕)!', |
| | | type: 'success' |
| | | }); |
| | | this.isSync=false |
| | | this.isSync = false |
| | | }, 2000); |
| | | return |
| | | //调用同步接口 |