|
|
@ -102,7 +102,7 @@ |
|
|
|
<!-- 上架单新增 --> |
|
|
|
<upShelfAdd v-show="viewState == 5" ref="upShelfAdd" @doback="resetState" @reloadlist="loadList" /> |
|
|
|
<!-- 上架单详情 --> |
|
|
|
<upShelfInfo v-show="viewState == 6" ref="upShelfInfo" @doback2="resetState2" @reloadlist="loadList" /> |
|
|
|
<upShelfInfo v-show="viewState == 6" ref="upShelfInfo" @doback="resetState2" @reloadlist="loadList" /> |
|
|
|
<el-dialog title="上架单列表" :visible.sync="dialogVisible" :before-close="handleClose"> |
|
|
|
<el-table :data="upShelfList" border style="width: 100%;margin-top: -30px;"> |
|
|
|
<el-table-column fixed width="60" label="序号" type="index" :index="indexMethod2" align="center" /> |
|
|
@ -129,6 +129,7 @@ import divInfo from './receivingGoodsInfo.vue' |
|
|
|
import upShelfAdd from '../upShelf/upShelfAdd.vue' |
|
|
|
import upShelfInfo from '../upShelf/upShelfInfo.vue' |
|
|
|
import { typeValues } from '@/api/Common/dictcommons' |
|
|
|
import { getStorage } from '@/utils/auth' |
|
|
|
|
|
|
|
export default { |
|
|
|
components: { |
|
|
@ -340,21 +341,38 @@ export default { |
|
|
|
this.loadList() |
|
|
|
}, |
|
|
|
toPrint() { |
|
|
|
for (var i = 0; i < this.selectionList.length; i++) { |
|
|
|
if (this.selectionList[i].billState !== '已完成') { |
|
|
|
this.$message({ |
|
|
|
type: 'warning', |
|
|
|
message: '只能选择已完成的记录。', |
|
|
|
showClose: true |
|
|
|
if (this.sids.length === 1) { |
|
|
|
if (this.selectionList[0].billState === '已完成') { |
|
|
|
req.printReceiptBillPdf({ sid: this.sids[0] }).then((res) => { |
|
|
|
if (res.success) { |
|
|
|
var xhr = new XMLHttpRequest() |
|
|
|
xhr.open('GET', process.env.VUE_APP_BASE_API + '/base/file/download?filePath=' + res.data + '&outFileName=' + '入库单', true) |
|
|
|
xhr.setRequestHeader('token', getStorage()) |
|
|
|
xhr.responseType = 'blob' |
|
|
|
xhr.onload = function(e) { |
|
|
|
// 如果请求执行成功 |
|
|
|
var blob = this.response |
|
|
|
var filename = '入库单.pdf' |
|
|
|
var a = document.createElement('a') |
|
|
|
// blob.type="application/octet-stream"; |
|
|
|
// 创键临时url对象 |
|
|
|
var url = URL.createObjectURL(blob) |
|
|
|
a.href = url |
|
|
|
a.download = filename |
|
|
|
a.click() |
|
|
|
// 释放之前创建的URL对象 |
|
|
|
window.URL.revokeObjectURL(url) |
|
|
|
} |
|
|
|
// 发送请求 |
|
|
|
xhr.send() |
|
|
|
} |
|
|
|
}) |
|
|
|
return |
|
|
|
} else { |
|
|
|
this.$message({ type: 'warning', message: '请选择单据状态为已完成的记录进行操作', showClose: true }) |
|
|
|
} |
|
|
|
} else { |
|
|
|
this.$message({ showClose: true, type: 'warning', message: '请选择一条记录进行操作' }) |
|
|
|
} |
|
|
|
this.$message({ |
|
|
|
type: 'warning', |
|
|
|
message: '打印功能正在完善中。', |
|
|
|
showClose: true |
|
|
|
}) |
|
|
|
}, |
|
|
|
toAdd() { |
|
|
|
if (this.selectionList.length !== 1) { |
|
|
|