Browse Source

Signed-off-by: liwb <804429021@qq.com>
修改入库

liwb 6 years ago
parent
commit
e5c4a10563

+ 1 - 0
src/dashoo.cn/backend/api/controllers/samplesinfo/samplespreinput.go

@@ -42,6 +42,7 @@ type AutoCodeStruct struct {
 // @Success 200 {object} controllers.Request
 // @router /list [get]
 func (this *SamplespreinputController) List() {
+	fmt.Print("cccccccccccccccc")
 	page := this.GetPageInfoForm()
 	where := " a.IState in (2,3,4,7,8) and a.DeletionStateCode=0 "
 	sampleCode := this.GetString("SampleCode")

+ 1 - 0
src/dashoo.cn/backend/api/controllers/samplesinfo/samplesubpackage.go

@@ -108,6 +108,7 @@ func (this *SampleSubpackageController) GetIdlist() {
 // @Success 200 {object} samplesubpackage.SampleSubpackage
 // @router /subpackagelist/:samplecode [get]
 func (this *SampleSubpackageController) SubpackageList() {
+	println("ddddddddd")
 	page := this.GetPageInfoForm()
 	var Samplesubpackagelist []samplesubpackage.SamplesDetailModel
 	svc := samplesubpackage.GetSampleSubpackageService(utils.DBE)

+ 98 - 87
src/dashoo.cn/frontend_web/src/pages/biobank/sampleRK/_opera/operation.vue

@@ -9,7 +9,7 @@
 
 <template>
   <div>
-    <el-card style="min-height: calc(100vh - 92px);">
+    <el-card style="height: calc(1000vh - 92px);">
       <div slot="header" style="height: 20px;">
         <span style="float: left;">
           <i class="icon icon-table2"></i>
@@ -144,7 +144,7 @@
                 <legend style="color:#436EEE"></legend>
                 <i class="icon icon-paragraph-justify">样本信息</i>
                 <span style="float: right;">
-                  <el-button type="primary" class="el-button--mini" @click="EquipmentlistShow" :disabled="SampleRKform.ApplyStatus != 0">样本存储</el-button>
+                  <el-button type="primary" class="el-button--mini" @click="EquipmentlistShow" :disabled="SampleRKform.ApplyStatus != 0">样本存储AAAAAA</el-button>
                 </span>
               </div>
               <el-table :data="SamplesList" border style="width: 100%" @selection-change="handleSelectionChange">
@@ -175,7 +175,7 @@
     </el-card>
 
     <!-- 获取容器列表 -->
-    <el-dialog title="样本存储" :visible.sync="Equipmentdialog">
+    <el-dialog title="样本存储BBB" :visible.sync="Equipmentdialog">
       <el-form :model="equipmentForm" :rules="storarules" ref="equipmentForm">
         <el-form-item label="选择存储容器" prop="EquipmentId" required label-width="120px">
           <el-select v-model="equipmentForm.EquipmentId" placeholder="请选择存储容器" style="width:100%">
@@ -241,9 +241,10 @@
   export default {
     name: 'materialdetect',
     components: {},
-    components: {},
-    data() {
+    data () {
       var checksampletype = (rule, value, callback) => {
+        console.log(rule, value, callback)
+        console.log('ccccccccccccccccc')
         if (!value) {
           callback(new Error('请选择存储容器'))
         } else {
@@ -265,22 +266,22 @@
         }
       }
       return {
-        pagetitle: '', //面包屑标题
-        service_flag: '', //页面新增或编辑标志位
+        pagetitle: '', // 面包屑标题
+        service_flag: '', // 页面新增或编辑标志位
         CurrentItemCount: 0, // 当前页显示数量
         CurrentPage: 1, // 当前页
         Size: 10,
         currentItemCount: 0, // 当前页显示数量
         currentPage: 1, // 当前页
         size: 10,
-        SamplesList: [], //选择样本列表
+        SamplesList: [], // 选择样本列表
         equipmentList: [],
         selectSamples: [],
         SampleRKform: {
           EntryNo: '',
           OperationBy: '',
-          ConUserId: '', //负责人ID
-          ConUserBy: '', //负责人
+          ConUserId: '', // 负责人ID
+          ConUserBy: '', // 负责人
           EntryTime: new Date(),
           ConTime: new Date(),
           ApplyStatus: 0,
@@ -299,7 +300,7 @@
         applyForm: {},
         sampletypelist: [],
         equipmentForm: {
-          EquipmentId: '',
+          EquipmentId: ''
         },
         storarules: {
           EquipmentId: [{
@@ -307,10 +308,10 @@
             trigger: 'blur'
           }]
         },
-        batchstorages: [], //批量存储的样本
+        batchstorages: [], // 批量存储的样本
         auditorShow: false,
         ParentId: 0,
-        authorSamples: [], //要审核的样本列表
+        authorSamples: [], // 要审核的样本列表
         shenheForm: {
           SuccessStatus: 0,
           AuditorRemark: ''
@@ -320,32 +321,32 @@
         password: '',
         isLoginSucceed: false,
         acceptUsers: [],
-        Getter: '', //接收人
-        GetterName: '', //接收人
+        Getter: '', // 接收人
+        GetterName: '', // 接收人
         samplesdetail: [],
-        selectcollection_flag: 0, //采集单选择按钮标志位,0:不可用;1:可用
+        selectcollection_flag: 0, // 采集单选择按钮标志位,0:不可用;1:可用
         CreateOn: [],
-        samplecodelist: [], //样本编码
+        samplecodelist: [], // 样本编码
         sampletypes: [], // 样本类型
         ServiceId: 0,
         permissionscode: {
           rkadd: 'biobank.sampleRK.add',
           rkedit: 'biobank.sampleRK.edit',
-          rkapprove: 'biobank.sampleRK.approve',
+          rkapprove: 'biobank.sampleRK.approve'
         },
         permissions: {
           'biobank.sampleRK.add': false,
           'biobank.sampleRK.edit': false,
-          'biobank.sampleRK.approve': false,
-        },
+          'biobank.sampleRK.approve': false
+        }
       }
     },
-    created() {
+    created () {
       let _this = this
       if (_this.$route.query.samplecodelist) {
         _this.samplecodelist = this.$route.query.samplecodelist
       }
-      _this.ServiceId = _this.$route.params.opera //主单id
+      _this.ServiceId = _this.$route.params.opera // 主单id
       // _this.filehost = process.env.imgserverhost
       if (_this.ServiceId && _this.ServiceId == 'addRK') {
         _this.pagetitle = '新增样本入库'
@@ -360,7 +361,7 @@
       }
       _this.getEntryNo()
       _this.getuserlist()
-      _this.getsamplelist() //获取样本列表
+      _this.getsamplelist() // 获取样本列表
       _this.getuserlist()
       _this.getEquiplist()
       _this.getPermissions()
@@ -371,14 +372,14 @@
       })
     },
     methods: {
-      getApplyInfo() {
+      getApplyInfo () {
         let _this = this // request
         let params = {
           Id: this.ServiceId
         }
         _this.$axios.get('/samplesapply/getapplyinfo', {
-            params
-          })
+          params
+        })
           .then(res => {
             _this.SampleRKform = res.data.items
             if (_this.SampleRKform.ApplyStatus == 0) {
@@ -402,27 +403,27 @@
             console.error(err)
           })
       },
-      //获取样本信息
-      getdetaillist() {
+      // 获取样本信息
+      getdetaillist () {
         let _this = this // request
         let params = {
           ParentId: this.ServiceId,
           _currentPage: this.CurrentPage,
-          _size: this.Size,
+          _size: this.Size
         }
-        _this.$axios.get("/samplesapply/applydetaillist", {
-            params
-          })
+        _this.$axios.get('/samplesapply/applydetaillist', {
+          params
+        })
           .then(res => {
             _this.ApplyList = res.data.items
             _this.CurrentItemCount = res.data.currentItemCount
           })
           .catch(function (error) {
-            console.log(error);
-          });
+            console.log(error)
+          })
       },
-      //自动生成单品交付单编号
-      getEntryNo() {
+      // 自动生成单品交付单编号
+      getEntryNo () {
         let _this = this
         if (_this.SampleRKform.EntryNo == '') {
           _this.$axios.get('orderadd/getOrderNumgene')
@@ -431,39 +432,45 @@
             })
         }
       },
-      //获取样本信息
-      getsamplelist() {
+      // 获取样本信息
+      getsamplelist () {
         let _this = this // request
         let params = {
           _currentPage: this.currentPage,
-          _size: this.size,
+          _size: this.size
         }
-        if (_this.samplecodelist == "") {
-          _this.$axios.get("/samplepreinput/list", {
-              params
-            })
+        if (_this.samplecodelist.length === 0) {
+          console.log('samplecodelist.length === 0')
+          _this.$axios.get('/samplepreinput/list', {
+            params
+          })
             .then(res => {
               _this.SamplesList = res.data.items
               _this.currentItemCount = res.data.currentItemCount
+              console.log('samplecodelist.length === 0')
+              console.log(_this.SamplesList)
+              console.log(_this.currentItemCount)
             })
             .catch(function (error) {
-              console.log(error);
-            });
+              console.log(error)
+            })
         } else {
+          console.log(_this.SamplesList)
+          console.log('else')
           _this.$axios.get('samplesubpackage/subpackagelist/' + _this.samplecodelist, {
-              params
-            })
+            params
+          })
             .then(res => {
               _this.SamplesList = res.data.items
               _this.currentItemCount = res.data.currentItemCount
             })
             .catch(function (error) {
-              console.log(error);
-            });
+              console.log(error)
+            })
         }
       },
       // 获取容器列表
-      getEquiplist() {
+      getEquiplist () {
         let _this = this
         _this.$axios.get('/equipment/elist', {})
           .then(res => {
@@ -479,9 +486,12 @@
             console.error(err)
           })
       },
+  
       // 打开容器弹窗 选择存储位置
-      EquipmentlistShow() {
+      EquipmentlistShow () {
         let _this = this
+        console.log('_this.service_flag')
+        console.log(_this.service_flag)
         if (_this.selectSamples.length < 1) {
           _this.$message({
             type: 'warning',
@@ -489,19 +499,21 @@
           })
           return
         }
-        if (_this.service_flag == 'editRK') {
+        if (_this.service_flag === 'editRK') {
           _this.SampleRKform.ConUserBy = _this.$refs.reflrrselect.selectedLabel
         }
-        //拼接样本与主申请单信息
+        // 拼接样本与主申请单信息
         for (var i = 0; i < _this.selectSamples.length; i++) {
           _this.selectSamples[i] = Object.assign(_this.selectSamples[i], _this.SampleRKform)
         }
         _this.Equipmentdialog = true
       },
-      chooseEquip() {
+      chooseEquip () {
         this.$refs['equipmentForm'].validate((valid) => {
           if (valid) {
             store.set('batchstorages', this.selectSamples)
+            console.log('cccccccccc')
+            console.log(this.equipmentForm.EquipmentId)
             this.$router.push({
               path: `/equipment/${this.equipmentForm.EquipmentId}/manage_new?batchitem=1&desc='样本入库'&apply=1`
             })
@@ -528,13 +540,13 @@
       //   }
       //   _this.auditorShow = true
       // },
-      auditor() {
+      auditor () {
         let _this = this
-        _this.$confirm("确定审核该入库申请单?审核后所有信息将不可修改!", "提示", {
-            confirmButtonText: "确定",
-            cancelButtonText: "取消",
-            type: "warning"
-          })
+        _this.$confirm('确定审核该入库申请单?审核后所有信息将不可修改!', '提示', {
+          confirmButtonText: '确定',
+          cancelButtonText: '取消',
+          type: 'warning'
+        })
           .then(() => {
             if (_this.shenheForm.SuccessStatus == 1) {
               _this.SampleRKform.ApplyStatus = 3
@@ -548,7 +560,7 @@
           })
           .catch(() => {})
       },
-      saveauditor() {
+      saveauditor () {
         let _this = this
         let params = _this.SampleRKform
         _this.$axios.put('/samplesapply/auditorrk/' + _this.ServiceId, params)
@@ -604,7 +616,7 @@
       // authorSelectionChange(val) {
       //   this.authorSamples = val
       // },
-      getuserlist() {
+      getuserlist () {
         this.$axios.get('users/list', {})
           .then(res => {
             // response
@@ -623,33 +635,33 @@
             console.error(err)
           })
       },
-      numtoupchar(num) {
-        return String.fromCharCode(64 + parseInt(num));
+      numtoupchar (num) {
+        return String.fromCharCode(64 + parseInt(num))
       },
-      postiontoupchar(postion) {
-        let pos = postion.split(";");
+      postiontoupchar (postion) {
+        let pos = postion.split(';')
         if (pos.length === 2) {
-          return this.numtoupchar(pos[1]) + pos[0];
+          return this.numtoupchar(pos[1]) + pos[0]
         } else {
-          return postion;
+          return postion
         }
       },
-      //获取权限
-      getPermissions() {
+      // 获取权限
+      getPermissions () {
         let _this = this
         // request
         let params = {
           percodes: `'${this.permissionscode.rkadd}','${this.permissionscode.rkedit}','${this.permissionscode.rkapprove}'`
         }
         this.$axios.get('/permissions/isauths', {
-            params
-          })
+          params
+        })
           .then(res => {
             if (res.data instanceof Array && res.data.length > 0) {
               console.log(res.data)
               res.data.forEach(element => {
                 _this.permissions[element.Code] = element.Isperm
-              });
+              })
             }
           })
           .catch(err => {
@@ -657,18 +669,18 @@
             console.error(err)
           })
       },
-      handleSelectionChange(val) {
+      handleSelectionChange (val) {
         this.selectSamples = val
       },
-      contains(strs, str) {
+      contains (strs, str) {
         let arrs = strs.split(',')
         for (let v in arrs) {
           if (arrs[v] === (str + '')) return true
         }
         return false
       },
-      //登陆
-      selectGetter() {
+      // 登陆
+      selectGetter () {
         if (this.Getter != this.authUser.Profile.Id) {
           this.loginDialogVisible = true
         }
@@ -678,7 +690,7 @@
           }
         }
       },
-      cancelLogin() {
+      cancelLogin () {
         if (this.isLoginSucceed) {
           this.isLoginSucceed = false
         } else {
@@ -686,13 +698,13 @@
         }
         this.loginDialogVisible = false
       },
-      confirmLogin() {
+      confirmLogin () {
         let _this = this
         let fields = {
           username: this.username,
-          password: this.password,
+          password: this.password
         }
-        this.$axios.post("/users/checkUserPwd?RealName=" + this.GetterName, fields)
+        this.$axios.post('/users/checkUserPwd?RealName=' + this.GetterName, fields)
           .then(res => {
             if (res.data.code == 0) {
               _this.loginDialogVisible = false
@@ -710,27 +722,26 @@
             console.error(err)
           })
       },
-      HandleCurrentChange(value) {
+      HandleCurrentChange (value) {
         this.CurrentPage = value
         this.getdetaillist()
       },
-      HandleSizeChange(value) {
+      HandleSizeChange (value) {
         this.Size = value
         this.CurrentPage = 1
         this.getdetaillist()
       },
-      handleCurrentChange(value) {
+      handleCurrentChange (value) {
         this.currentPage = value
         this.getsamplelist()
       },
-      handleSizeChange(value) {
+      handleSizeChange (value) {
         this.size = value
         this.currentPage = 1
         this.getsamplelist()
-      },
+      }
     }
   }
-
 </script>
 
 <style lang="scss">

+ 68 - 69
src/dashoo.cn/frontend_web/src/pages/biobank/sampleRK/index.vue

@@ -76,7 +76,7 @@
         <el-form-item label="审核状态">
           <template>
             <el-radio class="radio" v-model="shenheForm.SuccessStatus" :label="2">审核通过</el-radio>
-            <el-radio class="radio" v-model="shenheForm.SuccessStatus" :label="3">审核异常</el-radio>
+            <el-radio class="radio" v-model="shenheForm.SuccessStatus" :label="3">审核异+++++常</el-radio>
           </template>
         </el-form-item>
         <el-form-item label="审核说明">
@@ -146,35 +146,35 @@
     computed: {
       ...mapGetters({
         authUser: 'authUser'
-      }),
+      })
     },
-    data() {
+    data () {
       return {
         dialogVisible: false,
         size: 10,
         currentItemCount: 0,
         currentPage: 1,
         downloading: '',
-        //查询
+        // 查询
         searchForm: {
           ApplyType: 1,
-          entryno: '', //入库单号
+          entryno: '', // 入库单号
           operationby: '',
-          ApplyStatus: '', //是否审核  0 未审核  1已审核
-          //EntryTime: new Date(), //入库时间
-          ConUserBy: '', //负责人
+          ApplyStatus: '', // 是否审核  0 未审核  1已审核
+          // EntryTime: new Date(), //入库时间
+          ConUserBy: '', // 负责人
           ConUserId: ''
         },
         EntryTime: [new Date(new Date().getTime() - 30 * 24 * 60 * 60 * 1000), new Date()], // 签订日期
         userlist: [],
         clearable: false,
-        RKList: [], //入库列表
+        RKList: [], // 入库列表
         selectSamples: [],
         shenheForm: {
           SuccessStatus: 2,
           AuditorRemark: ''
         },
-        //列表排序
+        // 列表排序
         Column: {
           Order: '',
           Prop: ''
@@ -184,25 +184,25 @@
           rkadd: 'biobank.sampleRK.add',
           rkedit: 'biobank.sampleRK.edit',
           rkdelete: 'biobank.sampleRK.delete',
-          rkapprove: 'biobank.sampleRK.approve',
+          rkapprove: 'biobank.sampleRK.approve'
         },
         permissions: {
           'biobank.sampleRK.add': false,
           'biobank.sampleRK.edit': false,
           'biobank.sampleRK.delete': false,
-          'biobank.sampleRK.approve': false,
-        },
+          'biobank.sampleRK.approve': false
+        }
       }
     },
-    created() {
+    created () {
       this.initdata()
-      this.getuserlist() //负责人下拉
+      this.getuserlist() // 负责人下拉
       this.getPermissions()
     },
     methods: {
-      //获取入库单列表
-      initdata() {
-        let _this = this;
+      // 获取入库单列表
+      initdata () {
+        let _this = this
         let EntryTime = []
         if (!_this.EntryTime) {
           _this.EntryTime = []
@@ -226,25 +226,25 @@
         }
         Object.assign(params, this.searchForm)
         _this.$axios.get('/samplesapply/samplesapplylist?EntryTime=' + EntryTime.join(','), {
-            params
-          })
+          params
+        })
           .then(function (response) {
             _this.RKList = response.data.items
             _this.currentItemCount = response.data.currentItemCount
           })
           .catch(function (error) {
-            console.log(error);
-          });
+            console.log(error)
+          })
       },
-      searchCommand(command) {
+      searchCommand (command) {
         if (command == 'search') {
           this.dialogVisible = true
         } else if (command == 'clear') {
           this.clearSearch()
         }
       },
-      //清空查询结构体
-      clearSearch() {
+      // 清空查询结构体
+      clearSearch () {
         this.searchForm.entryno = ''
         this.searchForm.operationby = ''
         this.EntryTime = []
@@ -253,8 +253,8 @@
         this.searchForm.ConUserId = ''
         this.initdata()
       },
-      //获取人员列表
-      getuserlist() {
+      // 获取人员列表
+      getuserlist () {
         let _this = this
         _this.$axios.get('users/list', {})
           .then(res => {
@@ -270,21 +270,21 @@
             console.error(err)
           })
       },
-      //获取权限
-      getPermissions() {
+      // 获取权限
+      getPermissions () {
         let _this = this
         // request
         let params = {
           percodes: `'${this.permissionscode.rkadd}','${this.permissionscode.rkedit}','${this.permissionscode.rkdelete}','${this.permissionscode.rkapprove}'`
         }
         this.$axios.get('/permissions/isauths', {
-            params
-          })
+          params
+        })
           .then(res => {
             if (res.data instanceof Array && res.data.length > 0) {
               res.data.forEach(element => {
                 _this.permissions[element.Code] = element.Isperm
-              });
+              })
             }
           })
           .catch(err => {
@@ -292,11 +292,11 @@
             console.error(err)
           })
       },
-      handleSelectionChange(val) {
+      handleSelectionChange (val) {
         this.selectSamples = val
       },
       // 打开审核弹窗
-      auditorshow() {
+      auditorshow () {
         let _this = this
         if (_this.selectSamples.length < 1) {
           _this.$message({
@@ -307,20 +307,20 @@
         }
         _this.auditorShow = true
       },
-      makesure() {
+      makesure () {
         let _this = this
-        _this.$confirm("确定审核该入库申请单?审核后所有信息将不可修改!", "提示", {
-            confirmButtonText: "确定",
-            cancelButtonText: "取消",
-            type: "warning"
-          })
+        _this.$confirm('确定审核该入库申请单?审核后所有信息将不可修改!', '提示', {
+          confirmButtonText: '确定',
+          cancelButtonText: '取消',
+          type: 'warning'
+        })
           .then(() => {
             _this.auditorShow = false
             _this.saveauditor()
           })
           .catch(() => {})
       },
-      saveauditor() {
+      saveauditor () {
         let _this = this
         let params = _this.shenheForm
         params = Object.assign(params, {
@@ -347,16 +347,16 @@
             console.error(err)
           })
       },
-      RePeal(val) {
-        let _this = this;
-        _this.$confirm("此操作撤销该申请, 是否继续?", "提示", {
-            confirmButtonText: "确定",
-            cancelButtonText: "取消",
-            type: "warning"
-          })
+      RePeal (val) {
+        let _this = this
+        _this.$confirm('此操作撤销该申请, 是否继续?', '提示', {
+          confirmButtonText: '确定',
+          cancelButtonText: '取消',
+          type: 'warning'
+        })
           .then(() => {
             let params = val
-            _this.$axios.put("samplesapply/repealapply/" + val.Id, params)
+            _this.$axios.put('samplesapply/repealapply/' + val.Id, params)
               .then(res => {
                 // response
                 if (res.data.code === 0) {
@@ -373,13 +373,13 @@
                 }
               })
               .catch(function (error) {
-                console.log(error);
-              });
+                console.log(error)
+              })
           })
-          .catch(() => {});
+          .catch(() => {})
       },
-      //列表排序功能
-      orderby(column) {
+      // 列表排序功能
+      orderby (column) {
         if (column.order == 'ascending') {
           this.Column.Order = 'asc'
         } else if (column.order == 'descending') {
@@ -388,20 +388,20 @@
         this.Column.Prop = column.prop
         this.initdata()
       },
-      seachdata() {
+      seachdata () {
         this.currentPage = 1
         this.initdata()
       },
-      handleSizeChange(val) {
+      handleSizeChange (val) {
         this.size = val
         this.currentPage = 1
         this.initdata()
       },
-      handleCurrentChange(val) {
+      handleCurrentChange (val) {
         this.currentPage = val
         this.initdata()
       },
-      jstimehandle(val) {
+      jstimehandle (val) {
         if (val === '') {
           return '----'
         } else if (val === '0001-01-01T08:00:00+08:00') {
@@ -413,20 +413,19 @@
           return val.substring(0, 19)
         }
       },
-      formatDateTime(date) {
-        var y = date.getFullYear();
-        var m = date.getMonth() + 1;
-        m = m < 10 ? ('0' + m) : m;
-        var d = date.getDate();
-        d = d < 10 ? ('0' + d) : d;
-        var h = date.getHours();
-        var minute = date.getMinutes();
-        minute = minute < 10 ? ('0' + minute) : minute;
-        return y + '-' + m + '-' + d + ' ' + h + ':' + minute;
+      formatDateTime (date) {
+        var y = date.getFullYear()
+        var m = date.getMonth() + 1
+        m = m < 10 ? ('0' + m) : m
+        var d = date.getDate()
+        d = d < 10 ? ('0' + d) : d
+        var h = date.getHours()
+        var minute = date.getMinutes()
+        minute = minute < 10 ? ('0' + minute) : minute
+        return y + '-' + m + '-' + d + ' ' + h + ':' + minute
       }
     }
   }
-
 </script>
 
 <style lang="scss">

+ 1 - 1
src/dashoo.cn/frontend_web/src/pages/index.vue

@@ -82,7 +82,7 @@
         <div class="salesCard">
           <el-col :span="16" style="margin-top: 20px">
             <div v-if="groupList && groupList.length === 0">无显示数据,可在
-              <router-link :to="'/setting/systemitems'">数据字典</router-link> 中录入</div>
+              <router-link :to="'/setting/items'">数据字典</router-link> 中录入</div>
             <div id="GroupBar" style="height:380px; margin-left:-25px; margin-top:10px; min-width:400px; width: 900px">
             </div>
           </el-col>