|
|
@ -101,7 +101,7 @@ |
|
|
style="width: 100px; height: 100px"/></span> |
|
|
style="width: 100px; height: 100px"/></span> |
|
|
</template> |
|
|
</template> |
|
|
</el-table-column> |
|
|
</el-table-column> |
|
|
<el-table-column fixed="right" header-align="center" align="center" width="120" label="操作"> |
|
|
|
|
|
|
|
|
<el-table-column fixed="right" header-align="center" align="center" width="160" label="操作"> |
|
|
<template slot-scope="scope"> |
|
|
<template slot-scope="scope"> |
|
|
<a v-if="isRowStatus(scope.row, ['Draft'])" |
|
|
<a v-if="isRowStatus(scope.row, ['Draft'])" |
|
|
class="customer-a" @click="confirmInspection(scope.row)">确认</a> |
|
|
class="customer-a" @click="confirmInspection(scope.row)">确认</a> |
|
|
@ -117,6 +117,7 @@ |
|
|
class="customer-a" |
|
|
class="customer-a" |
|
|
:style="(isRowStatus(scope.row, ['Draft']) || isRowStatus(scope.row, ['Confirmed'])) ? 'margin-left: 3px;' : ''" |
|
|
:style="(isRowStatus(scope.row, ['Draft']) || isRowStatus(scope.row, ['Confirmed'])) ? 'margin-left: 3px;' : ''" |
|
|
@click="applyChangeRequest(scope.row)">申请变更</a> |
|
|
@click="applyChangeRequest(scope.row)">申请变更</a> |
|
|
|
|
|
<a class="customer-a" style="margin-left: 3px;" @click="exportRowExcel(scope.row)">导出</a> |
|
|
<span v-if="!isRowStatus(scope.row, ['Draft', 'Confirmed', 'Audited', 'Scheduled'])" |
|
|
<span v-if="!isRowStatus(scope.row, ['Draft', 'Confirmed', 'Audited', 'Scheduled'])" |
|
|
class="customer-a" |
|
|
class="customer-a" |
|
|
style="color: #909399; cursor: default;">{{ scope.row.status }}</span> |
|
|
style="color: #909399; cursor: default;">{{ scope.row.status }}</span> |
|
|
@ -3051,6 +3052,36 @@ export default { |
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
// 操作列导出单条记录 - 调用后端接口生成带边框样式的Excel |
|
|
|
|
|
exportRowExcel (row) { |
|
|
|
|
|
if (!row || !row.requestNo) { |
|
|
|
|
|
this.$message.warning('数据异常,无法导出') |
|
|
|
|
|
return |
|
|
|
|
|
} |
|
|
|
|
|
this.$http({ |
|
|
|
|
|
url: this.$http.adornUrl(`/inspection/export/${row.requestNo}`), |
|
|
|
|
|
method: 'get', |
|
|
|
|
|
params: { site: row.site }, |
|
|
|
|
|
responseType: 'blob' |
|
|
|
|
|
}).then(response => { |
|
|
|
|
|
const blob = new Blob([response.data], { |
|
|
|
|
|
type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' |
|
|
|
|
|
}) |
|
|
|
|
|
const url = window.URL.createObjectURL(blob) |
|
|
|
|
|
const link = document.createElement('a') |
|
|
|
|
|
link.href = url |
|
|
|
|
|
link.download = '验货申请单_' + row.requestNo + '.xlsx' |
|
|
|
|
|
document.body.appendChild(link) |
|
|
|
|
|
link.click() |
|
|
|
|
|
document.body.removeChild(link) |
|
|
|
|
|
window.URL.revokeObjectURL(url) |
|
|
|
|
|
this.$message.success('导出成功') |
|
|
|
|
|
}).catch(error => { |
|
|
|
|
|
console.error('导出失败:', error) |
|
|
|
|
|
this.$message.error('导出失败,请稍后重试') |
|
|
|
|
|
}) |
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
executeApplyChangeRequest (requestNo, changeRemark) { |
|
|
executeApplyChangeRequest (requestNo, changeRemark) { |
|
|
this.applyChangeLoading = true |
|
|
this.applyChangeLoading = true |
|
|
applyChangeInspectionRequest(requestNo, { changeRemark }).then(({ data }) => { |
|
|
applyChangeInspectionRequest(requestNo, { changeRemark }).then(({ data }) => { |
|
|
|