Procházet zdrojové kódy

Merge branch 'master' of http://172.16.100.139/new-business/drp-web

002390 před 2 roky
rodič
revize
61265e1257

+ 1 - 1
src/api/changeApply/basic.js

@@ -42,7 +42,7 @@ export function getChangeDetails(id) {
 // 获取物料列表信息
 export function getMaterialList(data) {
   return request({
-    url: `/system/material/list`,
+    url: `/system/material/list?pageSize=${data.pageSize}&pageNum=${data.pageNo}`,
     method: 'post',
     data: data
   })

+ 5 - 5
src/api/requisition/basic.js

@@ -42,7 +42,7 @@ export function delReq(id) {
 // 参照-计量单位
 export function getUnit(data) {
   return request({
-    url: `/system/archival/queryUnit`,
+    url: `/system/archival/queryUnit?pageSize=${data.pageSize}&pageNum=${data.pageNo}`,
     method: 'post',
     data: data
   })
@@ -50,7 +50,7 @@ export function getUnit(data) {
 // 参照-产地
 export function getPlace(data) {
   return request({
-    url: `/system/archival/queryOrigin`,
+    url: `/system/archival/queryOrigin?pageSize=${data.pageSize}&pageNum=${data.pageNo}`,
     method: 'post',
     data: data
   })
@@ -58,7 +58,7 @@ export function getPlace(data) {
 // 参照-税类
 export function getTax(data) {
   return request({
-    url: `/system/archival/queryTaxrate`,
+    url: `/system/archival/queryTaxrate?pageSize=${data.pageSize}&pageNum=${data.pageNo}`,
     method: 'post',
     data: data
   })
@@ -66,7 +66,7 @@ export function getTax(data) {
 // 参照-采购员
 export function getStaff(data) {
   return request({
-    url: `/system/archival/queryStaffInfo`,
+    url: `/system/archival/queryStaffInfo?pageSize=${data.pageSize}&pageNum=${data.pageNo}`,
     method: 'post',
     data: data
   })
@@ -74,7 +74,7 @@ export function getStaff(data) {
 // 参照-业务线
 export function getLine(data) {
   return request({
-    url: `/system/archival/queryServiceline`,
+    url: `/system/archival/queryServiceline?pageSize=${data.pageSize}&pageNum=${data.pageNo}`,
     method: 'post',
     data: data
   })

+ 3 - 2
src/api/system/user.js

@@ -127,9 +127,10 @@ export function updateAuthRole(data) {
 }
 
 // 查询部门下拉树结构
-export function deptTreeSelect() {
+export function deptTreeSelect(data) {
   return request({
     url: '/system/user/deptTree',
-    method: 'get'
+    method: 'get',
+    params: data
   })
 }

+ 60 - 189
src/components/PopDialog/dose.vue

@@ -2,7 +2,7 @@
   <div>
     <el-dialog
       title="剂型选择"
-      width="1000px"
+      width="500px"
       :close-on-click-modal="false"
       :append-to-body="true"
       v-dialogDrag
@@ -11,121 +11,27 @@
     >
       <el-container style="height: 500px">
         <el-container>
-          <el-header style="text-align: left; font-size: 12px; height: 30px">
-            <el-form
-              size="small"
-              :inline="true"
-              ref="searchForm"
-              :model="searchForm"
-              @keyup.enter.native="refreshList()"
-              @submit.native.prevent
-            >
-              <el-form-item prop="code">
-                <el-input
-                  size="small"
-                  v-model="searchForm.code"
-                  placeholder="编号"
-                  clearable
-                ></el-input>
-              </el-form-item>
-              <el-form-item prop="name">
+          <el-main>
+            <el-row :gutter="10" class="content">
+              <el-col :span="12">
                 <el-input
+                  placeholder="输入关键字进行过滤"
                   size="small"
-                  v-model="searchForm.name"
-                  placeholder="名称"
-                  clearable
-                ></el-input>
-              </el-form-item>
-              <el-form-item>
-                <el-button
-                  type="primary"
-                  @click="refreshList()"
-                  size="small"
-                  icon="el-icon-search"
-                  >查询</el-button
-                >
-                <el-button
-                  @click="resetSearch()"
-                  size="small"
-                  icon="el-icon-refresh-right"
-                >重置</el-button>
-              </el-form-item>
-            </el-form>
-          </el-header>
-          <el-main>
-            <el-table
-              :data="dataList"
-              v-loading="loading"
-              size="small"
-              border
-              ref="contractTable"
-              @select="handleSelectionChange"
-              height="calc(100% - 40px)"
-              style="width: 100%"
-            >
-              <el-table-column
-                type="selection"
-                header-align="center"
-                align="center"
-                width="50"
-              >
-              </el-table-column>
-              <el-table-column
-                prop="id"
-                header-align="center"
-                align="left"
-                sortable="custom"
-                min-width="90"
-                label="id"
-              >
-              </el-table-column>
-              <el-table-column
-                prop="name"
-                header-align="center"
-                align="left"
-                sortable="custom"
-                min-width="90"
-                label="名称"
-              >
-              </el-table-column>
-              <!-- <el-table-column
-                prop="contractAmount"
-                header-align="center"
-                align="left"
-                sortable="custom"
-                min-width="110"
-                label="合同金额"
-              >
-              </el-table-column>
-              <el-table-column
-                prop="oppositeCompany"
-                header-align="center"
-                align="center"
-                sortable="custom"
-                min-width="110"
-                label="对方单位"
-              >
-              </el-table-column>
-              <el-table-column
-                prop="signDate"
-                header-align="center"
-                align="left"
-                sortable="custom"
-                min-width="110"
-                label="签订时间"
-              >
-              </el-table-column> -->
-            </el-table>
-            <el-pagination
-              @size-change="sizeChangeHandle"
-              @current-change="currentChangeHandle"
-              :current-page="pageNo"
-              :page-sizes="[5, 10, 15, 20]"
-              :page-size="pageSize"
-              :total="total"
-              layout="total, sizes, prev, pager, next, jumper"
-            >
-            </el-pagination>
+                  v-model="filterText">
+                </el-input>
+
+                <el-tree
+                  class="filter-tree"
+                  :data="threedata"
+                  :props="defaultProps"
+                  node-key="id"
+                  highlight-current
+                  @node-click="clickTree"
+                  :filter-node-method="filterNode"
+                  ref="tree">
+                </el-tree>
+              </el-col>
+            </el-row>
           </el-main>
         </el-container>
       </el-container>
@@ -153,100 +59,65 @@ import { getDose } from '@/api/requisition/basic'
 export default {
   data() {
     return {
-      searchForm: {
-        code: '',
-        name: ''
-      },
-      dataListAllSelections: [], // 所有选中的数据包含跨页数据
-      idKey: "id", // 标识列表数据中每一行的唯一键的名称(需要按自己的数据改一下)
-      dataList: [],
-      pageNo: 1,
-      pageSize: 10,
-      total: 0,
-      orders: [],
       loading: false,
       visible: false,
-    };
-  },
-  props: {
-    selectData: {
-      type: Array,
-      default: () => {
-        return [];
+      filterText: '',
+      threedata: [],
+      defaultProps: {
+        children: 'childrens',
+        label: 'name'
       },
-    },
-    // 是否启用单选
-    single: {
-      type: Boolean,
-      default: false
-    }
+      // 判断是否为最末级节点
+      isLast: false,
+      // 选中的节点
+      choosePoint: {}
+    };
   },
+  props: {},
   methods: {
     init() {
       this.visible = true;
       this.$nextTick(() => {
-        this.dataListAllSelections = JSON.parse(JSON.stringify(this.selectData));
-        this.resetSearch();
+        this.refreshList()
       });
     },
     // 获取数据列表
-    refreshList() {
+    refreshList(data) {
       this.loading = true;
-      getDose({
-        pageNo: 1,
-        size: this.pageSize
-      }).then(({ data }) => {
-        console.log('data',data)
-        this.dataList = data.tableBody;
-        this.total = data.tableBody.length;
-        this.pageNo = data.current;
+      getDose({}).then(res => {
+        console.log('res',res)
+        if(res.code === 200) {
+          this.threedata = res.data.tableBody
+        }
         this.loading = false;
-        this.$nextTick(() => {
-          this.setSelectRow();
-        });
       });
     },
-    // 每页数
-    sizeChangeHandle(val) {
-      this.pageSize = val;
-      this.pageNo = 1;
-      this.refreshList();
-    },
-    // 当前页
-    currentChangeHandle(val) {
-      this.pageNo = val;
-      this.refreshList();
-    },
-    // 排序
-    resetSearch() {
-      this.$refs.searchForm.resetFields();
-      this.refreshList();
-    },
-    // 选中数据
-    handleSelectionChange(selection, row) {
-      if (this.single && selection.length > 1) {
-        this.$refs.contractTable.clearSelection();
-        this.$refs.contractTable.toggleRowSelection(row);
+    clickTree(data) {
+      console.log('树形节点信息:',data)
+      if (data.childrens.length == 0) {
+        this.isLast = true
+      } else {
+        this.isLast = false
       }
-      this.dataListAllSelections = this.single ? [row] : selection
+      this.choosePoint = data
     },
-    // 设置选中的方法
-    setSelectRow() {
-      this.$refs.contractTable.clearSelection();
-      if (!this.dataListAllSelections || this.dataListAllSelections.length <= 0) {
-        return;
-      }
-      for (let i = 0; i < this.dataList.length; i++) {
-        if (this.dataListAllSelections.some(item => item[this.idKey] == this.dataList[i][this.idKey])) {
-          // 设置选中,记住table组件需要使用ref="table"
-          this.$refs.contractTable.toggleRowSelection(this.dataList[i], true);
-        }
-      }
+    filterNode(value, data) {
+      console.log('value', value)
+      console.log('data', data)
+        if (!value) return true;
+        return data.label.indexOf(value) !== -1;
     },
     doSubmit() {
-      this.visible = false;
-      console.log('选择的数据?',this.dataListAllSelections)
-      this.$emit("doSubmit", this.dataListAllSelections);
+      if(this.isLast == false) {
+        this.$message({
+          message: '请选择最末级节点',
+          type: 'warning'
+        });
+      } else {
+        console.log('子组件选择的数据',this.choosePoint)
+        this.$emit("doSubmit", this.choosePoint);
+        this.visible = false;
+      }
     },
   },
 };

+ 236 - 0
src/components/PopDialog/dose_bak.vue

@@ -0,0 +1,236 @@
+<template>
+  <div>
+    <el-dialog
+      title="剂型选择"
+      width="1000px"
+      :close-on-click-modal="false"
+      :append-to-body="true"
+      v-dialogDrag
+      class="userDialog"
+      :visible.sync="visible"
+    >
+      <el-container style="height: 500px">
+        <el-container>
+          <el-header style="text-align: left; font-size: 12px; height: 30px">
+            <el-form
+              size="small"
+              :inline="true"
+              ref="searchForm"
+              :model="searchForm"
+              @keyup.enter.native="refreshList()"
+              @submit.native.prevent
+            >
+            <el-form-item prop="param" label="名称/编号" >
+                <el-input
+                  size="small"
+                  v-model="searchForm.param"
+                  placeholder="输入名称/编号查询"
+                  clearable
+                ></el-input>
+              </el-form-item>
+              <el-form-item>
+                <el-button
+                  type="primary"
+                  @click="refreshList()"
+                  size="small"
+                  icon="el-icon-search"
+                  >查询</el-button
+                >
+                <el-button
+                  @click="resetSearch()"
+                  size="small"
+                  icon="el-icon-refresh-right"
+                >重置</el-button>
+              </el-form-item>
+            </el-form>
+          </el-header>
+          <el-main>
+            <el-table
+              :data="dataList"
+              v-loading="loading"
+              size="small"
+              border
+              ref="contractTable"
+              @select="handleSelectionChange"
+              @row-click="rowSelect"
+              height="calc(100% - 40px)"
+              style="width: 100%"
+            >
+              <el-table-column
+                type="selection"
+                header-align="center"
+                align="center"
+                width="50"
+              >
+              </el-table-column>
+              <el-table-column
+                prop="id"
+                header-align="center"
+                align="center"
+                sortable="custom"
+                min-width="90"
+                label="code"
+              >
+              </el-table-column>
+              <el-table-column
+                prop="name"
+                header-align="center"
+                align="center"
+                sortable="custom"
+                min-width="90"
+                label="名称"
+              >
+              </el-table-column>
+            </el-table>
+            <el-pagination
+              @size-change="sizeChangeHandle"
+              @current-change="currentChangeHandle"
+              :current-page="searchForm.pageNo"
+              :page-sizes="[5, 10, 15, 20]"
+              :page-size="searchForm.pageSize"
+              :total="total"
+              layout="total, sizes, prev, pager, next, jumper"
+            >
+            </el-pagination>
+          </el-main>
+        </el-container>
+      </el-container>
+      <span slot="footer" class="dialog-footer">
+        <el-button
+          size="small"
+          @click="visible = false"
+          icon="el-icon-circle-close"
+          >关闭</el-button
+        >
+        <el-button
+          size="small"
+          type="primary"
+          icon="el-icon-circle-check"
+          @click="doSubmit()"
+          >确定</el-button
+        >
+      </span>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+import { getDose } from '@/api/requisition/basic'
+export default {
+  data() {
+    return {
+      searchForm: {
+        param: '',
+        pageNo: 1,
+        pageSize: 10,
+      },
+      dataListAllSelections: [], // 所有选中的数据包含跨页数据
+      idKey: "id", // 标识列表数据中每一行的唯一键的名称(需要按自己的数据改一下)
+      dataList: [],
+      total: 0,
+      orders: [],
+      loading: false,
+      visible: false,
+    };
+  },
+  props: {
+    selectData: {
+      type: Array,
+      default: () => {
+        return [];
+      },
+    },
+    // 是否启用单选
+    single: {
+      type: Boolean,
+      default: false
+    }
+  },
+  methods: {
+    init() {
+      this.visible = true;
+      this.$nextTick(() => {
+        this.dataListAllSelections = JSON.parse(JSON.stringify(this.selectData));
+        this.resetSearch();
+      });
+    },
+    // 获取数据列表
+    refreshList() {
+      this.loading = true;
+      getDose(this.searchForm).then(({ data }) => {
+        console.log('data',data)
+        this.dataList = data.tableBody;
+        this.total = data.total;
+        this.loading = false;
+        this.$nextTick(() => {
+          this.setSelectRow();
+        });
+      });
+    },
+    // 每页数
+    sizeChangeHandle(val) {
+      this.searchForm.pageSize = val;
+      this.refreshList();
+    },
+    // 当前页
+    currentChangeHandle(val) {
+      this.searchForm.pageNo = val;
+      this.refreshList();
+    },
+    // 排序
+    resetSearch() {
+      this.$refs['searchForm'].resetFields();
+      this.searchForm.pageNo = 1;
+      this.refreshList();
+    },
+    // 表格选中数据
+    rowSelect(row, column, event) {
+      this.$refs.contractTable.clearSelection();
+      this.$refs.contractTable.toggleRowSelection(row);
+      this.dataListAllSelections = this.single ? [row] : selection
+    },
+    // 选中数据
+    handleSelectionChange(selection, row) {
+      if (this.single && selection.length > 1) {
+        this.$refs.contractTable.clearSelection();
+        this.$refs.contractTable.toggleRowSelection(row);
+      }
+      this.dataListAllSelections = this.single ? [row] : selection
+    },
+    // 设置选中的方法
+    setSelectRow() {
+      this.$refs.contractTable.clearSelection();
+      if (!this.dataListAllSelections || this.dataListAllSelections.length <= 0) {
+        return;
+      }
+      for (let i = 0; i < this.dataList.length; i++) {
+        if (this.dataListAllSelections.some(item => item[this.idKey] == this.dataList[i][this.idKey])) {
+          // 设置选中,记住table组件需要使用ref="table"
+          this.$refs.contractTable.toggleRowSelection(this.dataList[i], true);
+        }
+      }
+    },
+    doSubmit() {
+      this.visible = false;
+      console.log('选择的数据?',this.dataListAllSelections)
+      this.$emit("doSubmit", this.dataListAllSelections);
+    },
+  },
+};
+</script>
+<style lang="scss">
+.userDialog {
+  .el-dialog__body {
+    padding: 10px 0px 0px 10px;
+    color: #606266;
+    font-size: 14px;
+    word-break: break-all;
+  }
+  .el-main {
+    padding: 20px 20px 5px 20px;
+    .el-pagination {
+      margin-top: 5px;
+    }
+  }
+}
+</style>

+ 11 - 3
src/components/PopDialog/index.vue

@@ -24,7 +24,7 @@
                 <el-input
                   size="small"
                   v-model="searchForm.code"
-                  placeholder="物料编号"
+                  placeholder="请输入物料编号查询"
                   clearable
                 ></el-input>
               </el-form-item>
@@ -32,7 +32,7 @@
                 <el-input
                   size="small"
                   v-model="searchForm.name"
-                  placeholder="物料名称"
+                  placeholder="请输入物料名称查询"
                   clearable
                 ></el-input>
               </el-form-item>
@@ -59,6 +59,7 @@
               size="small"
               border
               ref="contractTable"
+              @row-click="rowSelect"
               @select="handleSelectionChange"
               height="calc(100% - 40px)"
               style="width: 100%"
@@ -200,9 +201,16 @@ export default {
     },
     // 排序
     resetSearch() {
-      this.$refs.searchForm.resetFields();
+      this.$refs['searchForm'].resetFields();
+      this.searchForm.pageNo = 1;
       this.refreshList();
     },
+    // 表格选中数据
+    rowSelect(row, column, event) {
+      this.$refs.contractTable.clearSelection();
+      this.$refs.contractTable.toggleRowSelection(row);
+      this.dataListAllSelections = this.single ? [row] : selection
+    },
     // 选中数据
     handleSelectionChange(selection, row) {
       if (this.single && selection.length > 1) {

+ 23 - 56
src/components/PopDialog/place.vue

@@ -20,19 +20,11 @@
               @keyup.enter.native="refreshList()"
               @submit.native.prevent
             >
-              <el-form-item prop="code">
+            <el-form-item prop="param" label="名称/编号" >
                 <el-input
                   size="small"
-                  v-model="searchForm.code"
-                  placeholder="编号"
-                  clearable
-                ></el-input>
-              </el-form-item>
-              <el-form-item prop="name">
-                <el-input
-                  size="small"
-                  v-model="searchForm.name"
-                  placeholder="名称"
+                  v-model="searchForm.param"
+                  placeholder="输入名称/编号查询"
                   clearable
                 ></el-input>
               </el-form-item>
@@ -60,6 +52,7 @@
               border
               ref="contractTable"
               @select="handleSelectionChange"
+              @row-click="rowSelect"
               height="calc(100% - 40px)"
               style="width: 100%"
             >
@@ -73,7 +66,7 @@
               <el-table-column
                 prop="id"
                 header-align="center"
-                align="left"
+                align="center"
                 sortable="custom"
                 min-width="90"
                 label="id"
@@ -82,46 +75,19 @@
               <el-table-column
                 prop="name"
                 header-align="center"
-                align="left"
+                align="center"
                 sortable="custom"
                 min-width="90"
                 label="名称"
               >
               </el-table-column>
-              <!-- <el-table-column
-                prop="contractAmount"
-                header-align="center"
-                align="left"
-                sortable="custom"
-                min-width="110"
-                label="合同金额"
-              >
-              </el-table-column>
-              <el-table-column
-                prop="oppositeCompany"
-                header-align="center"
-                align="center"
-                sortable="custom"
-                min-width="110"
-                label="对方单位"
-              >
-              </el-table-column>
-              <el-table-column
-                prop="signDate"
-                header-align="center"
-                align="left"
-                sortable="custom"
-                min-width="110"
-                label="签订时间"
-              >
-              </el-table-column> -->
             </el-table>
             <el-pagination
               @size-change="sizeChangeHandle"
               @current-change="currentChangeHandle"
-              :current-page="pageNo"
+              :current-page="searchForm.pageNo"
               :page-sizes="[5, 10, 15, 20]"
-              :page-size="pageSize"
+              :page-size="searchForm.pageSize"
               :total="total"
               layout="total, sizes, prev, pager, next, jumper"
             >
@@ -154,14 +120,13 @@ export default {
   data() {
     return {
       searchForm: {
-        code: '',
-        name: ''
+        param: '',
+        pageNo: 1,
+        pageSize: 10,
       },
       dataListAllSelections: [], // 所有选中的数据包含跨页数据
       idKey: "id", // 标识列表数据中每一行的唯一键的名称(需要按自己的数据改一下)
       dataList: [],
-      pageNo: 1,
-      pageSize: 10,
       total: 0,
       orders: [],
       loading: false,
@@ -192,14 +157,10 @@ export default {
     // 获取数据列表
     refreshList() {
       this.loading = true;
-      getPlace({
-        pageNo: 1,
-        size: this.pageSize
-      }).then(({ data }) => {
+      getPlace(this.searchForm).then(({ data }) => {
         console.log('data',data)
         this.dataList = data.tableBody;
-        this.total = data.tableBody.length;
-        this.pageNo = data.current;
+        this.total = data.total
         this.loading = false;
         this.$nextTick(() => {
           this.setSelectRow();
@@ -208,20 +169,26 @@ export default {
     },
     // 每页数
     sizeChangeHandle(val) {
-      this.pageSize = val;
-      this.pageNo = 1;
+      this.searchForm.pageSize = val;
       this.refreshList();
     },
     // 当前页
     currentChangeHandle(val) {
-      this.pageNo = val;
+      this.searchForm.pageNo = val;
       this.refreshList();
     },
     // 排序
     resetSearch() {
-      this.$refs.searchForm.resetFields();
+      this.$refs['searchForm'].resetFields();
+      this.searchForm.pageNo = 1;
       this.refreshList();
     },
+    // 表格选中数据
+    rowSelect(row, column, event) {
+      this.$refs.contractTable.clearSelection();
+      this.$refs.contractTable.toggleRowSelection(row);
+      this.dataListAllSelections = this.single ? [row] : selection
+    },
     // 选中数据
     handleSelectionChange(selection, row) {
       if (this.single && selection.length > 1) {

+ 9 - 1
src/components/PopDialog/productFactory.vue

@@ -24,7 +24,7 @@
                 <el-input
                   size="small"
                   v-model="searchForm.param"
-                  placeholder="编号"
+                  placeholder="输入名称/编号查询"
                   clearable
                 ></el-input>
               </el-form-item>
@@ -59,6 +59,7 @@
               size="small"
               border
               ref="contractTable"
+              @row-click="rowSelect"
               @select="handleSelectionChange"
               height="calc(100% - 40px)"
               style="width: 100%"
@@ -198,8 +199,15 @@ export default {
     // 排序
     resetSearch() {
       this.$refs['searchForm'].resetFields();
+      this.searchForm.pageNo = 1;
       this.refreshList();
     },
+    // 表格选中数据
+    rowSelect(row, column, event) {
+      this.$refs.contractTable.clearSelection();
+      this.$refs.contractTable.toggleRowSelection(row);
+      this.dataListAllSelections = this.single ? [row] : selection
+    },
     // 选中数据
     handleSelectionChange(selection, row) {
       if (this.single && selection.length > 1) {

+ 25 - 58
src/components/PopDialog/serviceline.vue

@@ -20,19 +20,11 @@
               @keyup.enter.native="refreshList()"
               @submit.native.prevent
             >
-              <el-form-item prop="code">
+            <el-form-item prop="param" label="名称/编号" >
                 <el-input
                   size="small"
-                  v-model="searchForm.code"
-                  placeholder="编号"
-                  clearable
-                ></el-input>
-              </el-form-item>
-              <el-form-item prop="name">
-                <el-input
-                  size="small"
-                  v-model="searchForm.name"
-                  placeholder="名称"
+                  v-model="searchForm.param"
+                  placeholder="输入名称/编号查询"
                   clearable
                 ></el-input>
               </el-form-item>
@@ -60,6 +52,7 @@
               border
               ref="contractTable"
               @select="handleSelectionChange"
+              @row-click="rowSelect"
               height="calc(100% - 40px)"
               style="width: 100%"
             >
@@ -71,57 +64,30 @@
               >
               </el-table-column>
               <el-table-column
-                prop="id"
+                prop="code"
                 header-align="center"
-                align="left"
+                align="center"
                 sortable="custom"
                 min-width="90"
-                label="id"
+                label="code"
               >
               </el-table-column>
               <el-table-column
                 prop="name"
                 header-align="center"
-                align="left"
+                align="center"
                 sortable="custom"
                 min-width="90"
                 label="名称"
               >
               </el-table-column>
-              <!-- <el-table-column
-                prop="contractAmount"
-                header-align="center"
-                align="left"
-                sortable="custom"
-                min-width="110"
-                label="合同金额"
-              >
-              </el-table-column>
-              <el-table-column
-                prop="oppositeCompany"
-                header-align="center"
-                align="center"
-                sortable="custom"
-                min-width="110"
-                label="对方单位"
-              >
-              </el-table-column>
-              <el-table-column
-                prop="signDate"
-                header-align="center"
-                align="left"
-                sortable="custom"
-                min-width="110"
-                label="签订时间"
-              >
-              </el-table-column> -->
             </el-table>
             <el-pagination
               @size-change="sizeChangeHandle"
               @current-change="currentChangeHandle"
-              :current-page="pageNo"
+              :current-page="searchForm.pageNo"
               :page-sizes="[5, 10, 15, 20]"
-              :page-size="pageSize"
+              :page-size="searchForm.pageSize"
               :total="total"
               layout="total, sizes, prev, pager, next, jumper"
             >
@@ -154,14 +120,13 @@ export default {
   data() {
     return {
       searchForm: {
-        code: '',
-        name: ''
+        param: '',
+        pageNo: 1,
+        pageSize: 10,
       },
       dataListAllSelections: [], // 所有选中的数据包含跨页数据
       idKey: "id", // 标识列表数据中每一行的唯一键的名称(需要按自己的数据改一下)
       dataList: [],
-      pageNo: 1,
-      pageSize: 10,
       total: 0,
       orders: [],
       loading: false,
@@ -192,14 +157,10 @@ export default {
     // 获取数据列表
     refreshList() {
       this.loading = true;
-      getLine({
-        pageNo: 1,
-        size: this.pageSize
-      }).then(({ data }) => {
+      getLine(this.searchForm).then(({ data }) => {
         console.log('data',data)
         this.dataList = data.tableBody;
-        this.total = data.tableBody.length;
-        this.pageNo = data.current;
+        this.total = data.total;
         this.loading = false;
         this.$nextTick(() => {
           this.setSelectRow();
@@ -208,20 +169,26 @@ export default {
     },
     // 每页数
     sizeChangeHandle(val) {
-      this.pageSize = val;
-      this.pageNo = 1;
+      this.searchForm.pageSize = val;
       this.refreshList();
     },
     // 当前页
     currentChangeHandle(val) {
-      this.pageNo = val;
+      this.searchForm.pageNo = val;
       this.refreshList();
     },
     // 排序
     resetSearch() {
-      this.$refs.searchForm.resetFields();
+      this.$refs['searchForm'].resetFields();
+      this.searchForm.pageNo = 1;
       this.refreshList();
     },
+    // 表格选中数据
+    rowSelect(row, column, event) {
+      this.$refs.contractTable.clearSelection();
+      this.$refs.contractTable.toggleRowSelection(row);
+      this.dataListAllSelections = this.single ? [row] : selection
+    },
     // 选中数据
     handleSelectionChange(selection, row) {
       if (this.single && selection.length > 1) {

+ 25 - 58
src/components/PopDialog/staff.vue

@@ -20,19 +20,11 @@
               @keyup.enter.native="refreshList()"
               @submit.native.prevent
             >
-              <el-form-item prop="code">
+            <el-form-item prop="param" label="名称/编号" >
                 <el-input
                   size="small"
-                  v-model="searchForm.code"
-                  placeholder="编号"
-                  clearable
-                ></el-input>
-              </el-form-item>
-              <el-form-item prop="name">
-                <el-input
-                  size="small"
-                  v-model="searchForm.name"
-                  placeholder="名称"
+                  v-model="searchForm.param"
+                  placeholder="输入名称/编号查询"
                   clearable
                 ></el-input>
               </el-form-item>
@@ -60,6 +52,7 @@
               border
               ref="contractTable"
               @select="handleSelectionChange"
+              @row-click="rowSelect"
               height="calc(100% - 40px)"
               style="width: 100%"
             >
@@ -71,57 +64,30 @@
               >
               </el-table-column>
               <el-table-column
-                prop="id"
+                prop="code"
                 header-align="center"
-                align="left"
+                align="center"
                 sortable="custom"
                 min-width="90"
-                label="id"
+                label="code"
               >
               </el-table-column>
               <el-table-column
                 prop="name"
                 header-align="center"
-                align="left"
+                align="center"
                 sortable="custom"
                 min-width="90"
                 label="名称"
               >
               </el-table-column>
-              <!-- <el-table-column
-                prop="contractAmount"
-                header-align="center"
-                align="left"
-                sortable="custom"
-                min-width="110"
-                label="合同金额"
-              >
-              </el-table-column>
-              <el-table-column
-                prop="oppositeCompany"
-                header-align="center"
-                align="center"
-                sortable="custom"
-                min-width="110"
-                label="对方单位"
-              >
-              </el-table-column>
-              <el-table-column
-                prop="signDate"
-                header-align="center"
-                align="left"
-                sortable="custom"
-                min-width="110"
-                label="签订时间"
-              >
-              </el-table-column> -->
             </el-table>
             <el-pagination
               @size-change="sizeChangeHandle"
               @current-change="currentChangeHandle"
-              :current-page="pageNo"
+              :current-page="searchForm.pageNo"
               :page-sizes="[5, 10, 15, 20]"
-              :page-size="pageSize"
+              :page-size="searchForm.pageSize"
               :total="total"
               layout="total, sizes, prev, pager, next, jumper"
             >
@@ -154,14 +120,13 @@ export default {
   data() {
     return {
       searchForm: {
-        code: '',
-        name: ''
+        param: '',
+        pageNo: 1,
+        pageSize: 10,
       },
       dataListAllSelections: [], // 所有选中的数据包含跨页数据
       idKey: "id", // 标识列表数据中每一行的唯一键的名称(需要按自己的数据改一下)
       dataList: [],
-      pageNo: 1,
-      pageSize: 10,
       total: 0,
       orders: [],
       loading: false,
@@ -192,14 +157,10 @@ export default {
     // 获取数据列表
     refreshList() {
       this.loading = true;
-      getStaff({
-        pageNo: 1,
-        size: this.pageSize
-      }).then(({ data }) => {
+      getStaff(this.searchForm).then(({ data }) => {
         console.log('data',data)
         this.dataList = data.tableBody;
-        this.total = data.tableBody.length;
-        this.pageNo = data.current;
+        this.total = data.total;
         this.loading = false;
         this.$nextTick(() => {
           this.setSelectRow();
@@ -208,20 +169,26 @@ export default {
     },
     // 每页数
     sizeChangeHandle(val) {
-      this.pageSize = val;
-      this.pageNo = 1;
+      this.searchForm.pageSize = val;
       this.refreshList();
     },
     // 当前页
     currentChangeHandle(val) {
-      this.pageNo = val;
+      this.searchForm.pageNo = val;
       this.refreshList();
     },
     // 排序
     resetSearch() {
-      this.$refs.searchForm.resetFields();
+      this.$refs['searchForm'].resetFields();
+      this.searchForm.pageNo = 1;
       this.refreshList();
     },
+    // 表格选中数据
+    rowSelect(row, column, event) {
+      this.$refs.contractTable.clearSelection();
+      this.$refs.contractTable.toggleRowSelection(row);
+      this.dataListAllSelections = this.single ? [row] : selection
+    },
     // 选中数据
     handleSelectionChange(selection, row) {
       if (this.single && selection.length > 1) {

+ 25 - 58
src/components/PopDialog/tax.vue

@@ -20,19 +20,11 @@
               @keyup.enter.native="refreshList()"
               @submit.native.prevent
             >
-              <el-form-item prop="code">
+            <el-form-item prop="param" label="名称/编号" >
                 <el-input
                   size="small"
-                  v-model="searchForm.code"
-                  placeholder="编号"
-                  clearable
-                ></el-input>
-              </el-form-item>
-              <el-form-item prop="name">
-                <el-input
-                  size="small"
-                  v-model="searchForm.name"
-                  placeholder="名称"
+                  v-model="searchForm.param"
+                  placeholder="输入名称/编号查询"
                   clearable
                 ></el-input>
               </el-form-item>
@@ -60,6 +52,7 @@
               border
               ref="contractTable"
               @select="handleSelectionChange"
+              @row-click="rowSelect"
               height="calc(100% - 40px)"
               style="width: 100%"
             >
@@ -71,57 +64,30 @@
               >
               </el-table-column>
               <el-table-column
-                prop="id"
+                prop="code"
                 header-align="center"
-                align="left"
+                align="center"
                 sortable="custom"
                 min-width="90"
-                label="id"
+                label="code"
               >
               </el-table-column>
               <el-table-column
                 prop="name"
                 header-align="center"
-                align="left"
+                align="center"
                 sortable="custom"
                 min-width="90"
                 label="名称"
               >
               </el-table-column>
-              <!-- <el-table-column
-                prop="contractAmount"
-                header-align="center"
-                align="left"
-                sortable="custom"
-                min-width="110"
-                label="合同金额"
-              >
-              </el-table-column>
-              <el-table-column
-                prop="oppositeCompany"
-                header-align="center"
-                align="center"
-                sortable="custom"
-                min-width="110"
-                label="对方单位"
-              >
-              </el-table-column>
-              <el-table-column
-                prop="signDate"
-                header-align="center"
-                align="left"
-                sortable="custom"
-                min-width="110"
-                label="签订时间"
-              >
-              </el-table-column> -->
             </el-table>
             <el-pagination
               @size-change="sizeChangeHandle"
               @current-change="currentChangeHandle"
-              :current-page="pageNo"
+              :current-page="searchForm.pageNo"
               :page-sizes="[5, 10, 15, 20]"
-              :page-size="pageSize"
+              :page-size="searchForm.pageSize"
               :total="total"
               layout="total, sizes, prev, pager, next, jumper"
             >
@@ -154,14 +120,13 @@ export default {
   data() {
     return {
       searchForm: {
-        code: '',
-        name: ''
+        param: '',
+        pageNo: 1,
+        pageSize: 10,
       },
       dataListAllSelections: [], // 所有选中的数据包含跨页数据
       idKey: "id", // 标识列表数据中每一行的唯一键的名称(需要按自己的数据改一下)
       dataList: [],
-      pageNo: 1,
-      pageSize: 10,
       total: 0,
       orders: [],
       loading: false,
@@ -192,14 +157,10 @@ export default {
     // 获取数据列表
     refreshList() {
       this.loading = true;
-      getTax({
-        pageNo: 1,
-        size: this.pageSize
-      }).then(({ data }) => {
+      getTax(this.searchForm).then(({ data }) => {
         console.log('data',data)
         this.dataList = data.tableBody;
-        this.total = data.tableBody.length;
-        this.pageNo = data.current;
+        this.total = data.total;
         this.loading = false;
         this.$nextTick(() => {
           this.setSelectRow();
@@ -208,20 +169,26 @@ export default {
     },
     // 每页数
     sizeChangeHandle(val) {
-      this.pageSize = val;
-      this.pageNo = 1;
+      this.searchForm.pageSize = val;
       this.refreshList();
     },
     // 当前页
     currentChangeHandle(val) {
-      this.pageNo = val;
+      this.searchForm.pageNo = val;
       this.refreshList();
     },
     // 排序
     resetSearch() {
-      this.$refs.searchForm.resetFields();
+      this.$refs['searchForm'].resetFields();
+      this.searchForm.pageNo = 1;
       this.refreshList();
     },
+    // 表格选中数据
+    rowSelect(row, column, event) {
+      this.$refs.contractTable.clearSelection();
+      this.$refs.contractTable.toggleRowSelection(row);
+      this.dataListAllSelections = this.single ? [row] : selection
+    },
     // 选中数据
     handleSelectionChange(selection, row) {
       if (this.single && selection.length > 1) {

+ 24 - 56
src/components/PopDialog/unit.vue

@@ -20,19 +20,11 @@
               @keyup.enter.native="refreshList()"
               @submit.native.prevent
             >
-              <el-form-item prop="code">
+            <el-form-item prop="param" label="名称/编号" >
                 <el-input
                   size="small"
-                  v-model="searchForm.code"
-                  placeholder="编号"
-                  clearable
-                ></el-input>
-              </el-form-item>
-              <el-form-item prop="name">
-                <el-input
-                  size="small"
-                  v-model="searchForm.name"
-                  placeholder="名称"
+                  v-model="searchForm.param"
+                  placeholder="输入名称/编号查询"
                   clearable
                 ></el-input>
               </el-form-item>
@@ -60,6 +52,7 @@
               border
               ref="contractTable"
               @select="handleSelectionChange"
+              @row-click="rowSelect"
               height="calc(100% - 40px)"
               style="width: 100%"
             >
@@ -73,7 +66,7 @@
               <el-table-column
                 prop="code"
                 header-align="center"
-                align="left"
+                align="center"
                 sortable="custom"
                 min-width="90"
                 label="code"
@@ -82,46 +75,19 @@
               <el-table-column
                 prop="name"
                 header-align="center"
-                align="left"
+                align="center"
                 sortable="custom"
                 min-width="90"
                 label="名称"
               >
               </el-table-column>
-              <!-- <el-table-column
-                prop="contractAmount"
-                header-align="center"
-                align="left"
-                sortable="custom"
-                min-width="110"
-                label="合同金额"
-              >
-              </el-table-column>
-              <el-table-column
-                prop="oppositeCompany"
-                header-align="center"
-                align="center"
-                sortable="custom"
-                min-width="110"
-                label="对方单位"
-              >
-              </el-table-column>
-              <el-table-column
-                prop="signDate"
-                header-align="center"
-                align="left"
-                sortable="custom"
-                min-width="110"
-                label="签订时间"
-              >
-              </el-table-column> -->
             </el-table>
             <el-pagination
               @size-change="sizeChangeHandle"
               @current-change="currentChangeHandle"
-              :current-page="pageNo"
+              :current-page="searchForm.pageNo"
               :page-sizes="[5, 10, 15, 20]"
-              :page-size="pageSize"
+              :page-size="searchForm.pageSize"
               :total="total"
               layout="total, sizes, prev, pager, next, jumper"
             >
@@ -154,14 +120,13 @@ export default {
   data() {
     return {
       searchForm: {
-        code: '',
-        name: ''
+        param: '',
+        pageNo: 1,
+        pageSize: 10,
       },
       dataListAllSelections: [], // 所有选中的数据包含跨页数据
       idKey: "id", // 标识列表数据中每一行的唯一键的名称(需要按自己的数据改一下)
       dataList: [],
-      pageNo: 1,
-      pageSize: 10,
       total: 0,
       orders: [],
       loading: false,
@@ -192,14 +157,10 @@ export default {
     // 获取数据列表
     refreshList() {
       this.loading = true;
-      getUnit({
-        pageNo: 1,
-        size: this.pageSize
-      }).then(({ data }) => {
+      getUnit(this.searchForm).then(({ data }) => {
         console.log('data',data)
         this.dataList = data.tableBody;
-        this.total = data.tableBody.length;
-        this.pageNo = data.current;
+        this.total = data.total;
         this.loading = false;
         this.$nextTick(() => {
           this.setSelectRow();
@@ -208,22 +169,29 @@ export default {
     },
     // 每页数
     sizeChangeHandle(val) {
-      this.pageSize = val;
-      this.pageNo = 1;
+      this.searchForm.pageSize = val;
       this.refreshList();
     },
     // 当前页
     currentChangeHandle(val) {
-      this.pageNo = val;
+      this.searchForm.pageNo = val;
       this.refreshList();
     },
     // 排序
     resetSearch() {
-      this.$refs.searchForm.resetFields();
+      this.$refs['searchForm'].resetFields();
+      this.searchForm.pageNo = 1;
       this.refreshList();
     },
+    // 表格选中数据
+    rowSelect(row, column, event) {
+      this.$refs.contractTable.clearSelection();
+      this.$refs.contractTable.toggleRowSelection(row);
+      this.dataListAllSelections = this.single ? [row] : selection
+    },
     // 选中数据
     handleSelectionChange(selection, row) {
+      console.log('selection11', selection)
       if (this.single && selection.length > 1) {
         this.$refs.contractTable.clearSelection();
         this.$refs.contractTable.toggleRowSelection(row);

+ 8 - 10
src/views/material/requisition/add.vue

@@ -1211,12 +1211,10 @@ export default {
         console.log('res',res)
         if(res.code === 200) {
           this.basicForm = res.data
-          if(res.data.unitId) {
-            this.basicForm.unitId = res.data.unitId.toString()
-            this.basicForm.manufacturerId = res.data.manufacturerId.toString()
-            this.basicForm.usefulLifeUnitId = res.data.usefulLifeUnitId.toString()
-            this.basicForm.expiryUnitId = res.data.expiryUnitId.toString()
-          }
+          if(res.data.unitId) {this.basicForm.unitId = res.data.unitId.toString()}
+          if(res.data.manufacturerId) {this.basicForm.manufacturerId = res.data.manufacturerId.toString()}
+          if(res.data.usefulLifeUnitId) {this.basicForm.usefulLifeUnitId = res.data.usefulLifeUnitId.toString()}
+          if(res.data.expiryUnitId) {this.basicForm.expiryUnitId = res.data.expiryUnitId.toString()}
           if(res.data.sysMaterialMedcineApply) {
             this.basicForm2 = res.data.sysMaterialMedcineApply
           }
@@ -1447,11 +1445,11 @@ export default {
       this.$refs.lines.blur()
       this.$refs.line.init()
     },
-    // 选择剂型
+    // 选择剂型-树形
     acceptDose (selections) {
-      this.doseOptions = selections
-      this.basicForm2.dosageFrom = selections[0].id
-      this.getDoseDetails(selections[0].id)
+      this.doseOptions.push(selections)
+      this.basicForm2.dosageFrom = selections.id
+      this.getDoseDetails(selections.id)
     },
     // 业务线显示列表
     chooseDose () {

+ 2 - 2
src/views/system/user/index.vue

@@ -476,9 +476,9 @@ export default {
         }
       );
     },
-    /** 查询部门下拉树结构 */
+    /** 查询部门下拉树结构 status:0过滤屌树形里停用的*/
     getDeptTree() {
-      deptTreeSelect().then(response => {
+      deptTreeSelect({status: 0}).then(response => {
         this.deptOptions = response.data;
       });
     },

+ 3 - 2
vue.config.js

@@ -37,11 +37,12 @@ module.exports = {
       // detail: https://cli.vuejs.org/config/#devserver-proxy
       [process.env.VUE_APP_BASE_API]: {
         // target: `http://172.16.100.107:8080/drp-admin`, //测试
-        // target: `http://test-sy.derom.com/drp-admin`, //测试1
+        target: `http://test-sy.derom.com/drp-admin`, //测试
+        // target: `http://sy.derom.com/drp-admin`, //生产
         // target: `http://172.16.63.202:8000/drp-admin`, // D本地
         // target: `http://172.16.62.241:8000/drp-admin`, //笑寒本地
         // target: `http://172.16.13.152:8000/drp-admin`, //豪哥本地
-        target: `http://172.16.13.47:8000/drp-admin`, //石杨本地
+        // target: `http://172.16.13.47:8000/drp-admin`, //石杨本地
         // target: `http://172.16.13.113:8000/drp-admin`, //DWT本地
         changeOrigin: true,
         pathRewrite: {