Commit 7475826a authored by 罗成兵's avatar 罗成兵

分配记录

parent ffdec3ad
NODE_ENV = dev
VUE_APP_BASE_URL = http://123.56.183.13:8083
VUE_APP_BASE_URL2 = 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'
import axios from 'axios'
import {message, notification} from 'ant-design-vue'
axios.defaults.timeout = 30000
axios.defaults.baseURL = process.env.VUE_APP_BASE_URL
axios.defaults.timeout = 30000;
axios.defaults.baseURL = process.env.VUE_APP_BASE_URL;
// axios.defaults.baseURL = ''
// type默认为form,如果要在请求体里传json,则传json,如果要上传文件,传file
......@@ -44,7 +44,7 @@ function fetch(url = '', params = {}, method = 'get', contentType = 'form', toke
}).then(function (response) {
if (response.data.code === 'BIZ.TOKEN_EXPIRATION') {
console.log('没有token接口返回')
window.top.postMessage({messageType:"LOGOUT"}, '*')
window.top.postMessage({messageType: "LOGOUT"}, '*')
return
}
if (response.data.code === 'BIZ.BUSSINESS_EXCEPTION') {
......
......@@ -78,9 +78,13 @@ export default {
return fetch(`/v1/folacin-admin/folacin-stock-record/query-ids`, params)
},
/*分配入库*/
fetchInStorageList(params) {//入库管理列表
fetchReceiveRecordList(params) {//入库管理列表
return fetch('/v1/folacin-admin/folacin-send-record/receive-record', params);
},
/*分配出库列表*/
fetchSendRecordList(params) {//入库管理列表
return fetch('/v1/folacin-admin/folacin-send-record/send-record', params);
},
/*出入库记录*/
fetchStockTransferList(params) {//查询出入库记录
return fetch('/v1/folacin-admin/folacin-stock-transfer', 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: 'sendRecord', name: '分配入库列表', component: () => import('@/views/indexComponent/distributionWarehousing/sendRecord.vue')},
//出入库记录
{path: 'stockTransfer', name: '出入库记录', component: () => import('@/views/indexComponent/stockTransfer/stockTransfer.vue')},
//叶酸申请管理
......
......@@ -55,8 +55,7 @@
created() {
//获取妇幼权限和登录基本信息
// document.cookie = 'bGNnd3lwdF9hdA=8f26b5cc-1d66-4b31-8b86-26d916209e1e;'//昆明市
document.cookie = 'bGNnd3lwdF9hdA=5028cd4d-4491-4351-9448-4b357d8f1591;'//云南省
document.cookie = 'bGNnd3lwdF9hdA=e9a6025f-09d8-4181-acea-3232f53105a6;'//云南省
let cookieToken = getCookie('bGNnd3lwdF9hdA')
if (cookieToken) {//根据cookie获取token并调用接口获取菜单并设置初始选中菜单
window.sessionStorage.setItem('token','bearer'+' ' + cookieToken);
......@@ -65,7 +64,7 @@
// window.sessionStorage.setItem('menuList', JSON.stringify(data.menuList));
window.sessionStorage.setItem('userInfo', JSON.stringify(data.userInfo));
window.sessionStorage.setItem('allEnum', JSON.stringify(data.enumValueList))
this.setInitMenuInfo()
this.setInitMenuInfo();
this.showChildren = true
})
} else {
......
<template>
<div>
<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>
</div>
</template>
<script>
export default {
name: "commonCode",
methods: {
searchList() {
},
downloadExcel() {
},
restSearchForm() {
}
}
}
</script>
<style scoped>
</style>
......@@ -2,28 +2,51 @@
<div>
<a-range-picker
format="YYYY-MM-DD"
:ranges="{ '今天': [moment(), moment()], '本月': [moment().startOf('month'), moment().endOf('month')]}"
@change="onChange"
value-format="YYYY-MM-DD"
v-model="dateInner"
:ranges="ranges"
/>
</div>
</template>
<script>
import moment from 'moment';
export default {
name: "dateRangePicker",
props: {
date: {
type: Array,
}
},
created() {
let ranges = {
'今天': [moment(), moment()],
'本周': [moment().add(-7, 'days'), moment()],
'本月': [moment().startOf('month'), moment().endOf('month')],
'近三个月': [moment().add(-90, 'days'), moment()],
'近半年': [moment().add(-180, 'days'), moment()],
'近一年': [moment().add(-365, 'days'), moment()],
}
this.ranges=ranges;
},
data() {
return {
date:[],
dateInner: this.date,
ranges: {}
};
},
methods: {
moment,
onChange(dates, dateStrings) {
this.date=dateStrings;
this.$emit('input', dateStrings);
watch: {
dateInner(val) {
this.$emit('update:date', val)
},
date(val) {
this.dateInner = val
}
},
methods: {
moment,
}
}
</script>
......
......@@ -41,8 +41,8 @@
this.$emit('getList');
},
pageChange(pageNum, pageSize) {
this.pagination.pageIndex = pageNum;
this.pagination.pageSize = pageSize;
this.paginations.pageIndex = pageNum;
this.paginations.pageSize = pageSize;
this.$emit('input', this.paginations);
this.$emit('getList');
},
......
......@@ -2,20 +2,22 @@
<template>
<div class="distributionWarehousing">
<a-form layout="inline" class="search_form">
<a-form-item label="入库状态">
<a-select v-model="searchForm.factoryId" placeholder="请选择" style="width: 250px">
<a-form-item label="接收状态">
<a-select v-model="searchForm.status" placeholder="请选择" style="width: 250px">
<a-select-option value="">全部</a-select-option>
<a-select-option v-for="item in allFactoryInfo" :key="item.id" :value="item.id">
{{item.factoryName}}
<a-select-option v-for="item in statusList" :key="item.enumValue" :value="item.enumValue">
{{item.enumName}}
</a-select-option>
</a-select>
</a-form-item>
<a-form-item label="入库日期">
<a-date-picker v-model="searchForm.produceDate" format="YYYY-MM-DD" style="width: 250px"
/>
<date-range-picker :date.sync="searchForm.date"></date-range-picker>
</a-form-item>
<a-button class="search_btn" style="float: right;margin-left: 10px" @click="restSearchForm">清空</a-button>
<a-button type="primary" class="search_btn" style="float: right" @click="searchList">搜索</a-button>
<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>
<div style="clear: both"></div>
</a-form>
......@@ -36,23 +38,14 @@
<a-button type="link" size="small" @click="toAdd(record)">入库</a-button>
</template>
</a-table>
<a-pagination
v-if="pagination.total > 0"
:total="pagination.total"
show-size-changer
show-quick-jumper
v-model="pagination.pageIndex"
:page-size="pagination.pageSize"
:page-size-options="pagination.pageSizeOptions"
@showSizeChange="showSizeChange"
@change="change"
:showTotal="() => `共 ${pagination.total} 条`"
/>
<myPagination v-model="pagination" :pagination="pagination" @getList="getReceiveRecord"></myPagination>
</div>
</template>
<script>
import {isEmptyParams} from "../../utils/common";
import moment from 'moment'
import myPagination from "../../components/myPagination";
import dateRangePicker from "../../components/dateRangePicker";
const columns = [
{
title: '发放单位',
......@@ -61,23 +54,23 @@
},
{
title: '供应商名称',
dataIndex: 'typeName',
dataIndex: 'supplierName',
ellipsis: true
},
{
title: '品牌',
dataIndex: 'medicineName',
dataIndex: 'brandName',
ellipsis: true
},
{
title: '批次号',
width: '120px',
dataIndex: 'factoryName',
dataIndex: 'batchNumber',
ellipsis: true
},
{
title: '生产日期',
dataIndex: 'batchNumber',
dataIndex: 'produceDate',
ellipsis: true
},
{
......@@ -87,7 +80,7 @@
},
{
title: '单价(元)',
dataIndex: 'isHistoryName',
dataIndex: 'unitPrice',
ellipsis: true
},
{
......@@ -97,12 +90,12 @@
},
{
title: '分配数量',
dataIndex: 'stockNum',
dataIndex: 'sendNum',
ellipsis: true
},
{
title: '入库状态',
dataIndex: 'isHistoryName',
title: '接收状态',
dataIndex: 'statusName',
ellipsis: true
},
{
......@@ -114,7 +107,7 @@
},
]
export default {
components: {},
components: {myPagination, dateRangePicker},
data() {
return {
// 搜索框对象
......@@ -124,7 +117,7 @@
factoryId: '',
produceDate: undefined
},
allFactoryInfo: [],
statusList: [],
pagination: {
pageIndex: 1,
pageSize: 10,
......@@ -138,27 +131,16 @@
}
},
created() {
this.getInStorageList()
this.getAllFactory()
let allEnum = JSON.parse(sessionStorage.getItem("allEnum"));
this.statusList = allEnum["folacin_stock_record_status"];
this.getReceiveRecord()
},
methods: {
getAllSupply() {
let par= {}
this.$api.common.fetchAllSupply(par).then(({data = []}) => {
this.allSupplyInfo = data
})
},
getAllFactory() {
let par = {}
this.$api.common.fetchAllFactory(par).then(({data = []}) => {
this.allFactoryInfo = data
})
},
searchList() {
this.pagination.pageIndex = 1
this.getInStorageList()
this.getReceiveRecord()
},
getInStorageList() {
getReceiveRecord() {
this.loading = true
let pars = isEmptyParams(this.searchForm)
let par = {
......@@ -166,7 +148,7 @@
pageIndex: this.pagination.pageIndex,
pageSize: this.pagination.pageSize
}
this.$api.stockManage.fetchInStorageList(par).then(({data = {}}) => {
this.$api.stockManage.fetchReceiveRecordList(par).then(({data = {}}) => {
const {dataList = [], total = 0} = data
this.tableData = dataList
this.pagination.total = total
......@@ -175,17 +157,6 @@
this.loading = false
})
},
// 分页
showSizeChange(pageNum, pageSize) {
this.pagination.pageIndex = 1;
this.pagination.pageSize = pageSize;
this.getInStorageList()
},
change(pageNum, pageSize) {
this.pagination.pageIndex = pageNum;
this.pagination.pageSize = pageSize;
this.getInStorageList()
},
restSearchForm() {
this.searchForm = {
breedId: undefined,
......@@ -194,6 +165,9 @@
produceDate: undefined
}
this.searchList()
},
downloadExcel(){
},
toDetail(record) {
this.$router.push({path:'/distributionWarehousing/detail', query: record})
......
<!--分配入库-->
<template>
<div class="sendRecord">
<a-form layout="inline" class="search_form">
<a-form-item label="收货状态">
<a-select v-model="searchForm.status" placeholder="请选择" style="width: 250px">
<a-select-option value="">全部</a-select-option>
<a-select-option v-for="item in statusList" :key="item.enumValue" :value="item.enumValue">
{{item.enumName}}
</a-select-option>
</a-select>
</a-form-item>
<a-form-item label="发货日期">
<dateRangePicker :date.sync="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>
<div style="clear: both"></div>
</a-form>
<div style="clear: both"></div>
<a-table :dataSource="tableData"
:columns="columns"
rowKey="id"
:loading="loading"
:pagination="false"
>
<template slot="statusName" slot-scope="record">
<a-button type="link" size="small" @click="toDetail(record.statusName)">{{record.statusName}}</a-button>
</template>
<a-table
slot="expandedRowRender"
slot-scope="record"
:columns="innerColumns"
:data-source="record.detailedList"
:pagination="false"
>
</a-table>
</a-table>
<myPagination v-model="pagination" :pagination="pagination" @getList="getSendRecord"></myPagination>
</div>
</template>
<script>
import myPagination from '../../components/myPagination'
import dateRangePicker from '../../components/dateRangePicker'
import {isEmptyParams} from "../../utils/common";
import moment from 'moment';
const columns = [
{
title: '收货单位',
dataIndex: 'sendUnitName',
ellipsis: true
},
{
title: '发货人',
dataIndex: 'sendContact',
ellipsis: true
},
{
title: '发货人电话',
dataIndex: 'sendPhone',
ellipsis: true
},
{
title: '发货日期',
dataIndex: 'sendDate',
ellipsis: true
},
{
title: '收货人',
dataIndex: 'receiver',
ellipsis: true
},
{
title: '收货人电话',
dataIndex: 'receivePhone',
ellipsis: true
},
{
title: '收货时间',
dataIndex: 'receiveDate',
ellipsis: true
},
{
title: '收货状态',
scopedSlots: {customRender: 'statusName'},
ellipsis: true
},
{
title: '备注',
dataIndex: 'remarks',
ellipsis: true
},
];
const innerColumns = [
{
title: '供应商名称',
dataIndex: 'supplierName',
ellipsis: true
},
{
title: '品牌',
dataIndex: 'brandName',
ellipsis: true
},
{
title: '批次号',
width: '120px',
dataIndex: 'batchNumber',
ellipsis: true
},
{
title: '生产日期',
dataIndex: 'produceDate',
ellipsis: true
},
{
title: '有效期',
width: '120px',
dataIndex: 'expireDate',
},
{
title: '分配数量',
dataIndex: 'sendNum',
ellipsis: true
},
];
export default {
name: "sendRecord",
components: {myPagination, dateRangePicker},
data() {
return {
// 搜索框对象
searchForm: {
breedId: undefined,
medicalName: '',
factoryId: '',
date:[],
produceDate: undefined
},
statusList: [],
pagination: {
pageIndex: 1,
pageSize: 10,
total: 0,
pageSizeOptions: ['10', '20', '30', '40', '50'],
},
columns,
innerColumns,
tableData: [],
loading: false,
allSupplyInfo: [],
}
},
created() {
},
mounted() {
let allEnum = JSON.parse(sessionStorage.getItem("allEnum"));
this.statusList = allEnum["folacin_stock_record_status"];
this.getSendRecord()
},
methods: {
searchList() {
this.pagination.pageIndex = 1
this.getSendRecord()
},
getSendRecord() {
this.loading = true
let pars = isEmptyParams(this.searchForm)
let par = {
...pars,
startDate: this.searchForm.date[0],
endDate: this.searchForm.date[1],
pageIndex: this.pagination.pageIndex,
pageSize: this.pagination.pageSize
}
this.$api.stockManage.fetchSendRecordList(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 = {
breedId: undefined,
medicalName: '',
factoryId: '',
produceDate: undefined,
date:[]
}
this.searchList()
},
downloadExcel() {
},
},
}
</script>
<style lang="less" scoped>
// 文件上传样式
.ant-upload-select-picture-card i {
font-size: 32px;
color: #999;
}
.ant-upload-select-picture-card .ant-upload-text {
margin-top: 6px;
color: #666;
}
.btn_space {
margin-right: 5px;
}
</style>
......@@ -196,7 +196,7 @@
// 获取当前单位的下级单位
getChildUnitList() {
let params = {}
this.childUnitList = [{id:1, unitName:'gcl'}]
this.childUnitList = [{id:16625, unitName:'gcl'}]
// this.$api.common.fetchMaterialDisUnitInfo(params).then(({code, data}) => {
// if (code === 'SUCCESS') {
// this.childUnitList = data;
......
......@@ -26,7 +26,7 @@
</a-select>
</a-form-item>
<a-form-item label="出库/入库日期">
<dateRangePicker v-model="searchForm.date"></dateRangePicker>
<dateRangePicker :date.sync="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>
......
......@@ -37,6 +37,19 @@ export const menuTest = [{
"frontActionUrl": '/Home/folviteDistribution',
"backRequestMode": null,
"isGray": 1,
}, {
"id": 1544,
"parentId": 1536,
"systemId": 3,
"name": "分配记录",
"code": "sendRecord",
"icon": "file-sync",
"description": "分配记录",
"valid": 1,
"sortCode": 4,
"type": 1,
"frontActionUrl": "/Home/sendRecord",
"children": []
}, {
"id": 1539,
"parentId": 1536,
......
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