Commit 104f548c authored by 罗成兵's avatar 罗成兵

需求更新

parent dfd7a171
NODE_ENV = dev NODE_ENV = dev
VUE_APP_BASE_URL111 = https://beta-ysservice.yiboshi.com VUE_APP_BASE_URL22 = https://beta-ysservice.yiboshi.com
VUE_APP_BASE_URL1 = https://ys-service.yiboshi.com VUE_APP_BASE_URL1 = https://ys-service.yiboshi.com
VUE_APP_BASE_URL111 = http://59.230.237.90:8115 VUE_APP_BASE_URL111 = http://59.230.237.90:8115
VUE_APP_BASE_URL = http://127.0.0.1:8083 VUE_APP_BASE_URL = http://127.0.0.1:8083
......
...@@ -46,8 +46,8 @@ export default { ...@@ -46,8 +46,8 @@ export default {
fetchAllEnum(params) {//获取所有枚举值 fetchAllEnum(params) {//获取所有枚举值
return fetch(`/basic-info/v1/basic-info/basic-sys-enum/all-enum`, params) return fetch(`/basic-info/v1/basic-info/basic-sys-enum/all-enum`, params)
}, },
fetchAreaByCode(params) {//根据区域编码获取下级地区 fetchAreaByCode(areaCode) {//根据区域编码获取下级地区
return fetch(`/v1/folacin-admin/sys-dict-area/child-area/${params.areaCode}`) return fetch(`/v1/folacin-admin/sys-dict-area/child-area/${areaCode}`)
}, },
//知情同意书 //知情同意书
fetchConsentInfo(params) {//查询单位的知情同意书 fetchConsentInfo(params) {//查询单位的知情同意书
...@@ -199,6 +199,9 @@ export default { ...@@ -199,6 +199,9 @@ export default {
fetchAddFolviteDistribution(params) {//叶酸发放 fetchAddFolviteDistribution(params) {//叶酸发放
return fetch('/v1/folacin-admin/folacin-resident-info/direct-grant', params, 'post', 'json') return fetch('/v1/folacin-admin/folacin-resident-info/direct-grant', params, 'post', 'json')
}, },
fetchApplyDetail(id) {//申请详情
return fetch(`/v1/folacin-admin/folacin-apply-info/${id}`)
},
fetchFolviteDistributionDetail(params) {//叶酸发放查看详情 fetchFolviteDistributionDetail(params) {//叶酸发放查看详情
return fetch(`/v1/folacin-admin/folacin-resident-info/grant-details/${params.residentId}`) return fetch(`/v1/folacin-admin/folacin-resident-info/grant-details/${params.residentId}`)
}, },
...@@ -254,13 +257,16 @@ export default { ...@@ -254,13 +257,16 @@ export default {
}, },
folviteApplyManage: { folviteApplyManage: {
fetchFolviteApplyList(params) {//叶酸申请列表 fetchFolviteApplyList(params) {//叶酸申请列表
return fetch('/v1/folacin-admin/folacin-resident-info/apply', params) return fetch('/v1/folacin-admin/folacin-apply-info/apply', params)
}, },
delFolviteApplyById(params) {//删除叶酸申请 delFolviteApplyById(params) {//删除叶酸申请
return fetch(`/v1/folacin-admin/folacin-resident-info/delete/${params.id}`, params, 'delete', 'json'); return fetch(`/v1/folacin-admin/folacin-apply-info/delete/${params.id}`, params, 'delete', 'json');
},
addFolviteDistributionByApply(params) {
return fetch(`/v1/folacin-admin/folacin-resident-info/apply-grant/${params.id}`, params, "post", 'json');
}, },
addFolviteDistributionByApply(params) {//对申请记录进行发放 addApplyGrant(params) {//对申请记录进行发放
return fetch(`/v1/folacin-admin/folacin-resident-info/apply-grant/${params.applyId}`, params, "post", 'json'); return fetch(`/v1/folacin-admin/folacin-apply-info/apply-grant`, params, "post", 'json');
} }
}, },
fyManage: { fyManage: {
......
<template>
<div>
<a-cascader v-model="areaCode"
:style="{width:width}"
change-on-select
:disabled="disabled"
:options="options"
:fieldNames="fieldNames"
:load-data="loadAreaData"
@change="areaChange"
placeholder="请选择">
</a-cascader>
</div>
</template>
<!--
全国地区级联选择控件,包括回显数据
-->
<script>
export default {
name: "allAreaCascader",
props: ["disabled", "value","width"],
created() {
this.loadAreaData([{areaCode: 0}]);
},
mounted() {
this.handleAreaCode(this.value);
},
data() {
return {
areaCode: undefined,
options: [],
fieldNames: {
label: 'areaName',
value: 'areaCode',
children: 'children'
},
areaData: {},
optionsObj: {},
number3: 0,
number4: 0,
};
},
watch: {
//子组件中直接使用prop1
value(newValue, oldValue) {
this.handleAreaCode(newValue);
//this.$emit( 'propChange', newValue )
}
},
methods: {
handleAreaCode(areaCode) {
if (this.$api.utils.isBlank(areaCode)) {
this.areaCode=[];
return;
}
let level = 1;
if (areaCode.length == 2) {
this.areaCode = [areaCode];
return;
}
let provinceCode = areaCode.substring(0, 2);
let cityCodeFull = areaCode.substring(0, 4) + "00000000";
let countyCode, townshipCode, villageCode;
let countyCodeFull, townshipCodeFull;
level = 2;
if (areaCode.substring(2, 4) != '00') {
level = 3
countyCode = areaCode.substring(0, 6);
countyCodeFull = areaCode.substring(0, 6) + "000000";
if (areaCode.substring(4, 6) != '00') {
level = 4;
townshipCode = areaCode.substring(0, 9);
townshipCodeFull = areaCode.substring(0, 9) + "000";
if (areaCode.substring(6, 9) != '000') {
level = 5;
villageCode = areaCode.substring(0, 12);
}
}
}
let areaCodeList = [provinceCode, cityCodeFull, countyCodeFull, townshipCodeFull, villageCode];
if (level > 1) {
this.$api.common.fetchAreaByCode(provinceCode).then(({data = []}) => {
this.handleData(data, 2, cityCodeFull);
if (level > 2) {
this.$api.common.fetchAreaByCode(cityCodeFull).then(({data = []}) => {
this.handleData(data, 3, cityCodeFull);
if (level > 3) {
this.$api.common.fetchAreaByCode(countyCodeFull).then(({data = []}) => {
this.handleData(data, 4, countyCodeFull);
if (level > 4) {
this.$api.common.fetchAreaByCode(townshipCodeFull).then(({data = []}) => {
this.handleData(data, 5, townshipCodeFull);
this.areaCode = areaCodeList;
this.isEndHandle(provinceCode)
});
} else {
this.isEndHandle(provinceCode)
this.areaCode = areaCodeList;
}
})
} else {
this.areaCode = areaCodeList;
this.isEndHandle(provinceCode)
}
})
} else {
this.areaCode = areaCodeList;
this.isEndHandle(provinceCode)
}
})
} else {
this.areaCode = areaCodeList;
this.isEndHandle(provinceCode)
}
},
isEndHandle(provinceCode) {
this.options.forEach(x => {
if (x.areaCode == provinceCode) {
x.children = this.optionsObj;
}
})
},
handleData(data, level, areaCode) {
if (this.$api.utils.isBlank(data)) {
return;
}
data.forEach(item => {
item['isLeaf'] = item.areaLevel >= 5;
});
if (level == 2) {
this.optionsObj = data;
}
if (level == 3) {
let number3 = 0;
this.optionsObj.forEach(x => {
if (x.areaCode == areaCode) {
x.children = data;
this.number3 = number3;
}
number3++;
})
}
if (level == 4) {
let number4 = 0;
this.optionsObj[this.number3].children.forEach(x => {
if (x.areaCode == areaCode) {
x.children = data;
this.number4 = number4;
}
number4++;
})
}
if (level == 5) {
this.optionsObj[this.number3].children[this.number4].children.forEach(x => {
if (x.areaCode == areaCode) {
x.children = data;
}
})
}
},
loadAreaData(selectedOptions) {
const targetOption = selectedOptions[selectedOptions.length - 1];
targetOption.loading = true;
this.$api.common.fetchAreaByCode(targetOption.areaCode).then(({data = []}) => {
targetOption.loading = false;
if (this.$api.utils.isBlank(data)) {
return;
}
data.forEach(item => {
item['isLeaf'] = item.areaLevel >= 5;
})
if (targetOption.areaCode == 0) {
this.options = [...data];
} else {
targetOption.children = [...data]
this.options = [...this.options]
}
})
},
setValue(areaCode) {
this.handleAreaCode(areaCode);
},
getValue() {
return this.areaCode;
},
areaChange(areaCode) {
this.$emit("input", areaCode[areaCode.length - 1])
}
}
}
</script>
<style scoped>
</style>
\ No newline at end of file
...@@ -14,9 +14,10 @@ ...@@ -14,9 +14,10 @@
* 所有地区选择控件 * 所有地区选择控件
*/ */
export default { export default {
name: "allAreaSelect", name: "allAreaTreeSelect",
created() { created() {},
this.getDataList(53); mounted() {
this.getDataList(0);
}, },
data() { data() {
return { return {
......
...@@ -234,12 +234,12 @@ export default { ...@@ -234,12 +234,12 @@ export default {
if (process.env.NODE_ENV == "dev") { if (process.env.NODE_ENV == "dev") {
let params = { let params = {
id: record.id, id: record.id,
routerFlag: 'update', routerFlag: 'applyGrant',
menuId: this.menuId menuId: this.menuId
} }
this.$router.push({path: '/folviteDistribution/add', query: params}) this.$router.push({path: '/folviteDistribution/add', query: params})
} else { } else {
let now_location = escape(process.env.VUE_APP_LOCATION + `folviteDistribution/add?menuId=${this.menuId}&menuCode=${this.routerParams.menuName}&routerFlag=update&id=` + record.id) let now_location = escape(process.env.VUE_APP_LOCATION + `folviteDistribution/add?menuId=${this.menuId}&menuCode=${this.routerParams.menuName}&routerFlag=applyGrant&id=` + record.id)
window.top.postMessage({messageType: 'THIRD_PAGEADD', title: `叶酸申请`, url: now_location}, '*') window.top.postMessage({messageType: 'THIRD_PAGEADD', title: `叶酸申请`, url: now_location}, '*')
} }
......
...@@ -112,19 +112,10 @@ ...@@ -112,19 +112,10 @@
</a-form-model-item> </a-form-model-item>
</a-col> </a-col>
<a-col :span="24"> <a-col :span="24">
<a-form-model-item label="现住地址" prop="presentCode" :labelCol="{span: 3}" <a-form-model-item label="现住地址" prop="presentCode" :labelCol="{span: 3}"
:wrapperCol="{span: 20}"> :wrapperCol="{span: 8}">
<a-cascader v-model="formData.presentCode" v-if="!disabled" <all-area-cascader :disabled="disabled"
change-on-select v-model="formData.presentCode"></all-area-cascader>
:disabled="disabled"
:options="areaInfo"
:fieldNames="fieldNames"
:load-data="loadAreaData"
placeholder="请选择">
</a-cascader>
<a-input v-else placeholder="" v-model="formData.presentCodeStr"
disabled></a-input>
</a-form-model-item> </a-form-model-item>
</a-col> </a-col>
...@@ -157,7 +148,7 @@ ...@@ -157,7 +148,7 @@
style="width: 100%"/> style="width: 100%"/>
</a-form-model-item> </a-form-model-item>
</a-col> </a-col>
<a-col :span="12" :offset="3" v-if="this.routerParams.routerFlag == 'update'"> <a-col :span="12" :offset="3" v-if="this.routerParams.routerFlag == 'applyGrant'">
<a-form-model-item :wrapperCol="{span: 16}"> <a-form-model-item :wrapperCol="{span: 16}">
<div style="border: 1px dashed #EEEEEE;text-align: center"> <div style="border: 1px dashed #EEEEEE;text-align: center">
<div class="sign">签字</div> <div class="sign">签字</div>
...@@ -183,7 +174,7 @@ ...@@ -183,7 +174,7 @@
<a-col :span="12"> <a-col :span="12">
<a-form-model-item label="发放数量" prop="provideNumber"> <a-form-model-item label="发放数量" prop="provideNumber">
<a-input type="number" placeholder="请输入发放数量" <a-input type="number" placeholder="请输入发放数量"
v-model="formData.provideNumber" :max="10" suffix="瓶" v-model="formData.provideNumber" suffix="瓶"
></a-input> ></a-input>
</a-form-model-item> </a-form-model-item>
</a-col> </a-col>
...@@ -231,10 +222,11 @@ import {checkPhone, closedDetail, getEnumByFlag, GetUserInfoByCardDevice} from " ...@@ -231,10 +222,11 @@ import {checkPhone, closedDetail, getEnumByFlag, GetUserInfoByCardDevice} from "
import {cardType} from "../../../utils/dropDownCollection"; import {cardType} from "../../../utils/dropDownCollection";
import moment from 'moment' import moment from 'moment'
import InStockManageInfo from "./inStockManageInfo"; import InStockManageInfo from "./inStockManageInfo";
import allAreaCascader from "../../../components/allAreaCascader";
let vm = this let vm = this
export default { export default {
components: {InStockManageInfo}, components: {InStockManageInfo, allAreaCascader},
data() { data() {
let unitInfo = JSON.parse(window.sessionStorage.getItem('unitInfo')); let unitInfo = JSON.parse(window.sessionStorage.getItem('unitInfo'));
let userInfo = JSON.parse(window.sessionStorage.getItem('userInfo')); let userInfo = JSON.parse(window.sessionStorage.getItem('userInfo'));
...@@ -262,7 +254,6 @@ export default { ...@@ -262,7 +254,6 @@ export default {
menIdCard: undefined, menIdCard: undefined,
telephone: undefined, telephone: undefined,
presentCode: undefined, presentCode: undefined,
presentCodeStr: unitInfo.areaFullName,
nowAddress: "", nowAddress: "",
signedMode: '2', signedMode: '2',
parentDate: date, parentDate: date,
...@@ -338,6 +329,9 @@ export default { ...@@ -338,6 +329,9 @@ export default {
provideDoctorId: [ provideDoctorId: [
{required: true, message: '请选择发放医生'} {required: true, message: '请选择发放医生'}
], ],
presentCode: [
{required: true, message: '请选现住地址'}
],
sendNumber: [ sendNumber: [
{required: true, message: '请输入发放数量'}, {required: true, message: '请输入发放数量'},
{ {
...@@ -391,15 +385,16 @@ export default { ...@@ -391,15 +385,16 @@ export default {
}); });
this.getBookHtmlContent() this.getBookHtmlContent()
this.getAllDoctorList() this.getAllDoctorList()
this.initLoadAreaData()
this.modelType = this.routerParams.routerFlag; this.modelType = this.routerParams.routerFlag;
if (this.modelType == 'update' || this.modelType == 'updateRecord') {//从申请过来的发放 if (this.modelType == 'applyGrant' || this.modelType == 'updateRecord') {//从申请过来的发放
if (this.modelType == 'update') { if (this.modelType == 'applyGrant') {
this.disabled = true; this.disabled = true;
} this.getApplyDetail()
} else {
this.getStockListDetail() this.getStockListDetail()
}
} else {//由新增过来的发放 } else {//由新增过来的发放
this.initLoadAreaData() this.formData.presentCode = this.unitInfo.areaCode
} }
}, },
methods: { methods: {
...@@ -454,6 +449,41 @@ export default { ...@@ -454,6 +449,41 @@ export default {
callback() callback()
} }
}, },
//获取申请详情
getApplyDetail() {
this.spinning = true;
this.$api.folviteDistributionManage.fetchApplyDetail(this.routerParams.id).then(({data = [], code}) => {
this.formData = {
applyId:data.id,
height: data.height,
weight: data.weight,
birthDate: data.birthDate,
womanName: data.womanName,
womenCertificateType: data.womenCertificateType.toString(),
womenIdCard: data.womenIdCard,
provideNumber: data.provideNumber,
telephone: data.telephone,
presentCode: data.presentCode,
nowAddress: data.nowAddress,
signedMode: data.signedMode ? data.signedMode.toString() : "1",
applySignUrl: data.applySignUrl,
parentDate: data.parentDate,
provideDate: moment(new Date()).format('yyyy-MM-DD'),
remarks: data.remarks,
provideDoctorId: this.userInfo.relationId,
recommendEat: '1颗/天(0.4mg/天)',
}
this.formData.bmi = !this.formData.height || this.formData.height == 0 ? '-' : this.formData.weight / this.formData.height ? (this.formData.weight / ((this.formData.height / 100) * (this.formData.height / 100))).toFixed(2) : '-';
if (this.formData.bmi >= 28) {
this.formData.recommendEat = "2颗/天(0.8mg/天)";
}
this.changeWomenCardType()
this.changeMenCardType()
this.spinning = false;
}).catch(() => {
this.spinning = false
})
},
getStockListDetail() { getStockListDetail() {
this.spinning = true; this.spinning = true;
let par = { let par = {
...@@ -461,8 +491,8 @@ export default { ...@@ -461,8 +491,8 @@ export default {
menuId: this.routerParams.menuId menuId: this.routerParams.menuId
} }
this.$api.folviteDistributionManage.fetchFolviteDistributionDetail(par).then(({data = [], code}) => { this.$api.folviteDistributionManage.fetchFolviteDistributionDetail(par).then(({data = [], code}) => {
// this.areaInfo = [{areaCode: data.presentCode, areaName: data.presentCodeName}];
this.formData = { this.formData = {
id: data.id,
height: data.height, height: data.height,
weight: data.weight, weight: data.weight,
birthDate: data.birthDate, birthDate: data.birthDate,
...@@ -473,9 +503,9 @@ export default { ...@@ -473,9 +503,9 @@ export default {
pregnantNum: data.pregnantNum, pregnantNum: data.pregnantNum,
provideNumber: data.provideNumber, provideNumber: data.provideNumber,
telephone: data.telephone, telephone: data.telephone,
presentCode: [data.presentCode], presentCode: data.presentCode,
nowAddress: data.nowAddress, nowAddress: data.nowAddress,
signedMode: data.signedMode.toString(), signedMode: data.signedMode ? data.signedMode.toString() : "1",
applySignUrl: data.applySignUrl, applySignUrl: data.applySignUrl,
parentDate: data.parentDate, parentDate: data.parentDate,
provideDate: moment(new Date()).format('yyyy-MM-DD'), provideDate: moment(new Date()).format('yyyy-MM-DD'),
...@@ -483,7 +513,6 @@ export default { ...@@ -483,7 +513,6 @@ export default {
provideRecordList: data.provideRecordList, provideRecordList: data.provideRecordList,
remarks: data.remarks, remarks: data.remarks,
recommendEat: data.recommendEat, recommendEat: data.recommendEat,
presentCodeStr: data.presentCodeName
} }
this.formData.bmi = !this.formData.height || this.formData.height == 0 ? '-' : this.formData.weight / this.formData.height ? (this.formData.weight / ((this.formData.height / 100) * (this.formData.height / 100))).toFixed(2) : '-'; this.formData.bmi = !this.formData.height || this.formData.height == 0 ? '-' : this.formData.weight / this.formData.height ? (this.formData.weight / ((this.formData.height / 100) * (this.formData.height / 100))).toFixed(2) : '-';
if (this.formData.bmi >= 28) { if (this.formData.bmi >= 28) {
...@@ -495,7 +524,6 @@ export default { ...@@ -495,7 +524,6 @@ export default {
if (data.question) { if (data.question) {
let questionList = data.question.split(","); let questionList = data.question.split(",");
this.checkedList = questionList; this.checkedList = questionList;
console.log(questionList)
} }
if (this.formData.womenCertificateType == '1') { if (this.formData.womenCertificateType == '1') {
let length = this.formData.womenIdCard.length; let length = this.formData.womenIdCard.length;
...@@ -506,9 +534,10 @@ export default { ...@@ -506,9 +534,10 @@ export default {
this.formData.birthDate = year + "-" + moth + "-" + day; this.formData.birthDate = year + "-" + moth + "-" + day;
} }
} }
this.formData.recommendEat = data.recommendEat;
this.changeWomenCardType() this.changeWomenCardType()
this.changeMenCardType() this.changeMenCardType()
this.spinning = false this.spinning = false;
}).catch(() => { }).catch(() => {
this.spinning = false this.spinning = false
}) })
...@@ -518,11 +547,9 @@ export default { ...@@ -518,11 +547,9 @@ export default {
if (data == null) { if (data == null) {
return; return;
} }
//this.areaInfo={areaCode: data.presentCode, areaName: data.presentCodeName};
this.formData.womanName = data.residentName; this.formData.womanName = data.residentName;
this.formData.telephone = data.telephone; this.formData.telephone = data.telephone;
this.formData.presentCode = data.presentCode; this.formData.presentCode = data.presentCode;
this.formData.presentCodeStr = data.presentCodeStr;
this.formData.nowAddress = data.nowAddress; this.formData.nowAddress = data.nowAddress;
}).catch(() => { }).catch(() => {
}) })
...@@ -539,31 +566,6 @@ export default { ...@@ -539,31 +566,6 @@ export default {
this.formData.birthDate = year + "-" + moth + "-" + day; this.formData.birthDate = year + "-" + moth + "-" + day;
}) })
}, },
initLoadAreaData() {
this.areaInfo = [];
this.loadAreaData([{areaCode: 0}]);
},
loadAreaData(selectedOptions) {
const targetOption = selectedOptions[selectedOptions.length - 1];
targetOption.loading = true;
let par = {
menuId: this.routerParams.menuId,
areaCode: targetOption.areaCode
}
this.$api.common.fetchAreaByCode(par).then(({data = []}) => {
targetOption.loading = false;
data.forEach(item => {
item['isLeaf'] = item.areaLevel >= 5;
})
if (targetOption.areaCode == 0) {
this.areaInfo = [...data]
} else {
targetOption.children = [...data]
this.areaInfo = [...this.areaInfo]
}
})
},
getBookHtmlContent() {//获取用户知情书模板 getBookHtmlContent() {//获取用户知情书模板
let par = { let par = {
menuId: this.routerParams.menuId menuId: this.routerParams.menuId
...@@ -594,18 +596,13 @@ export default { ...@@ -594,18 +596,13 @@ export default {
this.modalinfo.selectedRowKeys = [...val] this.modalinfo.selectedRowKeys = [...val]
this.getSelectedMedical(val) this.getSelectedMedical(val)
}, },
// 删除药具
confirm(index) {
this.formData.provideRecordList.splice(index, 1);
},
changeWomenCardType() { changeWomenCardType() {
let cardInfo = this.cardType.filter(item => item.id == this.formData.womenCertificateType) let cardInfo = this.cardType.filter(item => item.id == this.formData.womenCertificateType)
this.formRules.womenIdCard = cardInfo[0].rule this.formRules.womenIdCard = cardInfo[0].rule;
}, },
changeMenCardType() { changeMenCardType() {
let cardInfo = this.cardType.filter(item => item.id == this.formData.menCertificateType) let cardInfo = this.cardType.filter(item => item.id == this.formData.menCertificateType)
this.formRules.menIdCard = cardInfo[0].rule this.formRules.menIdCard = cardInfo[0].rule;
}, },
getSelectedMedical(val) {//获取被选中的药具 getSelectedMedical(val) {//获取被选中的药具
if (val.length > 0) { if (val.length > 0) {
...@@ -632,6 +629,7 @@ export default { ...@@ -632,6 +629,7 @@ export default {
this.spinning = true; this.spinning = true;
let params = {}; let params = {};
const { const {
id,
parentDate, parentDate,
provideNumber, provideNumber,
provideDate, provideDate,
...@@ -643,12 +641,13 @@ export default { ...@@ -643,12 +641,13 @@ export default {
let provideTme = moment(provideDate).format('YYYY-MM-DD') let provideTme = moment(provideDate).format('YYYY-MM-DD')
let presentCodeInfo = ""; let presentCodeInfo = "";
if (presentCode != null && presentCode.length > 1) { if (presentCode != null && presentCode.length > 1) {
presentCodeInfo = presentCode[presentCode.length - 1]; presentCodeInfo = presentCode;
} else { } else {
presentCodeInfo = this.unitInfo.areaCode; presentCodeInfo = this.unitInfo.areaCode;
} }
let provideDoctorInfo = vm.doctorInfoList.filter(item => item.id == provideDoctorId) let provideDoctorInfo = vm.doctorInfoList.filter(item => item.id == provideDoctorId)
params = { params = {
id:id,
parentDate: parentTime, parentDate: parentTime,
provideDate: provideTme, provideDate: provideTme,
presentCode: presentCodeInfo, presentCode: presentCodeInfo,
...@@ -663,9 +662,9 @@ export default { ...@@ -663,9 +662,9 @@ export default {
title: msg, title: msg,
okType: 'success', okType: 'success',
onOk: () => { onOk: () => {
if (this.modelType == 'update' || this.modelType == 'updateRecord') { if (this.modelType == 'applyGrant') {
params.applyId = vm.routerParams.id params.applyId = vm.formData.applyId
this.$api.folviteApplyManage.addFolviteDistributionByApply(params).then(({code}) => { this.$api.folviteApplyManage.addApplyGrant(params).then(({code}) => {
vm.spinning = false; vm.spinning = false;
if (code === 'SUCCESS') { if (code === 'SUCCESS') {
this.$message.success('发放成功!'); this.$message.success('发放成功!');
...@@ -673,19 +672,30 @@ export default { ...@@ -673,19 +672,30 @@ export default {
} }
}).catch(() => { }).catch(() => {
vm.spinning = false vm.spinning = false
});
return;
}
if (this.modelType == 'updateRecord') {
this.$api.folviteApplyManage.addFolviteDistributionByApply(params).then(({code}) => {
vm.spinning = false;
if (code === 'SUCCESS') {
this.$message.success('修改成功!');
this.goBack()
}
}).catch(() => {
vm.spinning = false
}) })
} else { return;
}
this.$api.folviteDistributionManage.fetchAddFolviteDistribution(params).then(({code}) => { this.$api.folviteDistributionManage.fetchAddFolviteDistribution(params).then(({code}) => {
vm.spinning = false; vm.spinning = false;
if (code === 'SUCCESS') { if (code === 'SUCCESS') {
let showMsg = this.modelType == 'updateRecord' ? '修改成功!' : '发放成功!' vm.$message.success('发放成功!');
vm.$message.success(showMsg); this.goBack()
vm.goBack()
} }
}).catch(() => { }).catch(() => {
vm.spinning = false vm.spinning = false
}) })
}
}, },
onCancel: () => { onCancel: () => {
vm.spinning = false; vm.spinning = false;
...@@ -695,6 +705,7 @@ export default { ...@@ -695,6 +705,7 @@ export default {
}); });
}, },
womenIdCardChange() { womenIdCardChange() {
console.log(this.formData.presentCode)
if (!this.formData.womenIdCard) { if (!this.formData.womenIdCard) {
return return
} }
...@@ -723,6 +734,7 @@ export default { ...@@ -723,6 +734,7 @@ export default {
}) })
}, },
goBack() { goBack() {
this.formData = {};
if (process.env.NODE_ENV !== "dev") { if (process.env.NODE_ENV !== "dev") {
window.top.postMessage({ window.top.postMessage({
messageType: 'THIRD_PAGECHANGE', messageType: 'THIRD_PAGECHANGE',
...@@ -731,7 +743,7 @@ export default { ...@@ -731,7 +743,7 @@ export default {
}, '*'); }, '*');
return; return;
} }
if (this.routerParams.routerFlag == "update") { if (this.routerParams.routerFlag == "applyGrant") {
this.$router.push("/Home/folviteApply"); this.$router.push("/Home/folviteApply");
closedDetail('/inStock/addMaterialDistribution', '/Home/folviteApply'); closedDetail('/inStock/addMaterialDistribution', '/Home/folviteApply');
} else { } else {
......
...@@ -54,17 +54,17 @@ ...@@ -54,17 +54,17 @@
<a-descriptions-item label="详细地址"> <a-descriptions-item label="详细地址">
{{ detailInfo.nowAddress || '--' }} {{ detailInfo.nowAddress || '--' }}
</a-descriptions-item> </a-descriptions-item>
<a-descriptions-item label="签署方式" :span="routerParams.source == 2 ? 2: 1"> <a-descriptions-item label="签署方式" :span="detailInfo.source == 2 ? 2: 1">
{{ detailInfo.signedModeName || '--' }} {{ detailInfo.signedModeName || '--' }}
</a-descriptions-item> </a-descriptions-item>
<a-descriptions-item label="签署日期" :span="routerParams.source == 2 ? 2: 1"> <a-descriptions-item label="签署日期" :span="detailInfo.source == 2 ? 2: 1">
{{ detailInfo.parentDate || '--' }} {{ detailInfo.parentDate || '--' }}
</a-descriptions-item> </a-descriptions-item>
<a-descriptions-item label="上传照片" v-if="routerParams.source != 2"> <a-descriptions-item label="上传照片" v-if="detailInfo.source != 2">
<img style="cursor: pointer" width="120px" height="120px" :src="detailInfo.consentUrl" <img style="cursor: pointer" width="120px" height="120px" :src="detailInfo.consentUrl"
@click="showVisible=true"/> @click="showVisible=true"/>
</a-descriptions-item> </a-descriptions-item>
<a-descriptions-item label="签名" v-if="routerParams.source == 2"> <a-descriptions-item label="签名" v-if="detailInfo.source == 2">
<img style="margin-left: 30px;width: auto;height: 80px;transform: rotate(-90deg)" <img style="margin-left: 30px;width: auto;height: 80px;transform: rotate(-90deg)"
:src="detailInfo.applySignUrl"> :src="detailInfo.applySignUrl">
</a-descriptions-item> </a-descriptions-item>
...@@ -77,7 +77,10 @@ ...@@ -77,7 +77,10 @@
</div> </div>
<a-descriptions bordered class="folvite_title"> <a-descriptions bordered class="folvite_title">
<a-descriptions-item label="结果" > <a-descriptions-item label="结果" >
<div v-if="checkedList&&checkedList.length>0">
<p v-for="item in checkedList ">{{item}}</p> <p v-for="item in checkedList ">{{item}}</p>
</div>
<p v-else>--</p>
</a-descriptions-item> </a-descriptions-item>
<a-descriptions-item label="建议服用"> <a-descriptions-item label="建议服用">
{{ detailInfo.recommendEat || '--' }} {{ detailInfo.recommendEat || '--' }}
...@@ -159,7 +162,6 @@ export default { ...@@ -159,7 +162,6 @@ export default {
this.spinning = true this.spinning = true
let par = { let par = {
residentId: this.routerParams.id, residentId: this.routerParams.id,
menuId: this.routerParams.menuId
} }
this.$api.folviteDistributionManage.fetchFolviteDistributionDetail(par).then(({data = [], code}) => { this.$api.folviteDistributionManage.fetchFolviteDistributionDetail(par).then(({data = [], code}) => {
this.spinning = false; this.spinning = false;
......
...@@ -38,9 +38,9 @@ ...@@ -38,9 +38,9 @@
<template slot="nowAddress" slot-scope="text, record"> <template slot="nowAddress" slot-scope="text, record">
<a-tooltip placement="top"> <a-tooltip placement="top">
<template slot="title"> <template slot="title">
<span> {{ record.presentCodeName + record.nowAddress }}</span> <span> {{ (record.presentCodeName||"") + record.nowAddress }}</span>
</template> </template>
<span class="ellipsis">{{ record.presentCodeName + record.nowAddress }}</span> <span class="ellipsis">{{ (record.presentCodeName||"") + record.nowAddress }}</span>
</a-tooltip> </a-tooltip>
</template> </template>
<template slot="action" slot-scope="record"> <template slot="action" slot-scope="record">
...@@ -134,7 +134,7 @@ ...@@ -134,7 +134,7 @@
</template> </template>
<script> <script>
import {GetUserInfoByCardDevice, isEmptyParams} from "../../utils/common"; import {GetUserInfoByCardDevice, isEmptyParams} from "../../utils/common";
import moment from 'moment'
const columns = [ const columns = [
{ {
...@@ -296,7 +296,7 @@ export default { ...@@ -296,7 +296,7 @@ export default {
if (process.env.NODE_ENV == "dev") { if (process.env.NODE_ENV == "dev") {
let par = { let par = {
menuId: this.menuId, menuId: this.menuId,
...record id:record.id
} }
this.$router.push({path: '/folviteDistribution/detail', query: par}) this.$router.push({path: '/folviteDistribution/detail', query: par})
} else { } else {
...@@ -314,7 +314,7 @@ export default { ...@@ -314,7 +314,7 @@ export default {
this.$router.push({path: '/folviteDistribution/add', query: params}) this.$router.push({path: '/folviteDistribution/add', query: params})
} else { } else {
let now_location = escape(process.env.VUE_APP_LOCATION + `folviteDistribution/add?menuId=${this.menuId}&menuCode=${this.routerParams.menuName}&routerFlag=updateRecord&id=` + record.id) let now_location = escape(process.env.VUE_APP_LOCATION + `folviteDistribution/add?menuId=${this.menuId}&menuCode=${this.routerParams.menuName}&routerFlag=updateRecord&id=` + record.id)
window.top.postMessage({messageType: 'THIRD_PAGEADD', title: `叶酸申请`, url: now_location}, '*') window.top.postMessage({messageType: 'THIRD_PAGEADD', title: `叶酸发放登记修改-`+record.womanName, url: now_location}, '*')
} }
}, },
deleteRecord(record) { deleteRecord(record) {
...@@ -414,6 +414,12 @@ export default { ...@@ -414,6 +414,12 @@ export default {
} }
}, },
mounted() {
let that=this;
window.addEventListener("message",function (data){
that.getDataList();
});
}
} }
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
...@@ -445,4 +451,9 @@ export default { ...@@ -445,4 +451,9 @@ export default {
white-space: nowrap; white-space: nowrap;
overflow: hidden; overflow: hidden;
} }
///deep/ .ant-table-tbody{
// > tr:hover:not(.ant-table-expanded-row) > td,.ant-table-row-hover,.ant-table-row-hover>td{
// background:darkcyan !important;
// }
//}
</style> </style>
...@@ -84,11 +84,10 @@ ...@@ -84,11 +84,10 @@
</template> </template>
<script> <script>
import moment from 'moment' import moment from 'moment'
import allAreaSelect from '../../../components/allAreaSelect'
import {checkPhone, closedDetail} from "../../../utils/common"; import {checkPhone, closedDetail} from "../../../utils/common";
export default { export default {
components: {allAreaSelect}, components: {},
data() { data() {
return { return {
subLoad: false, subLoad: false,
...@@ -155,11 +154,7 @@ ...@@ -155,11 +154,7 @@
loadAreaData(selectedOptions) { loadAreaData(selectedOptions) {
const targetOption = selectedOptions[selectedOptions.length - 1]; const targetOption = selectedOptions[selectedOptions.length - 1];
targetOption.loading = true; targetOption.loading = true;
let par = { this.$api.common.fetchAreaByCode(targetOption.areaCode).then(({data = []}) => {
menuId: this.queryParams.menuId,
areaCode: targetOption.areaCode
}
this.$api.common.fetchAreaByCode(par).then(({data = []}) => {
targetOption.loading = false; targetOption.loading = false;
data.forEach(item => { data.forEach(item => {
item['isLeaf'] = item.areaLevel >= 5; item['isLeaf'] = item.areaLevel >= 5;
......
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