Commit eba77bcf authored by gengchunlei's avatar gengchunlei

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

parents 2b9d35f7 933ae6ea
...@@ -10,12 +10,16 @@ export default { ...@@ -10,12 +10,16 @@ export default {
'json', 'json',
) )
}, },
fetchAllChildOrgInfo() {//查询当前单位的所有下级单位
return fetch(`/v1/folacin-admin/folacin-provide-record/child-unit`)
},
fetchMedicalType(params) {//获取分类 fetchMedicalType(params) {//获取分类
return fetch('/basic-info/v1/basic-info/basic-medical-breed/all', params) return fetch('/basic-info/v1/basic-info/basic-medical-breed/all', params)
}, },
fetchAllMedicalName(params) {//获取所有品种名称(单位端) fetchAllMedicalName(params) {//获取所有品种名称(单位端)
return fetch('/basic-info/v1/basic-info/basic-medical-info/all', params) return fetch('/basic-info/v1/basic-info/basic-medical-info/all', params)
}, },
fetchUnitInfo(params) {//获取单位(父级) fetchUnitInfo(params) {//获取单位(父级)
return fetch(`/basic-info/v1/basic-info/basic-org-info/all-child/${params.id}`, params) return fetch(`/basic-info/v1/basic-info/basic-org-info/all-child/${params.id}`, params)
}, },
...@@ -84,6 +88,14 @@ export default { ...@@ -84,6 +88,14 @@ export default {
fetchReceiveRecordList(params) {//入库管理列表 fetchReceiveRecordList(params) {//入库管理列表
return fetch('/v1/folacin-admin/folacin-send-record/receive-record', params); return fetch('/v1/folacin-admin/folacin-send-record/receive-record', params);
}, },
/*查询入库单详情*/
fetchReceiveDetails(id) {
return fetch(`/v1/folacin-admin/folacin-send-record/receive-details/${id}`);
},
/*确认入库*/
fetchReceiveConfirm(params) {
return fetch(`/v1/folacin-admin/folacin-send-record/receive/`,params);
},
/*分配出库列表*/ /*分配出库列表*/
fetchSendRecordList(params) {//入库管理列表 fetchSendRecordList(params) {//入库管理列表
return fetch('/v1/folacin-admin/folacin-send-record/send-record', params); return fetch('/v1/folacin-admin/folacin-send-record/send-record', params);
......
<template> <template>
<div> <div>
<a-card> <a-card>
<div> <div>
<div> <div>
<span style="font-size: 18px;font-weight: 600;"> 分配入库</span> <span style="font-size: 18px;font-weight: 600;"> 分配入库</span>
</div> </div>
<div style="margin-top: 16px"> <div style="margin-top: 16px">
<a-descriptions bordered :column="{ sm: 2, xs: 1 }"> <a-descriptions bordered :column="{ sm: 2, xs: 1 }">
<a-descriptions-item label="发货单位"> <a-descriptions-item label="发货单位">
{{detailInfo.medicalName || '--'}} {{detailInfo.sendUnitName || '--'}}
</a-descriptions-item> </a-descriptions-item>
<a-descriptions-item label="分配日期"> <a-descriptions-item label="分配日期">
{{detailInfo.breedName || '--'}} {{detailInfo.sendDate || '--'}}
</a-descriptions-item> </a-descriptions-item>
<a-descriptions-item label="发货人姓名"> <a-descriptions-item label="发货人姓名">
{{detailInfo.batchNumber || '--'}} {{detailInfo.sendContact || '--'}}
</a-descriptions-item> </a-descriptions-item>
<a-descriptions-item label="联系电话"> <a-descriptions-item label="联系电话">
{{detailInfo.expireDate || '--'}} {{detailInfo.sendPhone || '--'}}
</a-descriptions-item> </a-descriptions-item>
<a-descriptions-item label="供应商"> <a-descriptions-item label="供应商">
{{detailInfo.expireDate || '--'}} {{detailInfo.supplierName || '--'}}
</a-descriptions-item> </a-descriptions-item>
<a-descriptions-item label="品牌"> <a-descriptions-item label="品牌">
{{detailInfo.unit || '--'}} {{detailInfo.brandName || '--'}}
</a-descriptions-item> </a-descriptions-item>
<a-descriptions-item label="批次号"> <a-descriptions-item label="批次号">
{{detailInfo.specs || '--'}} {{detailInfo.batchNumber || '--'}}
</a-descriptions-item> </a-descriptions-item>
<a-descriptions-item label="生产日期"> <a-descriptions-item label="生产日期">
{{detailInfo.specs || '--'}} {{detailInfo.produceDate || '--'}}
</a-descriptions-item> </a-descriptions-item>
<a-descriptions-item label="有效期至"> <a-descriptions-item label="有效期至">
{{detailInfo.specs || '--'}} {{detailInfo.expireDate || '--'}}
</a-descriptions-item> </a-descriptions-item>
<a-descriptions-item label="单价"> <a-descriptions-item label="单价">
{{detailInfo.unit || '--'}}<span></span> {{detailInfo.unitPrice || '--'}}<span></span>
</a-descriptions-item> </a-descriptions-item>
<a-descriptions-item label="数量"> <a-descriptions-item label="数量">
{{detailInfo.stockNum || '--'}} {{detailInfo.sendNum || '--'}}
</a-descriptions-item> </a-descriptions-item>
<a-descriptions-item label="入库状态"> <a-descriptions-item label="入库状态">
{{detailInfo.stockNum || '--'}} {{detailInfo.statusName || '--'}}
</a-descriptions-item> </a-descriptions-item>
</a-descriptions> </a-descriptions>
<a-form-model ref="formRef" :model="formData" :rules="formRules" <a-form-model ref="formRef" :model="formData"
:labelCol="{span: 4}" :labelCol="{span: 4}"
:wrapperCol="{span: 16}" :wrapperCol="{span: 16}"
style="margin-top: 20px" style="margin-top: 20px"
> >
<a-form-model-item label="备注" <a-form-model-item label="备注"
prop="stockNum" prop="remarks"
:labelCol="{span: 6}" :labelCol="{span: 6}"
:wrapperCol="{span: 15}"> :wrapperCol="{span: 15}">
<a-textarea <a-textarea
:rows="6" :rows="6"
v-model="formData.stockNum" v-model="formData.remarks"
placeholder="请输入备注"></a-textarea> placeholder="请输入备注"></a-textarea>
</a-form-model-item> </a-form-model-item>
</a-form-model> </a-form-model>
</div>
</div>
<div style="text-align: center;margin-top: 40px">
<a-button @click="goBack(1)">取消</a-button>
<a-button type="primary" @click="goBack(2)" style="margin-left: 10px">入库</a-button>
</div> </div>
</div>
<div style="text-align: center;margin-top: 40px">
<a-button @click="goBack">取消</a-button>
<a-button type="primary" @click="goBack" style="margin-left: 10px">入库</a-button>
</div>
</a-card> </a-card>
</div> </div>
</template> </template>
...@@ -78,29 +78,44 @@ ...@@ -78,29 +78,44 @@
return { return {
routerParams: {}, routerParams: {},
detailInfo: {}, detailInfo: {},
formData: { formData: {},
formRules: []
},
formRules: [
]
} }
}, },
created() { created() {
this.routerParams = this.$route.query this.routerParams = this.$route.query;
this.getStockListDetail() this.getReceiveDetails()
}, },
methods: { methods: {
getStockListDetail() { getReceiveDetails() {
let par = { this.$api.stockManage.fetchReceiveDetails(this.routerParams.id).then(({data = [], code}) => {
id: this.routerParams.id this.detailInfo = data;
}
this.$api.stockManage.fetchInStockLisDetail(par).then(({data = [], code}) => {
this.detailInfo = data
}) })
}, },
goBack() { goBack(type) {
closedDetail('/inStock/inStockManageDetail', '/Home/distributionWarehousing') if (type == 1) {
closedDetail('/inStock/inStockManageDetail', '/Home/distributionWarehousing');
return;
}
let that = this;
let params = {
recordId: this.detailInfo.id, remarks: this.formData.remarks
};
this.$confirm({
title: '确认入库吗?',
content: "",
onOk() {
that.$api.stockManage.fetchReceiveConfirm(params).then(({data = [], code}) => {
if (code === 'SUCCESS') {
closedDetail('/inStock/inStockManageDetail', '/Home/distributionWarehousing')
}
});
},
onCancel() {
that.$message.warning('已取消!');
},
class: 'test',
});
} }
}, },
} }
......
<template> <template>
<div> <div>
<a-card> <a-card>
<div> <div>
<div> <div>
<span style="font-size: 18px;font-weight: 600;"> 分配入库详情</span> <span style="font-size: 18px;font-weight: 600;"> 分配入库详情</span>
</div> </div>
<div style="margin-top: 16px"> <div style="margin-top: 16px">
<a-descriptions bordered :column="{ sm: 2, xs: 1 }"> <a-descriptions bordered :column="{ sm: 2, xs: 1 }">
<a-descriptions-item label="发货单位"> <a-descriptions-item label="发货单位">
{{detailInfo.medicalName || '--'}} {{detailInfo.sendUnitName || '--'}}
</a-descriptions-item> </a-descriptions-item>
<a-descriptions-item label="分配日期"> <a-descriptions-item label="分配日期">
{{detailInfo.breedName || '--'}} {{detailInfo.sendDate || '--'}}
</a-descriptions-item> </a-descriptions-item>
<a-descriptions-item label="发货人姓名"> <a-descriptions-item label="发货人姓名">
{{detailInfo.batchNumber || '--'}} {{detailInfo.sendContact || '--'}}
</a-descriptions-item> </a-descriptions-item>
<a-descriptions-item label="联系电话"> <a-descriptions-item label="联系电话">
{{detailInfo.expireDate || '--'}} {{detailInfo.sendPhone || '--'}}
</a-descriptions-item> </a-descriptions-item>
<a-descriptions-item label="供应商"> <a-descriptions-item label="供应商">
{{detailInfo.expireDate || '--'}} {{detailInfo.supplierName || '--'}}
</a-descriptions-item> </a-descriptions-item>
<a-descriptions-item label="品牌"> <a-descriptions-item label="品牌">
{{detailInfo.unit || '--'}} {{detailInfo.brandName || '--'}}
</a-descriptions-item> </a-descriptions-item>
<a-descriptions-item label="批次号"> <a-descriptions-item label="批次号">
{{detailInfo.specs || '--'}} {{detailInfo.batchNumber || '--'}}
</a-descriptions-item> </a-descriptions-item>
<a-descriptions-item label="生产日期"> <a-descriptions-item label="生产日期">
{{detailInfo.specs || '--'}} {{detailInfo.produceDate || '--'}}
</a-descriptions-item> </a-descriptions-item>
<a-descriptions-item label="有效期至"> <a-descriptions-item label="有效期至">
{{detailInfo.specs || '--'}} {{detailInfo.expireDate || '--'}}
</a-descriptions-item> </a-descriptions-item>
<a-descriptions-item label="单价"> <a-descriptions-item label="单价">
{{detailInfo.unit || '--'}}<span></span> {{detailInfo.unitPrice || '--'}}<span></span>
</a-descriptions-item> </a-descriptions-item>
<a-descriptions-item label="数量"> <a-descriptions-item label="数量">
{{detailInfo.stockNum || '--'}} {{detailInfo.sendNum || '--'}}
</a-descriptions-item> </a-descriptions-item>
<a-descriptions-item label="入库状态"> <a-descriptions-item label="入库状态">
{{detailInfo.stockNum || '--'}} {{detailInfo.statusName || '--'}}
</a-descriptions-item> </a-descriptions-item>
<a-descriptions-item label="备注"> </a-descriptions>
{{detailInfo.stockNum || '--'}} <a-form-model ref="formRef"
</a-descriptions-item> :labelCol="{span: 4}"
</a-descriptions> :wrapperCol="{span: 16}"
style="margin-top: 20px"
>
<a-form-model-item label="备注"
prop="remarks"
:labelCol="{span: 6}"
:wrapperCol="{span: 15}">
<a-textarea
:disabled="true"
:rows="6"
v-model="detailInfo.remarks"
placeholder="请输入备注"></a-textarea>
</a-form-model-item>
</a-form-model>
</div>
</div>
<div style="text-align: center;margin-top: 40px">
<a-button @click="goBack">取消</a-button>
</div> </div>
</div>
<div style="text-align: center;margin-top: 40px">
<a-button @click="goBack">取消</a-button>
</div>
</a-card> </a-card>
</div> </div>
</template> </template>
...@@ -69,14 +82,11 @@ ...@@ -69,14 +82,11 @@
}, },
created() { created() {
this.routerParams = this.$route.query this.routerParams = this.$route.query
this.getStockListDetail() this.getReceiveDetails()
}, },
methods: { methods: {
getStockListDetail() { getReceiveDetails() {
let par = { this.$api.stockManage.fetchReceiveDetails(this.routerParams.id).then(({data = [], code}) => {
id: this.routerParams.id
}
this.$api.stockManage.fetchInStockLisDetail(par).then(({data = [], code}) => {
this.detailInfo = data this.detailInfo = data
}) })
}, },
......
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
导出Excel 导出Excel
</a-button> </a-button>
<div style="clear: both"></div> <div style="clear: both"></div>
</a-form> </a-form>
<div style="clear: both"></div> <div style="clear: both"></div>
...@@ -35,7 +35,7 @@ ...@@ -35,7 +35,7 @@
</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 type="link" size="small" @click="toAdd(record)">入库</a-button> <a-button v-if="record.statusName=='未接收'" 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>
...@@ -46,6 +46,7 @@ ...@@ -46,6 +46,7 @@
import moment from 'moment' import moment from 'moment'
import myPagination from "../../components/myPagination"; import myPagination from "../../components/myPagination";
import dateRangePicker from "../../components/dateRangePicker"; import dateRangePicker from "../../components/dateRangePicker";
const columns = [ const columns = [
{ {
title: '发放单位', title: '发放单位',
...@@ -98,6 +99,11 @@ ...@@ -98,6 +99,11 @@
dataIndex: 'statusName', dataIndex: 'statusName',
ellipsis: true ellipsis: true
}, },
{
title: '入库日期',
dataIndex: 'receiveDate',
ellipsis: true
},
{ {
title: '操作', title: '操作',
align: 'center', align: 'center',
...@@ -112,10 +118,8 @@ ...@@ -112,10 +118,8 @@
return { return {
// 搜索框对象 // 搜索框对象
searchForm: { searchForm: {
breedId: undefined, status: '',
medicalName: '', date: []
factoryId: '',
produceDate: undefined
}, },
statusList: [], statusList: [],
pagination: { pagination: {
...@@ -127,7 +131,7 @@ ...@@ -127,7 +131,7 @@
columns, columns,
tableData: [], tableData: [],
loading: false, loading: false,
allSupplyInfo:[], allSupplyInfo: [],
} }
}, },
created() { created() {
...@@ -145,6 +149,8 @@ ...@@ -145,6 +149,8 @@
let pars = isEmptyParams(this.searchForm) let pars = isEmptyParams(this.searchForm)
let par = { let par = {
...pars, ...pars,
startDate: this.searchForm.date[0],
endDate: this.searchForm.date[1],
pageIndex: this.pagination.pageIndex, pageIndex: this.pagination.pageIndex,
pageSize: this.pagination.pageSize pageSize: this.pagination.pageSize
} }
...@@ -159,21 +165,19 @@ ...@@ -159,21 +165,19 @@
}, },
restSearchForm() { restSearchForm() {
this.searchForm = { this.searchForm = {
breedId: undefined, status: '',
medicalName: '', date: []
factoryId: '',
produceDate: undefined
} }
this.searchList() this.searchList()
}, },
downloadExcel(){ downloadExcel() {
}, },
toDetail(record) { toDetail(record) {
this.$router.push({path:'/distributionWarehousing/detail', query: record}) this.$router.push({path: '/distributionWarehousing/detail', query: record})
}, },
toAdd(record) { toAdd(record) {
this.$router.push({path:'/distributionWarehousing/add', query: record}) this.$router.push({path: '/distributionWarehousing/add', query: {id: record.id}})
} }
}, },
} }
...@@ -193,6 +197,7 @@ ...@@ -193,6 +197,7 @@
.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);
......
...@@ -27,9 +27,10 @@ ...@@ -27,9 +27,10 @@
rowKey="id" rowKey="id"
:loading="loading" :loading="loading"
:pagination="false" :pagination="false"
bordered
> >
<template slot="statusName" slot-scope="record"> <template slot="statusName" slot-scope="record">
<a-button type="link" size="small" @click="toDetail(record.statusName)">{{record.statusName}}</a-button> <a-button type="link" size="small">{{record.statusName}}</a-button>
</template> </template>
<a-table <a-table
slot="expandedRowRender" slot="expandedRowRender"
...@@ -38,9 +39,10 @@ ...@@ -38,9 +39,10 @@
:data-source="record.detailedList" :data-source="record.detailedList"
:pagination="false" :pagination="false"
> >
<template slot="statusName" slot-scope="record">
<a-button type="link" size="small">{{record.statusName}}</a-button>
</template>
</a-table> </a-table>
</a-table> </a-table>
<myPagination v-model="pagination" :pagination="pagination" @getList="getSendRecord"></myPagination> <myPagination v-model="pagination" :pagination="pagination" @getList="getSendRecord"></myPagination>
</div> </div>
...@@ -54,83 +56,110 @@ ...@@ -54,83 +56,110 @@
const columns = [ const columns = [
{ {
title: '收货单位', title: '收货单位',
dataIndex: 'sendUnitName', dataIndex: 'receiveUnitName',
width:"240px",
ellipsis: true ellipsis: true
}, },
{ {
title: '发货人', title: '发货人',
width:"160px",
dataIndex: 'sendContact', dataIndex: 'sendContact',
ellipsis: true ellipsis: true
}, },
{ {
title: '发货人电话', title: '发货人电话',
width:"240px",
dataIndex: 'sendPhone', dataIndex: 'sendPhone',
ellipsis: true ellipsis: true
}, },
{ {
title: '发货日期', title: '发货日期',
width:"160px",
dataIndex: 'sendDate', dataIndex: 'sendDate',
ellipsis: true ellipsis: true
}, },
{ {
title: '收货人', title: '收货人',
width:"160px",
dataIndex: 'receiver', dataIndex: 'receiver',
ellipsis: true ellipsis: true
}, },
{ {
title: '收货人电话', title: '收货人电话',
dataIndex: 'receivePhone', dataIndex: 'receivePhone',
width:"160px",
ellipsis: true ellipsis: true
}, },
{ // {
title: '收货时间', // title: '收货时间',
dataIndex: 'receiveDate', // dataIndex: 'receiveDate',
ellipsis: true // ellipsis: true
}, // },
{ {
title: '收货状态', title: '收货状态',
scopedSlots: {customRender: 'statusName'}, scopedSlots: {customRender: 'statusName'},
ellipsis: true ellipsis: true
}, },
{ // {
title: '备注', // title: '备注',
dataIndex: 'remarks', // dataIndex: 'remarks',
ellipsis: true // ellipsis: true
}, // },
]; ];
const innerColumns = [ const innerColumns = [
{ {
title: '供应商名称', title: '供应商名称',
dataIndex: 'supplierName', dataIndex: 'supplierName',
width:"240px",
ellipsis: true ellipsis: true
}, },
{ {
title: '品牌', title: '品牌',
width:"160px",
dataIndex: 'brandName', dataIndex: 'brandName',
ellipsis: true ellipsis: true
}, },
{ {
title: '批次号', title: '批次号',
width: '120px', width:"240px",
dataIndex: 'batchNumber', dataIndex: 'batchNumber',
ellipsis: true ellipsis: true
}, },
{ {
title: '生产日期', title: '生产日期',
width:"160px",
dataIndex: 'produceDate', dataIndex: 'produceDate',
ellipsis: true ellipsis: true
}, },
{ {
title: '有效期', title: '有效期',
width: '120px', width:"160px",
dataIndex: 'expireDate', dataIndex: 'expireDate',
}, },
{ {
title: '分配数量', title: '分配数量',
width:"160px",
dataIndex: 'sendNum', dataIndex: 'sendNum',
ellipsis: true ellipsis: true
}, },
{
title: '收货状态',
width:"160px",
scopedSlots: {customRender: 'statusName'},
ellipsis: true
},
{
title: '收货日期',
width:"160px",
dataIndex: 'receiveDate',
ellipsis: true
},
{
title: '备注',
dataIndex: 'remarks',
ellipsis: true
},
]; ];
export default { export default {
name: "sendRecord", name: "sendRecord",
......
<template> <template>
<div class="addMaterialDistribution"> <div class="addMaterialDistribution">
<a-spin tip="加载中..." :spinning="spinning"> <a-spin tip="加载中..." :spinning="spinning">
<a-card> <a-card>
<div style="font-size: 18px;font-weight: 600"> <div style="font-size: 18px;font-weight: 600">
<span>调拨分配</span> <span>调拨分配</span>
</div>
<a-form-model ref="formRef" :model="formData" :rules="formRules" :labelCol="{span: 7}" :wrapperCol="{span: 15}">
<div>
<a-divider orientation="left">
分配信息
</a-divider>
</div> </div>
<div> <a-form-model ref="formRef" :model="formData" :rules="formRules" :labelCol="{span: 7}"
<a-row> :wrapperCol="{span: 15}">
<a-col :span="8">
<a-form-model-item label="发货人" prop="sendContact"> <div>
<a-input placeholder="请填写发货人" v-model="formData.sendContact"></a-input> <a-divider orientation="left">
</a-form-model-item> 分配信息
</a-col> </a-divider>
<a-col :span="8"> </div>
<a-form-model-item label="发货人电话" prop="sendPhone"> <div>
<a-input placeholder="请填写发货人电话" v-model="formData.sendPhone"></a-input> <a-row>
</a-form-model-item> <a-col :span="8">
</a-col> <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-input placeholder="请填写发货人电话" v-model="formData.sendPhone"></a-input>
</a-form-model-item>
</a-col>
<a-col :span="8"> <a-col :span="8">
<a-form-model-item label="发货日期" prop="sendDate"> <a-form-model-item label="发货日期" prop="sendDate">
<a-date-picker v-model="formData.sendDate" style="width: 100%"/> <a-date-picker v-model="formData.sendDate" style="width: 100%"/>
</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="receiveUnitId"> <a-form-model-item label="收货单位" prop="receiveUnitId">
<a-select v-model="formData.receiveUnitId" placeholder="请选择" @click.native="getChildUnitList"> <a-select v-model="formData.receiveUnitId" placeholder="请选择"
<a-select-option v-for="item in childUnitList" @click.native="getChildUnitList">
:key="item.id" :value="item.id" <a-select-option v-for="item in childUnitList"
> :key="item.id" :value="item.id"
{{item.unitName}} >
</a-select-option> {{item.unitName}}
</a-select> </a-select-option>
</a-form-model-item> </a-select>
</a-col> </a-form-model-item>
<a-col :span="8"> </a-col>
<a-form-model-item label="收货人" prop="receiver"> <a-col :span="8">
<a-input placeholder="请填写收货人" v-model="formData.receiver"></a-input> <a-form-model-item label="收货人" prop="receiver">
</a-form-model-item> <a-input placeholder="请填写收货人" v-model="formData.receiver"></a-input>
</a-col> </a-form-model-item>
<a-col :span="8"> </a-col>
<a-form-model-item label="收货人电话" prop="receivePhone"> <a-col :span="8">
<a-input placeholder="请填写收货人电话" v-model="formData.receivePhone"></a-input> <a-form-model-item label="收货人电话" prop="receivePhone">
</a-form-model-item> <a-input placeholder="请填写收货人电话" v-model="formData.receivePhone"></a-input>
</a-col> </a-form-model-item>
</a-row> </a-col>
</div> </a-row>
<div> </div>
<a-divider orientation="left"> <div>
分配详情 <a-divider orientation="left">
</a-divider> 分配详情
</div> </a-divider>
<a-table :dataSource="formData.detailedList" rowKey="id" :pagination="false" class="modal_table" bordered> </div>
<a-table-column title="品牌" data-index="brandName" ></a-table-column> <a-table :dataSource="formData.detailedList" rowKey="id" :pagination="false" class="modal_table"
<a-table-column title="供应商名称" data-index="supplierName" ></a-table-column> bordered>
<a-table-column title="批次号" data-index="batchNumber" ></a-table-column> <a-table-column title="品牌" data-index="brandName"></a-table-column>
<a-table-column title="当前库存" data-index="number" ></a-table-column> <a-table-column title="供应商名称" data-index="supplierName"></a-table-column>
<a-table-column title="分配数量" width="190px" fixed="right"> <a-table-column title="批次号" data-index="batchNumber"></a-table-column>
<template slot-scope="text, record, index"> <a-table-column title="当前库存" data-index="number"></a-table-column>
<a-form-model-item :prop="'detailedList.' + index + '.sendNum'" :rules="formRules.sendNum" class="tab_input_r"> <a-table-column title="分配数量" width="190px" fixed="right">
<a-input type="number" <template slot-scope="text, record, index">
v-toInt <a-form-model-item :prop="'detailedList.' + index + '.sendNum'"
v-model="record.sendNum" :rules="formRules.sendNum" class="tab_input_r">
placeholder="请输入分配数量" <a-input type="number"
style="width: 150px;margin-top: 20px" v-toInt
@change="getChangeRecord(record)" v-model="record.sendNum"
> placeholder="请输入分配数量"
style="width: 150px;margin-top: 20px"
@change="getChangeRecord(record)"
>
</a-input> </a-input>
</a-form-model-item> </a-form-model-item>
</template> </template>
</a-table-column> </a-table-column>
<a-table-column title="操作" align="center" fixed="right" width="70px"> <a-table-column title="操作" align="center" fixed="right" width="70px">
<template slot-scope="text, record, index"> <template slot-scope="text, record, index">
<!-- <a-button type="link" class="table_delbtn" @click="deleteGoodsList(index)">删除</a-button> --> <!-- <a-button type="link" class="table_delbtn" @click="deleteGoodsList(index)">删除</a-button> -->
<a-popconfirm <a-popconfirm
title="确定移除该物资吗?" title="确定移除该物资吗?"
ok-text="是" ok-text="是"
cancel-text="否" cancel-text="否"
@confirm="confirm(index)" @confirm="confirm(index)"
> >
<a href="#" class="table_delbtn">删除</a> <a href="#" class="table_delbtn">删除</a>
</a-popconfirm> </a-popconfirm>
</template> </template>
</a-table-column> </a-table-column>
</a-table> </a-table>
</a-form-model> </a-form-model>
<div style="text-align: center;margin-top: 16px"> <div style="text-align: center;margin-top: 16px">
<a-button @click="goBack">取消</a-button> <a-button @click="goBack">取消</a-button>
<a-button type="primary" @click="addMaterialDis" :loading="subLoad" style="margin-left: 8px">调拨分配</a-button> <a-button type="primary" @click="addMaterialDis" :loading="subLoad" style="margin-left: 8px">调拨分配
</div> </a-button>
</a-card> </div>
</a-spin> </a-card>
</div> </a-spin>
</div>
</template> </template>
<script> <script>
import {checkPhone, closedDetail} from "../../../utils/common"; import {checkPhone, closedDetail} from "../../../utils/common";
import moment from 'moment' import moment from 'moment'
let vm = this let vm = this
let recordInfo = {} let recordInfo = {}
export default { export default {
...@@ -172,8 +178,9 @@ ...@@ -172,8 +178,9 @@
}, },
created() { created() {
this.getSelectedMedical() this.getSelectedMedical()
this.formData.sendUnitId = this.unitInfo.unitId this.formData.sendUnitId = this.unitInfo.unitId;
this.formData.sendUnitName = this.unitInfo.unitName this.formData.sendUnitName = this.unitInfo.unitName;
this.getChildUnitList();
}, },
methods: { methods: {
// 删除药具 // 删除药具
...@@ -195,13 +202,12 @@ ...@@ -195,13 +202,12 @@
}, },
// 获取当前单位的下级单位 // 获取当前单位的下级单位
getChildUnitList() { getChildUnitList() {
let params = {} //this.childUnitList = [{id:16625, unitName:'gcl'}]
this.childUnitList = [{id:16625, unitName:'gcl'}] this.$api.common.fetchAllChildOrgInfo().then(({code, data}) => {
// this.$api.common.fetchMaterialDisUnitInfo(params).then(({code, data}) => { if (code === 'SUCCESS') {
// if (code === 'SUCCESS') { this.childUnitList = data;
// this.childUnitList = data; }
// } });
// });
}, },
addMaterialDis() {//调拨分配 addMaterialDis() {//调拨分配
this.$refs.formRef.validate(valid => { this.$refs.formRef.validate(valid => {
...@@ -210,13 +216,13 @@ ...@@ -210,13 +216,13 @@
this.$message.warning('分配物资不能为空!'); this.$message.warning('分配物资不能为空!');
} else { } else {
this.subLoad = true; this.subLoad = true;
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
params = { params = {
...this.formData, ...this.formData,
sendDate: moment(this.formData.sendDate).format('yyyy-MM-DD'), sendDate: moment(this.formData.sendDate).format('yyyy-MM-DD'),
receiveUnitName: reviceUnitName receiveUnitName: reviceUnitName
}; };
let detailedList = []; let detailedList = [];
this.formData.detailedList.forEach(item => { this.formData.detailedList.forEach(item => {
detailedList.push({ detailedList.push({
...@@ -229,7 +235,7 @@ ...@@ -229,7 +235,7 @@
this.subLoad = false; this.subLoad = false;
if (code === 'SUCCESS') { if (code === 'SUCCESS') {
this.$message.success('调拨分配成功!'); this.$message.success('调拨分配成功!');
this.goBack() this.goBack()
} }
}).catch(() => { }).catch(() => {
this.subLoad = false; this.subLoad = false;
...@@ -239,7 +245,7 @@ ...@@ -239,7 +245,7 @@
}); });
}, },
goBack() { goBack() {
closedDetail('/inStock/addMaterialDistribution','/Home/inStock') closedDetail('/inStock/addMaterialDistribution', '/Home/inStock')
} }
} }
} }
...@@ -248,7 +254,7 @@ ...@@ -248,7 +254,7 @@
<style lang="less"> <style lang="less">
.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;
} }
} }
</style> </style>
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