Przeglądaj źródła

Merge branch 'master' of http://121.28.134.38:2039/wxd/jiliangxiaochengxu into dudidi

# Conflicts:
#	pages.json
杜迪迪 3 miesięcy temu
rodzic
commit
ac8135b9eb

+ 18 - 0
api/Ledger.js

@@ -19,3 +19,21 @@ export const getLedgerDetails = (params) => {
     params,
   });
 };
+
+//获取备案记录
+export function getauditRecordList(params) {
+  return request({
+    url: "/api/instrument/auditRecordList",
+    method: "get",
+    params,
+  });
+}
+
+//获取检定记录
+export function getCheckRecordList(params) {
+  return request({
+    url: "/api/instrument/checkRecordList",
+    method: "get",
+    params,
+  });
+}

+ 9 - 0
api/login.js

@@ -86,3 +86,12 @@ export function wxBindUser(data) {
     data,
   });
 }
+
+//查看单位是否存在
+export function checkMechanismIsExist(params) {
+  return request({
+    url: "/api/register/checkMechanismIsExist",
+    method: "get",
+    params,
+  });
+}

+ 4 - 2
components/companiesRegistered/uploadLicense.vue

@@ -2,7 +2,9 @@
 
 <template>
   <view class="container">
-    <view style="color: #3c9cff" class="uploadTitle">上传营业执照</view>
+    <view style="color: #3c9cff" class="uploadTitle"
+      >上传{{ formdData.type }}</view
+    >
     <view class="updateContent">
       <view style="margin: 0 auto">
         <u-upload
@@ -26,7 +28,7 @@
               >
             </view>
             <view class="topic">
-              请上传营业执照正面照片,限制照片大小30MB。
+              请上传{{ formdData.type }}正面照片,限制照片大小30MB。
             </view>
           </view>
         </u-upload>

+ 71 - 4
components/personRegistered/uploadLicense.vue

@@ -2,12 +2,33 @@
 
 <template>
   <view class="container">
-    <view style="color: #3c9cff" class="informationTitle">上传身份信息</view>
+    <view style="color: #3c9cff" class="informationTitle"
+      >上传身份信息 (需要先验证企业代码才能上传个人证件照)</view
+    >
 
     <view class="cardImage">
-      <view class="updateContent">
+      <view class="conmpan">
+        <view style="width: 85%; margin: 0 auto">
+          <u-form>
+            <u-form-item
+              labelPosition="top"
+              labelWidth="160"
+              :required="true"
+              label="企业社会统一信用代码"
+            >
+              <u-input
+                @blur="handleDetect"
+                v-model="conmpanCode"
+                placeholder="请输入企业社会统一信用代码"
+              ></u-input>
+            </u-form-item>
+          </u-form>
+        </view>
+      </view>
+      <view class="updateContent" :style="{ opacity: !isPass ? '0.5' : 1 }">
         <view style="margin: 0 auto">
           <u-upload
+            :disabled="!isPass"
             name="1"
             :fileList="fileList1"
             @afterRead="afterRead"
@@ -38,9 +59,10 @@
         </view>
       </view>
 
-      <view class="updateContent">
+      <view class="updateContent" :style="{ opacity: !isPass ? '0.5' : 1 }">
         <view style="margin: 0 auto">
           <u-upload
+            :disabled="!isPass"
             name="2"
             :fileList="fileList2"
             @afterRead="afterRead"
@@ -71,15 +93,28 @@
         </view>
       </view>
     </view>
+
+    <u-modal
+      @cancel="showModal = false"
+      confirmText="退出"
+      @confirm="handleCancel"
+      :show="showModal"
+      :title="'提示'"
+      :content="'您输入的企业没有注册,需要先进行企业注册。'"
+    ></u-modal>
   </view>
 </template>
 
 <script>
+import { checkMechanismIsExist } from "@/api/login";
 export default {
   data() {
     return {
+      showModal: false,
+      isPass: false,
       fileList1: [],
       fileList2: [],
+      conmpanCode: "",
     };
   },
   props: {
@@ -101,6 +136,9 @@ export default {
   },
 
   methods: {
+    handleCancel() {
+      this.showModal = false;
+    },
     deletePic(event) {
       this[`fileList${event.name}`].splice(event.index, 1);
     },
@@ -160,11 +198,37 @@ export default {
         });
       });
     },
+    //检测企业代码是否合法
+    async handleDetect() {
+      if (!this.conmpanCode) return;
+      uni.showLoading({
+        title: "检测企业是否注册...",
+      });
+      try {
+        let { code } = await checkMechanismIsExist({ code: this.conmpanCode });
+        if (code == 200) {
+          this.isPass = true;
+          uni.showToast({
+            title: "检测通过",
+            //将值设置为 success 或者直接不用写icon这个参数
+            //显示持续时间为 2秒
+            duration: 2000,
+          });
+        }
+      } catch (error) {
+        this.isPass = false;
+      }
+    },
   },
 };
 </script>
 
 <style lang="scss">
+.conmpan {
+  width: 100%;
+  margin: 0 auto;
+  background: #fff;
+}
 .topic {
   color: #909399;
   font-size: 24rpx;
@@ -172,17 +236,20 @@ export default {
   margin: 20rpx auto 0;
   font-family: "宋体";
 }
+
 .uploadTipcContent {
-  width: 555rpx;
+  width: 600rpx;
   height: 260rpx;
   padding: 30rpx;
   border: 1px dotted#909399;
 }
+
 .updateContent {
   display: flex;
   background: #fff;
   padding: 30rpx;
 }
+
 .informationTitle {
   margin-bottom: 30rpx;
   font-size: 30;

+ 280 - 250
pages.json

@@ -1,253 +1,283 @@
 {
-	"pages": [{
-			"path": "pages/login",
-			"style": {
-				"navigationStyle": "custom"
-			}
-		},
-		{
-			"path": "pages/register",
-			"style": {
-				"navigationBarTitleText": "注册"
-			}
-		},
-		{
-			"path": "pages/index",
-			"style": {
-				"navigationBarTitleText": "首页"
-			}
-		},
-		{
-			"path": "pages/work/index",
-			"style": {
-				"navigationBarTitleText": "工作台",
-				"enablePullDownRefresh": true
-			}
-		},
-		{
-			"path": "pages/mine/index",
-			"style": {
-				"navigationBarTitleText": "我的"
-			}
-		},
-		{
-			"path": "pages/mine/avatar/index",
-			"style": {
-				"navigationBarTitleText": "修改头像"
-			}
-		},
-		{
-			"path": "pages/mine/info/index",
-			"style": {
-				"navigationBarTitleText": "个人信息"
-			}
-		},
-		{
-			"path": "pages/mine/info/edit",
-			"style": {
-				"navigationBarTitleText": "编辑资料"
-			}
-		},
-		{
-			"path": "pages/mine/pwd/index",
-			"style": {
-				"navigationBarTitleText": "修改密码"
-			}
-		},
-		{
-			"path": "pages/mine/setting/index",
-			"style": {
-				"navigationBarTitleText": "应用设置"
-			}
-		},
-		{
-			"path": "pages/mine/help/index",
-			"style": {
-				"navigationBarTitleText": "常见问题"
-			}
-		},
-		{
-			"path": "pages/mine/about/index",
-			"style": {
-				"navigationBarTitleText": "关于我们"
-			}
-		},
-		{
-			"path": "pages/common/webview/index",
-			"style": {
-				"navigationBarTitleText": "浏览网页"
-			}
-		},
-		{
-			"path": "pages/common/textview/index",
-			"style": {
-				"navigationBarTitleText": "浏览文本"
-			}
-		},
-		{
-			"path": "pages/Ledger/list",
-			"style": {
-				"navigationBarTitleText": "台账"
-			}
-		},
-		{
-			"path": "pages/Ledger/details",
-			"style": {
-				"navigationBarTitleText": "详情"
-			}
-		},
-		{
-			"path": "pages/assay/index",
-			"style": {
-				"navigationBarTitleText": "我的备案申请",
-				"enablePullDownRefresh": true
-			}
-		},
-		{
-			"path": "pages/verification/list",
-			"style": {
-				"navigationBarTitleText": "检定"
-			}
-		},
-		{
-			"path": "pages/verification/details",
-			"style": {
-				"navigationBarTitleText": "检定申请单详细"
-			}
-		},
-		{
-			"path": "pages/assay/details",
-			"style": {
-				"navigationBarTitleText": "备案查看"
-			}
-		},
-		{
-			"path": "pages/assay/application",
-			"style": {
-				"navigationBarTitleText": "器具备案申请"
-			}
-		},
-		{
-			"path": "pages/verification/taskList",
-			"style": {
-				"navigationBarTitleText": "机构任务单"
-			}
-		},
-		{
-			"path": "pages/verification/department",
-			"style": {
-				"navigationBarTitleText": "部门流转记录"
-			}
-		},
-		{
-			"path": "pages/verification/external",
-			"style": {
-				"navigationBarTitleText": "外检申请单"
-			}
-		},
-		{
-			"path": "pages/verification/externalList",
-			"style": {
-				"navigationBarTitleText": "器具列表"
-			}
-		},
+  "pages": [
+    {
+      "path": "pages/login",
+      "style": {
+        "navigationStyle": "custom"
+      }
+    },
+    {
+      "path": "pages/register",
+      "style": {
+        "navigationBarTitleText": "注册"
+      }
+    },
+    {
+      "path": "pages/index",
+      "style": {
+        "navigationBarTitleText": "首页"
+      }
+    },
+    {
+      "path": "pages/work/index",
+      "style": {
+        "navigationBarTitleText": "工作台"
+      }
+    },
+    {
+      "path": "pages/mine/index",
+      "style": {
+        "navigationBarTitleText": "我的"
+      }
+    },
+    {
+      "path": "pages/mine/avatar/index",
+      "style": {
+        "navigationBarTitleText": "修改头像"
+      }
+    },
+    {
+      "path": "pages/mine/info/index",
+      "style": {
+        "navigationBarTitleText": "个人信息"
+      }
+    },
+    {
+      "path": "pages/mine/info/edit",
+      "style": {
+        "navigationBarTitleText": "编辑资料"
+      }
+    },
+    {
+      "path": "pages/mine/pwd/index",
+      "style": {
+        "navigationBarTitleText": "修改密码"
+      }
+    },
+    {
+      "path": "pages/mine/setting/index",
+      "style": {
+        "navigationBarTitleText": "应用设置"
+      }
+    },
+    {
+      "path": "pages/mine/help/index",
+      "style": {
+        "navigationBarTitleText": "常见问题"
+      }
+    },
+    {
+      "path": "pages/mine/about/index",
+      "style": {
+        "navigationBarTitleText": "关于我们"
+      }
+    },
+    {
+      "path": "pages/common/webview/index",
+      "style": {
+        "navigationBarTitleText": "浏览网页"
+      }
+    },
+    {
+      "path": "pages/common/textview/index",
+      "style": {
+        "navigationBarTitleText": "浏览文本"
+      }
+    },
+    {
+      "path": "pages/Ledger/list",
+      "style": {
+        "navigationBarTitleText": "台账"
+      }
+    },
+    {
+      "path": "pages/Ledger/details",
+      "style": {
+        "navigationBarTitleText": "详情"
+      }
+    },
+    {
+      "path": "pages/assay/index",
+      "style": {
+        "navigationBarTitleText": "我的备案申请",
+        "enablePullDownRefresh": true
+      }
+    },
+    {
+      "path": "pages/verification/list",
+      "style": {
+        "navigationBarTitleText": "检定"
+      }
+    },
+    {
+      "path": "pages/verification/details",
+      "style": {
+        "navigationBarTitleText": "检定申请单详细"
+      }
+    },
+    {
+      "path": "pages/assay/details",
+      "style": {
+        "navigationBarTitleText": "备案查看"
+      }
+    },
+    {
+      "path": "pages/assay/application",
+      "style": {
+        "navigationBarTitleText": "器具备案申请"
+      }
+    },
+    {
+      "path": "pages/verification/taskList",
+      "style": {
+        "navigationBarTitleText": "机构任务单"
+      }
+    },
+    {
+      "path": "pages/verification/department",
+      "style": {
+        "navigationBarTitleText": "部门流转记录"
+      }
+    },
+    {
+      "path": "pages/verification/external",
+      "style": {
+        "navigationBarTitleText": "外检申请单"
+      }
+    },
+    {
+      "path": "pages/verification/externalList",
+      "style": {
+        "navigationBarTitleText": "器具列表"
+      }
+    },
 
-		{
-			"path": "pages/assay/assayForm",
-			"style": {
-				"navigationBarTitleText": "备案申请"
-			}
-		},
-		{
-			"path": "pages/companiesRegistered/index",
-			"style": {
-				"navigationBarTitleText": "企业注册"
-			}
-		},
-		{
-			"path": "pages/assay/assayDetails",
-			"style": {
-				"navigationBarTitleText": "器具详情"
-			}
-		},
-		{
-			"path": "pages/assay/equipmentDetails",
-			"style": {
-				"navigationBarTitleText": "计量器具信息"
-			}
-		},
-		{
-			"path": "pages/assay/detailsList",
-			"style": {
-				"navigationBarTitleText": "拟备案计量器具列表"
-			}
-		},
-		{
-			"path": "pages/assay/assayList",
-			"style": {
-				"navigationBarTitleText": "选择拟备案计量器具"
-			}
-		},
+    {
+      "path": "pages/assay/assayForm",
+      "style": {
+        "navigationBarTitleText": "备案申请"
+      }
+    },
+    {
+      "path": "pages/companiesRegistered/index",
+      "style": {
+        "navigationBarTitleText": "企业注册"
+      }
+    },
+    {
+      "path": "pages/assay/assayDetails",
+      "style": {
+        "navigationBarTitleText": "器具详情"
+      }
+    },
+    {
+      "path": "pages/assay/equipmentDetails",
+      "style": {
+        "navigationBarTitleText": "计量器具信息"
+      }
+    },
+    {
+      "path": "pages/assay/detailsList",
+      "style": {
+        "navigationBarTitleText": "拟备案计量器具列表"
+      }
+    },
+    {
+      "path": "pages/assay/assayList",
+      "style": {
+        "navigationBarTitleText": "选择拟备案计量器具"
+      }
+    },
+    {
+      "path": "pages/assay/deptList",
+      "style": {
+        "navigationBarTitleText": "备案新增"
+      }
+    },
+    {
+      "path": "pages/Ledger/recordHistory",
+      "style": {
+        "navigationBarTitleText": "备案记录"
+      }
+    },
+    {
+      "path": "pages/Ledger/verificationHistory",
+      "style": {
+        "navigationBarTitleText": "检定记录"
+      }
+    },
+    {
+      "path": "pages/bindweixin",
+      "style": {
+        "navigationBarTitleText": "微信绑定"
+      }
+    },
 
-		{
-			"path": "pages/assay/deptList",
-			"style": {
-				"navigationBarTitleText": "备案新增",
-				"app-plus": {
-					"bounce": "none",
-					"titleNView": {
-						"buttons": [{
-							"fontSize": "16px",
-							"text": "新增",
-							"color": "#0070d9"
-						}]
-					}
-				}
-			}
-		},
-		{
-			"path": "pages/work/detailInfo",
-			"style": {
-				"navigationBarTitleText": "详情"
-			}
-		}
-	],
-	"tabBar": {
-		"color": "#000000",
-		"selectedColor": "#000000",
-		"borderStyle": "white",
-		"backgroundColor": "#ffffff",
-		"list": [{
-				"pagePath": "pages/index",
-				"iconPath": "static/images/1.png",
-				"selectedIconPath": "static/images/11.png",
-				"text": "首页"
-			},
-			{
-				"pagePath": "pages/work/index",
-				"iconPath": "static/images/2.png",
-				"selectedIconPath": "static/images/22.png",
-				"text": "消息"
-			},
-			{
-				"pagePath": "pages/mine/index",
-				"iconPath": "static/images/3.png",
-				"selectedIconPath": "static/images/33.png",
-				"text": "我的"
-			}
-		]
-	},
-	"globalStyle": {
-		"navigationBarTextStyle": "black",
-		"navigationBarTitleText": "RuoYi",
-		"navigationBarBackgroundColor": "#FFFFFF"
-	},
-	"condition": {
-		"current": 0,
-		"list": [{
-			"name": "",
-			"path": "pages/Ledger/list",
-			"query": ""
-		}]
-	}
-}
+    {
+      "path": "pages/personRegistered/index",
+      "style": {
+        "navigationBarTitleText": "个人注册"
+      }
+    },
+
+    {
+      "path": "pages/personRegistered/bindCompanies",
+      "style": {
+        "navigationBarTitleText": "绑定企业"
+      }
+    },
+    {
+      "path": "pages/companiesRegistered/companiesNotify",
+      "style": {
+        "navigationBarTitleText": "企业注册"
+      }
+    },
+    {
+      "path": "pages/cloudAssistant",
+      "style": {
+        "navigationBarTitleText": "云助手"
+      }
+    }
+  ],
+  "tabBar": {
+    "color": "#000000",
+    "selectedColor": "#000000",
+    "borderStyle": "white",
+    "backgroundColor": "#ffffff",
+    "list": [
+      {
+        "pagePath": "pages/index",
+        "iconPath": "static/images/1.png",
+        "selectedIconPath": "static/images/11.png",
+        "text": "首页"
+      },
+      {
+        "pagePath": "pages/work/index",
+        "iconPath": "static/images/2.png",
+        "selectedIconPath": "static/images/22.png",
+        "text": "消息"
+      },
+      {
+        "pagePath": "pages/mine/index",
+        "iconPath": "static/images/3.png",
+        "selectedIconPath": "static/images/33.png",
+        "text": "我的"
+      }
+    ]
+  },
+  "globalStyle": {
+    "navigationBarTextStyle": "black",
+    "navigationBarTitleText": "RuoYi",
+    "navigationBarBackgroundColor": "#FFFFFF"
+  },
+  "condition": {
+    "current": 0,
+    "list": [
+      {
+        "name": "",
+        "path": "pages/Ledger/list",
+        "query": ""
+      }
+    ]
+  }
+}

+ 48 - 9
pages/Ledger/details.vue

@@ -74,9 +74,9 @@
         <view
           class="message"
           :style="{
-            color: recordColor[recordStatus(ledgerDetails.checkStatus)],
+            color: recordColor[recordStatus(ledgerDetails.auditStatus)],
           }"
-          >{{ recordStatus(ledgerDetails.checkStatus) }}</view
+          >{{ recordStatus(ledgerDetails.auditStatus) }}</view
         >
       </view>
       <view class="content">
@@ -100,10 +100,26 @@
       </view> -->
     </view>
     <view class="history">
-      <u-button type="primary" size="small">检定记录</u-button>
-      <u-button type="primary" size="small">备案记录</u-button>
+      <u-button
+        @click="handleVerificationHistory"
+        :customStyle="{ width: '300rpx' }"
+        type="success"
+        shape="circle"
+        :plain="true"
+        size="small"
+        >检定记录</u-button
+      >
+      <u-button
+        @click="handleRecordHistory"
+        :customStyle="{ width: '300rpx' }"
+        type="primary"
+        shape="circle"
+        :plain="true"
+        size="small"
+        >备案记录</u-button
+      >
     </view>
-    <view style="height: 20rpx"></view>
+    <view style="height: 100rpx"></view>
   </view>
 </template>
 
@@ -167,6 +183,9 @@ export default {
     },
   },
   onLoad(options) {
+    getLedgerDetails({ id: options.id }).then((res) => {
+      this.ledgerDetails = res.data;
+    });
     useDict("ejian_instrCheckStatus").then((res) => {
       this.verification = res;
     });
@@ -176,16 +195,36 @@ export default {
     useDict("ejian_instrFillingStatus").then((res) => {
       this.record = res;
     });
-
-    getLedgerDetails({ id: options.id }).then((res) => {
-      this.ledgerDetails = res.data;
-    });
+  },
+  methods: {
+    //检定记录
+    handleVerificationHistory() {
+      console.log(this.ledgerDetails);
+      uni.navigateTo({
+        url: `/pages/Ledger/verificationHistory?id=${this.ledgerDetails.id}`,
+        success: (res) => {},
+        fail: () => {},
+        complete: () => {},
+      });
+    },
+    //备案记录
+    handleRecordHistory() {
+      uni.navigateTo({
+        url: `/pages/Ledger/recordHistory?id=${this.ledgerDetails.id}`,
+        success: (res) => {},
+        fail: () => {},
+        complete: () => {},
+      });
+    },
   },
 };
 </script>
 
 <style lang="scss" scoped>
 .history {
+  display: flex;
+
+  padding: 20rpx 10rpx;
   background: #fff;
   width: 100%;
   position: fixed;

+ 1 - 1
pages/Ledger/list.vue

@@ -15,7 +15,7 @@
         "
       >
         <u-search
-          @search="handleSearch"
+          @change="getList"
           v-model="queryParams.searchValue"
           shape="round"
           placeholder="请输入器具名称"

+ 154 - 0
pages/Ledger/recordHistory.vue

@@ -0,0 +1,154 @@
+<!-- @format -->
+
+<template>
+  <view class="container">
+    <view class="">
+      <view style="">
+        <!-- <u-search
+          :showAction="false"
+          bgColor="#fff"
+          placeholder="请输入检定单编号"
+          style="width: 95%; margin: 30rpx auto"
+        ></u-search> -->
+
+        <view
+          class="contentItems"
+          @click="handleVerDetails"
+          v-for="item of recordList"
+        >
+          <view class="title">
+            <span class="name">{{ item.name }}</span>
+            <span
+              class="createTime"
+              :style="{
+                color: recordColor[recordStatus(item.auditStatus)],
+              }"
+              >备案状态:{{ recordStatus(item.auditStatus) }}</span
+            >
+          </view>
+          <view class="contentItem">
+            <view class="item">
+              <span
+                style="color: #fa3534; font-size: 28rpx; margin-right: 40rpx"
+                >备案编号:{{ item.filingApplyNo }}</span
+              >
+              <span>出厂编号:{{ item.serialNumber }}</span>
+            </view>
+            <view class="item">
+              <view>审核机构:{{ item.auditOrgName }}</view>
+            </view>
+            <view class="item">
+              <view>审核人员:{{ item.auditUserName }}</view>
+            </view>
+            <view class="item">
+              <span>申请时间:{{ item.createTime }}</span>
+            </view>
+          </view>
+        </view>
+      </view>
+    </view>
+  </view>
+</template>
+<script>
+import { getauditRecordList } from "@/api/Ledger";
+import { useDict, paraseDict } from "@/utils/index";
+export default {
+  data() {
+    return {
+      recordId: null,
+      recordList: [],
+      recordColor: {
+        已撤回: "#fa3534",
+        已接收: "#19be6b",
+        待提交: "#2979ff",
+        备案中: "#2979ff",
+        已拒绝: "#fa3534",
+        勿备案: "#fa3534",
+        未备案: "#909399",
+        免备案: "#909399",
+        已退回: "#fa3534",
+      },
+      record: [], //备案字典
+    };
+  },
+  computed: {
+    //备案状态
+    recordStatus() {
+      return (row) => {
+        return paraseDict(this.record, row);
+      };
+    },
+  },
+  async onLoad(options) {
+    useDict("ejian_instrFillingStatus").then((res) => {
+      this.record = res;
+    });
+    this.recordId = options.id;
+    try {
+      let { data } = await getauditRecordList({
+        instrumentId: this.recordId,
+      });
+      this.recordList = data;
+    } catch (error) {}
+  },
+};
+</script>
+<style lang="scss">
+.item {
+  color: #909399;
+  font-size: 24rpx;
+  margin: 15rpx 0;
+}
+.title {
+  padding-bottom: 10rpx;
+  border-bottom: 1px solid rgb(242, 242, 242);
+  display: flex;
+  align-items: center;
+  justify-content: space-between;
+
+  .name {
+    font-size: 28rpx;
+    color: black;
+    font-weight: bold;
+  }
+  .createTime {
+    color: #909399;
+    font-size: 28rpx;
+    font-weight: bold;
+  }
+}
+.container {
+  height: 100vh;
+  background: rgb(248, 249, 250);
+  padding: 30rpx;
+}
+.contentItems {
+  width: 97%;
+  border-radius: 6px;
+  background: #fff;
+  margin: 0rpx auto 30rpx;
+  padding: 20rpx 30rpx 20rpx;
+
+  .content {
+    border-bottom: 1px solid rgb(242, 242, 242);
+    padding: 24rpx 0;
+    display: flex;
+    justify-content: space-between;
+  }
+
+  .content:last-child {
+    border-bottom: none;
+  }
+
+  .title {
+    font-size: 26rpx;
+    color: black;
+    letter-spacing: 3rpx;
+  }
+
+  .message {
+    font-size: 26rpx;
+    color: rgb(146, 146, 146);
+  }
+}
+</style>

+ 0 - 21
pages/Ledger/records.vue

@@ -1,21 +0,0 @@
-<!-- @format -->
-
-<template>
-  <view class="container">
-    <view></view>
-  </view>
-</template>
-<script>
-export default {
-  data() {
-    return {};
-  },
-};
-</script>
-<style lang="scss">
-.container {
-  height: 100vh;
-  background: rgb(248, 249, 250);
-  padding: 30rpx;
-}
-</style>

+ 152 - 0
pages/Ledger/verificationHistory.vue

@@ -0,0 +1,152 @@
+<!-- @format -->
+
+<template>
+  <view class="container">
+    <view class="">
+      <view style="">
+        <!-- <u-search
+          :showAction="false"
+          bgColor="#fff"
+          placeholder="请输入检定单编号"
+          style="width: 95%; margin: 30rpx auto"
+        ></u-search> -->
+
+        <view
+          class="contentItems"
+          @click="handleVerDetails"
+          v-for="item of recordList"
+        >
+          <view class="title">
+            <span class="name">{{ item.name }}</span>
+            <span
+              class="createTime"
+              :style="{
+                color: verificationColor[recordStatus(item.checkRecordStatus)],
+              }"
+              >检定状态:{{ recordStatus(item.checkRecordStatus) }}</span
+            >
+          </view>
+          <view class="contentItem">
+            <view class="item">
+              <span
+                style="color: #fa3534; font-size: 28rpx; margin-right: 40rpx"
+                >检定编号:{{ item.number }}</span
+              >
+            </view>
+            <view class="item">
+              <span>唯一标识:{{ item.instrNo }}</span>
+            </view>
+            <view class="item">
+              <view>审核机构:{{ item.organizationName }}</view>
+            </view>
+            <view class="item">
+              <view>检定部门:{{ item.deptName }}</view>
+            </view>
+            <view class="item">
+              <span>申请时间:{{ item.createTime }}</span>
+            </view>
+          </view>
+        </view>
+      </view>
+    </view>
+  </view>
+</template>
+<script>
+import { getCheckRecordList } from "@/api/Ledger";
+import { useDict, paraseDict } from "@/utils/index";
+export default {
+  data() {
+    return {
+      recordId: null,
+      recordList: [],
+      verificationColor: {
+        未检定: "#909399",
+        已校准: "#19be6b",
+        已检定: "#19be6b",
+        不合格: "#fa3534",
+        已超期: "#fa3534",
+      },
+      verification: [], //备案字典
+    };
+  },
+  computed: {
+    //备案状态
+    recordStatus() {
+      return (row) => {
+        return paraseDict(this.verification, row);
+      };
+    },
+  },
+  async onLoad(options) {
+    useDict("ejian_instrCheckRecordStatus").then((res) => {
+      this.verification = res;
+    });
+    this.recordId = options.id;
+    try {
+      let { data } = await getCheckRecordList({
+        instrumentId: this.recordId,
+      });
+      this.recordList = data;
+    } catch (error) {}
+  },
+};
+</script>
+<style lang="scss">
+.item {
+  color: #909399;
+  font-size: 24rpx;
+  margin: 15rpx 0;
+}
+.title {
+  padding-bottom: 10rpx;
+  border-bottom: 1px solid rgb(242, 242, 242);
+  display: flex;
+  align-items: center;
+  justify-content: space-between;
+
+  .name {
+    font-size: 30rpx;
+    color: black;
+    font-weight: bold;
+  }
+  .createTime {
+    color: #909399;
+    font-size: 28rpx;
+    font-weight: bold;
+  }
+}
+.container {
+  height: 100vh;
+  background: rgb(248, 249, 250);
+  padding: 30rpx;
+}
+.contentItems {
+  width: 97%;
+  border-radius: 6px;
+  background: #fff;
+  margin: 0rpx auto 30rpx;
+  padding: 20rpx 30rpx 20rpx;
+
+  .content {
+    border-bottom: 1px solid rgb(242, 242, 242);
+    padding: 24rpx 0;
+    display: flex;
+    justify-content: space-between;
+  }
+
+  .content:last-child {
+    border-bottom: none;
+  }
+
+  .title {
+    font-size: 26rpx;
+    color: black;
+    letter-spacing: 3rpx;
+  }
+
+  .message {
+    font-size: 26rpx;
+    color: rgb(146, 146, 146);
+  }
+}
+</style>

+ 29 - 0
pages/cloudAssistant.vue

@@ -0,0 +1,29 @@
+<!-- @format -->
+
+<template>
+  <view class="container">
+    <view>
+      <web-view
+        :src="'http://192.168.1.62:8035/im/text/104eac.html?userid=' + userId"
+      ></web-view>
+    </view>
+  </view>
+</template>
+<script>
+export default {
+  data() {
+    return {
+      userId: null,
+    };
+  },
+  onShow() {
+    this.userId = JSON.parse(uni.getStorageSync("userInfo")).id;
+  },
+};
+</script>
+
+<style lang="scss">
+.container {
+  height: 100vh;
+}
+</style>

+ 127 - 0
pages/companiesRegistered/companiesNotify.vue

@@ -0,0 +1,127 @@
+<!-- @format -->
+
+<template>
+  <view class="container">
+    <view class="content">
+      <u-alert
+        type="warning"
+        :show-icon="true"
+        :title="`单位类别除计量器具使用单位,证件类别为授权委托书的请前往PC端进行注册。`"
+      ></u-alert>
+
+      <view style="margin-top: 30rpx">
+        <u-form labelWidth="140">
+          <u-form-item :required="true" label="单位类别">
+            <u-checkbox-group
+              size="16"
+              v-model="unitCategory"
+              placement="column"
+              @change="checkboxChange"
+            >
+              <u-checkbox
+                :customStyle="{ marginBottom: '8px' }"
+                v-for="(item, index) in unitCategoryList"
+                :key="index"
+                :label="item.dictLabel"
+                :name="item.dictLabel"
+                :disabled="item.disabled"
+              >
+              </u-checkbox>
+            </u-checkbox-group>
+          </u-form-item>
+          <u-form-item :required="true" label="证件类别">
+            <u-radio-group v-model="documentType" placement="column">
+              <u-radio
+                :disabled="item.disabled"
+                :customStyle="{ marginBottom: '8px' }"
+                v-for="(item, index) in documentTypeList"
+                :key="index"
+                :label="item.name"
+                :name="item.name"
+              >
+              </u-radio>
+            </u-radio-group>
+          </u-form-item>
+        </u-form>
+      </view>
+    </view>
+    <view class="btn">
+      <u-button
+        @click="handleRegister"
+        shape="circle"
+        :customStyle="{ width: '300rpx' }"
+        type="primary"
+        >前往注册</u-button
+      >
+    </view>
+  </view>
+</template>
+<script>
+import { useDict, paraseDict } from "@/utils/index";
+export default {
+  data() {
+    return {
+      unitCategory: ["计量器具使用单位"],
+      documentType: "营业执照",
+      unitCategoryList: [],
+      documentTypeList: [
+        {
+          name: "营业执照",
+        },
+        {
+          name: "法人证书",
+        },
+        {
+          name: "授权委托书",
+          disabled: true,
+        },
+      ],
+    };
+  },
+  onLoad() {
+    useDict("common_dwlb").then((res) => {
+      this.unitCategoryList = res;
+      console.log(this.unitCategoryList);
+      this.unitCategoryList.forEach((element) => {
+        if (element.dictLabel != "计量器具使用单位") {
+          element.disabled = true;
+        }
+      });
+    });
+  },
+  methods: {
+    handleRegister() {
+      uni.navigateTo({
+        url: `/pages/companiesRegistered/index?type=${this.documentType}`,
+        success: (res) => {},
+        fail: () => {},
+        complete: () => {},
+      });
+    },
+  },
+};
+</script>
+<style lang="scss">
+.btn {
+  position: fixed;
+  bottom: 0;
+  left: 0;
+  width: 100%;
+  padding: 30rpx;
+  display: flex;
+  justify-content: center;
+}
+.u-checkbox {
+  margin-bottom: 20rpx;
+}
+.container {
+  height: 100vh;
+  background: rgb(248, 249, 250);
+}
+.content {
+  background: #fff;
+  padding: 30rpx;
+  width: 95%;
+  margin: 0 auto;
+}
+</style>

+ 4 - 0
pages/companiesRegistered/index.vue

@@ -74,11 +74,15 @@ export default {
     recognition,
     authorizer,
   },
+  onLoad(options) {
+    this.formdData.type = options.type;
+  },
   data() {
     return {
       companiesInformationRef: null,
       authorizerRef: null,
       formdData: {
+        type: null, //类别
         isPass: false, //是否通过
         //企业营业照
         imageUrl: null,

+ 9 - 0
pages/index.vue

@@ -39,6 +39,7 @@
       </view>
     </view>
     <image
+      @click="handleCloudAssistant"
       class="aiImg"
       style="width: 130rpx; position: fixed; right: 20rpx; bottom: 10rpx"
       src="../static/images/ai.png"
@@ -54,6 +55,14 @@ export default {
     return {};
   },
   methods: {
+    handleCloudAssistant() {
+      uni.navigateTo({
+        url: "/pages/cloudAssistant",
+        success: (res) => {},
+        fail: () => {},
+        complete: () => {},
+      });
+    },
     handleAssay() {
       uni.navigateTo({
         url: "/pages/assay/index",

+ 6 - 6
pages/login.vue

@@ -125,14 +125,14 @@ export default {
     return {
       content: "使用当前微信登录,如果微信没有绑定用户需要先去绑定。",
       showModal: false,
-      activeTab: "用户名登录",
+      activeTab: "",
       tabsList: [
         {
-          name: "用户名登录",
-        },
-        {
-          name: "手机号登录",
+          name: "用户登录",
         },
+        // {
+        //   name: "手机号登录",
+        // },
       ],
       codeUrl: "",
       captchaEnabled: true,
@@ -195,7 +195,7 @@ export default {
     //企业注册
     handleCompaniesRegistration() {
       uni.navigateTo({
-        url: "/pages/companiesRegistered/index",
+        url: "/pages/companiesRegistered/companiesNotify",
         success: (res) => {},
         fail: () => {},
         complete: () => {},

+ 15 - 40
pages/mine/index.vue

@@ -6,22 +6,22 @@
     <view class="header-section">
       <view class="flex padding justify-between">
         <view class="flex align-center">
-          <view v-if="!avatar" class="cu-avatar xl round bg-white">
+          <!-- <view v-if="!avatar" class="cu-avatar xl round bg-white">
             <view class="iconfont icon-people text-gray icon"></view>
-          </view>
-          <image
+          </view> -->
+          <!-- <image
             v-if="avatar"
             @click="handleToAvatar"
             :src="avatar"
             class="cu-avatar xl round"
             mode="widthFix"
           >
-          </image>
+          </image> -->
           <view v-if="!name" @click="handleToLogin" class="login-tip">
             点击登录
           </view>
           <view v-if="name" @click="handleToInfo" class="user-info">
-            <view class="u_title"> 用户名:{{ name }} </view>
+            <view class="u_title"> 用户名:{{ name }} · {{}} </view>
           </view>
         </view>
         <view @click="handleToInfo" class="flex align-center">
@@ -31,53 +31,23 @@
       </view>
     </view>
 
-    <view class="content-section">
-      <!-- <view class="mine-actions grid col-4 text-center">
-        <view class="action-item" @click="handleJiaoLiuQun">
-          <view class="iconfont icon-friendfill text-pink icon"></view>
-          <text class="text">交流群</text>
-        </view>
-        <view class="action-item" @click="handleBuilding">
-          <view class="iconfont icon-service text-blue icon"></view>
-          <text class="text">在线客服</text>
-        </view>
-        <view class="action-item" @click="handleBuilding">
-          <view class="iconfont icon-community text-mauve icon"></view>
-          <text class="text">反馈社区</text>
-        </view>
-        <view class="action-item" @click="handleBuilding">
-          <view class="iconfont icon-dianzan text-green icon"></view>
-          <text class="text">点赞我们</text>
-        </view>
-      </view> -->
-
-      <!-- <view class="menu-list">
+    <!-- <view class="content-section">
+      <view class="menu-list">
         <view class="list-cell list-cell-arrow" @click="handleToEditInfo">
           <view class="menu-item-box">
             <view class="iconfont icon-user menu-icon"></view>
             <view>编辑资料</view>
           </view>
         </view>
-        <view class="list-cell list-cell-arrow" @click="handleHelp">
-          <view class="menu-item-box">
-            <view class="iconfont icon-help menu-icon"></view>
-            <view>常见问题</view>
-          </view>
-        </view>
-        <view class="list-cell list-cell-arrow" @click="handleAbout">
-          <view class="menu-item-box">
-            <view class="iconfont icon-aixin menu-icon"></view>
-            <view>关于我们</view>
-          </view>
-        </view>
+
         <view class="list-cell list-cell-arrow" @click="handleToSetting">
           <view class="menu-item-box">
             <view class="iconfont icon-setting menu-icon"></view>
             <view>应用设置</view>
           </view>
         </view>
-      </view> -->
-    </view>
+      </view>
+    </view> -->
     <view class="btn"
       ><u-button
         v-if="isWeixin"
@@ -88,6 +58,10 @@
       ></view
     >
 
+    <view class="btn"
+      ><u-button shape="circle" type="primary">退出登录</u-button></view
+    >
+
     <u-modal
       showCancelButton
       cancelText="取消"
@@ -112,6 +86,7 @@ export default {
       isWeixin: this.$store.state.user.isWeixin,
       name: this.$store.state.user.name,
       version: getApp().globalData.config.appInfo.version,
+      userInfo: null,
     };
   },
   computed: {

+ 1 - 1
store/modules/user.js

@@ -92,7 +92,7 @@ const user = {
             // } else {
             //   commit("SET_ROLES", ["ROLE_DEFAULT"]);
             // }
-            // commit("SET_NAME", username);
+            commit("SET_NAME", user.name);
             // commit("SET_AVATAR", avatar);
             uni.setStorageSync("userInfo", JSON.stringify(user));
             resolve(user);

+ 9 - 1
utils/index.js

@@ -11,5 +11,13 @@ export async function useDict(...args) {
 }
 
 export function paraseDict(dictList, value) {
-  return dictList.filter((dict) => dict.dictValue == value)[0].dictLabel;
+  if (!dictList.length) return "";
+
+  let arr = dictList.filter((dict) => dict.dictValue == value);
+
+  if (!arr.length) {
+    return "";
+  }
+
+  return arr[0].dictLabel;
 }