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

需求更新

parent fafa6b6f
...@@ -112,9 +112,10 @@ ...@@ -112,9 +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: 20}">
<a-cascader v-model="formData.presentCode" <a-cascader v-model="formData.presentCode" v-if="!disabled"
change-on-select change-on-select
:disabled="disabled" :disabled="disabled"
:options="areaInfo" :options="areaInfo"
...@@ -122,7 +123,8 @@ ...@@ -122,7 +123,8 @@
:load-data="loadAreaData" :load-data="loadAreaData"
placeholder="请选择"> placeholder="请选择">
</a-cascader> </a-cascader>
<span>{{ formData.presentCodeStr }}</span> <a-input v-else placeholder="" v-model="formData.presentCodeStr"
disabled></a-input>
</a-form-model-item> </a-form-model-item>
</a-col> </a-col>
...@@ -656,12 +658,12 @@ export default { ...@@ -656,12 +658,12 @@ export default {
...others ...others
} }
params.menuId = this.routerParams.menuId; params.menuId = this.routerParams.menuId;
let msg=this.modelType=='add'?'确定提交发放吗?':'确定提交修改吗?' let msg = this.modelType == 'updateRecord' ? '确定提交修改吗?' : '确定提交发放吗?'
this.$confirm({ this.$confirm({
title: msg, title: msg,
okType: 'success', okType: 'success',
onOk: () => { onOk: () => {
if (vm.routerParams.routerFlag == 'update') { if (this.modelType == 'update' || this.modelType == 'updateRecord') {
params.applyId = vm.routerParams.id params.applyId = vm.routerParams.id
this.$api.folviteApplyManage.addFolviteDistributionByApply(params).then(({code}) => { this.$api.folviteApplyManage.addFolviteDistributionByApply(params).then(({code}) => {
vm.spinning = false; vm.spinning = false;
...@@ -676,7 +678,8 @@ export default { ...@@ -676,7 +678,8 @@ export default {
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') {
vm.$message.success('发放成功!'); let showMsg = this.modelType == 'updateRecord' ? '修改成功!' : '发放成功!'
vm.$message.success(showMsg);
vm.goBack() vm.goBack()
} }
}).catch(() => { }).catch(() => {
...@@ -720,11 +723,14 @@ export default { ...@@ -720,11 +723,14 @@ export default {
}) })
}, },
goBack() { goBack() {
// window.top.postMessage({ if (process.env.NODE_ENV !== "dev") {
// messageType: 'THIRD_PAGECHANGE', window.top.postMessage({
// name: `${this.routerParams.menuCode}`, messageType: 'THIRD_PAGECHANGE',
// source: "yesuan" name: `${this.routerParams.menuCode}`,
// }, '*') source: "yesuan"
}, '*');
return;
}
if (this.routerParams.routerFlag == "update") { if (this.routerParams.routerFlag == "update") {
this.$router.push("/Home/folviteApply"); this.$router.push("/Home/folviteApply");
closedDetail('/inStock/addMaterialDistribution', '/Home/folviteApply'); closedDetail('/inStock/addMaterialDistribution', '/Home/folviteApply');
...@@ -732,7 +738,7 @@ export default { ...@@ -732,7 +738,7 @@ export default {
this.$router.push("/Home/folviteDistribution"); this.$router.push("/Home/folviteDistribution");
closedDetail('/inStock/addMaterialDistribution', '/Home/folviteDistribution') closedDetail('/inStock/addMaterialDistribution', '/Home/folviteDistribution')
} }
} },
} }
} }
</script> </script>
......
...@@ -74,6 +74,7 @@ ...@@ -74,6 +74,7 @@
:multiple="true" :multiple="true"
:action="uploadAction" :action="uploadAction"
:headers="headers" :headers="headers"
@reject="handleReject"
@preview="preview" @preview="preview"
@change="handleChange" @change="handleChange"
:file-list="fileList" :file-list="fileList"
...@@ -312,7 +313,7 @@ export default { ...@@ -312,7 +313,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=update&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: `叶酸申请`, url: now_location}, '*')
} }
}, },
...@@ -355,18 +356,32 @@ export default { ...@@ -355,18 +356,32 @@ export default {
handleChange(info) { handleChange(info) {
let fileList = [...info.fileList]; let fileList = [...info.fileList];
fileList = fileList.slice(-1); fileList = fileList.slice(-1);
let isFail = false;
fileList = fileList.map(file => { fileList = fileList.map(file => {
if (file.response) { if (file.response) {
if (file.response.code != 'SUCCESS') {
isFail = true;
return;
}
this.consentUrl = file.response.data.trueDownloadUrl; this.consentUrl = file.response.data.trueDownloadUrl;
this.formData.consentId = file.response.data.id; this.formData.consentId = file.response.data.id;
} }
return file; return file;
}); });
if (isFail) {
this.formData.consentId = "";
this.$message.warning("文件上传失败");
return;
}
if (fileList.length == 0) { if (fileList.length == 0) {
this.formData.consentId = ""; this.formData.consentId = "";
} }
this.fileList = fileList; this.fileList = fileList;
}, },
handleReject(info) {
this.$message.warning('请上传JPG、PNG格式图片');
return false;
},
preview(val) { preview(val) {
window.open(val.response.data.trueDownloadUrl) window.open(val.response.data.trueDownloadUrl)
}, },
......
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