Commit caed2e8c authored by 罗成兵's avatar 罗成兵

bug完善

parent 4a18acc2
......@@ -49,6 +49,7 @@
const columns = [
{
title: '发放单位',
width:'200px',
dataIndex: 'sendNodeName',
ellipsis: true
},
......@@ -64,7 +65,6 @@
},
{
title: '批次号',
width: '120px',
dataIndex: 'batchNumber',
ellipsis: true
},
......@@ -75,7 +75,6 @@
},
{
title: '有效期',
width: '120px',
scopedSlots: {customRender: 'expireDateS'},
},
{
......@@ -106,7 +105,6 @@
{
title: '操作',
align: 'center',
width: 120,
fixed: 'right',
scopedSlots: {customRender: 'action'},
},
......
......@@ -34,7 +34,8 @@
</template>
<template slot="action" slot-scope="record">
<a-button type="link" size="small" @click="toDetail(record)" :disabled="record.status===2">发放</a-button>
<a-button type="link" size="small" @click="deleteConfirm(record)" :disabled="record.status===2">删除</a-button>
<a-button type="link" size="small" @click="deleteConfirm(record)" :disabled="record.status===2">删除
</a-button>
</template>
</a-table>
<a-pagination
......@@ -54,6 +55,7 @@
<script>
import {getEnumByFlag, isEmptyParams} from "../../utils/common";
import moment from 'moment'
const columns = [
{
title: '女方姓名',
......@@ -104,8 +106,8 @@
{
title: '操作',
align: 'center',
fixed:'right',
width:120,
fixed: 'right',
width: 120,
scopedSlots: {customRender: 'action'},
},
]
......@@ -127,7 +129,7 @@
columns,
tableData: [],
loading: false,
routerParams:{}
routerParams: {}
}
},
created() {
......@@ -219,10 +221,10 @@
},
toDetail(record) {
let params = {
...record,
id: record.id,
routerFlag: 'update'
}
this.$router.push({path:'/folviteDistribution/add', query: params})
this.$router.push({path: '/folviteDistribution/add', query: params})
}
},
}
......@@ -242,6 +244,7 @@
.btn_space {
margin-right: 5px;
}
/* .search_form {
margin-top: -17px;
border: 1px solid rgba(255,77,128, .2);
......
......@@ -136,7 +136,8 @@
</a-col>
<a-col :span="12">
<a-form-model-item label="签署日期" prop="parentDate">
<a-date-picker v-model="formData.parentDate" format="YYYY-MM-DD" style="width: 100%"/>
<a-date-picker v-model="formData.parentDate" format="YYYY-MM-DD"
style="width: 100%"/>
</a-form-model-item>
</a-col>
<a-col :span="21" :offset="3">
......@@ -154,7 +155,7 @@
</a-form-model-item>
</a-col>
<!-- <a-col :span="21" :offset="3">
<!-- <a-col :span="21" :offset="3">
<a-form-model-item :wrapperCol="{span: 23}">
<div style="border: 1px dashed #EEEEEE">
<div class="sign">签字</div>
......@@ -197,8 +198,10 @@
</a-col>
<a-col :span="21" :offset="3">
<a-form-model-item :wrapperCol="{span: 23}">
<a-button type="primary" @click="openStockModel" style="margin-bottom: 10px">请选择要发放的叶酸种类</a-button>
<a-table :dataSource="formData.provideRecordList" rowKey="id" :pagination="false" class="table_input tab_error"
<a-button type="primary" @click="openStockModel" style="margin-bottom: 10px">请选择要发放的叶酸种类
</a-button>
<a-table :dataSource="formData.provideRecordList" rowKey="id" :pagination="false"
class="table_input tab_error"
bordered>
<a-table-column title="供应商名称" data-index="supplierName"></a-table-column>
<a-table-column title="品牌" data-index="brandName"></a-table-column>
......@@ -238,18 +241,21 @@
</a-col>
<a-col :span="24">
<a-form-model-item label="备注" prop="remarks" :labelCol="{span: 3}" :wrapperCol="{span: 20}">
<a-textarea placeholder="请输入备注" v-model="formData.remarks" :rows="5"></a-textarea>
<a-textarea placeholder="请输入备注,最多可输入500字" v-model="formData.remarks" :rows="5"
:maxLength="500"></a-textarea>
</a-form-model-item>
</a-col>
</a-form-model>
<!-- 选择叶酸种类弹框-->
<!-- 选择叶酸种类弹框-->
<div>
<in-stock-manage-info ref="inStockManageInfo" @selectedIdList="getChecked" v-if="readyGetChecked"></in-stock-manage-info>
<in-stock-manage-info ref="inStockManageInfo" @selectedIdList="getChecked"
v-if="readyGetChecked"></in-stock-manage-info>
</div>
<div style="text-align: center;margin-top: 16px">
<a-button @click="goBack">取消</a-button>
<a-button type="primary" :loading="spinning" @click="addMaterialDis" style="margin-left: 8px">发放</a-button>
<a-button type="primary" :loading="spinning" @click="addMaterialDis" style="margin-left: 8px">发放
</a-button>
</div>
</a-card>
</a-spin>
......@@ -269,14 +275,13 @@
data() {
return {
unitInfo: JSON.parse(window.sessionStorage.getItem('networkInfo')),
routerParams: [],
spinning: false,
// 弹窗内表单
formData: {
womanName: undefined,
womenCertificateType: '1',
womenIdCard: undefined,
oncePregnant: 1,
oncePregnant: '',
pregnantNum: undefined,
manName: undefined,
menCertificateType: '1',
......@@ -301,12 +306,12 @@
womenIdCard: [
{required: true, message: '请输入证件号码'}
],
oncePregnant: [
{required: true, message: '请选择是否曾经怀孕'}
],
pregnantNum: [
{required: true, message: '请输入孕次'}
],
// oncePregnant: [
// {required: true, message: '请选择是否曾经怀孕'}
// ],
// pregnantNum: [
// {required: true, message: '请输入孕次'}
// ],
manName: [
{required: true, message: '请输入姓名'}
],
......@@ -352,10 +357,7 @@
}
},
},
],
remarks: [
{required: true, message: '请输入备注'}
],
]
},
womanPregnant: false,//是否怀孕
options: {
......@@ -369,7 +371,7 @@
},
readyGetChecked: true,
doctorInfoList: [],
areaInfo:[],
areaInfo: [],
fieldNames: {
label: 'areaName',
value: 'areaCode',
......@@ -445,9 +447,9 @@
},
getBookHtmlContent() {//获取用户知情书模板
this.$api.common.fetchConsentInfo().then(({data}) => {
if (this.$api.utils.isBlank(data)){
this.bookHtmlContent={content:""}
}else {
if (this.$api.utils.isBlank(data)) {
this.bookHtmlContent = {content: ""}
} else {
this.bookHtmlContent = data;
}
})
......@@ -494,24 +496,24 @@
},
addMaterialDis() {//发放
let vm = this
let vm = this;
this.$refs.formRef.validate(valid => {
if (valid) {
if (this.formData.provideRecordList.length === 0) {
this.$message.warning('发放叶酸不能为空!');
} else {
this.spinning = true;
let params ={}
let params = {};
this.formData.provideRecordList.forEach(item => {
item.stockId = item.id
});
const {parentDate, provideDate,presentCode,provideDoctorId, ...others} = vm.formData
const {parentDate, provideDate, presentCode, provideDoctorId, ...others} = vm.formData
let parentTime = moment(parentDate).format('YYYY-MM-DD')
let provideTme = moment(provideDate).format('YYYY-MM-DD')
let presentCodeInfo = presentCode[presentCode.length -1]
let presentCodeInfo = presentCode[presentCode.length - 1];
let provideDoctorInfo = vm.doctorInfoList.filter(item => item.id == provideDoctorId)
params ={
params = {
parentDate: parentTime,
provideDate: provideTme,
presentCode: presentCodeInfo,
......@@ -563,10 +565,16 @@
},
goBack() {
if (this.routerParams.routerFlag == "update") {
this.$router.push("/Home/folviteApply");
closedDetail('/inStock/addMaterialDistribution', '/Home/folviteApply');
} else {
this.$router.push("/Home/folviteDistribution");
closedDetail('/inStock/addMaterialDistribution', '/Home/folviteDistribution')
}
}
}
}
</script>
<style scoped lang="less">
......@@ -593,9 +601,10 @@
.book {
.ant-card-head-title {
padding: 0px!important;
padding: 0px !important;
}
}
.sign {
position: absolute;
background: #FFF1F0;
......@@ -609,9 +618,10 @@
float: right;
margin-top: 10px;
}
.table_input {
.ant-table-tbody > tr > td {
padding: 5px!important;
padding: 5px !important;
overflow-wrap: break-word;
}
}
......
......@@ -11,7 +11,7 @@
</div>
<div style="clear: both"></div>
<div style="margin-top: 16px">
<div class="detail_title" >
<div class="detail_title">
<div class="divider_my_dashed">
<span class="midText" style="font-size: 14px;color: #FF4D80;">女方信息</span>
</div>
......@@ -62,7 +62,7 @@
{{detailInfo.telephone || '--'}}
</a-descriptions-item>
<a-descriptions-item label="现在住址">
{{detailInfo.presentCode || '--'}}
{{detailInfo.presentCodeName || '--'}}
</a-descriptions-item>
<a-descriptions-item label="详细地址">
{{detailInfo.nowAddress || '--'}}
......@@ -70,18 +70,18 @@
<a-descriptions-item label="签署方式">
{{detailInfo.signedModeName || '--'}}
</a-descriptions-item>
<a-descriptions-item label="签署日期1">
<a-descriptions-item label="签署日期">
{{detailInfo.parentDate || '--'}}
</a-descriptions-item>
<a-descriptions-item label="线下知情同意书">
<img width="120px" height="120px" :src="detailInfo.consentUrl"/>
</a-descriptions-item>
</a-descriptions>
<a-descriptions bordered layout="vertical" class="no_border">
<a-descriptions-item label="上传照片">
{{detailInfo.batchNumber || '--'}}
<img width="120px" height="120px" :src="detailInfo.consentUrl"/>
</a-descriptions-item>
</a-descriptions>
<!-- <a-descriptions bordered layout="vertical" class="no_border">-->
<!-- <a-descriptions-item label="上传照片">-->
<!-- {{detailInfo.batchNumber || '&#45;&#45;'}}-->
<!-- </a-descriptions-item>-->
<!-- </a-descriptions>-->
</div>
<div style="margin: 30px 0px">
......@@ -123,6 +123,8 @@
<script>
import moment from 'moment';
import {closedDetail} from "../../../utils/common";
import router from "../../../../router";
const columns = [
{
title: '供应商',
......@@ -170,11 +172,12 @@
residentId: this.routerParams.id
}
this.$api.folviteDistributionManage.fetchFolviteDistributionDetail(par).then(({data = [], code}) => {
this.spinning = false
this.spinning = false;
this.detailInfo = data
})
},
goBack() {
this.$router.push("/Home/folviteDistribution");
closedDetail('/inStock/inStockManageDetail', '/Home/folviteDistribution')
}
},
......
......@@ -196,7 +196,6 @@
pageIndex: this.pagination.pageIndex,
pageSize: this.pagination.pageSize
}
console.log(par);
this.$api.stockManage.fetchInStockList(par).then(({data = {}}) => {
const {dataList = [], total = 0} = data
this.tableData = dataList
......
......@@ -48,6 +48,7 @@
:multiple="true"
:action="uploadAction"
:headers="headers"
@preview="preview"
@change="handleChange"
:file-list="fileList"
>
......@@ -100,7 +101,7 @@
{
title: '证件号码',
dataIndex: 'womenIdCard',
ellipsis: true
ellipsis: false
},
{
title: '联系电话',
......@@ -129,7 +130,8 @@
},
{
title: '操作',
align: 'center',
fixed:'right',
align: 'left',
width: "200px",
scopedSlots: {customRender: 'action'},
},
......@@ -234,6 +236,9 @@
});
this.fileList = fileList;
},
preview(val){
window.open(val.response.data.trueDownloadUrl)
},
onsubmit() {
if (this.$api.utils.isBlank(this.formData.consentId)) {
this.$message.warning('请上传文件');
......
......@@ -59,7 +59,7 @@
<a-input v-price
v-model="formData.unitPrice"
suffix="元"
placeholder="请输入单价"></a-input>
placeholder="请输入单价,保留2位小数"></a-input>
</a-form-model-item>
</a-col>
<a-col :span="12">
......@@ -73,7 +73,8 @@
<a-input v-toInt
v-model="formData.number"
placeholder="请输入数量">
<a-select slot="addonAfter" v-model="formData.specs" default-value="瓶" style="width: 60px">
<a-select slot="addonAfter" v-model="formData.specs" default-value="瓶"
style="width: 60px">
<a-select-option value="瓶">
</a-select-option>
......@@ -105,8 +106,9 @@
:wrapperCol="{span: 20}">
<a-textarea
:rows="6"
:maxLength="500"
v-model="formData.remarks"
placeholder="请输入备注"></a-textarea>
placeholder="请输入备注,最多500个字"></a-textarea>
</a-form-model-item>
</a-col>
</a-row>
......@@ -114,7 +116,9 @@
</div>
<div style="text-align: center">
<a-button class="search_btn btn_space" @click="goBack">取消</a-button>
<a-button type="primary" class="search_btn btn_space" :loading="subLoad" style="margin-left: 10px" @click="submitForm">库存录入</a-button>
<a-button type="primary" class="search_btn btn_space" :loading="subLoad" style="margin-left: 10px"
@click="submitForm">库存录入
</a-button>
</div>
</a-card>
</div>
......@@ -122,12 +126,14 @@
<script>
import moment from 'moment'
import {closedDetail, getEnumByFlag} from "../../../utils/common";
import commonCode from "../../../commonCode";
export default {
components: {},
data() {
return {
brandNameList: [],
subLoad:false,
subLoad: false,
// form表单
formData: {
brandId: undefined,
......@@ -137,7 +143,7 @@
produceDate: undefined,
expireDate: undefined,
purchDate: undefined,
enterDate:undefined,
enterDate: undefined,
handler: undefined,
number: undefined,
specs: '瓶',
......@@ -147,7 +153,7 @@
brandId: [
{required: true, message: '请选择品牌'}
],
batchNumber:[
batchNumber: [
{required: true, message: '请输入批次号'}
],
supplierId: [
......@@ -171,11 +177,11 @@
unitPrice: [
{required: true, message: '请输入单价'}
],
remarks:[
remarks: [
{required: false, message: '请输入备注'}
],
},
allSupplyInfo:[]
allSupplyInfo: []
}
},
created() {
......@@ -183,31 +189,35 @@
},
methods: {
getAllSupply() {
let par= {}
let par = {}
this.$api.common.fetchAllSupply(par).then(({data = []}) => {
this.allSupplyInfo = data
})
},
// 弹窗确定按钮
submitForm() {
let vm = this
let vm = this;
this.$refs.formRef.validate(valid => {
if (valid) {
this.subLoad = true
let pars = {}
Object.assign(pars, vm.formData)
pars.produceDate = moment(vm.formData.produceDate).format('YYYY-MM-DD')
pars.expireDate = moment(vm.formData.expireDate).format('YYYY-MM-DD')
pars.purchDate = moment(vm.formData.purchDate).format('YYYY-MM-DD')
pars.enterDate = moment(vm.formData.enterDate).format('YYYY-MM-DD')
this.subLoad = true;
let pars = {};
Object.assign(pars, vm.formData);
console.log(pars);
pars.unitPrice = Number(pars.unitPrice).toFixed(2);
pars.produceDate = moment(vm.formData.produceDate).format('YYYY-MM-DD');
pars.expireDate = moment(vm.formData.expireDate).format('YYYY-MM-DD');
pars.purchDate = moment(vm.formData.purchDate).format('YYYY-MM-DD');
pars.enterDate = moment(vm.formData.enterDate).format('YYYY-MM-DD');
let par = {
...pars
}
};
vm.$api.stockManage.addHistoryStock(par).then(res => {
if (res.code === 'SUCCESS') {
vm.subLoad = false
vm.subLoad = false;
vm.$message.success('录入成功!')
vm.goBack()
vm.goBack();
} else {
vm.subLoad = false
}
}).catch(() => {
vm.subLoad = false
......@@ -216,7 +226,7 @@
});
},
goBack() {
closedDetail('/inStock/add','/Home/inStock')
closedDetail('/inStock/add', '/Home/inStock')
}
},
}
......
......@@ -112,13 +112,13 @@
const columns = [
{
title: '品牌',
dataIndex: 'brandName',
title: '供应商名称',
dataIndex: 'supplierName',
ellipsis: true
},
{
title: '供应商名称',
dataIndex: 'supplierName',
title: '品牌',
dataIndex: 'brandName',
ellipsis: true
},
{
......@@ -142,11 +142,11 @@
dataIndex: 'unitPrice',
ellipsis: true
},
{
title: '规格',
dataIndex: 'specs',
ellipsis: true
},
// {
// title: '规格',
// dataIndex: 'specs',
// ellipsis: true
// },
{
title: '库存总数',
dataIndex: 'number',
......@@ -159,6 +159,7 @@
},
{
title: '操作',
fixed:"right",
align: 'center',
scopedSlots: {customRender: 'action'},
},
......@@ -239,7 +240,6 @@
getInStockList() {
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
......@@ -304,7 +304,7 @@
this.$router.push({path: '/inStock/addMaterialDistribution', query: {selected: this.selectedRowKeys}})
},
toDetail(record) {
this.$router.push({path: '/inStock/inStockManageDetail', query: record})
this.$router.push({path: '/inStock/inStockManageDetail', query: {id:record.id}})
}
},
}
......
......@@ -105,12 +105,12 @@
{required: true, message: '请输入联系人电话', trigger: 'change'},
{validator: checkPhone},
],
areaCode: [
{required: true, message: '请选择联系地址', trigger: 'change'}
],
address: [
{required: true, message: '请输入详细地址', trigger: 'change'}
],
// areaCode: [
// {required: true, message: '请选择联系地址', trigger: 'change'}
// ],
// address: [
// {required: true, message: '请输入详细地址', trigger: 'change'}
// ],
},
queryParams: {},
areaInfo: [],
......@@ -158,7 +158,6 @@
targetOption.children = [...data]
this.areaInfo = [...this.areaInfo]
}
console.log(this.areaInfo)
})
},
// 弹窗确定按钮
......@@ -173,7 +172,6 @@
areaCode: areaInfo,
...others
};
console.log(par)
if (this.queryParams.modeType === 'add') {
vm.$api.common.fetchAddSupply(par).then(res => {
this.subLoad = false;
......
......@@ -119,7 +119,7 @@
}
},
created() {
this.routerParams = this.$route.query
this.routerParams = this.$route.query;
if (this.routerParams.menuId) {
window.sessionStorage.setItem('menuId', this.routerParams.menuId)
}
......
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