Browse Source

完善销售订单查询

master
yunuo970428 2 years ago
parent
commit
dd143fad6b
  1. 42
      anrui-buscenter/anrui-buscenter-ui/src/views/xiaoshouguanli/dingdanchaxun/xiaoshoudingdanchaxun.vue

42
anrui-buscenter/anrui-buscenter-ui/src/views/xiaoshouguanli/dingdanchaxun/xiaoshoudingdanchaxun.vue

@ -63,7 +63,7 @@
</el-table-column> </el-table-column>
<el-table-column label="订单状态" align="center" width="150"> <el-table-column label="订单状态" align="center" width="150">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ scope.row.saleOrderState }}</span> <span @click="flowRecord(scope.row)" class="bluezi">{{ scope.row.saleOrderState }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="创建日期" align="center" width="120"> <el-table-column label="创建日期" align="center" width="120">
@ -106,6 +106,10 @@
</div> </div>
<!-- End 列表页面 --> <!-- End 列表页面 -->
<xiaoshoudingdanInfo ref="divInfo" v-show="viewState == 2" @doback="resetState"/> <xiaoshoudingdanInfo ref="divInfo" v-show="viewState == 2" @doback="resetState"/>
<el-dialog title="" :visible.sync="centerDialogVisible" width="78%" height="1%" :before-close="closeIt" center>
<iframe frameborder="0" id="iframe" style="width:100%;" scrolling="no" :src="this.centerDialogVisible === true ? url :''"></iframe>
</el-dialog>
</div> </div>
</template> </template>
@ -128,6 +132,7 @@ export default {
data() { data() {
return { return {
btndisabled: false, btndisabled: false,
centerDialogVisible: false,
viewState: 1, viewState: 1,
btnList: [ btnList: [
{ {
@ -162,9 +167,40 @@ export default {
this.init() this.init()
}, },
mounted() { mounted() {
// vuewindowpostMessagehandleMessage
window.addEventListener('message', this.handleMessage)
this.$refs['btnbar'].setButtonList(this.btnList) this.$refs['btnbar'].setButtonList(this.btnList)
}, },
methods: { methods: {
async handleMessage(event) {
var code = ''
if (event.data.params !== null && event.data.params !== undefined) {
code = event.data.params.code
}
if (code === 1) {
this.init()
this.centerDialogVisible = false
} else if (code === 2) {
this.dialogHeight = event.data.params.data
this.setIframeHeight(document.getElementById('iframe'))
}
},
closeIt() {
this.url = ''
this.centerDialogVisible = false
},
setIframeHeight(iframe) {
iframe.height = this.dialogHeight
},
flowRecord(row) {
this.centerDialogVisible = true
var params = {
deployId: row.procDefId,
procInsId: row.procInstId,
token: getStorage()
}
this.url = '/#/flow/flowRecordForBusiness?data=' + encodeURI((JSON.stringify(params)))
},
// //
clicksearchShow() { clicksearchShow() {
this.isSearchShow = !this.isSearchShow this.isSearchShow = !this.isSearchShow
@ -235,9 +271,9 @@ export default {
}, },
handlePrint(row) { handlePrint(row) {
req.createPdf({ sid: row.saleOrderSid, userName: window.sessionStorage.getItem('name') }).then((resp) => { req.createPdf({ sid: row.saleOrderSid, userName: window.sessionStorage.getItem('name') }).then((resp) => {
if (resp.success && resp.data.pdfPath !== '') { if (resp.success && resp.data !== '') {
var xhr = new XMLHttpRequest() var xhr = new XMLHttpRequest()
xhr.open('GET', process.env.VUE_APP_BASE_API + '/base/file/download?filePath=' + resp.data.pdfPath + '&outFileName=' + '销售订单', true) xhr.open('GET', process.env.VUE_APP_BASE_API + '/base/file/download?filePath=' + resp.data + '&outFileName=' + '销售订单', true)
xhr.setRequestHeader('token', getStorage()) xhr.setRequestHeader('token', getStorage())
xhr.responseType = 'blob' xhr.responseType = 'blob'
xhr.onload = function(e) { xhr.onload = function(e) {

Loading…
Cancel
Save