Browse Source

完善分公司间调账、采购退库

master
yunuo970428 1 week ago
parent
commit
5e4e01e17c
  1. 7
      anrui-scm/anrui-scm-ui/src/api/supplychain/purchasereturntowarehouse.js
  2. 10
      anrui-scm/anrui-scm-ui/src/api/supplychain/tiaozhangshenqing.js
  3. 35
      anrui-scm/anrui-scm-ui/src/views/supplychain/caigoutuiku/caigoutuiku.vue
  4. 38
      anrui-scm/anrui-scm-ui/src/views/supplychain/tiaozhangshenqingguanli/tiaozhangshenqingguanli.vue

7
anrui-scm/anrui-scm-ui/src/api/supplychain/purchasereturntowarehouse.js

@ -21,6 +21,13 @@ export default {
params: data
})
},
createPdf: function(data) {
return request({
url: '/scm/v1/scmvehiclereturn/createPdf',
method: 'post',
params: data
})
},
// 新增、修改保存数据
save: function(data) {
return request({

10
anrui-scm/anrui-scm-ui/src/api/supplychain/tiaozhangshenqing.js

@ -20,6 +20,14 @@ export function delBySids(data) {
})
}
export function createPdf(data) {
return request({
url: '/base/v1/baseaccadjapply/createPdf',
method: 'post',
params: data
})
}
// 保存
export function save(data) {
return request({
@ -34,7 +42,7 @@ export function save(data) {
export function fetchDetailsBySid(data) {
return request({
url: '/base/v1/baseaccadjapply/fetchDetailsBySid/' + data,
method: 'get',
method: 'get'
})
}

35
anrui-scm/anrui-scm-ui/src/views/supplychain/caigoutuiku/caigoutuiku.vue

@ -35,11 +35,11 @@
<el-table v-loading="tableLoading" :data="dataList" border style="width: 100%" @selection-change="handleSelectionChange">
<el-table-column width="50" type="selection" align="center"/>
<el-table-column width="80" label="序号" type="index" :index="indexMethod" align="center"/>
<el-table-column width="150" label="操作" align="center">
<el-table-column width="180" label="操作" align="center">
<template slot-scope="scope">
<el-button :disabled="scope.row.nodeState =='发起申请' ? false : scope.row.nodeState == '待提交' ? false : true" type="primary" size="small" @click="tohandle(scope.row)">办理
</el-button>
<el-button type="primary" size="small" @click="toInfo(scope.row)">查看</el-button>
<el-button :disabled="scope.row.nodeState =='发起申请' ? false : scope.row.nodeState == '待提交' ? false : true" type="primary" size="mini" @click="tohandle(scope.row)">办理</el-button>
<el-button type="primary" size="mini" v-if="scope.row.nodeState =='已办结'" @click="toDownload(scope.row)">下载</el-button>
<el-button type="primary" size="mini" @click="toInfo(scope.row)">查看</el-button>
</template>
</el-table-column>
<el-table-column label="状态" header-align="center">
@ -83,6 +83,7 @@ import divAdd from './caigoutuikuAdd'
import divInfo from './caigoutuikuInfo'
import { getStorage } from '@/utils/auth'
import { selectHaveMessage } from '@/api/cheliang/dictcommons'
import {createPdf} from "@/api/supplychain/tiaozhangshenqing";
export default {
name: 'caigoutuiku',
@ -222,6 +223,32 @@ export default {
const sid = row.sid
this.$refs['divadd'].showEdit(sid)
},
toDownload(row) {
req.createPdf({ sid: row.sid, userName: window.sessionStorage.getItem('name') }).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()
}
}).catch(() => {})
},
toInfo(row) {
this.viewState = 4
console.log('这是打开详情接口', row)

38
anrui-scm/anrui-scm-ui/src/views/supplychain/tiaozhangshenqingguanli/tiaozhangshenqingguanli.vue

@ -48,11 +48,11 @@
<el-table v-loading="tableLoading" :data="dataList" border style="width: 100%" @selection-change="handleSelectionChange">
<el-table-column width="50px" fixed type="selection" align="center"/>
<el-table-column width="80px" fixed label="序号" type="index" :index="indexMethod" align="center"/>
<el-table-column label="操作" fixed align="center" width="160px" class-name="small-padding fixed-width">
<template slot-scope="{row}"><!-- v-show="row.showInspectedBtn" -->
<el-button size="mini" type="primary" :disabled="row.nodeState == '待提交' ? false:row.nodeState == '调账申请'?false : true" @click="handleEdit(row)">办理
</el-button>
<el-button size="mini" type="primary" @click="handleCheck(row)">查看</el-button>
<el-table-column label="操作" fixed align="center" width="180" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button size="mini" type="primary" :disabled="scope.row.nodeState == '待提交' ? false: scope.row.nodeState == '调账申请' ? false : true" @click="handleEdit(scope.row)">办理</el-button>
<el-button type="primary" size="mini" v-if="scope.row.nodeState =='已办结'" @click="toDownload(scope.row)">下载</el-button>
<el-button size="mini" type="primary" @click="handleCheck(scope.row)">查看</el-button>
</template>
</el-table-column>
<el-table-column width="140px" prop="nodeState" label="状态" align="left" header-align="center">
@ -92,7 +92,7 @@ import Pagination from '@/components/pagination'
import pageye from '@/components/pagination/pageye'
import tiaozhangshenqingguanliAdd from '@/views/supplychain/tiaozhangshenqingguanli/tiaozhangshenqingguanliAdd'
import tiaozhangshenqingguanliInfo from '@/views/supplychain/tiaozhangshenqingguanli/tiaozhangshenqingguanliInfo'
import { listPage, delBySids } from '@/api/supplychain/tiaozhangshenqing.js'
import { listPage, delBySids, createPdf } from '@/api/supplychain/tiaozhangshenqing.js'
import { getOrgSidByPath, getListOrg, typeValues, selectHaveMessage } from '@/api/cheliang/dictcommons'
import { getStorage } from '@/utils/auth'
@ -260,6 +260,32 @@ export default {
this.viewState = 2
this.$refs['divadd'].showEdit(row)
},
toDownload(row) {
createPdf({ sid: row.sid, userName: window.sessionStorage.getItem('name') }).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()
}
}).catch(() => {})
},
handleCheck(row) {
this.$refs['divinfo'].showInfo(row)
console.log('详情回显', row)

Loading…
Cancel
Save