Commit cf4eaa23 authored by gengchunlei's avatar gengchunlei

bug修改

parent ce61c15f
......@@ -21,7 +21,8 @@
"vue-qr": "^2.3.0",
"vue-router": "^3.2.0",
"vue-ueditor-wrap": "^2.4.4",
"vuex": "^3.4.0"
"vuex": "^3.4.0",
"jsonp": "^0.2.1"
},
"devDependencies": {
"@vue/cli-plugin-babel": "~4.5.0",
......
......@@ -17,7 +17,7 @@ import { Button, Layout, Menu,
Dropdown,Popconfirm,TimePicker,
Radio,Checkbox,Upload,
Switch,Progress,Alert,
Message, Popover
Message, Popover,Badge
} from 'ant-design-vue';
// 设置ant日期选择框为中文样式
......@@ -67,4 +67,5 @@ Vue.use(Progress)
Vue.use(Alert)
Vue.use(Message)
Vue.use(Popover)
Vue.use(Badge)
// Vue.use(VueSignature)//签字画板
......@@ -70,6 +70,9 @@ export default {
fetchInStockList(params) {//在库管理列表
return fetch('/v1/folacin-admin/folacin-stock-record', params)
},
fetchInStockNoZeroList(params) {//在库管理列表库存不为零的
return fetch('/v1/folacin-admin/folacin-stock-record/unit-record-page', params)
},
fetchInStockDetail(params) {//在库管理详情
return fetch(`/v1/folacin-admin/folacin-stock-record/${params.id}`, params)
},
......
......@@ -20,6 +20,7 @@ import './views/utils/directives/throttle'
import './views/utils/directives/int'
import './views/utils/directives/price'
import './views/utils/directives/remarkNum'
import './views/utils/directives/inputNum'
import {message, modal} from 'ant-design-vue'
const {confirm} = modal
......
......@@ -54,7 +54,7 @@
},
created() {
//获取妇幼权限和登录基本信息
document.cookie = 'bGNnd3lwdF9hdA=076213c2-e83a-46af-bd29-6c0a5af457fa;'//昆明市
// document.cookie = 'bGNnd3lwdF9hdA=4f0aa588-ba25-4d21-a200-e94cd6dcc1cc;'//昆明市
// document.cookie = 'bGNnd3lwdF9hdA=' + sessionStorage.getItem("loginToken") + ';'//云南省
let cookieToken = getCookie('bGNnd3lwdF9hdA');
console.log('tokenInfo',cookieToken)
......
......@@ -33,9 +33,15 @@
{{record.expireDate | formatDate}}
</template>
<template slot="action" slot-scope="record">
<a-button type="link" size="small" @click="toDetail(record)">查看</a-button>
<a-button :disabled="record.status==2" type="link" size="small" @click="toAdd(record)">入库</a-button>
<a-button class="ant-table-btn" size="small" @click="toDetail(record)">查看</a-button>
<a-button class="ant-table-btn" style="margin-left: 5px" :disabled="record.status==2" size="small" @click="toAdd(record)">入库</a-button>
</template>
<template slot="statusNameInfo" slot-scope="record">
<a-badge status="success" v-if="record.status == 2" />
<a-badge status="error" v-if="record.status == 1"/>
<span>{{record.statusName}}</span>
</template>
</a-table>
<myPagination v-model="pagination" :pagination="pagination" @getList="getReceiveRecord"></myPagination>
</div>
......@@ -94,8 +100,9 @@
},
{
title: '入库状态',
dataIndex: 'statusName',
ellipsis: true
// dataIndex: 'statusName',
// ellipsis: true,
scopedSlots: {customRender: 'statusNameInfo'},
},
{
title: '入库日期',
......
......@@ -33,8 +33,8 @@
{{record.expireDate | formatDate}}
</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 class="ant-table-btn" size="small" @click="toDetail(record)" :disabled="record.status===2">发放</a-button>
<a-button style="margin-left: 5px" class="ant-table-btn" size="small" @click="deleteConfirm(record)" :disabled="record.status===2">删除
</a-button>
</template>
</a-table>
......@@ -107,7 +107,7 @@
title: '操作',
align: 'center',
fixed: 'right',
width: 120,
width: 140,
scopedSlots: {customRender: 'action'},
},
]
......
......@@ -17,7 +17,7 @@
<img class="title_img" src="../../../../../static/images/user_info_index.png">
<span class="title_font">女方信息</span>
</div>
<a-button slot="extra" class="ant-table-btn">身份证识别</a-button>
<a-button slot="extra" class="ant-table-btn" @click="getWomenIdCardInfo">身份证识别</a-button>
<a-row :gutter="16">
<a-col :span="12">
<a-form-model-item label="姓名" prop="womanName">
......@@ -70,7 +70,7 @@
<img class="title_img" src="../../../../../static/images/user_info_index.png">
<span class="title_font">男方信息</span>
</div>
<a-button slot="extra" class="ant-table-btn">身份证识别</a-button>
<a-button slot="extra" class="ant-table-btn" @click="getMenIdCardInfo">身份证识别</a-button>
<a-row :gutter="16">
<a-col :span="12">
<a-form-model-item label="姓名" prop="manName">
......@@ -152,7 +152,7 @@
style="width: 100%"/>
</a-form-model-item>
</a-col>
<a-col :span="21" :offset="3" v-if="routerParams.routerFlag == 'update'">
<!--<a-col :span="21" :offset="3" v-if="routerParams.routerFlag == 'update'">
<a-form-model-item :wrapperCol="{span: 23}">
<a-card class="book" :headStyle="{background: '#FAFAFA'}">
<div slot="title" style="text-align: center;padding: 10px 0px">
......@@ -171,7 +171,7 @@
<img style="width: 100%;height: 160px" :src="formData.consentUrl">
</div>
</a-form-model-item>
</a-col>
</a-col>-->
<!-- <a-col :span="21" :offset="3">
<a-form-model-item :wrapperCol="{span: 23}">
<div style="border: 1px dashed #EEEEEE">
......@@ -281,7 +281,7 @@
</template>
<script>
import {checkPhone, closedDetail, getEnumByFlag} from "../../../utils/common";
import {checkPhone, closedDetail, getEnumByFlag, GetUserInfoByCardDevice} from "../../../utils/common";
import moment from 'moment'
import InStockManageInfo from "./inStockManageInfo";
......@@ -424,6 +424,7 @@
residentId: this.routerParams.id
}
this.$api.folviteDistributionManage.fetchFolviteDistributionDetail(par).then(({data = [], code}) => {
this.formData = {}
this.areaInfo = [{areaCode: data.presentCode, areaName: data.presentCodeName}]
this.formData = {
womanName: data.womanName,
......@@ -440,7 +441,7 @@
signedMode: data.signedMode.toString(),
consentUrl: data.consentUrl,
parentDate: data.parentDate,
provideDate: data.provideDate,
provideDate: moment(new Date()).format('yyyy-MM-DD'),
provideDoctorId: data.provideDoctorId,
provideRecordList: data.provideRecordList,
remarks: data.remarks,
......@@ -450,6 +451,20 @@
this.spinning = false
})
},
getWomenIdCardInfo() {
GetUserInfoByCardDevice().then(res => {
let {cardno, name, address} = res;
this.formData.womanName = name
this.formData.womenIdCard = cardno
})
},
getMenIdCardInfo() {
GetUserInfoByCardDevice().then(res => {
let {cardno, name, address} = res;
this.formData.manName = name
this.formData.menIdCard = cardno
})
},
initLoadAreaData() {
this.areaInfo = []
this.loadAreaData([{areaCode: 0}])
......
......@@ -77,7 +77,7 @@
<img width="120px" height="120px" :src="detailInfo.consentUrl"/>
</a-descriptions-item>
</a-descriptions>
<div class="card_info">
<!-- <div class="card_info">
<a-card class="book" :headStyle="{background: '#FAFAFA'}" v-if="routerParams.source == 2">
<div slot="title" style="text-align: center;">
<span style="color: #262626;font-size: 14px">知情同意书</span>
......@@ -90,7 +90,7 @@
</div>
<div v-if="routerParams.source == 2">
<img style="width: 100%;height: 160px" :src="detailInfo.applySignUrl">
</div>
</div>-->
<!-- <a-descriptions bordered layout="vertical" class="no_border">-->
<!-- <a-descriptions-item label="上传照片">-->
<!-- {{detailInfo.batchNumber || '&#45;&#45;'}}-->
......
......@@ -196,7 +196,7 @@
pageIndex: this.pagination.pageIndex,
pageSize: this.pagination.pageSize
}
this.$api.stockManage.fetchInStockList(par).then(({data = {}}) => {
this.$api.stockManage.fetchInStockNoZeroList(par).then(({data = {}}) => {
const {dataList = [], total = 0} = data
this.tableData = dataList
this.pagination.total = total
......
......@@ -6,14 +6,14 @@
<a-input v-model="searchForm.womenIdCard" placeholder="请输入证件号码" style="width: 250px"></a-input>
</a-form-item>
<a-form-item>
<!-- <a-button class="search_btn" @click="restSearchForm">读卡识别</a-button>-->
<a-button class="search_btn ant-table-btn" @click="getIdCardInfo">读卡识别</a-button>
<a-button type="primary" icon="search" class="search_btn" style="margin-left: 10px" @click="searchList">
搜索
</a-button>
<a-button class="search_btn ant-table-btn" icon="sync" style="margin-left: 10px" @click="restSearchForm">清空
</a-button>
</a-form-item>
<a-button type="primary" icon="plus" 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>
</a-form>
<div style="margin-top: 16px;margin-bottom: 10px"></div>
......@@ -106,7 +106,7 @@
</div>
</template>
<script>
import {isEmptyParams} from "../../utils/common";
import {GetUserInfoByCardDevice, isEmptyParams} from "../../utils/common";
import moment from 'moment'
const columns = [
......@@ -201,6 +201,12 @@
this.getFolviteDistributionList()
},
methods: {
getIdCardInfo() {
GetUserInfoByCardDevice().then(res => {
let {cardno, name, address} = res;
this.searchForm.womenIdCard = cardno
})
},
searchList() {
this.pagination.pageIndex = 1
this.getFolviteDistributionList()
......
......@@ -35,14 +35,12 @@
<a-col :span="12">
<a-form-model-item label="联系地址"
prop="areaCode">
<!-- <allAreaSelect v-model="formData.areaCode"></allAreaSelect>
{{formData.areaName}}-->
<!--@click.native="initLoadAreaData"-->
<a-cascader v-model="formData.areaCode"
change-on-select
:options="areaInfo"
:fieldNames="fieldNames"
:load-data="loadAreaData"
@click.native="initLoadAreaData"
placeholder="请选择"/>
</a-form-model-item>
</a-col>
......@@ -124,6 +122,7 @@
},
created() {
this.queryParams = this.$route.query;
this.initLoadAreaData()
if (this.queryParams.modeType === "update") {
this.$api.common.fetchSupplyById(this.queryParams.id).then(({data, code}) => {
if (code === 'SUCCESS') {
......
......@@ -16,7 +16,7 @@
<a-button type="primary" icon="search" class="search_btn" style="margin-left: 10px" @click="searchList">搜索</a-button>
<a-button class="search_btn ant-table-btn" icon="sync" style="margin-left: 10px" @click="restSearchForm">清空</a-button>
</a-form-item>
<a-button type="primary" icon="plus" 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>
</a-form>
<div style="margin-top: 16px;margin-bottom: 10px"></div>
......
import moment from 'moment';
import storeInfo from '../../store/index'
import router from "../../router";
import jsonp from 'jsonp';
import Veu from 'vue'
//对象、一维数组去重(返回一个新数组)
......@@ -182,4 +183,36 @@ export const isNotBlank = obj => {
return !isBlank(obj)
}
/**
* 根据身份证读卡器读取基本信息
*/
export const GetUserInfoByCardDevice = () => {
let {protocol} = window.location;
let url = protocol === "https:" ? "https://localhost:9199/api/ReadMsg" : "http://localhost:8989/api/ReadMsg";
return new Promise((resolve) => {
// res {code: "-1", retcode: "0x41", retmsg: "读居民身份证操作失败", errmsg: ""}
jsonp(url, {timeout: 3000}, (err, data) => {
if (!err) {
if (data.cardno) {
resolve(data);
} else {
let reg = /\d+/g;
let messageInfo = data.message;
let datault = reg.exec(messageInfo);
let status = datault && datault[0];
if (/^[45]\d+/.test(status)) {
window.parent.parentLibInfo.Antd.message.error('设备连接失败');
} else {
window.parent.parentLibInfo.Antd.message.error(data.retmsg);
}
}
} else if (err && err.message === 'Timeout') {
window.parent.parentLibInfo.Antd.message.error('设备连接失败');
}
});
})
};
import Vue from 'vue'
//input 限制输入字数
//v-toInputNum= {num:4}
Vue.directive('toInputNum', {
// 指令的定义
inserted: function(el, binding, vnode) {
el.addEventListener('input', function () {
if (binding.value) {
checkValue(el, binding.value.num)
} else {
checkValue(el, 50)
}
})
function checkValue(el, defu) {
let len = el.value.length
if (el.value && len > defu) {
el.value = el.value.substring(0, defu);
el.dispatchEvent(new Event("input"));//调用input事件使vue v-model绑定更新
}
}
}
})
......@@ -3065,9 +3065,9 @@ de-indent@^1.0.2:
resolved "https://registry.npm.taobao.org/de-indent/download/de-indent-1.0.2.tgz"
integrity sha1-sgOOhG3DO6pXlhKNCAS0VbjB4h0=
debug@2.6.9, debug@^2.2.0, debug@^2.3.3:
debug@2.6.9, debug@^2.1.3, debug@^2.2.0, debug@^2.3.3:
version "2.6.9"
resolved "https://registry.npm.taobao.org/debug/download/debug-2.6.9.tgz?cache=0&sync_timestamp=1589881689076&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fdebug%2Fdownload%2Fdebug-2.6.9.tgz"
resolved "https://registry.nlark.com/debug/download/debug-2.6.9.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fdebug%2Fdownload%2Fdebug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f"
integrity sha1-XRKFFd8TT/Mn6QpMk/Tgd6U2NB8=
dependencies:
ms "2.0.0"
......@@ -4914,6 +4914,13 @@ jsonfile@^4.0.0:
optionalDependencies:
graceful-fs "^4.1.6"
jsonp@^0.2.1:
version "0.2.1"
resolved "https://registry.npm.taobao.org/jsonp/download/jsonp-0.2.1.tgz#a65b4fa0f10bda719a05441ea7b94c55f3e15bae"
integrity sha1-pltPoPEL2nGaBUQep7lMVfPhW64=
dependencies:
debug "^2.1.3"
jsprim@^1.2.2:
version "1.4.1"
resolved "https://registry.npm.taobao.org/jsprim/download/jsprim-1.4.1.tgz"
......
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