Commit 6142d2f7 authored by dragondean@qq.com's avatar dragondean@qq.com
parents 548d5a84 3e18992f
import request from '@/utils/request'
// 创建业务密码
export function createBusiPwd(data) {
return request({
url: '/ecw/busi-pwd/create',
method: 'post',
data: data
})
}
// 更新业务密码
export function updateBusiPwd(data) {
return request({
url: '/ecw/busi-pwd/update',
method: 'put',
data: data
})
}
// 删除业务密码
export function deleteBusiPwd(id) {
return request({
url: '/ecw/busi-pwd/delete?id=' + id,
method: 'delete'
})
}
// 获得业务密码
export function getBusiPwd(id) {
return request({
url: '/ecw/busi-pwd/get?id=' + id,
method: 'get'
})
}
// 获得业务密码分页
export function getBusiPwdPage(query) {
return request({
url: '/ecw/busi-pwd/page',
method: 'get',
params: query
})
}
// 导出业务密码 Excel
export function exportBusiPwdExcel(query) {
return request({
url: '/ecw/busi-pwd/export-excel',
method: 'get',
params: query,
responseType: 'blob'
})
}
src/assets/logo/logo.png

2.74 KB | W: | H:

src/assets/logo/logo.png

12.7 KB | W: | H:

src/assets/logo/logo.png
src/assets/logo/logo.png
src/assets/logo/logo.png
src/assets/logo/logo.png
  • 2-up
  • Swipe
  • Onion skin
......@@ -77,7 +77,8 @@ export const DICT_TYPE = {
CUSTOMER_COMPLAINT_TYPE: 'customer_complaint_type',
CUSTOMER_COMPLAINT_STATUS: 'customer_complaint_status',
ECW_MESSAGE_LEAVE_TYPE: 'ecw_message_leave_type',
ECW_MESSAGE_LEAVE_STATUS: 'ecw_message_leave_status'
ECW_MESSAGE_LEAVE_STATUS: 'ecw_message_leave_status',
PWD_TYPE: 'pwd_type'
}
......
<template>
<div class="app-container">
<!-- 搜索工作栏 -->
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item label="密码类别" prop="busiType">
<el-select v-model="queryParams.busiType" placeholder="请选择密码类别" clearable size="small">
<el-option v-for="dict in this.getDictDatas(DICT_TYPE.PWD_TYPE)"
:key="dict.value" :label="dict.label" :value="dict.value"/>
</el-select>
</el-form-item>
<el-form-item label="密码" prop="pwd">
<el-input v-model="queryParams.pwd" placeholder="请输入密码" clearable @keyup.enter.native="handleQuery"/>
</el-form-item>
<el-form-item label="创建时间">
<el-date-picker v-model="dateRangeCreateTime" style="width: 240px" value-format="yyyy-MM-dd"
type="daterange" range-separator="-" start-placeholder="开始日期" end-placeholder="结束日期" />
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" @click="handleQuery">搜索</el-button>
<el-button icon="el-icon-refresh" @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
<!-- 操作工具栏 -->
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd"
v-hasPermi="['ecw:busi-pwd:create']">新增</el-button>
</el-col>
<el-col :span="1.5">
<el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport" :loading="exportLoading"
v-hasPermi="['ecw:busi-pwd:export']">导出</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<!-- 列表 -->
<el-table v-loading="loading" :data="list">
<el-table-column label="主键ID" align="center" prop="id" />
<el-table-column label="密码类别" align="center" prop="busiType">
<template slot-scope="scope">
<dict-tag :type="DICT_TYPE.PWD_TYPE" :value="scope.row.busiType" />
</template>
</el-table-column>
<!-- <el-table-column label="密码" align="center" prop="pwd" />-->
<el-table-column label="创建时间" align="center" prop="createTime" width="180">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.createTime) }}</span>
</template>
</el-table-column>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)"
v-hasPermi="['ecw:busi-pwd:update']">修改</el-button>
<el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)"
v-hasPermi="['ecw:busi-pwd:delete']">删除</el-button>
</template>
</el-table-column>
</el-table>
<!-- 分页组件 -->
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNo" :limit.sync="queryParams.pageSize"
@pagination="getList"/>
<!-- 对话框(添加 / 修改) -->
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
<el-form-item label="密码类别" prop="busiType">
<el-select v-model="form.busiType" placeholder="请选择密码类别">
<el-option v-for="dict in this.getDictDatas(DICT_TYPE.PWD_TYPE)"
:key="dict.value" :label="dict.label" :value="dict.value" />
</el-select>
</el-form-item>
<el-form-item label="密码" prop="pwd">
<el-input v-model="form.pwd" placeholder="请输入密码" type="password"/>
</el-form-item>
<el-form-item label="确认密码" prop="pwd">
<el-input v-model="pwd2" placeholder="请再次输入密码" type="password"/>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm">确 定</el-button>
<el-button @click="cancel">取 消</el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import { createBusiPwd, updateBusiPwd, deleteBusiPwd, getBusiPwd, getBusiPwdPage, exportBusiPwdExcel } from "@/api/ecw/busiPwd";
export default {
name: "BusiPwd",
components: {
},
data() {
return {
// 遮罩层
loading: true,
// 导出遮罩层
exportLoading: false,
// 显示搜索条件
showSearch: true,
// 总条数
total: 0,
// 业务密码列表
list: [],
// 弹出层标题
title: "",
// 是否显示弹出层
open: false,
dateRangeCreateTime: [],
// 查询参数
queryParams: {
pageNo: 1,
pageSize: 10,
busiType: null,
pwd: null,
},
// 表单参数
form: {},
pwd2:null,
// 表单校验
rules: {
}
};
},
created() {
this.getList();
},
methods: {
/** 查询列表 */
getList() {
this.loading = true;
// 处理查询参数
let params = {...this.queryParams};
this.addBeginAndEndTime(params, this.dateRangeCreateTime, 'createTime');
// 执行查询
getBusiPwdPage(params).then(response => {
this.list = response.data.list;
this.total = response.data.total;
this.loading = false;
});
},
/** 取消按钮 */
cancel() {
this.open = false;
this.reset();
},
/** 表单重置 */
reset() {
this.form = {
id: undefined,
busiType: undefined,
pwd: undefined,
};
this.pwd2=null;
this.resetForm("form");
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNo = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.dateRangeCreateTime = [];
this.resetForm("queryForm");
this.handleQuery();
},
/** 新增按钮操作 */
handleAdd() {
this.reset();
this.open = true;
this.title = "添加业务密码";
},
/** 修改按钮操作 */
handleUpdate(row) {
this.reset();
const id = row.id;
getBusiPwd(id).then(response => {
this.form = response.data;
this.open = true;
this.title = "修改业务密码";
});
},
/** 提交按钮 */
submitForm() {
this.$refs["form"].validate(valid => {
if (!valid) {
return;
}
if(this.pwd2!==this.form.pwd){
this.$modal.alertError("两次密码输入不一致");
return;
}
// 修改的提交
if (this.form.id != null) {
updateBusiPwd(this.form).then(response => {
this.$modal.msgSuccess("修改成功");
this.open = false;
this.getList();
});
return;
}
// 添加的提交
createBusiPwd(this.form).then(response => {
this.$modal.msgSuccess("新增成功");
this.open = false;
this.getList();
});
});
},
/** 删除按钮操作 */
handleDelete(row) {
const id = row.id;
this.$modal.confirm('是否确认删除业务密码编号为"' + id + '"的数据项?').then(function() {
return deleteBusiPwd(id);
}).then(() => {
this.getList();
this.$modal.msgSuccess("删除成功");
}).catch(() => {});
},
/** 导出按钮操作 */
handleExport() {
// 处理查询参数
let params = {...this.queryParams};
params.pageNo = undefined;
params.pageSize = undefined;
this.addBeginAndEndTime(params, this.dateRangeCreateTime, 'createTime');
// 执行导出
this.$modal.confirm('是否确认导出所有业务密码数据项?').then(() => {
this.exportLoading = true;
return exportBusiPwdExcel(params);
}).then(response => {
this.$download.excel(response, '${table.classComment}.xls');
this.exportLoading = false;
}).catch(() => {});
}
}
};
</script>
......@@ -127,6 +127,7 @@
// import { listDept, getDept, delDept, addDept, updateDept } from "@/api/system/dept";
import Treeselect from "@riophae/vue-treeselect";
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
import {listSimpleUsers} from "@/api/system/user";
import {CommonStatusEnum} from '@/utils/constants'
import { getDictDatas, DICT_TYPE } from '@/utils/dict'
......@@ -202,20 +203,21 @@ export default {
listSimpleUsers().then(response => {
this.users = response.data;
});
// console.log("regionTypeDatas:"+JSON.stringify(regionTypeDatas));
},
methods: {
/** 查询部门列表 */
getList() {
this.loading = true;
getRegionList(this.queryParams).then(response => {
console.log("response:"+JSON.stringify(response.data));
// console.log("response:"+JSON.stringify(response.data));
this.regionList = this.handleTree(response.data, "id");
this.loading = false;
});
},
/** 转换部门数据结构 */
normalizer(node) {
console.log("normalizer:"+JSON.stringify(node)+" node.children:"+JSON.stringify(node.children));
// console.log("normalizer:"+JSON.stringify(node)+" node.children:"+JSON.stringify(node.children));
if (node.children && !node.children.length) {
delete node.children;
}
......@@ -242,7 +244,8 @@ export default {
let text = row.status === CommonStatusEnum.ENABLE ? "启用" : "停用";
this.$modal.confirm('确认要' + text + '编号为' + row.id + '的数据吗?').then(function() {
// return changeUserStatus(row.id, row.status);
return updateRegionStatus({id:row.id,status:!row.status?CommonStatusEnum.DISABLE:CommonStatusEnum.ENABLE});
console.log("row.status:"+row.status);
return updateRegionStatus({id:row.id,status:row.status});
}).then(() => {
this.$modal.msgSuccess(text + "成功");
......@@ -288,9 +291,9 @@ export default {
this.open = true;
this.title = "添加区域";
getRegionList().then(response => {
console.log("添加区域查询结果:"+JSON.stringify(response.data));
// console.log("添加区域查询结果:"+JSON.stringify(response.data));
this.regionOptions = this.handleTree(response.data, "id");
console.log("regionOptions:"+JSON.stringify(this.regionOptions));
// console.log("regionOptions:"+JSON.stringify(this.regionOptions));
});
},
/** 展开/折叠操作 */
......@@ -306,7 +309,7 @@ export default {
this.reset();
getRegion(row.id).then(response => {
this.form = response.data;
console.log("getRegion("+row.id+"):"+JSON.stringify(this.form));
// console.log("getRegion("+row.id+"):"+JSON.stringify(this.form));
if (this.form.parentId === 0) { // 无父部门时,标记为 undefined,避免展示为 Unknown
this.form.parentId = undefined;
}
......@@ -314,9 +317,9 @@ export default {
this.title = "修改区域";
});
getRegionList(row.id).then(response => {
console.log("getRegionList("+row.id+"):"+JSON.stringify(response.data));
// console.log("getRegionList("+row.id+"):"+JSON.stringify(response.data));
this.regionOptions = this.handleTree(response.data, "id");
console.log("getRegionList("+row.id+"): regionOptions"+JSON.stringify(this.regionOptions));
// console.log("getRegionList("+row.id+"): regionOptions"+JSON.stringify(this.regionOptions));
});
},
......
......@@ -3,7 +3,7 @@
<!-- 搜索工作栏 -->
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item label="服务网点" prop="node" >
<el-select v-model="queryParams.nodeId" placeholder="所属网点" :disabled="nodeId ? true : false" clearable>
<el-option v-for="node in nodeList" :key="node.id" :label="node.titleZh" :value="node.id"/>
......@@ -50,13 +50,13 @@
</template>
</el-table-column>
<el-table-column prop="status" label="状态" width="100">
<template slot-scope="scope">
<el-switch v-model="scope.row.status" :active-value="CommonStatusEnum.ENABLE" :inactive-value="CommonStatusEnum.DISABLE" @change="handleStatusChange(scope.row)" />
</template>
</el-table-column>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button size="mini" type="text" @click="toRouteList(scope.row, '2')" :disabled="scope.row.tradeType=='2'"
......@@ -120,7 +120,7 @@
<el-header>
<el-button type="primary" @click="commitBind">提交</el-button>
</el-header>
<el-table ref="multipleTable" v-if="refreshTable" :data="deptList" row-key="id" :default-expand-all="isExpandAll"
:tree-props="{children: 'children', hasChildren: 'hasChildren'}" @select="select" @select-all="selectAll" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55"></el-table-column>
......@@ -176,7 +176,7 @@
<el-form-item label="排序" prop="sort">
<el-input v-model="form.sort" type="number" placeholder="请输入排序" />
</el-form-item>
<el-form-item label="仓库编号" prop="number">
<el-input v-model="form.number" placeholder="请输入仓库编号" />
</el-form-item>
......@@ -206,9 +206,11 @@
<el-form-item label="英文地址" prop="addressEn">
<el-input v-model="form.addressEn" placeholder="请输入英文地址" />
</el-form-item>
<el-form-item label="贸易属性" prop="tradeType" >
<el-select v-model="form.tradeType" placeholder="请选择" :disabled="(nodeId || isUpdate) ? true : false">
<el-select v-model="form.tradeType" placeholder="请选择"
>
<!-- :disabled="(nodeId || isUpdate) ? true : false"-->
<el-option v-for="dict in regionTypeDatas" :key="dict.value" :label="dict.label" :value="dict.value"/>
</el-select>
</el-form-item>
......@@ -217,8 +219,8 @@
<el-checkbox-group v-model="form.checkList">
<el-checkbox v-for="dict in transportDatas" :label="dict.value" :key="dict.value" name="freight"> {{dict.label}}</el-checkbox>
</el-checkbox-group>
</el-form-item>
</el-form-item>
<el-form-item label="img" prop="img">
<el-col :span="8">
<el-input v-model="form.img" placeholder="请上传图片" disabled/>
......@@ -236,7 +238,7 @@
<el-form-item label="备注" prop="remark">
<el-input v-model="form.remark" placeholder="请输入备注" />
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm">确 定</el-button>
......@@ -247,11 +249,11 @@
</template>
<script>
import { createWarehouse, updateWarehouse, deleteWarehouse, getWarehouse, getWarehousePage,
import { createWarehouse, updateWarehouse, deleteWarehouse, getWarehouse, getWarehousePage,
exportWarehouseExcel,routerList,changeRouteStatus,deptBind,deptList } from "@/api/ecw/warehouse";
import { getNodePage } from "@/api/ecw/node";
import { getListTree } from "@/api/ecw/region";
import { getDictDatas, DICT_TYPE } from '@/utils/dict';
import { getDictDatas, DICT_TYPE } from '@/utils/dict'
import {CommonStatusEnum} from '@/utils/constants'
import { uploadFile } from "@/api/infra/file";
import { listDept } from "@/api/system/dept";
......@@ -426,6 +428,8 @@ export default {
this.getList();
this.getNodeList();
this.getContinentsList();
console.log("regionTypeDatas:"+JSON.stringify(this.regionTypeDatas));
console.log("transportDatas:"+JSON.stringify(this.transportDatas));
},
methods: {
/** 查询列表 */
......@@ -570,7 +574,7 @@ export default {
this.showRouteList = true;
this.routeLoadig = true;
this.getRouteList();
},
getRouteList() {
......@@ -620,7 +624,7 @@ export default {
for(let index in this.cityList) {
let city = this.cityList[index];
if(city.id == cityId) {
return;
}
}
......@@ -698,7 +702,7 @@ export default {
this.form.tradeType = node.tradeType;
this.form.checkList = node.freight.split(',');
this.changeContinents(this.form.zhou);
this.changeCountry(this.form.guojia);
this.changeProvince(this.form.sheng);
......@@ -720,8 +724,8 @@ export default {
this.changeCountry(response.data.guojia);
this.changeProvince(response.data.sheng);
this.isUpdate = true;
this.open = true;
......@@ -814,7 +818,7 @@ export default {
// console.log(this.list);
this.deptOpen = false;
})
},
handleSelectionChange(value) {
......@@ -890,7 +894,7 @@ export default {
})
}
}
}
};
</script>
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