1.修复bug

master
x_z 3 years ago
parent f4a1420388
commit 771bf8aebb

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

@ -390,7 +390,7 @@
</el-col>
<el-col :span="12" class="el-col">
<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="1">正常</el-radio>
</el-radio-group>
@ -763,7 +763,6 @@ export default {
});
})
.catch(() => {
this.$message.info("取消删除");
});
}
},
@ -885,6 +884,10 @@ export default {
});
},
addUserData() {
if (this.selectUserList.length === 0) {
this.$message.error("请选择需要添加的用户");
return;
}
this.userFormVisible = false;
let query = {
code: this.currentCode,
@ -904,20 +907,6 @@ export default {
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() {
if (this.currentCode == null || this.currentCode == "") {
this.$message.error("请先选择仓库");

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

@ -59,13 +59,6 @@
>编辑
</el-button
>
<!-- <el-button
type="text"
size="small"
@click.native.stop="handleLinkClick(scope.row)"
>关联自助平台
</el-button
>-->
<el-button
type="text"
size="small"
@ -92,7 +85,7 @@
:close-on-click-modal="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-col :span="10">
<div class="text item">
@ -114,7 +107,7 @@
<div class="itemTag">
<span>企业自定义ID&nbsp;</span>
</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>
</el-form-item>
@ -194,7 +187,7 @@
<div class="itemTag">
<span>拼音码&nbsp;</span>
</div>
<el-form-item prop="spell">
<el-form-item prop="pinyinCode">
<el-input v-model="editQuery.pinyinCode" auto-complete="off"
style="width: 80%"></el-input>
</el-form-item>
@ -205,102 +198,13 @@
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click.native="cancelDialog" size="small">取消</el-button>
<el-button type="primary" size="small" @click.native="formSubmit()"
<el-button @click="cancelDialog" size="small">取消</el-button>
<el-button type="primary" size="small" @click="formSubmit()"
>提交
</el-button
>
</div>
</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>
</template>
@ -330,13 +234,11 @@ export default {
unitId: null,
thirdId: null,
name: null,
spell: null,
creditNo: null,
pinyinCode: null,
contact: null,
mobile: null,
corpType: null,
outType: null
corpType: null
},
editLogin: {
platformId: null,
@ -353,27 +255,12 @@ export default {
},
spellUpdate: true,
platformVisible: false,
editLoginVisible: false,
checked: false,
editDialogVisible: false,
list: [],
platformList: [],
total: 0,
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,
editTypeMap: {
0: "新增往来单位",
@ -415,6 +302,12 @@ export default {
};
this.getList();
},
//
resetForm() {
this.$nextTick(() => {
this.$refs['editQuery'].resetFields();
});
},
search() {
this.query.page = 1;
this.getList();
@ -468,7 +361,7 @@ export default {
cancelDialog() {
this.editDialogVisible = false;
this.editLoginVisible = false;
this.getList();
},
handleModifyClick(row) {
@ -476,35 +369,10 @@ export default {
this.editDialogVisible = true;
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() {
this.editType = 0;
this.editDialogVisible = true;
this.editQuery = {
unitId: null,
thirdId: null,
name: null,
spell: null,
creditNo: null
};
this.resetForm();
var timestamp3 = new Date().getTime();
this.editQuery.unitId = timestamp3;
},
@ -576,36 +444,9 @@ export default {
.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) {
this.multipleSelection = val;
},
handleCurrentChange(val) {
this.query.page = val;
this.getList();

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

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

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

Loading…
Cancel
Save