Pārlūkot izejas kodu

短信管理及发票领用

QiuYuMiao 4 mēneši atpakaļ
vecāks
revīzija
88b4cfb4e5

+ 6 - 0
src/router/_import.js

@@ -317,4 +317,10 @@ const map = {
   liquidatedDam:()=>import('@/views/mis/billManagement/liquidatedDamages-index'),//电子发票-违约金票据统计
   effluentCharge:()=>import('@/views/mis/billManagement/effluentCharge-index'),//电子发票-污水费票据统计
   mergeInvoice:()=>import('@/views/mis/billManagement/mergeInvoice-index'),//电子发票-合并开票查询
+  SMSSetReminder:()=>import('@/views/mis/sms/smsSetReminder-index'),//短信管理-提醒内容设置
+  sendMessage:()=>import('@/views/mis/sms/smsSendMessage-index'),//短信管理-已发送消息
+  reminderUser:()=>import('@/views/mis/sms/reminderUserArrears-index'),//短信管理-用户欠费合计催缴
+  reminderPrepaid:()=>import('@/views/mis/sms/reminderUserPrepaid-index'),//短信管理-预付费催缴
+  smsUserNotice:()=>import('@/views/mis/sms/smsUserNotice-index'),//短信管理-用户临时公告
+  invoiceCollection:()=>import('@/views/mis/billManagement/invoiceCollection-index'),//发票领用
 }

+ 80 - 0
src/views/mis/billManagement/invoiceCollection-form.vue

@@ -0,0 +1,80 @@
+<template>
+  <el-form
+    :model="detailData"
+    :disabled="editState"
+    :rules="rules"
+    :inline-message="true"
+    :status-icon="true"
+    ref="form"
+    class="MIS_FORM"
+  >
+    <el-descriptions title="" :column="2" border size="mini">
+      <el-descriptions-item label="发票类型">
+        <el-form-item prop="name">
+          <cpsSelect v-model="detailData.fplx" placeholder="请选择" skey="fplx">
+          </cpsSelect>
+        </el-form-item>
+      </el-descriptions-item>
+      <el-descriptions-item label="发票版本号">
+        <el-form-item prop="bbh">
+          <el-input v-model="detailData.bbh" placeholder="请输入"></el-input>
+        </el-form-item>
+      </el-descriptions-item>
+      <el-descriptions-item label="发票开始号">
+        <el-form-item prop="fpksh">
+          <el-input v-model="detailData.fpksh" placeholder="请输入"></el-input>
+        </el-form-item>
+      </el-descriptions-item>
+
+      <el-descriptions-item label="发票结束号">
+        <el-form-item prop="fpjsh">
+          <el-input v-model="detailData.fpjsh" placeholder="请输入"></el-input>
+        </el-form-item>
+      </el-descriptions-item>
+      <el-descriptions-item label="领用数量">
+        <el-form-item prop="lysl">
+          <el-input v-model="detailData.lysl" placeholder="请输入"></el-input>
+        </el-form-item>
+      </el-descriptions-item>
+      <el-descriptions-item label="领用人员">
+        <el-form-item prop="lyry">
+          <cpsSelect v-model="detailData.lyry" placeholder="请选择" skey="sfry">
+          </cpsSelect>
+        </el-form-item>
+      </el-descriptions-item>
+
+      <el-descriptions-item label="操作人员">
+        <el-input v-model="detailData.czryxm" disabled></el-input>
+      </el-descriptions-item>
+      <el-descriptions-item label="操作时间">
+        <el-input v-model="detailData.czsj" disabled></el-input>
+      </el-descriptions-item>
+    </el-descriptions>
+  </el-form>
+</template>
+    <script>
+import cpsSelect from "@/views/mis/common/components/cps-select.vue";
+export default {
+  name: "detail",
+  components: { cpsSelect },
+  props: {
+    detailData: {},
+    editState: false,
+  },
+  data() {
+    return {};
+  },
+  methods: {
+    validate() {
+      let flag = false;
+      this.$refs.form.validate((valid) => {
+        if (valid) {
+          flag = true;
+        }
+      });
+      return flag;
+    },
+  },
+};
+</script>
+    

+ 333 - 0
src/views/mis/billManagement/invoiceCollection-index.vue

@@ -0,0 +1,333 @@
+<template>
+    <div class="mis-pageBox">
+      <el-container>
+        <el-header style="height: 40px">
+          <el-row>
+            <el-col :span="20">
+
+              关 键 字:<el-input
+                v-model="queryParams.searchText"
+                size="small"
+                style="width: 150px"
+                placeholder="输入关键字"
+                clearable
+                @keyup.enter.native="clickQuery()"
+              />&nbsp;
+              <el-button
+                type="primary"
+                size="small"
+                icon="el-icon-search"
+                @click="clickQuery()"
+                >查询</el-button
+              >
+            </el-col>
+            <el-col :span="4">
+              <el-button
+                type="primary"
+                size="small"
+                icon="el-icon-plus"
+                @click="clickAdd()"
+                >添加</el-button
+              >
+              <el-button
+                type="primary"
+                size="small"
+                icon="el-icon-edit"
+                @click="clickModify()"
+                :disabled="disabledModify"
+                >修改</el-button
+              >
+              <el-button
+                type="danger"
+                size="small"
+                icon="el-icon-delete"
+                @click="clickDelete()"
+                :disabled="disabledDelete"
+                >删除</el-button
+              >
+            </el-col>
+          </el-row>
+        </el-header>
+        <el-main>
+          <tfTable
+            :table-data="dataList"
+            :column="columns"
+            :for-id="false"
+            :pagination="false"
+            :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"
+            @rowDblclick="showDetail"
+            @detail="showDetail"
+          />
+        </el-main>
+      </el-container>
+      <!-- 详情页 -->
+      <el-dialog
+        v-if="dialogVisible"
+        v-dialogDrag
+        top="20vh"
+        :title="dialogTitle"
+        :visible.sync="dialogVisible"
+        width="800px"
+        class="dialog"
+      >
+        <tfDetail :detailData="detailData" :editState="editState" ref="dForm" />
+        <template slot="footer">
+          <el-button
+            type="warning"
+            icon="el-icon-check"
+            @click="clickSave()"
+            v-if="!editState"
+            >确 定</el-button
+          >
+          <el-button type="warning" icon="el-icon-close" @click="clickCancel()"
+            >关 闭</el-button
+          >
+        </template>
+      </el-dialog>
+    </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 tfDetail from "./invoiceCollection-form.vue";
+  
+  export default {
+    components: { tfTable, tfDetail },
+    props: ["data"],
+    data() {
+      return {
+        /* ----- 主页 ----- */
+        queryParams: {
+          searchText: "",
+        },
+        disabledModify: true,
+        disabledDelete: true,
+        editType: true, //编辑类型,true:新增;false:修改
+        pageInfo: {
+          current: 1,
+          size: 10,
+          tableTotal: 1,
+          "orders[0].asc": "true",
+          "orders[0].column": "code",
+        }, // 分页数据
+        columns: [
+          {
+            label: "发票类型",
+            prop: "fplxmc",
+            align: "center",
+          },
+          {
+            label: "发票版本号",
+            prop: "bbh",
+            align: "center",
+          },
+          {
+            label: "发票开始号",
+            prop: "fpksh",
+            align: "center",
+          },
+          {
+            label: "发票结束号",
+            prop: "fpjsh",
+            align: "center",
+          },
+          {
+            label: "领用数量",
+            prop: "lysl",
+            align: "center",
+          },
+          {
+            label: "领用人员",
+            prop: "lyry",
+            align: "center",
+          },         
+          {
+            label: "操作人员",
+            prop: "czrymc",
+            align: "center",
+          },
+          {
+            label: "操作时间",
+            prop: "czsj",
+            align: "center",
+            sortable: true,
+          },
+        ],
+        dataList: [], // 表格数据
+        selectionsData: [], // 表格选中数据
+        selectedRow: {}, //表格选中行
+  
+        /* ----- 详情页 ----- */
+        dialogTitle: "新增",
+        editState: false, //编辑状态,true:禁用;false:启用
+        dialogVisible: false,
+        detailData: {
+          fplx: undefined,
+          bbh: undefined,
+          fpksh: undefined,
+          fpjsh: undefined,
+          lysl: undefined,
+          lyry: undefined,
+          czsj: undefined,
+          czry:undefined,
+          czryxm: undefined,
+        },
+      };
+    },
+  
+    watch: {
+      selectionsData(value) {
+        this.disabledModify = this.selectionsData.length !== 1;
+        this.disabledDelete = this.selectionsData.length == 0;
+      },
+      dialogVisible(newVal, oldVal) {
+        if (!newVal) {
+          this.resetDetailData();
+        }
+      },
+    },
+    created() {},
+    mounted() {
+      this.bindList();
+    },
+    methods: {
+      /* ----- 方法 ----- */
+      /**
+       * @description 绑定列表
+       */
+      bindList() {},
+      resetDetailData() {
+        // 表单数据
+        for (var key in this.detailData) {
+          //console.log("key值:" + key)
+          this.detailData[key] = undefined;
+        }
+      },
+      add() {
+        let params = Object.assign({}, this.detailData);
+        params.czry = this.$store.state.user.userId;
+        params.czryxm = this.$store.state.user.realName;
+        params.czsj = DateHelper.getNowFormatDate(true);
+   
+  
+       
+      },
+      modify() {
+        let params = Object.assign({}, this.detailData);
+        params.czry = this.$store.state.user.userId;
+        params.czryxm = this.$store.state.user.realName;
+        params.czsj = DateHelper.getNowFormatDate(true);
+  
+       
+      },
+      delete() {
+        const ids = this.selectionsData.map((item) => {
+         // return item.code;
+        });
+  
+        
+      },
+      /**
+       * @description 显示详情
+       */
+      showDetail(data) {
+        this.selectedRow = data;
+        this.detailData = Object.assign({}, this.selectedRow);
+  
+        this.dialogTitle = "查看";
+        this.editState = true;
+        this.dialogVisible = true; // 显示弹窗
+      },
+  
+      /* ----- dom事件 ----- */
+      /**
+       * @description 查询
+       */
+      clickQuery() {
+        this.pageInfo.current = 1;
+        this.bindList();
+      },
+      /**
+       * @description 添加
+       */
+      clickAdd() {
+        this.detailData.czryxm = this.$store.state.user.realName;
+        this.detailData.czsj = DateHelper.getNowFormatDate(true);
+  
+        this.editType = true;
+        this.dialogTitle = "添加";
+        this.editState = false;
+        this.dialogVisible = true; // 显示弹窗
+      },
+      /**
+       * @description 修改
+       */
+      clickModify() {
+        this.selectedRow = this.selectionsData[0];
+        this.detailData = Object.assign({}, this.selectedRow);
+  
+        this.editType = false;
+        this.dialogTitle = "修改";
+        this.editState = false;
+        this.dialogVisible = true; // 显示弹窗
+      },
+      /**
+       * @description 删除
+       */
+      clickDelete() {
+        this.$confirm("确定删除?", "提示", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning",
+        }).then(() => {
+          this.delete();
+        });
+      },
+      clickCancel() {
+        this.dialogVisible = false; // 关闭弹窗
+      },
+      clickSave() {
+        let flag = this.$refs.dForm.validate();
+        if (flag) {
+          if (this.editType) this.add(); // 新增
+          else this.modify(); // 修改
+        }
+      },
+  
+      /* ----- 组件事件 ----- */
+      /**
+       * @description 改变当前页
+       */
+      handleCurrentChange(current) {
+        this.pageInfo.current = current;
+        this.bindList();
+      },
+      /**
+       * @description 分页每页条数
+       */
+      handleSizeChange(size) {
+        this.pageInfo.size = size;
+        this.bindList();
+      },
+      /**
+       * @description 选择改变
+       */
+      handleSelectionChange(rows) {
+        this.selectionsData = rows;
+      },
+    },
+  };
+  </script>
+  

+ 2 - 2
src/views/mis/billManagement/productCodeManagement-index.vue

@@ -74,7 +74,7 @@
           :table-data="dataList"
           :column="columns"
           :for-id="false"
-          :pagination="false"
+          :pagination="true"
           :currentpage="pageInfo.current"
           :pagesize="pageInfo.size"
           :total="pageInfo.tableTotal"
@@ -138,7 +138,7 @@ export default {
       editType: true, //编辑类型,true:新增;false:修改
       pageInfo: {
         current: 1,
-        size: 100,
+        size: 30,
         tableTotal: 100,
         "orders[0].asc": "true",
         "orders[0].column": "code",

+ 66 - 7
src/views/mis/common/api/SMSApi.js

@@ -5,33 +5,92 @@ import request from '@/utils/request';
 const SMSSet={
     query(requestParams) {
         return request({
-            url: '',
+            url: '/fees-px-api/smstxlx/page',
             method: 'get',
             params: requestParams
         })
     },
     add(requestParams) {
         return request({
-            url: '',
+            url: '/fees-px-api/smstxlx',
             method: 'post',
             data: requestParams
         })
     },
     modify(requestParams) {
         return request({
-            url: '',
+            url: '/fees-px-api/smstxlx',
             method: 'put',
             data: requestParams
         })
     },
     delete(code) {
         return request({
-            url: '',
-            method: 'delete',
-           
+            url: `/fees-px-api/smstxlx/${code}`,
+            method: 'delete',    
         })
     }
 }
+const SMSReminder={
+    sendQuery(requestParams){
+        return request({
+            url: '/fees-px-api/smsmessage/page',
+            method: 'get',
+            params: requestParams
+        })
+    },
+
+    sendAgain(requestParams){
+        return request({
+            url: '/fees-px-api/smstxlx',
+            method: 'post',
+            data: requestParams
+        })
+    },
+    delete(requestParams) {
+        return request({
+            url: '/fees-px-api/smsmessage/deleteByIds',
+            method: 'delete',
+            params: requestParams
+        })
+    },
+    arrearsQuery(requestParams){
+        return request({
+            url: '/fees-px-api/smsmessage/pageyhqfxx',
+            method: 'get',
+            params: requestParams
+        })
+    },
+    arrearByCheck(requestParams){
+        return request({
+            url: '/fees-px-api/smsmessage/batchSendMessageYhqfxx',
+            method: 'post',
+            data: requestParams
+        })
+    },
+    arrearByCondition(requestParams){
+        return request({
+            url: '/fees-px-api/smsmessage/batchSendMessageYhqfxx',
+            method: 'post',
+            data: requestParams
+        })
+    },
+    prepaidQuery(requestParams){
+        return request({
+            url: '',
+            method: 'get',
+            params: requestParams
+        })
+    },
+    noticeQuery(requestParams){
+        return request({
+            url: '/fees-px-api/smsmessage/pageyhxx',
+            method: 'get',
+            params: requestParams
+        })
+    },
+
+}
 
 //输出对象
-export {SMSSet };
+export {SMSSet,SMSReminder };

+ 5 - 3
src/views/mis/common/api/codingManagement.js

@@ -430,9 +430,11 @@ const CodingCustom = {
         cblx: { instance: null, tableName: 'bm_cblx' },//抄表类型
         cwrq: { instance: null, tableName: 'sys_gdcsb', labelF: "cwrq", valueF: "cwrq" },//财务日期
         yslx: { instance: null, tableName: 'bm_yslx' },//用水类型
-        sqfs:{instacnce:null,tableName:'bm_znjsq'},//违约金收取方式
-        cljg:{instacnce:null,tableName:'bm_cljg'},//处理结果
-        fplx:{ instance: null, tableName: '', data: [{ code: '0', name: '普票' }, { code: '1', name: '专票' }, { code: '2', name: '手册' }, { code: '3', name: '未知' }] },//发票类型
+        sqfs: { instance: null, tableName: 'bm_znjsq'},//违约金收取方式
+        cljg: { instance: null, tableName: 'bm_cljg'},//处理结果
+        fplx: { instance: null, tableName: '', data: [{ code: '0', name: '普票' }, { code: '1', name: '专票' }, { code: '2', name: '手册' }, { code: '3', name: '未知' }] },//发票类型
+        dxlx: { instance: null, tableName: 'sms_txlx'},//短信推送类型
+        fszt: { instance: null, tableName: 'SMS_FSZT',data: [{ code: '0', name: '待发' }, { code: '1', name: '已发' }, { code: '2', name: '失败' }]},//短信发送状态
     },
     query(requestParams) {
         return request({

+ 315 - 0
src/views/mis/sms/reminderUserArrears-index.vue

@@ -0,0 +1,315 @@
+<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
+                >&nbsp; 所属抄表册:<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>
+                &nbsp;检索条件:<el-input
+                  v-model="queryParams.searchText"
+                  size="small"
+                  style="width: 180px"
+                  placeholder="输入用户名,用户编号等"
+                  clearable
+                  @keyup.enter.native="clickQuery()"
+                />&nbsp;
+                <el-checkbox v-model="queryParams.yzsj" size="medium"
+                  >验证手机</el-checkbox
+                >
+                &nbsp;
+                <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>
+        <el-row style="margin-top: 15px">
+          <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: "sendMessage",
+  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: "lxdh",
+          align: "center",
+        },
+        {
+          label: "欠费金额",
+          prop: "qfje",
+          align: "center",
+        },
+      ],
+      dataList: [], // 表格数据
+      selectionsData: [], // 表格选中数据
+      cbbRefresh: false,
+      /**欠费短信相关**/
+      dxmb: {
+        checkNum: 0,
+        dxnr: "尊敬的用户{name},您本月{yymm}已扣气费{money}元,起数{startNum},止数{endNum},用气量为{num},截止{yyyy-MM-dd hh:mm:ss}余额为{balance}元。",
+      },
+    };
+  },
+  created() {},
+  watch: {},
+  mounted() {
+    this.bindList();
+  },
+  methods: {
+    /**
+     * 查询列表
+     */
+    bindList() {
+      let params = Object.assign({}, this.pageInfo, this.queryParams);
+      this.dataList = [];
+      SMSReminder.arrearsQuery(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.yhbhs = cyh;
+      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;
+      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>

+ 284 - 0
src/views/mis/sms/reminderUserPrepaid-index.vue

@@ -0,0 +1,284 @@
+<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
+                >&nbsp; 所属抄表册:<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>
+                &nbsp;检索条件:<el-input
+                  v-model="queryParams.searchText"
+                  size="small"
+                  style="width: 180px"
+                  placeholder="输入用户名,用户编号等"
+                  clearable
+                  @keyup.enter.native="clickQuery()"
+                />&nbsp;
+                <el-checkbox v-model="queryParams.yzsj" size="medium"
+                  >验证手机</el-checkbox
+                >
+                &nbsp;
+                <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>
+        <el-row style="margin-top: 15px">
+          <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-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";
+export default {
+  //name: "sendMessage",
+  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: "lxdh",
+          align: "center",
+        },
+        {
+          label: "用户地址",
+          prop: "yhdz",
+          align: "center",
+        },
+        {
+          label: "预付余额",
+          prop: "yfye",
+          align: "center",
+        },
+      ],
+      dataList: [], // 表格数据
+      selectionsData: [], // 表格选中数据
+      cbbRefresh: false,
+      /**欠费短信相关**/
+      dxmb: {
+        checkNum: 0,
+        dxnr: "尊敬的用户{name},您本月{yymm}应扣气费{money},起数{startNum},止数{endNum},用气量为{num},截止{yyyy-MM-dd hh:mm:ss}时,您的账户余额为{balance}元,余额不足抵扣,请您尽快充值(若您已充值,请忽略本提醒)。",
+      },
+    };
+  },
+  created() {},
+  watch: {},
+  mounted() {
+    this.bindList();
+  },
+  methods: {
+    /**
+     * 查询列表
+     */
+    bindList() {
+      let params = Object.assign({}, this.pageInfo, this.queryParams);
+      this.dataList = [];
+    },
+    /***
+     * 查询
+     */
+    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.yhbhs = cyh;
+      SMSReminder.arrearByCheck(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>
+  

+ 306 - 0
src/views/mis/sms/smsSendMessage-index.vue

@@ -0,0 +1,306 @@
+<template>
+  <div class="mis-pageBox">
+    <!-- 主页 -->
+    <el-container>
+      <el-header height="120px">
+        <div class="content-title">SMS已发送短信</div>
+        <el-divider />
+        <el-row style="margin-top: 5px">
+          <el-col :span="24">
+            短信类型:<cpsSelect
+              v-model="queryParams.txlx"
+              skey="dxlx"
+              size="small"
+              style="width: 180px"
+            ></cpsSelect>
+            &nbsp;短信状态:<cpsSelect
+              v-model="queryParams.fszt"
+              skey="fszt"
+              size="small"
+              style="width: 180px"
+            ></cpsSelect>
+            &nbsp;创建时间:
+            <el-date-picker
+              v-model="queryParams.scsj_s"
+              size="small"
+              type="datetime"
+              placeholder="请选择开始时间"
+              default-time="00:00:00"
+              value-format="yyyy-MM-dd HH:mm:ss"
+            />~
+            <el-date-picker
+              v-model="queryParams.scsj_e"
+              size="small"
+              type="datetime"
+              placeholder="请选择结束时间"
+              default-time="23:59:59"
+              value-format="yyyy-MM-dd HH:mm:ss"
+            />
+          </el-col>
+        </el-row>
+        <el-row style="margin-top: 5px">
+          <el-col :span="24">
+            发送时间:
+            <el-date-picker
+              v-model="queryParams.clsj_s"
+              size="small"
+              type="datetime"
+              placeholder="请选择开始时间"
+              default-time="00:00:00"
+              value-format="yyyy-MM-dd HH:mm:ss"
+            />~
+            <el-date-picker
+              v-model="queryParams.clsj_e"
+              size="small"
+              type="datetime"
+              placeholder="请选择结束时间"
+              default-time="23:59:59"
+              value-format="yyyy-MM-dd HH:mm:ss"
+            />
+            &nbsp; 检索条件:<el-input
+              v-model="queryParams.searchText"
+              size="small"
+              style="width: 200px"
+              placeholder="输入关键字"
+              clearable
+              @keyup.enter.native="clickQuery()"
+            />&nbsp;
+            <el-button
+              type="primary"
+              size="small"
+              icon="el-icon-search"
+              @click="clickQuery()"
+              >查询</el-button
+            >&nbsp;
+            <el-button
+              type="primary"
+              size="small"
+              icon="el-icon-message"
+              :disabled="disabledDelete"
+              @click="sendAgain()"
+              >重新发送</el-button
+            >&nbsp;
+            <el-button
+              type="danger"
+              size="small"
+              icon="el-icon-delete"
+              @click="clickDelete()"
+              :disabled="disabledDelete"
+              >删除</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>
+  </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: "sendMessage",
+  components: { tfTable, cpsSelect },
+  data() {
+    return {
+      queryParams: {
+        txlx: undefined,
+        fszt: undefined,
+        scsj_s: DateHelper.getFirstDayOfMonth() + " 00:00:00",
+        scsj_e: DateHelper.getLastDayOfMonth() + " 23:59:59",
+        clsj_s: DateHelper.getFirstDayOfMonth() + " 00:00:00",
+        clsj_e: DateHelper.getLastDayOfMonth() + " 23:59:59",
+        searchText: undefined,
+      },
+      pageInfo: {
+        current: 1,
+        size: 30,
+        tableTotal: 100,
+        "orders[0].asc": "true",
+        "orders[0].column": "yhbh",
+      }, // 分页数据
+      columns: [
+        {
+          label: "短信类型",
+          prop: "txlxName",
+          align: "center",
+          width: 150,
+        },
+        {
+          label: "用户编号",
+          prop: "yhbh",
+          align: "center",
+          width: 100,
+        },
+        {
+          label: "用户名",
+          prop: "yhxm",
+          align: "center",
+          width: 200,
+        },
+        {
+          label: "联系电话",
+          prop: "lxdh",
+          align: "center",
+          width: 150,
+        },
+        {
+          label: "创建时间",
+          prop: "scsj",
+          align: "center",
+          width: 200,
+          formatter: function (row, column, value, index) {
+            return DateHelper.formatterTime(value);
+          },
+        },
+        {
+          label: "发送时间",
+          prop: "clsj",
+          align: "center",
+          width: 200,
+          formatter: function (row, column, value, index) {
+            return DateHelper.formatterTime(value);
+          },
+        },
+        {
+          label: "发送内容",
+          prop: "fsnr",
+          align: "center",
+        },
+        {
+          label: "状态",
+          prop: "fsztName",
+          align: "center",
+          width: 100,
+        },
+      ],
+      dataList: [], // 表格数据
+      selectionsData: [], // 表格选中数据
+      disabledDelete: true,
+    };
+  },
+  created() {},
+  watch: {
+    selectionsData(value) {
+      this.disabledDelete = this.selectionsData.length == 0;
+    },
+  },
+  mounted() {
+    this.bindList();
+  },
+  methods: {
+    /**
+     * 查询列表
+     */
+    bindList() {
+      let params = Object.assign({}, this.pageInfo, this.queryParams);
+      this.dataList = [];
+
+      SMSReminder.sendQuery(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();
+    },
+    /**
+     * 重新发送
+     * **/
+    sendAgain() {
+      const ids = this.selectionsData.map((item) => {
+        return item.id;
+      });
+      SMSReminder.sendAgain({ ids: ids.join(",") }).then((res) => {
+        if (res.code == 1) {
+          this.bindList();
+          this.$message.success("重新发送成功!");
+        }
+      });
+    },
+
+    /***
+     * 删除
+     * **/
+    clickDelete() {
+      this.$confirm("确定删除?", "提示", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning",
+      }).then(() => {
+        this.delete();
+      });
+    },
+
+    delete() {
+      const ids = this.selectionsData.map((item) => {
+        return item.id;
+      });
+
+      SMSReminder.delete({ ids: ids.join(",") }).then((res) => {
+        if (res.code == 1) {
+          this.bindList();
+          this.$message.success("删除成功!");
+        }
+      });
+    },
+
+    /* ----- 组件事件 ----- */
+    /**
+     * @description 改变当前页
+     */
+    handleCurrentChange(current) {
+      this.pageInfo.current = current;
+      this.bindList();
+    },
+    /**
+     * @description 分页每页条数
+     */
+    handleSizeChange(size) {
+      this.pageInfo.size = size;
+      this.bindList();
+    },
+    /**
+     * @description 选择改变
+     */
+    handleSelectionChange(rows) {
+      this.selectionsData = rows;
+    },
+  },
+};
+</script>

+ 80 - 13
src/views/mis/sms/smsSetReminder-form.vue

@@ -10,10 +10,10 @@
   >
     <el-descriptions title="" :column="2" border size="mini">
       <el-descriptions-item label="格式类型">
-        <el-form-item prop="gslx">
-          <el-select v-model="detailData.gslx" placeholder="请选择">
+        <el-form-item prop="sffsbz">
+          <el-select v-model="detailData.sffsbz" placeholder="请选择">
             <el-option
-              v-for="item in withtaxflagList"
+              v-for="item in dxgslx"
               :key="item.value"
               :label="item.label"
               :value="item.value"
@@ -23,20 +23,87 @@
         </el-form-item>
       </el-descriptions-item>
       <el-descriptions-item label="是否有效">
-        <el-form-item prop="sfyx">
-          <el-select v-model="detailData.sfyx" placeholder="请选择">
-            <el-option
-              v-for="item in withtaxflagList"
-              :key="item.value"
-              :label="item.label"
-              :value="item.value"
-            >
-            </el-option>
-          </el-select>
+        <el-form-item prop="isdisabled">
+          <cpsSelect
+            v-model="detailData.isdisabled"
+            skey="tymb"
+            size="small"
+            style="width: 180px"
+            :params="{ pcid: 29 }"
+          ></cpsSelect>
+        </el-form-item>
+      </el-descriptions-item>
+      <el-descriptions-item label="类型名称" :span="2">
+        <el-form-item prop="name">
+          <el-input v-model="detailData.name" placeholder="请输入"></el-input>
+        </el-form-item>
+      </el-descriptions-item>
+      <el-descriptions-item label="短信格式" :span="2">
+        <el-form-item prop="dxnrgs">
+          <el-input
+            v-model="detailData.dxnrgs"
+            placeholder="请输入"
+            type="textarea"
+            rows="5"
+          ></el-input>
+        </el-form-item>
+      </el-descriptions-item>
+      <el-descriptions-item label="格式注释" :span="2">
+        <el-form-item prop="dxnrzs">
+          <el-input
+            v-model="detailData.dxnrzs"
+            placeholder="请输入"
+            type="textarea"
+            rows="3"
+          ></el-input>
         </el-form-item>
       </el-descriptions-item>
     </el-descriptions>
   </el-form>
 </template>
 <script>
+import cpsSelect from "@/views/mis/common/components/cps-select.vue";
+export default {
+  components: { cpsSelect },
+  props: {
+    detailData: {},
+    editState: false,
+  },
+  data() {
+    return {
+      dxgslx: [
+        {
+          value: "0",
+          label: "固定格式",
+        },
+        {
+          value: "1",
+          label: "自定义格式",
+        },
+      ],
+      rules: {
+        sffsbz: [
+          { required: true, message: "请选择格式类型", trigger: "change" },
+        ],
+        isdisabled: [
+          { required: true, message: "请选择是否有效", trigger: "change" },
+        ],
+        name: [{ required: true, message: "请输入类型名称", trigger: "blur" }],
+        dxnrgs: [{ required: true, message: "请输入短信格式", trigger: "blur" }],
+      },
+    };
+  },
+
+  methods: {
+    validate() {
+      let flag = false;
+      this.$refs.form.validate((valid) => {
+        if (valid) {
+          flag = true;
+        }
+      });
+      return flag;
+    },
+  },
+};
 </script>

+ 64 - 31
src/views/mis/sms/smsSetReminder-index.vue

@@ -2,22 +2,23 @@
   <div class="mis-pageBox">
     <!-- 主页 -->
     <el-container>
-      <el-header height="40px">
+      <el-header height="90px">
         <div class="content-title">短信模板设置</div>
         <el-divider />
         <el-row style="margin-top: 5px">
           <el-col :span="18">
-            是否禁用:<cpsSelect
-              v-model="queryParams.isDisabled"
+            <!-- 是否禁用:<cpsSelect
+              v-model="queryParams.isdisabled"
               skey="tymb"
               size="small"
               style="width: 180px"
               :params="{ pcid: 29 }"
             ></cpsSelect>
-            &nbsp;查询条件:<el-input
+            &nbsp; -->
+            查询条件:<el-input
               v-model="queryParams.searchText"
               size="small"
-              style="width: 200px"
+              style="width: 220px"
               placeholder="请输入类型名称,内容格式"
               clearable
               @keyup.enter.native="clickQuery()"
@@ -57,7 +58,6 @@
               size="small"
               icon="el-icon-delete"
               @click="clickDelete()"
-              :disabled="disabledDelete"
               >删除</el-button
             >
           </el-col>
@@ -68,7 +68,7 @@
           :table-data="dataList"
           :column="columns"
           :for-id="false"
-          :pagination="false"
+          :pagination="true"
           :currentpage="pageInfo.current"
           :pagesize="pageInfo.size"
           :total="pageInfo.tableTotal"
@@ -125,12 +125,12 @@ export default {
     return {
       /* ----- 主页 ----- */
       queryParams: {
-        isDisabled: "",
+        isdisabled: "",
         searchText: "",
       },
       pageInfo: {
         current: 1,
-        size: 100,
+        size: 30,
         tableTotal: 100,
         "orders[0].asc": "true",
         "orders[0].column": "code",
@@ -141,38 +141,48 @@ export default {
           prop: "code",
           align: "center",
           sortable: true,
+          width:150,
         },
         {
           label: "类型名称",
-          prop: "typemc",
+          prop: "name",
           align: "center",
+          width:200,
         },
         {
           label: "短信格式",
-          prop: "dxgs",
+          prop: "dxnrgs",
           align: "center",
         },
         {
           label: "格式类型",
-          prop: "gslx",
+          prop: "sffsbzName",
           align: "center",
+          width:200,
         },
-        {
-          label: "状态",
-          prop: "zt",
-          align: "center",
-          formatter: function (row, column, value, index) {
-            return value == 1 ? "启用" : "禁用";
-          },
-        },
+        // {
+        //   label: "状态",
+        //   prop: "zt",
+        //   align: "center",
+        //   formatter: function (row, column, value, index) {
+        //     return value == 1 ? "启用" : "禁用";
+        //   },
+        // },
       ],
       dataList: [], // 表格数据
       selectedRow: {}, //表格选中行
       /* ----- 详情页 ----- */
       dialogTitle: "新增",
+      editType: false,
       editState: false, //编辑状态,true:禁用;false:启用
       dialogVisible: false,
-      detailData: {},
+      detailData: {
+        sffsbz: undefined,
+        isdisabled: undefined,
+        name: undefined,
+        dxnrgs: undefined,
+        dxnrzs: undefined,
+      },
     };
   },
   created() {},
@@ -188,22 +198,49 @@ export default {
     bindList() {
       let params = Object.assign({}, this.pageInfo, this.queryParams);
       this.dataList = [];
+      SMSSet.query(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("查询失败!");
+        });
     },
 
     add() {
       let params = Object.assign({}, this.detailData);
-      params.czryBm = this.$store.state.user.userId;
-      params.czryMc = this.$store.state.user.realName;
-      params.czsj = DateHelper.getNowFormatDate(true);
+      SMSSet.add(params).then((res) => {
+        if (res.code == 1) {
+          this.bindList();
+          this.$message.success("添加成功!");
+          this.dialogVisible = false;
+        }
+      });
     },
     modify() {
       let params = Object.assign({}, this.detailData);
-      params.czryBm = this.$store.state.user.userId;
-      params.czryMc = this.$store.state.user.realName;
-      params.czsj = DateHelper.getNowFormatDate(true);
+      SMSSet.modify(params).then((res) => {
+        if (res.code == 1) {
+          this.bindList();
+          this.$message.success("修改成功!");
+          this.dialogVisible = false;
+        }
+      });
     },
     delete() {
       let code = this.selectedRow.code;
+      SMSSet.delete(code).then((res) => {
+        if (res.code == 1) {
+          this.bindList();
+          this.$message.success("删除成功!");
+        }
+      });
     },
 
     /* ----- dom事件 ----- */
@@ -218,10 +255,6 @@ export default {
      * @description 添加
      */
     clickAdd() {
-      this.detailData.czryMc = this.$store.state.user.realName;
-      this.detailData.czryMc;
-      this.detailData.czsj = DateHelper.getNowFormatDate(true);
-
       this.editType = true;
       this.dialogTitle = "添加短信模板";
       this.editState = false;

+ 354 - 0
src/views/mis/sms/smsUserNotice-index.vue

@@ -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
+                >&nbsp; 所属抄表册:<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>
+                &nbsp;检索条件:<el-input
+                  v-model="queryParams.searchText"
+                  size="small"
+                  style="width: 180px"
+                  placeholder="输入用户名,用户编号等"
+                  clearable
+                  @keyup.enter.native="clickQuery()"
+                />&nbsp;
+                <el-checkbox v-model="queryParams.yzsj" size="medium"
+                  >验证手机</el-checkbox
+                >
+                &nbsp;
+                <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>
+