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

分配记录

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