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

需求更新

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