yangll 3 лет назад
Родитель
Сommit
b3405246c1

+ 217 - 0
src/views/smscheck/CompanyList.vue

@@ -0,0 +1,217 @@
+<template>
+  <a-card :bordered="false">
+    <!-- 查询区域 -->
+    <div class="table-page-search-wrapper">
+      <a-form layout="inline" @keyup.enter.native="searchQuery">
+        <a-row :gutter="24">
+          <a-col :xl="6" :lg="7" :md="8" :sm="24">
+            <a-form-item label="客户编号">
+              <j-input placeholder="请输入客户编号" v-model="queryParam.customerNo"></j-input>
+            </a-form-item>
+          </a-col>
+          <a-col :xl="6" :lg="7" :md="8" :sm="24">
+            <a-form-item label="客户名称">
+              <j-input placeholder="请输入客户名称" v-model="queryParam.customerName"></j-input>
+            </a-form-item>
+          </a-col>
+          <template v-if="toggleSearchStatus">
+            <a-col :xl="6" :lg="7" :md="8" :sm="24">
+              <a-form-item label="客户经理">
+                <j-input placeholder="请输入客户经理" v-model="queryParam.manager"></j-input>
+              </a-form-item>
+            </a-col>
+            <a-col :xl="6" :lg="7" :md="8" :sm="24">
+              <a-form-item label="经理电话">
+                <j-input placeholder="请输入经理电话" v-model="queryParam.phone"></j-input>
+              </a-form-item>
+            </a-col>
+          </template>
+          <a-col :xl="6" :lg="7" :md="8" :sm="24">
+            <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
+              <a-button type="primary" @click="searchQuery" icon="search">查询</a-button>
+              <a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button>
+              <a @click="handleToggleSearch" style="margin-left: 8px">
+                {{ toggleSearchStatus ? '收起' : '展开' }}
+                <a-icon :type="toggleSearchStatus ? 'up' : 'down'"/>
+              </a>
+            </span>
+          </a-col>
+        </a-row>
+      </a-form>
+    </div>
+    <!-- 查询区域-END -->
+
+    <!-- 操作按钮区域 -->
+<!--    <div class="table-operator">-->
+<!--      <a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>-->
+<!--      <a-button type="primary" icon="download" @click="handleExportXls('公司表')">导出</a-button>-->
+<!--      <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">-->
+<!--        <a-button type="primary" icon="import">导入</a-button>-->
+<!--      </a-upload>-->
+<!--      &lt;!&ndash; 高级查询区域 &ndash;&gt;-->
+<!--      <j-super-query :fieldList="superFieldList" ref="superQueryModal" @handleSuperQuery="handleSuperQuery"></j-super-query>-->
+<!--      <a-dropdown v-if="selectedRowKeys.length > 0">-->
+<!--        <a-menu slot="overlay">-->
+<!--          <a-menu-item key="1" @click="batchDel"><a-icon type="delete"/>删除</a-menu-item>-->
+<!--        </a-menu>-->
+<!--        <a-button style="margin-left: 8px"> 批量操作 <a-icon type="down" /></a-button>-->
+<!--      </a-dropdown>-->
+<!--    </div>-->
+
+    <!-- table区域-begin -->
+    <div>
+<!--      <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">-->
+<!--        <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a style="font-weight: 600">{{ selectedRowKeys.length }}</a>项-->
+<!--        <a style="margin-left: 24px" @click="onClearSelected">清空</a>-->
+<!--      </div>-->
+
+      <a-table
+        ref="table"
+        size="middle"
+        :scroll="{x:true}"
+        bordered
+        rowKey="id"
+        :columns="columns"
+        :dataSource="dataSource"
+        :pagination="ipagination"
+        :loading="loading"
+        :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
+        class="j-table-force-nowrap"
+        @change="handleTableChange">
+
+
+<!--        <span slot="action" slot-scope="text, record">-->
+<!--          <a @click="handleEdit(record)">编辑</a>-->
+
+<!--          <a-divider type="vertical" />-->
+<!--          <a-dropdown>-->
+<!--            <a class="ant-dropdown-link">更多 <a-icon type="down" /></a>-->
+<!--            <a-menu slot="overlay">-->
+<!--              <a-menu-item>-->
+<!--                <a @click="handleDetail(record)">详情</a>-->
+<!--              </a-menu-item>-->
+<!--              <a-menu-item>-->
+<!--                <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">-->
+<!--                  <a>删除</a>-->
+<!--                </a-popconfirm>-->
+<!--              </a-menu-item>-->
+<!--            </a-menu>-->
+<!--          </a-dropdown>-->
+<!--        </span>-->
+        <!-- 任务名称可点击 -->
+        <template v-slot:customerName="text, record">
+          <a @click="showCompanyList(record)">{{text}}</a>
+        </template>
+
+      </a-table>
+    </div>
+
+    <sms-check-company-modal ref="modalForm" @ok="modalFormOk"></sms-check-company-modal>
+  </a-card>
+</template>
+
+<script>
+
+  import '@/assets/less/TableExpand.less'
+  import { mixinDevice } from '@/utils/mixin'
+  import { JeecgListMixin } from '@/mixins/JeecgListMixin'
+  import SmsCheckCompanyModal from './modules/SmsCheckCompanyModal'
+
+  export default {
+    name: 'SmsCheckCompanyList',
+    mixins:[JeecgListMixin, mixinDevice],
+    components: {
+      SmsCheckCompanyModal
+    },
+    data () {
+      return {
+        description: '公司表管理页面',
+        // 表头
+        columns: [
+          {
+            title: '#',
+            dataIndex: '',
+            key:'rowIndex',
+            width:60,
+            align:"center",
+            customRender:function (t,r,index) {
+              return parseInt(index)+1;
+            }
+          },
+          {
+            title:'客户名称',
+            align:"left",
+            dataIndex: 'customerName',
+            scopedSlots: { customRender: 'customerName' }
+          },
+          {
+            title:'客户编号',
+            align:"center",
+            dataIndex: 'customerNo'
+          },
+          {
+            title:'客户经理',
+            align:"center",
+            dataIndex: 'manager'
+          },
+          {
+            title:'经理电话',
+            align:"center",
+            dataIndex: 'phone'
+          },
+          // {
+          //   title:'描述',
+          //   align:"center",
+          //   dataIndex: 'description'
+          // },
+          // {
+          //   title: '操作',
+          //   dataIndex: 'action',
+          //   align:"center",
+          //   fixed:"right",
+          //   width:147,
+          //   scopedSlots: { customRender: 'action' }
+          // }
+        ],
+        url: {
+          list: "/smsCheck/company/list",
+          delete: "/smsCheck/company/delete",
+          deleteBatch: "/smsCheck/company/deleteBatch",
+          exportXlsUrl: "/smsCheck/company/exportXls",
+          importExcelUrl: "smsCheck/company/importExcel",
+
+        },
+        dictOptions:{},
+        superFieldList:[],
+      }
+    },
+    created() {
+    this.getSuperFieldList();
+    },
+    computed: {
+      importExcelUrl: function(){
+        return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
+      },
+    },
+    methods: {
+      initDictConfig(){
+      },
+      getSuperFieldList(){
+        let fieldList=[];
+        fieldList.push({type:'string',value:'customerNo',text:'客户编号',dictCode:''})
+        fieldList.push({type:'string',value:'customerName',text:'客户名称',dictCode:''})
+        fieldList.push({type:'string',value:'manager',text:'客户经理',dictCode:''})
+        fieldList.push({type:'string',value:'phone',text:'经理电话',dictCode:''})
+        fieldList.push({type:'string',value:'description',text:'描述',dictCode:''})
+        this.superFieldList = fieldList
+      },
+      // 显示导入页面
+      showCompanyList(record) {
+        this.$router.push({ path: '/sms/check/company/detail' ,query:{id:record.id}});
+      },
+    }
+  }
+</script>
+<style scoped>
+  @import '~@assets/less/common.less';
+</style>

+ 188 - 0
src/views/smscheck/modules/CompanyDetail.vue

@@ -0,0 +1,188 @@
+<template>
+
+  <div>
+    <a-page-header
+      style="background-color: #FFFFFF;"
+      title="客户详情"
+      sub-title=""
+      @back="showCheckList"
+    >
+      <a-descriptions :title="info.customerName" :column="3" :bordered="false">
+        <a-descriptions-item label="客户编号">{{info.customerNo}}</a-descriptions-item>
+        <a-descriptions-item label="客户经理">{{info.manager}}</a-descriptions-item>
+        <a-descriptions-item label="经理电话">{{info.phone}}</a-descriptions-item>
+      </a-descriptions>
+    </a-page-header>
+
+    <a-card :bordered="false" style="margin-top: 10px;">
+      <a-form-model
+        ref="ruleForm"
+        :label-col="{ span: 1 }"
+        :wrapper-col="{ span: 23 }"
+      >
+
+        <a-card :bordered="false" title="服务列表" style="margin-top: 10px;">
+          <a-table size="small"
+                   :dataSource="smsNumberList"
+                   :columns="smsNumberColumns"
+                   rowKey="id"
+                   :pagination="ipagination"
+                   @change="handleTableChange2">
+
+          </a-table>
+        </a-card>
+
+
+        <a-form-model-item :wrapper-col="{ span: 14, offset: 4 }" style="margin-top: 10px;">
+          <a-space>
+            <a-button @click="showCheckList">
+              返回
+            </a-button>
+          </a-space>
+        </a-form-model-item>
+
+      </a-form-model>
+
+    </a-card>
+
+  </div>
+
+</template>
+
+<script>
+
+import { httpAction, getAction } from '@api/manage'
+import '@/assets/less/TableExpand.less'
+import { JeecgListMixin } from '@/mixins/JeecgListMixin'
+import {filterObj} from '@/utils/util'
+
+export default {
+  name: 'CompanyDetail',
+  inject:['closeCurrent'],
+  mixins:[JeecgListMixin],
+  data () {
+    return {
+      description: '稽核详情页面',
+      info: {},
+      url: {
+        queryInfo: "/smsCheck/company/queryById",
+        smsNumberList: "/smsCheck/smsNumber/list",
+        list: "/smsCheck/customerInfo/list",
+        listData: "/smsCheck/customerData/list"
+      },
+      customerNo: '',
+      smsNumberList: [],
+      smsNumberColumns:[
+        {
+          title: '用户编号',
+          align:"left",
+          dataIndex: 'userNo'
+        },
+        {
+          title: '服务号码',
+          align:"left",
+          dataIndex: 'smsNumber'
+        },
+        {
+          title: '开通状态',
+          align:"left",
+          dataIndex: 'userState'
+        },
+        {
+          title: '入网时间',
+          align:"left",
+          dataIndex: 'networkAccessTime'
+        },
+        {
+          title: '操作',
+          align:"left",
+          dataIndex: 'op',
+          scopedSlots: { customRender: 'taskCheck' }
+        }
+      ],
+      ipagination:{
+        current: 1,
+        pageSize: 5,
+        pageSizeOptions: ['5', '10', '20', '30'],
+        showTotal: (total, range) => {
+          return range[0] + "-" + range[1] + " 共" + total + "条"
+        },
+        showQuickJumper: true,
+        showSizeChanger: true,
+        total: 0
+      },+
+      autoSearch: false,
+    }
+  },
+  created() {
+    this.info.id = this.$route.query.id;
+    this.queryInfoById(this.info.id);
+  },
+  methods: {
+    // 显示列表页面
+    showCheckList() {
+      this.$router.go(-1);
+      this.closeCurrent();
+    },
+    queryInfoById (id) {
+      let url = this.url.queryInfo;
+      let params = {
+        id: id
+      }
+      let that = this;
+      getAction(url, params).then(res => {
+        if (res.success) {
+          that.info = res.result;
+          that.customerNo = that.info.customerNo;
+          if (that.customerNo) {
+            that.getSmsNumberList();
+          }
+        }
+      }).finally(() => {
+
+      })
+    },
+    getSmsNumberList() {
+      let httpUrl = this.url.smsNumberList;
+
+      let queryParam = {
+        'customerNo': this.customerNo
+      };
+
+      let param = Object.assign({},queryParam);
+      param.pageNo = this.ipagination.current;
+      param.pageSize = this.ipagination.pageSize;
+
+      let params = filterObj(param);
+      let that = this;
+      // 发送请求
+      getAction(httpUrl, params)
+        .then((res) => {
+          if(res.success){
+            that.smsNumberList = res.result.records;
+          }else{
+            that.smsNumberList = [];
+          }
+        }).finally(() => {
+
+      })
+    },
+    handleTableChange2(pagination, filters, sorter) {
+      //分页、排序、筛选变化时触发
+      if (Object.keys(sorter).length > 0) {
+        this.isorter.column = sorter.field;
+        this.isorter.order = "ascend" == sorter.order ? "asc" : "desc"
+      }
+      this.ipagination = pagination;
+      this.getSmsNumberList();
+    },
+  }
+}
+</script>
+
+<style scoped>
+.badge-width-100{
+  width: 100%;
+}
+
+</style>

+ 124 - 0
src/views/smscheck/modules/SmsCheckCompanyForm.vue

@@ -0,0 +1,124 @@
+<template>
+  <a-spin :spinning="confirmLoading">
+    <j-form-container :disabled="formDisabled">
+      <a-form-model ref="form" :model="model" :rules="validatorRules" slot="detail">
+        <a-row>
+          <a-col :span="12">
+            <a-form-model-item label="客户编号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="customerNo">
+              <a-input v-model="model.customerNo" placeholder="请输入客户编号"  ></a-input>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="12">
+            <a-form-model-item label="客户名称" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="customerName">
+              <a-input v-model="model.customerName" placeholder="请输入客户名称"  ></a-input>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="12">
+            <a-form-model-item label="客户经理" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="manager">
+              <a-input v-model="model.manager" placeholder="请输入客户经理"  ></a-input>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="12">
+            <a-form-model-item label="经理电话" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="phone">
+              <a-input v-model="model.phone" placeholder="请输入经理电话"  ></a-input>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="12">
+            <a-form-model-item label="描述" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="description">
+              <a-input v-model="model.description" placeholder="请输入描述"  ></a-input>
+            </a-form-model-item>
+          </a-col>
+        </a-row>
+      </a-form-model>
+    </j-form-container>
+  </a-spin>
+</template>
+
+<script>
+
+  import { httpAction, getAction } from '@/api/manage'
+  import { validateDuplicateValue } from '@/utils/util'
+
+  export default {
+    name: 'SmsCheckCompanyForm',
+    components: {
+    },
+    props: {
+      //表单禁用
+      disabled: {
+        type: Boolean,
+        default: false,
+        required: false
+      }
+    },
+    data () {
+      return {
+        model:{
+         },
+        labelCol: {
+          xs: { span: 24 },
+          sm: { span: 5 },
+        },
+        wrapperCol: {
+          xs: { span: 24 },
+          sm: { span: 16 },
+        },
+        confirmLoading: false,
+        validatorRules: {
+        },
+        url: {
+          add: "/smsCheck/company/add",
+          edit: "/smsCheck/company/edit",
+          queryById: "/smsCheck/company/queryById"
+        }
+      }
+    },
+    computed: {
+      formDisabled(){
+        return this.disabled
+      },
+    },
+    created () {
+       //备份model原始值
+      this.modelDefault = JSON.parse(JSON.stringify(this.model));
+    },
+    methods: {
+      add () {
+        this.edit(this.modelDefault);
+      },
+      edit (record) {
+        this.model = Object.assign({}, record);
+        this.visible = true;
+      },
+      submitForm () {
+        const that = this;
+        // 触发表单验证
+        this.$refs.form.validate(valid => {
+          if (valid) {
+            that.confirmLoading = true;
+            let httpurl = '';
+            let method = '';
+            if(!this.model.id){
+              httpurl+=this.url.add;
+              method = 'post';
+            }else{
+              httpurl+=this.url.edit;
+               method = 'put';
+            }
+            httpAction(httpurl,this.model,method).then((res)=>{
+              if(res.success){
+                that.$message.success(res.message);
+                that.$emit('ok');
+              }else{
+                that.$message.warning(res.message);
+              }
+            }).finally(() => {
+              that.confirmLoading = false;
+            })
+          }
+
+        })
+      },
+    }
+  }
+</script>

+ 60 - 0
src/views/smscheck/modules/SmsCheckCompanyModal.vue

@@ -0,0 +1,60 @@
+<template>
+  <j-modal
+    :title="title"
+    :width="width"
+    :visible="visible"
+    switchFullscreen
+    @ok="handleOk"
+    :okButtonProps="{ class:{'jee-hidden': disableSubmit} }"
+    @cancel="handleCancel"
+    cancelText="关闭">
+    <sms-check-company-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></sms-check-company-form>
+  </j-modal>
+</template>
+
+<script>
+
+  import SmsCheckCompanyForm from './SmsCheckCompanyForm'
+  export default {
+    name: 'SmsCheckCompanyModal',
+    components: {
+      SmsCheckCompanyForm
+    },
+    data () {
+      return {
+        title:'',
+        width:896,
+        visible: false,
+        disableSubmit: false
+      }
+    },
+    methods: {
+      add () {
+        this.visible=true
+        this.$nextTick(()=>{
+          this.$refs.realForm.add();
+        })
+      },
+      edit (record) {
+        this.visible=true
+        this.$nextTick(()=>{
+          this.$refs.realForm.edit(record);
+        })
+      },
+      close () {
+        this.$emit('close');
+        this.visible = false;
+      },
+      handleOk () {
+        this.$refs.realForm.submitForm();
+      },
+      submitCallback(){
+        this.$emit('ok');
+        this.visible = false;
+      },
+      handleCancel () {
+        this.close()
+      }
+    }
+  }
+</script>