|
@@ -0,0 +1,354 @@
|
|
|
+<template>
|
|
|
+ <div class="mis-pageBox">
|
|
|
+ <!-- 主页 -->
|
|
|
+ <el-container>
|
|
|
+ <el-aside width="65%">
|
|
|
+ <el-container>
|
|
|
+ <el-header style="height: 90px">
|
|
|
+ <div class="content-title">用户列表</div>
|
|
|
+ <el-divider />
|
|
|
+ <el-row style="margin-top: 5px">
|
|
|
+ <el-col :span="24">
|
|
|
+ 抄表片区:<cps-select
|
|
|
+ v-model="queryParams.sscbpq"
|
|
|
+ skey="cbpq"
|
|
|
+ isDisabled="all"
|
|
|
+ size="small"
|
|
|
+ style="width: 150px"
|
|
|
+ @change="changeCbpq"
|
|
|
+ ></cps-select
|
|
|
+ > 所属抄表册:<cps-select
|
|
|
+ ref="sscbb"
|
|
|
+ v-model="queryParams.sscbb"
|
|
|
+ skey="cbb"
|
|
|
+ :labelGroup="true"
|
|
|
+ :filterable="true"
|
|
|
+ :params="{ sscbpq: queryParams.sscbpq }"
|
|
|
+ isDisabled="all"
|
|
|
+ size="small"
|
|
|
+ :refresh="cbbRefresh"
|
|
|
+ style="width: 150px"
|
|
|
+ ></cps-select>
|
|
|
+ 检索条件:<el-input
|
|
|
+ v-model="queryParams.searchText"
|
|
|
+ size="small"
|
|
|
+ style="width: 180px"
|
|
|
+ placeholder="输入用户名,用户编号等"
|
|
|
+ clearable
|
|
|
+ @keyup.enter.native="clickQuery()"
|
|
|
+ />
|
|
|
+ <el-checkbox v-model="queryParams.yzsj" size="medium"
|
|
|
+ >验证手机</el-checkbox
|
|
|
+ >
|
|
|
+
|
|
|
+ <el-button
|
|
|
+ type="primary"
|
|
|
+ size="small"
|
|
|
+ icon="el-icon-search"
|
|
|
+ @click="clickQuery()"
|
|
|
+ >查询</el-button
|
|
|
+ >
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ </el-header>
|
|
|
+ <el-main>
|
|
|
+ <tfTable
|
|
|
+ :table-data="dataList"
|
|
|
+ :column="columns"
|
|
|
+ :for-id="false"
|
|
|
+ :pagination="true"
|
|
|
+ :currentpage="pageInfo.current"
|
|
|
+ :pagesize="pageInfo.size"
|
|
|
+ :total="pageInfo.tableTotal"
|
|
|
+ :border="true"
|
|
|
+ :multiple="true"
|
|
|
+ :fixed="true"
|
|
|
+ :isdelete="false"
|
|
|
+ :is-select="false"
|
|
|
+ :stripe="true"
|
|
|
+ @handleCurrentChange="handleCurrentChange"
|
|
|
+ @handleSizeChange="handleSizeChange"
|
|
|
+ @handleSelectionChange="handleSelectionChange"
|
|
|
+ />
|
|
|
+ </el-main>
|
|
|
+ </el-container>
|
|
|
+ </el-aside>
|
|
|
+ <el-main>
|
|
|
+ <div class="content-title">SMS自定义公告通知</div>
|
|
|
+ <el-divider />
|
|
|
+ <el-descriptions title="" :column="1" border>
|
|
|
+ <el-descriptions-item
|
|
|
+ label="短信接收用户:"
|
|
|
+ labelStyle="width:25%"
|
|
|
+ contentStyle="width:75%"
|
|
|
+ >
|
|
|
+ 已选择<span style="color: red; font-size: large"
|
|
|
+ >{{ dxmb.checkNum }}条</span
|
|
|
+ >
|
|
|
+ </el-descriptions-item>
|
|
|
+ <el-descriptions-item
|
|
|
+ label="短信模板内容:"
|
|
|
+ labelStyle="width:25%"
|
|
|
+ contentStyle="width:75%"
|
|
|
+ >
|
|
|
+ <el-input
|
|
|
+ v-model="dxmb.dxnr"
|
|
|
+ placeholder="请输入"
|
|
|
+ type="textarea"
|
|
|
+ rows="5"
|
|
|
+ ></el-input>
|
|
|
+ </el-descriptions-item>
|
|
|
+ <el-descriptions-item
|
|
|
+ label="公告内容:"
|
|
|
+ labelStyle="width:25%"
|
|
|
+ contentStyle="width:75%"
|
|
|
+ >
|
|
|
+ <el-input
|
|
|
+ v-model="dxmb.ggnr"
|
|
|
+ placeholder="请输入"
|
|
|
+ type="textarea"
|
|
|
+ rows="5"
|
|
|
+ ></el-input>
|
|
|
+ </el-descriptions-item>
|
|
|
+ </el-descriptions>
|
|
|
+ <el-row style="margin-top: 15px">
|
|
|
+ <el-col :span="24">
|
|
|
+ <div class="txnr1">
|
|
|
+ 标识代码:{dxnr} 代码含义:短信内容
|
|
|
+ </div>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ <el-row style="margin-top: 45px">
|
|
|
+ <el-col :span="24">
|
|
|
+ <div class="txnr1">
|
|
|
+ ★请勿发送虚假类、营销类、测试类文本等短信内容
|
|
|
+ </div>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ <el-row style="margin-top: 5px">
|
|
|
+ <el-col :span="24">
|
|
|
+ <div class="txnr1">★建议发送内容不超过60个字符</div>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ <el-row style="margin-top: 5px">
|
|
|
+ <el-col :span="24">
|
|
|
+ <div class="txnr2">★只会发送符合规则的电话号码</div>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ <el-row style="margin-top: 5px">
|
|
|
+ <el-col :span="24">
|
|
|
+ <div class="bt">
|
|
|
+ <el-button
|
|
|
+ type="primary"
|
|
|
+ icon="el-icon-message"
|
|
|
+ @click="SMSbyCheck()"
|
|
|
+ >将短信添加到短信代发队列(按勾选)</el-button
|
|
|
+ >
|
|
|
+ </div>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ <el-row style="margin-top: 5px">
|
|
|
+ <el-col :span="24">
|
|
|
+ <div class="bt">
|
|
|
+ <el-button
|
|
|
+ type="primary"
|
|
|
+ icon="el-icon-s-promotion"
|
|
|
+ @click="SMSbyCondition()"
|
|
|
+ >将短信添加到短信代发队列(按勾选)</el-button
|
|
|
+ >
|
|
|
+ </div>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ </el-main>
|
|
|
+ </el-container>
|
|
|
+ </div>
|
|
|
+</template>
|
|
|
+ <script>
|
|
|
+import "@/views/mis/common/assets/styles/misStyle.scss";
|
|
|
+import { DateHelper } from "@/views/mis/common/assets/scripts/utils.js";
|
|
|
+import tfTable from "@/views/mis/common/misTable/index.vue";
|
|
|
+import cpsSelect from "@/views/mis/common/components/cps-select.vue";
|
|
|
+import { SMSReminder } from "@/views/mis/common/api/SMSApi.js";
|
|
|
+export default {
|
|
|
+ //name: "smsUserNotice",
|
|
|
+ components: { tfTable, cpsSelect },
|
|
|
+ data() {
|
|
|
+ return {
|
|
|
+ queryParams: {
|
|
|
+ sscbpq: undefined,
|
|
|
+ sscbb: undefined,
|
|
|
+ searchText: undefined,
|
|
|
+ yzsj: true,
|
|
|
+ },
|
|
|
+ pageInfo: {
|
|
|
+ current: 1,
|
|
|
+ size: 30,
|
|
|
+ tableTotal: 100,
|
|
|
+ "orders[0].asc": "true",
|
|
|
+ "orders[0].column": "yhbh",
|
|
|
+ }, // 分页数据
|
|
|
+
|
|
|
+ columns: [
|
|
|
+ {
|
|
|
+ label: "用户编号",
|
|
|
+ prop: "yhbh",
|
|
|
+ align: "center",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "用户名",
|
|
|
+ prop: "yhxm",
|
|
|
+ align: "center",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "用户地址",
|
|
|
+ prop: "yhdz",
|
|
|
+ align: "center",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "联系电话",
|
|
|
+ prop: "lxdh",
|
|
|
+ align: "center",
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ dataList: [], // 表格数据
|
|
|
+ selectionsData: [], // 表格选中数据
|
|
|
+ cbbRefresh: false,
|
|
|
+ /**短信相关**/
|
|
|
+ dxmb: {
|
|
|
+ checkNum: 0,
|
|
|
+ dxnr: "{dxnr}",
|
|
|
+ ggnr: undefined,
|
|
|
+ },
|
|
|
+ };
|
|
|
+ },
|
|
|
+ created() {},
|
|
|
+ watch: {},
|
|
|
+ mounted() {
|
|
|
+ this.bindList();
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ /**
|
|
|
+ * 查询列表
|
|
|
+ */
|
|
|
+ bindList() {
|
|
|
+ let params = Object.assign({}, this.pageInfo, this.queryParams);
|
|
|
+ this.dataList = [];
|
|
|
+ SMSReminder.noticeQuery(params)
|
|
|
+ .then((res) => {
|
|
|
+ if (res.code !== 1) {
|
|
|
+ this.$message.error("查询失败!");
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ // 数据总数
|
|
|
+ this.pageInfo.tableTotal = res.result.total;
|
|
|
+ this.dataList = res.result.records;
|
|
|
+ })
|
|
|
+ .catch((ex) => {
|
|
|
+ this.$message.error("查询失败!");
|
|
|
+ });
|
|
|
+ },
|
|
|
+ /***
|
|
|
+ * 查询
|
|
|
+ */
|
|
|
+ clickQuery() {
|
|
|
+ this.pageInfo.current = 1;
|
|
|
+ this.bindList();
|
|
|
+ },
|
|
|
+
|
|
|
+ SMSbyCheck() {
|
|
|
+ const yhbhs = this.selectionsData.map((item) => {
|
|
|
+ return item.yhbh;
|
|
|
+ });
|
|
|
+ let params = Object.assign({});
|
|
|
+ let cyh = yhbhs.join(",");
|
|
|
+ params.dxnr = this.dxmb.dxnr;
|
|
|
+ params.ggnr = this.dxmb.ggnr;
|
|
|
+ params.yhbhs = cyh;
|
|
|
+ if (
|
|
|
+ params.ggnr == null ||
|
|
|
+ params.ggnr == "" ||
|
|
|
+ params.ggnr == undefined
|
|
|
+ ) {
|
|
|
+ this.$message.warning("请输入对应得公告内容!");
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ SMSReminder.arrearByCheck(params).then((res) => {
|
|
|
+ if (res.code == 1) {
|
|
|
+ this.bindList();
|
|
|
+ this.$message.success("发送成功!");
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
+
|
|
|
+ SMSbyCondition() {
|
|
|
+ let params = Object.assign({}, this.queryParams);
|
|
|
+ params.dxnr = this.dxmb.dxnr;
|
|
|
+ params.ggnr = this.dxmb.ggnr;
|
|
|
+ if (
|
|
|
+ params.ggnr == null ||
|
|
|
+ params.ggnr == "" ||
|
|
|
+ params.ggnr == undefined
|
|
|
+ ) {
|
|
|
+ this.$message.warning("请输入对应得公告内容!");
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ SMSReminder.arrearByCondition(params).then((res) => {
|
|
|
+ if (res.code == 1) {
|
|
|
+ this.bindList();
|
|
|
+ this.$message.success("发送成功!");
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
+
|
|
|
+ /**
|
|
|
+ *
|
|
|
+ * @param {string} value 抄表片区
|
|
|
+ */
|
|
|
+ changeCbpq(value) {
|
|
|
+ this.cbbRefresh = !this.cbbRefresh;
|
|
|
+ this.queryParams.sscbb = "";
|
|
|
+ },
|
|
|
+
|
|
|
+ /* ----- 组件事件 ----- */
|
|
|
+ /**
|
|
|
+ * @description 改变当前页
|
|
|
+ */
|
|
|
+ handleCurrentChange(current) {
|
|
|
+ this.pageInfo.current = current;
|
|
|
+ this.bindList();
|
|
|
+ },
|
|
|
+ /**
|
|
|
+ * @description 分页每页条数
|
|
|
+ */
|
|
|
+ handleSizeChange(size) {
|
|
|
+ this.pageInfo.size = size;
|
|
|
+ this.bindList();
|
|
|
+ },
|
|
|
+ /**
|
|
|
+ * @description 选择改变
|
|
|
+ */
|
|
|
+ handleSelectionChange(rows) {
|
|
|
+ this.selectionsData = rows;
|
|
|
+ this.dxmb.checkNum = this.selectionsData.length;
|
|
|
+ },
|
|
|
+ },
|
|
|
+};
|
|
|
+</script>
|
|
|
+ <style scoped>
|
|
|
+.txnr1 {
|
|
|
+ font-size: larger;
|
|
|
+ color: red;
|
|
|
+ font-weight: bold;
|
|
|
+ margin-left: 20%;
|
|
|
+}
|
|
|
+.txnr2 {
|
|
|
+ font-size: larger;
|
|
|
+ color: blue;
|
|
|
+ font-weight: bold;
|
|
|
+ margin-left: 20%;
|
|
|
+}
|
|
|
+.bt {
|
|
|
+ margin-left: 25%;
|
|
|
+}
|
|
|
+</style>
|
|
|
+
|