فهرست منبع

fix(质管) 经营范围

liu1tian 10 ماه پیش
والد
کامیت
bc070c2f80

+ 34 - 0
src/api/qualityControl/qualityControl.js

@@ -73,4 +73,38 @@ export function getLicenseType() {
     url: '/mk/zj/zjLicenseInfo/getLicenseType',
     method: 'get'
   })
+}
+
+
+// 查询证件经营范围类别
+export function getTreeA() {
+  return request({
+    url: '/mk/zj/zjLicenseInfo/getCategoryList',
+    method: 'get'
+  })
+}
+
+// 查询证件经营范围剂型
+export function getTreeB() {
+  return request({
+    url: '/mk/zj/zjLicenseInfo/getDosageFormNewList',
+    method: 'get'
+  })
+}
+
+// 查询证件经营范围物料类别
+export function getTreeC() {
+  return request({
+    url: '/mk/zj/zjLicenseInfo/getProductCategoryList',
+    method: 'get'
+  })
+}
+
+// 查询证件经营范围药品物料
+export function getMedicineList(data) {
+  return request({
+    url: '/mk/zj/zjLicenseInfo/getMedicineList',
+    method: 'post',
+    data: data
+  })
 }

+ 2 - 2
src/views/qualityControl/approval.vue

@@ -113,7 +113,7 @@
         queryParams: {
           pageNum: 1,
           pageSize: 10,
-          status: 0,
+          serviceState: 0,
           companyAttributes: null,
           companyName: null,
           licenseType: null,
@@ -167,7 +167,7 @@
       // 表单重置
       reset() {
         this.form = {
-          status: 0,
+          serviceState: 0,
           companyAttributes: null,
           companyName: null,  
           licenseType: null,

+ 2 - 2
src/views/qualityControl/approved.vue

@@ -108,7 +108,7 @@
         queryParams: {
           pageNum: 1,
           pageSize: 10,
-          status: 1,
+          serviceState: 1,
           companyAttributes: null,
           companyName: null,
           licenseType: null,
@@ -162,7 +162,7 @@
       // 表单重置
       reset() {
         this.form = {
-          status: 1,
+          serviceState: 1,
           companyAttributes: null,
           companyName: null,  
           licenseType: null,

+ 255 - 4
src/views/qualityControl/gysDetail.vue

@@ -198,7 +198,9 @@
                     label="编码"
                     width="360">
                         <template slot-scope="scope">
-                            <el-input v-model="scope.row.code" placeholder="请输入编码" :disabled="isFlag"></el-input>
+                            <el-input v-model="scope.row.code" placeholder="请输入编码" :disabled="isFlag">
+                                <el-button slot="append" icon="el-icon-search" @click="tabTc(scope.row.scopeLevel,scope.$index)"></el-button>
+                            </el-input>
                         </template>
                     </el-table-column>
                     <el-table-column
@@ -234,6 +236,90 @@
         </el-form> 
 
         <el-dialog
+            title="类别"
+            :visible.sync="tabA"
+            :before-close="handleClose">
+            <el-input
+                placeholder="输入关键字进行过滤"
+                size="mini"
+                v-model="filterTextA">
+            </el-input>
+            <el-tree
+                class="filter-tree"
+                :data="dataA"
+                :props="defaultPropsA"
+                node-key="id"
+                @node-click="clickTreeA"
+                highlight-current
+                :default-expanded-keys="defaultExpandedA"
+                :filter-node-method="filterNodeA"
+                ref="treeA">
+            </el-tree>
+            <span style="margin-right: 4px;"> 
+                <el-button @click="canclTabA" >取 消</el-button>
+                <el-button type="primary" @click="submitTabA" >确 定</el-button>
+            </span>
+        </el-dialog>
+
+        <el-dialog
+            title="剂型"
+            :visible.sync="tabB"
+            :before-close="handleClose">
+            <el-input
+                placeholder="输入关键字进行过滤"
+                size="mini"
+                v-model="filterTextB">
+            </el-input>
+            <el-tree
+                class="filter-tree"
+                :data="dataB"
+                :props="defaultPropsB"
+                node-key="id"
+                @node-click="clickTreeB"
+                highlight-current
+                :default-expanded-keys="defaultExpandedB"
+                :filter-node-method="filterNodeB"
+                ref="treeB">
+            </el-tree>
+            <span style="margin-right: 4px;"> 
+                <el-button @click="canclTabB" >取 消</el-button>
+                <el-button type="primary" @click="submitTabB" >确 定</el-button>
+            </span>
+        </el-dialog>
+
+        <el-dialog
+            title="物料"
+            :visible.sync="tabC"
+            :before-close="handleClose"
+            width="86%">
+            <el-row :gutter="20" > 
+                <el-col :span="6" style="border-right: 1px solid #e9e9e9">
+                    <el-input
+                        placeholder="输入关键字进行过滤"
+                        size="mini"
+                        v-model="filterTextC">
+                    </el-input>
+                    <el-tree
+                        class="filter-tree"
+                        :data="dataC"
+                        :props="defaultPropsC"
+                        node-key="id"
+                        @node-click="clickTreeC"
+                        highlight-current
+                        :default-expanded-keys="defaultExpandedC"
+                        :filter-node-method="filterNodeC"
+                        ref="treeC">
+                    </el-tree>
+                </el-col>
+                <el-col :span="18">
+                    <Medicine :manageClass="dataFromParent" @send="handleEvent">
+                    </Medicine>
+                </el-col>
+        </el-row>
+            
+        </el-dialog>
+
+        <el-dialog
             title="文件上传"
             :visible.sync="dialogVisible"
             width="30%"
@@ -257,13 +343,43 @@
 </template>
   
 <script>
+  import Medicine from "@/views/qualityControl/medicine.vue";
+  import Treeselect from "@riophae/vue-treeselect";
+  import "@riophae/vue-treeselect/dist/vue-treeselect.css";
   import axios from 'axios';
   import { getToken } from '@/utils/auth';
-  import { zjCompanyInfo, byCompanyCode, zjLicenseInfo, byLicenseId, upload, addOrEdit, getLicenseType } from "@/api/qualityControl/qualityControl";
+  import { zjCompanyInfo, byCompanyCode, zjLicenseInfo, byLicenseId, upload, addOrEdit, getLicenseType, getTreeA, getTreeB, getTreeC } from "@/api/qualityControl/qualityControl";
 export default {
     name: "qualityControlDetail",
+    components: {
+        Treeselect,
+        Medicine
+    },
     data() {
       return {
+        dataFromParent: '',
+        filterTextA: "",
+        filterTextB: "",
+        filterTextC: "",
+        dataA: [],
+        dataB: [],
+        dataC: [],
+        defaultPropsA: {
+            children: "childrens",
+            label: "name",
+        },
+        defaultPropsB: {
+            children: "childrens",
+            label: "name",
+        },
+        defaultPropsC: {
+            children: "childrens",
+            label: "name",
+        },
+        defaultExpandedA: [],
+        defaultExpandedB: [],
+        defaultExpandedC: [],
+
         key:'53cfd89363924f95b75b7221b6d0bfe3',
         endpoint:'https://zhiguan.cognitiveservices.azure.cn/',
         imgs: '',
@@ -312,10 +428,24 @@ export default {
         companyCode: '',
         licenseNumber: '',
         fileList: [],
+        tabA: false,
+        tabB: false,
+        tabC: false,
+        thisIndex: '',
+        key1: '',
+        node1:'',
       };
     },
     watch: {
-        
+        filterTextA(val) {
+            this.$refs.treeA.filter(val);
+        },
+        filterTextB(val) {
+            this.$refs.treeB.filter(val);
+        },
+        filterTextC(val) {
+            this.$refs.treeC.filter(val);
+        },
     },
     created() {
         this.companyCode = this.$route.query.companyCode;
@@ -361,7 +491,126 @@ export default {
         });
     },
     methods: {
-       
+        handleEvent(arg1, arg2){
+            if(arg1!=''){
+                this.$set(this.tableData[this.thisIndex], 'code', arg1);
+                this.$set(this.tableData[this.thisIndex], 'name', arg2);
+            }
+            this.tabC = false;
+        },
+        canclTabA(){
+            this.node1 = '';
+            this.key1 = '';
+            this.tabA = false;
+        },
+        submitTabA(){
+            this.$set(this.tableData[this.thisIndex], 'code', this.key1);
+            this.$set(this.tableData[this.thisIndex], 'name', this.node1);
+            this.node1 = '';
+            this.key1 = '';
+            this.tabA = false;
+        },
+        canclTabB(){
+            this.node1 = '';
+            this.key1 = '';
+            this.tabB = false;
+        },
+        submitTabB(){
+            this.$set(this.tableData[this.thisIndex], 'code', this.key1);
+            this.$set(this.tableData[this.thisIndex], 'name', this.node1);
+            this.node1 = '';
+            this.key1 = '';
+            this.tabB = false;
+        },
+        canclTabC(){
+            this.tabC = false;
+        },
+        submitTabC(){
+            this.tabC = false;
+        },
+        // 获取树形结构
+        getTreeDataA() {
+              getTreeA({}).then((res) => {
+                
+                  let { code, data } = res;
+                  console.log("A:::" + JSON.stringify(data))
+                  if (code === 200) {
+                      this.dataA = data;
+                  }
+              });
+          },
+          // 获取树形结构
+        getTreeDataB() {
+              getTreeB({}).then((res) => {
+                  let { code, data } = res;
+                  if (code === 200) {
+                      this.dataB = data;
+                  }
+              });
+          },
+          getTreeDataC() {
+              getTreeC({}).then((res) => {
+                  let { code, data } = res;
+                  if (code === 200) {
+                      this.dataC = data;
+                  }
+              });
+          },
+          clickTreeA(data, node) {
+            this.key1 = node.key;
+            this.node1 = node.label;
+            //   this.$set(this.tableData[this.thisIndex], 'code', node.key);
+            //   this.$set(this.tableData[this.thisIndex], 'name', node.label);
+          },
+          clickTreeB(data, node) {
+            this.key1 = node.key;
+            this.node1 = node.label;
+            //   this.$set(this.tableData[this.thisIndex], 'code', node.key);
+            //   this.$set(this.tableData[this.thisIndex], 'name', node.label);
+          },
+          clickTreeC(data, node) {
+              
+              this.dataFromParent = data.id;
+          },
+          filterNodeA(value, data) {
+              if (!value) return true;
+              return (
+                  data.name.indexOf(value) !== -1 ||
+                  data.code.indexOf(value) !== -1
+              );
+          },
+          filterNodeB(value, data) {
+              if (!value) return true;
+              return (
+                  data.name.indexOf(value) !== -1 ||
+                  data.code.indexOf(value) !== -1
+              );
+          },
+          filterNodeC(value, data) {
+              if (!value) return true;
+              return (
+                  data.name.indexOf(value) !== -1 ||
+                  data.code.indexOf(value) !== -1
+              );
+          },
+        tabTc(val,index){
+            if(val == '1'){
+                this.thisIndex = index;
+                this.tabA = true;
+                this.getTreeDataA();
+            }
+            if(val == '2'){
+                this.thisIndex = index;
+                this.tabB = true;
+                this.getTreeDataB();
+            }
+            if(val == '3'){
+                this.thisIndex = index;
+                this.tabC = true;
+                this.dataFromParent = '';
+                this.getTreeDataC();
+            }
+        },
          // 修改时自定义上传方法
         handleFileUpload(params){
             let newfile=params.file
@@ -405,6 +654,8 @@ export default {
         handleClose(done) {
             this.$confirm('确认关闭?')
             .then(_ => {
+                this.node1 = '';
+            this.key1 = '';
                 done();
             })
             .catch(_ => {});

+ 163 - 0
src/views/qualityControl/medicine.vue

@@ -0,0 +1,163 @@
+<template>
+    <div class="app-container">
+      <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
+
+        
+        <el-form-item label="物料编码" prop="code">
+          <el-input
+            v-model="queryParams.code"
+            placeholder="物料编码"
+            clearable
+            @keyup.enter.native="handleQuery"
+          />
+        </el-form-item>
+        <el-form-item>
+          <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
+          <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
+        </el-form-item>
+      </el-form>
+  
+      <el-table v-loading="loading" :data="infoList" @current-change="handleSelectionChange" highlight-current-row>
+        <el-table-column
+          type="index"
+          width="50">
+        </el-table-column>
+        <el-table-column label="物料编码" align="center" prop="code" />
+        <el-table-column label="物料名称" align="center" prop="name" />
+        <el-table-column label="生产厂商" align="center" prop="manufacturer" />
+      </el-table>
+      
+      <pagination
+        v-show="total>0"
+        :total="total"
+        :page.sync="queryParams.pageNum"
+        :limit.sync="queryParams.pageSize"
+        @pagination="getList"
+      />
+      <div>
+                  <el-button @click="canclTabC" >取 消</el-button>
+                  <el-button type="primary" @click="submitTabC" >确 定</el-button>
+            </div>
+    </div>
+  </template>
+  
+  <script>
+  import { getMedicineList } from "@/api/qualityControl/qualityControl.js";
+  
+  export default {
+    name: "Info",
+    data() {
+      return {
+        code: '',
+        name: '',
+        // 遮罩层
+        loading: true,
+        // 选中数组
+        ids: [],
+        // 非单个禁用
+        single: true,
+        // 非多个禁用
+        multiple: true,
+        // 显示搜索条件
+        showSearch: true,
+        // 总条数
+        total: 0,
+        // 合作企业证照表格数据
+        infoList: [],
+        // 弹出层标题
+        title: "",
+        // 是否显示弹出层
+        open: false,
+        // 查询参数
+        queryParams: {
+          pageNum: 1,
+          pageSize: 10,
+          code: '',
+          manageClass: '',
+        },
+        // 表单参数
+        form: {},
+        // 表单校验
+        rules: {
+        }
+      };
+    },
+    props: {
+        manageClass: String
+    },
+    watch: {
+        manageClass(newValue, oldValue) {
+            this.$set(this.queryParams,'manageClass',newValue)
+            this.getList()
+        },
+        immediate: true,
+        deep: true,
+    },
+    mounted() {
+      this.code = '';
+      this.name = '';
+      this.getList();
+    },
+    methods: {
+      canclTabC(){
+        this.$emit('send', '', '');
+        this.code = '';
+        this.name = '';
+        this.getList();
+      },
+      submitTabC(){
+        this.$emit('send', this.code, this.name);
+        this.code = '';
+        this.name = '';
+        this.getList();
+      },
+      // 单选框选中数据
+      handleSelectionChange(selection) {
+        this.code = selection.code;
+        this.name = selection.name;
+      },
+      /** 查询合作企业证照列表 */
+      getList() {
+        this.loading = true;
+        getMedicineList(this.queryParams).then(response => {
+          this.infoList = response.rows;
+          this.total = response.total;
+          this.loading = false;
+        });
+      },
+      // 取消按钮
+      cancel() {
+        this.open = false;
+        this.reset();
+      },
+      // 表单重置
+      reset() {
+        this.queryParams = {
+          code: '',
+          manageClass: '',
+        };
+        this.resetForm("queryParams");
+      },
+      /** 搜索按钮操作 */
+      handleQuery() {
+        this.queryParams.manageClass = 1;
+        this.queryParams.manageClass = 1;
+        this.queryParams.pageNum = 1;
+        this.queryParams = {
+          code: '',
+          manageClass: '',
+          pageNum: 1
+        };
+        this.getList();
+      },
+      /** 重置按钮操作 */
+      resetQuery() {
+        this.resetForm("queryForm");
+        this.handleQuery();
+      },
+    }
+  };
+  </script>
+  <style>
+
+</style>