Commit 928fec35 authored by gengchunlei's avatar gengchunlei

Merge branch 'gcl' of http://gitlab.yiboshi.com/ynby/folacin-front into gcl

parents 5f50021b ffdec3ad
......@@ -81,6 +81,14 @@ export default {
fetchInStorageList(params) {//入库管理列表
return fetch('/v1/folacin-admin/folacin-send-record/receive-record', params);
},
/*出入库记录*/
fetchStockTransferList(params) {//查询出入库记录
return fetch('/v1/folacin-admin/folacin-stock-transfer', params);
},
/*入库管理*/
fetchStockList(params) {//入库管理列表
return fetch('/stock-info/v1/stock-info/stock-send-record/receive-order', params);
},
fetchTemplateByMedicalType(params) {//根据分类获取药具检查验收模板
return fetch(`/basic-info/v1/basic-info/basic-template/query-breed/${params.breedId}`, params)
},
......
......@@ -26,6 +26,8 @@ const routes = [
{path: 'folviteDistribution', name: '叶酸发放登记列表', component: () => import('@/views/indexComponent/folviteDistribution/folviteDistribution.vue')},
//分配入库
{path: 'distributionWarehousing', name: '分配入库列表', component: () => import('@/views/indexComponent/distributionWarehousing/distributionWarehousing.vue')},
//出入库记录
{path: 'stockTransfer', name: '出入库记录', component: () => import('@/views/indexComponent/stockTransfer/stockTransfer.vue')},
//叶酸申请管理
{path: 'folviteApply', name: '叶酸申请管理', component: () => import('@/views/indexComponent/folviteApply/folviteApply.vue')},
//知情同意书管理
......@@ -44,9 +46,9 @@ const routes = [
//分配入库
{path: '/distributionWarehousing/add', name: '分配入库', component: () => import('@/views/indexComponent/distributionWarehousing/components/addDistributionWarehousing.vue')},
{path: '/distributionWarehousing/detail', name: '分配入库详情', component: () => import('@/views/indexComponent/distributionWarehousing/components/distributionWarehousingDetail.vue')},
//叶酸申请管理
//叶酸申请管理
{path: '/folviteApply/grant', name: '叶酸申请发放', component: () => import('@/views/indexComponent/folviteApply/components/folviteApplyGrant.vue')},
//供应商管理
//供应商管理
{path: '/supplyManage/add', name: '新增供应商', component: () => import('@/views/indexComponent/supplyManage/components/addSupply.vue')},
]
......
<template>
<div>
<a-range-picker
format="YYYY-MM-DD"
:ranges="{ '今天': [moment(), moment()], '本月': [moment().startOf('month'), moment().endOf('month')]}"
@change="onChange"
/>
</div>
</template>
<script>
import moment from 'moment';
export default {
name: "dateRangePicker",
data() {
return {
date:[],
};
},
methods: {
moment,
onChange(dates, dateStrings) {
this.date=dateStrings;
this.$emit('input', dateStrings);
},
},
}
</script>
<style scoped>
</style>
<template>
<a-pagination
:total="paginations.total"
show-size-changer
show-quick-jumper
v-model="paginations.pageIndex"
:page-size="paginations.pageSize"
:page-size-options="paginations.pageSizeOptions"
@showSizeChange="showSizeChange"
@change="pageChange"
:showTotal="() => `共 ${paginations.total} 条`"
/>
</template>
<script>
/**
* 分页组件
*/
export default {
name: "myPagination",
props: ["pagination"],
data() {
return {
paginations: {
pageIndex: 1,
pageSize: 10,
total: 0,
pageSizeOptions: ['10', '20', '30', '40', '50'],
},
}
},
mounted() {
this.paginations = this.pagination;
},
methods: {
// 分页
showSizeChange(pageNum, pageSize) {
this.paginations.pageIndex = 1;
this.paginations.pageSize = pageSize;
this.$emit('input', this.paginations);
this.$emit('getList');
},
pageChange(pageNum, pageSize) {
this.pagination.pageIndex = pageNum;
this.pagination.pageSize = pageSize;
this.$emit('input', this.paginations);
this.$emit('getList');
},
}
}
</script>
<style scoped>
</style>
......@@ -43,15 +43,15 @@
}
},
created() {
},
mounted() {
let vm = this;
this.$api.common.fetchConsentInfo().then(res => {
if (res.code == 'SUCCESS') {
if (isBlank(res.data)) {
this.modeType = 'add';
} else {
setTimeout(function () {
vm.$refs.baiduEditor.setContent(res.data.content,false)
},500);
vm.$refs.baiduEditor.setContent(res.data.content, false)
this.formData.content = res.data.content;
this.formData.id = res.data.id;
}
......
<template>
<div class="stockTransfer">
<a-form layout="inline" class="search_form">
<a-form-item label="供应商名称">
<a-select v-model="searchForm.supplierId" placeholder="请选择" style="width: 250px">
<a-select-option value="">全部</a-select-option>
<a-select-option v-for="item in allSupplyInfo" :key="item.id" :value="item.id">
{{item.supplierName}}
</a-select-option>
</a-select>
</a-form-item>
<a-form-item label="品牌">
<a-select v-model="searchForm.brandId" placeholder="请选择" style="width: 250px">
<a-select-option value="">全部</a-select-option>
<a-select-option v-for="item in brandList" :key="item.enumValue" :value="item.enumValue">
{{item.enumName}}
</a-select-option>
</a-select>
</a-form-item>
<a-form-item label="类型">
<a-select v-model="searchForm.stockType" placeholder="请选择" style="width: 250px">
<a-select-option value="">全部</a-select-option>
<a-select-option v-for="item in stockTypeList" :key="item.enumValue" :value="item.enumValue">
{{item.enumName}}
</a-select-option>
</a-select>
</a-form-item>
<a-form-item label="出库/入库日期">
<dateRangePicker v-model="searchForm.date"></dateRangePicker>
</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-form>
<div style="clear: both"></div>
<div style="clear: both"></div>
<a-table :dataSource="tableData"
:columns="columns"
rowKey="id"
:loading="loading"
:pagination="false"
>
<template slot="produceDateS" slot-scope="record">
{{record.produceDate | formatDate}}
</template>
<template slot="expireDateS" slot-scope="record">
{{record.expireDate | formatDate}}
</template>
</a-table>
<myPagination v-model="pagination" :pagination="pagination" @getList="getStockTransferList"></myPagination>
</div>
</template>
<script>
import {isNotBlank, isEmptyParams} from "../../utils/common";
import dateRangePicker from '../../components/dateRangePicker';
import myPagination from '../../components/myPagination'
import moment from 'moment'
const columns = [
{
title: '供应商名称',
dataIndex: 'supplierName',
ellipsis: true
},
{
title: '品牌',
dataIndex: 'brandName',
ellipsis: true
},
{
title: '批次号',
width: '120px',
dataIndex: 'batchNumber',
ellipsis: true
},
{
title: '生产日期',
dataIndex: 'produceDate',
scopedSlots: {customRender: 'produceDateS'},
},
{
title: '有效期',
width: '120px',
scopedSlots: {customRender: 'expireDateS'},
},
{
title: '数量',
dataIndex: 'number',
ellipsis: true
},
{
title: '出库/入库',
dataIndex: 'stockTypeName',
ellipsis: true
},
{
title: '分类',
dataIndex: 'classifyName',
ellipsis: true
},
{
title: '出库/入库日期',
dataIndex: 'operateDate',
ellipsis: true
}
];
export default {
name: "stockTransfer",
components: {dateRangePicker, myPagination},
data() {
return {
// 搜索框对象
searchForm: {
supplierId: '',
brandId: '',
stockType: '',
date: []
},
pagination: {
pageIndex: 1,
pageSize: 10,
total: 0,
pageSizeOptions: ['10', '20', '30', '40', '50'],
},
columns,
tableData: [],
loading: false,
allSupplyInfo: [],
brandList: [],
stockTypeList: []
}
},
created() {
this.getStockTransferList();
this.getAllSupply();
let allEnum = JSON.parse(sessionStorage.getItem("allEnum"));
this.brandList = allEnum["folacin_stock_record_brand_id"];
this.stockTypeList = allEnum["folacin_stock_transfer_stock_type"];
},
methods: {
getAllSupply() {
let par = {}
this.$api.common.fetchAllSupply(par).then(({data = []}) => {
this.allSupplyInfo = data
})
},
searchList() {
this.pagination.pageIndex = 1;
this.getStockTransferList()
},
getStockTransferList() {
this.loading = true;
let date = this.searchForm.date;
let pars = isEmptyParams(this.searchForm);
let par = {
...pars,
startDate: date[0],
endDate: date[1],
pageIndex: this.pagination.pageIndex,
pageSize: this.pagination.pageSize
}
this.$api.stockManage.fetchStockTransferList(par).then(({data = {}}) => {
const {dataList = [], total = 0} = data;
this.tableData = dataList;
this.pagination.total = total;
this.loading = false
}).catch(() => {
this.loading = false
})
},
restSearchForm() {
this.searchForm = {
brandId: '',
supplierId: '',
date: [],
stockType: ''
}
this.searchList()
},
downloadExcel() {
this.$message.warning("拼命开发中......")
},
},
}
</script>
<style lang="less" scoped>
.btn_space {
margin-right: 5px;
}
</style>
......@@ -57,6 +57,26 @@ export const menuTest = [{
"backRequestMode": null,
"isGray": 1,
"children": []
},{
"id": 1543,
"parentId": 1536,
"systemId": 3,
"name": "出入库记录",
"code": "stockTransfer",
"icon": "file-sync",
"description": "出入库记录",
"valid": 1,
"sortCode": 3,
"type": 1,
"createTime": "2021-05-20 15:57:11",
"createUser": null,
"updateTime": "2021-06-18 17:48:44",
"updateUser": null,
"backActionUrl": null,
"frontActionUrl": "/Home/stockTransfer",
"backRequestMode": null,
"isGray": 1,
"children": []
}, {
"id": 1540,
"parentId": 1536,
......@@ -96,7 +116,7 @@ export const menuTest = [{
"backRequestMode": null,
"isGray": 1,
},{
"id": 1541,
"id": 1542,
"parentId": 1536,
"systemId": 3,
"name": "供应商管理",
......
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