Преглед изворни кода

Merge remote-tracking branch 'origin/master'

姚斌 пре 1 година
родитељ
комит
e2be417fa9
24 измењених фајлова са 3151 додато и 2 уклоњено
  1. 1 1
      itdmWeb/.env.development
  2. 17 1
      itdmWeb/src/api/api.js
  3. 225 0
      itdmWeb/src/views/module-iTDM/inventory/ItdmInventoryBarcodeList.vue
  4. 197 0
      itdmWeb/src/views/module-iTDM/inventory/ItdmInventoryLogList.vue
  5. 364 0
      itdmWeb/src/views/module-iTDM/inventory/ItdmSampleClassificationList.vue
  6. 221 0
      itdmWeb/src/views/module-iTDM/inventory/ItdmSampleExpireList.vue
  7. 200 0
      itdmWeb/src/views/module-iTDM/inventory/ItdmSampleExpireList1.vue
  8. 223 0
      itdmWeb/src/views/module-iTDM/inventory/ItdmSampleExpireRealList.vue
  9. 226 0
      itdmWeb/src/views/module-iTDM/inventory/ItdmSampleInventoryList.vue
  10. 124 0
      itdmWeb/src/views/module-iTDM/inventory/modules/ItdmInventoryLogForm.vue
  11. 84 0
      itdmWeb/src/views/module-iTDM/inventory/modules/ItdmInventoryLogModal.Style#Drawer.vue
  12. 66 0
      itdmWeb/src/views/module-iTDM/inventory/modules/ItdmInventoryLogModal.vue
  13. 159 0
      itdmWeb/src/views/module-iTDM/inventory/modules/ItdmSampleClassificationModal.vue
  14. 146 0
      itdmWeb/src/views/module-iTDM/inventory/modules/ItdmSampleExpireForm.vue
  15. 111 0
      itdmWeb/src/views/module-iTDM/inventory/modules/ItdmSampleExpireForm1.vue
  16. 84 0
      itdmWeb/src/views/module-iTDM/inventory/modules/ItdmSampleExpireModal.Style#Drawer.vue
  17. 62 0
      itdmWeb/src/views/module-iTDM/inventory/modules/ItdmSampleExpireModal.vue
  18. 62 0
      itdmWeb/src/views/module-iTDM/inventory/modules/ItdmSampleExpireModal1.vue
  19. 114 0
      itdmWeb/src/views/module-iTDM/inventory/modules/ItdmSampleExpireRealForm.vue
  20. 84 0
      itdmWeb/src/views/module-iTDM/inventory/modules/ItdmSampleExpireRealModal.Style#Drawer.vue
  21. 60 0
      itdmWeb/src/views/module-iTDM/inventory/modules/ItdmSampleExpireRealModal.vue
  22. 177 0
      itdmWeb/src/views/module-iTDM/inventory/modules/ItdmSampleInventoryForm.vue
  23. 84 0
      itdmWeb/src/views/module-iTDM/inventory/modules/ItdmSampleInventoryModal.Style#Drawer.vue
  24. 60 0
      itdmWeb/src/views/module-iTDM/inventory/modules/ItdmSampleInventoryModal.vue

+ 1 - 1
itdmWeb/.env.development

@@ -1,5 +1,5 @@
 NODE_ENV=development
-VUE_APP_API_BASE_URL=http://10.10.0.106:8082/itdmServer
+VUE_APP_API_BASE_URL=http://127.0.0.1:8081/itdmServer
 VUE_APP_CAS_BASE_URL=http://cas.example.org:8443/cas
 VUE_APP_ONLINE_BASE_URL=http://fileview.jeecg.com/onlinePreview
 

+ 17 - 1
itdmWeb/src/api/api.js

@@ -67,6 +67,10 @@ const queryDeptRolePermission = (params)=>getAction("/sys/sysDepartPermission/qu
 const saveDeptRolePermission = (params)=>postAction("/sys/sysDepartPermission/saveDeptRolePermission",params);
 const queryMyDepartTreeList = (params)=>getAction("/sys/sysDepart/queryMyDeptTreeList",params);
 
+//入库的样品条码下拉列表
+const rukuSampleBarcodeList = (params) => getAction('/inventory/itdmInventoryBarcode/xialaList', params);
+//样品过期审核
+const sampleExpireSH = (params) => putAction('/inventory/itdmSampleExpire/shenhe', params);
 // 委托完成判断
 const checkWancheng = (params) => putAction('/weituo/itdmWeituoInfo/edit1', params);
 // 设备故障判断
@@ -152,6 +156,13 @@ const downWeituo_info= (params)=>downFile("weituo/itdmWeituoInfo/word",params);
 
 
 
+
+const updateBarcode = (params)=>postAction("/inventory/itdmInventoryBarcode/edit",params);
+const createBarcode = (params)=>postAction("/inventory/itdmInventoryBarcode/add",params);
+const deleteBarcode   = (params)=>deleteAction("/inventory/itdmInventoryBarcode/delete",params);
+
+
+
 // 中转HTTP请求
 export const transitRESTful = {
   get: (url, parameter) => getAction(getTransitURL(url), parameter),
@@ -243,7 +254,12 @@ export {
   upload,
   getUpload,
   downWeituo_info,
-  checkWancheng
+  checkWancheng,
+  updateBarcode,
+  createBarcode,
+  deleteBarcode,
+  sampleExpireSH,
+  rukuSampleBarcodeList
 }
 
 

+ 225 - 0
itdmWeb/src/views/module-iTDM/inventory/ItdmInventoryBarcodeList.vue

@@ -0,0 +1,225 @@
+<template>
+  <a-modal
+    :width="width"
+    ref="modal"
+    :visible="visible"
+    @ok="ok"
+    @cancel="handleCancel"
+  >
+
+    <a-card :bordered="false">
+      <!-- 查询区域 -->
+      <div class="table-page-search-wrapper">
+        <a-form layout="inline" @keyup.enter.native="searchQuery">
+          <a-row :gutter="24">
+          </a-row>
+        </a-form>
+      </div>
+      <!-- 查询区域-END -->
+
+      <!-- 操作按钮区域 -->
+      <div class="table-operator">
+        <a-button @click="createBarCode" type="primary" icon="plus">生成</a-button>
+
+      </div>
+
+      <!-- table区域-begin -->
+      <div>
+
+
+        <a-table
+          ref="table"
+          size="middle"
+          :scroll="{x:true}"
+          bordered
+          rowKey="id"
+          :columns="columns"
+          :dataSource="dataSource"
+          :pagination="ipagination"
+          :loading="loading"
+          :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
+          class="j-table-force-nowrap"
+          @change="handleTableChange">
+
+
+          <template slot="changeSwitch" slot-scope="text,record">
+
+
+            <a-switch :checked="record.disableStatus==='0'" @change="onChange(record)" />
+
+
+          </template>
+
+          <template slot="htmlSlot" slot-scope="text">
+            <div v-html="text"></div>
+          </template>
+          <template slot="imgSlot" slot-scope="text,record">
+            <span v-if="!text" style="font-size: 12px;font-style: italic;">无图片</span>
+            <img v-else :src="getImgView(text)" :preview="record.id" height="25px" alt=""
+                 style="max-width:80px;font-size: 12px;font-style: italic;" />
+          </template>
+          <template slot="fileSlot" slot-scope="text">
+            <span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span>
+            <a-button
+              v-else
+              :ghost="true"
+              type="primary"
+              icon="download"
+              size="small"
+              @click="downloadFile(text)">
+              下载
+            </a-button>
+          </template>
+
+          <span slot="action" slot-scope="text, record">
+            <a-popconfirm title="确定删除吗?" @confirm="() => deleteBarcode(record.id)">
+                  <a>删除</a>
+                </a-popconfirm>
+
+
+        </span>
+
+        </a-table>
+      </div>
+
+    </a-card>
+  </a-modal>
+</template>
+
+
+<script>
+
+import '@/assets/less/TableExpand.less'
+import { mixinDevice } from '@/utils/mixin'
+import { JeecgListMixin } from '@/mixins/JeecgListMixin'
+import { createBarcode, deleteBarcode, updateBarcode } from '@api/api'
+
+export default {
+  name: 'ItdmInventoryBarcodeList',
+  mixins: [JeecgListMixin, mixinDevice],
+
+  data() {
+    return {
+      id: null,
+      visible: false,
+      width: 1200,
+      description: '库存条码管理页面',
+      // 表头
+      columns: [
+        {
+          title: '#',
+          dataIndex: '',
+          key: 'rowIndex',
+          width: 60,
+          align: 'center',
+          customRender: function(t, r, index) {
+            return parseInt(index) + 1
+          }
+        },
+        {
+          title: '条码',
+          align: 'center',
+          dataIndex: 'barCode'
+        },
+        {
+          title: '状态',
+          align: 'center',
+          dataIndex: 'disableStatus',
+          scopedSlots: { customRender: 'changeSwitch' }
+
+        },
+        {
+          title: '数量',
+          align: 'center',
+          dataIndex: 'num'
+        },
+        {
+          title: '当前使用状态',
+          align: 'center',
+          dataIndex: 'useStatus_dictText'
+        },
+        {
+          title: '操作',
+          dataIndex: 'action',
+          align: 'center',
+          fixed: 'right',
+          width: 147,
+          scopedSlots: { customRender: 'action' }
+        }
+      ],
+      url: {
+        list: '/inventory/itdmInventoryBarcode/list',
+        delete: '/inventory/itdmInventoryBarcode/delete',
+        deleteBatch: '/inventory/itdmInventoryBarcode/deleteBatch',
+        exportXlsUrl: '/inventory/itdmInventoryBarcode/exportXls',
+        importExcelUrl: 'inventory/itdmInventoryBarcode/importExcel'
+
+      },
+      dictOptions: {}
+
+    }
+  },
+  created() {
+
+  },
+  computed: {
+    importExcelUrl: function() {
+      return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`
+    }
+  },
+  methods: {
+    handleCancel() {
+      this.visible = false
+
+    },
+    ok() {
+      this.visible = false
+
+    },
+    createBarCode() {
+      createBarcode({ inventoryId: this.id }).then(response => {
+        console.log(response)
+        if (!response.success) {
+          this.$message.warning(response.message)
+        }
+        this.init(this.id)
+      })
+
+    },
+    deleteBarcode(id) {
+      deleteBarcode({ id: id }).then(response => {
+        if (!response.success) {
+          this.$message.warning(response.message)
+        }
+        this.init(this.id)
+
+      })
+    },
+    onChange(r) {
+      r.disableStatus = r.disableStatus === '1' ? '0' : '1'
+      updateBarcode({ id: r.id, disableStatus: r.disableStatus }).then(response => {
+        if (!response.success) {
+          this.$message.warning(response.message)
+        }
+        this.init(this.id)
+
+      })
+
+    },
+
+    init(id) {
+      console.log('xxxxxxxxxxxxxxxxx')
+      this.visible = true
+      this.queryParam.inventoryId = id
+      this.id = id
+      this.searchQuery()
+
+    },
+    initDictConfig() {
+    }
+  }
+}
+</script>
+<style scoped>
+@import '~@assets/less/common.less';
+</style>

+ 197 - 0
itdmWeb/src/views/module-iTDM/inventory/ItdmInventoryLogList.vue

@@ -0,0 +1,197 @@
+<template>
+  <a-card :bordered="false">
+    <!-- 查询区域 -->
+    <div class="table-page-search-wrapper">
+      <a-form layout="inline" @keyup.enter.native="searchQuery">
+        <a-row :gutter="24">
+        </a-row>
+      </a-form>
+    </div>
+    <!-- 查询区域-END -->
+
+    <!-- 操作按钮区域 -->
+    <div class="table-operator">
+      <a-button @click="handle1" type="primary" icon="plus">入库</a-button>
+      <a-button @click="handle2" type="primary" icon="plus">出库</a-button>
+
+
+    </div>
+
+    <!-- table区域-begin -->
+    <div>
+
+
+      <a-table
+        ref="table"
+        size="middle"
+        :scroll="{x:true}"
+        bordered
+        rowKey="id"
+        :columns="columns"
+        :dataSource="dataSource"
+        :pagination="ipagination"
+        :loading="loading"
+        :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
+        class="j-table-force-nowrap"
+        @change="handleTableChange">
+
+        <template slot="htmlSlot" slot-scope="text">
+          <div v-html="text"></div>
+        </template>
+        <template slot="imgSlot" slot-scope="text,record">
+          <span v-if="!text" style="font-size: 12px;font-style: italic;">无图片</span>
+          <img v-else :src="getImgView(text)" :preview="record.id" height="25px" alt=""
+               style="max-width:80px;font-size: 12px;font-style: italic;" />
+        </template>
+        <template slot="fileSlot" slot-scope="text">
+          <span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span>
+          <a-button
+            v-else
+            :ghost="true"
+            type="primary"
+            icon="download"
+            size="small"
+            @click="downloadFile(text)">
+            下载
+          </a-button>
+        </template>
+
+        <span slot="action" slot-scope="text, record">
+          <a @click="handleEdit(record)">编辑</a>
+
+          <a-divider type="vertical" />
+          <a-dropdown>
+            <a class="ant-dropdown-link">更多 <a-icon type="down" /></a>
+            <a-menu slot="overlay">
+              <a-menu-item>
+                <a @click="handleDetail(record)">详情</a>
+              </a-menu-item>
+              <a-menu-item>
+                <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
+                  <a>删除</a>
+                </a-popconfirm>
+              </a-menu-item>
+            </a-menu>
+          </a-dropdown>
+        </span>
+
+      </a-table>
+    </div>
+
+    <itdm-inventory-log-modal ref="modalForm" @ok="modalFormOk"></itdm-inventory-log-modal>
+  </a-card>
+</template>
+
+<script>
+
+import '@/assets/less/TableExpand.less'
+import { mixinDevice } from '@/utils/mixin'
+import { JeecgListMixin } from '@/mixins/JeecgListMixin'
+import ItdmInventoryLogModal from './modules/ItdmInventoryLogModal'
+
+export default {
+  name: 'ItdmInventoryLogList',
+  mixins: [JeecgListMixin, mixinDevice],
+  components: {
+    ItdmInventoryLogModal
+  },
+  data() {
+    return {
+      description: '库存日志管理页面',
+      // 表头
+      columns: [
+        {
+          title: '#',
+          dataIndex: '',
+          key: 'rowIndex',
+          width: 60,
+          align: 'center',
+          customRender: function(t, r, index) {
+            return parseInt(index) + 1
+          }
+        },
+        {
+          title: '类型(入库、出库)',
+          align: 'center',
+          dataIndex: 'type_dictText'
+        },
+        {
+          title: '条码',
+          align: 'center',
+          dataIndex: 'barCode'
+        },
+        {
+          title: '样品名称',
+          align: 'center',
+          dataIndex: 'inventoryId_dictText'
+        },
+        {
+          title: '数量 用来同步',
+          align: 'center',
+          dataIndex: 'num'
+        },
+        {
+          title: '使用人员',
+          align: 'center',
+          dataIndex: 'useBy_dictText'
+        },
+        {
+          title: '使用时间',
+          align: 'center',
+          dataIndex: 'useTime'
+        },
+        {
+          title: '备注',
+          align: 'center',
+          dataIndex: 'remark'
+        }
+        // {
+        //   title: '操作',
+        //   dataIndex: 'action',
+        //   align:"center",
+        //   fixed:"right",
+        //   width:147,
+        //   scopedSlots: { customRender: 'action' }
+        // }
+      ],
+      url: {
+        list: '/inventory/itdmInventoryLog/list',
+        delete: '/inventory/itdmInventoryLog/delete',
+        deleteBatch: '/inventory/itdmInventoryLog/deleteBatch',
+        exportXlsUrl: '/inventory/itdmInventoryLog/exportXls',
+        importExcelUrl: 'inventory/itdmInventoryLog/importExcel'
+
+      },
+      dictOptions: {}
+    }
+  },
+  created() {
+  },
+  computed: {
+    importExcelUrl: function() {
+      return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`
+    }
+  },
+  methods: {
+    initDictConfig() {
+    },
+    handle1: function() {
+      this.$refs.modalForm.add()
+      this.$refs.modalForm.initModel('1')
+
+      this.$refs.modalForm.title = '入库'
+      this.$refs.modalForm.disableSubmit = false
+    },
+    handle2: function() {
+      this.$refs.modalForm.add()
+      this.$refs.modalForm.initModel('2')
+
+      this.$refs.modalForm.title = '出库'
+      this.$refs.modalForm.disableSubmit = false
+    }
+  }
+}
+</script>
+<style scoped>
+@import '~@assets/less/common.less';
+</style>

+ 364 - 0
itdmWeb/src/views/module-iTDM/inventory/ItdmSampleClassificationList.vue

@@ -0,0 +1,364 @@
+<template>
+  <a-card :bordered="false">
+    <!-- 查询区域 -->
+    <div class="table-page-search-wrapper">
+      <a-form layout="inline" @keyup.enter.native="searchQuery">
+        <a-row :gutter="24">
+        </a-row>
+      </a-form>
+    </div>
+    <!-- 查询区域-END -->
+
+    <!-- 操作按钮区域 -->
+    <div class="table-operator">
+      <a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>
+      <a-button type="primary" icon="download" @click="handleExportXls('样品分类表')">导出</a-button>
+<!--      <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">-->
+<!--        <a-button type="primary" icon="import">导入</a-button>-->
+<!--      </a-upload>-->
+      <!-- 高级查询区域 -->
+<!--      <j-super-query :fieldList="superFieldList" ref="superQueryModal" @handleSuperQuery="handleSuperQuery"></j-super-query>-->
+      <a-dropdown v-if="selectedRowKeys.length > 0">
+        <a-menu slot="overlay">
+          <a-menu-item key="1" @click="batchDel"><a-icon type="delete"/>删除</a-menu-item>
+        </a-menu>
+        <a-button style="margin-left: 8px"> 批量操作 <a-icon type="down" /></a-button>
+      </a-dropdown>
+    </div>
+
+    <!-- table区域-begin -->
+    <div>
+      <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">
+        <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a style="font-weight: 600">{{ selectedRowKeys.length }}</a>项
+        <a style="margin-left: 24px" @click="onClearSelected">清空</a>
+      </div>
+
+      <a-table
+        ref="table"
+        size="middle"
+        rowKey="id"
+        class="j-table-force-nowrap"
+        :scroll="{x:true}"
+        :columns="columns"
+        :dataSource="dataSource"
+        :pagination="ipagination"
+        :loading="loading"
+        :expandedRowKeys="expandedRowKeys"
+        @change="handleTableChange"
+        @expand="handleExpand"
+        v-bind="tableProps">
+
+        <template slot="imgSlot" slot-scope="text,record">
+          <span v-if="!text" style="font-size: 12px;font-style: italic;">无图片</span>
+          <img v-else :src="getImgView(text)" :preview="record.id" height="25px" alt="" style="max-width:80px;font-size: 12px;font-style: italic;"/>
+        </template>
+        <template slot="fileSlot" slot-scope="text">
+          <span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span>
+          <a-button
+            v-else
+            :ghost="true"
+            type="primary"
+            icon="download"
+            size="small"
+            @click="downloadFile(text)">
+            下载
+          </a-button>
+        </template>
+
+        <span slot="action" slot-scope="text, record">
+          <a @click="handleEdit(record)">编辑</a>
+          <a-divider type="vertical" />
+          <a @click="handleAddChild(record)">添加下级</a>
+          <a-divider type="vertical" />
+          <a-popconfirm title="确定删除吗?" @confirm="() => handleDeleteNode(record.id)" placement="topLeft">
+            <a>删除</a>
+          </a-popconfirm>
+
+<!--          <a-dropdown>-->
+<!--            <a class="ant-dropdown-link">更多 <a-icon type="down" /></a>-->
+<!--            <a-menu slot="overlay">-->
+<!--              <a-menu-item>-->
+<!--                <a @click="handleAddChild(record)">添加下级</a>-->
+<!--              </a-menu-item>-->
+<!--              <a-menu-item>-->
+<!--                <a-popconfirm title="确定删除吗?" @confirm="() => handleDeleteNode(record.id)" placement="topLeft">-->
+<!--                  <a>删除</a>-->
+<!--                </a-popconfirm>-->
+<!--              </a-menu-item>-->
+<!--            </a-menu>-->
+<!--          </a-dropdown>-->
+        </span>
+
+      </a-table>
+    </div>
+
+    <itdmSampleClassification-modal ref="modalForm" @ok="modalFormOk"></itdmSampleClassification-modal>
+  </a-card>
+</template>
+
+<script>
+
+  import { getAction, deleteAction } from '@/api/manage'
+  import { JeecgListMixin } from '@/mixins/JeecgListMixin'
+  import ItdmSampleClassificationModal from './modules/ItdmSampleClassificationModal'
+  import {filterMultiDictText} from '@/components/dict/JDictSelectUtil'
+  import { filterObj } from '@/utils/util';
+
+  export default {
+    name: "ItdmSampleClassificationList",
+    mixins:[JeecgListMixin],
+    components: {
+      ItdmSampleClassificationModal
+    },
+    data () {
+      return {
+        description: '样品分类表管理页面',
+        // 表头
+        columns: [
+          {
+            title:'名称',
+            align:"left",
+            dataIndex: 'name'
+          },
+          {
+            title:'状态',
+            align:"left",
+            dataIndex: 'status_dictText'
+          },
+          {
+            title:'备注',
+            align:"left",
+            dataIndex: 'remark'
+          },
+          {
+            title: '操作',
+            dataIndex: 'action',
+            align:"center",
+            fixed:"right",
+            width:500,
+            scopedSlots: { customRender: 'action' },
+          }
+        ],
+        url: {
+          list: "/inventory/itdmSampleClassification/rootList",
+          childList: "/inventory/itdmSampleClassification/childList",
+          getChildListBatch: "/inventory/itdmSampleClassification/getChildListBatch",
+          delete: "/inventory/itdmSampleClassification/delete",
+          deleteBatch: "/inventory/itdmSampleClassification/deleteBatch",
+          exportXlsUrl: "/inventory/itdmSampleClassification/exportXls",
+          importExcelUrl: "inventory/itdmSampleClassification/importExcel",
+        },
+        expandedRowKeys:[],
+        hasChildrenField:"hasChild",
+        pidField:"pid",
+        dictOptions: {},
+        loadParent: false,
+        superFieldList:[],
+      }
+    },
+    created() {
+      this.getSuperFieldList();
+    },
+    computed: {
+      importExcelUrl(){
+        return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
+      },
+      tableProps() {
+        let _this = this
+        return {
+          // 列表项是否可选择
+          rowSelection: {
+            selectedRowKeys: _this.selectedRowKeys,
+            onChange: (selectedRowKeys) => _this.selectedRowKeys = selectedRowKeys
+          }
+        }
+      }
+    },
+    methods: {
+      loadData(arg){
+        if(arg==1){
+          this.ipagination.current=1
+        }
+        this.loading = true
+        let params = this.getQueryParams()
+        params.hasQuery = 'true'
+        getAction(this.url.list,params).then(res=>{
+          if(res.success){
+            let result = res.result
+            if(Number(result.total)>0){
+              this.ipagination.total = Number(result.total)
+              this.dataSource = this.getDataByResult(res.result.records)
+              return this.loadDataByExpandedRows(this.dataSource)
+            }else{
+              this.ipagination.total=0
+              this.dataSource=[]
+            }
+          }else{
+            this.$message.warning(res.message)
+          }
+        }).finally(()=>{
+          this.loading = false
+        })
+      },
+      // 根据已展开的行查询数据(用于保存后刷新时异步加载子级的数据)
+      loadDataByExpandedRows(dataList) {
+        if (this.expandedRowKeys.length > 0) {
+          return getAction(this.url.getChildListBatch,{ parentIds: this.expandedRowKeys.join(',') }).then(res=>{
+            if (res.success && res.result.records.length>0) {
+              //已展开的数据批量子节点
+              let records = res.result.records
+              const listMap = new Map();
+              for (let item of records) {
+                let pid = item[this.pidField];
+                if (this.expandedRowKeys.join(',').includes(pid)) {
+                 let mapList = listMap.get(pid);
+                  if (mapList == null) {
+                    mapList = [];
+                  }
+                  mapList.push(item);
+                  listMap.set(pid, mapList);
+                }
+              }
+              let childrenMap = listMap;
+              let fn = (list) => {
+                if(list) {
+                  list.forEach(data => {
+                    if (this.expandedRowKeys.includes(data.id)) {
+                      data.children = this.getDataByResult(childrenMap.get(data.id))
+                      fn(data.children)
+                    }
+                  })
+                }
+              }
+              fn(dataList)
+            }
+          })
+        } else {
+          return Promise.resolve()
+        }
+      },
+      getQueryParams(arg) {
+        //获取查询条件
+        let sqp = {}
+        let param = {}
+        if(this.superQueryParams){
+          sqp['superQueryParams']=encodeURI(this.superQueryParams)
+          sqp['superQueryMatchType'] = this.superQueryMatchType
+        }
+        if(arg){
+          param = Object.assign(sqp, this.isorter ,this.filters);
+        }else{
+          param = Object.assign(sqp, this.queryParam, this.isorter ,this.filters);
+        }
+        if(JSON.stringify(this.queryParam) === "{}" || arg){
+          param.hasQuery = 'false'
+        }else{
+          param.hasQuery = 'true'
+        }
+        param.field = this.getQueryField();
+        param.pageNo = this.ipagination.current;
+        param.pageSize = this.ipagination.pageSize;
+        return filterObj(param);
+      },
+      searchReset() {
+        //重置
+        this.expandedRowKeys = []
+        this.queryParam = {}
+        this.loadData(1);
+      },
+      getDataByResult(result){
+        if(result){
+          return result.map(item=>{
+            //判断是否标记了带有子节点
+            if(item[this.hasChildrenField]=='1'){
+              let loadChild = { id: item.id+'_loadChild', name: 'loading...', isLoading: true }
+              item.children = [loadChild]
+            }
+            return item
+          })
+        }
+      },
+      handleExpand(expanded, record){
+        // 判断是否是展开状态
+        if (expanded) {
+          this.expandedRowKeys.push(record.id)
+          if (record.children.length>0 && record.children[0].isLoading === true) {
+            let params = this.getQueryParams(1);//查询条件
+            params[this.pidField] = record.id
+            params.hasQuery = 'false'
+            params.superQueryParams=""
+            getAction(this.url.childList,params).then((res)=>{
+              if(res.success){
+                if(res.result.records){
+                  record.children = this.getDataByResult(res.result.records)
+                  this.dataSource = [...this.dataSource]
+                }else{
+                  record.children=''
+                  record.hasChildrenField='0'
+                }
+              }else{
+                this.$message.warning(res.message)
+              }
+            })
+          }
+        }else{
+          let keyIndex = this.expandedRowKeys.indexOf(record.id)
+          if(keyIndex>=0){
+            this.expandedRowKeys.splice(keyIndex, 1);
+          }
+        }
+      },
+      handleAddChild(record){
+        this.loadParent = true
+        let obj = {}
+        obj[this.pidField] = record['id']
+        this.$refs.modalForm.add(obj);
+      },
+      handleDeleteNode(id) {
+        if(!this.url.delete){
+          this.$message.error("请设置url.delete属性!")
+          return
+        }
+        var that = this;
+        deleteAction(that.url.delete, {id: id}).then((res) => {
+          if (res.success) {
+             that.loadData(1)
+          } else {
+            that.$message.warning(res.message);
+          }
+        });
+      },
+      batchDel(){
+        if(this.selectedRowKeys.length<=0){
+          this.$message.warning('请选择一条记录!');
+          return false;
+        }else{
+          let ids = "";
+          let that = this;
+          that.selectedRowKeys.forEach(function(val) {
+            ids+=val+",";
+          });
+          that.$confirm({
+            title:"确认删除",
+            content:"是否删除选中数据?",
+            onOk: function(){
+              that.handleDeleteNode(ids)
+              that.onClearSelected();
+            }
+          });
+        }
+      },
+      getSuperFieldList(){
+        let fieldList=[];
+        fieldList.push({type:'string',value:'name',text:'名称',dictCode:''})
+        fieldList.push({type:'string',value:'pid',text:'上级',dictCode:"itdm_sample_classification,name,id"})
+        fieldList.push({type:'string',value:'status',text:'状态',dictCode:'sample_type_status'})
+        fieldList.push({type:'string',value:'remark',text:'备注',dictCode:''})
+        this.superFieldList = fieldList
+      }
+    }
+  }
+</script>
+<style scoped>
+  @import '~@assets/less/common.less';
+</style>

+ 221 - 0
itdmWeb/src/views/module-iTDM/inventory/ItdmSampleExpireList.vue

@@ -0,0 +1,221 @@
+<template>
+  <a-card :bordered="false">
+    <!-- 查询区域 -->
+    <div class="table-page-search-wrapper">
+      <a-form layout="inline" @keyup.enter.native="searchQuery">
+        <a-row :gutter="24">
+          <a-col :xl="6" :lg="7" :md="8" :sm="24">
+            <a-form-item label="样品条码">
+              <a-input placeholder="请输入样品条码" v-model="queryParam.barCodes"></a-input>
+            </a-form-item>
+          </a-col>
+          <a-col :xl="6" :lg="7" :md="8" :sm="24">
+            <a-form-item label="审批状态">
+              <j-dict-select-tag placeholder="请选择审批状态" v-model="queryParam.auditStatus" dictCode="audit_status"/>
+            </a-form-item>
+          </a-col>
+<!--          <template v-if="toggleSearchStatus">-->
+<!--          </template>-->
+<!--          <a-col :xl="6" :lg="7" :md="8" :sm="24">-->
+<!--            <a-form-item label="处理方式">-->
+<!--              <a-input placeholder="请输入处理方式" v-model="queryParam.handlingMethod"></a-input>-->
+<!--            </a-form-item>-->
+<!--          </a-col>-->
+          <a-col :xl="6" :lg="7" :md="8" :sm="24">
+            <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
+              <a-button type="primary" @click="searchQuery" icon="search">查询</a-button>
+              <a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button>
+<!--              <a @click="handleToggleSearch" style="margin-left: 8px">-->
+<!--                {{ toggleSearchStatus ? '收起' : '展开' }}-->
+<!--                <a-icon :type="toggleSearchStatus ? 'up' : 'down'"/>-->
+<!--              </a>-->
+            </span>
+          </a-col>
+        </a-row>
+      </a-form>
+    </div>
+    <!-- 查询区域-END -->
+
+    <!-- 操作按钮区域 -->
+    <div class="table-operator">
+      <a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>
+      <a-button type="primary" icon="download" @click="handleExportXls('样品过期表')">导出</a-button>
+<!--      <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">-->
+<!--        <a-button type="primary" icon="import">导入</a-button>-->
+<!--      </a-upload>-->
+      <!-- 高级查询区域 -->
+<!--      <j-super-query :fieldList="superFieldList" ref="superQueryModal" @handleSuperQuery="handleSuperQuery"></j-super-query>-->
+<!--      <a-dropdown v-if="selectedRowKeys.length > 0">-->
+<!--        <a-menu slot="overlay">-->
+<!--          <a-menu-item key="1" @click="batchDel"><a-icon type="delete"/>删除</a-menu-item>-->
+<!--        </a-menu>-->
+<!--        <a-button style="margin-left: 8px"> 批量操作 <a-icon type="down" /></a-button>-->
+<!--      </a-dropdown>-->
+    </div>
+
+    <!-- table区域-begin -->
+    <div>
+      <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">
+        <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a style="font-weight: 600">{{ selectedRowKeys.length }}</a>项
+        <a style="margin-left: 24px" @click="onClearSelected">清空</a>
+      </div>
+
+      <a-table
+        ref="table"
+        size="middle"
+        :scroll="{x:true}"
+        bordered
+        rowKey="id"
+        :columns="columns"
+        :dataSource="dataSource"
+        :pagination="ipagination"
+        :loading="loading"
+        :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
+        class="j-table-force-nowrap"
+        @change="handleTableChange">
+
+        <template slot="htmlSlot" slot-scope="text">
+          <div v-html="text"></div>
+        </template>
+        <template slot="imgSlot" slot-scope="text,record">
+          <span v-if="!text" style="font-size: 12px;font-style: italic;">无图片</span>
+          <img v-else :src="getImgView(text)" :preview="record.id" height="25px" alt="" style="max-width:80px;font-size: 12px;font-style: italic;"/>
+        </template>
+        <template slot="fileSlot" slot-scope="text">
+          <span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span>
+          <a-button
+            v-else
+            :ghost="true"
+            type="primary"
+            icon="download"
+            size="small"
+            @click="downloadFile(text)">
+            下载
+          </a-button>
+        </template>
+
+        <span slot="action" slot-scope="text, record">
+          <a @click="handleEdit(record)">编辑</a>
+
+          <a-divider type="vertical" />
+          <a-dropdown>
+            <a class="ant-dropdown-link">更多 <a-icon type="down" /></a>
+            <a-menu slot="overlay">
+              <a-menu-item>
+                <a @click="handleDetail(record)">详情</a>
+              </a-menu-item>
+              <a-menu-item>
+                <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
+                  <a>删除</a>
+                </a-popconfirm>
+              </a-menu-item>
+            </a-menu>
+          </a-dropdown>
+        </span>
+
+      </a-table>
+    </div>
+    <itdm-sample-expire-modal ref="modalForm" @ok="modalFormOk"></itdm-sample-expire-modal>
+  </a-card>
+</template>
+
+<script>
+
+  import '@/assets/less/TableExpand.less'
+  import { mixinDevice } from '@/utils/mixin'
+  import { JeecgListMixin } from '@/mixins/JeecgListMixin'
+  import {filterMultiDictText} from '@/components/dict/JDictSelectUtil'
+  import ItdmSampleExpireModal from './modules/ItdmSampleExpireModal'
+
+  export default {
+    name: 'ItdmSampleExpireList',
+    mixins:[JeecgListMixin, mixinDevice],
+    components: {
+      ItdmSampleExpireModal
+    },
+    data () {
+      return {
+        description: '样品过期表管理页面',
+        // 表头
+        columns: [
+          {
+            title: '#',
+            dataIndex: '',
+            key:'rowIndex',
+            width:60,
+            align:"center",
+            customRender:function (t,r,index) {
+              return parseInt(index)+1;
+            }
+          },
+          {
+            title:'条码列表',
+            align:"center",
+            dataIndex: 'barCodes'
+          },
+          {
+            title:'样品列表',
+            align:"center",
+            dataIndex: 'samples'
+          },
+          {
+            title:'处理方式',
+            align:"center",
+            dataIndex: 'handlingMethod'
+          },
+          {
+            title:'审批状态',
+            align:"center",
+            dataIndex: 'auditStatus_dictText'
+          },
+          {
+            title:'拒绝原因',
+            align:"center",
+            dataIndex: 'rejectReason'
+          },
+          {
+            title: '操作',
+            dataIndex: 'action',
+            align:"center",
+            fixed:"right",
+            width:147,
+            scopedSlots: { customRender: 'action' }
+          }
+        ],
+        url: {
+          list: "/inventory/itdmSampleExpire/list",
+          delete: "/inventory/itdmSampleExpire/delete",
+          deleteBatch: "/inventory/itdmSampleExpire/deleteBatch",
+          exportXlsUrl: "/inventory/itdmSampleExpire/exportXls",
+          importExcelUrl: "inventory/itdmSampleExpire/importExcel",
+
+        },
+        dictOptions:{},
+        superFieldList:[],
+      }
+    },
+    created() {
+    this.getSuperFieldList();
+    },
+    computed: {
+      importExcelUrl: function(){
+        return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
+      },
+    },
+    methods: {
+      initDictConfig(){
+      },
+      getSuperFieldList(){
+        let fieldList=[];
+        fieldList.push({type:'string',value:'barCodes',text:'过期的条码列表',dictCode:''})
+        fieldList.push({type:'string',value:'handlingMethod',text:'处理方式',dictCode:''})
+        fieldList.push({type:'string',value:'auditStatus',text:'审核状态',dictCode:'audit_status'})
+        fieldList.push({type:'string',value:'rejectReason',text:'拒绝原因',dictCode:''})
+        this.superFieldList = fieldList
+      }
+    }
+  }
+</script>
+<style scoped>
+  @import '~@assets/less/common.less';
+</style>

+ 200 - 0
itdmWeb/src/views/module-iTDM/inventory/ItdmSampleExpireList1.vue

@@ -0,0 +1,200 @@
+<template>
+  <a-card :bordered="false">
+    <!-- 查询区域 -->
+    <div class="table-page-search-wrapper">
+      <a-form layout="inline" @keyup.enter.native="searchQuery">
+        <a-row :gutter="24">
+          <a-col :xl="6" :lg="7" :md="8" :sm="24">
+            <a-form-item label="处理方式">
+              <a-input placeholder="请输入处理方式" v-model="queryParam.handlingMethod"></a-input>
+            </a-form-item>
+          </a-col>
+          <a-col :xl="6" :lg="7" :md="8" :sm="24">
+            <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
+              <a-button type="primary" @click="searchQuery" icon="search">查询</a-button>
+              <a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button>
+            </span>
+          </a-col>
+        </a-row>
+      </a-form>
+    </div>
+    <!-- 查询区域-END -->
+
+    <!-- 操作按钮区域 -->
+    <div class="table-operator">
+      <a-button type="primary" icon="download" @click="handleExportXls('样品过期表')">导出</a-button>
+    </div>
+
+    <!-- table区域-begin -->
+    <div>
+      <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">
+        <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a style="font-weight: 600">{{ selectedRowKeys.length }}</a>项
+        <a style="margin-left: 24px" @click="onClearSelected">清空</a>
+      </div>
+
+      <a-table
+        ref="table"
+        size="middle"
+        :scroll="{x:true}"
+        bordered
+        rowKey="id"
+        :columns="columns"
+        :dataSource="dataSource"
+        :pagination="ipagination"
+        :loading="loading"
+        :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
+        class="j-table-force-nowrap"
+        @change="handleTableChange">
+
+        <template slot="htmlSlot" slot-scope="text">
+          <div v-html="text"></div>
+        </template>
+        <template slot="imgSlot" slot-scope="text,record">
+          <span v-if="!text" style="font-size: 12px;font-style: italic;">无图片</span>
+          <img v-else :src="getImgView(text)" :preview="record.id" height="25px" alt="" style="max-width:80px;font-size: 12px;font-style: italic;"/>
+        </template>
+        <template slot="fileSlot" slot-scope="text">
+          <span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span>
+          <a-button
+            v-else
+            :ghost="true"
+            type="primary"
+            icon="download"
+            size="small"
+            @click="downloadFile(text)">
+            下载
+          </a-button>
+        </template>
+
+        <span slot="action" slot-scope="text, record">
+          <a @click="handleEditTG(record)">审批通过</a>
+          <a-divider type="vertical" />
+          <a @click="handleEditJJ(record)">审批拒绝</a>
+<!--          <a-dropdown>-->
+<!--            <a class="ant-dropdown-link">更多 <a-icon type="down" /></a>-->
+<!--            <a-menu slot="overlay">-->
+<!--              <a-menu-item>-->
+<!--                <a @click="handleEditJJ(record)">审批拒绝</a>-->
+<!--              </a-menu-item>-->
+<!--            </a-menu>-->
+<!--          </a-dropdown>-->
+        </span>
+
+      </a-table>
+    </div>
+    <itdm-sample-expire-modal1 ref="modalForm" @ok="modalFormOk"></itdm-sample-expire-modal1>
+  </a-card>
+</template>
+
+<script>
+
+import '@/assets/less/TableExpand.less'
+import { mixinDevice } from '@/utils/mixin'
+import { JeecgListMixin } from '@/mixins/JeecgListMixin'
+import {filterMultiDictText} from '@/components/dict/JDictSelectUtil'
+import ItdmSampleExpireModal1 from './modules/ItdmSampleExpireModal1'
+import { sampleExpireSH } from '@/api/api.js'
+
+export default {
+  name: 'ItdmSampleExpireList1',
+  mixins:[JeecgListMixin, mixinDevice],
+  components: {
+    ItdmSampleExpireModal1,
+  },
+  data () {
+    return {
+      description: '样品过期表管理页面',
+      // 表头
+      columns: [
+        {
+          title: '#',
+          dataIndex: '',
+          key:'rowIndex',
+          width:60,
+          align:"center",
+          customRender:function (t,r,index) {
+            return parseInt(index)+1;
+          }
+        },
+        {
+          title:'条码列表',
+          align:"center",
+          dataIndex: 'barCodes'
+        },
+        {
+          title:'样品列表',
+          align:"center",
+          dataIndex: 'samples'
+        },
+        {
+          title:'处理方式',
+          align:"center",
+          dataIndex: 'handlingMethod'
+        },
+        {
+          title: '操作',
+          dataIndex: 'action',
+          align:"center",
+          fixed:"right",
+          width:200,
+          scopedSlots: { customRender: 'action' }
+        }
+      ],
+      url: {
+        list: "/inventory/itdmSampleExpire/shenheList",
+        delete: "/inventory/itdmSampleExpire/delete",
+        deleteBatch: "/inventory/itdmSampleExpire/deleteBatch",
+        exportXlsUrl: "/inventory/itdmSampleExpire/exportXls",
+        importExcelUrl: "inventory/itdmSampleExpire/importExcel",
+
+      },
+      dictOptions:{},
+      superFieldList:[],
+    }
+  },
+  created() {
+    this.getSuperFieldList();
+  },
+  computed: {
+    importExcelUrl: function(){
+      return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
+    },
+  },
+  methods: {
+    initDictConfig(){
+    },
+    getSuperFieldList(){
+      let fieldList=[];
+      fieldList.push({type:'string',value:'barCodes',text:'过期的条码列表',dictCode:''})
+      fieldList.push({type:'string',value:'handlingMethod',text:'处理方式',dictCode:''})
+      fieldList.push({type:'string',value:'auditStatus',text:'审核状态',dictCode:'audit_status'})
+      fieldList.push({type:'string',value:'rejectReason',text:'拒绝原因',dictCode:''})
+      this.superFieldList = fieldList
+    },
+    handleEditTG(record){
+      console.log("record",record)
+      record.auditStatus = 1
+      sampleExpireSH(record).then((res) => {
+        console.log(res)
+        this.loadData();
+      })
+    },
+    handleEditJJ(record){
+      console.log("拒绝record",record)
+      record.auditStatus = 2
+      this.$refs.modalForm.edit(record)
+      this.$refs.modalForm.title = "编辑"
+      this.$refs.modalForm.disableSubmit = false
+
+      // record.auditStatus = 2
+      // sampleExpireSH(record).then((res) => {
+      //   console.log(res)
+      //   this.loadData();
+      // })
+    },
+  }
+}
+</script>
+<style scoped>
+@import '~@assets/less/common.less';
+</style>

+ 223 - 0
itdmWeb/src/views/module-iTDM/inventory/ItdmSampleExpireRealList.vue

@@ -0,0 +1,223 @@
+<template>
+  <a-card :bordered="false">
+    <!-- 查询区域 -->
+    <div class="table-page-search-wrapper">
+      <a-form layout="inline" @keyup.enter.native="searchQuery">
+        <a-row :gutter="24">
+          <a-col :xl="6" :lg="7" :md="8" :sm="24">
+            <a-form-item label="样品条码">
+              <a-input placeholder="请输入样品条码" v-model="queryParam.barCode"></a-input>
+            </a-form-item>
+          </a-col>
+          <a-col :xl="6" :lg="7" :md="8" :sm="24">
+            <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
+              <a-button type="primary" @click="searchQuery" icon="search">查询</a-button>
+              <a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button>
+<!--              <a @click="handleToggleSearch" style="margin-left: 8px">-->
+<!--                {{ toggleSearchStatus ? '收起' : '展开' }}-->
+<!--                <a-icon :type="toggleSearchStatus ? 'up' : 'down'"/>-->
+<!--              </a>-->
+            </span>
+          </a-col>
+        </a-row>
+      </a-form>
+    </div>
+    <!-- 查询区域-END -->
+
+    <!-- 操作按钮区域 -->
+    <div class="table-operator">
+<!--      <a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>-->
+      <a-button type="primary" icon="download" @click="handleExportXls('样品过期审核通过表')">导出</a-button>
+      <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">
+<!--        <a-button type="primary" icon="import">导入</a-button>-->
+      </a-upload>
+      <!-- 高级查询区域 -->
+<!--      <j-super-query :fieldList="superFieldList" ref="superQueryModal" @handleSuperQuery="handleSuperQuery"></j-super-query>-->
+<!--      <a-dropdown v-if="selectedRowKeys.length > 0">-->
+<!--        <a-menu slot="overlay">-->
+<!--          <a-menu-item key="1" @click="batchDel"><a-icon type="delete"/>删除</a-menu-item>-->
+<!--        </a-menu>-->
+<!--        <a-button style="margin-left: 8px"> 批量操作 <a-icon type="down" /></a-button>-->
+<!--      </a-dropdown>-->
+    </div>
+
+    <!-- table区域-begin -->
+    <div>
+      <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">
+        <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a style="font-weight: 600">{{ selectedRowKeys.length }}</a>项
+        <a style="margin-left: 24px" @click="onClearSelected">清空</a>
+      </div>
+
+      <a-table
+        ref="table"
+        size="middle"
+        :scroll="{x:true}"
+        bordered
+        rowKey="id"
+        :columns="columns"
+        :dataSource="dataSource"
+        :pagination="ipagination"
+        :loading="loading"
+        :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
+        class="j-table-force-nowrap"
+        @change="handleTableChange">
+
+        <template slot="htmlSlot" slot-scope="text">
+          <div v-html="text"></div>
+        </template>
+        <template slot="imgSlot" slot-scope="text,record">
+          <span v-if="!text" style="font-size: 12px;font-style: italic;">无图片</span>
+          <img v-else :src="getImgView(text)" :preview="record.id" height="25px" alt="" style="max-width:80px;font-size: 12px;font-style: italic;"/>
+        </template>
+        <template slot="fileSlot" slot-scope="text">
+          <span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span>
+          <a-button
+            v-else
+            :ghost="true"
+            type="primary"
+            icon="download"
+            size="small"
+            @click="downloadFile(text)">
+            下载
+          </a-button>
+        </template>
+
+<!--        <span slot="action" slot-scope="text, record">-->
+<!--          <a @click="handleEdit(record)">编辑</a>-->
+
+<!--          <a-divider type="vertical" />-->
+<!--          <a-dropdown>-->
+<!--            <a class="ant-dropdown-link">更多 <a-icon type="down" /></a>-->
+<!--            <a-menu slot="overlay">-->
+<!--              <a-menu-item>-->
+<!--                <a @click="handleDetail(record)">详情</a>-->
+<!--              </a-menu-item>-->
+<!--              <a-menu-item>-->
+<!--                <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">-->
+<!--                  <a>删除</a>-->
+<!--                </a-popconfirm>-->
+<!--              </a-menu-item>-->
+<!--            </a-menu>-->
+<!--          </a-dropdown>-->
+<!--        </span>-->
+
+      </a-table>
+    </div>
+
+    <itdm-sample-expire-real-modal ref="modalForm" @ok="modalFormOk"></itdm-sample-expire-real-modal>
+  </a-card>
+</template>
+
+<script>
+
+  import '@/assets/less/TableExpand.less'
+  import { mixinDevice } from '@/utils/mixin'
+  import { JeecgListMixin } from '@/mixins/JeecgListMixin'
+  import ItdmSampleExpireRealModal from './modules/ItdmSampleExpireRealModal'
+
+  export default {
+    name: 'ItdmSampleExpireRealList',
+    mixins:[JeecgListMixin, mixinDevice],
+    components: {
+      ItdmSampleExpireRealModal
+    },
+    data () {
+      return {
+        description: '样品过期审核通过表管理页面',
+        // 表头
+        columns: [
+          {
+            title: '#',
+            dataIndex: '',
+            key:'rowIndex',
+            width:60,
+            align:"center",
+            customRender:function (t,r,index) {
+              return parseInt(index)+1;
+            }
+          },
+          // {
+          //   title:'样品过期申请表id',
+          //   align:"center",
+          //   dataIndex: 'expireId'
+          // },
+          {
+            title:'样品条码',
+            align:"center",
+            dataIndex: 'barCode'
+          },
+          {
+            title:'样品名称',
+            align:"center",
+            dataIndex: 'sampleName'
+          },
+          {
+            title:'样品规格',
+            align:"center",
+            dataIndex: 'sampleSpecifications'
+          },
+          {
+            title:'生产厂家',
+            align:"center",
+            dataIndex: 'sampleManufacturer'
+          },
+          {
+            title:'批次号',
+            align:"center",
+            dataIndex: 'batchNumber'
+          },
+          {
+            title:'处理方式',
+            align:"center",
+            dataIndex: 'handlingMethod'
+          },
+          // {
+          //   title:'备注',
+          //   align:"center",
+          //   dataIndex: 'remark'
+          // },
+          // {
+          //   title: '操作',
+          //   dataIndex: 'action',
+          //   align:"center",
+          //   fixed:"right",
+          //   width:147,
+          //   scopedSlots: { customRender: 'action' }
+          // }
+        ],
+        url: {
+          list: "/inventory/itdmSampleExpireReal/list",
+          delete: "/inventory/itdmSampleExpireReal/delete",
+          deleteBatch: "/inventory/itdmSampleExpireReal/deleteBatch",
+          exportXlsUrl: "/inventory/itdmSampleExpireReal/exportXls",
+          importExcelUrl: "inventory/itdmSampleExpireReal/importExcel",
+
+        },
+        dictOptions:{},
+        superFieldList:[],
+      }
+    },
+    created() {
+    this.getSuperFieldList();
+    },
+    computed: {
+      importExcelUrl: function(){
+        return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
+      },
+    },
+    methods: {
+      initDictConfig(){
+      },
+      getSuperFieldList(){
+        let fieldList=[];
+        fieldList.push({type:'string',value:'expireId',text:'样品过期申请表id',dictCode:''})
+        fieldList.push({type:'sel_search',value:'barCode',text:'过期的样品条码id',dictTable:"", dictText:'', dictCode:''})
+        fieldList.push({type:'string',value:'remark',text:'备注',dictCode:''})
+        this.superFieldList = fieldList
+      }
+    }
+  }
+</script>
+<style scoped>
+  @import '~@assets/less/common.less';
+</style>

+ 226 - 0
itdmWeb/src/views/module-iTDM/inventory/ItdmSampleInventoryList.vue

@@ -0,0 +1,226 @@
+<template>
+  <a-card :bordered="false">
+    <!-- 查询区域 -->
+    <div class="table-page-search-wrapper">
+      <a-form layout="inline" @keyup.enter.native="searchQuery">
+        <a-row :gutter="24">
+        </a-row>
+      </a-form>
+    </div>
+    <!-- 查询区域-END -->
+
+    <!-- 操作按钮区域 -->
+    <div class="table-operator">
+      <a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>
+    </div>
+
+    <!-- table区域-begin -->
+    <div>
+<!--      <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">-->
+<!--        <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a-->
+<!--        style="font-weight: 600">{{ selectedRowKeys.length }}</a>项-->
+<!--        <a style="margin-left: 24px" @click="onClearSelected">清空</a>-->
+<!--      </div>-->
+
+      <a-table
+        ref="table"
+        size="middle"
+        :scroll="{x:true}"
+        bordered
+        rowKey="id"
+        :columns="columns"
+        :dataSource="dataSource"
+        :pagination="ipagination"
+        :loading="loading"
+        :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
+        class="j-table-force-nowrap"
+        @change="handleTableChange">
+
+        <template slot="htmlSlot" slot-scope="text">
+          <div v-html="text"></div>
+        </template>
+        <template slot="imgSlot" slot-scope="text,record">
+          <span v-if="!text" style="font-size: 12px;font-style: italic;">无图片</span>
+          <img v-else :src="getImgView(text)" :preview="record.id" height="25px" alt=""
+               style="max-width:80px;font-size: 12px;font-style: italic;" />
+        </template>
+        <template slot="fileSlot" slot-scope="text">
+          <span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span>
+          <a-button
+            v-else
+            :ghost="true"
+            type="primary"
+            icon="download"
+            size="small"
+            @click="downloadFile(text)">
+            下载
+          </a-button>
+        </template>
+
+        <span slot="action" slot-scope="text, record">
+          <a @click="handleEdit(record)">编辑</a>
+
+          <a-divider type="vertical" />
+            <a @click="handletiaoma(record)">条码</a>
+          <a-divider type="vertical" />
+
+          <a-dropdown>
+            <a class="ant-dropdown-link">更多 <a-icon type="down" /></a>
+            <a-menu slot="overlay">
+              <a-menu-item>
+                <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
+                  <a>删除</a>
+                </a-popconfirm>
+              </a-menu-item>
+            </a-menu>
+          </a-dropdown>
+        </span>
+
+      </a-table>
+    </div>
+
+    <itdm-sample-inventory-modal ref="modalForm" @ok="modalFormOk"></itdm-sample-inventory-modal>
+    <itdm-inventory-barcode-list ref="blist" @ok="modalFormOk"></itdm-inventory-barcode-list>
+  </a-card>
+</template>
+
+<script>
+
+import '@/assets/less/TableExpand.less'
+import { mixinDevice } from '@/utils/mixin'
+import { JeecgListMixin } from '@/mixins/JeecgListMixin'
+import ItdmSampleInventoryModal from './modules/ItdmSampleInventoryModal'
+import ItdmInventoryBarcodeList from './ItdmInventoryBarcodeList'
+
+export default {
+  name: 'ItdmSampleInventoryList',
+  mixins: [JeecgListMixin, mixinDevice],
+  components: {
+    ItdmSampleInventoryModal, ItdmInventoryBarcodeList
+  },
+  data() {
+    return {
+
+      description: '样品库存管理页面',
+      barcodeShow: false,
+      // 表头
+      columns: [
+        {
+          title: '#',
+          dataIndex: '',
+          key: 'rowIndex',
+          width: 60,
+          align: 'center',
+          customRender: function(t, r, index) {
+            return parseInt(index) + 1
+          }
+        },
+        {
+          title: '样品名称',
+          align: 'center',
+          dataIndex: 'sampleName'
+        },
+        {
+          title: '样品规格',
+          align: 'center',
+          dataIndex: 'sampleSpecifications'
+        },
+        {
+          title: '样品数量',
+          align: 'center',
+          dataIndex: 'sampleNum'
+        },
+        {
+          title: '生产厂家',
+          align: 'center',
+          dataIndex: 'sampleManufacturer'
+        },
+        {
+          title: '批次号',
+          align: 'center',
+          dataIndex: 'batchNumber'
+        },
+        {
+          title: '样品分类',
+          align: 'center',
+          dataIndex: 'sampleClassifications_dictText'
+        },
+        {
+          title: '样品单位',
+          align: 'center',
+          dataIndex: 'sampleUnit'
+        },
+        {
+          title: '样品状态',
+          align: 'center',
+          dataIndex: 'sampleStatus_dictText'
+        },
+
+        {
+          title: '样品存放位置',
+          align: 'center',
+          dataIndex: 'samplePosition'
+        },
+        {
+          title: '备注',
+          align: 'center',
+          dataIndex: 'remark'
+        },
+        {
+          title: '操作',
+          dataIndex: 'action',
+          align: 'center',
+          fixed: 'right',
+          width: 147,
+          scopedSlots: { customRender: 'action' }
+        }
+      ],
+      url: {
+        list: '/inventory/itdmSampleInventory/list',
+        delete: '/inventory/itdmSampleInventory/delete',
+        deleteBatch: '/inventory/itdmSampleInventory/deleteBatch',
+        exportXlsUrl: '/inventory/itdmSampleInventory/exportXls',
+        importExcelUrl: 'inventory/itdmSampleInventory/importExcel'
+
+      },
+      dictOptions: {},
+      superFieldList: []
+    }
+  },
+  created() {
+    this.getSuperFieldList()
+
+  },
+  computed: {
+    importExcelUrl: function() {
+      return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`
+    }
+  },
+  methods: {
+
+    handletiaoma(record) {
+      this.$refs.blist.init(record.id)
+
+    },
+    initDictConfig() {
+    },
+    getSuperFieldList() {
+      let fieldList = []
+      fieldList.push({ type: 'string', value: 'sampleName', text: '样品名称', dictCode: '' })
+      fieldList.push({ type: 'string', value: 'sampleSpecifications', text: '样品规格', dictCode: '' })
+      fieldList.push({ type: 'int', value: 'sampleNum', text: '样品数量', dictCode: '' })
+      fieldList.push({ type: 'string', value: 'sampleManufacturer', text: '生产厂家', dictCode: '' })
+      fieldList.push({ type: 'string', value: 'batchNumber', text: '批次号', dictCode: '' })
+      fieldList.push({ type: 'string', value: 'sampleClassifications', text: '样品分类', dictCode: '' })
+      fieldList.push({ type: 'string', value: 'sampleUnit', text: '样品单位', dictCode: '' })
+      fieldList.push({ type: 'string', value: 'sampleStatus', text: '样品状态(是否损坏)', dictCode: '' })
+      fieldList.push({ type: 'string', value: 'samplePosition', text: '样品存放位置', dictCode: '' })
+      fieldList.push({ type: 'Text', value: 'remark', text: '备注', dictCode: '' })
+      this.superFieldList = fieldList
+    }
+  }
+}
+</script>
+<style scoped>
+@import '~@assets/less/common.less';
+</style>

+ 124 - 0
itdmWeb/src/views/module-iTDM/inventory/modules/ItdmInventoryLogForm.vue

@@ -0,0 +1,124 @@
+<template>
+  <a-spin :spinning="confirmLoading">
+    <j-form-container :disabled="formDisabled">
+      <a-form-model ref="form" :model="model" :rules="validatorRules" slot="detail">
+        <a-row>
+          <a-col :span="24">
+            <a-form-model-item label="类型(入库、出库)" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="type">
+              <j-search-select-tag v-model="model.type" dict="inventory_type" :disabled="true" />
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="条码" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="barCode">
+              <a-input v-model="model.barCode" placeholder="请输入条码"></a-input>
+            </a-form-model-item>
+          </a-col>
+
+
+          <a-col :span="24">
+            <a-form-model-item label="使用人员(入库借出和出库归还)" :labelCol="labelCol" :wrapperCol="wrapperCol"
+                               prop="useBy">
+              <j-select-user-by-dep v-model="model.useBy" :multi="true" />
+            </a-form-model-item>
+          </a-col>
+
+          <a-col :span="24">
+            <a-form-model-item label="备注" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="remark">
+              <a-input v-model="model.remark" placeholder="请输入备注"></a-input>
+            </a-form-model-item>
+          </a-col>
+        </a-row>
+      </a-form-model>
+    </j-form-container>
+  </a-spin>
+</template>
+
+<script>
+
+import { httpAction, getAction } from '@/api/manage'
+import { validateDuplicateValue } from '@/utils/util'
+
+export default {
+  name: 'ItdmInventoryLogForm',
+  components: {},
+  props: {
+    //表单禁用
+    disabled: {
+      type: Boolean,
+      default: false,
+      required: false
+    }
+  },
+  data() {
+    return {
+      model: {},
+      labelCol: {
+        xs: { span: 24 },
+        sm: { span: 5 }
+      },
+      wrapperCol: {
+        xs: { span: 24 },
+        sm: { span: 16 }
+      },
+      confirmLoading: false,
+      validatorRules: {},
+      url: {
+        add: '/inventory/itdmInventoryLog/add',
+        edit: '/inventory/itdmInventoryLog/edit',
+        queryById: '/inventory/itdmInventoryLog/queryById'
+      }
+    }
+  },
+  computed: {
+    formDisabled() {
+      return this.disabled
+    }
+  },
+  created() {
+    //备份model原始值
+    this.modelDefault = JSON.parse(JSON.stringify(this.model))
+  },
+  methods: {
+    add() {
+      this.edit(this.modelDefault)
+    },
+    edit(record) {
+      this.model = Object.assign({}, record)
+      this.visible = true
+    },
+    initModel(type){
+      this.model.type = type
+      console.log(this.model)
+    },
+    submitForm() {
+      const that = this
+      // 触发表单验证
+      this.$refs.form.validate(valid => {
+        if (valid) {
+          that.confirmLoading = true
+          let httpurl = ''
+          let method = ''
+          if (!this.model.id) {
+            httpurl += this.url.add
+            method = 'post'
+          } else {
+            httpurl += this.url.edit
+            method = 'put'
+          }
+          httpAction(httpurl, this.model, method).then((res) => {
+            if (res.success) {
+              that.$message.success(res.message)
+              that.$emit('ok')
+            } else {
+              that.$message.warning(res.message)
+            }
+          }).finally(() => {
+            that.confirmLoading = false
+          })
+        }
+
+      })
+    }
+  }
+}
+</script>

+ 84 - 0
itdmWeb/src/views/module-iTDM/inventory/modules/ItdmInventoryLogModal.Style#Drawer.vue

@@ -0,0 +1,84 @@
+<template>
+  <a-drawer
+    :title="title"
+    :width="width"
+    placement="right"
+    :closable="false"
+    @close="close"
+    destroyOnClose
+    :visible="visible">
+    <itdm-inventory-log-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit" normal></itdm-inventory-log-form>
+    <div class="drawer-footer">
+      <a-button @click="handleCancel" style="margin-bottom: 0;">关闭</a-button>
+      <a-button v-if="!disableSubmit"  @click="handleOk" type="primary" style="margin-bottom: 0;">提交</a-button>
+    </div>
+  </a-drawer>
+</template>
+
+<script>
+
+  import ItdmInventoryLogForm from './ItdmInventoryLogForm'
+
+  export default {
+    name: 'ItdmInventoryLogModal',
+    components: {
+      ItdmInventoryLogForm
+    },
+    data () {
+      return {
+        title:"操作",
+        width:800,
+        visible: false,
+        disableSubmit: false
+      }
+    },
+    methods: {
+      add () {
+        this.visible=true
+        this.$nextTick(()=>{
+          this.$refs.realForm.add();
+        })
+      },
+      edit (record) {
+        this.visible=true
+        this.$nextTick(()=>{
+          this.$refs.realForm.edit(record);
+        });
+      },
+      close () {
+        this.$emit('close');
+        this.visible = false;
+      },
+      submitCallback(){
+        this.$emit('ok');
+        this.visible = false;
+      },
+      handleOk () {
+        this.$refs.realForm.submitForm();
+      },
+      handleCancel () {
+        this.close()
+      }
+    }
+  }
+</script>
+
+<style lang="less" scoped>
+/** Button按钮间距 */
+  .ant-btn {
+    margin-left: 30px;
+    margin-bottom: 30px;
+    float: right;
+  }
+  .drawer-footer{
+    position: absolute;
+    bottom: -8px;
+    width: 100%;
+    border-top: 1px solid #e8e8e8;
+    padding: 10px 16px;
+    text-align: right;
+    left: 0;
+    background: #fff;
+    border-radius: 0 0 2px 2px;
+  }
+</style>

+ 66 - 0
itdmWeb/src/views/module-iTDM/inventory/modules/ItdmInventoryLogModal.vue

@@ -0,0 +1,66 @@
+<template>
+  <j-modal
+    :title="title"
+    :width="width"
+    :visible="visible"
+    switchFullscreen
+    @ok="handleOk"
+    :okButtonProps="{ class:{'jee-hidden': disableSubmit} }"
+    @cancel="handleCancel"
+    cancelText="关闭">
+    <itdm-inventory-log-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></itdm-inventory-log-form>
+  </j-modal>
+</template>
+
+<script>
+
+import ItdmInventoryLogForm from './ItdmInventoryLogForm'
+
+export default {
+  name: 'ItdmInventoryLogModal',
+  components: {
+    ItdmInventoryLogForm
+  },
+  data() {
+    return {
+      title: '',
+      width: 800,
+      visible: false,
+      disableSubmit: false
+    }
+  },
+  methods: {
+    add() {
+      this.visible = true
+      this.$nextTick(() => {
+        this.$refs.realForm.add()
+      })
+    },
+    edit(record) {
+      this.visible = true
+      this.$nextTick(() => {
+        this.$refs.realForm.edit(record)
+      })
+    },
+    initModel(type) {
+      this.$nextTick(() => {
+        this.$refs.realForm.initModel(type)
+      })
+    },
+    close() {
+      this.$emit('close')
+      this.visible = false
+    },
+    handleOk() {
+      this.$refs.realForm.submitForm()
+    },
+    submitCallback() {
+      this.$emit('ok')
+      this.visible = false
+    },
+    handleCancel() {
+      this.close()
+    }
+  }
+}
+</script>

+ 159 - 0
itdmWeb/src/views/module-iTDM/inventory/modules/ItdmSampleClassificationModal.vue

@@ -0,0 +1,159 @@
+<template>
+  <j-modal
+    :title="title"
+    :width="width"
+    :visible="visible"
+    :confirmLoading="confirmLoading"
+    switchFullscreen
+    @ok="handleOk"
+    @cancel="handleCancel"
+    cancelText="关闭">
+    <a-spin :spinning="confirmLoading">
+      <a-form-model ref="form" :model="model" :rules="validatorRules">
+        <a-form-model-item label="名称" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="name">
+          <a-input v-model="model.name" placeholder="请输入名称" ></a-input>
+        </a-form-model-item>
+        <a-form-model-item label="上级" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="pid">
+          <j-tree-select
+            ref="treeSelect"
+            placeholder="请选择上级"
+            v-model="model.pid"
+            dict="itdm_sample_classification,name,id"
+            pidField="pid"
+            pidValue="0"
+            hasChildField="has_child"
+            >
+          </j-tree-select>
+        </a-form-model-item>
+        <a-form-model-item label="状态" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="status">
+          <j-dict-select-tag type="list" v-model="model.status"  dictCode="sample_type_status" placeholder="请选择状态" />
+        </a-form-model-item>
+        <a-form-model-item label="备注" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="remark">
+          <a-input v-model="model.remark" placeholder="请输入备注" ></a-input>
+        </a-form-model-item>
+
+      </a-form-model>
+    </a-spin>
+  </j-modal>
+</template>
+
+<script>
+
+  import { httpAction } from '@/api/manage'
+  import { validateDuplicateValue } from '@/utils/util'
+  export default {
+    name: "ItdmSampleClassificationModal",
+    components: {
+    },
+    data () {
+      return {
+        title:"操作",
+        width:800,
+        visible: false,
+        model:{
+         },
+        labelCol: {
+          xs: { span: 24 },
+          sm: { span: 5 },
+        },
+        wrapperCol: {
+          xs: { span: 24 },
+          sm: { span: 16 },
+        },
+
+        confirmLoading: false,
+        validatorRules: {
+        },
+        url: {
+          add: "/inventory/itdmSampleClassification/add",
+          edit: "/inventory/itdmSampleClassification/edit",
+        },
+        expandedRowKeys:[],
+        pidField:"pid"
+
+      }
+    },
+    created () {
+       //备份model原始值
+       this.modelDefault = JSON.parse(JSON.stringify(this.model));
+    },
+    methods: {
+      add (obj) {
+        this.modelDefault.pid=''
+        this.edit(Object.assign(this.modelDefault , obj));
+      },
+      edit (record) {
+        this.model = Object.assign({}, record);
+        this.visible = true;
+      },
+      close () {
+        this.$emit('close');
+        this.visible = false;
+        this.$refs.form.clearValidate()
+      },
+      handleOk () {
+        const that = this;
+        // 触发表单验证
+       this.$refs.form.validate(valid => {
+          if (valid) {
+            that.confirmLoading = true;
+            let httpurl = '';
+            let method = '';
+            if(!this.model.id){
+              httpurl+=this.url.add;
+              method = 'post';
+            }else{
+              httpurl+=this.url.edit;
+               method = 'put';
+            }
+             if(this.model.id && this.model.id === this.model[this.pidField]){
+              that.$message.warning("父级节点不能选择自己");
+              that.confirmLoading = false;
+              return;
+            }
+            httpAction(httpurl,this.model,method).then((res)=>{
+              if(res.success){
+                that.$message.success(res.message);
+                this.$emit('ok');
+              }else{
+                that.$message.warning(res.message);
+              }
+            }).finally(() => {
+              that.confirmLoading = false;
+              that.close();
+            })
+          }else{
+             return false
+          }
+        })
+      },
+      handleCancel () {
+        this.close()
+      },
+      submitSuccess(formData,flag){
+        if(!formData.id){
+          let treeData = this.$refs.treeSelect.getCurrTreeData()
+          this.expandedRowKeys=[]
+          this.getExpandKeysByPid(formData[this.pidField],treeData,treeData)
+          this.$emit('ok',formData,this.expandedRowKeys.reverse());
+        }else{
+          this.$emit('ok',formData,flag);
+        }
+      },
+      getExpandKeysByPid(pid,arr,all){
+        if(pid && arr && arr.length>0){
+          for(let i=0;i<arr.length;i++){
+            if(arr[i].key==pid){
+              this.expandedRowKeys.push(arr[i].key)
+              this.getExpandKeysByPid(arr[i]['parentId'],all,all)
+            }else{
+              this.getExpandKeysByPid(pid,arr[i].children,all)
+            }
+          }
+        }
+      }
+
+
+    }
+  }
+</script>

+ 146 - 0
itdmWeb/src/views/module-iTDM/inventory/modules/ItdmSampleExpireForm.vue

@@ -0,0 +1,146 @@
+<template>
+  <a-spin :spinning="confirmLoading">
+    <j-form-container :disabled="formDisabled">
+      <a-form-model ref="form" :model="model" :rules="validatorRules" slot="detail">
+        <a-row>
+          <a-col :span="24">
+            <a-form-model-item label="样品条码列表" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="barCodes">
+              <a-select type="list_multi"
+                        mode="multiple"
+                        v-model="model.barCodes"
+                        value-in-value
+                        show-search
+                        :options="rukuSampleBarcodeOptions"
+                        placeholder="请选择样品条码列表" />
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="过期样品处理方式" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="handlingMethod">
+              <a-input v-model="model.handlingMethod" placeholder="请输入处理方式"  ></a-input>
+            </a-form-model-item>
+          </a-col>
+<!--          <a-col :span="24">-->
+<!--            <a-form-model-item label="审核状态" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="auditStatus">-->
+<!--              <j-dict-select-tag type="list" v-model="model.auditStatus" dictCode="audit_status" placeholder="请选择审核状态" :disabled="editdisabled"/>-->
+<!--            </a-form-model-item>-->
+<!--          </a-col>-->
+<!--          <a-col :span="24">-->
+<!--            <a-form-model-item label="拒绝原因" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="rejectReason">-->
+<!--              <a-input v-model="model.rejectReason" placeholder="请输入拒绝原因"  :disabled="editdisabled"></a-input>-->
+<!--            </a-form-model-item>-->
+<!--          </a-col>-->
+        </a-row>
+      </a-form-model>
+    </j-form-container>
+  </a-spin>
+</template>
+
+<script>
+
+  import { httpAction, getAction } from '@/api/manage'
+  import { validateDuplicateValue } from '@/utils/util'
+  import { rukuSampleBarcodeList } from '@/api/api'
+
+  export default {
+    name: 'ItdmSampleExpireForm',
+    components: {
+    },
+    props: {
+      //表单禁用
+      disabled: {
+        type: Boolean,
+        default: false,
+        required: false
+      },
+      //禁止编辑
+      editdisabled: {
+        type: Boolean,
+        default: false,
+        required: false
+      }
+    },
+    data () {
+      return {
+        rukuSampleBarcodeOptions : [],
+        model:{
+         },
+        labelCol: {
+          xs: { span: 24 },
+          sm: { span: 5 },
+        },
+        wrapperCol: {
+          xs: { span: 24 },
+          sm: { span: 16 },
+        },
+        confirmLoading: false,
+        validatorRules: {
+        },
+        url: {
+          add: "/inventory/itdmSampleExpire/add",
+          edit: "/inventory/itdmSampleExpire/edit",
+          queryById: "/inventory/itdmSampleExpire/queryById"
+        }
+      }
+    },
+    computed: {
+      formDisabled(){
+        return this.disabled
+      },
+    },
+    created () {
+      this.getSampleBarcodeList();//初始化已入库样品条码下拉列表
+       //备份model原始值
+      this.modelDefault = JSON.parse(JSON.stringify(this.model));
+    },
+    methods: {
+      // 获得已入库样品条码下拉列表,此方法要在created里,初始化时调用
+      getSampleBarcodeList(){
+        rukuSampleBarcodeList().then((res) =>{
+          this.rukuSampleBarcodeOptions = res.result.map( res => {
+            return{
+              value: res.barCode,
+              label: res.barCode,
+              // label: res.sampleName
+            }
+          })
+        })
+      },
+      add () {
+        this.edit(this.modelDefault);
+      },
+      edit (record) {
+        this.model = Object.assign({}, record);
+        this.visible = true;
+      },
+      submitForm () {
+        const that = this;
+        // 触发表单验证
+        this.$refs.form.validate(valid => {
+          if (valid) {
+            that.confirmLoading = true;
+            let httpurl = '';
+            let method = '';
+            if(!this.model.id){
+              httpurl+=this.url.add;
+              method = 'post';
+            }else{
+              httpurl+=this.url.edit;
+               method = 'put';
+            }
+            httpAction(httpurl,this.model,method).then((res)=>{
+              if(res.success){
+                that.$message.success(res.message);
+                that.$emit('ok');
+              }else{
+                that.$message.warning(res.message);
+              }
+            }).finally(() => {
+              that.confirmLoading = false;
+            })
+          }
+
+        })
+      },
+    }
+  }
+</script>

+ 111 - 0
itdmWeb/src/views/module-iTDM/inventory/modules/ItdmSampleExpireForm1.vue

@@ -0,0 +1,111 @@
+<template>
+  <a-spin :spinning="confirmLoading">
+    <j-form-container :disabled="formDisabled">
+      <a-form-model ref="form" :model="model" :rules="validatorRules" slot="detail">
+        <a-row>
+          <a-col :span="24">
+            <a-form-model-item label="拒绝原因" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="rejectReason">
+              <a-input v-model="model.rejectReason" placeholder="请输入拒绝原因"></a-input>
+            </a-form-model-item>
+          </a-col>
+        </a-row>
+      </a-form-model>
+    </j-form-container>
+  </a-spin>
+</template>
+
+<script>
+
+import { httpAction, getAction } from '@/api/manage'
+import { validateDuplicateValue } from '@/utils/util'
+
+export default {
+  name: 'ItdmSampleExpireForm1',
+  components: {
+  },
+  props: {
+    //表单禁用
+    disabled: {
+      type: Boolean,
+      default: false,
+      required: false
+    },
+    //禁止编辑
+    editdisabled: {
+      type: Boolean,
+      default: false,
+      required: false
+    }
+  },
+  data () {
+    return {
+      model:{
+      },
+      labelCol: {
+        xs: { span: 24 },
+        sm: { span: 5 },
+      },
+      wrapperCol: {
+        xs: { span: 24 },
+        sm: { span: 16 },
+      },
+      confirmLoading: false,
+      validatorRules: {
+      },
+      url: {
+        add: "/inventory/itdmSampleExpire/add",
+        edit: "/inventory/itdmSampleExpire/shenhe", //改为审核的接口
+        queryById: "/inventory/itdmSampleExpire/queryById"
+      }
+    }
+  },
+  computed: {
+    formDisabled(){
+      return this.disabled
+    },
+  },
+  created () {
+    //备份model原始值
+    this.modelDefault = JSON.parse(JSON.stringify(this.model));
+  },
+  methods: {
+    add () {
+      this.edit(this.modelDefault);
+    },
+    //编辑改为审核的接口
+    edit (record) {
+      this.model = Object.assign({}, record);
+      this.visible = true;
+    },
+    submitForm () {
+      const that = this;
+      // 触发表单验证
+      this.$refs.form.validate(valid => {
+        if (valid) {
+          that.confirmLoading = true;
+          let httpurl = '';
+          let method = '';
+          if(!this.model.id){
+            httpurl+=this.url.add;
+            method = 'post';
+          }else{
+            httpurl+=this.url.edit;
+            method = 'put';
+          }
+          httpAction(httpurl,this.model,method).then((res)=>{
+            if(res.success){
+              that.$message.success(res.message);
+              that.$emit('ok');
+            }else{
+              that.$message.warning(res.message);
+            }
+          }).finally(() => {
+            that.confirmLoading = false;
+          })
+        }
+
+      })
+    },
+  }
+}
+</script>

+ 84 - 0
itdmWeb/src/views/module-iTDM/inventory/modules/ItdmSampleExpireModal.Style#Drawer.vue

@@ -0,0 +1,84 @@
+<template>
+  <a-drawer
+    :title="title"
+    :width="width"
+    placement="right"
+    :closable="false"
+    @close="close"
+    destroyOnClose
+    :visible="visible">
+    <itdm-sample-expire-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit" normal></itdm-sample-expire-form>
+    <div class="drawer-footer">
+      <a-button @click="handleCancel" style="margin-bottom: 0;">关闭</a-button>
+      <a-button v-if="!disableSubmit"  @click="handleOk" type="primary" style="margin-bottom: 0;">提交</a-button>
+    </div>
+  </a-drawer>
+</template>
+
+<script>
+
+  import ItdmSampleExpireForm from './ItdmSampleExpireForm'
+
+  export default {
+    name: 'ItdmSampleExpireModal',
+    components: {
+      ItdmSampleExpireForm
+    },
+    data () {
+      return {
+        title:"操作",
+        width:800,
+        visible: false,
+        disableSubmit: false
+      }
+    },
+    methods: {
+      add () {
+        this.visible=true
+        this.$nextTick(()=>{
+          this.$refs.realForm.add();
+        })
+      },
+      edit (record) {
+        this.visible=true
+        this.$nextTick(()=>{
+          this.$refs.realForm.edit(record);
+        });
+      },
+      close () {
+        this.$emit('close');
+        this.visible = false;
+      },
+      submitCallback(){
+        this.$emit('ok');
+        this.visible = false;
+      },
+      handleOk () {
+        this.$refs.realForm.submitForm();
+      },
+      handleCancel () {
+        this.close()
+      }
+    }
+  }
+</script>
+
+<style lang="less" scoped>
+/** Button按钮间距 */
+  .ant-btn {
+    margin-left: 30px;
+    margin-bottom: 30px;
+    float: right;
+  }
+  .drawer-footer{
+    position: absolute;
+    bottom: -8px;
+    width: 100%;
+    border-top: 1px solid #e8e8e8;
+    padding: 10px 16px;
+    text-align: right;
+    left: 0;
+    background: #fff;
+    border-radius: 0 0 2px 2px;
+  }
+</style>

+ 62 - 0
itdmWeb/src/views/module-iTDM/inventory/modules/ItdmSampleExpireModal.vue

@@ -0,0 +1,62 @@
+<template>
+  <j-modal
+    :title="title"
+    :width="width"
+    :visible="visible"
+    switchFullscreen
+    @ok="handleOk"
+    :okButtonProps="{ class:{'jee-hidden': disableSubmit} }"
+    @cancel="handleCancel"
+    cancelText="关闭">
+    <itdm-sample-expire-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit" :editdisabled="editdisabled"></itdm-sample-expire-form>
+  </j-modal>
+</template>
+
+<script>
+
+  import ItdmSampleExpireForm from './ItdmSampleExpireForm'
+  export default {
+    name: 'ItdmSampleExpireModal',
+    components: {
+      ItdmSampleExpireForm
+    },
+    data () {
+      return {
+        title:'',
+        width:800,
+        visible: false,
+        disableSubmit: false,
+        editdisabled:false,
+      }
+    },
+    methods: {
+      add () {
+        this.visible=true
+        this.$nextTick(()=>{
+          this.$refs.realForm.add();
+        })
+      },
+      edit (record) {
+        this.editdisabled=true
+        this.visible=true
+        this.$nextTick(()=>{
+          this.$refs.realForm.edit(record);
+        })
+      },
+      close () {
+        this.$emit('close');
+        this.visible = false;
+      },
+      handleOk () {
+        this.$refs.realForm.submitForm();
+      },
+      submitCallback(){
+        this.$emit('ok');
+        this.visible = false;
+      },
+      handleCancel () {
+        this.close()
+      }
+    }
+  }
+</script>

+ 62 - 0
itdmWeb/src/views/module-iTDM/inventory/modules/ItdmSampleExpireModal1.vue

@@ -0,0 +1,62 @@
+<template>
+  <j-modal
+    :title="title"
+    :width="width"
+    :visible="visible"
+    switchFullscreen
+    @ok="handleOk"
+    :okButtonProps="{ class:{'jee-hidden': disableSubmit} }"
+    @cancel="handleCancel"
+    cancelText="关闭">
+    <itdm-sample-expire-form1  ref="realForm" @ok="submitCallback" :disabled="disableSubmit" :editdisabled="editdisabled"></itdm-sample-expire-form1>
+  </j-modal>
+</template>
+
+<script>
+
+import ItdmSampleExpireForm1 from './ItdmSampleExpireForm1'
+export default {
+  name: 'ItdmSampleExpireModal1',
+  components: {
+    ItdmSampleExpireForm1,
+  },
+  data () {
+    return {
+      title:'',
+      width:800,
+      visible: false,
+      disableSubmit: false,
+      editdisabled:false,
+    }
+  },
+  methods: {
+    add () {
+      this.visible=true
+      this.$nextTick(()=>{
+        this.$refs.realForm.add();
+      })
+    },
+    edit (record) {
+      this.editdisabled=true
+      this.visible=true
+      this.$nextTick(()=>{
+        this.$refs.realForm.edit(record);
+      })
+    },
+    close () {
+      this.$emit('close');
+      this.visible = false;
+    },
+    handleOk () {
+      this.$refs.realForm.submitForm();
+    },
+    submitCallback(){
+      this.$emit('ok');
+      this.visible = false;
+    },
+    handleCancel () {
+      this.close()
+    }
+  }
+}
+</script>

+ 114 - 0
itdmWeb/src/views/module-iTDM/inventory/modules/ItdmSampleExpireRealForm.vue

@@ -0,0 +1,114 @@
+<template>
+  <a-spin :spinning="confirmLoading">
+    <j-form-container :disabled="formDisabled">
+      <a-form-model ref="form" :model="model" :rules="validatorRules" slot="detail">
+        <a-row>
+          <a-col :span="24">
+            <a-form-model-item label="样品过期申请表id" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="expireId">
+              <a-input v-model="model.expireId" placeholder="请输入样品过期申请表id"  ></a-input>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="过期的样品条码id" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="barCode">
+              <j-search-select-tag v-model="model.barCode" dict=""  />
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="备注" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="remark">
+              <a-input v-model="model.remark" placeholder="请输入备注"  ></a-input>
+            </a-form-model-item>
+          </a-col>
+        </a-row>
+      </a-form-model>
+    </j-form-container>
+  </a-spin>
+</template>
+
+<script>
+
+  import { httpAction, getAction } from '@/api/manage'
+  import { validateDuplicateValue } from '@/utils/util'
+
+  export default {
+    name: 'ItdmSampleExpireRealForm',
+    components: {
+    },
+    props: {
+      //表单禁用
+      disabled: {
+        type: Boolean,
+        default: false,
+        required: false
+      }
+    },
+    data () {
+      return {
+        model:{
+         },
+        labelCol: {
+          xs: { span: 24 },
+          sm: { span: 5 },
+        },
+        wrapperCol: {
+          xs: { span: 24 },
+          sm: { span: 16 },
+        },
+        confirmLoading: false,
+        validatorRules: {
+        },
+        url: {
+          add: "/inventory/itdmSampleExpireReal/add",
+          edit: "/inventory/itdmSampleExpireReal/edit",
+          queryById: "/inventory/itdmSampleExpireReal/queryById"
+        }
+      }
+    },
+    computed: {
+      formDisabled(){
+        return this.disabled
+      },
+    },
+    created () {
+       //备份model原始值
+      this.modelDefault = JSON.parse(JSON.stringify(this.model));
+    },
+    methods: {
+      add () {
+        this.edit(this.modelDefault);
+      },
+      edit (record) {
+        this.model = Object.assign({}, record);
+        this.visible = true;
+      },
+      submitForm () {
+        const that = this;
+        // 触发表单验证
+        this.$refs.form.validate(valid => {
+          if (valid) {
+            that.confirmLoading = true;
+            let httpurl = '';
+            let method = '';
+            if(!this.model.id){
+              httpurl+=this.url.add;
+              method = 'post';
+            }else{
+              httpurl+=this.url.edit;
+               method = 'put';
+            }
+            httpAction(httpurl,this.model,method).then((res)=>{
+              if(res.success){
+                that.$message.success(res.message);
+                that.$emit('ok');
+              }else{
+                that.$message.warning(res.message);
+              }
+            }).finally(() => {
+              that.confirmLoading = false;
+            })
+          }
+         
+        })
+      },
+    }
+  }
+</script>

+ 84 - 0
itdmWeb/src/views/module-iTDM/inventory/modules/ItdmSampleExpireRealModal.Style#Drawer.vue

@@ -0,0 +1,84 @@
+<template>
+  <a-drawer
+    :title="title"
+    :width="width"
+    placement="right"
+    :closable="false"
+    @close="close"
+    destroyOnClose
+    :visible="visible">
+    <itdm-sample-expire-real-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit" normal></itdm-sample-expire-real-form>
+    <div class="drawer-footer">
+      <a-button @click="handleCancel" style="margin-bottom: 0;">关闭</a-button>
+      <a-button v-if="!disableSubmit"  @click="handleOk" type="primary" style="margin-bottom: 0;">提交</a-button>
+    </div>
+  </a-drawer>
+</template>
+
+<script>
+
+  import ItdmSampleExpireRealForm from './ItdmSampleExpireRealForm'
+
+  export default {
+    name: 'ItdmSampleExpireRealModal',
+    components: {
+      ItdmSampleExpireRealForm
+    },
+    data () {
+      return {
+        title:"操作",
+        width:800,
+        visible: false,
+        disableSubmit: false
+      }
+    },
+    methods: {
+      add () {
+        this.visible=true
+        this.$nextTick(()=>{
+          this.$refs.realForm.add();
+        })
+      },
+      edit (record) {
+        this.visible=true
+        this.$nextTick(()=>{
+          this.$refs.realForm.edit(record);
+        });
+      },
+      close () {
+        this.$emit('close');
+        this.visible = false;
+      },
+      submitCallback(){
+        this.$emit('ok');
+        this.visible = false;
+      },
+      handleOk () {
+        this.$refs.realForm.submitForm();
+      },
+      handleCancel () {
+        this.close()
+      }
+    }
+  }
+</script>
+
+<style lang="less" scoped>
+/** Button按钮间距 */
+  .ant-btn {
+    margin-left: 30px;
+    margin-bottom: 30px;
+    float: right;
+  }
+  .drawer-footer{
+    position: absolute;
+    bottom: -8px;
+    width: 100%;
+    border-top: 1px solid #e8e8e8;
+    padding: 10px 16px;
+    text-align: right;
+    left: 0;
+    background: #fff;
+    border-radius: 0 0 2px 2px;
+  }
+</style>

+ 60 - 0
itdmWeb/src/views/module-iTDM/inventory/modules/ItdmSampleExpireRealModal.vue

@@ -0,0 +1,60 @@
+<template>
+  <j-modal
+    :title="title"
+    :width="width"
+    :visible="visible"
+    switchFullscreen
+    @ok="handleOk"
+    :okButtonProps="{ class:{'jee-hidden': disableSubmit} }"
+    @cancel="handleCancel"
+    cancelText="关闭">
+    <itdm-sample-expire-real-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></itdm-sample-expire-real-form>
+  </j-modal>
+</template>
+
+<script>
+
+  import ItdmSampleExpireRealForm from './ItdmSampleExpireRealForm'
+  export default {
+    name: 'ItdmSampleExpireRealModal',
+    components: {
+      ItdmSampleExpireRealForm
+    },
+    data () {
+      return {
+        title:'',
+        width:800,
+        visible: false,
+        disableSubmit: false
+      }
+    },
+    methods: {
+      add () {
+        this.visible=true
+        this.$nextTick(()=>{
+          this.$refs.realForm.add();
+        })
+      },
+      edit (record) {
+        this.visible=true
+        this.$nextTick(()=>{
+          this.$refs.realForm.edit(record);
+        })
+      },
+      close () {
+        this.$emit('close');
+        this.visible = false;
+      },
+      handleOk () {
+        this.$refs.realForm.submitForm();
+      },
+      submitCallback(){
+        this.$emit('ok');
+        this.visible = false;
+      },
+      handleCancel () {
+        this.close()
+      }
+    }
+  }
+</script>

+ 177 - 0
itdmWeb/src/views/module-iTDM/inventory/modules/ItdmSampleInventoryForm.vue

@@ -0,0 +1,177 @@
+<template>
+  <a-spin :spinning="confirmLoading">
+    <j-form-container :disabled="formDisabled">
+      <a-form-model ref="form" :model="model" :rules="validatorRules" slot="detail">
+        <a-row>
+          <a-col :span="24">
+            <a-form-model-item label="样品名称" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="sampleName">
+              <a-input v-model="model.sampleName" placeholder="请输入样品名称"  ></a-input>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="样品规格" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="sampleSpecifications">
+              <a-input v-model="model.sampleSpecifications" placeholder="请输入样品规格"  ></a-input>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="生产厂家" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="sampleManufacturer">
+              <a-input v-model="model.sampleManufacturer" placeholder="请输入生产厂家"  ></a-input>
+            </a-form-model-item>
+          </a-col>
+
+
+          <a-col :span="24">
+            <a-form-model-item label="样品分类" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="sampleClassifications">
+              <j-tree-select
+                ref="treeSelect"
+                placeholder="请选择样品分类"
+                v-model="model.sampleClassifications"
+                dict="itdm_sample_classification,name,id"
+                pidField="pid"
+                pidValue="0"
+
+              >
+              </j-tree-select>
+            </a-form-model-item>
+          </a-col>
+
+          <a-col :span="24">
+            <a-form-model-item label="样品单位" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="sampleUnit">
+              <a-input v-model="model.sampleUnit" placeholder="请输入样品单位"  ></a-input>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="样品状态" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="sampleStatus">
+              <j-search-select-tag v-model="model.sampleStatus" dict="sample_status	"  />
+            </a-form-model-item>
+          </a-col>
+
+          <a-col :span="24">
+            <a-form-model-item label="样品存放位置" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="samplePosition">
+              <a-input v-model="model.samplePosition" placeholder="请输入样品存放位置"  ></a-input>
+            </a-form-model-item>
+          </a-col>
+
+          <a-col :span="24">
+            <a-form-model-item label="备注" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="remark">
+              <a-input v-model="model.remark" placeholder="请输入备注"  ></a-input>
+            </a-form-model-item>
+          </a-col>
+        </a-row>
+      </a-form-model>
+    </j-form-container>
+  </a-spin>
+</template>
+
+<script>
+
+  import { httpAction, getAction } from '@/api/manage'
+  import { validateDuplicateValue } from '@/utils/util'
+
+  export default {
+    name: 'ItdmSampleInventoryForm',
+    components: {
+    },
+    props: {
+      //表单禁用
+      disabled: {
+        type: Boolean,
+        default: false,
+        required: false
+      }
+    },
+    data () {
+      return {
+        model:{
+         },
+        labelCol: {
+          xs: { span: 24 },
+          sm: { span: 5 },
+        },
+        wrapperCol: {
+          xs: { span: 24 },
+          sm: { span: 16 },
+        },
+        confirmLoading: false,
+        validatorRules: {
+           sampleName: [
+              { required: true, message: '请输入样品名称!'},
+           ],
+           sampleSpecifications: [
+              { required: true, message: '请输入样品规格!'},
+           ],
+           sampleNum: [
+              { required: true, message: '请输入样品数量!'},
+           ],
+           sampleManufacturer: [
+              { required: true, message: '请输入生产厂家!'},
+           ],
+           sampleClassifications: [
+              { required: true, message: '请输入样品分类!'},
+           ],
+           sampleUnit: [
+              { required: true, message: '请输入样品单位!'},
+           ],
+           sampleStatus: [
+              { required: true, message: '请输入样品状态(是否损坏)!'},
+           ],
+           samplePosition: [
+              { required: true, message: '请输入样品存放位置!'},
+           ],
+        },
+        url: {
+          add: "/inventory/itdmSampleInventory/add",
+          edit: "/inventory/itdmSampleInventory/edit",
+          queryById: "/inventory/itdmSampleInventory/queryById"
+        }
+      }
+    },
+    computed: {
+      formDisabled(){
+        return this.disabled
+      },
+    },
+    created () {
+       //备份model原始值
+      this.modelDefault = JSON.parse(JSON.stringify(this.model));
+    },
+    methods: {
+      add () {
+        this.edit(this.modelDefault);
+      },
+      edit (record) {
+        this.model = Object.assign({}, record);
+        this.visible = true;
+      },
+      submitForm () {
+        const that = this;
+        // 触发表单验证
+        this.$refs.form.validate(valid => {
+          if (valid) {
+            that.confirmLoading = true;
+            let httpurl = '';
+            let method = '';
+            if(!this.model.id){
+              httpurl+=this.url.add;
+              method = 'post';
+            }else{
+              httpurl+=this.url.edit;
+               method = 'put';
+            }
+            httpAction(httpurl,this.model,method).then((res)=>{
+              if(res.success){
+                that.$message.success(res.message);
+                that.$emit('ok');
+              }else{
+                that.$message.warning(res.message);
+              }
+            }).finally(() => {
+              that.confirmLoading = false;
+            })
+          }
+
+        })
+      },
+    }
+  }
+</script>

+ 84 - 0
itdmWeb/src/views/module-iTDM/inventory/modules/ItdmSampleInventoryModal.Style#Drawer.vue

@@ -0,0 +1,84 @@
+<template>
+  <a-drawer
+    :title="title"
+    :width="width"
+    placement="right"
+    :closable="false"
+    @close="close"
+    destroyOnClose
+    :visible="visible">
+    <itdm-sample-inventory-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit" normal></itdm-sample-inventory-form>
+    <div class="drawer-footer">
+      <a-button @click="handleCancel" style="margin-bottom: 0;">关闭</a-button>
+      <a-button v-if="!disableSubmit"  @click="handleOk" type="primary" style="margin-bottom: 0;">提交</a-button>
+    </div>
+  </a-drawer>
+</template>
+
+<script>
+
+  import ItdmSampleInventoryForm from './ItdmSampleInventoryForm'
+
+  export default {
+    name: 'ItdmSampleInventoryModal',
+    components: {
+      ItdmSampleInventoryForm
+    },
+    data () {
+      return {
+        title:"操作",
+        width:800,
+        visible: false,
+        disableSubmit: false
+      }
+    },
+    methods: {
+      add () {
+        this.visible=true
+        this.$nextTick(()=>{
+          this.$refs.realForm.add();
+        })
+      },
+      edit (record) {
+        this.visible=true
+        this.$nextTick(()=>{
+          this.$refs.realForm.edit(record);
+        });
+      },
+      close () {
+        this.$emit('close');
+        this.visible = false;
+      },
+      submitCallback(){
+        this.$emit('ok');
+        this.visible = false;
+      },
+      handleOk () {
+        this.$refs.realForm.submitForm();
+      },
+      handleCancel () {
+        this.close()
+      }
+    }
+  }
+</script>
+
+<style lang="less" scoped>
+/** Button按钮间距 */
+  .ant-btn {
+    margin-left: 30px;
+    margin-bottom: 30px;
+    float: right;
+  }
+  .drawer-footer{
+    position: absolute;
+    bottom: -8px;
+    width: 100%;
+    border-top: 1px solid #e8e8e8;
+    padding: 10px 16px;
+    text-align: right;
+    left: 0;
+    background: #fff;
+    border-radius: 0 0 2px 2px;
+  }
+</style>

+ 60 - 0
itdmWeb/src/views/module-iTDM/inventory/modules/ItdmSampleInventoryModal.vue

@@ -0,0 +1,60 @@
+<template>
+  <j-modal
+    :title="title"
+    :width="width"
+    :visible="visible"
+    switchFullscreen
+    @ok="handleOk"
+    :okButtonProps="{ class:{'jee-hidden': disableSubmit} }"
+    @cancel="handleCancel"
+    cancelText="关闭">
+    <itdm-sample-inventory-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></itdm-sample-inventory-form>
+  </j-modal>
+</template>
+
+<script>
+
+  import ItdmSampleInventoryForm from './ItdmSampleInventoryForm'
+  export default {
+    name: 'ItdmSampleInventoryModal',
+    components: {
+      ItdmSampleInventoryForm
+    },
+    data () {
+      return {
+        title:'',
+        width:800,
+        visible: false,
+        disableSubmit: false
+      }
+    },
+    methods: {
+      add () {
+        this.visible=true
+        this.$nextTick(()=>{
+          this.$refs.realForm.add();
+        })
+      },
+      edit (record) {
+        this.visible=true
+        this.$nextTick(()=>{
+          this.$refs.realForm.edit(record);
+        })
+      },
+      close () {
+        this.$emit('close');
+        this.visible = false;
+      },
+      handleOk () {
+        this.$refs.realForm.submitForm();
+      },
+      submitCallback(){
+        this.$emit('ok');
+        this.visible = false;
+      },
+      handleCancel () {
+        this.close()
+      }
+    }
+  }
+</script>