Browse Source

scm提交

liangbowen 1 month ago
parent
commit
91a63fcab9

+ 34 - 1
src/api/consumCataManage-sup/index.js

@@ -197,4 +197,37 @@ export function importMcsExcel(data) {
         data,
         headers: { 'Content-Type': 'application/octet-stream'}
     })
-}
+}
+//查询同步院内耗材
+export function selectSplerMcsListTccx(data) {
+    return request({
+        url:"/web/mcsList/selectSplerMcsListTccx",
+        method:"post",
+        data
+    })
+}
+
+//查询医疗机构
+export function selectSpdListExclude(data) {
+    return request({
+        url:"/web/mcsList/selectSpdListExclude",
+        method:"post",
+        data
+    })
+}
+//同步所有目录
+export function insertMcsListToSpdIdAll(data) {
+    return request({
+        url:"web/mcsList/insertMcsListToSpdIdAll",
+        method:"post",
+        data
+    })
+}
+//多选目录
+export function insertMcsListPart(data) {
+    return request({
+        url:"/web/mcsList/insertMcsListPart",
+        method:"post",
+        data
+    })
+}

+ 1 - 2
src/components/yl-pagination/index.vue

@@ -1,5 +1,4 @@
-/*  分页组件
- */
+/* 分页组件 */
 <template>
   <div :class="{ hidden: hidden }" class="pagination-container">
     <el-pagination

+ 21 - 5
src/layout/index.vue

@@ -17,6 +17,11 @@
       </div>
       <breadcrumb id="breadcrumb-container" class="breadcrumb-container" />
       <app-main />
+      <el-footer>
+        <div class="foter">
+          技术支持:云流(山西)科技有限公司
+        </div>
+      </el-footer>
     </div>
   </div>
 </template>
@@ -40,11 +45,11 @@ export default {
   mixins: [ResizeMixin],
   computed: {
     ...mapState({
-      sidebar: (state) => state.app.sidebar,
-      device: (state) => state.app.device,
-      showSettings: (state) => state.settings.showSettings,
-      needTagsView: (state) => state.settings.tagsView,
-      fixedHeader: (state) => state.settings.fixedHeader
+      sidebar: state => state.app.sidebar,
+      device: state => state.app.device,
+      showSettings: state => state.settings.showSettings,
+      needTagsView: state => state.settings.tagsView,
+      fixedHeader: state => state.settings.fixedHeader
     }),
     classObj() {
       return {
@@ -105,6 +110,17 @@ export default {
 .mobile .fixed-header {
   width: 100%;
 }
+.foter {
+  width: 100%;
+  height: 100%;
+  background: #f4f5f1;
+  border-top: 1px solid #ccc;
+  display: flex;
+  color: #000;
+  font-weight: bold;
+  align-items: center;
+  justify-content: center;
+}
 // .breadcrumb-container {
 //   // height: 40px;
 //   overflow: hidden;

+ 8 - 0
src/router/modules/consumcata.js

@@ -11,6 +11,14 @@ const consumRouter = {
   hidden: true,
   children: [    
     {
+      // 采购订单受理-订单详情
+      path: "acceptDetail",
+      component: () => import("@/views/page/consumCataManage-sup/purOrderAccept/acceptDetail.vue"),
+      name: "acceptDetail",
+      meta: { title: "对码详情", icon: "" },
+      hidden: true
+    },
+    {
         // 采购订单-已出库详情
         path: "catalogdetails",
         component: () => import("@/views/page/consumCataManage-sup/catalogdetails.vue"),

+ 1 - 1
src/utils/menu/systemMenu.js

@@ -516,7 +516,7 @@ const systemMenuObj = [
     hidden: 0
   },
   {
-    component: "/page/consumCataManage-sup/catalogCheckCode/index",
+    component: "/page/consumCataManage-sup/purOrderAccept/index",
     icon: "",
     id: "catalogCheckCode",
     menuType: "MENU",

+ 0 - 1
src/views/login/index.vue

@@ -4,7 +4,6 @@
       <div class="big-title">
         <!-- <h1>云流供应商端耗材管理系统</h1> -->
         <h1>供应链管理系统</h1>
-        <p>云流(山西)科技有限公司</p>
       </div>
       <div class="banner-container">
         <div class="title-container">

+ 73 - 60
src/views/page/consumCataManage-sup/catalogPrice/index.vue

@@ -1,9 +1,11 @@
 <template>
   <div style="display: flex;">
-    <el-card style="width:18%;margin-right:18px;border-radius:6px;overflow-y: auto;">
+    <el-card
+      style="width:18%;margin-right:18px;border-radius:6px;overflow-y: auto;"
+    >
       <el-tabs v-model="activeName" type="card" @tab-click="tabClick" stretch>
-          <el-tab-pane label="按分类" name="grp"></el-tab-pane>
-          <el-tab-pane label="按机构" name="org"></el-tab-pane>
+        <el-tab-pane label="按分类" name="grp"></el-tab-pane>
+        <el-tab-pane label="按机构" name="org"></el-tab-pane>
       </el-tabs>
       <el-tree
         :data="data"
@@ -29,7 +31,11 @@
         </el-form-item>
       </el-form>
       <div class="right-button">
-        <div style="float: left; font-size: 14px;color: #606266;padding-top:10px;font-weight: 700;">{{ listQuery.orgName }}</div>
+        <div
+          style="float: left; font-size: 14px;color: #606266;padding-top:10px;font-weight: 700;"
+        >
+          {{ listQuery.orgName }}
+        </div>
         <el-button type="primary" icon="el-icon-refresh" @click="handleUpdate"
           >更新目录
         </el-button>
@@ -48,10 +54,10 @@
         </template>
         <el-table-column fixed type="index" label="序号" width="50" />
         <el-table-column label="医院药品名称" prop="">
-                <template slot-scope="scope">
-                    <drug-info :info="scope.row"></drug-info>
-                </template>
-            </el-table-column>
+          <template slot-scope="scope">
+            <drug-info :info="scope.row"></drug-info>
+          </template>
+        </el-table-column>
         <el-table-column label="药品编码" prop="drugListId" width="380" />
         <el-table-column label="医院价格" prop="purcPric" width="100" />
         <!-- <el-table-column label="对码状态" prop="stas">
@@ -76,7 +82,9 @@
         <el-table-column fixed="right" label="操作" width="80">
           <template slot-scope="scope">
             <div>
-              <el-button type="text"   @click="handlePrice(scope.row)">申请调价</el-button>
+              <el-button type="text" @click="handlePrice(scope.row)"
+                >申请调价</el-button
+              >
             </div>
           </template>
         </el-table-column>
@@ -185,18 +193,22 @@
           </el-form-item>
         </el-row>
         <el-row>
-          <el-form-item label="上传文件" prop="fileId" :rulesR="rulesR.uploadRequired" >
+          <el-form-item
+            label="上传文件"
+            prop="fileId"
+            :rulesR="rulesR.uploadRequired"
+          >
             <yl-upload
               :fileId="temp.fileId"
               @getUpload="getUpload"
               urlName="acco"
             >
-              <template v-slot:dec>只能上传pdf文件</template>
+              <template v-slot:dec
+                >只能上传pdf文件</template
+              >
             </yl-upload>
           </el-form-item>
         </el-row>
-        
-
       </el-form>
       <div slot="footer" class="dialog-footer">
         <el-button @click="dialogPrice = false">取消</el-button>
@@ -214,7 +226,7 @@ import drugInfo from "@/views/components/drug-info";
 import {
   PricChg,
   getALLOrgTree,
-  QueryHospDrugListTJ,
+  QueryHospDrugListTJ
 } from "@/api/consumCataManage-sup/index";
 import rulesR from "@/utils/rules";
 import ylUpload from "@/components/yl-upload";
@@ -226,9 +238,9 @@ export default {
   },
   data() {
     return {
-      activeName: 'org',
+      activeName: "org",
       rulesR,
-      orgId:null,
+      orgId: null,
       data: [],
       defaultProps: {
         children: "child",
@@ -238,8 +250,8 @@ export default {
         current: 1,
         size: 10,
         drugName: "",
-        orgId:"",
-        orgName:"",
+        orgId: "",
+        orgName: ""
       },
       listLoading: false,
       list: [],
@@ -263,7 +275,7 @@ export default {
         pricInit: "",
         pricCurr: "",
         appyRea: "",
-        fileId:""
+        fileId: ""
       },
       rules: {
         pricCurr: [
@@ -300,15 +312,15 @@ export default {
     };
   },
   methods: {
-    tabClick(tab){
-        if(tab.label == "按机构"){
-            this.getData();
-            this.defaultProps.label = 'orgName'
-        }else if(tab.label == "按分类"){
-            // this.getData4();
-            // this.defaultProps.label = 'orgGrpName'
-            // this.listQuery.type = 'grp';
-        }
+    tabClick(tab) {
+      if (tab.label == "按机构") {
+        this.getData();
+        this.defaultProps.label = "orgName";
+      } else if (tab.label == "按分类") {
+        // this.getData4();
+        // this.defaultProps.label = 'orgGrpName'
+        // this.listQuery.type = 'grp';
+      }
     },
     // 上传文件
     getUpload(id) {
@@ -339,15 +351,15 @@ export default {
         this.listQuery.current = 1;
       }
       this.listLoading = true;
-      this.listQuery.orgId = this.orgId 
+      this.listQuery.orgId = this.orgId;
       QueryHospDrugListTJ(this.listQuery)
         .then(res => {
-          if(res.data){
+          if (res.data) {
             this.list = res.data.records;
             this.total = res.data.total;
             this.listLoading = false;
-          }else{
-            this.list = []
+          } else {
+            this.list = [];
             this.listLoading = false;
           }
         })
@@ -357,20 +369,20 @@ export default {
     },
     // 点击获取医院药品列表
     handleNodeClick(data) {
-      console.log(data)
+      console.log(data);
       this.listLoading = true;
-      this.orgId = data.orgId
-      this.listQuery.orgId = data.orgId 
-      this.listQuery.orgName = data.orgName 
+      this.orgId = data.orgId;
+      this.listQuery.orgId = data.orgId;
+      this.listQuery.orgName = data.orgName;
       QueryHospDrugListTJ(this.listQuery)
         .then(res => {
           console.log(res.data, "医院目录");
-          if(res.data){
+          if (res.data) {
             this.list = res.data.records;
             this.total = res.data.total;
             this.listLoading = false;
-          }else{
-            this.list = []
+          } else {
+            this.list = [];
             this.listLoading = false;
           }
         })
@@ -382,10 +394,10 @@ export default {
     getData(type) {
       this.data = [];
       this.listLoading = true;
-      getALLOrgTree({orgId:"1"})
+      getALLOrgTree({ orgId: "1" })
         .then(res => {
           // this.listQuery.hospId = res.data[0].hospId;
-          this.data = res.data
+          this.data = res.data;
           this.listLoading = false;
         })
         .catch(err => {
@@ -404,7 +416,7 @@ export default {
       this.getHospDrug();
     },
     // 申请调价
- 
+
     handlePrice(row) {
       this.dialogPrice = true;
       this.temp.drugListId = row.drugListId;
@@ -413,7 +425,7 @@ export default {
       this.temp.specName = row.specName;
       this.temp.pacUnt = row.pacUnt;
       this.temp.prodentpName = row.prodentpName;
-      this.temp.pricInit = row.purcPric ? row.purcPric:0;
+      this.temp.pricInit = row.purcPric ? row.purcPric : 0;
       this.$nextTick(() => {
         this.$refs.dataForm.resetFields();
       });
@@ -425,29 +437,30 @@ export default {
           this.ccLoad = true;
           let data = {
             drugListId: this.temp.drugListId,
-            pricInit:this.temp.pricInit,
+            pricInit: this.temp.pricInit,
             pricCurr: this.temp.pricCurr,
             appyRea: this.temp.appyRea,
-            hospId:this.orgId,
-            fileId:this.temp.fileId
+            hospId: this.orgId,
+            fileId: this.temp.fileId
           };
-          PricChg(data).then(res => {
-            if(res.success === true) {
-              this.$message({
-                message: '调价已申请',
-                type: 'success'
-              });
-              this.ccLoad = false;
-              this.dialogPrice = false;
-              this.getHospDrug();
-            }
-          }).catch(err => {
+          PricChg(data)
+            .then(res => {
+              if (res.success === true) {
+                this.$message({
+                  message: "调价已申请",
+                  type: "success"
+                });
+                this.ccLoad = false;
+                this.dialogPrice = false;
+                this.getHospDrug();
+              }
+            })
+            .catch(err => {
               this.ccLoad = false;
             });
         }
       });
-    },
-
+    }
   },
   mounted() {
     this.getData();
@@ -472,4 +485,4 @@ export default {
   width: 220px;
 }
 </style>
-@/api/consumCataManage-sup/index
+@/api/consumCataManage-sup/index

+ 31 - 20
src/views/page/consumCataManage-sup/distributionmanage.vue

@@ -27,15 +27,6 @@
         :inline="true"
         label-width="90px"
       >
-        <!-- <el-form-item label="耗材编码" prop="materialId" class="long">
-            <el-input
-              v-model="listQuery.materialId"
-              placeholder="请输入耗材编码"
-            ></el-input>
-          </el-form-item> -->
-        <!-- <el-form-item size="mini" label="医保编码" prop="hiCode" class="long">
-          <el-input v-model="listQuery.hiCode" placeholder="请输入医保编码"></el-input>
-        </el-form-item> -->
         <el-form-item size="mini" label="耗材信息" prop="prodName" class="long">
           <el-input
             v-model="listQuery.prodName"
@@ -135,7 +126,6 @@
             ></el-option>
           </el-select>
         </el-form-item>
-
         <!-- <div class="right-button"> -->
         <el-button
           type="primary"
@@ -148,10 +138,7 @@
       </el-form>
 
       <div class="right-button" v-if="btnShow">
-        <el-button
-          type="success"
-          icon="el-icon-download"
-          @click="downTemplate()"
+        <el-button type="success" @click="synOusTemplate()"
           >目录同步
         </el-button>
         <el-upload
@@ -596,6 +583,12 @@
         />
       </template>
     </el-dialog>
+    <searchView
+      :synchVisable.sync="synchVisable"
+      :institui="spdIData"
+      :spId="listQuery.spdId"
+      @submit="yncData"
+    />
   </div>
 </template>
 
@@ -615,19 +608,23 @@ import {
   selectSpdList,
   selectSplerMcsListIntf,
   exportMcsTemplate,
-  importMcsExcel
+  importMcsExcel,
+  selectSpdListExclude
 } from "@/api/consumCataManage-sup/index";
 import rulesR from "@/utils/rules";
 import ylUpload from "@/components/yl-upload";
+import searchView from "./searchView.vue";
 import { exportData } from "./const";
 export default {
   components: {
     ylPagination,
     ylUpload,
-    mcsInfo
+    mcsInfo,
+    searchView
   },
   data() {
     return {
+      synchVisable: false, //同步目录弹窗开关
       activeName: "grp",
       rulesR,
       spdId: null,
@@ -784,6 +781,7 @@ export default {
       },
       totalC: false,
       addLoading: false,
+      spdIData: [],
       insertMcsList: [],
       // tree
       activeNametree: "org",
@@ -793,6 +791,19 @@ export default {
     };
   },
   methods: {
+    // 同步目录提交
+    yncData() {
+      this.getHospConsum();
+    },
+    //同步目录
+    synOusTemplate() {
+      this.synchVisable = true;
+      selectSpdListExclude({ spdId: this.listQuery.spdId }).then(res => {
+        if (res.success == true) {
+          this.spdIData = res.data;
+        }
+      });
+    },
     handleChange(file, list) {
       let formData = new FormData();
       formData.append("spdId", this.listQuery.spdId);
@@ -803,7 +814,7 @@ export default {
             message: "导入成功",
             type: "success"
           });
-          this.getData();
+          this.getData({});
         }
       });
     },
@@ -864,10 +875,10 @@ export default {
         });
     },
     // 获取医院列表
-    getData(type) {
+    getData(pam) {
       this.data = [];
       this.listLoading = true;
-      selectSpdList()
+      selectSpdList(pam)
         .then(res => {
           this.listQuery.spdId = res.data[0].spdId;
           this.data = res.data;
@@ -1142,7 +1153,7 @@ export default {
     }
   },
   mounted() {
-    this.getData();
+    this.getData({});
     // this.getHospConsum();
     if (this.$route.query.spdId) {
       this.listQuery.spdId = this.$route.query.spdId;

+ 697 - 0
src/views/page/consumCataManage-sup/purOrderAccept/acceptDetail.vue

@@ -0,0 +1,697 @@
+<template>
+  <div>
+    <!-- 永济项目没有订单状态  制单人-->
+    <div class="common-card">
+      <h3>单据信息</h3>
+      <el-form
+        :model="listForm"
+        ref="listform"
+        label-width="237px"
+        class="grid-form-class"
+      >
+        <div class="form-body">
+          <div class="flex-css">
+            <el-form-item label="采购单号" prop="id">
+              <div class="content">
+                {{ listForm.id }}
+              </div>
+            </el-form-item>
+            <el-form-item label="明细条数" prop="detlCnt">
+              <div class="content">
+                {{ listForm.detlCnt }}
+              </div>
+            </el-form-item>
+          </div>
+          <div class="flex-css">
+            <el-form-item
+              label="采购方上级"
+              prop="prntOrgName"
+              v-if="hospId == '4'"
+            >
+              <div class="content">
+                {{ listForm.prntOrgName }}
+              </div>
+            </el-form-item>
+            <el-form-item label="采购方" prop="orgName">
+              <div class="content">
+                {{ listForm.orgName }}
+              </div>
+            </el-form-item>
+          </div>
+          <div class="flex-css">
+            <el-form-item label="制单时间" prop="docmkDate">
+              <div class="content">
+                {{ listForm.docmkDate }}
+              </div>
+            </el-form-item>
+            <el-form-item label="当前状态" prop="stas">
+              <div class="content">
+                {{ listForm.stas }}
+              </div>
+            </el-form-item>
+          </div>
+          <div class="flex-css" v-if="hospId == '4'">
+            <el-form-item label="客户名称" prop="docmker">
+              <div class="content">
+                {{ listForm.docmker }}
+              </div>
+            </el-form-item>
+            <el-form-item label="联系电话" prop="docmkerConinfo">
+              <div class="content">
+                {{ listForm.docmkerConinfo }}
+              </div>
+            </el-form-item>
+          </div>
+        </div>
+      </el-form>
+    </div>
+    <div class="common-card">
+      <h3>订单明细</h3>
+      <el-form :model="list">
+        <el-table
+          v-loading="listLoading"
+          element-loading-text="加载中"
+          :data="list"
+          fit
+          stripe
+          border
+        >
+          <template slot="empty">
+            <img src="@/assets/nopage.png" alt />
+            <p>暂无数据</p>
+          </template>
+          <el-table-column fixed type="index" label="序号" width="60" />
+          <el-table-column label="药品编码" prop="drugListId" />
+          <el-table-column label="药品名称" prop="" width="300">
+            <template slot-scope="scope">
+              <div class="drug-name">
+                <el-tag>{{ scope.row.drugName }}</el-tag
+                >{{ "【" + scope.row.dosformName + "】"
+                }}<el-tag>{{ scope.row.essdrugType }}</el-tag
+                ><br />
+                {{ "生产厂家 【" + scope.row.prodentpName + "】" }}<br />
+                {{
+                  "药品规格 【" +
+                    scope.row.specName +
+                    "*" +
+                    scope.row.convrat +
+                    scope.row.prepunt +
+                    "/" +
+                    scope.row.pacUnt +
+                    "】"
+                }}
+              </div>
+            </template>
+          </el-table-column>
+          <el-table-column label="订货数量" prop="purcCnt" />
+          <el-table-column label="采购价" prop="purcPric" />
+          <el-table-column label="采购金额" prop="purcAmt" />
+          <el-table-column label="对码状态" prop="matchCodeStatus">
+            <template slot-scope="scope">
+              <el-button
+                type="text"
+                v-if="scope.row.matchCodeStatus == '0'"
+                @click="handleDui(scope.row)"
+                >未对码</el-button
+              >
+              <el-button
+                type="text"
+                v-if="scope.row.matchCodeStatus == '1'"
+                @click="handleDui(scope.row)"
+                >已对码</el-button
+              >
+            </template>
+          </el-table-column>
+          <el-table-column label="对码信息" prop="splerDrugName" width="250px">
+            <template slot-scope="scope">
+              <div class="drug-name" v-if="scope.row.splerDrugName">
+                <el-tag>{{ scope.row.splerDrugName }}</el-tag>
+                {{ "【" + scope.row.splerDosformName + "】" }}
+                <el-tag v-if="scope.row.splerEssdrugType">{{
+                  scope.row.splerEssdrugType === "0"
+                    ? "非基药"
+                    : scope.row.splerEssdrugType === "1"
+                    ? "基药"
+                    : scope.row.splerEssdrugType
+                }}</el-tag
+                ><br />
+                {{ "供应商厂家 【" + scope.row.splerProdentpName + "】" }}<br />
+                {{
+                  "供应商规格 【" +
+                    scope.row.splerSpecName +
+                    "*" +
+                    scope.row.convrat +
+                    scope.row.splerPrepunt +
+                    "/" +
+                    scope.row.splerPacUnt +
+                    "】"
+                }}
+              </div>
+            </template>
+          </el-table-column>
+          <el-table-column label="转单状态" prop="isZd">
+            <template slot-scope="scope">
+              <el-tag v-if="scope.row.isZd == '0'" type="ifo">未转单</el-tag>
+              <el-tag v-if="scope.row.isZd == '1'" type="success"
+                >已转单</el-tag
+              >
+            </template>
+          </el-table-column>
+          <el-table-column label="是否转备案" prop="isFil" width="100px">
+            <template slot-scope="scope">
+              <span v-if="scope.row.isFil == '0'">否</span>
+              <span v-if="scope.row.isFil == '1'">是</span>
+            </template>
+          </el-table-column>
+          <el-table-column label="转备案原因" prop="filMsg" width="100px" />
+          <el-table-column label="是否驳回" width="100">
+            <template slot-scope="scope">
+              <el-switch
+                v-model="scope.row.flag"
+                :active-value="1"
+                :inactive-value="0"
+                @change="handleSwitch(scope.$index, scope.row)"
+                :disabled="!isShow"
+              ></el-switch>
+            </template>
+          </el-table-column>
+          <el-table-column label="驳回原因" prop="rejtRea" width="200">
+            <template slot-scope="scope">
+              <el-form-item
+                label-width="0"
+                class="item"
+                :prop="scope.$index + '.rejtRea'"
+              >
+                <el-input
+                  placeholder="请输入"
+                  v-model="scope.row.rejtRea"
+                  :readonly="!scope.row.flag"
+                ></el-input>
+              </el-form-item>
+            </template>
+          </el-table-column>
+        </el-table>
+      </el-form>
+
+      <div class="foot-button">
+        <el-button
+          type="primary"
+          @click="handleAccept"
+          :loading="aaLoad"
+          v-if="listForm.stas === '未受理'"
+          >受理</el-button
+        >
+        <el-button type="info" @click="goback">返回</el-button>
+      </div>
+    </div>
+    <!-- 添加药品 -->
+    <el-dialog title="选择医院客户" :visible.sync="dialogHosp" width="60%">
+      <el-table
+        v-loading="tableLoading"
+        element-loading-text="加载中"
+        :data="tableData"
+        fit
+        stripe
+        border
+      >
+        <template slot="empty">
+          <img src="@/assets/nopage.png" alt />
+          <p>暂无数据</p>
+        </template>
+        <el-table-column fixed type="index" label="序号" width="60" />
+        <el-table-column label="客户id" prop="customerId" />
+        <el-table-column label="客户名称" prop="customerName" />
+        <el-table-column fixed="right" label="操作" width="100">
+          <template slot-scope="scope">
+            <el-button type="primary" plain @click="handleRow(scope.row)"
+              >选择</el-button
+            >
+          </template>
+        </el-table-column>
+      </el-table>
+    </el-dialog>
+    <!-- 对码 -->
+    <el-dialog title="药品对码" :visible.sync="dialogDui" width="70%">
+      <template>
+        <h3 style="margin: 10px 0">选中药品信息:</h3>
+        <el-table :data="selectDrguData" border style="width: 100%">
+          <el-table-column fixed prop="drugName" label="药品名称" width="150" />
+          <el-table-column prop="dosformName" label="剂型名称" width="120" />
+          <el-table-column prop="prodentpName" label="生产企业" />
+          <el-table-column prop="drugListId" label="药品编码" width="80" />
+          <el-table-column prop="specName" label="规格" width="300">
+            <template slot-scope="scope">
+              <div class="drug-name">
+                {{
+                  "医院规格 【" +
+                    scope.row.specName +
+                    "*" +
+                    scope.row.convrat +
+                    scope.row.prepunt +
+                    "/" +
+                    scope.row.pacUnt +
+                    "】"
+                }}
+              </div>
+            </template>
+          </el-table-column>
+          <el-table-column prop="purcPric" label="价格" width="80" />
+        </el-table>
+        <h3 style="margin: 10px 0">供应商药品目录:</h3>
+        <el-form :model="supQuery" ref="supQuery" :inline="true">
+          <el-form-item label="药品名称" prop="splerDrugName" class="long">
+            <el-input
+              v-model="supQuery.splerDrugName"
+              placeholder="请输入药品名称"
+            ></el-input>
+          </el-form-item>
+          <el-form-item label="药品编码" prop="splerDrugListId" class="long">
+            <el-input
+              v-model="supQuery.splerDrugListId"
+              placeholder="请输入药品编码"
+            ></el-input>
+          </el-form-item>
+          <el-form-item>
+            <el-button type="primary" @click="searchSup('search')"
+              >查询</el-button
+            >
+            <el-button @click="reset('sup')">重置</el-button>
+          </el-form-item>
+        </el-form>
+        <el-form :model="form" ref="form" :rules="rules">
+          <el-table
+            :data="form.splerData"
+            border
+            style="width: 100%"
+            v-loading="supLoading"
+            max-height="300"
+          >
+            <el-table-column prop="splerDrugName" label="药品名称" width="170">
+            </el-table-column>
+            <el-table-column prop="splerDosformName" label="剂型名称">
+            </el-table-column>
+            <el-table-column prop="splerProdentpName" label="生产企业">
+            </el-table-column>
+            <el-table-column prop="splerDrugListId" label="药品编码">
+            </el-table-column>
+            <el-table-column prop="address" label="规格" width="300">
+              <template slot-scope="scope">
+                <div class="drug-name">
+                  {{
+                    "供应商规格 【" +
+                      scope.row.splerSpecName +
+                      "*" +
+                      scope.row.splerPrepunt +
+                      "/" +
+                      scope.row.splerPacUnt +
+                      "】"
+                  }}
+                </div>
+              </template>
+            </el-table-column>
+            <el-table-column prop="drugListId" label="库存" width="80" />
+            <el-table-column prop="address" label="转换比" width="300">
+              <template slot-scope="scope">
+                <el-row>
+                  <el-col span="11">
+                    <el-form-item
+                      :prop="'splerData.' + scope.$index + '.conNum'"
+                      :rules="{
+                        required: true,
+                        pattern: /^[\-\+]?([1-9]\d*|([1-9]\d*\/[1-9]\d*))$/,
+                        message: '输入正整数',
+                        trigger: 'change'
+                      }"
+                    >
+                      <el-input
+                        v-model="scope.row.conNum"
+                        placeholder="请输入转换比"
+                      ></el-input>
+                    </el-form-item>
+                  </el-col>
+                  <el-col span="2"
+                    ><span style="margin: 0 10px">/</span></el-col
+                  >
+                  <el-col span="11">
+                    <el-form-item
+                      :prop="'splerData.' + scope.$index + '.conDen'"
+                      :rules="{
+                        required: true,
+                        pattern: /^[\-\+]?([1-9]\d*|([1-9]\d*\/[1-9]\d*))$/,
+                        message: '输入正整数',
+                        trigger: 'change'
+                      }"
+                    >
+                      <el-input
+                        v-model="scope.row.conDen"
+                        placeholder="请输入转换比"
+                      ></el-input>
+                    </el-form-item>
+                  </el-col>
+                </el-row>
+              </template>
+            </el-table-column>
+            <el-table-column label="操作" width="100">
+              <template slot-scope="scope">
+                <el-button
+                  @click="handleClick(scope.row, scope.$index)"
+                  type="text"
+                  size="small"
+                  >对码</el-button
+                >
+              </template>
+            </el-table-column>
+          </el-table>
+        </el-form>
+
+        <!--分页-->
+        <yl-pagination
+          v-show="total > 0"
+          :total="total"
+          :page.sync="supQuery.current"
+          :limit.sync="supQuery.size"
+          @pagination="searchSup"
+        />
+      </template>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+import ylStep from "@/components/yl-step";
+import ylPagination from "@/components/yl-pagination";
+// import { getDetlList } from "@/api/purchasing-management/procurement-order-management";
+import rulesR from "@/utils/rules";
+import {
+  acpOrd,
+  transfer,
+  getSplerCustomerList
+} from "@/api/orderManage-sup/index";
+// import { QuerySplerDrugList, DrugMatch } from "@/api/drugCataManage-sup/index";
+export default {
+  components: {
+    ylStep,
+    ylPagination
+  },
+  data() {
+    return {
+      listForm: {
+        id: "",
+        detlCnt: "",
+        orgName: "",
+        docmker: "",
+        docmkDate: "",
+        stas: "",
+        zdCustomerName: "",
+        zdCustomerId: ""
+      },
+      listLoading: false,
+      list: [],
+      aaLoad: false,
+      zdLoad: false,
+      isShow: false,
+      returnInfo: false,
+      stasOptions: [
+        { value: "A", lable: "未受理" },
+        { value: "B", lable: "已受理" },
+        { value: "R", lable: "被驳回" },
+        { value: "C", lable: "已出库" },
+        { value: "D", lable: "部分出库" },
+        { value: "Y", lable: "已入库" },
+        { value: "P", lable: "部分入库" }
+      ],
+      essdrugOptions: ["非基药", "基药"],
+      // 医院客户
+      hospShow: true,
+      dialogHosp: false,
+      tableData: [],
+      listindex: "",
+      listtext: "",
+      // 对码
+      supQuery: {
+        current: 1,
+        size: 5,
+        splerDrugName: "",
+        splerDrugListId: "",
+        hospId: "",
+        drugListId: ""
+      },
+      duiId: "",
+      total: 0,
+      dialogDui: false,
+      selectDrguData: [],
+      form: {
+        splerData: []
+      },
+      hospId: ""
+    };
+  },
+  created() {
+    if (this.$route.query.stas == "A") {
+      this.isShow = true;
+    } else {
+      this.isShow = false;
+    }
+    this.listForm.id = this.$route.query.id;
+    this.listForm.detlCnt = this.$route.query.detlCnt;
+    this.listForm.orgName = this.$route.query.orgName;
+    this.listForm.docmker = this.$route.query.docmker;
+    this.listForm.docmkDate = this.$route.query.docmkDate;
+    this.listForm.prntOrgName = this.$route.query.prntOrgName;
+    this.listForm.docmkerConinfo = this.$route.query.docmkerConinfo;
+    this.stasOptions.forEach(i => {
+      if (i.value == this.$route.query.stas) {
+        this.listForm.stas = i.lable;
+      }
+    });
+    this.getData();
+    if (this.$route.query.ifCustomer == "0") {
+      this.hospShow = true;
+    } else {
+      this.hospShow = false;
+    }
+    this.hospId = this.$route.query.hospId;
+  },
+  methods: {
+    goback() {
+      this.$router.push({
+        name: "purOrderAccept",
+        params: {
+          hospId: this.$route.query.hospId,
+          current: this.$route.query.current
+        }
+      });
+    },
+    //
+    // getData() {
+    //   this.listLoading = true;
+    //   getDetlList({ id: this.$route.query.id })
+    //     .then((res) => {
+    //       this.list = res.data;
+    //       this.list.forEach((i) => {
+    //         i.rejtRea = i.rejtRea || "";
+    //         if (i.isUpDown === "1") {
+    //           i.rejtRea = "下架";
+    //           i.flag = 1;
+    //         } else if (i.rejtRea) {
+    //           i.flag = 1;
+    //         }
+    //         i.essdrugType = this.essdrugOptions[i.essdrugType * 1];
+    //       });
+    //       this.listLoading = false;
+    //     })
+    //     .catch((err) => {
+    //       this.listLoading = false;
+    //     });
+    // },
+    getData() {
+      this.listLoading = true;
+      getDetlList({ id: this.$route.query.id })
+        .then(res => {
+          this.list = res.data;
+          this.list.forEach(i => {
+            if (i.rejtRea) {
+              i.flag = 1;
+            }
+            i.essdrugType = this.essdrugOptions[i.essdrugType * 1];
+          });
+          this.listLoading = false;
+        })
+        .catch(err => {
+          this.listLoading = false;
+        });
+    },
+    // 选择医院客户
+    handleSelect(index, row) {
+      this.listindex = index;
+      this.dialogHosp = true;
+      this.getHopData();
+    },
+    getHopData() {
+      getSplerCustomerList({}).then(res => {
+        this.tableData = res.data;
+        console.log(res.data, " this.tableData");
+      });
+    },
+    // 选择
+    handleRow(row) {
+      // customerName
+      this.listForm.zdCustomerId = row.customerId;
+      this.listForm.zdCustomerName = row.customerName;
+      this.dialogHosp = false;
+    },
+    // 是否驳回
+    handleSwitch(index, row) {
+      // if (row.flag === 0) {
+      //   row.rejtRea = "";
+      // } else {
+      //   if (!row.rejtRea && row.isUpDown == "1") {
+      //     row.rejtRea = "下架";
+      //   }
+      // }
+      if (row.flag == 1) {
+        row.rejtRea = "";
+        this.returnInfo = false;
+      } else {
+        this.returnInfo = true;
+      }
+    },
+    // 受理
+    handleAccept() {
+      this.list.forEach(e => {
+        if (e.flag == 1 && !e.rejtRea) {
+          this.$message({
+            message: "选择是否驳回后请填写驳回原因",
+            type: "warning"
+          });
+          throw new Error("选择是否驳回后请填写驳回原因");
+        }
+      });
+      this.$confirm("确认受理", "提示", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning"
+      }).then(() => {
+        let data = this.list.filter(i => {
+          if (i.flag == 1) {
+            return i;
+          }
+        });
+        let data2 = this.list;
+        // let data2 = data.map((i) => {
+        //   return { id: i.id, rejtRea: i.rejtRea };
+        // });
+        let data3 = {
+          id: this.$route.query.id,
+          zdCustomerId: this.listForm.zdCustomerId,
+          zdCustomerName: this.listForm.zdCustomerName,
+          rejtList: data2
+          // zdData:zdData,
+        };
+        this.aaLoad = true;
+        acpOrd(data3)
+          .then(res => {
+            this.aaLoad = false;
+            this.$message({
+              message: "已受理",
+              type: "success"
+            });
+            this.$router.push({
+              name: "purOrderAccept",
+              params: {
+                hospId: this.$route.query.hospId,
+                current: this.$route.query.current
+              }
+            });
+          })
+          .catch(err => {
+            this.aaLoad = false;
+          });
+      });
+    },
+    // 对码
+    //搜索供应商列表
+    searchSup() {
+      this.supLoading = true;
+      this.supQuery.hospId = this.hospId;
+      this.supQuery.drugListId = this.duiId;
+      QuerySplerDrugList(this.supQuery)
+        .then(res => {
+          this.form.splerData = res.data.records;
+          this.total = res.data.total;
+          this.supLoading = false;
+        })
+        .catch(err => {
+          this.supLoading = false;
+        });
+    },
+    reset(type) {
+      // if (type === "drug") {
+      //   this.$refs.listQuery.resetFields();
+      //   this.getHospDrug();
+      // } else {
+      this.$refs.supQuery.resetFields();
+      this.supQuery = {};
+      this.searchSup();
+      // }
+    },
+    // 对码弹窗获取供应商列表
+    handleDui(row) {
+      console.log(row, "选中药品");
+      this.dialogDui = true;
+      this.selectDrguData = [];
+      this.selectDrguData.push(row);
+      this.supQuery.splerDrugName = row.drugName;
+      this.duiId = row.drugListId;
+      this.supQuery.current = 1;
+      this.searchSup();
+    },
+    validateField(form, index) {
+      let result = true;
+      for (let item of this.$refs[form].fields) {
+        if (item.prop.split(".")[1] == index) {
+          this.$refs[form].validateField(item.prop, error => {
+            if (error != "") {
+              result = false;
+            }
+          });
+        }
+        if (!result) break;
+      }
+      return result;
+    },
+    // 对码操作
+    handleClick(item, index) {
+      let DrugMatchObj = {
+        spdId: this.$route.query.spdId,
+        drugListId: this.selectDrguData[0].drugListId,
+        splerDrugListId: item.splerDrugListId,
+        conNum: parseInt(item.conNum),
+        conDen: parseInt(item.conDen)
+      };
+      if (!this.validateField("form", index)) {
+        return;
+      } else {
+        DrugMatch(DrugMatchObj).then(res => {
+          if (res.success === true) {
+            this.dialogDui = false;
+            this.$message({
+              message: "对码成功",
+              type: "success"
+            });
+            this.getData();
+          } else {
+            this.$message.error("对码失败");
+          }
+        });
+      }
+    }
+  }
+};
+</script>
+
+<style lang="scss" scoped>
+.el-form-item--small.el-form-item {
+  margin-bottom: 1px;
+}
+</style>

+ 337 - 0
src/views/page/consumCataManage-sup/purOrderAccept/index.vue

@@ -0,0 +1,337 @@
+<template>
+  <div style="display: flex; position: relative">
+    <el-card style="width: 18%; margin-right: 18px; border-radius: 6px">
+      <el-tree
+        :data="dataTree"
+        :props="defaultProps"
+        node-key="hospId"
+        :current-node-key="currentNodeKey"
+        ref="tree1"
+        highlight-current="true"
+        @node-click="handleNodeClick"
+        default-expand-all="true"
+        style="margin-top: 10px"
+        v-loading="dataTreeloading"
+      >
+        <span class="custom-tree-node" slot-scope="{ node, data }">
+          <div>{{ node.label }}</div>
+          <div class="redTit">{{ data.wslnum }}</div>
+        </span>
+      </el-tree>
+    </el-card>
+    <div class="common-box" style="width: 82%">
+      <el-form :model="listQuery" ref="queryForm" :inline="true">
+        <el-form-item label="订单号" prop="id">
+          <el-input
+            v-model="listQuery.id"
+            placeholder="请输入订单号"
+          ></el-input>
+        </el-form-item>
+        <el-form-item label="制单时间" prop="docmkDate">
+          <el-date-picker
+            v-model="listQuery.docmkDate"
+            type="daterange"
+            range-separator="至"
+            :editable="false"
+            value-format="yyyy-MM-dd"
+            start-placeholder="开始时间"
+            end-placeholder="结束时间"
+            style="width: 230px"
+          />
+        </el-form-item>
+        <el-form-item label="采购方" prop="orgId">
+          <el-cascader
+            v-model="listQuery.orgId"
+            :options="options"
+            :show-all-levels="false"
+            :props="{
+              expandTrigger: 'hover',
+              value: 'orgId',
+              label: 'orgName',
+              children: 'child',
+              checkStrictly: true,
+              emitPath: false
+            }"
+            clearable
+            @change="handleChange"
+          >
+          </el-cascader>
+        </el-form-item>
+        <el-form-item label="当前状态" prop="stas">
+          <el-select v-model="listQuery.stas" placeholder="请选择" clearable>
+            <el-option
+              v-for="item in stasOptions"
+              :key="item.value"
+              :label="item.lable"
+              :value="item.value"
+            ></el-option>
+          </el-select>
+        </el-form-item>
+        <el-form-item>
+          <el-button type="primary" @click="getData('search')">查询</el-button>
+          <el-button @click="reset">重置</el-button>
+        </el-form-item>
+      </el-form>
+      <el-table
+        v-loading="listLoading"
+        element-loading-text="加载中"
+        :data="list"
+        height="500"
+        fit
+        stripe
+        border
+      >
+        <template slot="empty">
+          <img src="@/assets/nopage.png" alt />
+          <p>暂无数据</p>
+        </template>
+        <el-table-column type="index" label="序号" width="60" />
+        <el-table-column label="采购单号" prop="id" />
+        <el-table-column label="计划类型" prop="planType" />
+        <el-table-column label="品规数" prop="detlCnt" />
+        <el-table-column label="金额" prop="purcAmt" />
+        <el-table-column label="采购方" prop="orgName" />
+        <!-- <el-table-column label="制单人" prop="docmker" /> -->
+        <el-table-column label="制单时间" prop="docmkDate" />
+        <el-table-column label="当前状态" prop="stas">
+          <template #default="{ row }">
+            <el-tag v-if="row.stas == 'A'" type="info">未受理</el-tag>
+            <el-tag v-if="row.stas == 'B'" type="success">已受理</el-tag>
+            <el-tag v-if="row.stas == 'R'" type="danger">被驳回</el-tag>
+            <el-tag v-if="row.stas == 'C'" type="success">已出库</el-tag>
+            <el-tag v-if="row.stas == 'D'">部分出库</el-tag>
+            <el-tag v-if="row.stas == 'Y'" type="success">已入库</el-tag>
+            <el-tag v-if="row.stas == 'P'">部分入库</el-tag>
+          </template>
+        </el-table-column>
+        <el-table-column
+          label="部门名称"
+          prop="deptName"
+          v-if="hospIdWrong == '3'"
+        />
+        <el-table-column
+          label="采购方上级"
+          prop="prntOrgName"
+          v-if="hospIdWrong == '4'"
+        />
+        <el-table-column label="操作" width="100">
+          <template slot-scope="scope">
+            <el-button type="text" @click="handleDetail(scope.row)"
+              >详情</el-button
+            >
+          </template>
+        </el-table-column>
+      </el-table>
+      <!--分页-->
+      <yl-pagination
+        v-show="total > 0"
+        :total="total"
+        :page.sync="listQuery.current"
+        :limit.sync="listQuery.size"
+        @pagination="getData"
+      />
+    </div>
+  </div>
+</template>
+
+<script>
+import ylPagination from "@/components/yl-pagination";
+// import { deleteEmptyGroup } from "@/utils/utils";
+// import {
+//   getOrdPageSpler,
+//   getALLOrgTree,
+//   QueryHospList,
+// } from "@/api/orderManage-sup/index";
+export default {
+  components: {
+    ylPagination
+  },
+  data() {
+    return {
+      listQuery: {
+        current: 1,
+        size: 5,
+        id: "",
+        hospId: "",
+        docmkDateStart: "",
+        docmkDateEnd: "",
+        docmkDate: [],
+        stas: "A",
+        orgId: ""
+      },
+      stasOptions: [
+        { value: "A", lable: "未受理" },
+        // { value: "B", lable: "已受理" },
+        { value: "R", lable: "被驳回" }
+        // { value: "C", lable: "已出库" },
+        // { value: "D", lable: "部分出库" },
+        // { value: "Y", lable: "已入库" },
+        // { value: "P", lable: "部分入库" }
+      ],
+      options: [],
+      listLoading: false,
+      list: [],
+      total: 0,
+      dataTree: "",
+      activeName: "org",
+      hospId: null,
+      currentNodeKey: "",
+      defaultProps: {
+        children: "children",
+        label: "hospName"
+      },
+      // itemsPerPage:5
+      hospIdWrong: null, //用于判断只有万荣要的部门名称
+      dataTreeloading: false
+    };
+  },
+  created() {
+    if (this.$route.params.hospId) {
+      this.listQuery.current = this.$route.params.current;
+      this.handleNodeClick(this.$route.params.hospId);
+    }
+    if (localStorage.sizeaccept) {
+      this.listQuery.size = Number(localStorage.sizeaccept);
+    }
+  },
+  mounted() {
+    this.dataTreeloading = true;
+    QueryHospList()
+      .then(res => {
+        this.listQuery.hospId = res.data[0].hospId;
+        this.dataTree = res.data;
+        this.dataTreeloading = false;
+        this.$nextTick(() => {
+          this.$refs.tree1.setCurrentKey(this.currentNodeKey);
+        });
+      })
+      .catch(() => {
+        this.dataTreeloading = false;
+      });
+  },
+  methods: {
+    tabClick(tab) {
+      if (tab.label == "按机构") {
+        QueryHospList().then(res => {
+          console.log(res, "shu");
+          this.dataTree = res.data;
+        });
+        this.defaultProps.label = "hospName";
+      } else if (tab.label == "按分类") {
+        this.dataTree = [];
+        // this.defaultProps.label = 'orgGrpName'
+        // this.listQuery.type = 'grp';
+      }
+    },
+    getData(type) {
+      if (type == "search") {
+        this.listQuery.current = 1;
+      }
+      this.listLoading = true;
+      this.listQuery.docmkDateStart = this.listQuery.docmkDate[0];
+      this.listQuery.docmkDateEnd = this.listQuery.docmkDate[1];
+      // this.listQuery.hospId = this.hospId;
+
+      getOrdPageSpler(this.listQuery)
+        .then(res => {
+          if (res.success == true) {
+            this.list = res.data.records;
+            this.total = res.data.total;
+            this.listLoading = false;
+            localStorage.setItem(
+              "sizeaccept",
+              JSON.stringify(this.listQuery.size)
+            );
+          }
+        })
+        .catch(err => {
+          this.listLoading = false;
+        });
+    },
+    // 点击获取医院药品列表
+    handleNodeClick(data) {
+      this.hospIdWrong = data.hospId;
+      this.listQuery.spdId = data.spdId;
+      this.listLoading = true;
+      if (data.hospId) {
+        this.listQuery.hospId = data.hospId;
+        this.hospId = data.hospId;
+        this.currentNodeKey = data.hospId;
+        // this.$store.commit("user/SET_HOSPID", data.hospId);
+      } else {
+        this.listQuery.hospId = data;
+        this.currentNodeKey = data;
+        // this.$store.commit("user/SET_HOSPID", data);
+      }
+      getOrdPageSpler(this.listQuery)
+        .then(res => {
+          this.list = res.data.records;
+          this.total = res.data.total;
+          this.listLoading = false;
+        })
+        .catch(err => {
+          this.listLoading = false;
+        });
+      getALLOrgTree().then(res => {
+        this.options = res.data;
+        deleteEmptyGroup(this.options);
+      });
+    },
+    reset() {
+      this.$refs.queryForm.resetFields();
+      this.getData();
+    },
+    // 详情
+    handleDetail(row) {
+      this.$router.push({
+        name: "acceptDetail",
+        query: {
+          id: row.id,
+          detlCnt: row.detlCnt,
+          orgName: row.orgName,
+          docmker: row.docmker,
+          docmkDate: row.docmkDate,
+          stas: row.stas,
+          docmkerConinfo: row.docmkerConinfo,
+          hospId: this.currentNodeKey,
+          current: this.listQuery.current,
+          ifCustomer: row.ifCustomer,
+          spdId: this.listQuery.spdId,
+          prntOrgName: row.prntOrgName
+        }
+      });
+    }
+  }
+};
+</script>
+
+<style lang="scss" scoped>
+::v-deep .el-card__body {
+  padding: 6px;
+}
+::v-deep .el-tabs__nav {
+  width: 99%;
+}
+::v-deep .el-tabs__item {
+  width: 49.5%;
+}
+::v-deep .el-badge__content.is-fixed {
+  top: 8px;
+  right: 22px;
+}
+.custom-tree-node {
+  display: flex;
+  flex-direction: row;
+  justify-content: space-between;
+}
+.custom-tree-node ::v-deep .redTit {
+  min-width: 30px;
+  background-color: #f56c6c;
+  min-height: 1px;
+  border-radius: 10px;
+  text-align: center;
+  margin-left: 10px;
+  padding: 1px;
+  color: #fff;
+}
+</style>

+ 401 - 0
src/views/page/consumCataManage-sup/searchView.vue

@@ -0,0 +1,401 @@
+<template>
+  <div class="synch-wrap">
+    <el-dialog
+      title="目录详情"
+      :visible.sync="dialogVisible"
+      width="70%"
+      :before-close="handleClose"
+    >
+      <el-form
+        :model="listQuery"
+        ref="listQuery"
+        :inline="true"
+        label-width="90px"
+      >
+        <el-form-item size="mini" label="耗材信息" prop="prodName" class="long">
+          <el-input
+            v-model="listQuery.prodName"
+            placeholder="请输入耗材名称/医保编码"
+          ></el-input>
+        </el-form-item>
+        <el-form-item size="mini" label="规格" prop="spec" class="long">
+          <el-input
+            v-model="listQuery.spec"
+            placeholder="请输入规格"
+          ></el-input>
+        </el-form-item>
+        <el-form-item size="mini" label="型号" prop="mol" class="long">
+          <el-input v-model="listQuery.mol" placeholder="请输入型号"></el-input>
+        </el-form-item>
+        <el-form-item size="mini" label="生产企业" prop="prodEntp" class="long">
+          <el-input
+            v-model="listQuery.prodEntp"
+            placeholder="请输入生产企业"
+          ></el-input>
+        </el-form-item>
+
+        <el-form-item size="mini" label="是否集采" prop="isFas" class="long">
+          <el-select
+            v-model="listQuery.isFas"
+            placeholder="请选择是否集采"
+            clearable
+          >
+            <el-option
+              v-for="item in isFasData"
+              :key="item.value"
+              :label="item.name"
+              :value="item.value"
+            ></el-option>
+          </el-select>
+        </el-form-item>
+        <!-- <el-form-item label="集采批次" prop="fasBtch" class="long">
+            <el-input v-model="listQuery.fasBtch" placeholder="请输入集采批次"></el-input>
+          </el-form-item> -->
+        <el-form-item size="mini" label="耗材类别" prop="mcsType" class="long">
+          <el-select
+            v-model="listQuery.mcsType"
+            placeholder="请选择耗材类别"
+            clearable
+          >
+            <el-option
+              v-for="item in mcsTypeData"
+              :key="item.value"
+              :label="item.name"
+              :value="item.value"
+            ></el-option>
+          </el-select>
+        </el-form-item>
+        <el-form-item size="mini" label="生产来源" prop="prodSouc" class="long">
+          <el-select
+            v-model="listQuery.prodSouc"
+            placeholder="请选择生产来源"
+            clearable
+          >
+            <el-option
+              v-for="item in SoucData"
+              :key="item.value"
+              :label="item.name"
+              :value="item.value"
+            ></el-option>
+          </el-select>
+        </el-form-item>
+        <el-form-item size="mini" label="材质" prop="matl" class="long">
+          <el-input
+            v-model="listQuery.matl"
+            placeholder="请输入材质"
+          ></el-input>
+        </el-form-item>
+        <el-form-item
+          size="mini"
+          label="注册证号"
+          prop="regcertno"
+          class="long"
+        >
+          <el-input
+            v-model="listQuery.regcertno"
+            placeholder="请输入注册证号"
+          ></el-input>
+        </el-form-item>
+
+        <el-form-item size="mini" label="是否挂网" prop="isPub" class="long">
+          <el-select
+            v-model="listQuery.isPub"
+            placeholder="请选择是否挂网"
+            clearable
+          >
+            <el-option
+              v-for="item in isPubData"
+              :key="item.value"
+              :label="item.name"
+              :value="item.value"
+            ></el-option>
+          </el-select>
+        </el-form-item>
+        <el-button
+          type="primary"
+          style="margin-left: 30px"
+          @click="getHospConsum()"
+          >查询</el-button
+        >
+        <el-button @click="reset()">重置</el-button>
+        <!-- </div> -->
+      </el-form>
+      <div class="herder-cont">
+        <div class="header-left">
+          <div class="header-label">机构:</div>
+          <el-select
+            v-model="listQuery.spdId"
+            placeholder="请选择机构"
+            @change="changeSpdId"
+          >
+            <el-option
+              v-for="item in instituiData"
+              :key="item.spdId"
+              :label="item.spdName"
+              :value="item.spdId"
+            ></el-option>
+          </el-select>
+        </div>
+        <div>
+          <el-button
+            type="primary"
+            style="margin-left: 30px"
+            @click="ynsAllData()"
+            >同步所有</el-button
+          >
+        </div>
+      </div>
+      <el-table
+        v-loading="listLoading"
+        element-loading-text="加载中"
+        :data="list"
+        fit
+        ref="mcsTable"
+        row-key="id"
+        height="400"
+        stripe
+        border
+        @selection-change="handleSelectionChange"
+      >
+        <template slot="empty">
+          <img src="@/assets/nopage.png" alt />
+          <p>暂无数据</p>
+        </template>
+        <el-table-column type="selection" :reserve-selection="true" width="55">
+        </el-table-column>
+        <el-table-column fixed type="index" label="序号" width="60" />
+        <el-table-column label="耗材信息" min-width="340">
+          <template slot-scope="scope">
+            <mcs-info :info="scope.row"></mcs-info>
+          </template>
+        </el-table-column>
+        <el-table-column label="医保编码" prop="hiCode" width="80" />
+        <el-table-column label="规格" prop="spec" width="80" />
+        <el-table-column label="型号" prop="mol" width="80" />
+        <el-table-column label="材质" prop="matl" width="80" />
+        <el-table-column label="是否集采" prop="isFas" width="80">
+          <template #default="{ row }">
+            <span v-if="row.isFas == '0'">否</span>
+            <span v-if="row.isFas == '1'">是</span>
+          </template>
+        </el-table-column>
+        <el-table-column label="生效时间" prop="crteTime" width="140" />
+        <el-table-column label="采购单位" prop="purcUnt" width="80" />
+        <el-table-column label="采购价" prop="purcPric" width="80" />
+        <el-table-column label="是否挂网" prop="isPub" width="80" fixed="right">
+          <template #default="{ row }">
+            <span v-if="row.isPub == '1'">是</span>
+            <span v-if="row.isPub == '0'">否</span>
+          </template>
+        </el-table-column>
+      </el-table>
+      <!--分页-->
+      <yl-pagination
+        v-show="total > 0"
+        :total="total"
+        :page.sync="listQuery.current"
+        :limit.sync="listQuery.size"
+        @pagination="getHospConsum"
+      />
+      <span slot="footer" class="dialog-footer">
+        <el-button @click="handleClose()">取 消</el-button>
+        <el-button type="primary" @click="subMitData()">确 定</el-button>
+      </span>
+    </el-dialog>
+  </div>
+</template>
+<script>
+import ylPagination from "@/components/yl-pagination";
+import mcsInfo from "@/views/components/mcs-info.vue";
+import {
+  selectSplerMcsList,
+  insertMcsListToSpdIdAll,
+  insertMcsListPart,
+  selectSplerMcsListTccx
+} from "@/api/consumCataManage-sup/index";
+export default {
+  components: {
+    ylPagination,
+    mcsInfo
+  },
+  props: {
+    synchVisable: {
+      type: Boolean,
+      default: false
+    },
+    institui: {
+      type: Array,
+      default: []
+    },
+    spId: {
+      type: String,
+      default: ""
+    }
+  },
+  data() {
+    return {
+      dialogVisible: false,
+      isFasData: [{ value: "1", name: "是" }, { value: "0", name: "否" }],
+      mcsTypeData: [
+        { value: "0", name: "普通耗材" },
+        { value: "1", name: "高值耗材" },
+        { value: "2", name: "试剂" },
+        { value: "3", name: "总务耗材" }
+      ],
+      SoucData: [{ value: "1", name: "国产" }, { value: "2", name: "进口" }],
+      statusData: [
+        { value: "A", name: "待提交" },
+        { value: "B", name: "已提交" },
+        { value: "C", name: "审核通过" },
+        { value: "R", name: "驳回" }
+      ],
+      instituiData: [],
+      list: [],
+      selectData: [],
+      isPubData: [{ value: "1", name: "是" }, { value: "0", name: "否" }],
+      tranSpId: "",
+      listQuery: {
+        current: 1,
+        size: 10,
+        materialId: "",
+        spec: "",
+        hiCode: "",
+        isFas: "",
+        fasBtch: "",
+        mol: "",
+        prodSouc: "",
+        mcsType: "",
+        matl: "",
+        prodEntp: "",
+        prodName: "",
+        status: "",
+        regcertno: "",
+        isPub: "",
+        spdId: ""
+      }
+    };
+  },
+  methods: {
+    //确定提交数据
+    subMitData() {
+      if (this.listQuery.spdId == "") {
+        this.$message({
+          message: "请选择机构",
+          type: "warning"
+        });
+        return;
+      }
+      insertMcsListPart({
+        insertMcsList: this.selectData,
+        spdId: this.tranSpId
+      }).then(res => {
+        if (res.success == true) {
+          this.$message({
+            message: "操作成功",
+            type: "success"
+          });
+          this.$emit("update:synchVisable", false);
+          this.$refs.mcsTable.clearSelection();
+          this.selectData = [];
+          this.$emit("submit");
+          this.$router.push({
+            name: "consumCataManagement-sup"
+          });
+        }
+      });
+    },
+    handleSelectionChange(val) {
+      this.selectData = val;
+    },
+    //同步所有耗材
+    ynsAllData() {
+      if (this.listQuery.spdId == "") {
+        this.$message({
+          message: "请选择机构",
+          type: "warning"
+        });
+        return;
+      }
+      insertMcsListToSpdIdAll({
+        spdId: this.tranSpId,
+        iniSpdId: this.listQuery.spdId
+      }).then(res => {
+        if (res.success == true) {
+          this.$message({
+            message: "操作成功",
+            type: "success"
+          });
+          this.$emit("update:synchVisable", false);
+          this.$emit("submit");
+          this.$router.push({
+            name: "consumCataManagement-sup"
+          });
+        }
+      });
+    },
+    reset() {
+      this.$refs.listQuery.resetFields();
+      this.getHospConsum();
+      this.$refs.mcsTable.clearSelection();
+      this.selectData = [];
+    },
+    changeSpdId() {
+      this.getHospConsum();
+      this.$refs.mcsTable.clearSelection();
+      this.selectData = [];
+    },
+    getHospConsum() {
+      selectSplerMcsListTccx(this.listQuery)
+        .then(res => {
+          this.list = res.data.records;
+          this.total = res.data.total;
+          this.listLoading = false;
+        })
+        .catch(err => {
+          this.listLoading = false;
+        });
+    },
+    handleClose() {
+      this.dialogVisible = false;
+      this.$emit("update:synchVisable", false);
+      this.$refs.mcsTable.clearSelection();
+      this.selectData = [];
+    }
+  },
+  watch: {
+    synchVisable(newOld) {
+      this.dialogVisible = newOld;
+    },
+    institui(newOld) {
+      this.instituiData = newOld;
+    },
+    spId(newOld) {
+      this.tranSpId = newOld;
+    }
+  }
+};
+</script>
+<style lang="scss" scoped>
+.synch-wrap {
+  padding: 5px;
+  .herder-cont {
+    width: 100%;
+    padding-left: 20px;
+    height: 50px;
+    border-top: 1px solid #ccc;
+    display: flex;
+    align-items: center;
+    justify-content: space-between;
+    .header-left {
+      width: 200px;
+      height: 100%;
+      display: flex;
+      align-items: center;
+    }
+    .header-label {
+      width: 60px;
+      font-weight: bold;
+    }
+  }
+}
+</style>