Commit 2556a289 authored by 罗成兵's avatar 罗成兵

分配记录

parent 4a5f07d6
...@@ -28,6 +28,7 @@ ...@@ -28,6 +28,7 @@
rowKey="id" rowKey="id"
:loading="loading" :loading="loading"
:pagination="false" :pagination="false"
:scroll="{ x: 1}"
> >
<template slot="expireDateS" slot-scope="record"> <template slot="expireDateS" slot-scope="record">
{{record.expireDate | formatDate}} {{record.expireDate | formatDate}}
...@@ -56,7 +57,7 @@ ...@@ -56,7 +57,7 @@
{ {
title: '发放单位', title: '发放单位',
width:'200px', width:'200px',
dataIndex: 'sendNodeName', dataIndex: 'sendUnitName',
ellipsis: true ellipsis: true
}, },
// { // {
...@@ -67,52 +68,62 @@ ...@@ -67,52 +68,62 @@
{ {
title: '品牌', title: '品牌',
dataIndex: 'brandName', dataIndex: 'brandName',
ellipsis: true ellipsis: true,
width:'200px'
}, },
{ {
title: '批次号', title: '批次号',
dataIndex: 'batchNumber', dataIndex: 'batchNumber',
ellipsis: true ellipsis: true,
width:'200px'
}, },
{ {
title: '生产日期', title: '生产日期',
dataIndex: 'produceDate', dataIndex: 'produceDate',
ellipsis: true ellipsis: true,
width:'200px'
}, },
{ {
title: '有效期', title: '有效期',
width:'200px',
scopedSlots: {customRender: 'expireDateS'}, scopedSlots: {customRender: 'expireDateS'},
}, },
{ {
title: '单价(元)', title: '单价(元)',
dataIndex: 'unitPrice', dataIndex: 'unitPrice',
ellipsis: true ellipsis: true,
width:'200px'
}, },
{ {
title: '规格', title: '规格',
dataIndex: 'specs', dataIndex: 'specs',
ellipsis: true ellipsis: true,
width:'200px'
}, },
{ {
title: '分配数量', title: '分配数量',
dataIndex: 'sendNum', dataIndex: 'sendNum',
ellipsis: true ellipsis: true,
width:'200px'
}, },
{ {
title: '入库状态', title: '入库状态',
// dataIndex: 'statusName', // dataIndex: 'statusName',
// ellipsis: true, // ellipsis: true,
width:'200px',
scopedSlots: {customRender: 'statusNameInfo'}, scopedSlots: {customRender: 'statusNameInfo'},
}, },
{ {
title: '入库日期', title: '入库日期',
dataIndex: 'receiveDate', dataIndex: 'receiveDate',
ellipsis: true ellipsis: true,
width:'200px'
}, },
{ {
title: '操作', title: '操作',
align: 'center', align: 'center',
fixed: 'right', fixed: 'right',
width:'200px',
scopedSlots: {customRender: 'action'}, scopedSlots: {customRender: 'action'},
}, },
] ]
...@@ -217,7 +228,6 @@ ...@@ -217,7 +228,6 @@
.btn_space { .btn_space {
margin-right: 5px; margin-right: 5px;
} }
/*.search_form { /*.search_form {
margin-top: -17px; margin-top: -17px;
border: 1px solid rgba(255,77,128, .2); border: 1px solid rgba(255,77,128, .2);
......
...@@ -475,7 +475,7 @@ ...@@ -475,7 +475,7 @@
this.$api.common.fetchAreaByCode({areaCode: targetOption.areaCode}).then(({data = []}) => { this.$api.common.fetchAreaByCode({areaCode: targetOption.areaCode}).then(({data = []}) => {
targetOption.loading = false; targetOption.loading = false;
data.forEach(item => { data.forEach(item => {
item['isLeaf'] = false item['isLeaf'] = item.areaLevel >= 5;
}) })
if (targetOption.areaCode == 0) { if (targetOption.areaCode == 0) {
this.areaInfo = [...data] this.areaInfo = [...data]
......
...@@ -3,15 +3,15 @@ ...@@ -3,15 +3,15 @@
<a-spin tip="加载中..." :spinning="spinning"> <a-spin tip="加载中..." :spinning="spinning">
<div style="padding: 16px"> <div style="padding: 16px">
<div style="font-size: 18px;font-weight: 600"> <div style="font-size: 18px;font-weight: 600">
<span>调拨分配</span> <span>调拨分配</span>
</div> </div>
<a-form-model ref="formRef" :model="formData" :rules="formRules" :labelCol="{span: 7}" <a-form-model ref="formRef" :model="formData" :rules="formRules" :labelCol="{span: 7}"
:wrapperCol="{span: 15}"> :wrapperCol="{span: 15}">
<div style="margin: 30px 0px"> <div style="margin: 30px 0px">
<div class="divider_my"><span class="midText">分配信息</span></div> <div class="divider_my"><span class="midText">分配信息</span></div>
</div> </div>
<div style="clear: both"></div> <div style="clear: both"></div>
<div> <div>
<a-row> <a-row>
<a-col :span="8"> <a-col :span="8">
...@@ -54,10 +54,10 @@ ...@@ -54,10 +54,10 @@
</a-col> </a-col>
</a-row> </a-row>
</div> </div>
<div> <div>
<div class="divider_my"><span class="midText">分配详情</span></div> <div class="divider_my"><span class="midText">分配详情</span></div>
</div> </div>
<div style="clear: both"></div> <div style="clear: both"></div>
<a-table :dataSource="formData.detailedList" rowKey="id" :pagination="false" class="modal_table" <a-table :dataSource="formData.detailedList" rowKey="id" :pagination="false" class="modal_table"
bordered> bordered>
<a-table-column title="品牌" data-index="brandName"></a-table-column> <a-table-column title="品牌" data-index="brandName"></a-table-column>
...@@ -217,12 +217,14 @@ ...@@ -217,12 +217,14 @@
let params = {} let params = {}
let reviceUnitName = this.childUnitList.filter(item => item.id == this.formData.receiveUnitId)[0].unitName; let reviceUnitName = this.childUnitList.filter(item => item.id == this.formData.receiveUnitId)[0].unitName;
let treeNodeId = this.childUnitList.filter(item => item.id == this.formData.receiveUnitId)[0].treeNodeId; let treeNodeId = this.childUnitList.filter(item => item.id == this.formData.receiveUnitId)[0].treeNodeId;
let unitInfo = JSON.parse(window.sessionStorage.setItem('unitInfo'));
params = { params = {
...this.formData, ...this.formData,
receiveNodeId:treeNodeId, receiveNodeId: treeNodeId,
receiveNodeName:reviceUnitName, receiveNodeName: reviceUnitName,
sendDate: moment(this.formData.sendDate).format('yyyy-MM-DD'), sendDate: moment(this.formData.sendDate).format('yyyy-MM-DD'),
receiveUnitName: reviceUnitName receiveUnitName: reviceUnitName,
sendUnitName: unitInfo.unitName
}; };
let detailedList = []; let detailedList = [];
this.formData.detailedList.forEach(item => { this.formData.detailedList.forEach(item => {
...@@ -258,14 +260,16 @@ ...@@ -258,14 +260,16 @@
border: 1px solid #F0F0F0; border: 1px solid #F0F0F0;
border-bottom: 0px border-bottom: 0px
} }
.addMaterialDistribution { .addMaterialDistribution {
.ant-table-thead > tr > th, .ant-table-tbody > tr > td { .ant-table-thead > tr > th, .ant-table-tbody > tr > td {
padding: 10px !important; padding: 10px !important;
} }
} }
.modal_table { .modal_table {
.ant-form-item { .ant-form-item {
margin-bottom: 0px!important; margin-bottom: 0px !important;
} }
} }
</style> </style>
...@@ -149,7 +149,7 @@ ...@@ -149,7 +149,7 @@
this.$api.common.fetchAreaByCode({areaCode: targetOption.areaCode}).then(({data = []}) => { this.$api.common.fetchAreaByCode({areaCode: targetOption.areaCode}).then(({data = []}) => {
targetOption.loading = false; targetOption.loading = false;
data.forEach(item => { data.forEach(item => {
item['isLeaf'] = false item['isLeaf'] = item.areaLevel >= 5;
}) })
if (targetOption.areaCode == 0) { if (targetOption.areaCode == 0) {
this.areaInfo = [...data] this.areaInfo = [...data]
...@@ -165,9 +165,9 @@ ...@@ -165,9 +165,9 @@
let vm = this; let vm = this;
this.$refs.formRef.validate(valid => { this.$refs.formRef.validate(valid => {
if (true) { if (true) {
// vm.subLoad = true; // vm.subLoad = true;
const {areaCode, areaName, ...others} = vm.formData const {areaCode, areaName, ...others} = vm.formData
let areaInfo = areaCode[areaCode.length -1] let areaInfo = areaCode[areaCode.length - 1]
let par = { let par = {
areaCode: areaInfo, areaCode: areaInfo,
...others ...others
......
...@@ -13,8 +13,12 @@ ...@@ -13,8 +13,12 @@
</a-select> </a-select>
</a-form-item> </a-form-item>
<a-form-item> <a-form-item>
<a-button type="primary" icon="search" class="search_btn" style="margin-left: 10px" @click="searchList">搜索</a-button> <a-button type="primary" icon="search" class="search_btn" style="margin-left: 10px" @click="searchList">
<a-button class="search_btn ant-table-btn" icon="sync" style="margin-left: 10px" @click="restSearchForm">清空</a-button> 搜索
</a-button>
<a-button class="search_btn ant-table-btn" icon="sync" style="margin-left: 10px"
@click="restSearchForm">清空
</a-button>
</a-form-item> </a-form-item>
<a-button type="primary" class="search_btn" style="float: right" @click="toAdd">添加供应商</a-button> <a-button type="primary" class="search_btn" style="float: right" @click="toAdd">添加供应商</a-button>
<div style="clear: both"></div> <div style="clear: both"></div>
...@@ -35,11 +39,11 @@ ...@@ -35,11 +39,11 @@
cancel-text="否" cancel-text="否"
@confirm="changeStatus(record)" @confirm="changeStatus(record)"
> >
<a href="#">{{record.status === 1 ? '停用' : '启用'}}</a> <a-button class="ant-table-btn" size="small">{{record.status==0?'启用':'停用'}}
</a-button>
<a-button style="margin-left: 10px" class="ant-table-btn" size="small" @click="updateSupply(record)">修改</a-button>
</a-popconfirm> </a-popconfirm>
<!-- <a-button type="link" size="small" @click="deleteConfirm(record)">删除</a-button>-->
<a-button type="link" size="small" @click="updateSupply(record)">修改</a-button>
<!-- <a-button type="link" size="small" @click="deleteConfirm(record)">删除</a-button>-->
</template> </template>
</a-table> </a-table>
<a-pagination <a-pagination
...@@ -58,6 +62,7 @@ ...@@ -58,6 +62,7 @@
</template> </template>
<script> <script>
import {getEnumByFlag, isEmptyParams} from "../../utils/common"; import {getEnumByFlag, isEmptyParams} from "../../utils/common";
const columns = [ const columns = [
{ {
title: '供应商名称', title: '供应商名称',
...@@ -178,7 +183,7 @@ ...@@ -178,7 +183,7 @@
this.searchList() this.searchList()
}, },
toAdd() { toAdd() {
this.$router.push({path:'/supplyManage/add',query: {modeType: "add"}}) this.$router.push({path: '/supplyManage/add', query: {modeType: "add"}})
}, },
changeStatus(record) { changeStatus(record) {
let par = { let par = {
......
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