jeremy 8 mēneši atpakaļ
vecāks
revīzija
85ca841ef0

+ 33 - 0
src/router/userRouter.js

@@ -627,6 +627,39 @@ const userRoutes = [
 		},
 		component: "user",
 	},
+	{
+		name: "factury",
+		path: "/factury/orgList",
+		meta: {
+			title: "厂商管理",
+			icon: "el-icon-connection",
+			type: "menu",
+			permission: 'SBGL'
+		},
+		children: [
+			{
+				path: "/factury/orgList",
+				name: "orgList",
+				meta: {
+					title: "机构管理",
+					icon: "el-icon-office-building",
+					type: "menu"
+				},
+				component: "factury/orgList"
+			},
+			{
+				path: "/factury/postHistory",
+				name: "orgList",
+				meta: {
+					title: "推送记录",
+					icon: "el-icon-position",
+					type: "menu"
+				},
+				component: "factury/postHistory"
+			},
+		],
+		component: "factury/orgList",
+	},
 	// {
 	// 	name: "test",
 	// 	path: "/test",

+ 3 - 0
src/views/factury/orgList/index.vue

@@ -0,0 +1,3 @@
+<template>
+第三方厂商管理
+</template>

+ 223 - 0
src/views/factury/postHistory/index.vue

@@ -0,0 +1,223 @@
+<template>
+  <div>
+    <el-container>
+      <el-header>
+        <div class="left-panel">
+          <!-- <el-button
+            type="primary"
+            icon="el-icon-plus"
+            @click="add"
+          ></el-button> -->
+        </div>
+        <div class="right-panel">
+          <div class="right-panel-search">
+            <el-select v-model="form.Status">
+              <el-option key="0" label="全部" :value="0"></el-option>
+              <el-option key="1" label="待发送" :value="1"></el-option>
+              <el-option key="2" label="发送成功" :value="2"></el-option>
+              <el-option key="3" label="发送失败" :value="3"></el-option>
+            </el-select>
+            <el-input
+              v-model="form.Keyword"
+              clearable
+              placeholder="输入居民姓名/身份证号搜索"
+              @keyup.enter="search"
+            ></el-input>
+            <el-button
+              type="primary"
+              icon="el-icon-search"
+              @click="search"
+              title="查询"
+            ></el-button>
+          </div>
+        </div>
+      </el-header>
+      <el-main class="nopadding">
+        <scTable
+          ref="table"
+          :data="tableData"
+          row-key="code"
+          stripe
+          :tableTotal="total"
+          :pageSize="form.PageSize"
+          :pageIndex="form.PageIndex"
+          :currentPage="form.PageIndex"
+          @update:page-size="pageSizeChange"
+          :getTableData="(i) => pageChange(i)"
+          higlight-current-row
+          hideDo="true"
+        >
+          <el-table-column
+            label="序号"
+            prop="id"
+            width="50"
+            align="center"
+            type="index"
+            :index="getIndex"
+          ></el-table-column>
+          <el-table-column
+            label="姓名"
+            prop="patientName"
+            align="center"
+            width="150"
+          >
+            <template v-slot="{ row }">
+              <div class="ellipsis">
+                <el-tooltip
+                  :content="
+                    this.$common.desensitizeChineseName(row.patientName)
+                  "
+                  placement="top"
+                >
+                  {{ this.$common.desensitizeChineseName(row.patientName) }}
+                </el-tooltip>
+              </div>
+            </template>
+          </el-table-column>
+          <el-table-column label="身份证号" prop="iDCardNo" align="center" width="280">
+            <template v-slot="{ row }">
+              <div class="ellipsis">
+                {{ this.$common.desensitizeChineseName(row.iDCardNo) }}
+              </div>
+            </template>
+          </el-table-column>
+          <el-table-column
+            label="发送地址"
+            prop="facturyUrl"
+            align="center"
+          ></el-table-column>
+          <el-table-column
+            label="发送状态"
+            prop="statusText"
+            width="150"
+            align="center"
+          ></el-table-column>
+          <el-table-column
+            label="发送时间"
+            prop="postTime"
+            width="180"
+            align="center"
+          >
+          </el-table-column>
+          <el-table-column label="操作" width="150" align="center">
+            <template #default="props">
+              <div>
+                <el-button
+                  link
+                  type="primary"
+                  size="small"
+                  @click="showRpc(props.row)"
+                >
+                  查看
+                </el-button>
+              </div>
+            </template>
+          </el-table-column>
+        </scTable>
+      </el-main>
+    </el-container>
+
+    <el-dialog title="查看详情" v-model="dialog.rpcVisible" :width="1000">
+      <el-skeleton :rows="6" animated v-if="!record.content" />
+      <el-row :gutter="0" :width="800" v-else>
+        <el-col :span="12">
+          <div class="preFormat">{{ JSON.parse(record.content) }}</div>
+        </el-col>
+        <el-col :span="12">
+          <div class="preFormat">
+            {{ JSON.parse(record.result) }}
+          </div></el-col
+        >
+      </el-row>
+      <!-- <template #footer>
+        <el-button type="primary" @click="dialog.rpcVisible = false"
+          >确定</el-button
+        >
+      </template> -->
+    </el-dialog>
+  </div>
+</template>
+<script>
+import common from "@/utils/common";
+import moment from "moment";
+import store from "@/store";
+export default {
+  components: {},
+  data() {
+    return {
+      tableData: [],
+      total: 0,
+      form: {
+        Status: 0,
+        Keyword: "",
+        PageIndex: 1,
+        PageSize: 10,
+      },
+      dialog: {
+        rpcVisible: false,
+      },
+      record: {},
+    };
+  },
+  created() {},
+  methods: {
+    async pageChange(i) {
+      this.form.PageIndex = i || 1;
+      await this.getList();
+    },
+    async search() {
+      this.form.PageIndex = 1;
+      await this.getList();
+    },
+    async getList() {
+      this.form.Token = store.state.userInfo.token;
+      var paged =
+        await this.$rpc.facturyPostHistory.getFacturyPostHistoryByPageAsync(
+          this.form
+        );
+      this.total = paged.dataCount;
+      var tableData = paged.pageData;
+      tableData.forEach((d) => {
+        d.postTime = moment(d.postTime).format("YYYY-MM-DD HH:mm:ss");
+        d.statusText =
+          d.status == 1
+            ? "待发送"
+            : d.status == 2
+            ? "已发送"
+            : d.status == 3
+            ? "发送失败"
+            : "";
+      });
+      this.tableData = tableData;
+    },
+    getIndex(index) {
+      return this.form.PageSize * (this.form.PageIndex - 1) + index + 1;
+    },
+    async showRpc(row) {
+      this.record = {};
+      this.dialog.rpcVisible = true;
+      var res = await this.$rpc.facturyPostHistory.getFacturyPostHistoryAsync({
+        Token: store.state.userInfo.token,
+        Code: row.code,
+      });
+      this.$nextTick(() => {
+        this.record = res;
+      });
+    },
+  },
+};
+</script>
+<style>
+.preFormat {
+  white-space: pre-wrap;
+  min-height: 117px;
+  height: 537px;
+  overflow-y: scroll;
+
+  word-wrap: break-word;
+  border: 1px solid #e6e6e6;
+  padding: 5px 15px;
+  line-height: 22px;
+  overflow-x: auto;
+}
+</style>