1.修复bug

master
x_z 3 years ago
parent f4a1420388
commit 771bf8aebb

@ -799,7 +799,7 @@ export default {
handleModifyClick(row) { handleModifyClick(row) {
this.editDialogVisible = true; this.editDialogVisible = true;
this.editQuery = row; this.editQuery = row;
this.checked = false;
this.isUseDyValue = row.isUseDy == 1; this.isUseDyValue = row.isUseDy == 1;
let ttquery = { let ttquery = {

@ -390,7 +390,7 @@
</el-col> </el-col>
<el-col :span="12" class="el-col"> <el-col :span="12" class="el-col">
<el-form-item label="状态" prop="status" class="query-form-item"> <el-form-item label="状态" prop="status" class="query-form-item">
<el-radio-group v-model="formData.status" @change="statusChange"> <el-radio-group v-model="formData.status">
<el-radio :label="0">禁用</el-radio> <el-radio :label="0">禁用</el-radio>
<el-radio :label="1">正常</el-radio> <el-radio :label="1">正常</el-radio>
</el-radio-group> </el-radio-group>
@ -763,7 +763,6 @@ export default {
}); });
}) })
.catch(() => { .catch(() => {
this.$message.info("取消删除");
}); });
} }
}, },
@ -885,6 +884,10 @@ export default {
}); });
}, },
addUserData() { addUserData() {
if (this.selectUserList.length === 0) {
this.$message.error("请选择需要添加的用户");
return;
}
this.userFormVisible = false; this.userFormVisible = false;
let query = { let query = {
code: this.currentCode, code: this.currentCode,
@ -904,20 +907,6 @@ export default {
this.$message.error("添加失败"); this.$message.error("添加失败");
}); });
}, },
statusChange() {
if (this.formData.status == 0) {
let query = {
code: this.formData.code
};
disableWarehouse(query).then((res) => {
if (res.code != 20000) {
this.formData.status = 1;
this.$message.error(res.message);
}
}).catch((error) => {
});
}
},
addBussinessType() { addBussinessType() {
if (this.currentCode == null || this.currentCode == "") { if (this.currentCode == null || this.currentCode == "") {
this.$message.error("请先选择仓库"); this.$message.error("请先选择仓库");

@ -317,8 +317,16 @@ export default {
this.company = response.data; this.company = response.data;
}); });
}, },
//
resetForm() {
this.$nextTick(() => {
this.$refs["passwordFormData"].resetFields();
this.$refs["passwordFormData"].clearValidate();
});
},
// //
handlePassword() { handlePassword() {
this.resetForm();
this.passwordFormVisible = true; this.passwordFormVisible = true;
this.passwordFormData = { this.passwordFormData = {
oldPassword: "", oldPassword: "",

@ -59,13 +59,6 @@
>编辑 >编辑
</el-button </el-button
> >
<!-- <el-button
type="text"
size="small"
@click.native.stop="handleLinkClick(scope.row)"
>关联自助平台
</el-button
>-->
<el-button <el-button
type="text" type="text"
size="small" size="small"
@ -92,7 +85,7 @@
:close-on-click-modal="false" :close-on-click-modal="false"
:close-on-press-escape="false" :close-on-press-escape="false"
> >
<el-form :model="editQuery" ref="editQuery" :rules="rules"> <el-form :model="editQuery" ref="editQuery">
<el-row :gutter="20" class="el-row"> <el-row :gutter="20" class="el-row">
<el-col :span="10"> <el-col :span="10">
<div class="text item"> <div class="text item">
@ -114,7 +107,7 @@
<div class="itemTag"> <div class="itemTag">
<span>企业自定义ID&nbsp;</span> <span>企业自定义ID&nbsp;</span>
</div> </div>
<el-form-item prop="erpId"> <el-form-item prop="thirdId">
<el-input v-model="editQuery.thirdId" style="width: 80%" auto-complete="off" <el-input v-model="editQuery.thirdId" style="width: 80%" auto-complete="off"
></el-input> ></el-input>
</el-form-item> </el-form-item>
@ -194,7 +187,7 @@
<div class="itemTag"> <div class="itemTag">
<span>拼音码&nbsp;</span> <span>拼音码&nbsp;</span>
</div> </div>
<el-form-item prop="spell"> <el-form-item prop="pinyinCode">
<el-input v-model="editQuery.pinyinCode" auto-complete="off" <el-input v-model="editQuery.pinyinCode" auto-complete="off"
style="width: 80%"></el-input> style="width: 80%"></el-input>
</el-form-item> </el-form-item>
@ -205,102 +198,13 @@
</el-form> </el-form>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
<el-button @click.native="cancelDialog" size="small">取消</el-button> <el-button @click="cancelDialog" size="small">取消</el-button>
<el-button type="primary" size="small" @click.native="formSubmit()" <el-button type="primary" size="small" @click="formSubmit()"
>提交 >提交
</el-button </el-button
> >
</div> </div>
</el-dialog> </el-dialog>
<el-dialog
:title="editTypeMap[editType]"
:visible.sync="editLoginVisible"
:close-on-click-modal="false"
:close-on-press-escape="false"
width="40%"
>
<el-form :model="editLogin" ref="editLogin" :rules="platformRules">
<el-row :gutter="20" class="el-row" type="flex">
<el-col :span="15" class="el-col" type="flex">
<div class="edit-text">
<el-form-item label="自助平台名称:" prop="platformId">
<el-select
v-model="editLogin.platformId"
style="width: 90%"
@change="intentPlatform"
placeholder="请选择自助平台"
>
<el-option
v-for="item in platformList"
:key="item.platformId"
:label="item.name"
:value="item.id"
>
</el-option>
</el-select>
</el-form-item>
</div>
</el-col>
</el-row>
<el-row :gutter="20" class="el-row" type="flex">
<el-col :span="15" class="el-col" type="flex">
<div class="text item">
<el-form-item label="账号:" prop="platformUsername">
<el-input
v-model="editLogin.platformUsername"
style="width: 80%"
size="small"
@input="change()"
></el-input>
</el-form-item>
</div>
</el-col>
</el-row>
<el-row :gutter="20" class="el-row" type="flex">
<el-col :span="15" class="el-col" type="flex">
<div class="text item">
<el-form-item label="密码:" prop="platformPassword">
<el-input
v-model="editLogin.platformPassword"
style="width: 80%"
size="small"
@input="change()"
></el-input>
</el-form-item>
</div>
</el-col>
</el-row>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click.native.stop="cancelDialog" size="small">取消</el-button>
<el-button type="primary" size="small" @click.native="linkSubmit()"
>提交
</el-button
>
</div>
</el-dialog>
<el-dialog title="选择自助平台" :visible.sync="platformVisible" width="35%">
<el-table
v-loading="loading"
@row-click="intentPlatform"
:data="platformList"
style="width: 100%"
>
<el-table-column
label="序号"
type="index"
width="80"
></el-table-column>
<el-table-column
label="自助平台名称"
prop="name"
width="140"
></el-table-column>
</el-table>
</el-dialog>
</div> </div>
</template> </template>
@ -330,13 +234,11 @@ export default {
unitId: null, unitId: null,
thirdId: null, thirdId: null,
name: null, name: null,
spell: null,
creditNo: null, creditNo: null,
pinyinCode: null, pinyinCode: null,
contact: null, contact: null,
mobile: null, mobile: null,
corpType: null, corpType: null
outType: null
}, },
editLogin: { editLogin: {
platformId: null, platformId: null,
@ -353,27 +255,12 @@ export default {
}, },
spellUpdate: true, spellUpdate: true,
platformVisible: false, platformVisible: false,
editLoginVisible: false,
checked: false, checked: false,
editDialogVisible: false, editDialogVisible: false,
list: [], list: [],
platformList: [], platformList: [],
total: 0, total: 0,
multipleSelection: [], multipleSelection: [],
rules: {
name: [
{required: true, message: "请输入往来单位名称", trigger: "change"}
],
creditNo: [
{required: true, message: "请输入社会信用号", trigger: "change"}
],
corpType: [
{required: true, message: "请选择往来单位类型", trigger: "change"}
],
pinyinCode: [
{required: true, message: "请输入拼音码", trigger: "change"}
]
},
editType: 0, editType: 0,
editTypeMap: { editTypeMap: {
0: "新增往来单位", 0: "新增往来单位",
@ -415,6 +302,12 @@ export default {
}; };
this.getList(); this.getList();
}, },
//
resetForm() {
this.$nextTick(() => {
this.$refs['editQuery'].resetFields();
});
},
search() { search() {
this.query.page = 1; this.query.page = 1;
this.getList(); this.getList();
@ -468,7 +361,7 @@ export default {
cancelDialog() { cancelDialog() {
this.editDialogVisible = false; this.editDialogVisible = false;
this.editLoginVisible = false; this.getList();
}, },
handleModifyClick(row) { handleModifyClick(row) {
@ -476,35 +369,10 @@ export default {
this.editDialogVisible = true; this.editDialogVisible = true;
this.editQuery = row; this.editQuery = row;
}, },
handleLinkClick(row) {
if (row.platformId != null) {
//
this.$confirm("是否需要重新关联自助平台?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(() => {
this.editType = 2;
this.editLoginVisible = true;
this.editLogin = row;
}).catch(() => {
});
} else {
this.editType = 2;
this.editLoginVisible = true;
this.editLogin = row;
}
},
handleAddClick() { handleAddClick() {
this.editType = 0; this.editType = 0;
this.editDialogVisible = true; this.editDialogVisible = true;
this.editQuery = { this.resetForm();
unitId: null,
thirdId: null,
name: null,
spell: null,
creditNo: null
};
var timestamp3 = new Date().getTime(); var timestamp3 = new Date().getTime();
this.editQuery.unitId = timestamp3; this.editQuery.unitId = timestamp3;
}, },
@ -576,36 +444,9 @@ export default {
.catch(() => { .catch(() => {
}); });
}, },
linkSubmit() {
this.$refs["editLogin"].validate((valid) => {
if (valid) {
linkPlatform(this.editLogin)
.then((response) => {
if (response.code == 20000) {
this.getList();
this.$message({
type: "success",
message: "关联成功"
});
this.cancelDialog();
} else {
this.$message.error(response.message);
}
})
.catch(() => {
});
}
});
},
exportTxt() {
},
handleSelectionChange(val) { handleSelectionChange(val) {
this.multipleSelection = val; this.multipleSelection = val;
}, },
handleCurrentChange(val) { handleCurrentChange(val) {
this.query.page = val; this.query.page = val;
this.getList(); this.getList();

@ -282,6 +282,10 @@ export default {
}, },
combine() { combine() {
let selectData = this.multipleUdiSelection; let selectData = this.multipleUdiSelection;
if (selectData.length === 0) {
this.$message.error("请选入器械信息");
return;
}
var ids = []; var ids = [];
selectData.forEach((obj, index) => { selectData.forEach((obj, index) => {
ids.push(obj.uuid); ids.push(obj.uuid);

@ -327,6 +327,7 @@ import {BASE_URL, SERVER_IP} from "../../../config/app";
import {authRoleAuthList} from "../../../api/auth/authRole"; import {authRoleAuthList} from "../../../api/auth/authRole";
import {saveAs} from 'file-saver'; import {saveAs} from 'file-saver';
import {demoPrint} from "@/api/itextpdf/itextpdf"; import {demoPrint} from "@/api/itextpdf/itextpdf";
import {isBlank} from "@/utils/strUtil";
const formJson = { const formJson = {
id: "", id: "",
@ -578,7 +579,6 @@ export default {
previewTemplate(row) { previewTemplate(row) {
}, },
showFieldExpain(row) { showFieldExpain(row) {
this.currentRow = row.fieldExplain.replace('\\\n', '<br>'); this.currentRow = row.fieldExplain.replace('\\\n', '<br>');
this.centerDialogVisible = true; this.centerDialogVisible = true;
// const {href} = this.$router.resolve({// // const {href} = this.$router.resolve({//
@ -603,15 +603,10 @@ export default {
this.index = index; this.index = index;
this.formName = "update"; this.formName = "update";
this.uploadDisabled = true; this.uploadDisabled = true;
// this.fileList.push(this.formData.path);
// this.jrxmlFileList.push(this.formData.jrxmlPath)
}, },
handleAddForm(row) { handleAddForm(row) {
this.formVisible = true; this.formVisible = true;
this.formData = JSON.parse(JSON.stringify(formJson)); this.formData = JSON.parse(JSON.stringify(formJson));
// this.fileList = [];
this.formName = "add"; this.formName = "add";
this.uploadDisabled = false; this.uploadDisabled = false;
}, },
@ -627,7 +622,6 @@ export default {
} }
this.$refs["dataForm"].validate(valid => { this.$refs["dataForm"].validate(valid => {
if (valid) { if (valid) {
this.submitTemplate(); this.submitTemplate();
// if (!this.uploadDisabled) { // if (!this.uploadDisabled) {
@ -712,11 +706,14 @@ export default {
this.$message.error("上传失败:" + response.message); this.$message.error("上传失败:" + response.message);
} }
}, },
submitTemplate() { submitTemplate() {
this.$refs["dataForm"].validate(valid => { this.$refs["dataForm"].validate(valid => {
if (valid) { if (valid) {
if (isBlank(this.formData.path) || isBlank(this.formData.jrxmlPath)) {
this.$message.error("请上传模板文件");
return;
}
this.formLoading = true; this.formLoading = true;
let data = Object.assign({}, this.formData); let data = Object.assign({}, this.formData);
data.name = data.name.trim(); data.name = data.name.trim();
@ -731,6 +728,7 @@ export default {
} }
this.$message.success("操作成功"); this.$message.success("操作成功");
this.formVisible = false; this.formVisible = false;
this.getList();
}) })
.catch(() => { .catch(() => {
this.formLoading = false; this.formLoading = false;

@ -183,11 +183,17 @@ export default {
formSubmit() { formSubmit() {
this.$refs["dataForm"].validate((valid) => { this.$refs["dataForm"].validate((valid) => {
if (valid) { if (valid) {
this.loading = true;
updatePlatform(this.formData) updatePlatform(this.formData)
.then((response) => { .then((response) => {
this.loading = false; if (response.code === 20000) {
this.cancelDialog(); this.loading = false;
this.getList(); this.cancelDialog();
this.getList();
} else {
this.$message.error(response.message);
this.loading = false;
}
}) })
.catch(() => { .catch(() => {
this.cancelDialog(); this.cancelDialog();

Loading…
Cancel
Save