Commit b1d7d12f authored by 罗成兵's avatar 罗成兵

分配记录

parent 9fcd00f3
NODE_ENV = dev
VUE_APP_BASE_URL = http://123.56.183.13:8083
VUE_APP_BASE_URL2 = http://127.0.0.1:8082
VUE_APP_BASE_URL1 = http://123.56.183.13:8083
VUE_APP_BASE_URL = http://127.0.0.1:8082
VUE_APP_BASE_PATH = https://beta-yac.yiboshi.com
VUE_APP_KEY_WORD = 'XwKsGlMcdPMEhR1B'
NODE_ENV = test
VUE_APP_BASE_URL = https://beta-yjservice.yiboshi.com
VUE_APP_BASE_URL = http://123.56.183.13:8083
VUE_APP_BASE_PATH = https://beta-yac.yiboshi.com
VUE_APP_KEY_WORD = 'XwKsGlMcdPMEhR1B'
import axios from 'axios';
let downInstanceSet = axios.create({
baseURL: process.env.VUE_APP_BASE_URL,
timeout: 60000,
withCredentials: true,
responseType: 'blob'
})
/*为请求添加请求头中的token和请求所需参数userid*/
downInstanceSet.interceptors.request.use(config => {
if (sessionStorage.token) {
config.headers.Authorization = sessionStorage.getItem('token');
if (typeof (config.params) == "undefined") {
config.params = {}
}
}
return config;//赋值完后把config返回回去
}, error => {
// 请求错误后把我们的error返回回去
return Promise.reject(error);
})
//响应拦截器
downInstanceSet.interceptors.response.use(
response => {
let blob = new Blob([response.data], {type: "application/vnd.ms-excel"});
let downloadElement = document.createElement('a')
let url = window.URL.createObjectURL(blob);
downloadElement.href = url;
downloadElement.download = decodeURI(response.headers.filename); //下载后文件名
document.body.appendChild(downloadElement);
downloadElement.click(); //点击下载
document.body.removeChild(downloadElement); //下载完成移除元素
window.URL.revokeObjectURL(url); //释放blob对象
return true;
});
export const downInstance=downInstanceSet;
import fetch from './fetch'
import {downInstance} from './downLoad'
export default {
// 公共接口
......@@ -94,7 +95,7 @@ export default {
},
/*确认入库*/
fetchReceiveConfirm(params) {
return fetch(`/v1/folacin-admin/folacin-send-record/receive/`,params);
return fetch(`/v1/folacin-admin/folacin-send-record/receive/`, params);
},
/*分配出库列表*/
fetchSendRecordList(params) {//入库管理列表
......@@ -189,10 +190,10 @@ export default {
fetchFolviteDistributionList(params) {//叶酸发放登记列表
return fetch('/v1/folacin-admin/folacin-resident-info/grant-page', params)
},
fetchAddFolviteDistribution(params) {//叶酸发放
return fetch('/v1/folacin-admin/folacin-resident-info/direct-grant', params,'post', 'json')
fetchAddFolviteDistribution(params) {//叶酸发放
return fetch('/v1/folacin-admin/folacin-resident-info/direct-grant', params, 'post', 'json')
},
fetchFolviteDistributionDetail(params) {//叶酸发放查看详情
fetchFolviteDistributionDetail(params) {//叶酸发放查看详情
return fetch(`/v1/folacin-admin/folacin-resident-info/grant-details/${params.residentId}`)
},
},
......@@ -253,6 +254,11 @@ export default {
return fetch('/v1/folacin-admin/sys-login/getLoginInfo', params);
},
},
download: {
stockRecord(params) {//下载库存信息
downInstance.get(`/v1/folacin-admin/folacin-stock-record/download`, {params});
}
},
//常用工具
utils: {
//直接下载文件,不让浏览器直接打开
......
<template>
<div>
<a-button type="primary" icon="plus" style="float: right" @click="downloadExcel">新增</a-button>
<a-button type="primary" icon="download" style="float: right" @click="downloadExcel">导出Excel</a-button>
<a-button type="primary" class="search_btn" icon="search" @click="searchList">搜索</a-button>
<a-button style="margin-left: 10px" icon="close" @click="restSearchForm">清空</a-button>
......
......@@ -15,9 +15,9 @@
</a-form-item>
<a-button type="primary" class="search_btn" icon="search" @click="searchList">搜索</a-button>
<a-button class="search_btn" style="margin-left: 10px" icon="close" @click="restSearchForm">清空</a-button>
<a-button type="primary" class="search_btn" icon="download" style="float: right" @click="downloadExcel">
导出Excel
</a-button>
<!-- <a-button type="primary" class="search_btn" icon="download" style="float: right" @click="downloadExcel">-->
<!-- 导出Excel-->
<!-- </a-button>-->
<div style="clear: both"></div>
</a-form>
......
......@@ -15,9 +15,9 @@
</a-form-item>
<a-button type="primary" class="search_btn" icon="search" @click="searchList">搜索</a-button>
<a-button class="search_btn" style="margin-left: 10px" icon="close" @click="restSearchForm">清空</a-button>
<a-button type="primary" class="search_btn" icon="download" style="float: right" @click="downloadExcel">
导出Excel
</a-button>
<!-- <a-button type="primary" class="search_btn" icon="download" style="float: right" @click="downloadExcel">-->
<!-- 导出Excel-->
<!-- </a-button>-->
<div style="clear: both"></div>
</a-form>
......
......@@ -11,11 +11,11 @@
</a-form-item>
<a-form-item label="女方姓名">
<!--v-price="{digit:4}"-->
<a-input v-model="searchForm.medicalName" placeholder="请输入女方姓名" style="width: 250px"></a-input>
<a-input v-model="searchForm.womanName" placeholder="请输入女方姓名" style="width: 250px"></a-input>
</a-form-item>
<a-form-item label="联系电话">
<!--v-price="{digit:4}"-->
<a-input v-model="searchForm.medicalName" placeholder="请输入联系电话" style="width: 250px"></a-input>
<a-input v-model="searchForm.telephone" placeholder="请输入联系电话" style="width: 250px"></a-input>
</a-form-item>
<a-button type="primary" icon="search" class="search_btn" @click="searchList">搜索</a-button>
<a-button class="search_btn" icon="close" style="margin-left: 10px" @click="restSearchForm">清空</a-button>
......
......@@ -7,10 +7,10 @@
</a-form-item>
<a-form-item>
<!-- <a-button class="search_btn" @click="restSearchForm">读卡识别</a-button>-->
<a-button type="primary" class="search_btn" style="margin-left: 10px" @click="searchList">搜索</a-button>
<a-button class="search_btn" style="margin-left: 10px" @click="restSearchForm">清空</a-button>
<a-button type="primary" icon="search" class="search_btn" style="margin-left: 10px" @click="searchList">搜索</a-button>
<a-button class="search_btn" icon="close" style="margin-left: 10px" @click="restSearchForm">清空</a-button>
</a-form-item>
<a-button type="primary" class="search_btn" style="float: right" @click="toAdd">发放登记</a-button>
<a-button type="primary" icon="plus" class="search_btn" style="float: right" @click="toAdd">发放登记</a-button>
<div style="clear: both"></div>
</a-form>
<div style="margin-top: 16px;margin-bottom: 10px"></div>
......
......@@ -18,10 +18,20 @@
</a-select>
</a-form-item>
<a-form-item label="入库日期">
<a-date-picker v-model="searchForm.enterDate" format="YYYY-MM-DD" style="width: 250px"/>
<a-date-picker v-model="searchForm.enterDate" format="YYYY-MM-DD" style="width: 250px"/>
</a-form-item>
<a-button type="primary" class="search_btn" @click="searchList">搜索</a-button>
<a-button class="search_btn" style="margin-left: 10px" @click="restSearchForm">清空</a-button>
<a-button type="primary" icon="search" class="search_btn" @click="searchList">搜索</a-button>
<a-button class="search_btn" icon="close" style="margin-left: 10px" @click="restSearchForm">清空</a-button>
<div style="float: right">
<a-button type="primary" icon="plus" class="search_btn btn_space" @click="openModal">库存录入</a-button>
<a-button type="primary" icon="gift" class="search_btn btn_space"
:disabled="selectedRowKeys.length <= 0"
@click="toAdd">调拨分配
</a-button>
<a-button type="primary" icon="download" class="search_btn btn_space" @click="downLoadExcel">导出Excel
</a-button>
</div>
<div style="clear: both"></div>
</a-form>
......@@ -54,13 +64,13 @@
style="margin-left:10px;font-size: 10px"/> </span>
</a-popover>
</div>
<div style="margin-top: 16px;margin-bottom: 10px">
<a-button type="primary" class="search_btn btn_space" @click="openModal">库存录入</a-button>
<a-button type="primary" class="search_btn btn_space" :disabled="selectedRowKeys.length <= 0"
@click="toAdd">调拨分配
</a-button>
<a-button type="primary" class="search_btn btn_space">导出Excel</a-button>
</div>
<!-- <div style="margin-top: 16px;margin-bottom: 10px">-->
<!-- <a-button type="primary" class="search_btn btn_space" @click="openModal">库存录入</a-button>-->
<!-- <a-button type="primary" class="search_btn btn_space" :disabled="selectedRowKeys.length <= 0"-->
<!-- @click="toAdd">调拨分配-->
<!-- </a-button>-->
<!-- <a-button type="primary" class="search_btn btn_space">导出Excel</a-button>-->
<!-- </div>-->
<div style="clear: both"></div>
<a-table :dataSource="tableData"
......@@ -160,7 +170,7 @@
searchForm: {
brandName: '',
supplierId: '',
brandId:'',
brandId: '',
enterDate: undefined
},
pagination: {
......@@ -195,10 +205,9 @@
this.pagination.pageIndex = 1
this.getInStockList()
},
getInStockList() {
this.loading = true
getQueryParam() {
let pars = isEmptyParams(this.searchForm);
if (isNotBlank( pars.enterDate)){
if (isNotBlank(pars.enterDate)) {
pars.enterDate = moment(pars.enterDate).format('YYYY-MM-DD')
}
let par = {
......@@ -206,7 +215,12 @@
pageIndex: this.pagination.pageIndex,
pageSize: this.pagination.pageSize
}
this.$api.stockManage.fetchInStockList(par).then(({data = {}}) => {
return par;
},
getInStockList() {
this.loading = true
let pars = this.getQueryParam();
this.$api.stockManage.fetchInStockList(pars).then(({data = {}}) => {
const {dataList = [], total = 0} = data
this.tableData = dataList
this.pagination.total = total
......@@ -258,6 +272,10 @@
onSelectChange(selectedRowKeys) {
this.selectedRowKeys = selectedRowKeys;
},
downLoadExcel() {
let pars = this.getQueryParam();
this.$api.download.stockRecord(pars);
},
// 库存录入按钮
openModal() {
this.$router.push({path: '/inStock/add', query: {}})
......
......@@ -30,9 +30,9 @@
</a-form-item>
<a-button type="primary" class="search_btn" icon="search" @click="searchList">搜索</a-button>
<a-button class="search_btn" style="margin-left: 10px" icon="close" @click="restSearchForm">清空</a-button>
<a-button type="primary" class="search_btn" icon="download" style="float: right" @click="downloadExcel">
导出Excel
</a-button>
<!-- <a-button type="primary" class="search_btn" icon="download" style="float: right" @click="downloadExcel">-->
<!-- 导出Excel-->
<!-- </a-button>-->
</a-form>
<div style="clear: both"></div>
<div style="clear: both"></div>
......
......@@ -13,10 +13,10 @@
</a-select>
</a-form-item>
<a-form-item>
<a-button type="primary" class="search_btn" style="margin-left: 10px" @click="searchList">搜索</a-button>
<a-button class="search_btn" style="margin-left: 10px" @click="restSearchForm">清空</a-button>
<a-button type="primary" icon="search" class="search_btn" style="margin-left: 10px" @click="searchList">搜索</a-button>
<a-button class="search_btn" icon="close" style="margin-left: 10px" @click="restSearchForm">清空</a-button>
</a-form-item>
<a-button type="primary" class="search_btn" style="float: right" @click="toAdd">添加供应商</a-button>
<a-button type="primary" icon="plus" class="search_btn" style="float: right" @click="toAdd">添加供应商</a-button>
<div style="clear: both"></div>
</a-form>
<div style="margin-top: 16px;margin-bottom: 10px"></div>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment