Pārlūkot izejas kodu

添加打印模版和PC端自动扣减

csx 5 gadus atpakaļ
vecāks
revīzija
768258c4ce

+ 2 - 1
build/utils.js Parādīt failu

@@ -47,7 +47,8 @@ exports.cssLoaders = function (options) {
47 47
     if (options.extract) {
48 48
       return ExtractTextPlugin.extract({
49 49
         use: loaders,
50
-        fallback: 'vue-style-loader'
50
+        fallback: 'vue-style-loader',
51
+        publicPath: '../../'
51 52
       })
52 53
     } else {
53 54
       return ['vue-style-loader'].concat(loaders)

+ 12 - 12
package-lock.json Parādīt failu

@@ -469,8 +469,8 @@
469 469
     },
470 470
     "async-validator": {
471 471
       "version": "1.8.5",
472
-      "resolved": "https://registry.npmjs.org/async-validator/-/async-validator-1.8.5.tgz",
473
-      "integrity": "sha512-tXBM+1m056MAX0E8TL2iCjg8WvSyXu0Zc8LNtYqrVeyoL3+esHRZ4SieE9fKQyyU09uONjnMEjrNBMqT0mbvmA==",
472
+      "resolved": "https://registry.npm.taobao.org/async-validator/download/async-validator-1.8.5.tgz",
473
+      "integrity": "sha1-3D4I7B/Q3dtn5ghC8CwM0c7G1/A=",
474 474
       "requires": {
475 475
         "babel-runtime": "6.x"
476 476
       }
@@ -3179,8 +3179,8 @@
3179 3179
     },
3180 3180
     "deepmerge": {
3181 3181
       "version": "1.5.2",
3182
-      "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-1.5.2.tgz",
3183
-      "integrity": "sha512-95k0GDqvBjZavkuvzx/YqVLv/6YYa17fz6ILMSf7neqQITCPbnfEnQvEgMPNjH4kgobe7+WIL0yJEHku+H3qtQ=="
3182
+      "resolved": "https://registry.npm.taobao.org/deepmerge/download/deepmerge-1.5.2.tgz",
3183
+      "integrity": "sha1-EEmdhohEza1P7ghC34x/bwyVp1M="
3184 3184
     },
3185 3185
     "define-properties": {
3186 3186
       "version": "1.1.3",
@@ -3507,9 +3507,9 @@
3507 3507
       "dev": true
3508 3508
     },
3509 3509
     "element-ui": {
3510
-      "version": "2.7.2",
3511
-      "resolved": "https://registry.npmjs.org/element-ui/-/element-ui-2.7.2.tgz",
3512
-      "integrity": "sha512-Exh9QTkm9gwMMPzg1TyaTlBKyr3k4K9XcC5vl0A/mneDvJX//RsURGuOWsCNDVQMdhh5h9e+W5icosh+pKfbCg==",
3510
+      "version": "2.12.0",
3511
+      "resolved": "https://registry.npm.taobao.org/element-ui/download/element-ui-2.12.0.tgz",
3512
+      "integrity": "sha1-qJO8Ea5Pfbt+nVQWBvI+ZD8THuQ=",
3513 3513
       "requires": {
3514 3514
         "async-validator": "~1.8.1",
3515 3515
         "babel-helper-vue-jsx-merge-props": "^2.0.0",
@@ -7928,7 +7928,7 @@
7928 7928
     },
7929 7929
     "normalize-wheel": {
7930 7930
       "version": "1.0.1",
7931
-      "resolved": "https://registry.npmjs.org/normalize-wheel/-/normalize-wheel-1.0.1.tgz",
7931
+      "resolved": "http://registry.npm.taobao.org/normalize-wheel/download/normalize-wheel-1.0.1.tgz",
7932 7932
       "integrity": "sha1-rsiGr/2wRQcNhWRH32Ls+GFG7EU="
7933 7933
     },
7934 7934
     "normalize.css": {
@@ -11880,8 +11880,8 @@
11880 11880
     },
11881 11881
     "resize-observer-polyfill": {
11882 11882
       "version": "1.5.1",
11883
-      "resolved": "https://registry.npmjs.org/resize-observer-polyfill/-/resize-observer-polyfill-1.5.1.tgz",
11884
-      "integrity": "sha512-LwZrotdHOo12nQuZlHEmtuXdqGoOD0OhaxopaNFxWzInpEgaLWoVuAMbTzixuosCx2nEG58ngzW3vxdWoxIgdg=="
11883
+      "resolved": "http://registry.npm.taobao.org/resize-observer-polyfill/download/resize-observer-polyfill-1.5.1.tgz",
11884
+      "integrity": "sha1-DpAg3T0hAkRY1OvSfiPkAmmBBGQ="
11885 11885
     },
11886 11886
     "resolve": {
11887 11887
       "version": "1.10.0",
@@ -13536,8 +13536,8 @@
13536 13536
     },
13537 13537
     "throttle-debounce": {
13538 13538
       "version": "1.1.0",
13539
-      "resolved": "https://registry.npmjs.org/throttle-debounce/-/throttle-debounce-1.1.0.tgz",
13540
-      "integrity": "sha512-XH8UiPCQcWNuk2LYePibW/4qL97+ZQ1AN3FNXwZRBNPPowo/NRU5fAlDCSNBJIYCKbioZfuYtMhG4quqoJhVzg=="
13539
+      "resolved": "http://registry.npm.taobao.org/throttle-debounce/download/throttle-debounce-1.1.0.tgz",
13540
+      "integrity": "sha1-UYU9o3vmihVctugns1FKPEIuic0="
13541 13541
     },
13542 13542
     "through": {
13543 13543
       "version": "2.3.8",

+ 1 - 1
package.json Parādīt failu

@@ -45,7 +45,7 @@
45 45
     "driver.js": "0.5.2",
46 46
     "dropzone": "5.2.0",
47 47
     "echarts": "3.8.5",
48
-    "element-ui": "^2.7.2",
48
+    "element-ui": "^2.12.0",
49 49
     "file-saver": "1.3.3",
50 50
     "font-awesome": "4.7.0",
51 51
     "js-cookie": "2.2.0",

+ 18 - 0
src/api/data.js Parādīt failu

@@ -47,3 +47,21 @@ export function updateFieldIsShow(id,is_show) {
47 47
     method: 'post',
48 48
   })
49 49
 }
50
+
51
+
52
+
53
+
54
+
55
+export function postPrintTemplate(params) {
56
+  return request({
57
+    url: '/api/print/template/commit?template_id='+params,
58
+    method: 'post',
59
+  })
60
+}
61
+
62
+export function getPrintTemplate() {
63
+  return request({
64
+    url: '/api/print/template/get',
65
+    method: 'get',
66
+  })
67
+}

Binārs
src/assets/home/1.jpg Parādīt failu


Binārs
src/assets/home/2.jpg Parādīt failu


Binārs
src/assets/home/5.jpg Parādīt failu


+ 1 - 0
src/icons/svg/system.svg Parādīt failu

@@ -0,0 +1 @@
1
+<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1569292702427" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="4856" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><defs><style type="text/css"></style></defs><path d="M1017.377674 456.010825c-3.988848-22.373567-25.431206-44.900629-47.617507-49.979298l-16.45067-3.802606c-39.015595-11.780301-73.665767-37.860283-95.66685-75.9416-22.185278-38.356586-27.235294-81.920778-17.633612-121.807207l4.860704-15.611559c6.66991-21.719674-1.994424-51.633984-19.256576-66.345034 0 0-15.643282-13.20986-59.709917-38.699394-44.060495-25.457812-63.191204-32.410154-63.191204-32.410154-21.37789-7.726985-51.54291-0.37146-66.99688 16.32992l-11.594059 12.462846c-29.665647 28.045753-69.645197 45.215808-113.584941 45.215808-44.152593 0-84.258009-17.294898-113.954355-45.526893L385.393999 67.804269c-15.393595-16.669658-45.591361-24.056905-66.967204-16.325827 0 0-19.131733 6.915503-63.290465 32.405037-43.996027 25.490557-59.546188 38.639019-59.546188 38.639019-17.326621 14.71105-26.019607 44.500517-19.289322 66.313312l4.827959 15.769149c9.474792 39.853683 4.364401 83.325777-17.633612 121.653711-22.063505 38.235836-57.056484 64.380286-96.228645 76.030627L51.186288 405.967058c-22.090111 5.050016-43.564191 27.608801-47.553039 49.950645 0 0-3.613294 20.09978-3.613294 71.109548 0 51.012837 3.613294 71.019497 3.613294 71.019497 4.02057 22.434965 25.461905 44.933375 47.553039 50.105165l15.708773 3.492544c39.325657 11.713786 74.411757 37.95238 96.600105 76.343759 22.091134 38.327934 27.14115 81.892125 17.573237 121.779577l-4.767584 15.579837c-6.730285 21.686928 1.962701 51.601238 19.349697 66.309218 0 0 15.551184 13.21293 59.644425 38.702464 44.093241 25.551956 63.164598 32.411177 63.164598 32.411177 21.408589 7.726985 51.509141 0.311085 66.967204-16.269545l11.06194-11.902074c29.697369-28.355815 69.829392-45.617967 114.047476-45.617967 44.189432 0 84.387969 17.386996 114.210181 45.617967l0.027629 0 10.940167 11.902074c15.45397 16.58063 45.493124 23.99653 66.930365 16.269545 0 0 19.071358-6.979972 63.321164-32.411177 44.002167-25.489534 59.579957-38.702464 59.579957-38.702464 17.328667-14.70798 25.928532-44.496423 19.323091-66.309218l-4.860704-16.080234c-9.349949-39.761586-4.239558-83.139535 17.633612-121.279181 22.25077-38.452777 57.277518-64.569598 96.538707-76.343759l0-0.065492 15.705704-3.612271c22.187325-5.051039 43.62866-27.545356 47.615461-49.983391 0 0 3.613294-20.068058 3.613294-71.109548C1020.990968 476.078883 1017.377674 456.010825 1017.377674 456.010825zM510.507508 691.592284c-90.588181 0-164.067706-73.665767-164.067706-164.532287 0-90.741677 73.478502-164.342975 164.067706-164.342975 90.584088 0 163.970492 73.633021 163.970492 164.467819C674.478 618.052384 601.091596 691.592284 510.507508 691.592284z" p-id="4857"></path></svg>

+ 3 - 0
src/lang/zh.js Parādīt failu

@@ -156,6 +156,9 @@ export default {
156 156
 
157 157
     showconfig:'显示配置',
158 158
     user_detail:'使用明细',
159
+    systemManage:'系统管理',
160
+    printTemplate:'打印模版',
161
+
159 162
 
160 163
   },
161 164
   navbar: {

+ 7 - 3
src/router/index.js Parādīt failu

@@ -14,6 +14,9 @@ import weight_sign from './modules/weight_sign'
14 14
 import workforce from './modules/workforce'
15 15
 import service from './modules/service'
16 16
 import org from './modules/org'
17
+import systems from './modules/systems'
18
+
19
+
17 20
 
18 21
 Vue.use(Router)
19 22
 
@@ -92,10 +95,11 @@ var _asy_router_map = [
92 95
   dialysis,
93 96
   stock,
94 97
   qcd,
95
-  data_dict,
98
+  // data_dict,
96 99
   device,
97
-  role,
98
-  org
100
+  // role,
101
+  org,
102
+  systems,
99 103
 ]
100 104
 
101 105
 var is_asy_router = process.env.NODE_ENV === 'production' // true; 设置为 true 强制进行路由验证

+ 2 - 1
src/router/modules/data_dict.js Parādīt failu

@@ -10,7 +10,8 @@ export default {
10 10
     title: 'data_dictionary',
11 11
     icon: 'excel'
12 12
   },
13
-  children: [{
13
+  children: [
14
+    {
14 15
     path: '/data/dictionary',
15 16
     component: () => import('@/xt_pages/data/index'),
16 17
     name: 'dictionary',

+ 109 - 0
src/router/modules/systems.js Parādīt failu

@@ -0,0 +1,109 @@
1
+import Layout from '@/views/layout/Layout'
2
+
3
+export default {
4
+  path: '/system',
5
+  component: Layout,
6
+  redirect: '/role/admin/manage',
7
+  name: 'system',
8
+  alwaysShow: true,
9
+  meta: {
10
+    title: 'systemManage',
11
+    icon: 'system'
12
+  },
13
+  children: [{
14
+    path: '/role/admin/manage',
15
+    component: () => import('@/xt_pages/role/admin'),
16
+    name: 'adminManage',
17
+    meta: {
18
+      title: 'adminManage'
19
+    }
20
+  },
21
+    {
22
+      path: '/role/manage',
23
+      component: () => import('@/xt_pages/role/role'),
24
+      name: 'roleManage',
25
+      meta: {
26
+        title: 'roleManage'
27
+      }
28
+    },
29
+    {
30
+      path: '/role/admin/create',
31
+      component: () => import('@/xt_pages/role/CreateAdmin'),
32
+      name: 'addAdmin',
33
+      meta: {
34
+        title: 'addAdmin',
35
+        noCache: true
36
+      },
37
+      hidden: true,
38
+      is_menu: false
39
+    },
40
+    {
41
+      path: '/role/admin/edit',
42
+      component: () => import('@/xt_pages/role/EditAdmin'),
43
+      name: 'editAdmin',
44
+      meta: {
45
+        title: 'editAdmin',
46
+        noCache: true
47
+      },
48
+      hidden: true,
49
+      is_menu: false
50
+    },
51
+    {
52
+      path: '/role/perview',
53
+      component: () => import('@/xt_pages/role/EditPerview'),
54
+      name: 'setupPerview',
55
+      meta: {
56
+        title: 'setupPerview',
57
+        noCache: true
58
+      },
59
+      hidden: true,
60
+      is_menu: false
61
+    },
62
+    {
63
+      path: '/role/admin/specialpermission',
64
+      component: () => import('@/xt_pages/role/special_permission'),
65
+      name: 'special_permission_manage',
66
+      meta: {
67
+        title: 'special_permission_manage'
68
+      }
69
+    },
70
+    {
71
+      path: '/data/dictionary',
72
+      component: () => import('@/xt_pages/data/index'),
73
+      name: 'dictionary',
74
+      meta: {
75
+        title: 'data_dictionary'
76
+      }
77
+    },
78
+    {
79
+      path: '/data/template',
80
+      component: () => import('@/xt_pages/data/template'),
81
+      name: 'template',
82
+      meta: {
83
+        title: 'template'
84
+      }
85
+    },
86
+    {
87
+      path: '/data/druguse',
88
+      component: () => import('@/xt_pages/data/druguseTemplate'),
89
+      name: 'druguse',
90
+      meta: {
91
+        title: 'druguse'
92
+      }
93
+    }, {
94
+      path: '/data/showconfig',
95
+      component: () => import('@/xt_pages/data/showConfig'),
96
+      name: 'showconfig',
97
+      meta: {
98
+        title: 'showconfig'
99
+      }
100
+    },{
101
+      path: '/data/print',
102
+      component: () => import('@/xt_pages/data/printTemplate'),
103
+      name: 'printTemplate',
104
+      meta: {
105
+        title: 'printTemplate'
106
+      }
107
+    }
108
+  ]
109
+}

+ 1 - 1
src/xt_pages/data/druguseTemplate.vue Parādīt failu

@@ -549,7 +549,7 @@
549 549
                 </el-table-column>
550 550
                 <el-table-column prop="blood_flow_volume" align="center" label="执行频率">
551 551
                   <template slot-scope="scope">
552
-                    <span v-if="scope.row.parent_id == 0">{{scope.row.delivery_way}}</span>
552
+                    <span v-if="scope.row.parent_id == 0">{{scope.row.execution_frequency}}</span>
553 553
                   </template>
554 554
                 </el-table-column>
555 555
               </el-table>

+ 144 - 0
src/xt_pages/data/printTemplate.vue Parādīt failu

@@ -0,0 +1,144 @@
1
+<template>
2
+  <div class="main-contain">
3
+    <div class="position">
4
+      <bread-crumb :crumbs='crumbs'></bread-crumb>
5
+    </div>
6
+    <div class="app-container" style="text-align: center">
7
+     <p style="margin-top: 10px;margin-bottom: 30px">请选择你需要打印的血液透析护理记录单样式</p>
8
+      <el-row :gutter="20" type="flex" justify="center">
9
+        <el-col :span="6" style="text-align: center">
10
+          <div>
11
+            <el-tooltip class="item" effect="dark" :hide-after='2000' content="点击查看大图" placement="top-start">
12
+              <el-image
13
+                style="width: 200px; height: 200px"
14
+                :src="require('@/assets/home/1.jpg')"
15
+                :preview-src-list="imgs_one"
16
+              ></el-image>
17
+            </el-tooltip>
18
+
19
+          </div>
20
+          <el-radio v-model="radio" label="1" @change="change">模版一</el-radio>
21
+        </el-col>
22
+        <el-col :span="6" style="margin-left: 100px;margin-right: 100px;text-align: center">
23
+          <div>
24
+            <el-tooltip class="item" effect="dark" content="点击查看大图" placement="top-start" :hide-after='2000'>
25
+
26
+              <el-image
27
+                style="width: 200px; height: 200px"
28
+                :src="require('@/assets/home/2.jpg')"
29
+                :preview-src-list="imgs_two"
30
+              ></el-image>
31
+            </el-tooltip>
32
+
33
+          </div>
34
+          <el-radio v-model="radio" label="2" @change="change">模版二</el-radio>
35
+        </el-col>
36
+        <el-col :span="6" style="text-align: center">
37
+          <div class="demo-image__preview">
38
+            <el-tooltip class="item" effect="dark" content="点击查看大图" placement="top-start" :hide-after='2000'>
39
+
40
+              <el-image
41
+                style="width: 200px; height: 200px"
42
+                :src="require('@/assets/home/5.jpg')"
43
+                :preview-src-list="imgs_five"
44
+              ></el-image>
45
+            </el-tooltip>
46
+
47
+          </div>
48
+          <el-radio v-model="radio" label="5" @change="change">模版三</el-radio>
49
+        </el-col>
50
+      </el-row>
51
+    </div>
52
+  </div>
53
+</template>
54
+
55
+<script>
56
+  import BreadCrumb from '@/xt_pages/components/bread-crumb'
57
+  import { getPrintTemplate, postPrintTemplate } from '@/api/data'
58
+
59
+  export default {
60
+    name: 'printTemplate',
61
+    components: { BreadCrumb },
62
+    data() {
63
+      return {
64
+        crumbs: [
65
+          { path: false, name: '系统管理' },
66
+          { path: 'data/print', name: '打印模版' }
67
+        ],
68
+        imgUrl_One: require('@/assets/home/1.jpg'),
69
+        imgUrl_Two: require('@/assets/home/2.jpg'),
70
+        imgUrl_Five: require('@/assets/home/5.jpg'),
71
+
72
+        url: 'https://fuss10.elemecdn.com/e/5d/4a731a90594a4af544c0c25941171jpeg.jpeg',
73
+        imgs_one: [
74
+          'https://images.shengws.com/template_one.jpg'
75
+        ],
76
+        imgs_two: [
77
+          'https://images.shengws.com/template_two.jpg'
78
+
79
+        ],
80
+        imgs_five: [
81
+          'https://images.shengws.com/template_five.jpg'
82
+
83
+        ],
84
+        delay:500,
85
+        radio: 0,
86
+        tempRadio: 0
87
+      }
88
+    }, methods: {
89
+      change: function(val) {
90
+
91
+        this.$confirm('是否切换模版', '提示', {
92
+          confirmButtonText: '确定',
93
+          cancelButtonText: '取消',
94
+          type: 'info'
95
+        }).then(() => {
96
+          postPrintTemplate(val).then(response => {
97
+            if (response.data.state == 1) {
98
+              var template_id = response.data.data.template_id
99
+              this.radio = template_id.toString()
100
+              this.tempRadio = template_id.toString()
101
+              //同步
102
+              this.$message({
103
+                type: 'success',
104
+                message: '切换成功'
105
+              })
106
+
107
+            }
108
+          })
109
+        }).catch(() => {
110
+          this.radio = this.tempRadio
111
+        })
112
+
113
+      }
114
+    }, created() {
115
+      getPrintTemplate().then(response => {
116
+        if (response.data.state == 0) {
117
+          this.$message.error(response.data.msg)
118
+          return false
119
+        } else {
120
+          var template = response.data.data.template
121
+          this.radio = template.template_id.toString()
122
+          this.tempRadio = template.template_id.toString()
123
+        }
124
+      })
125
+    }
126
+  }
127
+</script>
128
+
129
+<style scoped>
130
+  .el-row {
131
+    margin-bottom: 20px;
132
+
133
+  &
134
+  :last-child {
135
+    margin-bottom: 0;
136
+  }
137
+
138
+  }
139
+  .el-col {
140
+    border-radius: 4px;
141
+  }
142
+
143
+
144
+</style>

+ 2 - 2
src/xt_pages/dialysis/batch_print/batch_print_order_five_one.vue Parādīt failu

@@ -500,8 +500,8 @@
500 500
                     </div>
501 501
                     <div class="inline_block" style="margin-left:30px;">
502 502
                       透析期间进食:
503
-                      <check-box text="无" :checked="record.assessment_after_dislysis.is_eat == 1?true:false"></check-box>
504
-                      <check-box text="有" :checked="record.assessment_after_dislysis.is_eat == 2?true:false"></check-box>
503
+                      <check-box text="无" :checked="record.assessment_after_dislysis&&record.assessment_after_dislysis.is_eat == 1?true:false"></check-box>
504
+                      <check-box text="有" :checked="record.assessment_after_dislysis&&record.assessment_after_dislysis.is_eat == 2?true:false"></check-box>
505 505
                     </div>
506 506
                     <!--<div class="inline_block" style="margin-left: 30px;">-->
507 507
                     <!--实际超滤量:-->

+ 26 - 13
src/xt_pages/dialysis/bloodPresssWatch.vue Parādīt failu

@@ -151,6 +151,7 @@
151 151
 import { getSchedualPatient, GetAllZone } from "@/api/dialysis";
152 152
 import { parseTime } from "@/utils";
153 153
 import BreadCrumb from "@/xt_pages/components/bread-crumb";
154
+import { getPrintTemplate } from '@/api/data'
154 155
 
155 156
 export default {
156 157
   name: "Patient",
@@ -175,7 +176,7 @@ export default {
175 176
         { value: 2, label: "下午" },
176 177
         { value: 3, label: "晚上" }
177 178
       ],
178
-      template_id : 1,
179
+      template_id : 0,
179 180
 
180 181
       partitionType: 0,
181 182
 
@@ -244,9 +245,21 @@ export default {
244 245
     this.listQuery.schedul_time = date.getTime();
245 246
     this.getAllZone();
246 247
     this.getSchedualPatientList();
247
-    this.template_id = this.$store.getters.xt_user.template_info.template_id;
248
+    this.getTemplateInfo();
249
+    // this.template_id = this.$store.getters.xt_user.template_info.template_id;
248 250
   },
249 251
   methods: {
252
+    getTemplateInfo(){
253
+      getPrintTemplate().then(response => {
254
+        if (response.data.state == 0) {
255
+          this.$message.error(response.data.msg)
256
+          return false
257
+        } else {
258
+          var template = response.data.data.template
259
+          this.template_id = template.template_id
260
+        }
261
+      })
262
+    },
250 263
     clickCurrent(val) {
251 264
       console.log(val);
252 265
       this.$router.push({
@@ -404,17 +417,17 @@ export default {
404 417
         sch_ids.push(this.selecting_schs[index].sch_id)
405 418
       }
406 419
       this.$store.dispatch("SetBatchPrintDialysisRecordIDs", sch_ids)
407
-      if (this.$store.getters.xt_user.template_info.template_id == 2 ||this.$store.getters.xt_user.template_info.template_id == 0 ){
420
+      if (this.template_id == 2 ||this.template_id == 0 ){
408 421
         this.$router.push({ path: "/dialysis/print/batch/other" });
409
-      }else if(this.$store.getters.xt_user.template_info.template_id == 1) {
422
+      }else if(this.template_id == 1) {
410 423
         this.$router.push({ path: "/dialysis/print/batch" });
411 424
       }
412
-      else if(this.$store.getters.xt_user.template_info.template_id == 3) {
425
+      else if(this.template_id == 3) {
413 426
         this.$router.push({ path: "/dialysis/print/batch/three" });
414 427
       }
415
-      else if(this.$store.getters.xt_user.template_info.template_id == 4) {
428
+      else if(this.template_id == 4) {
416 429
         this.$router.push({ path: "/dialysis/print/batch/four" });
417
-      } else if (this.$store.getters.xt_user.template_info.template_id == 5  ){
430
+      } else if (this.template_id == 5  ){
418 431
         this.$router.push({ path: "/dialysis/print/batch/five" });
419 432
       }
420 433
     },
@@ -424,11 +437,11 @@ export default {
424 437
         sch_ids.push(this.selecting_schs[index].sch_id)
425 438
       }
426 439
       this.$store.dispatch("SetBatchPrintDialysisRecordIDs", sch_ids)
427
-      if (this.$store.getters.xt_user.template_info.template_id == 2 ||this.$store.getters.xt_user.template_info.template_id == 0){
440
+      if (this.template_id == 2 ||this.template_id == 0){
428 441
         this.$router.push({ path: "/dialysis/print/batch/otherone" });
429
-      }else if(this.$store.getters.xt_user.template_info.template_id == 1) {
442
+      }else if(this.template_id == 1) {
430 443
         this.$router.push({ path: "/dialysis/print/batch" });
431
-      } else if (this.$store.getters.xt_user.template_info.template_id == 5){
444
+      } else if (this.template_id == 5){
432 445
         this.$router.push({ path: "/dialysis/print/batch/fiveone" });
433 446
       }
434 447
     },
@@ -438,11 +451,11 @@ export default {
438 451
         sch_ids.push(this.selecting_schs[index].sch_id)
439 452
       }
440 453
       this.$store.dispatch("SetBatchPrintDialysisRecordIDs", sch_ids)
441
-      if (this.$store.getters.xt_user.template_info.template_id == 2 ||this.$store.getters.xt_user.template_info.template_id == 0 ){
454
+      if (this.template_id == 2 ||this.template_id == 0 ){
442 455
         this.$router.push({ path: "/dialysis/print/batch/othertwo" });
443
-      }else if(this.$store.getters.xt_user.template_info.template_id == 1){
456
+      }else if(this.template_id == 1){
444 457
         this.$router.push({ path: "/dialysis/print/batch" });
445
-      } else if (this.$store.getters.xt_user.template_info.template_id == 5  ){
458
+      } else if (this.template_id == 5  ){
446 459
         this.$router.push({ path: "/dialysis/print/batch/fivetwo" });
447 460
       }
448 461
     }

+ 2 - 0
src/xt_pages/dialysis/details/DialysisPrescription.vue Parādīt failu

@@ -151,6 +151,8 @@
151 151
         </li>
152 152
       </ul>
153 153
 
154
+
155
+
154 156
     </div>
155 157
     <div class="note">备注 : <span>{{note}}</span></div>
156 158
   </div>

+ 106 - 1
src/xt_pages/dialysis/details/NavIgation.vue Parādīt failu

@@ -53,7 +53,13 @@
53 53
 
54 54
         <div class="middleLine"></div>
55 55
 
56
-        <dialysis-prescription-dialog title="透析处方" ref="prescription" :patient="patient" :prescription="prescription" :solution="solution"></dialysis-prescription-dialog>
56
+        <dialysis-prescription-dialog title="透析处方" ref="prescription" :patient="patient" :prescription="prescription" :solution="solution"
57
+                                      :niprocart_info="niprocart_info" :jms_info="jms_info" :fistula_needle_set_info="fistula_needle_set_info"
58
+        :fistula_needle_set_16_info="fistula_needle_set_16_info"  :hemoperfusion_info="hemoperfusion_info" :dialyser_sterilised_info="dialyser_sterilised_info"
59
+        :filtryzer_info="filtryzer_info" :dialyzers_info="dialyzers_info" :injector_info="injector_info" :bloodlines_info="bloodlines_info"  :tubingHemodialysis_info="tubingHemodialysis_info"
60
+        :safe_package_info="safe_package_info" :aliquid_info="aliquid_info" :config="config"
61
+
62
+        ></dialysis-prescription-dialog>
57 63
 
58 64
         <double-check-dialog title="双人核对" ref="doubleCheck" :patient="patient" :double_check="double_check" :admin_users="admin_users" ></double-check-dialog>
59 65
 
@@ -198,6 +204,105 @@ export default {
198 204
         }
199 205
       },
200 206
 
207
+
208
+      niprocart_info: {
209
+        type: Array,
210
+        default: () => {
211
+          return []
212
+        }
213
+      },
214
+
215
+      jms_info: {
216
+        type: Array,
217
+        default: () => {
218
+          return []
219
+        }
220
+      },
221
+
222
+
223
+      fistula_needle_set_info: {
224
+        type: Array,
225
+        default: () => {
226
+          return []
227
+        }
228
+      },
229
+
230
+
231
+      fistula_needle_set_16_info: {
232
+        type: Array,
233
+        default: () => {
234
+          return []
235
+        }
236
+      },
237
+
238
+
239
+      hemoperfusion_info: {
240
+        type: Array,
241
+        default: () => {
242
+          return []
243
+        }
244
+      },
245
+
246
+      dialyser_sterilised_info: {
247
+        type: Array,
248
+        default: () => {
249
+          return []
250
+        }
251
+      },
252
+
253
+      filtryzer_info: {
254
+        type: Array,
255
+        default: () => {
256
+          return []
257
+        }
258
+      },
259
+
260
+      dialyzers_info: {
261
+        type: Array,
262
+        default: () => {
263
+          return []
264
+        }
265
+      },
266
+      injector_info: {
267
+        type: Array,
268
+        default: () => {
269
+          return []
270
+        }
271
+      },
272
+      bloodlines_info: {
273
+        type: Array,
274
+        default: () => {
275
+          return []
276
+        }
277
+      },
278
+      tubingHemodialysis_info: {
279
+        type: Array,
280
+        default: () => {
281
+          return []
282
+        }
283
+      },
284
+      safe_package_info: {
285
+        type: Array,
286
+        default: () => {
287
+          return []
288
+        }
289
+      },
290
+      aliquid_info: {
291
+        type: Array,
292
+        default: () => {
293
+          return []
294
+        }
295
+      },
296
+      config: {
297
+        type: Object,
298
+        default: () => {
299
+          return {id: 0}
300
+        }
301
+      },
302
+
303
+
304
+
305
+
201 306
       admin_user_map: { // {user_id: admin_user object}
202 307
         type: Object,
203 308
         default: () => {

+ 313 - 41
src/xt_pages/dialysis/details/dialog/dialysisPrescriptionDialog.vue Parādīt failu

@@ -9,7 +9,7 @@
9 9
     <el-form ref="dialysisPrescription" :model="dialysisPrescription" label-width="148px">
10 10
       <!-- <el-row :gutter="20"> -->
11 11
       <el-row :gutter="24">
12
-        <el-col :span="8"  v-if="isShows('透析模式')">
12
+        <el-col :span="8" v-if="isShows('透析模式')">
13 13
           <el-form-item label="透析模式: ">
14 14
             <el-select v-model="dialysisPrescription.mode_id">
15 15
               <el-option :key="0" label="请选择" :value="0"></el-option>
@@ -18,33 +18,33 @@
18 18
           </el-form-item>
19 19
         </el-col>
20 20
         <el-col :span="8" v-if="isShows('透析时长')">
21
-          <el-form-item label="透析时长(h): " >
21
+          <el-form-item label="透析时长(h): ">
22 22
             <el-input type="number" v-model="dialysisPrescription.dialysis_duration_hour"></el-input>
23 23
           </el-form-item>
24 24
         </el-col>
25 25
         <el-col :span="8" v-if="isShows('透析时长')">
26
-          <el-form-item label="透析时长(min): " >
26
+          <el-form-item label="透析时长(min): ">
27 27
             <el-input type="number" v-model="dialysisPrescription.dialysis_duration_minute"></el-input>
28 28
           </el-form-item>
29 29
         </el-col>
30
-      <!-- </el-row>
30
+        <!-- </el-row>
31 31
 
32
-      <el-row :gutter="20"> -->
32
+        <el-row :gutter="20"> -->
33 33
         <el-col :span="8" v-if="isShows('血流量')">
34
-          <el-form-item label="血流量(ml/min):" >
34
+          <el-form-item label="血流量(ml/min):">
35 35
             <el-input type="number" v-model="dialysisPrescription.blood_flow_volume"></el-input>
36 36
           </el-form-item>
37 37
         </el-col>
38 38
 
39 39
 
40 40
         <el-col :span="8" v-if="isShows('目标超滤量')">
41
-          <el-form-item label="目标超滤量(L):" >
41
+          <el-form-item label="目标超滤量(L):">
42 42
             <el-input type="number" v-model="dialysisPrescription.target_ultrafiltration"></el-input>
43 43
           </el-form-item>
44 44
         </el-col>
45 45
 
46 46
         <el-col :span="8" v-if="isShows('透析液配方')">
47
-          <el-form-item label="透析液配方:" >
47
+          <el-form-item label="透析液配方:">
48 48
             <!-- <el-input type="number" v-model="dialysisPrescription.dialysate_formulation"></el-input> -->
49 49
             <el-select v-model="dialysisPrescription.dialysate_formulation" placeholder="请选择">
50 50
               <el-option :key="0" label="请选择" :value="0"></el-option>
@@ -55,24 +55,24 @@
55 55
         </el-col>
56 56
 
57 57
 
58
-      <!-- </el-row>
58
+        <!-- </el-row>
59 59
 
60
-      <el-row :gutter="20"> -->
60
+        <el-row :gutter="20"> -->
61 61
         <el-col :span="8" v-if="isShows('透析液温度')">
62
-          <el-form-item label="透析液温度(°C):" >
62
+          <el-form-item label="透析液温度(°C):">
63 63
             <el-input type="number" v-model="dialysisPrescription.dialysate_temperature"></el-input>
64 64
           </el-form-item>
65 65
         </el-col>
66 66
 
67 67
 
68 68
         <el-col :span="8" v-if="isShows('置换量')">
69
-          <el-form-item label="置换量(L):" >
69
+          <el-form-item label="置换量(L):">
70 70
             <el-input type="number" v-model="dialysisPrescription.replacement_total"></el-input>
71 71
           </el-form-item>
72 72
         </el-col>
73 73
 
74 74
         <el-col :span="8" v-if="isShows('抗凝剂')">
75
-          <el-form-item label="抗凝剂:" >
75
+          <el-form-item label="抗凝剂:">
76 76
             <el-select v-model="dialysisPrescription.anticoagulant" placeholder="请选择" style="width:100%;"
77 77
                        @change="changeThisAnticoagulant">
78 78
               <el-option :key="0" label="请选择" :value="0"></el-option>
@@ -82,9 +82,9 @@
82 82
             </el-select>
83 83
           </el-form-item>
84 84
         </el-col>
85
-      <!-- </el-row>
85
+        <!-- </el-row>
86 86
 
87
-      <el-row :gutter="20"> -->
87
+        <el-row :gutter="20"> -->
88 88
 
89 89
         <el-col :span="8" v-if="anticoagulant.shouji != -1&&isShows('首剂')">
90 90
           <el-form-item :label="'首剂('+anticoagulant.shouji_unit+') : '">
@@ -120,13 +120,13 @@
120 120
         </el-col>
121 121
 
122 122
 
123
-      <!-- </el-row>
123
+        <!-- </el-row>
124 124
 
125 125
 
126
-      <el-row :gutter="20"> -->
126
+        <el-row :gutter="20"> -->
127 127
 
128 128
         <el-col :span="8" v-if="isShows('钾')">
129
-          <el-form-item label="钾(mmol/L): " >
129
+          <el-form-item label="钾(mmol/L): ">
130 130
             <el-input type="number" v-model="dialysisPrescription.kalium"></el-input>
131 131
           </el-form-item>
132 132
         </el-col>
@@ -145,9 +145,9 @@
145 145
         </el-col>
146 146
 
147 147
 
148
-      <!-- </el-row>
148
+        <!-- </el-row>
149 149
 
150
-      <el-row :gutter="20"> -->
150
+        <el-row :gutter="20"> -->
151 151
 
152 152
         <el-col :span="8" v-if="isShows('透析器/灌流器')">
153 153
           <el-form-item label="透析器/灌流器:">
@@ -162,13 +162,13 @@
162 162
         </el-col>
163 163
 
164 164
         <el-col :span="8" v-if="isShows('葡萄糖')">
165
-          <el-form-item label="葡萄糖(mmol/L):" >
165
+          <el-form-item label="葡萄糖(mmol/L):">
166 166
             <el-input type="number" v-model="dialysisPrescription.glucose"></el-input>
167 167
           </el-form-item>
168 168
         </el-col>
169
-      <!-- </el-row>
169
+        <!-- </el-row>
170 170
 
171
-      <el-row :gutter="20"> -->
171
+        <el-row :gutter="20"> -->
172 172
         <el-col :span="8" v-if="isShows('透析液流量')">
173 173
           <el-form-item label="透析液流量(ml/min):">
174 174
             <el-input type="number" v-model="dialysisPrescription.dialysate_flow"></el-input>
@@ -182,7 +182,7 @@
182 182
         <el-col :span="8" v-if="isShows('体液过多症状')">
183 183
           <el-form-item label="体液过多症状:">
184 184
             <el-select v-model="dialysisPrescription.body_fluid" placeholder="请选择" style="width:100%;"
185
-                       >
185
+            >
186 186
               <el-option :key="0" label="请选择" :value="0"></el-option>
187 187
 
188 188
               <el-option v-for="item in body_fluid_option" :label="item.name" :key="item.id"
@@ -192,10 +192,10 @@
192 192
         </el-col>
193 193
 
194 194
 
195
-      <!-- </el-row>
195
+        <!-- </el-row>
196 196
 
197 197
 
198
-      <el-row :gutter="20" > -->
198
+        <el-row :gutter="20" > -->
199 199
 
200 200
         <el-col :span="8" v-if="isShows('体液过多其他症状')">
201 201
           <el-form-item label="其他体液过多症状">
@@ -217,16 +217,15 @@
217 217
         </el-col>
218 218
 
219 219
 
220
-
221 220
         <el-col :span="8" v-if="isShows('透析前使用其他特殊药物')">
222 221
           <el-form-item label="使用其他特殊药物">
223 222
             <el-input v-model="dialysisPrescription.special_medicine_other"></el-input>
224 223
           </el-form-item>
225 224
         </el-col>
226 225
 
227
-      <!-- </el-row>
226
+        <!-- </el-row>
228 227
 
229
-      <el-row :gutter="20" > -->
228
+        <el-row :gutter="20" > -->
230 229
         <el-col :span="8">
231 230
           <el-form-item label="置换液:" v-if="isShows('置换液')">
232 231
 
@@ -257,13 +256,13 @@
257 256
           </el-form-item>
258 257
         </el-col>
259 258
 
260
-      <!-- </el-row>
261
-      <el-row :gutter="20" > -->
262
-          <el-col :span="8" v-if="isShows('实际超滤量')">
263
-            <el-form-item label="实际超滤量(L)">
264
-              <el-input v-model="dialysisPrescription.ultrafiltration"></el-input>
265
-            </el-form-item>
266
-          </el-col>
259
+        <!-- </el-row>
260
+        <el-row :gutter="20" > -->
261
+        <el-col :span="8" v-if="isShows('实际超滤量')">
262
+          <el-form-item label="实际超滤量(L)">
263
+            <el-input v-model="dialysisPrescription.ultrafiltration"></el-input>
264
+          </el-form-item>
265
+        </el-col>
267 266
 
268 267
 
269 268
         <el-col :span="8" v-if="isShows('目标KT/V')">
@@ -271,6 +270,170 @@
271 270
             <el-input v-model="dialysisPrescription.target_ktv"></el-input>
272 271
           </el-form-item>
273 272
         </el-col>
273
+
274
+
275
+        <!--&lt;!&ndash;透析耗材&ndash;&gt;-->
276
+        <!--<el-col :span="8" v-if="isShows('血液透析干粉')&&config.is_open == 1">-->
277
+          <!--<el-form-item label="血液透析干粉:">-->
278
+            <!--<el-select v-model="dialysisPrescription.niprocart" placeholder="请选择">-->
279
+              <!--<el-option :key="0" label="请选择" :value="0"></el-option>-->
280
+              <!--<el-option v-for="(option, index) in niprocart_info" :key="index"-->
281
+                         <!--:label="option.GoodInfo.specification_name" :value="option.GoodInfo.id"></el-option>-->
282
+            <!--</el-select>-->
283
+          <!--</el-form-item>-->
284
+        <!--</el-col>-->
285
+
286
+
287
+        <!--<el-col :span="8" v-if="isShows('一次性使用动静脉穿刺针')&&config.is_open == 1">-->
288
+          <!--<el-form-item label="一次性使用动静脉穿刺针:">-->
289
+            <!--<el-select v-model="dialysisPrescription.jms" placeholder="请选择">-->
290
+              <!--<el-option :key="0" label="请选择" :value="0"></el-option>-->
291
+
292
+              <!--<el-option v-for="(option, index) in jms_info" :key="index"-->
293
+                         <!--:label="option.GoodInfo.specification_name" :value="option.GoodInfo.id"></el-option>-->
294
+            <!--</el-select>-->
295
+          <!--</el-form-item>-->
296
+        <!--</el-col>-->
297
+
298
+
299
+        <!--<el-col :span="8" v-if="isShows('内瘘管翼状针')&&config.is_open == 1">-->
300
+          <!--<el-form-item label="内瘘管翼状针:">-->
301
+            <!--<el-select v-model="dialysisPrescription.fistula_needle_set" placeholder="请选择">-->
302
+              <!--<el-option :key="0" label="请选择" :value="0"></el-option>-->
303
+
304
+              <!--<el-option v-for="(option, index) in fistula_needle_set_info" :key="index"-->
305
+                         <!--:label="option.GoodInfo.specification_name" :value="option.GoodInfo.id"></el-option>-->
306
+            <!--</el-select>-->
307
+          <!--</el-form-item>-->
308
+        <!--</el-col>-->
309
+
310
+
311
+        <!--<el-col :span="8" v-if="isShows('内瘘管翼状针16G')&&config.is_open == 1">-->
312
+          <!--<el-form-item label="内瘘管翼状针16G:">-->
313
+            <!--<el-select v-model="dialysisPrescription.fistula_needle_set_16" placeholder="请选择">-->
314
+              <!--<el-option :key="0" label="请选择" :value="0"></el-option>-->
315
+
316
+              <!--<el-option v-for="(option, index) in fistula_needle_set_16_info" :key="index"-->
317
+                         <!--:label="option.GoodInfo.specification_name" :value="option.GoodInfo.id"></el-option>-->
318
+            <!--</el-select>-->
319
+          <!--</el-form-item>-->
320
+        <!--</el-col>-->
321
+
322
+
323
+        <!--<el-col :span="8" v-if="isShows('一次性使用血液灌流器')&&config.is_open == 1">-->
324
+          <!--<el-form-item label="一次性使用血液灌流器:">-->
325
+            <!--<el-select v-model="dialysisPrescription.hemoperfusion" placeholder="请选择">-->
326
+              <!--<el-option :key="0" label="请选择" :value="0"></el-option>-->
327
+
328
+              <!--<el-option v-for="(option, index) in hemoperfusion_info" :key="index"-->
329
+                         <!--:label="option.GoodInfo.specification_name" :value="option.GoodInfo.id"></el-option>-->
330
+            <!--</el-select>-->
331
+          <!--</el-form-item>-->
332
+        <!--</el-col>-->
333
+
334
+
335
+        <!--<el-col :span="8" v-if="isShows('空心纤维血液透析器')&&config.is_open == 1">-->
336
+          <!--<el-form-item label="空心纤维血液透析器:">-->
337
+            <!--<el-select v-model="dialysisPrescription.dialyser_sterilised" placeholder="请选择">-->
338
+              <!--<el-option :key="0" label="请选择" :value="0"></el-option>-->
339
+
340
+              <!--<el-option v-for="(option, index) in dialyser_sterilised_info" :key="index"-->
341
+                         <!--:label="option.GoodInfo.specification_name" :value="option.GoodInfo.id"></el-option>-->
342
+            <!--</el-select>-->
343
+          <!--</el-form-item>-->
344
+        <!--</el-col>-->
345
+
346
+
347
+        <!--<el-col :span="8" v-if="isShows('中空纤维透析器')&&config.is_open == 1">-->
348
+          <!--<el-form-item label="中空纤维透析器:">-->
349
+            <!--<el-select v-model="dialysisPrescription.filtryzer" placeholder="请选择">-->
350
+              <!--<el-option :key="0" label="请选择" :value="0"></el-option>-->
351
+
352
+              <!--<el-option v-for="(option, index) in filtryzer_info" :key="index"-->
353
+                         <!--:label="option.GoodInfo.specification_name" :value="option.GoodInfo.id"></el-option>-->
354
+            <!--</el-select>-->
355
+          <!--</el-form-item>-->
356
+        <!--</el-col>-->
357
+
358
+
359
+        <!--<el-col :span="8" v-if="isShows('透析器')&&config.is_open == 1">-->
360
+          <!--<el-form-item label="透析器:">-->
361
+            <!--<el-select v-model="dialysisPrescription.dialyzers" placeholder="请选择">-->
362
+              <!--<el-option :key="0" label="请选择" :value="0"></el-option>-->
363
+
364
+              <!--<el-option v-for="(option, index) in dialyzers_info" :key="index"-->
365
+                         <!--:label="option.GoodInfo.specification_name" :value="option.GoodInfo.id"></el-option>-->
366
+            <!--</el-select>-->
367
+          <!--</el-form-item>-->
368
+        <!--</el-col>-->
369
+
370
+
371
+
372
+        <!--<el-col :span="8" v-if="isShows('注射器')&&config.is_open == 1">-->
373
+          <!--<el-form-item label="注射器:">-->
374
+            <!--<el-select v-model="dialysisPrescription.injector" placeholder="请选择">-->
375
+              <!--<el-option :key="0" label="请选择" :value="0"></el-option>-->
376
+
377
+              <!--<el-option v-for="(option, index) in injector_info" :key="index"-->
378
+                         <!--:label="option.GoodInfo.specification_name" :value="option.GoodInfo.id"></el-option>-->
379
+            <!--</el-select>-->
380
+          <!--</el-form-item>-->
381
+        <!--</el-col>-->
382
+
383
+
384
+
385
+        <!--<el-col :span="8" v-if="isShows('体外循环血路管')&&config.is_open == 1">-->
386
+          <!--<el-form-item label="体外循环血路管:">-->
387
+            <!--<el-select v-model="dialysisPrescription.bloodlines" placeholder="请选择">-->
388
+              <!--<el-option :key="0" label="请选择" :value="0"></el-option>-->
389
+
390
+              <!--<el-option v-for="(option, index) in bloodlines_info" :key="index"-->
391
+                         <!--:label="option.GoodInfo.specification_name" :value="option.GoodInfo.id"></el-option>-->
392
+            <!--</el-select>-->
393
+          <!--</el-form-item>-->
394
+        <!--</el-col>-->
395
+
396
+
397
+
398
+        <!--<el-col :span="8" v-if="isShows('血液净化补液管路(置换管)')&&config.is_open == 1">-->
399
+          <!--<el-form-item label="血液净化补液管路(置换管):">-->
400
+            <!--<el-select v-model="dialysisPrescription.tubing_hemodialysis" placeholder="请选择">-->
401
+              <!--<el-option :key="0" label="请选择" :value="0"></el-option>-->
402
+
403
+              <!--<el-option v-for="(option, index) in tubingHemodialysis_info" :key="index"-->
404
+                         <!--:label="option.GoodInfo.specification_name" :value="option.GoodInfo.id"></el-option>-->
405
+            <!--</el-select>-->
406
+          <!--</el-form-item>-->
407
+        <!--</el-col>-->
408
+
409
+
410
+        <!--<el-col :span="8" v-if="isShows('护理包')&&config.is_open == 1">-->
411
+          <!--<el-form-item label="护理包:">-->
412
+            <!--<el-select v-model="dialysisPrescription.package" placeholder="请选择">-->
413
+              <!--<el-option :key="0" label="请选择" :value="0"></el-option>-->
414
+
415
+              <!--<el-option v-for="(option, index) in safe_package_info" :key="index"-->
416
+                         <!--:label="option.GoodInfo.specification_name" :value="option.GoodInfo.id"></el-option>-->
417
+            <!--</el-select>-->
418
+          <!--</el-form-item>-->
419
+        <!--</el-col>-->
420
+
421
+
422
+        <!--<el-col :span="8" v-if="isShows('A液')&&config.is_open == 1">-->
423
+          <!--<el-form-item label="A液:">-->
424
+            <!--<el-select v-model="dialysisPrescription.a_liquid" placeholder="请选择">-->
425
+              <!--<el-option :key="0" label="请选择" :value="0"></el-option>-->
426
+
427
+              <!--<el-option v-for="(option, index) in aliquid_info" :key="index"-->
428
+                         <!--:label="option.GoodInfo.specification_name" :value="option.GoodInfo.id"></el-option>-->
429
+            <!--</el-select>-->
430
+          <!--</el-form-item>-->
431
+        <!--</el-col>-->
432
+
433
+
434
+
435
+
436
+
274 437
       </el-row>
275 438
 
276 439
 
@@ -297,12 +460,107 @@
297 460
   import { postPrescription, postSoulution } from '@/api/dialysis'
298 461
   import { getDataConfig } from '@/utils/data'
299 462
   import { uParseTime } from '@/utils/tools'
300
-  import store from "@/store";
463
+  import store from '@/store'
301 464
 
302 465
   export default {
303 466
     name: 'dialysisPrescriptionDialog',
304 467
     props: {
305 468
 
469
+      niprocart_info: {
470
+        type: Array,
471
+        default: () => {
472
+          return []
473
+        }
474
+      },
475
+
476
+      jms_info: {
477
+        type: Array,
478
+        default: () => {
479
+          return []
480
+        }
481
+      },
482
+
483
+
484
+      fistula_needle_set_info: {
485
+        type: Array,
486
+        default: () => {
487
+          return []
488
+        }
489
+      },
490
+
491
+
492
+      fistula_needle_set_16_info: {
493
+        type: Array,
494
+        default: () => {
495
+          return []
496
+        }
497
+      },
498
+
499
+
500
+      hemoperfusion_info: {
501
+        type: Array,
502
+        default: () => {
503
+          return []
504
+        }
505
+      },
506
+
507
+      dialyser_sterilised_info: {
508
+        type: Array,
509
+        default: () => {
510
+          return []
511
+        }
512
+      },
513
+
514
+      filtryzer_info: {
515
+        type: Array,
516
+        default: () => {
517
+          return []
518
+        }
519
+      },
520
+
521
+      dialyzers_info: {
522
+        type: Array,
523
+        default: () => {
524
+          return []
525
+        }
526
+      },
527
+      injector_info: {
528
+        type: Array,
529
+        default: () => {
530
+          return []
531
+        }
532
+      },
533
+      bloodlines_info: {
534
+        type: Array,
535
+        default: () => {
536
+          return []
537
+        }
538
+      },
539
+      tubingHemodialysis_info: {
540
+        type: Array,
541
+        default: () => {
542
+          return []
543
+        }
544
+      },
545
+      safe_package_info: {
546
+        type: Array,
547
+        default: () => {
548
+          return []
549
+        }
550
+      },
551
+      aliquid_info: {
552
+        type: Array,
553
+        default: () => {
554
+          return []
555
+        }
556
+      },
557
+      config: {
558
+        type: Object,
559
+        default: () => {
560
+          return {id: 0}
561
+        }
562
+      },
563
+
306 564
       prescription: { // 透析处方
307 565
         type: Object,
308 566
         default: () => {
@@ -399,7 +657,21 @@
399 657
           displace_liqui_value: '',
400 658
           ultrafiltration: '',
401 659
           blood_access: '',
660
+
661
+          niprocart:'',
662
+          jms:'',
663
+          fistula_needle_set:'',
664
+          fistula_needle_set_16:'',
665
+          hemoperfusion:'',
666
+          dialyser_sterilised:'',
667
+          filtryzer:'',
402 668
           target_ktv:'',
669
+          dialyzers:'',
670
+          injector:'',
671
+          bloodlines:'',
672
+          tubing_hemodialysis:'',
673
+          package:'',
674
+          a_liquid:'',
403 675
         },
404 676
 
405 677
         anticoagulant: {
@@ -506,15 +778,15 @@
506 778
             this.hide()
507 779
           }
508 780
         })
509
-      }, isShows(name){
781
+      }, isShows(name) {
510 782
         var filedList = store.getters.xt_user.fileds
511
-        for (let i = 0; i < filedList.length; i++){
512
-          if(filedList[i].module == 1 && filedList[i].filed_name_cn == name && filedList[i].is_show == 1){
783
+        for (let i = 0; i < filedList.length; i++) {
784
+          if (filedList[i].module == 1 && filedList[i].filed_name_cn == name && filedList[i].is_show == 1) {
513 785
             return true
514 786
           }
515 787
         }
516 788
         return false
517
-      },
789
+      }
518 790
     },
519 791
     created() {
520 792
       this.treatment_mode = this.$store.getters.treatment_mode

+ 59 - 46
src/xt_pages/dialysis/details/dialog/monitor_dialog.vue Parādīt failu

@@ -10,86 +10,95 @@
10 10
         </div>
11 11
         <el-table :header-cell-style="{ backgroundColor: 'rgb(245, 247, 250)'}" ref="table" :data="monitors" border highlight-current-row
12 12
                   @current-change="tableCurrentRowChange" style="width: 100%" :class="current_row_class">
13
-          <el-table-column label="时间" align="center" width="144">
13
+          <el-table-column label="监测时间" align="center" width="144" v-if="isShow('监测时间')">
14 14
             <template slot-scope="scope">
15 15
               {{ getMonitorDate(scope.row) }}
16 16
             </template>
17 17
           </el-table-column>
18
-          <el-table-column align="center" label="血压(mmhg)" width="110">
18
+          <el-table-column prop="temperature" align="center" width="100" label="体温(℃)" v-if="isShow('体温')">
19 19
             <template slot-scope="scope">
20
-              {{scope.row.systolic_blood_pressure?scope.row.systolic_blood_pressure:''}}/{{scope.row.diastolic_blood_pressure?scope.row.diastolic_blood_pressure:''}}
20
+              {{scope.row.temperature?scope.row.temperature:''}}
21 21
             </template>
22 22
           </el-table-column>
23
-          <el-table-column prop="pulse_frequency" align="center" width="100" label="脉率(次/分)">
23
+          <el-table-column align="center" label="血压(mmhg)" width="110" v-if="isShow('血压')">
24 24
             <template slot-scope="scope">
25
-              {{scope.row.pulse_frequency?scope.row.pulse_frequency:''}}
25
+              {{scope.row.systolic_blood_pressure?scope.row.systolic_blood_pressure:''}}/{{scope.row.diastolic_blood_pressure?scope.row.diastolic_blood_pressure:''}}
26 26
             </template>
27 27
           </el-table-column>
28
-          <el-table-column prop="temperature" align="center" width="100" label="体温(℃)">
28
+
29
+          <el-table-column prop="pulse_frequency" align="center" width="100" label="脉搏(次/分)" v-if="isShow('脉搏')">
29 30
             <template slot-scope="scope">
30
-              {{scope.row.temperature?scope.row.temperature:''}}
31
+              {{scope.row.pulse_frequency?scope.row.pulse_frequency:''}}
31 32
             </template>
32 33
           </el-table-column>
33
-          <el-table-column prop="breathing_rate" align="center" label="呼吸(次/分)" width="100">
34
+
35
+
36
+          <el-table-column prop="breathing_rate" align="center" label="呼吸频率(次/分)" width="100" v-if="isShow('呼吸频率')">
34 37
             <template slot-scope="scope">
35 38
               {{scope.row.breathing_rate?scope.row.breathing_rate:''}}
36 39
             </template>
37 40
           </el-table-column>
38
-          <el-table-column prop="blood_flow_volume" align="center" label="血流量(ml/min)" width="120">
41
+
42
+          <el-table-column prop="venous_pressure" align="center" label="静脉压/动脉压(mmhg)" width="120" >
39 43
             <template slot-scope="scope">
40
-              {{scope.row.blood_flow_volume?scope.row.blood_flow_volume:''}}
44
+              <span>{{scope.row.venous_pressure?scope.row.venous_pressure:''}}/ {{scope.row.arterial_pressure?scope.row.arterial_pressure:''}}</span>
41 45
             </template>
42 46
           </el-table-column>
43
-          <el-table-column prop="venous_pressure" align="center" label="静脉压/动脉压(mmhg)" width="120">
47
+
48
+          <el-table-column prop="blood_flow_volume" align="center" label="血流量(ml/min)" width="120" v-if="isShow('血流量')">
44 49
             <template slot-scope="scope">
45
-              <span>{{scope.row.venous_pressure?scope.row.venous_pressure:''}}/ {{scope.row.arterial_pressure?scope.row.arterial_pressure:''}}</span>
50
+              {{scope.row.blood_flow_volume?scope.row.blood_flow_volume:''}}
46 51
             </template>
47 52
           </el-table-column>
48
-          <el-table-column prop="transmembrane_pressure" align="center" label="跨膜压(mmhg)" width="120">
53
+
54
+          <el-table-column prop="transmembrane_pressure" align="center" label="跨膜压(mmhg)" width="120" v-if="isShow('跨膜压')">
49 55
             <template slot-scope="scope">
50 56
               {{scope.row.transmembrane_pressure?scope.row.transmembrane_pressure:''}}
51 57
             </template>
52 58
           </el-table-column>
53
-          <el-table-column prop="ultrafiltration_volume" align="center" label="超滤量(L)" width="110">
59
+
60
+
61
+
62
+          <el-table-column prop="ultrafiltration_volume" align="center" label="超滤量(L)" width="110" v-if="isShow('超滤量')">
54 63
             <template slot-scope="scope">
55 64
               {{scope.row.ultrafiltration_volume?scope.row.ultrafiltration_volume:''}}
56 65
             </template>
57 66
           </el-table-column>
58
-          <el-table-column prop="sodium_concentration" align="center" label="钠浓度(mmol/L)" width="126">
67
+          <el-table-column prop="sodium_concentration" align="center" label="钠浓度(mmol/L)" width="126" v-if="isShow('钠浓度')">
59 68
             <template slot-scope="scope">
60 69
               {{scope.row.sodium_concentration?scope.row.sodium_concentration:''}}
61 70
             </template>
62 71
           </el-table-column>
63
-          <el-table-column prop="dialysate_temperature" align="center" label="透析液温度(℃)" width="120">
72
+          <el-table-column prop="dialysate_temperature" align="center" label="透析液温度(℃)" width="120" v-if="isShow('透析液温度')">
64 73
             <template slot-scope="scope">
65 74
               {{scope.row.dialysate_temperature?scope.row.dialysate_temperature:''}}
66 75
             </template>
67 76
           </el-table-column>
68
-          <el-table-column prop="replacement_rate" align="center" label="置换率(L/h)" width="120">
77
+          <el-table-column prop="replacement_rate" align="center" label="置换率(L/h)" width="120" v-if="isShow('置换率')">
69 78
             <template slot-scope="scope">
70 79
               {{scope.row.replacement_rate?scope.row.replacement_rate:''}}
71 80
             </template>
72 81
           </el-table-column>
73
-          <el-table-column prop="displacement_quantity" align="center" label="置换量(L)" width="100">
82
+          <el-table-column prop="displacement_quantity" align="center" label="置换量(L)" width="100" v-if="isShow('置换量')">
74 83
             <template slot-scope="scope">
75 84
               {{scope.row.displacement_quantity?scope.row.displacement_quantity:''}}
76 85
             </template>
77 86
           </el-table-column>
78
-          <el-table-column prop="displacement_flow_quantity" align="center" label="电导度(mS/m)" width="100">
87
+          <el-table-column prop="displacement_flow_quantity" align="center" label="电导度(mS/m)" width="100" v-if="isShow('电导度')">
79 88
             <template slot-scope="scope">
80
-              {{scope.row.displacement_flow_quantity?scope.row.displacement_flow_quantity:''}}
89
+              {{scope.row.conductivity?scope.row.conductivity:''}}
81 90
             </template>
82 91
           </el-table-column>
83
-          <el-table-column prop="displacement_flow_quantity" align="center" label="置换液流量(ml/h)" width="100">
92
+          <el-table-column prop="displacement_flow_quantity" align="center" label="置换液流量(ml/h)" width="100" v-if="isShow('置换液流量')">
84 93
             <template slot-scope="scope">
85 94
               {{scope.row.displacement_flow_quantity?scope.row.displacement_flow_quantity:''}}
86 95
             </template>
87 96
           </el-table-column>
88
-          <el-table-column prop="symptom" align="center" label="病情变化" width="130">
97
+          <el-table-column prop="symptom" align="center" label="病情变化" width="130" v-if="isShow('病情变化')">
89 98
           </el-table-column>
90
-          <el-table-column prop="dispose" align="center" label="处理" width="130">
99
+          <el-table-column prop="dispose" align="center" label="处理" width="130" v-if="isShow('处理')">
91 100
           </el-table-column>
92
-          <el-table-column prop="result" align="center" label="结果" width="130">
101
+          <el-table-column prop="result" align="center" label="结果" width="130" v-if="isShow('结果')">
93 102
           </el-table-column>
94 103
         </el-table>
95 104
       </div>
@@ -106,6 +115,12 @@
106 115
                                 format="yyyy-MM-dd HH:mm" value-format="timestamp"></el-date-picker>
107 116
               </el-form-item>
108 117
             </el-col>
118
+            <el-col :span="8" v-if="isShow('体温')" >
119
+              <el-form-item label="体温(℃):" >
120
+                <el-input v-model="form.temperature"></el-input>
121
+              </el-form-item>
122
+            </el-col>
123
+
109 124
             <el-col :span="8" v-if="isShow('收缩压')">
110 125
               <el-form-item label="收缩压(mmhg):">
111 126
                 <el-input v-model="form.systolic_bp"></el-input>
@@ -122,21 +137,22 @@
122 137
                 <el-input v-model="form.pulse_frequency"></el-input>
123 138
               </el-form-item>
124 139
             </el-col>
125
-          <!-- </el-row>
126
-
127
-          <el-row :gutter="20"> -->
128
-
129
-            <el-col :span="8" v-if="isShow('体温')" >
130
-              <el-form-item label="体温(℃):" >
131
-                <el-input v-model="form.temperature"></el-input>
132
-              </el-form-item>
133
-            </el-col>
134
-
135 140
             <el-col :span="8" v-if="isShow('呼吸频率')">
136 141
               <el-form-item label="呼吸频率(次/分):">
137 142
                 <el-input v-model="form.breathing_rated"></el-input>
138 143
               </el-form-item>
139 144
             </el-col>
145
+            <el-col :span="8"  v-if="isShow('静脉压')">
146
+              <el-form-item label="静脉压(mmHg):">
147
+                <el-input v-model="form.venous_pressure"></el-input>
148
+              </el-form-item>
149
+            </el-col>
150
+            <el-col :span="8" v-if="isShow('动脉压')">
151
+              <el-form-item label="动脉压(mmHg):">
152
+                <el-input v-model="form.arterial_pressure"></el-input>
153
+              </el-form-item>
154
+            </el-col>
155
+
140 156
             <el-col :span="8" v-if="isShow('血流量')">
141 157
               <el-form-item label="血流量(ml/min):">
142 158
                 <el-input v-model="form.blood_flow_volume"></el-input>
@@ -145,25 +161,22 @@
145 161
           <!-- </el-row>
146 162
 
147 163
           <el-row :gutter="20"> -->
148
-            <el-col :span="8"  v-if="isShow('静脉压')">
149
-              <el-form-item label="静脉压(mmHg):">
150
-                <el-input v-model="form.venous_pressure"></el-input>
151
-              </el-form-item>
152
-            </el-col>
164
+
165
+
166
+
167
+
168
+          <!-- </el-row>
169
+
170
+          <el-row :gutter="20"> -->
171
+
153 172
             <el-col :span="8" v-if="isShow('跨膜压')">
154 173
               <el-form-item label="跨膜压(mmHg):">
155 174
                 <el-input v-model="form.transmembrane_pressure"></el-input>
156 175
               </el-form-item>
157 176
             </el-col>
158
-            <el-col :span="8" v-if="isShow('动脉压')">
159
-              <el-form-item label="动脉压(mmHg):">
160
-                <el-input v-model="form.arterial_pressure"></el-input>
161
-              </el-form-item>
162
-            </el-col>
163 177
 
164
-          <!-- </el-row>
165 178
 
166
-          <el-row :gutter="20"> -->
179
+
167 180
             <el-col :span="8" v-if="isShow('超滤率')">
168 181
               <el-form-item label="超滤率(ml/h)">
169 182
                 <el-input v-model="form.ultrafiltration_rate"></el-input>

+ 0 - 1
src/xt_pages/dialysis/details/dialysisMonitoring.vue Parādīt failu

@@ -19,7 +19,6 @@
19 19
         <th v-if="isShow('置换量')" width="92px">置换量(L)</th>
20 20
         <th v-if="isShow('电导度')" width="92px">电导度(mS/m)</th>
21 21
         <th v-if="isShow('置换液流量')"  width="92px">置换液流量(ml/h)</th>
22
-
23 22
         <th v-if="isShow('病情变化')" width="92px">病情变化</th>
24 23
         <th v-if="isShow('处理')"  width="92px">处理</th>
25 24
         <th v-if="isShow('结果')" width="92px">结果</th>

+ 72 - 3
src/xt_pages/dialysis/details/index.vue Parādīt failu

@@ -28,7 +28,25 @@
28 28
         :device_numbers="device_numbers"
29 29
         :admin_user_map="admin_user_map"
30 30
         :device_map="device_map"
31
-        :device_number_map="device_number_map">
31
+        :device_number_map="device_number_map"
32
+        :niprocart_info="niprocart_info"
33
+        :jms_info="jms_info"
34
+        :fistula_needle_set_info="fistula_needle_set_info"
35
+        :fistula_needle_set_16_info="fistula_needle_set_16_info"
36
+        :hemoperfusion_info="hemoperfusion_info"
37
+        :dialyser_sterilised_info="dialyser_sterilised_info"
38
+        :filtryzer_info="filtryzer_info"
39
+        :dialyzers_info="dialyzers_info"
40
+        :injector_info="injector_info"
41
+        :bloodlines_info="bloodlines_info"
42
+        :tubingHemodialysis_info="tubingHemodialysis_info"
43
+        :safe_package_info="safe_package_info"
44
+        :aliquid_info="aliquid_info"
45
+        :config = "config"
46
+
47
+
48
+
49
+      >
32 50
       </nav-igation>
33 51
 
34 52
       <basic-infor :patient="patient" :device_number="schedual.id == 0 ? '' : schedual.device_number.number"
@@ -285,7 +303,22 @@
285 303
 
286 304
         admin_user_map: {}, // {user_id: admin_user object}
287 305
         device_map: {}, // {device_id: device}
288
-        device_number_map: {} // {device_number_id: device_number}
306
+        device_number_map: {}, // {device_number_id: device_number}
307
+
308
+        niprocart_info:[],
309
+        jms_info:[],
310
+        fistula_needle_set_info:[],
311
+        fistula_needle_set_16_info:[],
312
+        hemoperfusion_info:[],
313
+        dialyser_sterilised_info:[],
314
+        filtryzer_info:[],
315
+        dialyzers_info:[],
316
+        injector_info:[],
317
+        bloodlines_info:[],
318
+        tubingHemodialysis_info:[],
319
+        safe_package_info:[],
320
+        aliquid_info:[],
321
+        config:{},
289 322
       }
290 323
     },
291 324
     created() {
@@ -331,7 +364,7 @@
331 364
         var mrl = this.monitor_records.length
332 365
         for (let index = 0; index < mrl; index++) {
333 366
           if (this.monitor_records[index].id == record_id) {
334
-            console.log('11111')
367
+
335 368
             this.monitor_records.splice(index, 1)
336 369
             break
337 370
           }
@@ -356,6 +389,42 @@
356 389
             var monitor_records = resp.data.monitor_records // 透析监测
357 390
             var dialysis_order = resp.data.dialysis_order // 透析记录
358 391
 
392
+
393
+            var niprocart_info = resp.data.niprocart_info
394
+            var jms_info = resp.data.jms_info
395
+            var fistula_needle_set_info = resp.data.fistula_needle_set_info
396
+            var fistula_needle_set_16_info = resp.data.fistula_needle_set_16_info
397
+            var hemoperfusion_info = resp.data.hemoperfusion_info
398
+            var dialyser_sterilised_info = resp.data.dialyser_sterilised_info
399
+            var filtryzer_info = resp.data.filtryzer_info
400
+            var dialyzers_info = resp.data.dialyzers_info
401
+            var injector_info = resp.data.injector_info
402
+            var bloodlines_info = resp.data.bloodlines_info
403
+            var tubingHemodialysis_info = resp.data.tubingHemodialysis_info
404
+            var safe_package_info = resp.data.safe_package_info
405
+            var aliquid_info = resp.data.aliquid_info
406
+
407
+            var config = resp.data.config
408
+
409
+
410
+
411
+            this.niprocart_info = niprocart_info
412
+            this.jms_info = jms_info
413
+            this.fistula_needle_set_info = fistula_needle_set_info
414
+            this.fistula_needle_set_16_info = fistula_needle_set_16_info
415
+            this.hemoperfusion_info = hemoperfusion_info
416
+            this.dialyser_sterilised_info = dialyser_sterilised_info
417
+            this.filtryzer_info = filtryzer_info
418
+            this.dialyzers_info = dialyzers_info
419
+            this.injector_info = injector_info
420
+            this.bloodlines_info = bloodlines_info
421
+            this.tubingHemodialysis_info = tubingHemodialysis_info
422
+            this.safe_package_info = safe_package_info
423
+            this.aliquid_info = aliquid_info
424
+            this.config = config
425
+
426
+
427
+
359 428
             this.patient = patient
360 429
             this.schedual = schedual == null ? { id: 0 } : schedual
361 430
             this.prescription = prescription == null ? { id: 0 } : prescription

+ 3 - 3
src/xt_pages/stock/Dialog/salesReturnDialog.vue Parādīt failu

@@ -10,7 +10,7 @@
10 10
     <el-row :gutter="20">
11 11
       <el-col :span="8">
12 12
         <el-table
13
-          :data="propForm.goodType"
13
+          :data="propForm.goods"
14 14
           ref="table"
15 15
           border
16 16
           highlight-current-row
@@ -24,7 +24,7 @@
24 24
             align="center"
25 25
             label="商品类型">
26 26
             <template slot-scope="scope">
27
-              <span>{{scope.row.type_name}}</span>
27
+              <span>{{getGoodTypeName(scope.row)}}</span>
28 28
             </template>
29 29
           </el-table-column>
30 30
         </el-table>
@@ -137,6 +137,7 @@
137 137
             keyName = key
138 138
           }
139 139
         }
140
+        console.log(keyName)
140 141
         this.goodInfoTableData = []
141 142
         this.goodInfo = []
142 143
         if (keyName.length > 0) {
@@ -287,7 +288,6 @@
287 288
         }
288 289
 
289 290
       }, getGoodTypeName: function(val) {
290
-        console.log(val)
291 291
         let keyName = ''
292 292
         for (var key in val) {
293 293
           if (key != 'index') {

+ 92 - 0
src/xt_pages/stock/config/automaticReduce.vue Parādīt failu

@@ -0,0 +1,92 @@
1
+<template>
2
+  <div class=" sign-and-weigh-box" style="background: white">
3
+    <div style="text-align: center;margin-top: 150px">
4
+      <el-button type="primary"   v-if="!is_open" @click="changeOpen(1)">启用自动扣减</el-button>
5
+      <el-button type="danger"   v-if="is_open"  @click="changeOpen(2)">关闭自动扣减</el-button>
6
+      <div style="margin-top: 40px;" ><p style="color:#909399;text-align: center;">开启后,系统设定的固定商品类型,在pad端中透析记录-透析处方-透析耗材中设置好(pc端暂不支持),患者执行上机之后,将会自动产生出库单;<br/>系统设定之外的商品类型则需要手动新增出库单。</p></div>
7
+    </div>
8
+  </div>
9
+</template>
10
+
11
+<script>
12
+  import { createStockAutomaticReduceConfig, getAutomaticReduceConfig } from '@/api/config'
13
+
14
+  export default {
15
+    name: 'automaticReduce',
16
+    data() {
17
+      return {
18
+        is_open: false
19
+      }
20
+    },
21
+    methods: {
22
+      changeOpen(val){
23
+        var message = ''
24
+        if(val == 1){
25
+          message = '启用库存自动扣减功能'
26
+        }else{
27
+          message = '关闭库存自动扣减功能'
28
+        }
29
+
30
+        this.$confirm(message , '提示', {
31
+          confirmButtonText: '确定',
32
+          cancelButtonText: '取消',
33
+          type: 'info'
34
+        }).then(() => {
35
+          createStockAutomaticReduceConfig(val).then(response => {
36
+            if (response.data.state == 0) {
37
+              this.$message.error(response.data.msg)
38
+              return false
39
+            } else {
40
+              if (response.data.data.is_open == 1){
41
+                this.is_open = true
42
+                this.$message({
43
+                  type: 'success',
44
+                  message: '已启用'
45
+                });
46
+              }else{
47
+                this.is_open = false
48
+                this.$message({
49
+                  type: 'success',
50
+                  message: '已关闭'
51
+                });
52
+              }
53
+            }
54
+          })
55
+        }).catch(() => {
56
+
57
+        });
58
+
59
+      },
60
+      getConfig() {
61
+        getAutomaticReduceConfig().then(response => {
62
+          if (response.data.state == 0) {
63
+            this.$message.error(response.data.msg)
64
+            return false
65
+          } else {
66
+            var config = response.data.data.config
67
+            if (config.is_open == 1) {
68
+              this.is_open = true
69
+            } else {
70
+              this.is_open = false
71
+            }
72
+          }
73
+        })
74
+      }
75
+    },
76
+    created() {
77
+      this.getConfig()
78
+    }
79
+  }
80
+</script>
81
+
82
+
83
+<style>
84
+  .sign-and-weigh-box .sign-and-weigh-box-patients .cell {
85
+    font-size: 12px;
86
+  }
87
+
88
+  .sign-and-weigh-box .sign-and-weigh-box-patients .current-row > td {
89
+    background: #6fb5fa;
90
+  }
91
+
92
+</style>

+ 16 - 0
src/xt_pages/stock/config/goodType.vue Parādīt failu

@@ -47,19 +47,35 @@
47 47
             <template slot-scope="scope">
48 48
               <el-tooltip class="item" effect="dark" content="编辑" placement="top">
49 49
                 <el-button
50
+                  v-if="scope.row.type == 0"
50 51
                   size="small"
51 52
                   type="primary"
52 53
                   icon="el-icon-edit-outline"
53 54
                   @click="handleEdit(scope.$index, scope.row)">
54 55
                 </el-button>
56
+                <el-button
57
+                  v-if="scope.row.type == 1"
58
+                  size="small"
59
+                  type="info" plain
60
+                  icon="el-icon-edit-outline"
61
+                  @click="handleEdit(scope.$index, scope.row)">
62
+                </el-button>
55 63
               </el-tooltip>
56 64
               <el-tooltip class="item" effect="dark" content="删除" placement="top">
57 65
                 <el-button
66
+                  v-if="scope.row.type == 0"
58 67
                   size="small"
59 68
                   type="danger"
60 69
                   icon="el-icon-delete"
61 70
                   @click="handleDelete(scope.$index, scope.row)">
62 71
                 </el-button>
72
+                <el-button
73
+                  v-if="scope.row.type == 1"
74
+                  size="small"
75
+                  type="info" plain
76
+                  icon="el-icon-delete"
77
+                  @click="handleDelete(scope.$index, scope.row)">
78
+                </el-button>
63 79
               </el-tooltip>
64 80
             </template>
65 81
           </el-table-column>

+ 5 - 37
src/xt_pages/stock/index.vue Parādīt failu

@@ -19,6 +19,9 @@
19 19
           <el-tab-pane label="商品信息">
20 20
             <good-info></good-info>
21 21
           </el-tab-pane>
22
+          <el-tab-pane label="自动扣减">
23
+            <automatic-reduce></automatic-reduce>
24
+          </el-tab-pane>
22 25
 
23 26
         </el-tabs>
24 27
 
@@ -33,13 +36,11 @@
33 36
   import GoodInfo from './config/goodInfo'
34 37
   import GoodType from './config/goodType'
35 38
   import BreadCrumb from '@/xt_pages/components/bread-crumb'
36
-  import {
37
-    createStockAutomaticReduceConfig,
38
-    getAutomaticReduceConfig
39
-  } from '@/api/config'
39
+  import AutomaticReduce from './config/automaticReduce'
40 40
   export default {
41 41
     name: 'service',
42 42
     components: {
43
+      AutomaticReduce,
43 44
       GoodType,
44 45
       GoodInfo,
45 46
       Manufacturer,
@@ -60,41 +61,8 @@
60 61
     methods: {
61 62
       handleClick(tab, event) {
62 63
         console.log(tab, event, this.activeName)
63
-      },changeOpen(val){
64
-        var isOpen = 0
65
-
66
-        if(val){
67
-          isOpen = 1
68
-        }else{
69
-          isOpen = 2
70
-        }
71
-        createStockAutomaticReduceConfig(isOpen).then(response => {
72
-          if (response.data.state == 0) {
73
-            this.$message.error(response.data.msg)
74
-            return false
75
-          } else {
76
-            // this.$message.success("已启动")
77
-
78
-          }
79
-        })
80
-      },getConfig(){
81
-        getAutomaticReduceConfig().then(response => {
82
-          if (response.data.state == 0) {
83
-            this.$message.error(response.data.msg)
84
-            return false
85
-          } else {
86
-            var config = response.data.data.config
87
-
88
-            if (config.is_open == 1){
89
-              this.is_open = true
90
-            }else{
91
-              this.is_open = false
92
-            }
93
-          }
94
-        })
95 64
       }
96 65
     },created(){
97
-      this.getConfig()
98 66
 
99 67
     }
100 68
   }

+ 2 - 0
src/xt_pages/stock/stockOutOrderAdd.vue Parādīt failu

@@ -479,7 +479,9 @@
479 479
           }, []) // 设置cur默认类型为数组,并且初始值为空的数组
480 480
 
481 481
           this.$set(goodObj, this.propForm.goodType[i].id, goodInfo)
482
+          console.log(goodObj)
482 483
           this.propForm.goods.push(goodObj)
484
+          console.log(this.propForm.goods)
483 485
 
484 486
         }
485 487
 

+ 50 - 0
src/xt_pages/stock/stockOutOrderDetail.vue Parādīt failu

@@ -30,6 +30,7 @@
30 30
       <el-row :gutter="12" style="margin-top: 10px">
31 31
         <el-table :data="warehousingOutInfo.warehousingOutData" :class="signAndWeighBoxPatients" style="width: 100%"
32 32
                   border :header-cell-style="{ backgroundColor: 'rgb(245, 247, 250)'}"
33
+                  :span-method="merge"
33 34
         >
34 35
           <el-table-column min-width="35" align="center">
35 36
             <template slot="header" slot-scope="scope">
@@ -115,6 +116,8 @@
115 116
     },
116 117
     data() {
117 118
       return {
119
+        tempArr: [],
120
+        sameRowArr: [],
118 121
         crumbs: [
119 122
           { path: false, name: '库存管理' },
120 123
           { path: false, name: '耗材出库单' },
@@ -199,6 +202,7 @@
199 202
               this.warehousingOutInfo.warehousingOutData.push(response.data.data.list[i])
200 203
             }
201 204
             this.warehousingOutInfo.info = response.data.data.info
205
+            this.handleSpanTempArr()
202 206
           }
203 207
         })
204 208
       }, deleteRecord: function() {
@@ -239,6 +243,52 @@
239 243
           name: 'user_detail',
240 244
           query: { id: row.id }
241 245
         })
246
+      },merge({ row, column, rowIndex, columnIndex }) {
247
+        if (columnIndex === 0) {
248
+          const _row = this.tempArr[rowIndex]
249
+          const _col = _row > 0 ? 1 : 0
250
+          return {
251
+            rowspan: _row,
252
+            colspan: _col
253
+          }
254
+        }
255
+      },handleSpanTempArr(){
256
+        this.tempArr = []
257
+
258
+        for (let i = 0; i < this.warehousingOutInfo.warehousingOutData.length; i++) {
259
+          if (i === 0) {
260
+            this.tempArr.push(1)
261
+            this.pos = 0
262
+          } else {
263
+            // 判断当前元素与上一个元素是否相同
264
+            if (this.warehousingOutInfo.warehousingOutData[i].good_type_id === this.warehousingOutInfo.warehousingOutData[i - 1].good_type_id) {
265
+              this.tempArr[this.pos] += 1
266
+              this.tempArr.push(0)
267
+            } else {
268
+              this.tempArr.push(1)
269
+              this.pos = i
270
+            }
271
+          }
272
+        }
273
+
274
+        let sameRowArr = [], sIdx = 0
275
+        this.warehousingOutInfo.warehousingOutData.forEach((item, index) => {
276
+          item.index = index
277
+          if (index === 0) {
278
+            sameRowArr.push([index])
279
+          } else {
280
+            if (item.good_type_id === this.warehousingOutInfo.warehousingOutData[index - 1].good_type_id) {
281
+              sameRowArr[sIdx].push(index)
282
+            } else {
283
+              sIdx = sIdx + 1
284
+              sameRowArr.push([index])
285
+            }
286
+          }
287
+        })
288
+        this.sameRowArr = sameRowArr
289
+
290
+
291
+
242 292
       }
243 293
     }
244 294
   }