Browse Source

用户相关,正则优化,费用查询相关

sqg 3 years ago
parent
commit
e91d2f8529

+ 1 - 1
front-vue/src/views/service/company/coreCompanyManage.vue

@@ -296,7 +296,7 @@ export default {
         scyName: [
           { required: true, message: "企业名称不能为空", trigger: "blur"},
           {
-            pattern: /^[0-9A-Z\u4E00-\u9FFF《》()()]+$/,
+            pattern: /^[0-9A-Z\u4E00-\u9FFF《》()()-]+$/,
             message: "企业名称不能含有特殊字符",
             trigger: ["blur", "change"]
           }

+ 25 - 21
front-vue/src/views/service/cost/costManage.vue

@@ -57,7 +57,7 @@
                 size="small"
                 style="width: 215px">
                     <el-option
-                    v-for="dict in zciInvoiceStatusOptions"
+                    v-for="dict in invoiceStatusOptions"
                     :key="dict.dictValue"
                     :label="dict.dictLabel"
                     :value="dict.dictValue"
@@ -186,7 +186,7 @@
                   ></el-option>
           </el-select>
       </el-form-item>
-        <el-form-item label="发票状态" prop="zciInvoiceStatus">
+        <!-- <el-form-item label="发票状态" prop="zciInvoiceStatus">
             <el-select v-model="invoiceParams.zciInvoiceStatus"
                 placeholder="发票状态"
                 clearable
@@ -199,7 +199,7 @@
                     :value="dict.dictValue"
                     ></el-option>
             </el-select>
-        </el-form-item>
+        </el-form-item> -->
         <el-form-item label="创建时间">
           <el-date-picker v-model="dateInvoiceRange" size="small" style="width: 225px" 
           value-format="yyyy-MM-dd" type="daterange" range-separator="-" start-placeholder="开始日期" 
@@ -380,6 +380,7 @@ export default {
       zciStatusOptions:[],
       //发票状态
       zciInvoiceStatusOptions:[],
+      invoiceStatusOptions : [],
       //融资状态 
       zfrStatusOptions:[],
       //操作员Id
@@ -510,9 +511,9 @@ export default {
       },
       // 表单校验
       rules: {
-        zciExpressNo: [
-          { required: true, message: "快递单号不能为空", trigger: "blur" },
-        ]
+        // zciExpressNo: [
+        //   { required: true, message: "快递单号不能为空", trigger: "blur" },
+        // ]
       },
     };
   },
@@ -520,30 +521,33 @@ export default {
     this.getDicts("ser_zci_status").then(response => {
       this.zciStatusOptions = response.data;
     });
-    this.getDicts("	ser_zci_invoice_status").then(response => {
+    this.getDicts("ser_zci_invoice_status").then(response => {
       this.zciInvoiceStatusOptions = response.data;
     });
-    this.getDicts("	ser_zfr_status").then(response => {
-      this.zfrStatusOptions = response.data;
-    });
-    this.getList();
-    this.getInvoice();
-    this.getUser();
-  },
-  activated() {
-    this.getDicts("ser_zci_status").then(response => {
-      this.zciStatusOptions = response.data;
-    });
-    this.getDicts("	ser_zci_invoice_status").then(response => {
-      this.zciInvoiceStatusOptions = response.data;
+    this.getDicts("ser_invoice_status").then(response => {
+      this.invoiceStatusOptions = response.data;
     });
-    this.getDicts("	ser_zfr_status").then(response => {
+    this.getDicts("ser_zfr_status").then(response => {
       this.zfrStatusOptions = response.data;
     });
     this.getList();
     this.getInvoice();
     this.getUser();
   },
+  // activated() {
+  //   this.getDicts("ser_zci_status").then(response => {
+  //     this.zciStatusOptions = response.data;
+  //   });
+  //   this.getDicts("	ser_zci_invoice_status").then(response => {
+  //     this.zciInvoiceStatusOptions = response.data;
+  //   });
+  //   this.getDicts("	ser_zfr_status").then(response => {
+  //     this.zfrStatusOptions = response.data;
+  //   });
+  //   this.getList();
+  //   this.getInvoice();
+  //   this.getUser();
+  // },
   mounted() {
     this.columnQuery();
   },

+ 2 - 2
front-vue/src/views/service/rel/companyRel.vue

@@ -592,7 +592,7 @@ export default {
         scyName: [
           { required: true, message: "企业名称不能为空", trigger: ["blur", "change"] },
           {
-            pattern: /^[0-9A-Z\u4E00-\u9FFF《》()()]+$/,
+            pattern: /^[0-9A-Z\u4E00-\u9FFF《》()()-]+$/,
             message: "企业名称不能带有特殊字符",
             trigger: ["blur","change"]
           }
@@ -720,7 +720,7 @@ export default {
     },
     /** 下载模板操作 */
     importTemplate() {
-      this.download('/sc-service/relImport/importTemplate', {
+      this.download('//relImport/importTemplate', {
         ...this.queryParams
       }, `链属模板_${new Date().getTime()}.xls`)
     },

+ 41 - 15
front-vue/src/views/system/user/index.vue

@@ -202,10 +202,10 @@
           <el-table-column
             label="状态"
             align="center"
-            prop="state"
+            prop="status"
             :show-overflow-tooltip="true"
             :formatter="stateFormat"
-            v-if="uncheckList.state"
+            v-if="uncheckList.status"
           />
           <!-- <el-table-column
             label="状态"
@@ -286,6 +286,7 @@
                 >删除</el-button
               >
               <el-button
+                v-if="scope.row.status == '0' "
                 size="mini"
                 type="text"
                 icon="el-icon-key"
@@ -293,6 +294,15 @@
                 v-hasPermi="['system:user:resetPwd']"
                 >重置</el-button
               >
+              <el-button
+                v-if="scope.row.status != '0' "
+                size="mini"
+                type="text"
+                icon="el-icon-key"
+                @click="handleStatusChange(scope.row)"
+                v-hasPermi="['system:user:statusChange']"
+                >解冻</el-button
+              >
             </template>
           </el-table-column>
         </el-table>
@@ -325,7 +335,7 @@
               <el-form-item label="手机号" prop="userName">
                 <el-input
                   v-model="form.userName"
-                  placeholder="请输入登录手机号"
+                  placeholder="请输入手机号"
                   maxlength="11"
                   :disabled="isUpdate"
                 />
@@ -657,7 +667,7 @@ export default {
           value: "部门",
         },
         {
-          label: "state",
+          label: "status",
           value: "状态",
         },
         {
@@ -715,7 +725,7 @@ export default {
         userName: [
           {
             required: true,
-            message: "登陆名称不能为空",
+            message: "手机号不能为空",
             trigger: "blur",
           },
           {
@@ -730,6 +740,11 @@ export default {
             message: "用户姓名不能为空",
             trigger: ["blur", "change"],
           },
+          {
+            pattern: /^[A-Za-z\u4e00-\u9fa5]+$/,
+            message: "用户姓名不能带有特殊字符",
+            trigger: ["blur","change"]
+          }
         ],
         deptId: [
           {
@@ -891,6 +906,7 @@ export default {
     },
     /** 查询用户列表 */
     getList() {
+      this.loading = true;
       listUser(this.addDateRange(this.queryParams, this.dateRange)).then(
         (response) => {
           this.userList = response.rows;
@@ -923,20 +939,30 @@ export default {
     },
     // 用户状态修改
     handleStatusChange(row) {
-      let text = row.status === "0" ? "解冻" : "冻结";
-      this.$confirm("确认要" + text + '"' + row.userName + '"用户吗?', "警告", {
-        confirmButtonText: "确定",
-        cancelButtonText: "取消",
-        type: "warning",
-      })
+      const userId = row.userId || this.ids;
+      const nickNames = row.nickName || this.ids;
+      const status = '0';
+      this.$confirm(
+        '是否确认解冻用户姓名为"' + nickNames + '"的数据项?',
+        "警告",
+        {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning",
+        }
+      )
         .then(function () {
-          return changeUserStatus(row.userId, row.status);
+          return changeUserStatus(userId, status);
         })
         .then(() => {
-          this.msgSuccess(text + "成功");
+          this.getList();
+          this.msgSuccess("解冻成功");
         })
-        .catch(function () {
-          row.status = row.status === "0" ? "1" : "0";
+        .catch(() => {
+          this.$message({
+            type: "warning",
+            message: "已取消解冻",
+          });
         });
     },
     // 取消按钮