Commit 4a18acc2 authored by 罗成兵's avatar 罗成兵

分配记录

parent e2e4aa02
......@@ -29,13 +29,12 @@
:loading="loading"
:pagination="false"
>
<template slot="expireDateS" slot-scope="record">
{{record.expireDate | formatDate}}
</template>
<template slot="action" slot-scope="record">
<a-button type="link" size="small" @click="toDetail(record)">查看</a-button>
<a-button v-if="record.statusName=='未接收'" type="link" size="small" @click="toAdd(record)">入库</a-button>
<a-button :disabled="record.status==2" type="link" size="small" @click="toAdd(record)">入库</a-button>
</template>
</a-table>
<myPagination v-model="pagination" :pagination="pagination" @getList="getReceiveRecord"></myPagination>
......
......@@ -284,7 +284,7 @@
telephone: undefined,
presentCode: undefined,
nowAddress: undefined,
signedMode: '1',
signedMode: '2',
parentDate: undefined,
provideDate: undefined,
provideDoctorId: undefined,
......
......@@ -16,12 +16,12 @@
<div>
<a-row>
<a-col :span="8">
<a-form-model-item label="发货人" prop="sendContact">
<a-form-model-item label="发货人姓名" prop="sendContact">
<a-input placeholder="请填写发货人" v-model="formData.sendContact"></a-input>
</a-form-model-item>
</a-col>
<a-col :span="8">
<a-form-model-item label="发货人电话" prop="sendPhone">
<a-form-model-item label="联系电话" prop="sendPhone">
<a-input placeholder="请填写发货人电话" v-model="formData.sendPhone"></a-input>
</a-form-model-item>
</a-col>
......@@ -44,12 +44,12 @@
</a-form-model-item>
</a-col>
<a-col :span="8">
<a-form-model-item label="收货人" prop="receiver">
<a-form-model-item label="收货人姓名" prop="receiver">
<a-input placeholder="请填写收货人" v-model="formData.receiver"></a-input>
</a-form-model-item>
</a-col>
<a-col :span="8">
<a-form-model-item label="收货人电话" prop="receivePhone">
<a-form-model-item label="联系电话" prop="receivePhone">
<a-input placeholder="请填写收货人电话" v-model="formData.receivePhone"></a-input>
</a-form-model-item>
</a-col>
......@@ -158,19 +158,19 @@
if (value <= recordInfo.number) {
callback()
} else {
callback(new Error('超出当前库存!'));
callback(new Error('分配数量不能超出当前库存!'));
}
},
},
],
sendContact: [
{required: true, message: '请填写发货人'}
{required: true, message: '请填写发货人姓名'}
],
receiver: [
{required: true, message: '请填写收货人'}
{required: true, message: '请填写收货人姓名'}
],
sendPhone: [
{required: true, message: '请填写联系电话'},
{required: true, message: '请填写发货人联系电话'},
{validator: checkPhone},
],
},
......
......@@ -10,7 +10,7 @@
{{detailInfo.supplierName || '--'}}
</a-descriptions-item>
<a-descriptions-item label="品牌">
{{detailInfo.breedName || '--'}}
{{detailInfo.brandName || '--'}}
</a-descriptions-item>
<a-descriptions-item label="批次号">
{{detailInfo.batchNumber || '--'}}
......@@ -31,7 +31,7 @@
{{detailInfo.specs || '--'}}
</a-descriptions-item>
<a-descriptions-item label="库存总数">
{{detailInfo.number || '--'}}
{{detailInfo.number}}
</a-descriptions-item>
<a-descriptions-item label="入库时间">
......
......@@ -18,7 +18,7 @@
</a-select>
</a-form-item>
<a-form-item label="入库日期">
<a-date-picker v-model="searchForm.enterDate" format="YYYY-MM-DD" style="width: 250px"/>
<dateRangePicker :date.sync="searchForm.date"></dateRangePicker>
</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>
......@@ -107,6 +107,7 @@
</template>
<script>
import {isNotBlank, isEmptyParams, getEnumByFlag} from "../../utils/common";
import dateRangePicker from '../../components/dateRangePicker'
import moment from 'moment'
const columns = [
......@@ -163,7 +164,7 @@
},
]
export default {
components: {},
components: {dateRangePicker},
data() {
return {
// 搜索框对象
......@@ -171,7 +172,7 @@
brandName: '',
supplierId: '',
brandId: '',
enterDate: undefined
date: []
},
pagination: {
pageIndex: 1,
......@@ -224,8 +225,9 @@
},
getQueryParam() {
let pars = isEmptyParams(this.searchForm);
if (isNotBlank(pars.enterDate)) {
pars.enterDate = moment(pars.enterDate).format('YYYY-MM-DD')
if (isNotBlank(this.searchForm.date)) {
pars.startDate = this.searchForm.date[0];
pars.endDate = this.searchForm.date[1];
}
let par = {
...pars,
......@@ -235,8 +237,9 @@
return par;
},
getInStockList() {
this.loading = true
this.loading = true;
let pars = this.getQueryParam();
console.log(pars);
this.$api.stockManage.fetchInStockList(pars).then(({data = {}}) => {
const {dataList = [], total = 0} = data
this.tableData = dataList
......@@ -282,7 +285,7 @@
this.searchForm = {
brandName: '',
supplierId: '',
enterDate: undefined
date: []
}
this.searchList()
},
......
......@@ -39,7 +39,7 @@
</a-popconfirm>
<a-button type="link" size="small" @click="updateSupply(record)">修改</a-button>
<a-button type="link" size="small" @click="deleteConfirm(record)">删除</a-button>
<!-- <a-button type="link" size="small" @click="deleteConfirm(record)">删除</a-button>-->
</template>
</a-table>
<a-pagination
......
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