Browse Source

Merge branch 'superman' of http://git.shengws.com:3000/zhangbj/xt_vue into superman

zhengchengwu 6 years ago
parent
commit
e6914bd00a
44 changed files with 2957 additions and 299 deletions
  1. 0 2
      config/dev.env.js
  2. 3 1
      src/api/signandweigh.js
  3. 8 0
      src/api/stock.js
  4. 4 3
      src/lang/zh.js
  5. 4 4
      src/main.js
  6. 16 11
      src/router/index.js
  7. 65 59
      src/xt_pages/sign/index.vue
  8. 2 2
      src/xt_pages/stock/Dialog/goodInfoDailog.vue
  9. 1 1
      src/xt_pages/stock/Dialog/stockInDetailDailog.vue
  10. 8 8
      src/xt_pages/stock/Dialog/stockOutDialog.vue
  11. 28 5
      src/xt_pages/stock/cancelStockOrder.vue
  12. 9 4
      src/xt_pages/stock/cancelStockOrderAdd.vue
  13. 2 2
      src/xt_pages/stock/cancelStockOrderDetail.vue
  14. 18 5
      src/xt_pages/stock/cancelStockOrderEdit.vue
  15. 2 2
      src/xt_pages/stock/config/dealer.vue
  16. 8 8
      src/xt_pages/stock/config/goodInfo.vue
  17. 5 5
      src/xt_pages/stock/config/goodType.vue
  18. 2 2
      src/xt_pages/stock/config/manufacturer.vue
  19. 453 0
      src/xt_pages/stock/detail/cancelStockDetail.vue
  20. 456 0
      src/xt_pages/stock/detail/salesReturnDetail.vue
  21. 465 0
      src/xt_pages/stock/detail/stockInDetail.vue
  22. 468 0
      src/xt_pages/stock/detail/stockOutDetail.vue
  23. 2 2
      src/xt_pages/stock/index.vue
  24. 28 5
      src/xt_pages/stock/otherCancelStockOrder.vue
  25. 28 5
      src/xt_pages/stock/otherSalesReturnOrder.vue
  26. 30 4
      src/xt_pages/stock/otherStockInOrder.vue
  27. 29 5
      src/xt_pages/stock/otherStockOutOrder.vue
  28. 15 4
      src/xt_pages/stock/salesReturnEdit.vue
  29. 28 5
      src/xt_pages/stock/salesReturnOrder.vue
  30. 10 4
      src/xt_pages/stock/salesReturnOrderAdd.vue
  31. 1 1
      src/xt_pages/stock/salesReturnOrderDetail.vue
  32. 451 0
      src/xt_pages/stock/stockDetail.vue
  33. 64 0
      src/xt_pages/stock/stockDetailIndex.vue
  34. 29 2
      src/xt_pages/stock/stockInOrder.vue
  35. 9 4
      src/xt_pages/stock/stockInOrderAdd.vue
  36. 2 2
      src/xt_pages/stock/stockInOrderDetail.vue
  37. 22 5
      src/xt_pages/stock/stockInOrderEdit.vue
  38. 29 5
      src/xt_pages/stock/stockOutOrder.vue
  39. 9 4
      src/xt_pages/stock/stockOutOrderAdd.vue
  40. 1 1
      src/xt_pages/stock/stockOutOrderDetail.vue
  41. 17 4
      src/xt_pages/stock/stockOutOrderEdit.vue
  42. 1 1
      src/xt_pages/stock/stockQuery.vue
  43. 4 0
      src/xt_pages/user/components/PatientForm.vue
  44. 121 112
      src/xt_pages/workforce/template.vue

+ 0 - 2
config/dev.env.js View File

7
   NODE_ENV: '"development"',
7
   NODE_ENV: '"development"',
8
   ENV_CONFIG: '"dev"',
8
   ENV_CONFIG: '"dev"',
9
   BASE_API: '"http://localhost:9529"', // '"http://localhost:9529"'//http://api.xt.test.sgjyun.com http://112.74.16.180:9527
9
   BASE_API: '"http://localhost:9529"', // '"http://localhost:9529"'//http://api.xt.test.sgjyun.com http://112.74.16.180:9527
10
-  // PATIENT_SIT: '"http://test1.sgjyun.com"',
11
-  // MIRCOMALL_SIT: '"http://mall.test.sgjyun.com"'
12
 }
10
 }

+ 3 - 1
src/api/signandweigh.js View File

1
 import request from '@/utils/request'
1
 import request from '@/utils/request'
2
 
2
 
3
 export function fetchSignPatients(params) {
3
 export function fetchSignPatients(params) {
4
+  console.log("bbbbbbbbbbbbbbb")
5
+  console.log(params)
4
   return request({
6
   return request({
5
     url: '/api/sign/patients',
7
     url: '/api/sign/patients',
6
-    method: 'get',
8
+    method: 'Get',
7
     params: params
9
     params: params
8
   })
10
   })
9
 }
11
 }

+ 8 - 0
src/api/stock.js View File

536
   })
536
   })
537
 }
537
 }
538
 
538
 
539
+export function getStockDetail(params) {
540
+  return request({
541
+    url: '/api/stock/detail',
542
+    method: 'get',
543
+    params: params
544
+  })
545
+}
546
+

+ 4 - 3
src/lang/zh.js View File

113
     orderRecord: '订单详情',
113
     orderRecord: '订单详情',
114
     recordList: '订单记录',
114
     recordList: '订单记录',
115
     stockManage: '库存管理',
115
     stockManage: '库存管理',
116
-    goodType: '品类型',
116
+    goodType: '品类型',
117
     stockIn: '入库管理',
117
     stockIn: '入库管理',
118
     stockOut: '出库管理',
118
     stockOut: '出库管理',
119
     manufacturer: '厂家',
119
     manufacturer: '厂家',
130
     workforce_template: '排班模板设置',
130
     workforce_template: '排班模板设置',
131
     statistics: '统计分析',
131
     statistics: '统计分析',
132
     config: '库存配置',
132
     config: '库存配置',
133
-    goodInfo: '品信息',
133
+    goodInfo: '品信息',
134
     CourseOfDiseaseManage: '病程管理',
134
     CourseOfDiseaseManage: '病程管理',
135
     RescueRecord: '抢救记录',
135
     RescueRecord: '抢救记录',
136
     special_permission_manage: '特殊权限管理',
136
     special_permission_manage: '特殊权限管理',
151
     stockInDetail: '入库单详情',
151
     stockInDetail: '入库单详情',
152
     salesReturnDetail: '退货单详情',
152
     salesReturnDetail: '退货单详情',
153
     stockOutDetail: '出库单详情',
153
     stockOutDetail: '出库单详情',
154
-    cancelStockDetail: '出库退库单详情'
154
+    cancelStockDetail: '出库退库单详情',
155
+    stockDetail:'出入库明细查询',
155
 
156
 
156
   },
157
   },
157
   navbar: {
158
   navbar: {

+ 4 - 4
src/main.js View File

7
 
7
 
8
 import '@/styles/index.scss' // global css
8
 import '@/styles/index.scss' // global css
9
 import '@/styles/variables.scss' // global css
9
 import '@/styles/variables.scss' // global css
10
-import '@/assets/iconfont/iconfont.css' 
11
-import '@/assets/icon/iconfont.css' 
12
-
10
+import '@/assets/iconfont/iconfont.css'
11
+import '@/assets/icon/iconfont.css'
12
+import { Message } from 'element-ui'
13
 import App from './App'
13
 import App from './App'
14
 import router from './router'
14
 import router from './router'
15
 import store from './store'
15
 import store from './store'
43
   render: h => h(App)
43
   render: h => h(App)
44
 })
44
 })
45
 
45
 
46
-Vue.prototype.Base64 = require('js-base64').Base64
46
+Vue.prototype.Base64 = require('js-base64').Base64

+ 16 - 11
src/router/index.js View File

126
   // 本地开始
126
   // 本地开始
127
   // /////////////////////////////
127
   // /////////////////////////////
128
   {
128
   {
129
-    path: '/sign',
129
+    path:'/sign',
130
     component: Layout,
130
     component: Layout,
131
-    redirect: '/sign/index',
132
-    name: 'sign',
133
-    alwaysShow: true,
134
-    meta: { title: 'signWeight', icon: 'table' },
135
-    children: [
136
-      { path: '/sign/index', component: () => import('@/xt_pages/sign/index'), name: 'signWeight', meta: { title: 'signWeight' }}
137
-    ]
131
+    redirct: '/sign/index',
132
+    children: [{
133
+      path: '/sign',
134
+      component:() => import('@/xt_pages/sign/index'),
135
+      name:'sign',
136
+      meta: {title:'signWeight',icon:'table',noCache:true}
137
+    }]
138
   },
138
   },
139
   {
139
   {
140
     path: '/qcd',
140
     path: '/qcd',
442
         component: () => import('@/xt_pages/stock/stockQuery'),
442
         component: () => import('@/xt_pages/stock/stockQuery'),
443
         name: 'stockQuery',
443
         name: 'stockQuery',
444
         meta: { title: 'stockQuery' }
444
         meta: { title: 'stockQuery' }
445
-      }, {
445
+      },{
446
+        path: '/stock/detail',
447
+        component: () => import('@/xt_pages/stock/stockDetailIndex'),
448
+        name: 'stockDetail',
449
+        meta: { title: 'stockDetail' }
450
+      },
451
+      {
446
         path: '/stock/in/add',
452
         path: '/stock/in/add',
447
         component: () => import('@/xt_pages/stock/stockInOrderAdd'),
453
         component: () => import('@/xt_pages/stock/stockInOrderAdd'),
448
         name: 'stockInOrderAdd',
454
         name: 'stockInOrderAdd',
499
         is_menu: false,
505
         is_menu: false,
500
         meta: { title: 'cancelStockDetail' }
506
         meta: { title: 'cancelStockDetail' }
501
       }
507
       }
502
-
503
     ]
508
     ]
504
   },
509
   },
505
   {
510
   {
925
   //   name: 'qcd',
930
   //   name: 'qcd',
926
   //   alwaysShow: true,
931
   //   alwaysShow: true,
927
   //   meta: { title: '科室质控', icon: 'table' },
932
   //   meta: { title: '科室质控', icon: 'table' },
928
-  //   children: [ 
933
+  //   children: [
929
   //     { path: '/statistics/index', component: () => import('@/xt_pages/statistics/index'), name: 'dialysistotal', meta: { title: 'statistics' }},
934
   //     { path: '/statistics/index', component: () => import('@/xt_pages/statistics/index'), name: 'dialysistotal', meta: { title: 'statistics' }},
930
   //     { path: '/qcd/dialysistotal', component: () => import('@/xt_pages/qcd/dialysisTotal'), name: 'dialysistotal', meta: { title: '透析总量' }},
935
   //     { path: '/qcd/dialysistotal', component: () => import('@/xt_pages/qcd/dialysisTotal'), name: 'dialysistotal', meta: { title: '透析总量' }},
931
   //     { path: '/qcd/processindicators', component: () => import('@/xt_pages/qcd/processIndicators'), name: 'processIndicators', meta: { title: '过程指标' }},
936
   //     { path: '/qcd/processindicators', component: () => import('@/xt_pages/qcd/processIndicators'), name: 'processIndicators', meta: { title: '过程指标' }},

+ 65 - 59
src/xt_pages/sign/index.vue View File

7
     <div class="app-container sign-and-weigh-box">
7
     <div class="app-container sign-and-weigh-box">
8
         <el-row :gutter="20">
8
         <el-row :gutter="20">
9
             <el-col :span="7">
9
             <el-col :span="7">
10
-                <div class="title">患者列表</div>
10
+                <div class="dataTitle">患者列表</div>
11
                 <div style="margin-bottom: 10px;">
11
                 <div style="margin-bottom: 10px;">
12
                     <el-input v-model="queryParams.keywords" placeholder="姓名/透析号" style="width: 180px;" @change="changeSearch"></el-input>
12
                     <el-input v-model="queryParams.keywords" placeholder="姓名/透析号" style="width: 180px;" @change="changeSearch"></el-input>
13
                     <el-select v-model="queryParams.schedule_type" style="width: 100px;" @change="changeSearch">
13
                     <el-select v-model="queryParams.schedule_type" style="width: 100px;" @change="changeSearch">
15
                     </el-select>
15
                     </el-select>
16
                 </div>
16
                 </div>
17
                 <el-table  :data="patients" :class="signAndWeighBoxPatients" style="width: 100%" border highlight-current-row :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)'}" max-height="300" @current-change="handleCurrentChange">  
17
                 <el-table  :data="patients" :class="signAndWeighBoxPatients" style="width: 100%" border highlight-current-row :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)'}" max-height="300" @current-change="handleCurrentChange">  
18
-                    <el-table-column type="index" label="序号" min-width="20" align="center"></el-table-column>
19
-                   <el-table-column prop="name" label="姓名" min-width="50" align="center">
18
+                    <el-table-column type="index" label="序号" min-width="30" align="center"></el-table-column>
19
+                   <el-table-column prop="name" label="姓名" min-width="30" align="center">
20
                        <template slot-scope="scope">
20
                        <template slot-scope="scope">
21
                             {{scope.row.name}}({{scope.row.dialysis_no}})
21
                             {{scope.row.name}}({{scope.row.dialysis_no}})
22
                         </template> 
22
                         </template> 
23
                     </el-table-column> 
23
                     </el-table-column> 
24
 
24
 
25
-                    <el-table-column prop="state" label="状态" min-width="30" align="center" >
25
+                    <el-table-column prop="state" label="状态" min-width="30" align="center">
26
                         <template slot-scope="scope">
26
                         <template slot-scope="scope">
27
-                            <span v-if="scope.row.signin.id==0">未签到</span>
27
+                            <span v-if="scope.row.id==0">未签到</span>
28
                             <span v-else-if="scope.row.dialysis_order.stage==2">已经下机</span>
28
                             <span v-else-if="scope.row.dialysis_order.stage==2">已经下机</span>
29
                             <span v-else>已签到</span>
29
                             <span v-else>已签到</span>
30
                         </template>
30
                         </template>
31
                     </el-table-column>
31
                     </el-table-column>
32
                 </el-table>
32
                 </el-table>
33
             
33
             
34
-                <el-table  :data="schedules" style="width: 100%; margin:15px 0 0 0;" border highlight-current-row :header-cell-style="{ backgroundColor: 'rgb(245, 247, 250)'}">
34
+                <el-table  :data="schedules" :class="signAndWeighBoxPatients" style="width: 100%; margin:15px 0 0 0;" border highlight-current-row :header-cell-style="{ backgroundColor: 'rgb(245, 247, 250)'}">
35
                     <el-table-column prop="shift" label="班次" min-width="30" align="center"></el-table-column>
35
                     <el-table-column prop="shift" label="班次" min-width="30" align="center"></el-table-column>
36
                     <el-table-column prop="arrange" label="排班" min-width="30" align="center" ></el-table-column>
36
                     <el-table-column prop="arrange" label="排班" min-width="30" align="center" ></el-table-column>
37
                     <el-table-column prop="sign" label="签到" min-width="30" align="center" ></el-table-column>
37
                     <el-table-column prop="sign" label="签到" min-width="30" align="center" ></el-table-column>
44
             </el-col>
44
             </el-col>
45
 
45
 
46
             <el-col :span="17">
46
             <el-col :span="17">
47
-                <div class="title">患者信息</div>
47
+                <div class="dataTitle">患者信息</div>
48
                 <el-form class="information" label-position="left">
48
                 <el-form class="information" label-position="left">
49
                    <div class="patient-app-container">
49
                    <div class="patient-app-container">
50
                      <span>姓名:{{weigh_form.name}} &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;透析号:{{weigh_form.dialysis_no}} &nbsp;&nbsp;</span> <span class="button"><el-button  @click="change()">修改</el-button></span>
50
                      <span>姓名:{{weigh_form.name}} &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;透析号:{{weigh_form.dialysis_no}} &nbsp;&nbsp;</span> <span class="button"><el-button  @click="change()">修改</el-button></span>
54
                     <el-row :gutter="20">
54
                     <el-row :gutter="20">
55
                         <el-col :span="8">
55
                         <el-col :span="8">
56
                             <el-form-item label="透前称重(kg):" label-width="100px">
56
                             <el-form-item label="透前称重(kg):" label-width="100px">
57
-                                <el-input v-model="weigh_list.weight_before"></el-input>
57
+                                <el-input v-model="weigh_list.weight_before" :disabled="disa" ></el-input>
58
                             </el-form-item>
58
                             </el-form-item>
59
                         </el-col> 
59
                         </el-col> 
60
                         <el-col :span="8">
60
                         <el-col :span="8">
61
                             <el-form-item label="干体重(kg):" label-width="100px">
61
                             <el-form-item label="干体重(kg):" label-width="100px">
62
-                                <el-input v-model="weigh_list.dry_weight"></el-input>
62
+                                <el-input v-model="weigh_list.dry_weight" :disabled="disa"></el-input>
63
                             </el-form-item>
63
                             </el-form-item>
64
                         </el-col>
64
                         </el-col>
65
                     </el-row>
65
                     </el-row>
66
                     <el-row :gutter="20">
66
                     <el-row :gutter="20">
67
                         <el-col :span="4">
67
                         <el-col :span="4">
68
                             <el-form-item label="体温(℃):" label-width="80px">
68
                             <el-form-item label="体温(℃):" label-width="80px">
69
-                               <el-input v-model="weigh_list.temperature"></el-input>
69
+                               <el-input v-model="weigh_list.temperature" :disabled="disa" style="width:70px"></el-input>
70
                             </el-form-item>
70
                             </el-form-item>
71
                         </el-col>
71
                         </el-col>
72
                         <el-col :span="5">
72
                         <el-col :span="5">
73
                             <el-form-item label="脉搏(次/分):" label-width="90px">
73
                             <el-form-item label="脉搏(次/分):" label-width="90px">
74
-                                <el-input v-model="weigh_list.pulse_frequency"></el-input>
74
+                                <el-input v-model="weigh_list.pulse_frequency" :disabled="disa" style="width:70px"></el-input>
75
                             </el-form-item>
75
                             </el-form-item>
76
                         </el-col>
76
                         </el-col>
77
                         <el-col :span="5">
77
                         <el-col :span="5">
78
                             <el-form-item label="呼吸(次/分):" label-width="100px">
78
                             <el-form-item label="呼吸(次/分):" label-width="100px">
79
-                                <el-input v-model="weigh_list.breathing_rate"></el-input>
79
+                                <el-input v-model="weigh_list.breathing_rate" :disabled="disa" style="width:70px"></el-input>
80
                             </el-form-item>
80
                             </el-form-item>
81
                         </el-col>
81
                         </el-col>
82
                         <el-col :span="9">
82
                         <el-col :span="9">
83
                             <el-form-item label="血压(mmHg):" label-width="100px">
83
                             <el-form-item label="血压(mmHg):" label-width="100px">
84
-                                <el-input v-model="weigh_list.systolic_blood_pressure" style="width: 70px"></el-input>
84
+                                <el-input v-model="weigh_list.systolic_blood_pressure" style="width: 70px" :disabled="disa"></el-input>
85
                                 <span> / </span>
85
                                 <span> / </span>
86
-                                <el-input v-model="weigh_list.diastolic_blood_pressure" style="width: 70px"></el-input>
86
+                                <el-input v-model="weigh_list.diastolic_blood_pressure" style="width: 70px" :disabled="disa"></el-input>
87
                             </el-form-item>
87
                             </el-form-item>
88
                         </el-col>
88
                         </el-col>
89
                     </el-row>
89
                     </el-row>
93
                     <el-row :gutter="20">
93
                     <el-row :gutter="20">
94
                         <el-col :span="8">
94
                         <el-col :span="8">
95
                             <el-form-item label="透后称重(kg):" label-width="100px">
95
                             <el-form-item label="透后称重(kg):" label-width="100px">
96
-                                <el-input v-model="weigh_infor.weight_after"></el-input>
96
+                                <el-input v-model="weigh_infor.weight_after"  :disabled="disa"></el-input>
97
                             </el-form-item>
97
                             </el-form-item>
98
                         </el-col>
98
                         </el-col>
99
                         <el-col :span="8">
99
                         <el-col :span="8">
100
                             <el-form-item label="干体重(kg):" label-width="100px">
100
                             <el-form-item label="干体重(kg):" label-width="100px">
101
-                                <el-input v-model="weigh_list.dry_weight"></el-input>
101
+                                <el-input v-model="weigh_list.dry_weight" :disabled="disa"></el-input>
102
                             </el-form-item>
102
                             </el-form-item>
103
                         </el-col>
103
                         </el-col>
104
                     </el-row>
104
                     </el-row>
105
                     <el-row :gutter="20">
105
                     <el-row :gutter="20">
106
                         <el-col :span="4">
106
                         <el-col :span="4">
107
                             <el-form-item label="体温(℃):" label-width="80px">
107
                             <el-form-item label="体温(℃):" label-width="80px">
108
-                                <el-input v-model="weigh_infor.temperature"></el-input>
108
+                                <el-input v-model="weigh_infor.temperature" :disabled="disa" style="width:70px"></el-input>
109
                             </el-form-item>
109
                             </el-form-item>
110
                         </el-col>
110
                         </el-col>
111
                         <el-col :span="5">
111
                         <el-col :span="5">
112
                             <el-form-item label="脉搏(次/分):" label-width="90px">
112
                             <el-form-item label="脉搏(次/分):" label-width="90px">
113
-                                <el-input v-model="weigh_infor.pulse_frequency"></el-input>
113
+                                <el-input v-model="weigh_infor.pulse_frequency" :disabled="disa" style="width:70px"></el-input>
114
                             </el-form-item>
114
                             </el-form-item>
115
                         </el-col>
115
                         </el-col>
116
                         <el-col :span="5">
116
                         <el-col :span="5">
117
                             <el-form-item label="呼吸(次/分):" label-width="100px">
117
                             <el-form-item label="呼吸(次/分):" label-width="100px">
118
-                                <el-input v-model="weigh_infor.breathing_rate"></el-input>
118
+                                <el-input v-model="weigh_infor.breathing_rate" :disabled="disa" style="width:70px"></el-input>
119
                             </el-form-item>
119
                             </el-form-item>
120
                         </el-col>
120
                         </el-col>
121
                         <el-col :span="9">
121
                         <el-col :span="9">
122
                             <el-form-item label="血压(mmHg):" label-width="100px">
122
                             <el-form-item label="血压(mmHg):" label-width="100px">
123
-                                <el-input v-model="weigh_infor.systolic_blood_pressure" style="width: 70px" ></el-input>
123
+                                <el-input v-model="weigh_infor.systolic_blood_pressure" style="width: 70px" :disabled="disa"></el-input>
124
                                 <span> / </span>
124
                                 <span> / </span>
125
-                                <el-input v-model="weigh_infor.diastolic_blood_pressure" style="width: 70px" ></el-input>
125
+                                <el-input v-model="weigh_infor.diastolic_blood_pressure" style="width: 70px" :disabled="disa"></el-input>
126
                             </el-form-item>
126
                             </el-form-item>
127
                         </el-col>
127
                         </el-col>
128
                     </el-row>
128
                     </el-row>
130
                     <div class="border"></div>
130
                     <div class="border"></div>
131
                     <div v-if="show">
131
                     <div v-if="show">
132
                     <el-row :gutter="20">
132
                     <el-row :gutter="20">
133
-                        <el-col :span="23" align="right">
133
+                        <el-col :span="23" align="right" class="button">
134
                             <el-button  @click="hide()">取消</el-button>
134
                             <el-button  @click="hide()">取消</el-button>
135
                             <el-button @click="savedata();updatedata()" type="primary">保存</el-button>
135
                             <el-button @click="savedata();updatedata()" type="primary">保存</el-button>
136
                         </el-col>
136
                         </el-col>
152
   data() {
152
   data() {
153
     return {
153
     return {
154
       crumbs: [
154
       crumbs: [
155
-          { path: false, name: '签到称重' },
156
           { path: '/sign/index', name: '签到称重' }
155
           { path: '/sign/index', name: '签到称重' }
157
         ],
156
         ],
158
       patientlist: [],
157
       patientlist: [],
240
       }],
239
       }],
241
       patients: [],
240
       patients: [],
242
       dialysis_stege: 0,
241
       dialysis_stege: 0,
243
-      show: false
242
+      show: false,
243
+      disa:true,
244
     }
244
     }
245
   },
245
   },
246
   methods: {
246
   methods: {
247
     fetchSignPatients() {
247
     fetchSignPatients() {
248
       fetchSignPatients(this.queryParams).then(response => {
248
       fetchSignPatients(this.queryParams).then(response => {
249
+        console.log("weishenm")
250
+        console.log(this.queryParams)
249
         this.patients = []
251
         this.patients = []
250
         if (response.data.state === 1) {
252
         if (response.data.state === 1) {
251
           this.patients = response.data.data.patients
253
           this.patients = response.data.data.patients
258
               if (this.schedules[index].type in response.data.data.panel) {
260
               if (this.schedules[index].type in response.data.data.panel) {
259
                 this.schedules[index].arrange = response.data.data.panel[this.schedules[index].type].schedule
261
                 this.schedules[index].arrange = response.data.data.panel[this.schedules[index].type].schedule
260
                 this.schedules[index].sign = response.data.data.panel[this.schedules[index].type].sign
262
                 this.schedules[index].sign = response.data.data.panel[this.schedules[index].type].sign
263
+                console.log("签到统计")
264
+                console.log(response.data.data.panel)
265
+                console.log(this.schedules[index].sign)
261
                 this.schedules[index].before = response.data.data.panel[this.schedules[index].type].before
266
                 this.schedules[index].before = response.data.data.panel[this.schedules[index].type].before
262
                 this.schedules[index].after = response.data.data.panel[this.schedules[index].type].after
267
                 this.schedules[index].after = response.data.data.panel[this.schedules[index].type].after
263
               }
268
               }
342
       this.dialysis_stege = row.dialysis_order.stage
347
       this.dialysis_stege = row.dialysis_order.stage
343
       this.getDialysisInforInfomation(row.id)
348
       this.getDialysisInforInfomation(row.id)
344
       this.getDialysisAfterInfomation(row.id)
349
       this.getDialysisAfterInfomation(row.id)
345
-      //   if (row.signin != null) {
346
-      //        this.weigh_form.dry_weight = '' + row.signin.dry_weight;
347
-      //        this.weigh_form.clothes_weight = '' + row.signin.clothing_weight;
348
-      //         // 透前
349
-      //         this.weigh_form.weigh_before = '' + row.signin.weighing_before;
350
-      //         this.weigh_form.dehydrated_weight = '' + row.signin.target_dewatering;
350
+        if (row.signin != null) {
351
+             this.weigh_form.dry_weight = '' + row.signin.dry_weight;
352
+             this.weigh_form.clothes_weight = '' + row.signin.clothing_weight;
353
+              // 透前
354
+              this.weigh_form.weigh_before = '' + row.signin.weighing_before;
355
+              this.weigh_form.dehydrated_weight = '' + row.signin.target_dewatering;
351
 
356
 
352
-      //         if (this.weigh_form.dry_weight == 0) {
353
-      //             this.weigh_form.dehydrated_percent  = '';
354
-      //         }else {
355
-      //             var dehydrated_percent = ((this.weigh_form.dehydrated_weight/this.weigh_form.dry_weight) * 100).toFixed(2);
356
-      //             if (isNaN(dehydrated_percent)) {
357
-      //                 this.weigh_form.dehydrated_percent  = '';
358
-      //             }else {
359
-      //                 this.weigh_form.dehydrated_percent  = dehydrated_percent + "%";
360
-      //             }
361
-      //         }
357
+              if (this.weigh_form.dry_weight == 0) {
358
+                  this.weigh_form.dehydrated_percent  = '';
359
+              }else {
360
+                  var dehydrated_percent = ((this.weigh_form.dehydrated_weight/this.weigh_form.dry_weight) * 100).toFixed(2);
361
+                  if (isNaN(dehydrated_percent)) {
362
+                      this.weigh_form.dehydrated_percent  = '';
363
+                  }else {
364
+                      this.weigh_form.dehydrated_percent  = dehydrated_percent + "%";
365
+                  }
366
+              }
362
 
367
 
363
-      //         this.weigh_form.weight_before = '' + row.signin.weight_before;
364
-      //         this.weigh_form.temperature_before = '' + row.signin.temperature_before;
365
-      //         this.weigh_form.pulse_rate_before = '' + row.signin.pulse_frequency_before;
366
-      //         this.weigh_form.respiratory_rate_before = '' + row.signin.breathing_rate_before;
367
-      //         this.weigh_form.DBP_before = '' + row.signin.diastolic_blood_pressure_before;
368
-      //         this.weigh_form.SBP_before = '' + row.signin.systolic_blood_pressure_before;
368
+              this.weigh_form.weight_before = '' + row.signin.weight_before;
369
+              this.weigh_form.temperature_before = '' + row.signin.temperature_before;
370
+              this.weigh_form.pulse_rate_before = '' + row.signin.pulse_frequency_before;
371
+              this.weigh_form.respiratory_rate_before = '' + row.signin.breathing_rate_before;
372
+              this.weigh_form.DBP_before = '' + row.signin.diastolic_blood_pressure_before;
373
+              this.weigh_form.SBP_before = '' + row.signin.systolic_blood_pressure_before;
369
 
374
 
370
-      //         this.weigh_form.weigh_after = '' + row.signin.weighing_after;
371
-      //         this.weigh_form.weight_reduce_after = '' + row.signin.weight_loss;
372
-      //         this.weigh_form.weight_after = '' + row.signin.weight_after;
373
-      //         this.weigh_form.temperature_after = '' + row.signin.temperature_after;
374
-      //         this.weigh_form.pulse_rate_after = '' + row.signin.pulse_frequency_after;
375
-      //         this.weigh_form.respiratory_rate_after = '' + row.signin.breathing_rate_after;
376
-      //         this.weigh_form.DBP_after = '' + row.signin.diastolic_blood_pressure_after;
377
-      //         this.weigh_form.SBP_after = '' + row.signin.systolic_blood_pressure_after;
378
-      //         this.weigh_form.id = row.signin.id;
379
-      //   }
375
+              this.weigh_form.weigh_after = '' + row.signin.weighing_after;
376
+              this.weigh_form.weight_reduce_after = '' + row.signin.weight_loss;
377
+              this.weigh_form.weight_after = '' + row.signin.weight_after;
378
+              this.weigh_form.temperature_after = '' + row.signin.temperature_after;
379
+              this.weigh_form.pulse_rate_after = '' + row.signin.pulse_frequency_after;
380
+              this.weigh_form.respiratory_rate_after = '' + row.signin.breathing_rate_after;
381
+              this.weigh_form.DBP_after = '' + row.signin.diastolic_blood_pressure_after;
382
+              this.weigh_form.SBP_after = '' + row.signin.systolic_blood_pressure_after;
383
+              this.weigh_form.id = row.id;
384
+              console.log("好难哦")
385
+              console.log(this.weigh_form.id)
386
+        }
380
     },
387
     },
381
     submitSign() {
388
     submitSign() {
382
       SignWeigh(this.querySignParams, this.weigh_form).then(response => {
389
       SignWeigh(this.querySignParams, this.weigh_form).then(response => {
431
           this.weigh_list.breathing_rate = patientlist.breathing_rate
438
           this.weigh_list.breathing_rate = patientlist.breathing_rate
432
           this.weigh_list.systolic_blood_pressure = patientlist.systolic_blood_pressure
439
           this.weigh_list.systolic_blood_pressure = patientlist.systolic_blood_pressure
433
           this.weigh_list.diastolic_blood_pressure = patientlist.diastolic_blood_pressure
440
           this.weigh_list.diastolic_blood_pressure = patientlist.diastolic_blood_pressure
434
-          console.log('報恩 ')
441
+          console.log('报恩')
435
           console.log(patientlist)
442
           console.log(patientlist)
436
         }
443
         }
437
       })
444
       })
455
     },
462
     },
456
     change() {
463
     change() {
457
       this.show = true
464
       this.show = true
465
+      this.disa = false
458
     },
466
     },
459
     savedata() {
467
     savedata() {
460
       var params = new Object()
468
       var params = new Object()
599
 }
607
 }
600
 
608
 
601
  .patient-app-container {
609
  .patient-app-container {
602
-    margin-left: 10px;
603
-    padding-left: 20px;
604
     margin-bottom: 4px;
610
     margin-bottom: 4px;
605
     height: 36px;
611
     height: 36px;
606
     line-height: 36px;
612
     line-height: 36px;

+ 2 - 2
src/xt_pages/stock/Dialog/goodInfoDailog.vue View File

7
              label-width="116px">
7
              label-width="116px">
8
       <el-row>
8
       <el-row>
9
         <el-col :span="8">
9
         <el-col :span="8">
10
-          <el-form-item label="品类型" prop="good_id">
10
+          <el-form-item label="品类型" prop="good_id">
11
             <el-select v-model="form.good_id" placeholder="请选择" size="small" >
11
             <el-select v-model="form.good_id" placeholder="请选择" size="small" >
12
               <el-option
12
               <el-option
13
                 v-for="item in form.goodType"
13
                 v-for="item in form.goodType"
148
             { required: true, message: '请输入规格名称', trigger: 'blur' }
148
             { required: true, message: '请输入规格名称', trigger: 'blur' }
149
           ],
149
           ],
150
           good_id: [
150
           good_id: [
151
-            { required: true, message: '请选择品类型', trigger: 'change' }
151
+            { required: true, message: '请选择品类型', trigger: 'change' }
152
           ]
152
           ]
153
 
153
 
154
         }
154
         }

+ 1 - 1
src/xt_pages/stock/Dialog/stockInDetailDailog.vue View File

20
           {{}}
20
           {{}}
21
         </template>
21
         </template>
22
       </el-table-column>
22
       </el-table-column>
23
-      <el-table-column label="品批号" align="center" min-width="30">
23
+      <el-table-column label="品批号" align="center" min-width="30">
24
         <template slot-scope="scope">
24
         <template slot-scope="scope">
25
           {{}}
25
           {{}}
26
         </template>
26
         </template>

+ 8 - 8
src/xt_pages/stock/Dialog/stockOutDialog.vue View File

2
   <el-dialog :title="propForm.title" :visible.sync="visibility" :show-close="isClose" :close-on-click-modal="isClose"
2
   <el-dialog :title="propForm.title" :visible.sync="visibility" :show-close="isClose" :close-on-click-modal="isClose"
3
              :close-on-press-escape="isClose" width="622px">
3
              :close-on-press-escape="isClose" width="622px">
4
 
4
 
5
-    <el-form :model="propForm.formValue" class="demo-form-inline" 
5
+    <el-form :model="propForm.formValue" class="demo-form-inline"
6
              :rules="rules" :v-model="propForm.formValue" ref="formValue"
6
              :rules="rules" :v-model="propForm.formValue" ref="formValue"
7
              label-width="90px">
7
              label-width="90px">
8
 
8
 
9
     <el-row>
9
     <el-row>
10
       <el-col :span="12">
10
       <el-col :span="12">
11
-        <el-form-item label="品类型" prop="good_type_id">
11
+        <el-form-item label="品类型" prop="good_type_id">
12
           <el-select v-model="propForm.formValue.good_type_id" placeholder="请选择" @change="goodTypeSelect"
12
           <el-select v-model="propForm.formValue.good_type_id" placeholder="请选择" @change="goodTypeSelect"
13
           >
13
           >
14
             <el-option
14
             <el-option
34
         </el-form-item>
34
         </el-form-item>
35
       </el-col>
35
       </el-col>
36
 
36
 
37
-      
37
+
38
     </el-row>
38
     </el-row>
39
-    
40
-    <el-row>   
39
+
40
+    <el-row>
41
       <el-col :span="12">
41
       <el-col :span="12">
42
         <el-form-item label="库存数量">
42
         <el-form-item label="库存数量">
43
           <el-input type="number" v-model="warehouse_count" :disabled="isDisabled"></el-input>
43
           <el-input type="number" v-model="warehouse_count" :disabled="isDisabled"></el-input>
44
         </el-form-item>
44
         </el-form-item>
45
-      </el-col> 
45
+      </el-col>
46
       <el-col :span="12">
46
       <el-col :span="12">
47
         <el-form-item label="出库数量" prop="count">
47
         <el-form-item label="出库数量" prop="count">
48
           <el-input type="number" v-model="propForm.formValue.count"></el-input>
48
           <el-input type="number" v-model="propForm.formValue.count"></el-input>
57
         </el-form-item>
57
         </el-form-item>
58
       </el-col>
58
       </el-col>
59
     </el-row>
59
     </el-row>
60
-    
60
+
61
     </el-form>
61
     </el-form>
62
 
62
 
63
 
63
 
103
         isShow: true,
103
         isShow: true,
104
         rules: {
104
         rules: {
105
           good_id: [
105
           good_id: [
106
-            {required: true, message: '请选择品类型', trigger: 'change'}
106
+            {required: true, message: '请选择品类型', trigger: 'change'}
107
           ],
107
           ],
108
           good_type_id: [
108
           good_type_id: [
109
             {required: true, message: '请选择规格名称', trigger: 'change'}
109
             {required: true, message: '请选择规格名称', trigger: 'change'}

+ 28 - 5
src/xt_pages/stock/cancelStockOrder.vue View File

12
 
12
 
13
 
13
 
14
       <div class="cell clearfix" >
14
       <div class="cell clearfix" >
15
-        <el-input style="width: 300px;" class="filter-item" placeholder="单据日期/单据编码/制单人/供应商"/>
15
+        <el-input style="width: 300px;" class="filter-item" v-model="searchKey" placeholder="单据编码/制单人/厂商"/>
16
         <el-button class="filter-item" type="primary" icon="el-icon-search" @click="search">搜索</el-button>
16
         <el-button class="filter-item" type="primary" icon="el-icon-search" @click="search">搜索</el-button>
17
       </div>
17
       </div>
18
 
18
 
164
           { path: false, name: '库存管理' },
164
           { path: false, name: '库存管理' },
165
           { path: '/stock/cancel', name: '出库退库单' }
165
           { path: '/stock/cancel', name: '出库退库单' }
166
         ],
166
         ],
167
+        searchKey:'',
167
         type: 1,
168
         type: 1,
168
         page: 1,
169
         page: 1,
169
         limit: 7,
170
         limit: 7,
186
       }
187
       }
187
     },
188
     },
188
     methods: {
189
     methods: {
190
+      search:function(){
191
+        const Params = {
192
+          page: this.page,
193
+          limit: this.limit,
194
+          start_time: this.start_time,
195
+          end_time: this.end_time,
196
+          type: this.type,
197
+          keywords:this.searchKey,
198
+        }
199
+        this.cancelStockDate = []
200
+        getCancelStockList(Params).then(response => {
201
+          if (response.data.state == 0) {
202
+            this.$message.error(response.data.msg)
203
+            return false
204
+          } else {
205
+            this.total = response.data.data.total
206
+            for (let i = 0; i < response.data.data.list.length; i++) {
207
+              this.cancelStockDate.push(response.data.data.list[i])
208
+            }
209
+          }
210
+        })
211
+      },
189
       AddNewOrder: function() {
212
       AddNewOrder: function() {
190
         this.$router.push({ name: 'cancelStockOrderAdd', query: { type: this.type }})
213
         this.$router.push({ name: 'cancelStockOrderAdd', query: { type: this.type }})
191
       },
214
       },
245
         this.multipleSelection = val
268
         this.multipleSelection = val
246
       }, handleSizeChange(val) {
269
       }, handleSizeChange(val) {
247
         this.limit = val
270
         this.limit = val
248
-        this.GetWarehouse()
271
+        this.GetCancelStock()
249
       }, handleCurrentChange(val) {
272
       }, handleCurrentChange(val) {
250
         this.page = val
273
         this.page = val
251
-        this.GetWarehouse()
274
+        this.GetCancelStock()
252
       }, startTimeChange(val) {
275
       }, startTimeChange(val) {
253
-        this.GetWarehouse()
276
+        this.GetCancelStock()
254
       }, endTimeChange(val) {
277
       }, endTimeChange(val) {
255
-        this.GetWarehouse()
278
+        this.GetCancelStock()
256
       }, calculate: function(val) {
279
       }, calculate: function(val) {
257
         return Math.round(parseFloat(val) * 100) / 100
280
         return Math.round(parseFloat(val) * 100) / 100
258
       }, GetConfigInfo: function() {
281
       }, GetConfigInfo: function() {

+ 9 - 4
src/xt_pages/stock/cancelStockOrderAdd.vue View File

61
             <el-table-column min-width="35" align="center">
61
             <el-table-column min-width="35" align="center">
62
 
62
 
63
               <template slot="header" slot-scope="scope">
63
               <template slot="header" slot-scope="scope">
64
-                <span>品类型<span style="color: red">*</span></span>
64
+                <span>品类型<span style="color: red">*</span></span>
65
               </template>
65
               </template>
66
 
66
 
67
               <template slot-scope="scope" >
67
               <template slot-scope="scope" >
69
                 <!--<span @click="showDialog(scope.$index, scope.row)" v-if="scope.row.good_type_id != 0">{{typeName(scope.row.good_type_id)}}</span>-->
69
                 <!--<span @click="showDialog(scope.$index, scope.row)" v-if="scope.row.good_type_id != 0">{{typeName(scope.row.good_type_id)}}</span>-->
70
 
70
 
71
                 <el-form-item  style="padding-top: 15px">
71
                 <el-form-item  style="padding-top: 15px">
72
-                  <el-input placeholder="请输入品类型"  v-model="scope.row.good_type_id" :value="typeName(scope.row.good_type_id)" @focus="showDialog(scope.$index, scope.row)" ></el-input>
72
+                  <el-input placeholder="请输入品类型"  v-model="scope.row.good_type_id" :value="typeName(scope.row.good_type_id)" @focus="showDialog(scope.$index, scope.row)" ></el-input>
73
                 </el-form-item>
73
                 </el-form-item>
74
 
74
 
75
               </template>
75
               </template>
268
         tempObj['return_count'] = ''
268
         tempObj['return_count'] = ''
269
         this.recordInfo.recordData.push(tempObj)
269
         this.recordInfo.recordData.push(tempObj)
270
       }, handleDelete: function(index, row) {
270
       }, handleDelete: function(index, row) {
271
-        this.recordInfo.recordData.splice(index, 1)
271
+        if( this.recordInfo.recordData.length <= 1){
272
+          this.$message.error('只有一条记录的时候无法删除')
273
+          return
274
+        }else{
275
+          this.recordInfo.recordData.splice(index, 1)
276
+        }
272
       }, calculate: function(val) {
277
       }, calculate: function(val) {
273
         if (val == 0) {
278
         if (val == 0) {
274
           return ''
279
           return ''
313
             let total = 0
318
             let total = 0
314
             for (let i = 0; i < array.length; i++) {
319
             for (let i = 0; i < array.length; i++) {
315
               if (array[i].good_type_id == 0) {
320
               if (array[i].good_type_id == 0) {
316
-                this.$message.error('品类型不能为空')
321
+                this.$message.error('品类型不能为空')
317
                 return
322
                 return
318
               }
323
               }
319
               if (array[i].good_id == 0) {
324
               if (array[i].good_id == 0) {

+ 2 - 2
src/xt_pages/stock/cancelStockOrderDetail.vue View File

31
       >
31
       >
32
         <el-table-column min-width="35" align="center">
32
         <el-table-column min-width="35" align="center">
33
           <template slot="header" slot-scope="scope">
33
           <template slot="header" slot-scope="scope">
34
-            <span>品类型</span>
34
+            <span>品类型</span>
35
           </template>
35
           </template>
36
 
36
 
37
           <template slot-scope="scope">
37
           <template slot-scope="scope">
49
 
49
 
50
         <el-table-column min-width="23" align="center">
50
         <el-table-column min-width="23" align="center">
51
           <template slot="header" slot-scope="scope">
51
           <template slot="header" slot-scope="scope">
52
-            <span>退数量</span>
52
+            <span>退数量</span>
53
           </template>
53
           </template>
54
           <template slot-scope="scope">
54
           <template slot-scope="scope">
55
             <span>{{scope.row.count}}</span>
55
             <span>{{scope.row.count}}</span>

+ 18 - 5
src/xt_pages/stock/cancelStockOrderEdit.vue View File

30
           <el-table-column min-width="35" align="center">
30
           <el-table-column min-width="35" align="center">
31
 
31
 
32
             <template slot="header" slot-scope="scope">
32
             <template slot="header" slot-scope="scope">
33
-              <span>品类型<span style="color: red">*</span></span>
33
+              <span>品类型<span style="color: red">*</span></span>
34
             </template>
34
             </template>
35
 
35
 
36
             <template slot-scope="scope">
36
             <template slot-scope="scope">
37
               <el-form-item style="padding-top: 15px">
37
               <el-form-item style="padding-top: 15px">
38
-                <el-input placeholder="请输入品类型" v-model="scope.row.good_type_id"
38
+                <el-input placeholder="请输入品类型" v-model="scope.row.good_type_id"
39
                           :value="typeName(scope.row.good_type_id)"
39
                           :value="typeName(scope.row.good_type_id)"
40
                           @focus="showDialog(scope.$index, scope.row)"></el-input>
40
                           @focus="showDialog(scope.$index, scope.row)"></el-input>
41
               </el-form-item>
41
               </el-form-item>
59
 
59
 
60
           <el-table-column min-width="23" align="center">
60
           <el-table-column min-width="23" align="center">
61
             <template slot="header" slot-scope="scope">
61
             <template slot="header" slot-scope="scope">
62
-              <span>退数量<span style="color: red">*</span></span>
62
+              <span>退数量<span style="color: red">*</span></span>
63
             </template>
63
             </template>
64
             <template slot-scope="scope">
64
             <template slot-scope="scope">
65
               <el-form-item :prop="'recordData.' + scope.$index + '.count'" :rules='tableRules.count'
65
               <el-form-item :prop="'recordData.' + scope.$index + '.count'" :rules='tableRules.count'
242
           const params = {
242
           const params = {
243
             id: row.id
243
             id: row.id
244
           }
244
           }
245
-          this.$confirm('确认删除该退库物品信息记录?', '删除退库物品信息记录', {
245
+          this.$confirm('确认删除该退库商品信息记录?', '删除退库商品信息记录', {
246
             confirmButtonText: '确定',
246
             confirmButtonText: '确定',
247
             cancelButtonText: '取消',
247
             cancelButtonText: '取消',
248
             type: 'warning'
248
             type: 'warning'
293
             const array = this.recordInfo.recordData
293
             const array = this.recordInfo.recordData
294
             for (let i = 0; i < array.length; i++) {
294
             for (let i = 0; i < array.length; i++) {
295
               if (array[i].good_type_id == 0) {
295
               if (array[i].good_type_id == 0) {
296
-                this.$message.error('品类型不能为空')
296
+                this.$message.error('品类型不能为空')
297
                 return
297
                 return
298
               }
298
               }
299
               if (array[i].good_id == 0) {
299
               if (array[i].good_id == 0) {
341
             this.form.manufacturer = this.cancelStock.manufacturer
341
             this.form.manufacturer = this.cancelStock.manufacturer
342
             this.form.dealer = this.cancelStock.dealer
342
             this.form.dealer = this.cancelStock.dealer
343
           }
343
           }
344
+          if( this.recordInfo.recordData.length == 0){
345
+            const tempObj = {}
346
+            tempObj['id'] = 0
347
+            tempObj['good_type_id'] = 0
348
+            tempObj['good_id'] = 0
349
+            tempObj['count'] = ''
350
+            this.recordInfo.recordData.push(tempObj)
351
+
352
+
353
+
354
+          }
355
+
356
+
344
         })
357
         })
345
       }
358
       }
346
     },
359
     },

+ 2 - 2
src/xt_pages/stock/config/dealer.vue View File

12
       <el-col>
12
       <el-col>
13
         <!--<el-button type="primary" style="float:right;"  @click="showDialog">新增经销商</el-button>-->
13
         <!--<el-button type="primary" style="float:right;"  @click="showDialog">新增经销商</el-button>-->
14
 
14
 
15
-        <div>经销商
15
+        <div>
16
           <el-button size="small" icon="el-icon-circle-plus-outline" style="float: right;margin-bottom: 15px" type="primary" @click="showDialog">新增</el-button>
16
           <el-button size="small" icon="el-icon-circle-plus-outline" style="float: right;margin-bottom: 15px" type="primary" @click="showDialog">新增</el-button>
17
         </div>
17
         </div>
18
 
18
 
71
                   @click="handleDelete(scope.$index, scope.row)">
71
                   @click="handleDelete(scope.$index, scope.row)">
72
                 </el-button>
72
                 </el-button>
73
               </el-tooltip>
73
               </el-tooltip>
74
-              
74
+
75
               <!--<el-button-->
75
               <!--<el-button-->
76
                 <!--size="mini"-->
76
                 <!--size="mini"-->
77
                 <!--type="primary"-->
77
                 <!--type="primary"-->

+ 8 - 8
src/xt_pages/stock/config/goodInfo.vue View File

13
       <el-col>
13
       <el-col>
14
 
14
 
15
 
15
 
16
-        <div>物品信息
16
+        <div>
17
           <el-button size="small" icon="el-icon-circle-plus-outline" style="float: right;margin-bottom: 15px" type="primary" @click="showInfoDialog">新增</el-button>
17
           <el-button size="small" icon="el-icon-circle-plus-outline" style="float: right;margin-bottom: 15px" type="primary" @click="showInfoDialog">新增</el-button>
18
         </div>
18
         </div>
19
 
19
 
20
         <el-table :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)'}" :data="goodInfo.goodInfoData" :class="signAndWeighBoxPatients" style="width: 100%" border
20
         <el-table :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)'}" :data="goodInfo.goodInfoData" :class="signAndWeighBoxPatients" style="width: 100%" border
21
                   v-loading="goodInfo.loading"
21
                   v-loading="goodInfo.loading"
22
         >
22
         >
23
-          <el-table-column label="品编码" min-width="30" align="center">
23
+          <el-table-column label="品编码" min-width="30" align="center">
24
             <template slot-scope="scope">
24
             <template slot-scope="scope">
25
               {{scope.row.good_code}}
25
               {{scope.row.good_code}}
26
             </template>
26
             </template>
63
                   @click="handleGoodInfoEdit(scope.$index, scope.row)">
63
                   @click="handleGoodInfoEdit(scope.$index, scope.row)">
64
                 </el-button>
64
                 </el-button>
65
               </el-tooltip>
65
               </el-tooltip>
66
-              <el-tooltip class="item" effect="dark" content="删除" placement="top">              
66
+              <el-tooltip class="item" effect="dark" content="删除" placement="top">
67
                 <el-button
67
                 <el-button
68
                   size="small"
68
                   size="small"
69
                   type="danger"
69
                   type="danger"
71
                   @click="handleGoodInfoDelete(scope.$index, scope.row)">
71
                   @click="handleGoodInfoDelete(scope.$index, scope.row)">
72
                 </el-button>
72
                 </el-button>
73
               </el-tooltip>
73
               </el-tooltip>
74
-              
74
+
75
               <!--<el-button-->
75
               <!--<el-button-->
76
                 <!--size="mini"-->
76
                 <!--size="mini"-->
77
                 <!--type="primary"-->
77
                 <!--type="primary"-->
138
           editGoodId: '',
138
           editGoodId: '',
139
           editGoodIndex: '',
139
           editGoodIndex: '',
140
           goodInfoDialog: {
140
           goodInfoDialog: {
141
-            goodInfoTitle: '新增品信息',
141
+            goodInfoTitle: '新增品信息',
142
             isCreated: 1, //1.创建 2.编辑 3.查看详情
142
             isCreated: 1, //1.创建 2.编辑 3.查看详情
143
             formValue: {
143
             formValue: {
144
               good_id: '',
144
               good_id: '',
227
       },
227
       },
228
       handleGoodInfoDelete: function (index, row) {
228
       handleGoodInfoDelete: function (index, row) {
229
 
229
 
230
-        this.$confirm('确认删除这条物品信息?', '删除物品信息', {
230
+        this.$confirm('确认删除这条商品信息?', '删除商品信息', {
231
           confirmButtonText: '确定',
231
           confirmButtonText: '确定',
232
           cancelButtonText: '取消',
232
           cancelButtonText: '取消',
233
           type: 'warning'
233
           type: 'warning'
244
               this.goodInfo.goodInfoData.splice(index, 1);
244
               this.goodInfo.goodInfoData.splice(index, 1);
245
               this.$notify({
245
               this.$notify({
246
                 title: "成功",
246
                 title: "成功",
247
-                message: "品信息已经删除",
247
+                message: "品信息已经删除",
248
                 type: "success",
248
                 type: "success",
249
                 duration: 2000
249
                 duration: 2000
250
               });
250
               });
389
               this.goodInfo.goodInfoDialog.formValue.goodType.push(response.data.data.goodType[i])
389
               this.goodInfo.goodInfoDialog.formValue.goodType.push(response.data.data.goodType[i])
390
             }
390
             }
391
             if (this.goodInfo.goodInfoDialog.formValue.goodType.length <= 0) {
391
             if (this.goodInfo.goodInfoDialog.formValue.goodType.length <= 0) {
392
-              this.$message.error("请先新增品类型");
392
+              this.$message.error("请先新增品类型");
393
               return
393
               return
394
             } else {
394
             } else {
395
               this.goodInfo.goodInfoDialog.isVisibility = true
395
               this.goodInfo.goodInfoDialog.isVisibility = true

+ 5 - 5
src/xt_pages/stock/config/goodType.vue View File

10
     <el-row :gutter="15">
10
     <el-row :gutter="15">
11
       <el-col>
11
       <el-col>
12
 
12
 
13
-        <div>物品类型
13
+        <div>
14
           <el-button size="small" icon="el-icon-circle-plus-outline" style="float: right;margin-bottom: 15px" type="primary" @click="showDialog">新增</el-button>
14
           <el-button size="small" icon="el-icon-circle-plus-outline" style="float: right;margin-bottom: 15px" type="primary" @click="showDialog">新增</el-button>
15
         </div>
15
         </div>
16
 
16
 
182
           editInfoIndex: '',
182
           editInfoIndex: '',
183
           tableCurrentIndex: -1,
183
           tableCurrentIndex: -1,
184
           goodTypeDialog: {
184
           goodTypeDialog: {
185
-            goodTypeTitle: '新增品类型',
185
+            goodTypeTitle: '新增品类型',
186
             isCreated: 1, //1.创建 2.编辑 3.查看详情
186
             isCreated: 1, //1.创建 2.编辑 3.查看详情
187
             formValue: {
187
             formValue: {
188
               type_name: '',
188
               type_name: '',
217
       },
217
       },
218
       handleDelete: function (index, row) {
218
       handleDelete: function (index, row) {
219
 
219
 
220
-        this.$confirm('确认删除这条物品类型?', '删除物品类型', {
220
+        this.$confirm('确认删除这条商品类型?', '删除商品类型', {
221
           confirmButtonText: '确定',
221
           confirmButtonText: '确定',
222
           cancelButtonText: '取消',
222
           cancelButtonText: '取消',
223
           type: 'warning'
223
           type: 'warning'
235
               this.goodType.tableCurrentIndex = -1
235
               this.goodType.tableCurrentIndex = -1
236
               this.$notify({
236
               this.$notify({
237
                 title: "成功",
237
                 title: "成功",
238
-                message: "品类型已经删除",
238
+                message: "品类型已经删除",
239
                 type: "success",
239
                 type: "success",
240
                 duration: 2000
240
                 duration: 2000
241
               });
241
               });
355
 
355
 
356
 
356
 
357
         if (this.goodType.tableCurrentIndex == -1) {
357
         if (this.goodType.tableCurrentIndex == -1) {
358
-          this.$message.error("请先选择品类型");
358
+          this.$message.error("请先选择品类型");
359
           return
359
           return
360
         } else {
360
         } else {
361
           this.getAllGoodType()
361
           this.getAllGoodType()

+ 2 - 2
src/xt_pages/stock/config/manufacturer.vue View File

11
     <el-row>
11
     <el-row>
12
       <el-col>
12
       <el-col>
13
 
13
 
14
-        <div>厂家
14
+        <div>
15
           <el-button size="small" icon="el-icon-circle-plus-outline" style="float: right;margin-bottom: 15px" type="primary" @click="showDialog">新增</el-button>
15
           <el-button size="small" icon="el-icon-circle-plus-outline" style="float: right;margin-bottom: 15px" type="primary" @click="showDialog">新增</el-button>
16
         </div>
16
         </div>
17
 
17
 
59
                   @click="handleEdit(scope.$index, scope.row)">
59
                   @click="handleEdit(scope.$index, scope.row)">
60
                 </el-button>
60
                 </el-button>
61
               </el-tooltip>
61
               </el-tooltip>
62
-              <el-tooltip class="item" effect="dark" content="删除" placement="top">              
62
+              <el-tooltip class="item" effect="dark" content="删除" placement="top">
63
                 <el-button
63
                 <el-button
64
                   size="small"
64
                   size="small"
65
                   type="danger"
65
                   type="danger"

+ 453 - 0
src/xt_pages/stock/detail/cancelStockDetail.vue View File

1
+<template>
2
+  <div class="main-contain">
3
+    <div class="app-container">
4
+      <div class="cell clearfix" >
5
+        <el-input style="width: 300px;" class="filter-item" v-model="searchKey" placeholder="单据编码/制单人/商品类型"/>
6
+        <el-button class="filter-item" type="primary" icon="el-icon-search" @click="search">搜索</el-button>
7
+      </div>
8
+
9
+      <div class="cell clearfix">
10
+        <label class="title"><span class="name">日期查询</span> : </label>
11
+        <el-date-picker v-model="start_time" prefix-icon="el-icon-date" :editable="false" style="width: 196px;"
12
+                        type="date" placeholder="选择日期时间" align="right" format="yyyy-MM-dd"
13
+                        value-format="yyyy-MM-dd" @change="startTimeChange"></el-date-picker>
14
+        <span class="">-</span>
15
+        <el-date-picker v-model="end_time" prefix-icon="el-icon-date" :editable="false" style="width: 196px;"
16
+                        type="date" placeholder="选择日期时间" align="right" format="yyyy-MM-dd"
17
+                        value-format="yyyy-MM-dd" @change="endTimeChange"></el-date-picker>
18
+      </div>
19
+
20
+
21
+      <div class="cell clearfix">
22
+        <label class="title"><span class="name">单据类型</span> : </label>
23
+        <el-select v-model="order_type" clearable placeholder="单据类型" @change="changeType">
24
+          <el-option
25
+            v-for="item in orderTypeArr"
26
+            :key="item.value"
27
+            :label="item.label"
28
+            :value="item.value">
29
+          </el-option>
30
+        </el-select>
31
+      </div>
32
+
33
+      <div class="cell clearfix">
34
+        <label class="title"><span class="name">其它</span> : </label>
35
+        <el-select v-model="manufacturer_id" clearable placeholder="厂商" @change="changeManufacturer">
36
+          <el-option
37
+            v-for="item in manufacturer"
38
+            :key="item.id"
39
+            :label="item.manufacturer_name"
40
+            :value="item.id">
41
+          </el-option>
42
+        </el-select>
43
+      </div>
44
+
45
+      <el-row :gutter="12" style="margin-top: 10px">
46
+        <el-table
47
+          :data="cancelStockDate"
48
+          :class="signAndWeighBoxPatients"
49
+          border
50
+          highlight-current-row
51
+          ref="multipleTable"
52
+          @selection-change="select"
53
+          :header-cell-style="{ backgroundColor: 'rgb(245, 247, 250)'}"
54
+        >
55
+
56
+          <el-table-column label="单据编号" align="center">
57
+            <template slot-scope="scope">
58
+              {{scope.row.order_number}}
59
+            </template>
60
+          </el-table-column>
61
+
62
+          <el-table-column label="商品类型" align="center">
63
+            <template slot-scope="scope">
64
+              {{specificationName(scope.row.good_id)}}
65
+            </template>
66
+          </el-table-column>
67
+
68
+
69
+          <el-table-column label="单据类型" align="center">
70
+            <template slot-scope="scope">
71
+              {{getTypeName(scope.row)}}
72
+            </template>
73
+          </el-table-column>
74
+
75
+          <el-table-column label="操作时间" align="center">
76
+            <template slot-scope="scope">
77
+              {{ scope.row.CancelStock.return_time | parseTime('{y}-{m}-{d}')}}
78
+            </template>
79
+          </el-table-column>
80
+          <el-table-column label="制单人" align="center">
81
+            <template slot-scope="scope">
82
+              {{getXuserName(scope.row.CancelStock.creater)}}
83
+
84
+            </template>
85
+          </el-table-column>
86
+
87
+          <el-table-column label="数量" align="center">
88
+            <template slot-scope="scope">
89
+              {{scope.row.count}}
90
+            </template>
91
+          </el-table-column>
92
+
93
+        </el-table>
94
+
95
+        <el-pagination
96
+          @size-change="handleSizeChange"
97
+          @current-change="handleCurrentChange"
98
+          :page-sizes="[7]"
99
+          :page-size="7"
100
+          background
101
+          style="margin-top:20px;float: right"
102
+          layout="total, sizes, prev, pager, next, jumper"
103
+          :total="total">
104
+        </el-pagination>
105
+
106
+      </el-row>
107
+    </div>
108
+  </div>
109
+</template>
110
+
111
+<script>
112
+  import { uParseTime } from '@/utils/tools'
113
+  import { fetchAllAdminUsers, fetchAllDoctorAndNurse } from '@/api/doctor'
114
+  import { deleteCancelStock, GetAllConfig, getStockDetail } from '@/api/stock'
115
+
116
+
117
+  export default {
118
+    name: 'cancelStockDetail',
119
+
120
+    created() {
121
+      var year = new Date().getFullYear()
122
+      var month = new Date().getMonth() + 1
123
+      var day = new Date().getDate()
124
+      if (parseInt(month) < 10) {
125
+        month = '0' + month
126
+      }
127
+      if (parseInt(day) < 10) {
128
+        day = '0' + day
129
+      }
130
+      const endTime = year + '-' + month + '-' + day
131
+      this.end_time = endTime
132
+
133
+      var year = new Date().getFullYear()
134
+      var month = new Date().getMonth()
135
+      var day = new Date().getDate()
136
+      if (parseInt(month) < 10) {
137
+        month = '0' + month
138
+      }
139
+      if (parseInt(day) < 10) {
140
+        day = '0' + day
141
+      }
142
+      const startTime = year + '-' + month + '-' + day
143
+      this.start_time = startTime
144
+      this.GetCancelStock()
145
+      this.GetConfigInfo()
146
+      this.fetchAllAdminUsers()
147
+    },
148
+    data() {
149
+      return {
150
+        orderTypeArr: [
151
+          { value: 1, label: '耗材入库单' },
152
+          { value: 2, label: '其他入库单' }
153
+        ],
154
+        manufacturer_id: '',
155
+        dealer_id: '',
156
+        order_type: '',
157
+        searchKey:'',
158
+        type: 4,
159
+        page: 1,
160
+        limit: 7,
161
+        checked: false,
162
+        total: 0,
163
+        pageTotal: 0,
164
+        pageSelect: 0,
165
+        adminUserOptions: [],
166
+        multipleSelection: [],
167
+        signAndWeighBoxPatients: 'sign-and-weigh-box-patients',
168
+        start_time: '',
169
+        cancelStockDate: [],
170
+        end_time: '',
171
+        goodType: [],
172
+        goodInfo: [],
173
+        manufacturer: [],
174
+        selectedTableData: [],
175
+        dealer: []
176
+
177
+      }
178
+    },
179
+    methods: {
180
+      changeType: function(val) {
181
+        this.order_type  = val
182
+        this.GetCancelStock()
183
+      }, changeManufacturer: function(val) {
184
+        this.manufacturer_id  = val
185
+        this.GetCancelStock()
186
+      },
187
+      getTypeName:function(row){
188
+        let name = ""
189
+        let name2 = ""
190
+        if (row.type == 1){
191
+          name = "耗材退库单"
192
+
193
+        }else if(row.type == 2){
194
+          name = "其他退库单"
195
+        }
196
+
197
+        return name
198
+      },
199
+      specificationName: function(good_info_id) {
200
+        let name = ''
201
+        for (let i = 0; i < this.goodInfo.length; i++) {
202
+          if (this.goodInfo[i].id == good_info_id) {
203
+            name = this.goodInfo[i].specification_name
204
+          }
205
+        }
206
+        return name
207
+      },
208
+      search:function(){
209
+        const Params = {
210
+          page: this.page,
211
+          limit: this.limit,
212
+          start_time: this.start_time,
213
+          end_time: this.end_time,
214
+          type: this.type,
215
+          keywords:this.searchKey,
216
+        }
217
+        this.cancelStockDate = []
218
+        getStockDetail(Params).then(response => {
219
+          if (response.data.state == 0) {
220
+            this.$message.error(response.data.msg)
221
+            return false
222
+          } else {
223
+            this.total = response.data.data.total
224
+            for (let i = 0; i < response.data.data.list.length; i++) {
225
+              this.cancelStockDate.push(response.data.data.list[i])
226
+            }
227
+          }
228
+        })
229
+      },
230
+      AddNewOrder: function() {
231
+        this.$router.push({ name: 'cancelStockOrderAdd', query: { type: this.type }})
232
+      },
233
+      GetCancelStock: function() {
234
+        const Params = {
235
+          page: this.page,
236
+          limit: this.limit,
237
+          start_time: this.start_time,
238
+          end_time: this.end_time,
239
+          type: this.type,
240
+          manufacturer: this.manufacturer_id,
241
+          order_type: this.order_type,
242
+          dealer: this.dealer_id
243
+        }
244
+        this.cancelStockDate = []
245
+        getStockDetail(Params).then(response => {
246
+          if (response.data.state == 0) {
247
+            this.$message.error(response.data.msg)
248
+            return false
249
+          } else {
250
+            this.total = response.data.data.total
251
+            for (let i = 0; i < response.data.data.list.length; i++) {
252
+              this.cancelStockDate.push(response.data.data.list[i])
253
+            }
254
+          }
255
+        })
256
+      }, getXuserName(id) {
257
+        if (id <= 0) {
258
+          return ''
259
+        }
260
+        var name = ''
261
+        if (this.adminUserOptions == null || typeof (this.adminUserOptions.length) === 'undefined') {
262
+          return name
263
+        }
264
+        var leng = this.adminUserOptions.length
265
+        if (leng == 0) {
266
+          return name
267
+        }
268
+        for (let index = 0; index < leng; index++) {
269
+          if (this.adminUserOptions[index].id == id) {
270
+            name = this.adminUserOptions[index].name
271
+            break
272
+          }
273
+        }
274
+        return name
275
+      }, fetchAllAdminUsers() {
276
+        fetchAllAdminUsers().then(response => {
277
+          console.log(response)
278
+          if (response.data.state == 1) {
279
+            this.adminUserOptions = response.data.data.users
280
+            var alen = this.adminUserOptions.length
281
+            for (let index = 0; index < alen; index++) {
282
+              if (this.adminUserOptions[index].user_type == 2) {
283
+                // this.doctorOptions.push(this.adminUserOptions[index]);
284
+              }
285
+            }
286
+          }
287
+        })
288
+      }, handleSelectionChange: function(val) {
289
+        this.multipleSelection = val
290
+      }, handleSizeChange(val) {
291
+        this.limit = val
292
+        this.GetCancelStock()
293
+      }, handleCurrentChange(val) {
294
+        this.page = val
295
+        this.GetCancelStock()
296
+      }, startTimeChange(val) {
297
+        this.GetCancelStock()
298
+      }, endTimeChange(val) {
299
+        this.GetCancelStock()
300
+      }, calculate: function(val) {
301
+        return Math.round(parseFloat(val) * 100) / 100
302
+      }, GetConfigInfo: function() {
303
+        GetAllConfig().then(response => {
304
+          if (response.data.state == 0) {
305
+            this.$message.error(response.data.msg)
306
+            return false
307
+          } else {
308
+            this.manufacturer = response.data.data.manufacturer
309
+            this.dealer = response.data.data.dealer
310
+            this.goodInfo = response.data.data.goodInfo
311
+
312
+          }
313
+        })
314
+      }, getManufactuerName: function(manufacturer_id) {
315
+        for (let i = 0; i < this.manufacturer.length; i++) {
316
+          if (this.manufacturer[i].id == manufacturer_id) {
317
+            return this.manufacturer[i].manufacturer_name
318
+          }
319
+        }
320
+      }, getDealerName: function(dealer_id) {
321
+        for (let i = 0; i < this.dealer.length; i++) {
322
+          if (this.dealer[i].id == dealer_id) {
323
+            return this.dealer[i].dealer_name
324
+          }
325
+        }
326
+      }, handleEdit: function(index, row) {
327
+        this.$router.push({ name: 'cancelStockDetail', query: { id: row.id,type: this.type }})
328
+      }, handleDelete: function(index, row) {
329
+        const ids = []
330
+        ids.push(row.id)
331
+        const idStr = ids.join(',')
332
+
333
+        const params = {
334
+          ids: idStr
335
+        }
336
+
337
+        this.$confirm('确认删除出库退库单记录?', '删除出库退库单记录', {
338
+          confirmButtonText: '确定',
339
+          cancelButtonText: '取消',
340
+          type: 'warning'
341
+        }).then(() => {
342
+          deleteCancelStock(params).then(response => {
343
+            if (response.data.state == 0) {
344
+              this.$message.error(response.data.msg)
345
+              return false
346
+            } else {
347
+              this.$notify({
348
+                title: '成功',
349
+                message: '删除成功',
350
+                type: 'success',
351
+                duration: 2000
352
+              })
353
+              for (let i = 0; i < ids.length; i++) {
354
+                for (let y = 0; y < this.cancelStockDate.length; y++) {
355
+                  if (ids[i] == this.cancelStockDate[y].id) {
356
+                    this.cancelStockDate.splice(y, 1)
357
+                  }
358
+                }
359
+              }
360
+            }
361
+          })
362
+        }).catch(() => {
363
+        })
364
+      }, changeAllSelected: function(val) {
365
+        if (val) {
366
+          this.$refs.multipleTable.toggleAllSelection()
367
+        } else {
368
+          this.$refs.multipleTable.clearSelection()
369
+        }
370
+      }, select(selection) {
371
+        this.selectedTableData = selection
372
+      }, batchDelete() {
373
+        if (this.selectedTableData.length <= 0) {
374
+          this.$message.error('请选择要删除的记录')
375
+          return
376
+        }
377
+        const ids = []
378
+        for (let i = 0; i < this.selectedTableData.length; i++) {
379
+          ids.push(this.selectedTableData[i].id)
380
+        }
381
+        const idStr = ids.join(',')
382
+        const params = {
383
+          ids: idStr
384
+        }
385
+        this.$confirm('确认删除出库退库单记录?', '删除出库退库单记录', {
386
+          confirmButtonText: '确定',
387
+          cancelButtonText: '取消',
388
+          type: 'warning'
389
+        }).then(() => {
390
+          deleteCancelStock(params).then(response => {
391
+            if (response.data.state == 0) {
392
+              this.$message.error(response.data.msg)
393
+              return false
394
+            } else {
395
+              this.$notify({
396
+                title: '成功',
397
+                message: '删除成功',
398
+                type: 'success',
399
+                duration: 2000
400
+              })
401
+
402
+              for (let i = 0; i < ids.length; i++) {
403
+                for (let y = 0; y < this.cancelStockDate.length; y++) {
404
+                  if (ids[i] == this.cancelStockDate[y].id) {
405
+                    this.cancelStockDate.splice(y, 1)
406
+                  }
407
+                }
408
+              }
409
+            }
410
+          })
411
+        }).catch(() => {
412
+        })
413
+      }
414
+    }
415
+  }
416
+</script>
417
+
418
+<style rel="stylesheet/css" lang="scss" scoped>
419
+  .information {
420
+    border: 1px #dcdfe6 solid;
421
+    padding: 30px 20px 30px 20px;
422
+
423
+  .border {
424
+    border-bottom: 1px #dcdfe6 solid;
425
+    margin: 0px 0 20px 0;
426
+  }
427
+
428
+  }
429
+
430
+
431
+  .edit_separater {
432
+    border-top: 1px solid rgb(233, 233, 233);
433
+    margin-top: 15px;
434
+    margin-bottom: 15px;
435
+  }
436
+
437
+</style>
438
+
439
+<style>
440
+  .sign-and-weigh-box .sign-and-weigh-box-patients .cell {
441
+    font-size: 12px;
442
+  }
443
+
444
+  .sign-and-weigh-box .sign-and-weigh-box-patients .current-row > td {
445
+    background: #6fb5fa;
446
+  }
447
+
448
+  .count {
449
+    color: #bd2c00;
450
+
451
+  }
452
+
453
+</style>

+ 456 - 0
src/xt_pages/stock/detail/salesReturnDetail.vue View File

1
+<template>
2
+  <div class="main-contain">
3
+    <div class="app-container">
4
+      <div class="cell clearfix" >
5
+        <el-input style="width: 300px;" class="filter-item" v-model="searchKey" placeholder="单据编码/制单人/商品类型"/>
6
+        <el-button class="filter-item" type="primary" icon="el-icon-search" @click="search">搜索</el-button>
7
+      </div>
8
+
9
+      <div class="cell clearfix">
10
+        <label class="title"><span class="name">日期查询</span> : </label>
11
+        <el-date-picker v-model="start_time" prefix-icon="el-icon-date" :editable="false" style="width: 196px;"
12
+                        type="date" placeholder="选择日期时间" align="right" format="yyyy-MM-dd"
13
+                        value-format="yyyy-MM-dd" @change="startTimeChange"></el-date-picker>
14
+        <span class="">-</span>
15
+        <el-date-picker v-model="end_time" prefix-icon="el-icon-date" :editable="false" style="width: 196px;"
16
+                        type="date" placeholder="选择日期时间" align="right" format="yyyy-MM-dd"
17
+                        value-format="yyyy-MM-dd" @change="endTimeChange"></el-date-picker>
18
+      </div>
19
+
20
+
21
+      <div class="cell clearfix">
22
+        <label class="title"><span class="name">单据类型</span> : </label>
23
+        <el-select v-model="order_type" clearable placeholder="单据类型" @change="changeType">
24
+          <el-option
25
+            v-for="item in orderTypeArr"
26
+            :key="item.value"
27
+            :label="item.label"
28
+            :value="item.value">
29
+          </el-option>
30
+        </el-select>
31
+      </div>
32
+
33
+      <div class="cell clearfix">
34
+        <label class="title"><span class="name">其它</span> : </label>
35
+        <el-select v-model="manufacturer_id" clearable placeholder="厂商" @change="changeManufacturer">
36
+          <el-option
37
+            v-for="item in manufacturer"
38
+            :key="item.id"
39
+            :label="item.manufacturer_name"
40
+            :value="item.id">
41
+          </el-option>
42
+        </el-select>
43
+      </div>
44
+
45
+      <el-row :gutter="12" style="margin-top: 10px">
46
+        <el-table
47
+          :data="cancelStockDate"
48
+          :class="signAndWeighBoxPatients"
49
+          border
50
+          highlight-current-row
51
+          ref="multipleTable"
52
+          @selection-change="select"
53
+          :header-cell-style="{ backgroundColor: 'rgb(245, 247, 250)'}"
54
+
55
+        >
56
+
57
+
58
+
59
+          <el-table-column label="单据编号" align="center">
60
+            <template slot-scope="scope">
61
+              {{scope.row.order_number}}
62
+            </template>
63
+          </el-table-column>
64
+
65
+          <el-table-column label="商品类型" align="center">
66
+            <template slot-scope="scope">
67
+              {{specificationName(scope.row.good_id)}}
68
+            </template>
69
+          </el-table-column>
70
+
71
+
72
+          <el-table-column label="单据类型" align="center">
73
+            <template slot-scope="scope">
74
+              {{getTypeName(scope.row)}}
75
+            </template>
76
+          </el-table-column>
77
+
78
+          <el-table-column label="操作时间" align="center">
79
+            <template slot-scope="scope">
80
+              {{ scope.row.SalesReturn.return_time | parseTime('{y}-{m}-{d}')}}
81
+            </template>
82
+          </el-table-column>
83
+          <el-table-column label="制单人" align="center">
84
+            <template slot-scope="scope">
85
+              {{getXuserName(scope.row.SalesReturn.creater)}}
86
+
87
+            </template>
88
+          </el-table-column>
89
+
90
+          <el-table-column label="数量" align="center">
91
+            <template slot-scope="scope">
92
+              {{scope.row.count}}
93
+            </template>
94
+          </el-table-column>
95
+
96
+        </el-table>
97
+
98
+        <el-pagination
99
+          @size-change="handleSizeChange"
100
+          @current-change="handleCurrentChange"
101
+          :page-sizes="[7]"
102
+          :page-size="7"
103
+          background
104
+          style="margin-top:20px;float: right"
105
+          layout="total, sizes, prev, pager, next, jumper"
106
+          :total="total">
107
+        </el-pagination>
108
+
109
+      </el-row>
110
+    </div>
111
+  </div>
112
+</template>
113
+
114
+<script>
115
+  import { uParseTime } from '@/utils/tools'
116
+  import { fetchAllAdminUsers, fetchAllDoctorAndNurse } from '@/api/doctor'
117
+  import { deleteCancelStock, GetAllConfig, getStockDetail } from '@/api/stock'
118
+
119
+
120
+  export default {
121
+    name: 'salesReturnDetail',
122
+
123
+    created() {
124
+      var year = new Date().getFullYear()
125
+      var month = new Date().getMonth() + 1
126
+      var day = new Date().getDate()
127
+      if (parseInt(month) < 10) {
128
+        month = '0' + month
129
+      }
130
+      if (parseInt(day) < 10) {
131
+        day = '0' + day
132
+      }
133
+      const endTime = year + '-' + month + '-' + day
134
+      this.end_time = endTime
135
+
136
+      var year = new Date().getFullYear()
137
+      var month = new Date().getMonth()
138
+      var day = new Date().getDate()
139
+      if (parseInt(month) < 10) {
140
+        month = '0' + month
141
+      }
142
+      if (parseInt(day) < 10) {
143
+        day = '0' + day
144
+      }
145
+      const startTime = year + '-' + month + '-' + day
146
+      this.start_time = startTime
147
+      this.GetCancelStock()
148
+      this.GetConfigInfo()
149
+      this.fetchAllAdminUsers()
150
+    },
151
+    data() {
152
+      return {
153
+        orderTypeArr: [
154
+          { value: 1, label: '耗材入库单' },
155
+          { value: 2, label: '其他入库单' }
156
+        ],
157
+        manufacturer_id: '',
158
+        dealer_id: '',
159
+        order_type: '',
160
+        searchKey:'',
161
+        type: 3,
162
+        page: 1,
163
+        limit: 7,
164
+        checked: false,
165
+        total: 0,
166
+        pageTotal: 0,
167
+        pageSelect: 0,
168
+        adminUserOptions: [],
169
+        multipleSelection: [],
170
+        signAndWeighBoxPatients: 'sign-and-weigh-box-patients',
171
+        start_time: '',
172
+        cancelStockDate: [],
173
+        end_time: '',
174
+        goodType: [],
175
+        goodInfo: [],
176
+        manufacturer: [],
177
+        selectedTableData: [],
178
+        dealer: []
179
+
180
+      }
181
+    },
182
+    methods: {
183
+      changeType: function(val) {
184
+        this.order_type  = val
185
+        this.GetCancelStock()
186
+      }, changeManufacturer: function(val) {
187
+        this.manufacturer_id  = val
188
+        this.GetCancelStock()
189
+
190
+      },
191
+      getTypeName:function(row){
192
+        let name = ""
193
+        if (row.type == 1){
194
+          name = "耗材退货单"
195
+
196
+        }else if(row.type == 2){
197
+          name = "其他退货单"
198
+        }
199
+
200
+        return name
201
+      },
202
+      specificationName: function(good_info_id) {
203
+        let name = ''
204
+        for (let i = 0; i < this.goodInfo.length; i++) {
205
+          if (this.goodInfo[i].id == good_info_id) {
206
+            name = this.goodInfo[i].specification_name
207
+          }
208
+        }
209
+        return name
210
+      },
211
+      search:function(){
212
+        const Params = {
213
+          page: this.page,
214
+          limit: this.limit,
215
+          start_time: this.start_time,
216
+          end_time: this.end_time,
217
+          type: this.type,
218
+          keywords:this.searchKey,
219
+        }
220
+        this.cancelStockDate = []
221
+        getStockDetail(Params).then(response => {
222
+          if (response.data.state == 0) {
223
+            this.$message.error(response.data.msg)
224
+            return false
225
+          } else {
226
+            this.total = response.data.data.total
227
+            for (let i = 0; i < response.data.data.list.length; i++) {
228
+              this.cancelStockDate.push(response.data.data.list[i])
229
+            }
230
+          }
231
+        })
232
+      },
233
+      AddNewOrder: function() {
234
+        this.$router.push({ name: 'cancelStockOrderAdd', query: { type: this.type }})
235
+      },
236
+      GetCancelStock: function() {
237
+        const Params = {
238
+          page: this.page,
239
+          limit: this.limit,
240
+          start_time: this.start_time,
241
+          end_time: this.end_time,
242
+          type: this.type,
243
+          manufacturer: this.manufacturer_id,
244
+          order_type: this.order_type,
245
+          dealer: this.dealer_id
246
+        }
247
+        this.cancelStockDate = []
248
+        getStockDetail(Params).then(response => {
249
+          if (response.data.state == 0) {
250
+            this.$message.error(response.data.msg)
251
+            return false
252
+          } else {
253
+            this.total = response.data.data.total
254
+            for (let i = 0; i < response.data.data.list.length; i++) {
255
+              this.cancelStockDate.push(response.data.data.list[i])
256
+            }
257
+          }
258
+        })
259
+      }, getXuserName(id) {
260
+        if (id <= 0) {
261
+          return ''
262
+        }
263
+        var name = ''
264
+        if (this.adminUserOptions == null || typeof (this.adminUserOptions.length) === 'undefined') {
265
+          return name
266
+        }
267
+        var leng = this.adminUserOptions.length
268
+        if (leng == 0) {
269
+          return name
270
+        }
271
+        for (let index = 0; index < leng; index++) {
272
+          if (this.adminUserOptions[index].id == id) {
273
+            name = this.adminUserOptions[index].name
274
+            break
275
+          }
276
+        }
277
+        return name
278
+      }, fetchAllAdminUsers() {
279
+        fetchAllAdminUsers().then(response => {
280
+          console.log(response)
281
+          if (response.data.state == 1) {
282
+            this.adminUserOptions = response.data.data.users
283
+            var alen = this.adminUserOptions.length
284
+            for (let index = 0; index < alen; index++) {
285
+              if (this.adminUserOptions[index].user_type == 2) {
286
+                // this.doctorOptions.push(this.adminUserOptions[index]);
287
+              }
288
+            }
289
+          }
290
+        })
291
+      }, handleSelectionChange: function(val) {
292
+        this.multipleSelection = val
293
+      }, handleSizeChange(val) {
294
+        this.limit = val
295
+        this.GetCancelStock()
296
+      }, handleCurrentChange(val) {
297
+        this.page = val
298
+        this.GetCancelStock()
299
+      }, startTimeChange(val) {
300
+        this.GetCancelStock()
301
+      }, endTimeChange(val) {
302
+        this.GetCancelStock()
303
+      }, calculate: function(val) {
304
+        return Math.round(parseFloat(val) * 100) / 100
305
+      }, GetConfigInfo: function() {
306
+        GetAllConfig().then(response => {
307
+          if (response.data.state == 0) {
308
+            this.$message.error(response.data.msg)
309
+            return false
310
+          } else {
311
+            this.manufacturer = response.data.data.manufacturer
312
+            this.dealer = response.data.data.dealer
313
+            this.goodInfo = response.data.data.goodInfo
314
+
315
+          }
316
+        })
317
+      }, getManufactuerName: function(manufacturer_id) {
318
+        for (let i = 0; i < this.manufacturer.length; i++) {
319
+          if (this.manufacturer[i].id == manufacturer_id) {
320
+            return this.manufacturer[i].manufacturer_name
321
+          }
322
+        }
323
+      }, getDealerName: function(dealer_id) {
324
+        for (let i = 0; i < this.dealer.length; i++) {
325
+          if (this.dealer[i].id == dealer_id) {
326
+            return this.dealer[i].dealer_name
327
+          }
328
+        }
329
+      }, handleEdit: function(index, row) {
330
+        this.$router.push({ name: 'cancelStockDetail', query: { id: row.id,type: this.type }})
331
+      }, handleDelete: function(index, row) {
332
+        const ids = []
333
+        ids.push(row.id)
334
+        const idStr = ids.join(',')
335
+
336
+        const params = {
337
+          ids: idStr
338
+        }
339
+
340
+        this.$confirm('确认删除出库退库单记录?', '删除出库退库单记录', {
341
+          confirmButtonText: '确定',
342
+          cancelButtonText: '取消',
343
+          type: 'warning'
344
+        }).then(() => {
345
+          deleteCancelStock(params).then(response => {
346
+            if (response.data.state == 0) {
347
+              this.$message.error(response.data.msg)
348
+              return false
349
+            } else {
350
+              this.$notify({
351
+                title: '成功',
352
+                message: '删除成功',
353
+                type: 'success',
354
+                duration: 2000
355
+              })
356
+              for (let i = 0; i < ids.length; i++) {
357
+                for (let y = 0; y < this.cancelStockDate.length; y++) {
358
+                  if (ids[i] == this.cancelStockDate[y].id) {
359
+                    this.cancelStockDate.splice(y, 1)
360
+                  }
361
+                }
362
+              }
363
+            }
364
+          })
365
+        }).catch(() => {
366
+        })
367
+      }, changeAllSelected: function(val) {
368
+        if (val) {
369
+          this.$refs.multipleTable.toggleAllSelection()
370
+        } else {
371
+          this.$refs.multipleTable.clearSelection()
372
+        }
373
+      }, select(selection) {
374
+        this.selectedTableData = selection
375
+      }, batchDelete() {
376
+        if (this.selectedTableData.length <= 0) {
377
+          this.$message.error('请选择要删除的记录')
378
+          return
379
+        }
380
+        const ids = []
381
+        for (let i = 0; i < this.selectedTableData.length; i++) {
382
+          ids.push(this.selectedTableData[i].id)
383
+        }
384
+        const idStr = ids.join(',')
385
+        const params = {
386
+          ids: idStr
387
+        }
388
+        this.$confirm('确认删除出库退库单记录?', '删除出库退库单记录', {
389
+          confirmButtonText: '确定',
390
+          cancelButtonText: '取消',
391
+          type: 'warning'
392
+        }).then(() => {
393
+          deleteCancelStock(params).then(response => {
394
+            if (response.data.state == 0) {
395
+              this.$message.error(response.data.msg)
396
+              return false
397
+            } else {
398
+              this.$notify({
399
+                title: '成功',
400
+                message: '删除成功',
401
+                type: 'success',
402
+                duration: 2000
403
+              })
404
+
405
+              for (let i = 0; i < ids.length; i++) {
406
+                for (let y = 0; y < this.cancelStockDate.length; y++) {
407
+                  if (ids[i] == this.cancelStockDate[y].id) {
408
+                    this.cancelStockDate.splice(y, 1)
409
+                  }
410
+                }
411
+              }
412
+            }
413
+          })
414
+        }).catch(() => {
415
+        })
416
+      }
417
+    }
418
+  }
419
+</script>
420
+
421
+<style rel="stylesheet/css" lang="scss" scoped>
422
+  .information {
423
+    border: 1px #dcdfe6 solid;
424
+    padding: 30px 20px 30px 20px;
425
+
426
+  .border {
427
+    border-bottom: 1px #dcdfe6 solid;
428
+    margin: 0px 0 20px 0;
429
+  }
430
+
431
+  }
432
+
433
+
434
+  .edit_separater {
435
+    border-top: 1px solid rgb(233, 233, 233);
436
+    margin-top: 15px;
437
+    margin-bottom: 15px;
438
+  }
439
+
440
+</style>
441
+
442
+<style>
443
+  .sign-and-weigh-box .sign-and-weigh-box-patients .cell {
444
+    font-size: 12px;
445
+  }
446
+
447
+  .sign-and-weigh-box .sign-and-weigh-box-patients .current-row > td {
448
+    background: #6fb5fa;
449
+  }
450
+
451
+  .count {
452
+    color: #bd2c00;
453
+
454
+  }
455
+
456
+</style>

+ 465 - 0
src/xt_pages/stock/detail/stockInDetail.vue View File

1
+<template>
2
+  <div class="main-contain">
3
+    <div class="app-container">
4
+      <div class="cell clearfix">
5
+        <el-input style="width: 300px;" class="filter-item" v-model="searchKey" placeholder="单据编码/制单人/商品类型"/>
6
+        <el-button class="filter-item" type="primary" icon="el-icon-search" @click="search">搜索</el-button>
7
+      </div>
8
+
9
+      <div class="cell clearfix">
10
+        <label class="title"><span class="name">日期查询</span> : </label>
11
+        <el-date-picker v-model="start_time" prefix-icon="el-icon-date" :editable="false" style="width: 196px;"
12
+                        type="date" placeholder="选择日期时间" align="right" format="yyyy-MM-dd"
13
+                        value-format="yyyy-MM-dd" @change="startTimeChange"></el-date-picker>
14
+        <span class="">-</span>
15
+        <el-date-picker v-model="end_time" prefix-icon="el-icon-date" :editable="false" style="width: 196px;"
16
+                        type="date" placeholder="选择日期时间" align="right" format="yyyy-MM-dd"
17
+                        value-format="yyyy-MM-dd" @change="endTimeChange"></el-date-picker>
18
+      </div>
19
+
20
+      <div class="cell clearfix">
21
+        <label class="title"><span class="name">单据类型</span> : </label>
22
+        <el-select v-model="order_type" clearable placeholder="单据类型" @change="changeType">
23
+          <el-option
24
+            v-for="item in orderTypeArr"
25
+            :key="item.value"
26
+            :label="item.label"
27
+            :value="item.value">
28
+          </el-option>
29
+        </el-select>
30
+      </div>
31
+
32
+      <div class="cell clearfix">
33
+        <label class="title"><span class="name">其它</span> : </label>
34
+        <el-select v-model="manufacturer_id" clearable placeholder="厂商" @change="changeManufacturer">
35
+          <el-option
36
+            v-for="item in manufacturer"
37
+            :key="item.id"
38
+            :label="item.manufacturer_name"
39
+            :value="item.id">
40
+          </el-option>
41
+        </el-select>
42
+      </div>
43
+
44
+      <el-row :gutter="12" style="margin-top: 10px">
45
+        <el-table
46
+          :data="cancelStockDate"
47
+          :class="signAndWeighBoxPatients"
48
+          border
49
+          highlight-current-row
50
+          ref="multipleTable"
51
+          @selection-change="select"
52
+          :header-cell-style="{ backgroundColor: 'rgb(245, 247, 250)'}"
53
+
54
+        >
55
+
56
+          <el-table-column label="单据编号" align="center">
57
+            <template slot-scope="scope">
58
+              {{scope.row.warehousing_order}}
59
+            </template>
60
+          </el-table-column>
61
+
62
+          <el-table-column label="商品类型" align="center">
63
+            <template slot-scope="scope">
64
+              {{specificationName(scope.row.good_id)}}
65
+            </template>
66
+          </el-table-column>
67
+
68
+
69
+          <el-table-column label="单据类型" align="center">
70
+            <template slot-scope="scope">
71
+              {{getTypeName(scope.row)}}
72
+            </template>
73
+          </el-table-column>
74
+
75
+          <el-table-column label="操作时间" align="center">
76
+            <template slot-scope="scope">
77
+              {{ scope.row.Warehousing.warehousing_time | parseTime('{y}-{m}-{d}')}}
78
+            </template>
79
+          </el-table-column>
80
+          <el-table-column label="制单人" align="center">
81
+            <template slot-scope="scope">
82
+              {{getXuserName(scope.row.Warehousing.creater)}}
83
+
84
+            </template>
85
+          </el-table-column>
86
+          <el-table-column label="单价" align="center">
87
+            <template slot-scope="scope">
88
+              {{scope.row.price}}
89
+            </template>
90
+          </el-table-column>
91
+          <el-table-column label="数量" align="center">
92
+            <template slot-scope="scope">
93
+              {{scope.row.warehousing_count}}
94
+            </template>
95
+          </el-table-column>
96
+          <el-table-column label="总价" align="center">
97
+            <template slot-scope="scope">
98
+              {{scope.row.price * scope.row.warehousing_count}}
99
+            </template>
100
+          </el-table-column>
101
+
102
+        </el-table>
103
+
104
+        <el-pagination
105
+          @size-change="handleSizeChange"
106
+          @current-change="handleCurrentChange"
107
+          :page-sizes="[7]"
108
+          :page-size="7"
109
+          background
110
+          style="margin-top:20px;float: right"
111
+          layout="total, sizes, prev, pager, next, jumper"
112
+          :total="total">
113
+        </el-pagination>
114
+
115
+      </el-row>
116
+    </div>
117
+  </div>
118
+</template>
119
+
120
+<script>
121
+  import { uParseTime } from '@/utils/tools'
122
+  import { fetchAllAdminUsers, fetchAllDoctorAndNurse } from '@/api/doctor'
123
+  import { deleteCancelStock, GetAllConfig, getStockDetail } from '@/api/stock'
124
+
125
+  export default {
126
+    name: 'stockInDetail',
127
+
128
+    created() {
129
+      var year = new Date().getFullYear()
130
+      var month = new Date().getMonth() + 1
131
+      var day = new Date().getDate()
132
+      if (parseInt(month) < 10) {
133
+        month = '0' + month
134
+      }
135
+      if (parseInt(day) < 10) {
136
+        day = '0' + day
137
+      }
138
+      const endTime = year + '-' + month + '-' + day
139
+      this.end_time = endTime
140
+
141
+      var year = new Date().getFullYear()
142
+      var month = new Date().getMonth()
143
+      var day = new Date().getDate()
144
+      if (parseInt(month) < 10) {
145
+        month = '0' + month
146
+      }
147
+      if (parseInt(day) < 10) {
148
+        day = '0' + day
149
+      }
150
+      const startTime = year + '-' + month + '-' + day
151
+      this.start_time = startTime
152
+      this.GetCancelStock()
153
+      this.GetConfigInfo()
154
+      this.fetchAllAdminUsers()
155
+    },
156
+    data() {
157
+      return {
158
+        orderTypeArr: [
159
+          { value: 1, label: '耗材入库单' },
160
+          { value: 2, label: '其他入库单' }
161
+        ],
162
+
163
+        searchKey: '',
164
+        type: 1,
165
+        page: 1,
166
+        limit: 7,
167
+        manufacturer_id: '',
168
+        dealer_id: '',
169
+        order_type: '',
170
+        checked: false,
171
+        total: 0,
172
+        pageTotal: 0,
173
+        pageSelect: 0,
174
+        adminUserOptions: [],
175
+        multipleSelection: [],
176
+        signAndWeighBoxPatients: 'sign-and-weigh-box-patients',
177
+        start_time: '',
178
+        cancelStockDate: [],
179
+        end_time: '',
180
+        goodType: [],
181
+        goodInfo: [],
182
+        manufacturer: [],
183
+        selectedTableData: [],
184
+        dealer: []
185
+
186
+      }
187
+    },
188
+    methods: {
189
+      changeType: function(val) {
190
+        this.order_type  = val
191
+        this.GetCancelStock()
192
+      }, changeManufacturer: function(val) {
193
+        this.manufacturer_id  = val
194
+        this.GetCancelStock()
195
+
196
+      }, changeDealer: function(val) {
197
+        this.dealer_id  = val
198
+        this.GetCancelStock()
199
+
200
+      }, getTypeName: function(row) {
201
+        let name = ''
202
+        if (row.type == 1) {
203
+          name = '耗材入库单'
204
+
205
+        } else if (row.type == 2) {
206
+          name = '其他入库单'
207
+        }
208
+
209
+        return name
210
+      },
211
+      specificationName: function(good_info_id) {
212
+        let name = ''
213
+        for (let i = 0; i < this.goodInfo.length; i++) {
214
+          if (this.goodInfo[i].id == good_info_id) {
215
+            name = this.goodInfo[i].specification_name
216
+          }
217
+        }
218
+        return name
219
+      },
220
+      search: function() {
221
+        const Params = {
222
+          page: this.page,
223
+          limit: this.limit,
224
+          start_time: this.start_time,
225
+          end_time: this.end_time,
226
+          type: this.type,
227
+          keywords: this.searchKey,
228
+        }
229
+        this.cancelStockDate = []
230
+        getStockDetail(Params).then(response => {
231
+          if (response.data.state == 0) {
232
+            this.$message.error(response.data.msg)
233
+            return false
234
+          } else {
235
+            this.total = response.data.data.total
236
+            for (let i = 0; i < response.data.data.list.length; i++) {
237
+              this.cancelStockDate.push(response.data.data.list[i])
238
+            }
239
+          }
240
+        })
241
+      },
242
+      AddNewOrder: function() {
243
+        this.$router.push({ name: 'cancelStockOrderAdd', query: { type: this.type } })
244
+      },
245
+      GetCancelStock: function() {
246
+        const Params = {
247
+          page: this.page,
248
+          limit: this.limit,
249
+          start_time: this.start_time,
250
+          end_time: this.end_time,
251
+          type: this.type,
252
+          manufacturer: this.manufacturer_id,
253
+          order_type: this.order_type,
254
+          dealer: this.dealer_id
255
+        }
256
+        this.cancelStockDate = []
257
+        getStockDetail(Params).then(response => {
258
+          if (response.data.state == 0) {
259
+            this.$message.error(response.data.msg)
260
+            return false
261
+          } else {
262
+            this.total = response.data.data.total
263
+            for (let i = 0; i < response.data.data.list.length; i++) {
264
+              this.cancelStockDate.push(response.data.data.list[i])
265
+            }
266
+          }
267
+        })
268
+      }, getXuserName(id) {
269
+        if (id <= 0) {
270
+          return ''
271
+        }
272
+        var name = ''
273
+        if (this.adminUserOptions == null || typeof (this.adminUserOptions.length) === 'undefined') {
274
+          return name
275
+        }
276
+        var leng = this.adminUserOptions.length
277
+        if (leng == 0) {
278
+          return name
279
+        }
280
+        for (let index = 0; index < leng; index++) {
281
+          if (this.adminUserOptions[index].id == id) {
282
+            name = this.adminUserOptions[index].name
283
+            break
284
+          }
285
+        }
286
+        return name
287
+      }, fetchAllAdminUsers() {
288
+        fetchAllAdminUsers().then(response => {
289
+          console.log(response)
290
+          if (response.data.state == 1) {
291
+            this.adminUserOptions = response.data.data.users
292
+            var alen = this.adminUserOptions.length
293
+            for (let index = 0; index < alen; index++) {
294
+              if (this.adminUserOptions[index].user_type == 2) {
295
+                // this.doctorOptions.push(this.adminUserOptions[index]);
296
+              }
297
+            }
298
+          }
299
+        })
300
+      }, handleSelectionChange: function(val) {
301
+        this.multipleSelection = val
302
+      }, handleSizeChange(val) {
303
+        this.limit = val
304
+        this.GetWarehouse()
305
+      }, handleCurrentChange(val) {
306
+        this.page = val
307
+        this.GetWarehouse()
308
+      }, startTimeChange(val) {
309
+        this.GetCancelStock()
310
+      }, endTimeChange(val) {
311
+        this.GetCancelStock()
312
+      }, calculate: function(val) {
313
+        return Math.round(parseFloat(val) * 100) / 100
314
+      }, GetConfigInfo: function() {
315
+        GetAllConfig().then(response => {
316
+          if (response.data.state == 0) {
317
+            this.$message.error(response.data.msg)
318
+            return false
319
+          } else {
320
+            this.manufacturer = response.data.data.manufacturer
321
+            this.dealer = response.data.data.dealer
322
+            this.goodInfo = response.data.data.goodInfo
323
+
324
+          }
325
+        })
326
+      }, getManufactuerName: function(manufacturer_id) {
327
+        for (let i = 0; i < this.manufacturer.length; i++) {
328
+          if (this.manufacturer[i].id == manufacturer_id) {
329
+            return this.manufacturer[i].manufacturer_name
330
+          }
331
+        }
332
+      }, getDealerName: function(dealer_id) {
333
+        for (let i = 0; i < this.dealer.length; i++) {
334
+          if (this.dealer[i].id == dealer_id) {
335
+            return this.dealer[i].dealer_name
336
+          }
337
+        }
338
+      }, handleEdit: function(index, row) {
339
+        this.$router.push({ name: 'cancelStockDetail', query: { id: row.id, type: this.type } })
340
+      }, handleDelete: function(index, row) {
341
+        const ids = []
342
+        ids.push(row.id)
343
+        const idStr = ids.join(',')
344
+
345
+        const params = {
346
+          ids: idStr
347
+        }
348
+
349
+        this.$confirm('确认删除出库退库单记录?', '删除出库退库单记录', {
350
+          confirmButtonText: '确定',
351
+          cancelButtonText: '取消',
352
+          type: 'warning'
353
+        }).then(() => {
354
+          deleteCancelStock(params).then(response => {
355
+            if (response.data.state == 0) {
356
+              this.$message.error(response.data.msg)
357
+              return false
358
+            } else {
359
+              this.$notify({
360
+                title: '成功',
361
+                message: '删除成功',
362
+                type: 'success',
363
+                duration: 2000
364
+              })
365
+              for (let i = 0; i < ids.length; i++) {
366
+                for (let y = 0; y < this.cancelStockDate.length; y++) {
367
+                  if (ids[i] == this.cancelStockDate[y].id) {
368
+                    this.cancelStockDate.splice(y, 1)
369
+                  }
370
+                }
371
+              }
372
+            }
373
+          })
374
+        }).catch(() => {
375
+        })
376
+      }, changeAllSelected: function(val) {
377
+        if (val) {
378
+          this.$refs.multipleTable.toggleAllSelection()
379
+        } else {
380
+          this.$refs.multipleTable.clearSelection()
381
+        }
382
+      }, select(selection) {
383
+        this.selectedTableData = selection
384
+      }, batchDelete() {
385
+        if (this.selectedTableData.length <= 0) {
386
+          this.$message.error('请选择要删除的记录')
387
+          return
388
+        }
389
+        const ids = []
390
+        for (let i = 0; i < this.selectedTableData.length; i++) {
391
+          ids.push(this.selectedTableData[i].id)
392
+        }
393
+        const idStr = ids.join(',')
394
+        const params = {
395
+          ids: idStr
396
+        }
397
+        this.$confirm('确认删除出库退库单记录?', '删除出库退库单记录', {
398
+          confirmButtonText: '确定',
399
+          cancelButtonText: '取消',
400
+          type: 'warning'
401
+        }).then(() => {
402
+          deleteCancelStock(params).then(response => {
403
+            if (response.data.state == 0) {
404
+              this.$message.error(response.data.msg)
405
+              return false
406
+            } else {
407
+              this.$notify({
408
+                title: '成功',
409
+                message: '删除成功',
410
+                type: 'success',
411
+                duration: 2000
412
+              })
413
+
414
+              for (let i = 0; i < ids.length; i++) {
415
+                for (let y = 0; y < this.cancelStockDate.length; y++) {
416
+                  if (ids[i] == this.cancelStockDate[y].id) {
417
+                    this.cancelStockDate.splice(y, 1)
418
+                  }
419
+                }
420
+              }
421
+            }
422
+          })
423
+        }).catch(() => {
424
+        })
425
+      }
426
+    }
427
+  }
428
+</script>
429
+
430
+<style rel="stylesheet/css" lang="scss" scoped>
431
+  .information {
432
+    border: 1px #dcdfe6 solid;
433
+    padding: 30px 20px 30px 20px;
434
+
435
+  .border {
436
+    border-bottom: 1px #dcdfe6 solid;
437
+    margin: 0px 0 20px 0;
438
+  }
439
+
440
+  }
441
+
442
+
443
+  .edit_separater {
444
+    border-top: 1px solid rgb(233, 233, 233);
445
+    margin-top: 15px;
446
+    margin-bottom: 15px;
447
+  }
448
+
449
+</style>
450
+
451
+<style>
452
+  .sign-and-weigh-box .sign-and-weigh-box-patients .cell {
453
+    font-size: 12px;
454
+  }
455
+
456
+  .sign-and-weigh-box .sign-and-weigh-box-patients .current-row > td {
457
+    background: #6fb5fa;
458
+  }
459
+
460
+  .count {
461
+    color: #bd2c00;
462
+
463
+  }
464
+
465
+</style>

+ 468 - 0
src/xt_pages/stock/detail/stockOutDetail.vue View File

1
+<template>
2
+  <div class="main-contain">
3
+    <div class="app-container">
4
+      <div class="cell clearfix" >
5
+        <el-input style="width: 300px;" class="filter-item" v-model="searchKey" placeholder="单据编码/制单人/商品类型"/>
6
+        <el-button class="filter-item" type="primary" icon="el-icon-search" @click="search">搜索</el-button>
7
+      </div>
8
+
9
+      <div class="cell clearfix">
10
+        <label class="title"><span class="name">日期查询</span> : </label>
11
+        <el-date-picker v-model="start_time" prefix-icon="el-icon-date" :editable="false" style="width: 196px;"
12
+                        type="date" placeholder="选择日期时间" align="right" format="yyyy-MM-dd"
13
+                        value-format="yyyy-MM-dd" @change="startTimeChange"></el-date-picker>
14
+        <span class="">-</span>
15
+        <el-date-picker v-model="end_time" prefix-icon="el-icon-date" :editable="false" style="width: 196px;"
16
+                        type="date" placeholder="选择日期时间" align="right" format="yyyy-MM-dd"
17
+                        value-format="yyyy-MM-dd" @change="endTimeChange"></el-date-picker>
18
+      </div>
19
+
20
+
21
+      <div class="cell clearfix">
22
+        <label class="title"><span class="name">单据类型</span> : </label>
23
+        <el-select v-model="order_type" clearable placeholder="单据类型" @change="changeType">
24
+          <el-option
25
+            v-for="item in orderTypeArr"
26
+            :key="item.value"
27
+            :label="item.label"
28
+            :value="item.value">
29
+          </el-option>
30
+        </el-select>
31
+      </div>
32
+
33
+      <div class="cell clearfix">
34
+        <label class="title"><span class="name">其它</span> : </label>
35
+        <el-select v-model="manufacturer_id" clearable placeholder="厂商" @change="changeManufacturer">
36
+          <el-option
37
+            v-for="item in manufacturer"
38
+            :key="item.id"
39
+            :label="item.manufacturer_name"
40
+            :value="item.id">
41
+          </el-option>
42
+        </el-select>
43
+      </div>
44
+
45
+
46
+      <el-row :gutter="12" style="margin-top: 10px">
47
+        <el-table
48
+          :data="cancelStockDate"
49
+          :class="signAndWeighBoxPatients"
50
+          border
51
+          highlight-current-row
52
+          ref="multipleTable"
53
+          @selection-change="select"
54
+          :header-cell-style="{ backgroundColor: 'rgb(245, 247, 250)'}"
55
+
56
+        >
57
+
58
+
59
+
60
+          <el-table-column label="单据编号" align="center">
61
+            <template slot-scope="scope">
62
+              {{scope.row.warehouse_out_order_number}}
63
+            </template>
64
+          </el-table-column>
65
+
66
+          <el-table-column label="商品类型" align="center">
67
+            <template slot-scope="scope">
68
+              {{specificationName(scope.row.good_id)}}
69
+            </template>
70
+          </el-table-column>
71
+
72
+
73
+          <el-table-column label="单据类型" align="center">
74
+            <template slot-scope="scope">
75
+              {{getTypeName(scope.row)}}
76
+            </template>
77
+          </el-table-column>
78
+
79
+          <el-table-column label="操作时间" align="center">
80
+            <template slot-scope="scope">
81
+              {{ scope.row.WarehouseOut.warehouse_out_time | parseTime('{y}-{m}-{d}')}}
82
+            </template>
83
+          </el-table-column>
84
+          <el-table-column label="制单人" align="center">
85
+            <template slot-scope="scope">
86
+              {{getXuserName(scope.row.WarehouseOut.creater)}}
87
+
88
+            </template>
89
+          </el-table-column>
90
+          <el-table-column label="单价" align="center">
91
+            <template slot-scope="scope">
92
+              {{scope.row.price}}
93
+            </template>
94
+          </el-table-column>
95
+          <el-table-column label="数量" align="center">
96
+            <template slot-scope="scope">
97
+              {{scope.row.count}}
98
+            </template>
99
+          </el-table-column>
100
+          <el-table-column label="总价" align="center">
101
+            <template slot-scope="scope">
102
+              {{scope.row.price *  scope.row.count}}
103
+            </template>
104
+          </el-table-column>
105
+
106
+        </el-table>
107
+
108
+        <el-pagination
109
+          @size-change="handleSizeChange"
110
+          @current-change="handleCurrentChange"
111
+          :page-sizes="[7]"
112
+          :page-size="7"
113
+          background
114
+          style="margin-top:20px;float: right"
115
+          layout="total, sizes, prev, pager, next, jumper"
116
+          :total="total">
117
+        </el-pagination>
118
+
119
+      </el-row>
120
+    </div>
121
+  </div>
122
+</template>
123
+
124
+<script>
125
+  import { uParseTime } from '@/utils/tools'
126
+  import { fetchAllAdminUsers, fetchAllDoctorAndNurse } from '@/api/doctor'
127
+  import { deleteCancelStock, GetAllConfig, getStockDetail } from '@/api/stock'
128
+
129
+
130
+  export default {
131
+    name: 'stockOutDetail',
132
+
133
+    created() {
134
+      var year = new Date().getFullYear()
135
+      var month = new Date().getMonth() + 1
136
+      var day = new Date().getDate()
137
+      if (parseInt(month) < 10) {
138
+        month = '0' + month
139
+      }
140
+      if (parseInt(day) < 10) {
141
+        day = '0' + day
142
+      }
143
+      const endTime = year + '-' + month + '-' + day
144
+      this.end_time = endTime
145
+
146
+      var year = new Date().getFullYear()
147
+      var month = new Date().getMonth()
148
+      var day = new Date().getDate()
149
+      if (parseInt(month) < 10) {
150
+        month = '0' + month
151
+      }
152
+      if (parseInt(day) < 10) {
153
+        day = '0' + day
154
+      }
155
+      const startTime = year + '-' + month + '-' + day
156
+      this.start_time = startTime
157
+      this.GetCancelStock()
158
+      this.GetConfigInfo()
159
+      this.fetchAllAdminUsers()
160
+    },
161
+    data() {
162
+      return {
163
+        orderTypeArr: [
164
+          { value: 1, label: '耗材入库单' },
165
+          { value: 2, label: '其他入库单' }
166
+        ],
167
+        manufacturer_id: '',
168
+        dealer_id: '',
169
+        order_type: '',
170
+
171
+        searchKey:'',
172
+        type: 2,
173
+        page: 1,
174
+        limit: 7,
175
+        checked: false,
176
+        total: 0,
177
+        pageTotal: 0,
178
+        pageSelect: 0,
179
+        adminUserOptions: [],
180
+        multipleSelection: [],
181
+        signAndWeighBoxPatients: 'sign-and-weigh-box-patients',
182
+        start_time: '',
183
+        cancelStockDate: [],
184
+        end_time: '',
185
+        goodType: [],
186
+        goodInfo: [],
187
+        manufacturer: [],
188
+        selectedTableData: [],
189
+        dealer: []
190
+
191
+      }
192
+    },
193
+    methods: {
194
+      changeType: function(val) {
195
+        this.order_type  = val
196
+        this.GetCancelStock()
197
+      }, changeManufacturer: function(val) {
198
+        this.manufacturer_id  = val
199
+        this.GetCancelStock()
200
+
201
+      },
202
+      getTypeName:function(row){
203
+        let name = ""
204
+        let name2 = ""
205
+        if (row.type == 1){
206
+          name = "耗材出库单"
207
+
208
+        }else if(row.type == 2){
209
+          name = "其他出库单"
210
+        }
211
+
212
+        return name
213
+      },
214
+      specificationName: function(good_info_id) {
215
+        let name = ''
216
+        for (let i = 0; i < this.goodInfo.length; i++) {
217
+          if (this.goodInfo[i].id == good_info_id) {
218
+            name = this.goodInfo[i].specification_name
219
+          }
220
+        }
221
+        return name
222
+      },
223
+      search:function(){
224
+        const Params = {
225
+          page: this.page,
226
+          limit: this.limit,
227
+          start_time: this.start_time,
228
+          end_time: this.end_time,
229
+          type: this.type,
230
+          keywords:this.searchKey,
231
+        }
232
+        this.cancelStockDate = []
233
+        getStockDetail(Params).then(response => {
234
+          if (response.data.state == 0) {
235
+            this.$message.error(response.data.msg)
236
+            return false
237
+          } else {
238
+            this.total = response.data.data.total
239
+            for (let i = 0; i < response.data.data.list.length; i++) {
240
+              this.cancelStockDate.push(response.data.data.list[i])
241
+            }
242
+          }
243
+        })
244
+      },
245
+      AddNewOrder: function() {
246
+        this.$router.push({ name: 'cancelStockOrderAdd', query: { type: this.type }})
247
+      },
248
+      GetCancelStock: function() {
249
+        const Params = {
250
+          page: this.page,
251
+          limit: this.limit,
252
+          start_time: this.start_time,
253
+          end_time: this.end_time,
254
+          type: this.type,
255
+          manufacturer: this.manufacturer_id,
256
+          order_type: this.order_type,
257
+          dealer: this.dealer_id
258
+        }
259
+        this.cancelStockDate = []
260
+        getStockDetail(Params).then(response => {
261
+          if (response.data.state == 0) {
262
+            this.$message.error(response.data.msg)
263
+            return false
264
+          } else {
265
+            this.total = response.data.data.total
266
+            for (let i = 0; i < response.data.data.list.length; i++) {
267
+              this.cancelStockDate.push(response.data.data.list[i])
268
+            }
269
+          }
270
+        })
271
+      }, getXuserName(id) {
272
+        if (id <= 0) {
273
+          return ''
274
+        }
275
+        var name = ''
276
+        if (this.adminUserOptions == null || typeof (this.adminUserOptions.length) === 'undefined') {
277
+          return name
278
+        }
279
+        var leng = this.adminUserOptions.length
280
+        if (leng == 0) {
281
+          return name
282
+        }
283
+        for (let index = 0; index < leng; index++) {
284
+          if (this.adminUserOptions[index].id == id) {
285
+            name = this.adminUserOptions[index].name
286
+            break
287
+          }
288
+        }
289
+        return name
290
+      }, fetchAllAdminUsers() {
291
+        fetchAllAdminUsers().then(response => {
292
+          console.log(response)
293
+          if (response.data.state == 1) {
294
+            this.adminUserOptions = response.data.data.users
295
+            var alen = this.adminUserOptions.length
296
+            for (let index = 0; index < alen; index++) {
297
+              if (this.adminUserOptions[index].user_type == 2) {
298
+                // this.doctorOptions.push(this.adminUserOptions[index]);
299
+              }
300
+            }
301
+          }
302
+        })
303
+      }, handleSelectionChange: function(val) {
304
+        this.multipleSelection = val
305
+      }, handleSizeChange(val) {
306
+        this.limit = val
307
+        this.GetCancelStock()
308
+      }, handleCurrentChange(val) {
309
+        this.page = val
310
+        this.GetCancelStock()
311
+      }, startTimeChange(val) {
312
+        this.GetCancelStock()
313
+      }, endTimeChange(val) {
314
+        this.GetCancelStock()
315
+      }, calculate: function(val) {
316
+        return Math.round(parseFloat(val) * 100) / 100
317
+      }, GetConfigInfo: function() {
318
+        GetAllConfig().then(response => {
319
+          if (response.data.state == 0) {
320
+            this.$message.error(response.data.msg)
321
+            return false
322
+          } else {
323
+            this.manufacturer = response.data.data.manufacturer
324
+            this.dealer = response.data.data.dealer
325
+            this.goodInfo = response.data.data.goodInfo
326
+
327
+          }
328
+        })
329
+      }, getManufactuerName: function(manufacturer_id) {
330
+        for (let i = 0; i < this.manufacturer.length; i++) {
331
+          if (this.manufacturer[i].id == manufacturer_id) {
332
+            return this.manufacturer[i].manufacturer_name
333
+          }
334
+        }
335
+      }, getDealerName: function(dealer_id) {
336
+        for (let i = 0; i < this.dealer.length; i++) {
337
+          if (this.dealer[i].id == dealer_id) {
338
+            return this.dealer[i].dealer_name
339
+          }
340
+        }
341
+      }, handleEdit: function(index, row) {
342
+        this.$router.push({ name: 'cancelStockDetail', query: { id: row.id,type: this.type }})
343
+      }, handleDelete: function(index, row) {
344
+        const ids = []
345
+        ids.push(row.id)
346
+        const idStr = ids.join(',')
347
+
348
+        const params = {
349
+          ids: idStr
350
+        }
351
+
352
+        this.$confirm('确认删除出库退库单记录?', '删除出库退库单记录', {
353
+          confirmButtonText: '确定',
354
+          cancelButtonText: '取消',
355
+          type: 'warning'
356
+        }).then(() => {
357
+          deleteCancelStock(params).then(response => {
358
+            if (response.data.state == 0) {
359
+              this.$message.error(response.data.msg)
360
+              return false
361
+            } else {
362
+              this.$notify({
363
+                title: '成功',
364
+                message: '删除成功',
365
+                type: 'success',
366
+                duration: 2000
367
+              })
368
+              for (let i = 0; i < ids.length; i++) {
369
+                for (let y = 0; y < this.cancelStockDate.length; y++) {
370
+                  if (ids[i] == this.cancelStockDate[y].id) {
371
+                    this.cancelStockDate.splice(y, 1)
372
+                  }
373
+                }
374
+              }
375
+            }
376
+          })
377
+        }).catch(() => {
378
+        })
379
+      }, changeAllSelected: function(val) {
380
+        if (val) {
381
+          this.$refs.multipleTable.toggleAllSelection()
382
+        } else {
383
+          this.$refs.multipleTable.clearSelection()
384
+        }
385
+      }, select(selection) {
386
+        this.selectedTableData = selection
387
+      }, batchDelete() {
388
+        if (this.selectedTableData.length <= 0) {
389
+          this.$message.error('请选择要删除的记录')
390
+          return
391
+        }
392
+        const ids = []
393
+        for (let i = 0; i < this.selectedTableData.length; i++) {
394
+          ids.push(this.selectedTableData[i].id)
395
+        }
396
+        const idStr = ids.join(',')
397
+        const params = {
398
+          ids: idStr
399
+        }
400
+        this.$confirm('确认删除出库退库单记录?', '删除出库退库单记录', {
401
+          confirmButtonText: '确定',
402
+          cancelButtonText: '取消',
403
+          type: 'warning'
404
+        }).then(() => {
405
+          deleteCancelStock(params).then(response => {
406
+            if (response.data.state == 0) {
407
+              this.$message.error(response.data.msg)
408
+              return false
409
+            } else {
410
+              this.$notify({
411
+                title: '成功',
412
+                message: '删除成功',
413
+                type: 'success',
414
+                duration: 2000
415
+              })
416
+
417
+              for (let i = 0; i < ids.length; i++) {
418
+                for (let y = 0; y < this.cancelStockDate.length; y++) {
419
+                  if (ids[i] == this.cancelStockDate[y].id) {
420
+                    this.cancelStockDate.splice(y, 1)
421
+                  }
422
+                }
423
+              }
424
+            }
425
+          })
426
+        }).catch(() => {
427
+        })
428
+      }
429
+    }
430
+  }
431
+</script>
432
+
433
+<style rel="stylesheet/css" lang="scss" scoped>
434
+  .information {
435
+    border: 1px #dcdfe6 solid;
436
+    padding: 30px 20px 30px 20px;
437
+
438
+  .border {
439
+    border-bottom: 1px #dcdfe6 solid;
440
+    margin: 0px 0 20px 0;
441
+  }
442
+
443
+  }
444
+
445
+
446
+  .edit_separater {
447
+    border-top: 1px solid rgb(233, 233, 233);
448
+    margin-top: 15px;
449
+    margin-bottom: 15px;
450
+  }
451
+
452
+</style>
453
+
454
+<style>
455
+  .sign-and-weigh-box .sign-and-weigh-box-patients .cell {
456
+    font-size: 12px;
457
+  }
458
+
459
+  .sign-and-weigh-box .sign-and-weigh-box-patients .current-row > td {
460
+    background: #6fb5fa;
461
+  }
462
+
463
+  .count {
464
+    color: #bd2c00;
465
+
466
+  }
467
+
468
+</style>

+ 2 - 2
src/xt_pages/stock/index.vue View File

12
         <el-tab-pane label="经销商" >
12
         <el-tab-pane label="经销商" >
13
           <dealer></dealer>
13
           <dealer></dealer>
14
         </el-tab-pane>
14
         </el-tab-pane>
15
-        <el-tab-pane label="品类型" >
15
+        <el-tab-pane label="品类型" >
16
           <good-type></good-type>
16
           <good-type></good-type>
17
         </el-tab-pane>
17
         </el-tab-pane>
18
-        <el-tab-pane label="品信息" >
18
+        <el-tab-pane label="品信息" >
19
           <good-info></good-info>
19
           <good-info></good-info>
20
         </el-tab-pane>
20
         </el-tab-pane>
21
 
21
 

+ 28 - 5
src/xt_pages/stock/otherCancelStockOrder.vue View File

11
     <div class="app-container">
11
     <div class="app-container">
12
 
12
 
13
       <div class="cell clearfix">
13
       <div class="cell clearfix">
14
-        <el-input style="width: 300px;" class="filter-item" placeholder="单据日期/单据编码/制单人/供应商"/>
14
+        <el-input style="width: 300px;" class="filter-item" v-model="searchKey" placeholder="单据编码/制单人/厂商"/>
15
         <el-button class="filter-item" type="primary" icon="el-icon-search" @click="search">搜索</el-button>
15
         <el-button class="filter-item" type="primary" icon="el-icon-search" @click="search">搜索</el-button>
16
       </div>
16
       </div>
17
 
17
 
163
           { path: false, name: '库存管理' },
163
           { path: false, name: '库存管理' },
164
           { path: '/stock/cancel', name: '其他出库退库单' }
164
           { path: '/stock/cancel', name: '其他出库退库单' }
165
         ],
165
         ],
166
+        searchKey:'',
166
         type: 2,
167
         type: 2,
167
         page: 1,
168
         page: 1,
168
         limit: 7,
169
         limit: 7,
185
       }
186
       }
186
     },
187
     },
187
     methods: {
188
     methods: {
189
+      search:function(){
190
+        const Params = {
191
+          page: this.page,
192
+          limit: this.limit,
193
+          start_time: this.start_time,
194
+          end_time: this.end_time,
195
+          type: this.type,
196
+          keywords:this.searchKey,
197
+        }
198
+        this.cancelStockDate = []
199
+        getCancelStockList(Params).then(response => {
200
+          if (response.data.state == 0) {
201
+            this.$message.error(response.data.msg)
202
+            return false
203
+          } else {
204
+            this.total = response.data.data.total
205
+            for (let i = 0; i < response.data.data.list.length; i++) {
206
+              this.cancelStockDate.push(response.data.data.list[i])
207
+            }
208
+          }
209
+        })
210
+      },
188
       AddNewOrder: function() {
211
       AddNewOrder: function() {
189
         this.$router.push({ name: 'cancelStockOrderAdd', query: { type: this.type }})
212
         this.$router.push({ name: 'cancelStockOrderAdd', query: { type: this.type }})
190
       },
213
       },
244
         this.multipleSelection = val
267
         this.multipleSelection = val
245
       }, handleSizeChange(val) {
268
       }, handleSizeChange(val) {
246
         this.limit = val
269
         this.limit = val
247
-        this.GetWarehouse()
270
+        this.GetCancelStock()
248
       }, handleCurrentChange(val) {
271
       }, handleCurrentChange(val) {
249
         this.page = val
272
         this.page = val
250
-        this.GetWarehouse()
273
+        this.GetCancelStock()
251
       }, startTimeChange(val) {
274
       }, startTimeChange(val) {
252
-        this.GetWarehouse()
275
+        this.GetCancelStock()
253
       }, endTimeChange(val) {
276
       }, endTimeChange(val) {
254
-        this.GetWarehouse()
277
+        this.GetCancelStock()
255
       }, calculate: function(val) {
278
       }, calculate: function(val) {
256
         return Math.round(parseFloat(val) * 100) / 100
279
         return Math.round(parseFloat(val) * 100) / 100
257
       }, GetConfigInfo: function() {
280
       }, GetConfigInfo: function() {

+ 28 - 5
src/xt_pages/stock/otherSalesReturnOrder.vue View File

11
     <div class="app-container">
11
     <div class="app-container">
12
 
12
 
13
       <div class="cell clearfix">
13
       <div class="cell clearfix">
14
-        <el-input style="width: 400px;" class="filter-item" placeholder="单据日期/单据编码/制单人/供应商"/>
14
+        <el-input style="width: 400px;" class="filter-item" v-model="searchKey" placeholder="单据编码/制单人/厂商"/>
15
         <el-button class="filter-item" type="primary" icon="el-icon-search" @click="search">搜索</el-button>
15
         <el-button class="filter-item" type="primary" icon="el-icon-search" @click="search">搜索</el-button>
16
       </div>
16
       </div>
17
 
17
 
169
     },
169
     },
170
     data() {
170
     data() {
171
       return {
171
       return {
172
+        searchKey:'',
172
         crumbs: [
173
         crumbs: [
173
           { path: false, name: '库存管理' },
174
           { path: false, name: '库存管理' },
174
           { path: '/stock/return', name: '其他退货单' }
175
           { path: '/stock/return', name: '其他退货单' }
195
       }
196
       }
196
     },
197
     },
197
     methods: {
198
     methods: {
199
+      search:function() {
200
+        const Params = {
201
+          page: this.page,
202
+          limit: this.limit,
203
+          start_time: this.start_time,
204
+          end_time: this.end_time,
205
+          type: this.type,
206
+          keywords: this.searchKey,
207
+        }
208
+        this.saleReturnDate = []
209
+        getSalesReturnList(Params).then(response => {
210
+          if (response.data.state == 0) {
211
+            this.$message.error(response.data.msg)
212
+            return false
213
+          } else {
214
+            this.total = response.data.data.total
215
+            for (let i = 0; i < response.data.data.list.length; i++) {
216
+              this.saleReturnDate.push(response.data.data.list[i])
217
+            }
218
+          }
219
+        })
220
+      },
198
       AddNewOrder: function() {
221
       AddNewOrder: function() {
199
         this.$router.push({ name: 'salesReturnOrderAdd', query: { type: this.type }})
222
         this.$router.push({ name: 'salesReturnOrderAdd', query: { type: this.type }})
200
       },
223
       },
254
         this.multipleSelection = val
277
         this.multipleSelection = val
255
       }, handleSizeChange(val) {
278
       }, handleSizeChange(val) {
256
         this.limit = val
279
         this.limit = val
257
-        this.GetWarehouse()
280
+        this.GetSalesReturn()
258
       }, handleCurrentChange(val) {
281
       }, handleCurrentChange(val) {
259
         this.page = val
282
         this.page = val
260
-        this.GetWarehouse()
283
+        this.GetSalesReturn()
261
       }, startTimeChange(val) {
284
       }, startTimeChange(val) {
262
-        this.GetWarehouse()
285
+        this.GetSalesReturn()
263
       }, endTimeChange(val) {
286
       }, endTimeChange(val) {
264
-        this.GetWarehouse()
287
+        this.GetSalesReturn()
265
       }, calculate: function(val) {
288
       }, calculate: function(val) {
266
         return Math.round(parseFloat(val) * 100) / 100
289
         return Math.round(parseFloat(val) * 100) / 100
267
       }, GetConfigInfo: function() {
290
       }, GetConfigInfo: function() {

+ 30 - 4
src/xt_pages/stock/otherStockInOrder.vue View File

10
     <div class="app-container">
10
     <div class="app-container">
11
 
11
 
12
       <div class="cell clearfix">
12
       <div class="cell clearfix">
13
-        <el-input style="width: 400px;" class="filter-item" placeholder="单据日期/单据编码/制单人/供应商"/>
14
-        <el-button class="filter-item" type="primary" icon="el-icon-search" @click="search">搜索</el-button>
13
+        <el-input style="width: 400px;" class="filter-item" v-model="searchKey" placeholder="单据编码/制单人/厂商"/>
14
+        <el-button class="filter-item"  type="primary" icon="el-icon-search" @click="search">搜索</el-button>
15
       </div>
15
       </div>
16
 
16
 
17
       <div class="cell clearfix">
17
       <div class="cell clearfix">
163
     },
163
     },
164
     data() {
164
     data() {
165
       return {
165
       return {
166
+        searchKey:'',
166
         crumbs: [
167
         crumbs: [
167
           { path: false, name: '库存管理' },
168
           { path: false, name: '库存管理' },
168
           { path: '/stock/in/other', name: '其他入库单' }
169
           { path: '/stock/in/other', name: '其他入库单' }
197
       }
198
       }
198
     },
199
     },
199
     methods: {
200
     methods: {
200
-      GetWarehouse: function() {
201
+      search:function() {
202
+        const Params = {
203
+          page: this.page,
204
+          limit: this.limit,
205
+          start_time: this.start_time,
206
+          end_time: this.end_time,
207
+          type: this.type,
208
+          keywords: this.searchKey,
209
+        }
210
+        this.Warehouse.warehouseDate = []
211
+        getWarehouseList(Params).then(response => {
212
+          if (response.data.state == 0) {
213
+            this.Warehouse.loading = false
214
+            this.$message.error(response.data.msg)
215
+            return false
216
+          } else {
217
+            this.Warehouse.loading = false
218
+            this.total = response.data.data.total
219
+            for (let i = 0; i < response.data.data.list.length; i++) {
220
+              this.Warehouse.warehouseDate.push(response.data.data.list[i])
221
+            }
222
+          }
223
+        })
224
+      },
225
+
226
+        GetWarehouse: function() {
201
         const Params = {
227
         const Params = {
202
           page: this.page,
228
           page: this.page,
203
           limit: this.limit,
229
           limit: this.limit,
327
       }, handleReturnSales: function() {
353
       }, handleReturnSales: function() {
328
         // this.$router.push({path:'/patients/create'}
354
         // this.$router.push({path:'/patients/create'}
329
         if (this.multipleSelection.length <= 0) {
355
         if (this.multipleSelection.length <= 0) {
330
-          this.$message.error('请选择退货品')
356
+          this.$message.error('请选择退货品')
331
           return
357
           return
332
         }
358
         }
333
 
359
 

+ 29 - 5
src/xt_pages/stock/otherStockOutOrder.vue View File

9
     </div>
9
     </div>
10
     <div class="app-container">
10
     <div class="app-container">
11
       <div class="cell clearfix">
11
       <div class="cell clearfix">
12
-        <el-input style="width: 400px;" class="filter-item" placeholder="单据日期/单据编码/制单人/供应商"/>
12
+        <el-input style="width: 400px;" class="filter-item" v-model="searchKey" placeholder="单据编码/制单人/厂商"/>
13
         <el-button class="filter-item" type="primary" icon="el-icon-search" @click="search">搜索</el-button>
13
         <el-button class="filter-item" type="primary" icon="el-icon-search" @click="search">搜索</el-button>
14
       </div>
14
       </div>
15
 
15
 
165
         { path: false, name: "库存管理" },
165
         { path: false, name: "库存管理" },
166
         { path: "/stock/out", name: "其他出库单" }
166
         { path: "/stock/out", name: "其他出库单" }
167
       ],
167
       ],
168
+      searchKey:'',
168
       page: 1,
169
       page: 1,
169
       limit: 7,
170
       limit: 7,
170
       checked: false,
171
       checked: false,
186
     };
187
     };
187
   },
188
   },
188
   methods: {
189
   methods: {
190
+    search:function(){
191
+      const Params = {
192
+        page: this.page,
193
+        limit: this.limit,
194
+        start_time: this.start_time,
195
+        end_time: this.end_time,
196
+        type: this.type,
197
+        keywords:this.searchKey,
198
+      }
199
+      this.warehouseOutDate = [];
200
+      getWarehouseOutList(Params).then(response => {
201
+        if (response.data.state == 0) {
202
+          this.$message.error(response.data.msg);
203
+          return false;
204
+        } else {
205
+          this.total = response.data.data.total;
206
+          for (let i = 0; i < response.data.data.list.length; i++) {
207
+            this.warehouseOutDate.push(response.data.data.list[i]);
208
+          }
209
+        }
210
+      });
211
+
212
+    },
189
     AddNewOrder: function() {
213
     AddNewOrder: function() {
190
       this.$router.push({
214
       this.$router.push({
191
         name: "stockOutOrderAdd",
215
         name: "stockOutOrderAdd",
255
     },
279
     },
256
     handleSizeChange(val) {
280
     handleSizeChange(val) {
257
       this.limit = val;
281
       this.limit = val;
258
-      this.GetWarehouse();
282
+      this.GetWarehouseOut();
259
     },
283
     },
260
     handleCurrentChange(val) {
284
     handleCurrentChange(val) {
261
       this.page = val;
285
       this.page = val;
262
-      this.GetWarehouse();
286
+      this.GetWarehouseOut();
263
     },
287
     },
264
     startTimeChange(val) {
288
     startTimeChange(val) {
265
-      this.GetWarehouse();
289
+      this.GetWarehouseOut();
266
     },
290
     },
267
     endTimeChange(val) {
291
     endTimeChange(val) {
268
-      this.GetWarehouse();
292
+      this.GetWarehouseOut();
269
     },
293
     },
270
     calculate: function(val) {
294
     calculate: function(val) {
271
       return Math.round(parseFloat(val) * 100) / 100;
295
       return Math.round(parseFloat(val) * 100) / 100;

+ 15 - 4
src/xt_pages/stock/salesReturnEdit.vue View File

32
             <el-table-column min-width="35" align="center">
32
             <el-table-column min-width="35" align="center">
33
 
33
 
34
               <template slot="header" slot-scope="scope">
34
               <template slot="header" slot-scope="scope">
35
-                <span>品类型<span style="color: red">*</span></span>
35
+                <span>品类型<span style="color: red">*</span></span>
36
               </template>
36
               </template>
37
 
37
 
38
               <template slot-scope="scope">
38
               <template slot-scope="scope">
39
                 <el-form-item style="padding-top: 15px">
39
                 <el-form-item style="padding-top: 15px">
40
-                  <el-input placeholder="请输入品类型" v-model="scope.row.good_type_id"
40
+                  <el-input placeholder="请输入品类型" v-model="scope.row.good_type_id"
41
                             :value="typeName(scope.row.good_type_id)"
41
                             :value="typeName(scope.row.good_type_id)"
42
                             @focus="showDialog(scope.$index, scope.row)"></el-input>
42
                             @focus="showDialog(scope.$index, scope.row)"></el-input>
43
                 </el-form-item>
43
                 </el-form-item>
254
           const params = {
254
           const params = {
255
             id: row.id
255
             id: row.id
256
           }
256
           }
257
-          this.$confirm('确认删除该退货物品信息记录?', '删除退货物品信息记录', {
257
+          this.$confirm('确认删除该退货商品信息记录?', '删除退货商品信息记录', {
258
             confirmButtonText: '确定',
258
             confirmButtonText: '确定',
259
             cancelButtonText: '取消',
259
             cancelButtonText: '取消',
260
             type: 'warning'
260
             type: 'warning'
305
             const array = this.recordInfo.recordData
305
             const array = this.recordInfo.recordData
306
             for (let i = 0; i < array.length; i++) {
306
             for (let i = 0; i < array.length; i++) {
307
               if (array[i].good_type_id == 0) {
307
               if (array[i].good_type_id == 0) {
308
-                this.$message.error('品类型不能为空')
308
+                this.$message.error('品类型不能为空')
309
                 return
309
                 return
310
               }
310
               }
311
               if (array[i].good_id == 0) {
311
               if (array[i].good_id == 0) {
353
             this.form.manufacturer = this.salesReturn.manufacturer
353
             this.form.manufacturer = this.salesReturn.manufacturer
354
             this.form.dealer = this.salesReturn.dealer
354
             this.form.dealer = this.salesReturn.dealer
355
           }
355
           }
356
+
357
+
358
+          if( this.recordInfo.recordData.length == 0){
359
+            const tempObj = {}
360
+            tempObj['id'] = 0
361
+            tempObj['good_type_id'] = 0
362
+            tempObj['good_id'] = 0
363
+            tempObj['count'] = ''
364
+            this.recordInfo.recordData.push(tempObj)
365
+          }
366
+
356
         })
367
         })
357
       }
368
       }
358
     },
369
     },

+ 28 - 5
src/xt_pages/stock/salesReturnOrder.vue View File

11
     <div class="app-container">
11
     <div class="app-container">
12
 
12
 
13
       <div class="cell clearfix" >
13
       <div class="cell clearfix" >
14
-        <el-input style="width: 400px;" class="filter-item" placeholder="单据日期/单据编码/制单人/供应商"/>
14
+        <el-input style="width: 400px;" class="filter-item" v-model="searchKey" placeholder="单据编码/制单人/厂商"/>
15
         <el-button class="filter-item" type="primary" icon="el-icon-search" @click="search">搜索</el-button>
15
         <el-button class="filter-item" type="primary" icon="el-icon-search" @click="search">搜索</el-button>
16
       </div>
16
       </div>
17
 
17
 
164
     },
164
     },
165
     data() {
165
     data() {
166
       return {
166
       return {
167
+        searchKey:'',
167
         crumbs: [
168
         crumbs: [
168
           { path: false, name: '库存管理' },
169
           { path: false, name: '库存管理' },
169
           { path: '/stock/return', name: '退货单' }
170
           { path: '/stock/return', name: '退货单' }
190
       }
191
       }
191
     },
192
     },
192
     methods: {
193
     methods: {
194
+      search:function() {
195
+        const Params = {
196
+          page: this.page,
197
+          limit: this.limit,
198
+          start_time: this.start_time,
199
+          end_time: this.end_time,
200
+          type: this.type,
201
+          keywords: this.searchKey,
202
+        }
203
+        this.saleReturnDate = []
204
+        getSalesReturnList(Params).then(response => {
205
+          if (response.data.state == 0) {
206
+            this.$message.error(response.data.msg)
207
+            return false
208
+          } else {
209
+            this.total = response.data.data.total
210
+            for (let i = 0; i < response.data.data.list.length; i++) {
211
+              this.saleReturnDate.push(response.data.data.list[i])
212
+            }
213
+          }
214
+        })
215
+      },
193
       AddNewOrder: function() {
216
       AddNewOrder: function() {
194
         this.$router.push({ name: 'salesReturnOrderAdd', query: { type: this.type }})
217
         this.$router.push({ name: 'salesReturnOrderAdd', query: { type: this.type }})
195
       },
218
       },
249
         this.multipleSelection = val
272
         this.multipleSelection = val
250
       }, handleSizeChange(val) {
273
       }, handleSizeChange(val) {
251
         this.limit = val
274
         this.limit = val
252
-        this.GetWarehouse()
275
+        this.GetSalesReturn()
253
       }, handleCurrentChange(val) {
276
       }, handleCurrentChange(val) {
254
         this.page = val
277
         this.page = val
255
-        this.GetWarehouse()
278
+        this.GetSalesReturn()
256
       }, startTimeChange(val) {
279
       }, startTimeChange(val) {
257
-        this.GetWarehouse()
280
+        this.GetSalesReturn()
258
       }, endTimeChange(val) {
281
       }, endTimeChange(val) {
259
-        this.GetWarehouse()
282
+        this.GetSalesReturn()
260
       }, calculate: function(val) {
283
       }, calculate: function(val) {
261
         return Math.round(parseFloat(val) * 100) / 100
284
         return Math.round(parseFloat(val) * 100) / 100
262
       }, GetConfigInfo: function() {
285
       }, GetConfigInfo: function() {

+ 10 - 4
src/xt_pages/stock/salesReturnOrderAdd.vue View File

54
           <el-table-column min-width="35" align="center">
54
           <el-table-column min-width="35" align="center">
55
 
55
 
56
             <template slot="header" slot-scope="scope">
56
             <template slot="header" slot-scope="scope">
57
-              <span>品类型<span style="color: red">*</span></span>
57
+              <span>品类型<span style="color: red">*</span></span>
58
             </template>
58
             </template>
59
 
59
 
60
             <template slot-scope="scope">
60
             <template slot-scope="scope">
62
               <!--<span @click="showDialog(scope.$index, scope.row)" v-if="scope.row.good_type_id != 0">{{typeName(scope.row.good_type_id)}}</span>-->
62
               <!--<span @click="showDialog(scope.$index, scope.row)" v-if="scope.row.good_type_id != 0">{{typeName(scope.row.good_type_id)}}</span>-->
63
 
63
 
64
               <el-form-item style="padding-top: 15px">
64
               <el-form-item style="padding-top: 15px">
65
-                <el-input placeholder="请输入品类型" v-model="scope.row.good_type_id"
65
+                <el-input placeholder="请输入品类型" v-model="scope.row.good_type_id"
66
                           :value="typeName(scope.row.good_type_id)"
66
                           :value="typeName(scope.row.good_type_id)"
67
                           @focus="showDialog(scope.$index, scope.row)"></el-input>
67
                           @focus="showDialog(scope.$index, scope.row)"></el-input>
68
               </el-form-item>
68
               </el-form-item>
278
         tempObj['price'] = ''
278
         tempObj['price'] = ''
279
         this.recordInfo.recordData.push(tempObj)
279
         this.recordInfo.recordData.push(tempObj)
280
       }, handleDelete: function(index, row) {
280
       }, handleDelete: function(index, row) {
281
-        this.recordInfo.recordData.splice(index, 1)
281
+        if( this.recordInfo.recordData.length <= 1){
282
+          this.$message.error('只有一条记录的时候无法删除')
283
+          return
284
+        }else{
285
+          this.recordInfo.recordData.splice(index, 1)
286
+        }
287
+
282
       }, calculate: function(val) {
288
       }, calculate: function(val) {
283
         if (val == 0) {
289
         if (val == 0) {
284
           return ''
290
           return ''
323
             let total = 0
329
             let total = 0
324
             for (let i = 0; i < array.length; i++) {
330
             for (let i = 0; i < array.length; i++) {
325
               if (array[i].good_type_id == 0) {
331
               if (array[i].good_type_id == 0) {
326
-                this.$message.error('品类型不能为空')
332
+                this.$message.error('品类型不能为空')
327
                 return
333
                 return
328
               }
334
               }
329
               if (array[i].good_id == 0) {
335
               if (array[i].good_id == 0) {

+ 1 - 1
src/xt_pages/stock/salesReturnOrderDetail.vue View File

31
         >
31
         >
32
           <el-table-column min-width="35" align="center">
32
           <el-table-column min-width="35" align="center">
33
             <template slot="header" slot-scope="scope">
33
             <template slot="header" slot-scope="scope">
34
-              <span>品类型</span>
34
+              <span>品类型</span>
35
             </template>
35
             </template>
36
 
36
 
37
             <template slot-scope="scope">
37
             <template slot-scope="scope">

+ 451 - 0
src/xt_pages/stock/stockDetail.vue View File

1
+<template>
2
+
3
+  <div class="main-contain">
4
+    <div class="position">
5
+      <bread-crumb :crumbs='crumbs'></bread-crumb>
6
+      <el-button size="small" @click="AddNewOrder" class="filter-item" style="float:right;" type="primary"
7
+                 icon="el-icon-circle-plus-outline">新增
8
+      </el-button>
9
+    </div>
10
+
11
+    <div class="app-container">
12
+
13
+
14
+      <div class="cell clearfix" >
15
+        <el-input style="width: 300px;" class="filter-item" v-model="searchKey" placeholder="单据编码/制单人/厂商"/>
16
+        <el-button class="filter-item" type="primary" icon="el-icon-search" @click="search">搜索</el-button>
17
+      </div>
18
+
19
+      <div class="cell clearfix">
20
+        <label class="title"><span class="name">日期查询</span> : </label>
21
+        <el-date-picker v-model="start_time" prefix-icon="el-icon-date" :editable="false" style="width: 196px;"
22
+                        type="date" placeholder="选择日期时间" align="right" format="yyyy-MM-dd"
23
+                        value-format="yyyy-MM-dd" @change="startTimeChange"></el-date-picker>
24
+        <span class="">-</span>
25
+        <el-date-picker v-model="end_time" prefix-icon="el-icon-date" :editable="false" style="width: 196px;"
26
+                        type="date" placeholder="选择日期时间" align="right" format="yyyy-MM-dd"
27
+                        value-format="yyyy-MM-dd" @change="endTimeChange"></el-date-picker>
28
+      </div>
29
+
30
+      <div class="filter-container" style="margin-top: 10px">
31
+        <el-checkbox style="width: 30px" v-model="checked" @change="changeAllSelected">全选</el-checkbox>
32
+        <el-button size="small" icon="el-icon-delete" @click="batchDelete">删除</el-button>
33
+
34
+      </div>
35
+
36
+      <el-row :gutter="12" style="margin-top: 10px">
37
+        <el-table
38
+          :data="cancelStockDate"
39
+          :class="signAndWeighBoxPatients"
40
+          border
41
+          highlight-current-row
42
+          ref="multipleTable"
43
+          @selection-change="select"
44
+          :header-cell-style="{ backgroundColor: 'rgb(245, 247, 250)'}"
45
+
46
+        >
47
+
48
+
49
+
50
+          <el-table-column label="单据编号" align="center">
51
+            <template slot-scope="scope">
52
+              {{scope.row.warehousing_order}}
53
+            </template>
54
+          </el-table-column>
55
+
56
+          <el-table-column label="商品类型" align="center">
57
+            <template slot-scope="scope">
58
+              {{specificationName(scope.row.good_id)}}
59
+            </template>
60
+          </el-table-column>
61
+
62
+
63
+          <el-table-column label="单据类型" align="center">
64
+            <template slot-scope="scope">
65
+              {{getTypeName(scope.row)}}
66
+            </template>
67
+          </el-table-column>
68
+
69
+          <el-table-column label="操作时间" align="center">
70
+            <template slot-scope="scope">
71
+              {{ scope.row.warehousing_time | parseTime('{y}-{m}-{d}')}}
72
+            </template>
73
+          </el-table-column>
74
+          <el-table-column label="制单人" align="center">
75
+            <template slot-scope="scope">
76
+              {{getXuserName(scope.row.creater)}}
77
+
78
+            </template>
79
+          </el-table-column>
80
+          <el-table-column label="单价" align="center">
81
+            <template slot-scope="scope">
82
+              {{scope.row.price}}
83
+            </template>
84
+          </el-table-column>
85
+          <el-table-column label="数量" align="center">
86
+            <template slot-scope="scope">
87
+              {{scope.row.warehousing_count}}
88
+            </template>
89
+          </el-table-column>
90
+          <el-table-column label="总价" align="center">
91
+            <template slot-scope="scope">
92
+              {{scope.row.price *  scope.row.warehousing_count}}
93
+            </template>
94
+          </el-table-column>
95
+
96
+        </el-table>
97
+
98
+        <el-pagination
99
+          @size-change="handleSizeChange"
100
+          @current-change="handleCurrentChange"
101
+          :page-sizes="[7]"
102
+          :page-size="7"
103
+          background
104
+          style="margin-top:20px;float: right"
105
+          layout="total, sizes, prev, pager, next, jumper"
106
+          :total="total">
107
+        </el-pagination>
108
+
109
+      </el-row>
110
+    </div>
111
+  </div>
112
+</template>
113
+
114
+<script>
115
+  import { uParseTime } from '@/utils/tools'
116
+  import { fetchAllAdminUsers, fetchAllDoctorAndNurse } from '@/api/doctor'
117
+  import { deleteCancelStock, GetAllConfig, getStockDetail } from '@/api/stock'
118
+  import BreadCrumb from '../components/bread-crumb'
119
+
120
+  export default {
121
+    name: 'salesReturnOrder',
122
+    components: { BreadCrumb },
123
+    created() {
124
+      var year = new Date().getFullYear()
125
+      var month = new Date().getMonth() + 1
126
+      var day = new Date().getDate()
127
+      if (parseInt(month) < 10) {
128
+        month = '0' + month
129
+      }
130
+      if (parseInt(day) < 10) {
131
+        day = '0' + day
132
+      }
133
+      const endTime = year + '-' + month + '-' + day
134
+      this.end_time = endTime
135
+
136
+      var year = new Date().getFullYear()
137
+      var month = new Date().getMonth()
138
+      var day = new Date().getDate()
139
+      if (parseInt(month) < 10) {
140
+        month = '0' + month
141
+      }
142
+      if (parseInt(day) < 10) {
143
+        day = '0' + day
144
+      }
145
+      const startTime = year + '-' + month + '-' + day
146
+      this.start_time = startTime
147
+      this.GetCancelStock()
148
+      this.GetConfigInfo()
149
+      this.fetchAllAdminUsers()
150
+    },
151
+    data() {
152
+      return {
153
+        crumbs: [
154
+          { path: false, name: '库存管理' },
155
+          { path: '/stock/detail', name: '出入库明细查询' }
156
+        ],
157
+        searchKey:'',
158
+        type: 1,
159
+        page: 1,
160
+        limit: 7,
161
+        checked: false,
162
+        total: 0,
163
+        pageTotal: 0,
164
+        pageSelect: 0,
165
+        adminUserOptions: [],
166
+        multipleSelection: [],
167
+        signAndWeighBoxPatients: 'sign-and-weigh-box-patients',
168
+        start_time: '',
169
+        cancelStockDate: [],
170
+        end_time: '',
171
+        goodType: [],
172
+        goodInfo: [],
173
+        manufacturer: [],
174
+        selectedTableData: [],
175
+        dealer: []
176
+
177
+      }
178
+    },
179
+    methods: {
180
+      getTypeName:function(row){
181
+        let name = ""
182
+        let name2 = ""
183
+        if (row.type == 1){
184
+          name = "耗材"
185
+
186
+        }else if(row.type == 2){
187
+          name = "其他"
188
+        }
189
+        if (row.types == 1){
190
+          name2 = "入库单"
191
+        }else if(row.types == 2){
192
+          name2 = "出库单"
193
+        }else if(row.types == 3){
194
+          name2 = "退货单"
195
+        }else if(row.types == 4){
196
+          name2 = "退库单"
197
+        }
198
+        return name + name2
199
+      },
200
+      specificationName: function(good_info_id) {
201
+        let name = ''
202
+        for (let i = 0; i < this.goodInfo.length; i++) {
203
+          if (this.goodInfo[i].id == good_info_id) {
204
+            name = this.goodInfo[i].specification_name
205
+          }
206
+        }
207
+        return name
208
+      },
209
+      search:function(){
210
+        const Params = {
211
+          page: this.page,
212
+          limit: this.limit,
213
+          start_time: this.start_time,
214
+          end_time: this.end_time,
215
+          type: this.type,
216
+          keywords:this.searchKey,
217
+        }
218
+        this.cancelStockDate = []
219
+        getStockDetail(Params).then(response => {
220
+          if (response.data.state == 0) {
221
+            this.$message.error(response.data.msg)
222
+            return false
223
+          } else {
224
+            this.total = response.data.data.total
225
+            for (let i = 0; i < response.data.data.list.length; i++) {
226
+              this.cancelStockDate.push(response.data.data.list[i])
227
+            }
228
+          }
229
+        })
230
+      },
231
+      AddNewOrder: function() {
232
+        this.$router.push({ name: 'cancelStockOrderAdd', query: { type: this.type }})
233
+      },
234
+      GetCancelStock: function() {
235
+        const Params = {
236
+          page: this.page,
237
+          limit: this.limit,
238
+          start_time: this.start_time,
239
+          end_time: this.end_time,
240
+          type: this.type
241
+        }
242
+        this.cancelStockDate = []
243
+        getStockDetail(Params).then(response => {
244
+          if (response.data.state == 0) {
245
+            this.$message.error(response.data.msg)
246
+            return false
247
+          } else {
248
+            this.total = response.data.data.total
249
+            for (let i = 0; i < response.data.data.list.length; i++) {
250
+              this.cancelStockDate.push(response.data.data.list[i])
251
+            }
252
+          }
253
+        })
254
+      }, getXuserName(id) {
255
+        if (id <= 0) {
256
+          return ''
257
+        }
258
+        var name = ''
259
+        if (this.adminUserOptions == null || typeof (this.adminUserOptions.length) === 'undefined') {
260
+          return name
261
+        }
262
+        var leng = this.adminUserOptions.length
263
+        if (leng == 0) {
264
+          return name
265
+        }
266
+        for (let index = 0; index < leng; index++) {
267
+          if (this.adminUserOptions[index].id == id) {
268
+            name = this.adminUserOptions[index].name
269
+            break
270
+          }
271
+        }
272
+        return name
273
+      }, fetchAllAdminUsers() {
274
+        fetchAllAdminUsers().then(response => {
275
+          console.log(response)
276
+          if (response.data.state == 1) {
277
+            this.adminUserOptions = response.data.data.users
278
+            var alen = this.adminUserOptions.length
279
+            for (let index = 0; index < alen; index++) {
280
+              if (this.adminUserOptions[index].user_type == 2) {
281
+                // this.doctorOptions.push(this.adminUserOptions[index]);
282
+              }
283
+            }
284
+          }
285
+        })
286
+      }, handleSelectionChange: function(val) {
287
+        this.multipleSelection = val
288
+      }, handleSizeChange(val) {
289
+        this.limit = val
290
+        this.GetWarehouse()
291
+      }, handleCurrentChange(val) {
292
+        this.page = val
293
+        this.GetWarehouse()
294
+      }, startTimeChange(val) {
295
+        this.GetWarehouse()
296
+      }, endTimeChange(val) {
297
+        this.GetWarehouse()
298
+      }, calculate: function(val) {
299
+        return Math.round(parseFloat(val) * 100) / 100
300
+      }, GetConfigInfo: function() {
301
+        GetAllConfig().then(response => {
302
+          if (response.data.state == 0) {
303
+            this.$message.error(response.data.msg)
304
+            return false
305
+          } else {
306
+            this.manufacturer = response.data.data.manufacturer
307
+            this.dealer = response.data.data.dealer
308
+            this.goodInfo = response.data.data.goodInfo
309
+
310
+          }
311
+        })
312
+      }, getManufactuerName: function(manufacturer_id) {
313
+        for (let i = 0; i < this.manufacturer.length; i++) {
314
+          if (this.manufacturer[i].id == manufacturer_id) {
315
+            return this.manufacturer[i].manufacturer_name
316
+          }
317
+        }
318
+      }, getDealerName: function(dealer_id) {
319
+        for (let i = 0; i < this.dealer.length; i++) {
320
+          if (this.dealer[i].id == dealer_id) {
321
+            return this.dealer[i].dealer_name
322
+          }
323
+        }
324
+      }, handleEdit: function(index, row) {
325
+        this.$router.push({ name: 'cancelStockDetail', query: { id: row.id,type: this.type }})
326
+      }, handleDelete: function(index, row) {
327
+        const ids = []
328
+        ids.push(row.id)
329
+        const idStr = ids.join(',')
330
+
331
+        const params = {
332
+          ids: idStr
333
+        }
334
+
335
+        this.$confirm('确认删除出库退库单记录?', '删除出库退库单记录', {
336
+          confirmButtonText: '确定',
337
+          cancelButtonText: '取消',
338
+          type: 'warning'
339
+        }).then(() => {
340
+          deleteCancelStock(params).then(response => {
341
+            if (response.data.state == 0) {
342
+              this.$message.error(response.data.msg)
343
+              return false
344
+            } else {
345
+              this.$notify({
346
+                title: '成功',
347
+                message: '删除成功',
348
+                type: 'success',
349
+                duration: 2000
350
+              })
351
+              for (let i = 0; i < ids.length; i++) {
352
+                for (let y = 0; y < this.cancelStockDate.length; y++) {
353
+                  if (ids[i] == this.cancelStockDate[y].id) {
354
+                    this.cancelStockDate.splice(y, 1)
355
+                  }
356
+                }
357
+              }
358
+            }
359
+          })
360
+        }).catch(() => {
361
+        })
362
+      }, changeAllSelected: function(val) {
363
+        if (val) {
364
+          this.$refs.multipleTable.toggleAllSelection()
365
+        } else {
366
+          this.$refs.multipleTable.clearSelection()
367
+        }
368
+      }, select(selection) {
369
+        this.selectedTableData = selection
370
+      }, batchDelete() {
371
+        if (this.selectedTableData.length <= 0) {
372
+          this.$message.error('请选择要删除的记录')
373
+          return
374
+        }
375
+        const ids = []
376
+        for (let i = 0; i < this.selectedTableData.length; i++) {
377
+          ids.push(this.selectedTableData[i].id)
378
+        }
379
+        const idStr = ids.join(',')
380
+        const params = {
381
+          ids: idStr
382
+        }
383
+        this.$confirm('确认删除出库退库单记录?', '删除出库退库单记录', {
384
+          confirmButtonText: '确定',
385
+          cancelButtonText: '取消',
386
+          type: 'warning'
387
+        }).then(() => {
388
+          deleteCancelStock(params).then(response => {
389
+            if (response.data.state == 0) {
390
+              this.$message.error(response.data.msg)
391
+              return false
392
+            } else {
393
+              this.$notify({
394
+                title: '成功',
395
+                message: '删除成功',
396
+                type: 'success',
397
+                duration: 2000
398
+              })
399
+
400
+              for (let i = 0; i < ids.length; i++) {
401
+                for (let y = 0; y < this.cancelStockDate.length; y++) {
402
+                  if (ids[i] == this.cancelStockDate[y].id) {
403
+                    this.cancelStockDate.splice(y, 1)
404
+                  }
405
+                }
406
+              }
407
+            }
408
+          })
409
+        }).catch(() => {
410
+        })
411
+      }
412
+    }
413
+  }
414
+</script>
415
+
416
+<style rel="stylesheet/css" lang="scss" scoped>
417
+  .information {
418
+    border: 1px #dcdfe6 solid;
419
+    padding: 30px 20px 30px 20px;
420
+
421
+  .border {
422
+    border-bottom: 1px #dcdfe6 solid;
423
+    margin: 0px 0 20px 0;
424
+  }
425
+
426
+  }
427
+
428
+
429
+  .edit_separater {
430
+    border-top: 1px solid rgb(233, 233, 233);
431
+    margin-top: 15px;
432
+    margin-bottom: 15px;
433
+  }
434
+
435
+</style>
436
+
437
+<style>
438
+  .sign-and-weigh-box .sign-and-weigh-box-patients .cell {
439
+    font-size: 12px;
440
+  }
441
+
442
+  .sign-and-weigh-box .sign-and-weigh-box-patients .current-row > td {
443
+    background: #6fb5fa;
444
+  }
445
+
446
+  .count {
447
+    color: #bd2c00;
448
+
449
+  }
450
+
451
+</style>

+ 64 - 0
src/xt_pages/stock/stockDetailIndex.vue View File

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">
7
+      <div class="service-box">
8
+        <el-tabs v-model="activeName">
9
+          <el-tab-pane label="入库明细" name="first">
10
+            <stock-in-detail></stock-in-detail>
11
+          </el-tab-pane>
12
+          <el-tab-pane label="退货明细">
13
+            <sales-return-detail></sales-return-detail>
14
+
15
+          </el-tab-pane>
16
+          <el-tab-pane label="出库明细">
17
+            <stock-out-detail></stock-out-detail>
18
+
19
+          </el-tab-pane>
20
+          <el-tab-pane label="退库明细">
21
+           <cancel-stock-detail></cancel-stock-detail>
22
+          </el-tab-pane>
23
+
24
+        </el-tabs>
25
+      </div>
26
+    </div>
27
+  </div>
28
+</template>
29
+
30
+<script>
31
+
32
+  import BreadCrumb from '@/xt_pages/components/bread-crumb'
33
+  import StockInDetail from './detail/stockInDetail'
34
+  import StockOutDetail from './detail/stockOutDetail'
35
+  import SalesReturnDetail from './detail/salesReturnDetail'
36
+  import CancelStockDetail from './detail/cancelStockDetail'
37
+
38
+  export default {
39
+    name: 'stockDetailIndex',
40
+    components: {
41
+      CancelStockDetail,
42
+      SalesReturnDetail,
43
+      StockOutDetail,
44
+      StockInDetail,
45
+      BreadCrumb
46
+    },
47
+    data() {
48
+      return {
49
+        crumbs: [
50
+          { path: false, name: '库存管理' },
51
+          { path: '/stock/detail', name: '出入库明细查询' }
52
+        ],
53
+        activeName: 'first'
54
+      }
55
+    },
56
+    methods: {
57
+      handleClick(tab, event) {
58
+        console.log(tab, event, this.activeName)
59
+      }
60
+    }
61
+  }
62
+</script>
63
+
64
+

+ 29 - 2
src/xt_pages/stock/stockInOrder.vue View File

9
 
9
 
10
     <div class="app-container">
10
     <div class="app-container">
11
     <div class="cell clearfix">
11
     <div class="cell clearfix">
12
-      <el-input   style="width: 400px;" v-model="searchKey" class="filter-item"  placeholder="单据日期/单据编码/制单人/供应商" />
12
+      <el-input   style="width: 400px;" v-model="searchKey" class="filter-item"  placeholder="单据编码/制单人/厂商" />
13
       <el-button  class="filter-item" type="primary" icon="el-icon-search" @click="search" >搜索</el-button>
13
       <el-button  class="filter-item" type="primary" icon="el-icon-search" @click="search" >搜索</el-button>
14
     </div>
14
     </div>
15
 
15
 
162
     },
162
     },
163
     data() {
163
     data() {
164
       return {
164
       return {
165
+
165
         crumbs: [
166
         crumbs: [
166
           { path: false, name: '库存管理' },
167
           { path: false, name: '库存管理' },
167
           { path: '/stock/in', name: '入库单' }
168
           { path: '/stock/in', name: '入库单' }
168
         ],
169
         ],
170
+        searchKey:'',
169
         type: 1,
171
         type: 1,
170
         page: 1,
172
         page: 1,
171
         limit: 7,
173
         limit: 7,
196
       }
198
       }
197
     },
199
     },
198
     methods: {
200
     methods: {
201
+      search:function(){
202
+        const Params = {
203
+          page: this.page,
204
+          limit: this.limit,
205
+          start_time: this.start_time,
206
+          end_time: this.end_time,
207
+          type: this.type,
208
+          keywords:this.searchKey,
209
+        }
210
+        this.Warehouse.warehouseDate = []
211
+        getWarehouseList(Params).then(response => {
212
+          if (response.data.state == 0) {
213
+            this.Warehouse.loading = false
214
+            this.$message.error(response.data.msg)
215
+            return false
216
+          } else {
217
+            this.Warehouse.loading = false
218
+            this.total = response.data.data.total
219
+            for (let i = 0; i < response.data.data.list.length; i++) {
220
+              this.Warehouse.warehouseDate.push(response.data.data.list[i])
221
+            }
222
+          }
223
+        })
224
+
225
+      },
199
       GetWarehouse: function() {
226
       GetWarehouse: function() {
200
         const Params = {
227
         const Params = {
201
           page: this.page,
228
           page: this.page,
326
       }, handleReturnSales: function() {
353
       }, handleReturnSales: function() {
327
         // this.$router.push({path:'/patients/create'}
354
         // this.$router.push({path:'/patients/create'}
328
         if (this.multipleSelection.length <= 0) {
355
         if (this.multipleSelection.length <= 0) {
329
-          this.$message.error('请选择退货品')
356
+          this.$message.error('请选择退货品')
330
           return
357
           return
331
         }
358
         }
332
 
359
 

+ 9 - 4
src/xt_pages/stock/stockInOrderAdd.vue View File

54
                 <el-table-column  align="center" width="200">
54
                 <el-table-column  align="center" width="200">
55
 
55
 
56
                   <template slot="header" slot-scope="scope">
56
                   <template slot="header" slot-scope="scope">
57
-                    <span>品类型<span style="color: red">*</span></span>
57
+                    <span>品类型<span style="color: red">*</span></span>
58
                   </template>
58
                   </template>
59
 
59
 
60
                   <template slot-scope="scope">
60
                   <template slot-scope="scope">
61
                     <el-form-item style="padding-top: 15px">
61
                     <el-form-item style="padding-top: 15px">
62
-                      <el-input placeholder="请输入品类型" v-model="scope.row.good_type_id"
62
+                      <el-input placeholder="请输入品类型" v-model="scope.row.good_type_id"
63
                                 :value="typeName(scope.row.good_type_id)"
63
                                 :value="typeName(scope.row.good_type_id)"
64
                                 @focus="showDialog(scope.$index, scope.row)"></el-input>
64
                                 @focus="showDialog(scope.$index, scope.row)"></el-input>
65
                     </el-form-item>
65
                     </el-form-item>
428
         tempObj['manufacturer'] = ''
428
         tempObj['manufacturer'] = ''
429
         this.recordInfo.recordData.push(tempObj)
429
         this.recordInfo.recordData.push(tempObj)
430
       }, handleDelete: function(index, row) {
430
       }, handleDelete: function(index, row) {
431
-        this.recordInfo.recordData.splice(index, 1)
431
+        if( this.recordInfo.recordData.length <= 1){
432
+          this.$message.error('只有一条记录的时候无法删除')
433
+          return
434
+        }else{
435
+          this.recordInfo.recordData.splice(index, 1)
436
+        }
432
       }, calculate: function(val) {
437
       }, calculate: function(val) {
433
         if (val == 0) {
438
         if (val == 0) {
434
           return ''
439
           return ''
521
             const array = this.recordInfo.recordData
526
             const array = this.recordInfo.recordData
522
             for (let i = 0; i < array.length; i++) {
527
             for (let i = 0; i < array.length; i++) {
523
               if (array[i].good_type_id == 0) {
528
               if (array[i].good_type_id == 0) {
524
-                this.$message.error('品类型不能为空')
529
+                this.$message.error('品类型不能为空')
525
                 return
530
                 return
526
               }
531
               }
527
               if (array[i].good_id == 0) {
532
               if (array[i].good_id == 0) {

+ 2 - 2
src/xt_pages/stock/stockInOrderDetail.vue View File

5
     </div>
5
     </div>
6
   <div class="app-container">
6
   <div class="app-container">
7
     <div class="filter-container">
7
     <div class="filter-container">
8
-      <span style="font-size: 18px">耗材入库单详情</span>
8
+      <span style="font-size: 18px">入库单详情</span>
9
       <el-row style="float:right;">
9
       <el-row style="float:right;">
10
         <span>入库单号: {{WarehouseInfo.warehouse.warehousing_order}}</span>
10
         <span>入库单号: {{WarehouseInfo.warehouse.warehousing_order}}</span>
11
       </el-row>
11
       </el-row>
28
       >
28
       >
29
         <el-table-column min-width="35" align="center">
29
         <el-table-column min-width="35" align="center">
30
           <template slot="header" slot-scope="scope">
30
           <template slot="header" slot-scope="scope">
31
-            <span>品类型</span>
31
+            <span>品类型</span>
32
           </template>
32
           </template>
33
 
33
 
34
           <template slot-scope="scope">
34
           <template slot-scope="scope">

+ 22 - 5
src/xt_pages/stock/stockInOrderEdit.vue View File

31
             <el-table-column  align="center" width="200" >
31
             <el-table-column  align="center" width="200" >
32
 
32
 
33
               <template slot="header" slot-scope="scope">
33
               <template slot="header" slot-scope="scope">
34
-                <span>品类型<span style="color: red">*</span></span>
34
+                <span>品类型<span style="color: red">*</span></span>
35
               </template>
35
               </template>
36
 
36
 
37
               <template slot-scope="scope">
37
               <template slot-scope="scope">
38
                 <el-form-item style="padding-top: 15px">
38
                 <el-form-item style="padding-top: 15px">
39
-                  <el-input placeholder="请输入品类型" v-model="scope.row.good_type_id"
39
+                  <el-input placeholder="请输入品类型" v-model="scope.row.good_type_id"
40
                             :value="typeName(scope.row.good_type_id)"
40
                             :value="typeName(scope.row.good_type_id)"
41
                             @focus="showDialog(scope.$index, scope.row)"></el-input>
41
                             @focus="showDialog(scope.$index, scope.row)"></el-input>
42
                 </el-form-item>
42
                 </el-form-item>
131
               </template>
131
               </template>
132
             </el-table-column>
132
             </el-table-column>
133
 
133
 
134
-            <el-table-column label="操作" align="center" width="150">
134
+            <el-table-column label="操作" fixed="right" align="center" width="150">
135
               <template slot-scope="scope">
135
               <template slot-scope="scope">
136
                 <el-tooltip class="item" effect="dark" content="新增" placement="top">
136
                 <el-tooltip class="item" effect="dark" content="新增" placement="top">
137
 
137
 
257
       }
257
       }
258
   },
258
   },
259
     methods: {
259
     methods: {
260
+
260
       comfirm: function(val) {
261
       comfirm: function(val) {
261
         this.isVisibility = false
262
         this.isVisibility = false
262
         if (val.selectedGoodInfo.length > 0) {
263
         if (val.selectedGoodInfo.length > 0) {
334
           const params = {
335
           const params = {
335
             id: row.id
336
             id: row.id
336
           }
337
           }
337
-          this.$confirm('确认删除该入库物品信息记录?', '删除入库物品信息记录', {
338
+          this.$confirm('确认删除该入库商品信息记录?', '删除入库商品信息记录', {
338
             confirmButtonText: '确定',
339
             confirmButtonText: '确定',
339
             cancelButtonText: '取消',
340
             cancelButtonText: '取消',
340
             type: 'warning'
341
             type: 'warning'
407
             const array = this.recordInfo.recordData
408
             const array = this.recordInfo.recordData
408
             for (let i = 0; i < array.length; i++) {
409
             for (let i = 0; i < array.length; i++) {
409
               if (array[i].good_type_id == 0) {
410
               if (array[i].good_type_id == 0) {
410
-                this.$message.error('品类型不能为空')
411
+                this.$message.error('品类型不能为空')
411
                 return
412
                 return
412
               }
413
               }
413
               if (array[i].good_id == 0) {
414
               if (array[i].good_id == 0) {
459
             this.form.manufacturer = this.warehouse.manufacturer
460
             this.form.manufacturer = this.warehouse.manufacturer
460
             this.form.dealer = this.warehouse.dealer
461
             this.form.dealer = this.warehouse.dealer
461
             this.warehousing_time = this.getTime(this.warehouse.warehousing_time, '{y}-{m}-{d}')
462
             this.warehousing_time = this.getTime(this.warehouse.warehousing_time, '{y}-{m}-{d}')
463
+
464
+            if(this.recordInfo.recordData.length == 0){
465
+              const tempObj = {}
466
+              tempObj['id'] = 0
467
+              tempObj['good_type_id'] = 0
468
+              tempObj['good_id'] = 0
469
+              tempObj['number'] = ''
470
+              tempObj['product_date'] = ''
471
+              tempObj['expiry_date'] = ''
472
+              tempObj['warehousing_count'] = ''
473
+              tempObj['price'] = ''
474
+              tempObj['remark'] = ''
475
+              tempObj['dealer'] = ''
476
+              tempObj['manufacturer'] = ''
477
+              this.recordInfo.recordData.push(tempObj)
478
+            }
462
           }
479
           }
463
         })
480
         })
464
       }
481
       }

+ 29 - 5
src/xt_pages/stock/stockOutOrder.vue View File

7
     </div>
7
     </div>
8
     <div class="app-container">
8
     <div class="app-container">
9
       <div class="cell clearfix">
9
       <div class="cell clearfix">
10
-        <el-input style="width: 400px;" class="filter-item" placeholder="单据日期/单据编码/制单人/供应商"/>
10
+        <el-input style="width: 400px;" class="filter-item" v-model="searchKey" placeholder="单据编码/制单人/厂商"/>
11
         <el-button class="filter-item" type="primary" icon="el-icon-search" @click="search">搜索</el-button>
11
         <el-button class="filter-item" type="primary" icon="el-icon-search" @click="search">搜索</el-button>
12
       </div>
12
       </div>
13
 
13
 
160
   },
160
   },
161
   data() {
161
   data() {
162
     return {
162
     return {
163
+      searchKey:"",
163
       crumbs: [
164
       crumbs: [
164
         { path: false, name: "库存管理" },
165
         { path: false, name: "库存管理" },
165
         { path: "/stock/out", name: "出库单" }
166
         { path: "/stock/out", name: "出库单" }
185
     };
186
     };
186
   },
187
   },
187
   methods: {
188
   methods: {
189
+    search:function(){
190
+      const Params = {
191
+        page: this.page,
192
+        limit: this.limit,
193
+        start_time: this.start_time,
194
+        end_time: this.end_time,
195
+        type: this.type,
196
+        keywords:this.searchKey,
197
+      }
198
+      this.warehouseOutDate = [];
199
+      getWarehouseOutList(Params).then(response => {
200
+        if (response.data.state == 0) {
201
+          this.$message.error(response.data.msg);
202
+          return false;
203
+        } else {
204
+          this.total = response.data.data.total;
205
+          for (let i = 0; i < response.data.data.list.length; i++) {
206
+            this.warehouseOutDate.push(response.data.data.list[i]);
207
+          }
208
+        }
209
+      });
210
+
211
+    },
188
     AddNewOrder: function() {
212
     AddNewOrder: function() {
189
       this.$router.push({
213
       this.$router.push({
190
         name: "stockOutOrderAdd",
214
         name: "stockOutOrderAdd",
254
     },
278
     },
255
     handleSizeChange(val) {
279
     handleSizeChange(val) {
256
       this.limit = val;
280
       this.limit = val;
257
-      this.GetWarehouse();
281
+      this.GetWarehouseOut();
258
     },
282
     },
259
     handleCurrentChange(val) {
283
     handleCurrentChange(val) {
260
       this.page = val;
284
       this.page = val;
261
-      this.GetWarehouse();
285
+      this.GetWarehouseOut();
262
     },
286
     },
263
     startTimeChange(val) {
287
     startTimeChange(val) {
264
-      this.GetWarehouse();
288
+      this.GetWarehouseOut();
265
     },
289
     },
266
     endTimeChange(val) {
290
     endTimeChange(val) {
267
-      this.GetWarehouse();
291
+      this.GetWarehouseOut();
268
     },
292
     },
269
     calculate: function(val) {
293
     calculate: function(val) {
270
       return Math.round(parseFloat(val) * 100) / 100;
294
       return Math.round(parseFloat(val) * 100) / 100;

+ 9 - 4
src/xt_pages/stock/stockOutOrderAdd.vue View File

57
             <el-table-column min-width="35" align="center">
57
             <el-table-column min-width="35" align="center">
58
 
58
 
59
               <template slot="header" slot-scope="scope">
59
               <template slot="header" slot-scope="scope">
60
-                <span>品类型<span style="color: red">*</span></span>
60
+                <span>品类型<span style="color: red">*</span></span>
61
               </template>
61
               </template>
62
 
62
 
63
               <template slot-scope="scope" >
63
               <template slot-scope="scope" >
65
                 <!--<span @click="showDialog(scope.$index, scope.row)" v-if="scope.row.good_type_id != 0">{{typeName(scope.row.good_type_id)}}</span>-->
65
                 <!--<span @click="showDialog(scope.$index, scope.row)" v-if="scope.row.good_type_id != 0">{{typeName(scope.row.good_type_id)}}</span>-->
66
 
66
 
67
                 <el-form-item  style="padding-top: 15px">
67
                 <el-form-item  style="padding-top: 15px">
68
-                  <el-input placeholder="请输入品类型"  v-model="scope.row.good_type_id" :value="typeName(scope.row.good_type_id)" @focus="showDialog(scope.$index, scope.row)" ></el-input>
68
+                  <el-input placeholder="请输入品类型"  v-model="scope.row.good_type_id" :value="typeName(scope.row.good_type_id)" @focus="showDialog(scope.$index, scope.row)" ></el-input>
69
                 </el-form-item>
69
                 </el-form-item>
70
 
70
 
71
               </template>
71
               </template>
300
 
300
 
301
         this.recordInfo.recordData.push(tempObj)
301
         this.recordInfo.recordData.push(tempObj)
302
       }, handleDelete: function(index, row) {
302
       }, handleDelete: function(index, row) {
303
-        this.recordInfo.recordData.splice(index, 1)
303
+        if( this.recordInfo.recordData.length <= 1){
304
+          this.$message.error('只有一条记录的时候无法删除')
305
+          return
306
+        }else{
307
+          this.recordInfo.recordData.splice(index, 1)
308
+        }
304
       }, calculate: function(val) {
309
       }, calculate: function(val) {
305
         if (isNaN(val)) {
310
         if (isNaN(val)) {
306
           return ''
311
           return ''
347
             let total = 0
352
             let total = 0
348
             for (let i = 0; i < array.length; i++) {
353
             for (let i = 0; i < array.length; i++) {
349
               if (array[i].good_type_id == 0) {
354
               if (array[i].good_type_id == 0) {
350
-                this.$message.error('品类型不能为空')
355
+                this.$message.error('品类型不能为空')
351
                 return
356
                 return
352
               }
357
               }
353
               if (array[i].good_id == 0) {
358
               if (array[i].good_id == 0) {

+ 1 - 1
src/xt_pages/stock/stockOutOrderDetail.vue View File

31
         >
31
         >
32
           <el-table-column min-width="35" align="center">
32
           <el-table-column min-width="35" align="center">
33
             <template slot="header" slot-scope="scope">
33
             <template slot="header" slot-scope="scope">
34
-              <span>品类型</span>
34
+              <span>品类型</span>
35
             </template>
35
             </template>
36
 
36
 
37
             <template slot-scope="scope">
37
             <template slot-scope="scope">

+ 17 - 4
src/xt_pages/stock/stockOutOrderEdit.vue View File

30
             <el-table-column min-width="35" align="center">
30
             <el-table-column min-width="35" align="center">
31
 
31
 
32
               <template slot="header" slot-scope="scope">
32
               <template slot="header" slot-scope="scope">
33
-                <span>品类型<span style="color: red">*</span></span>
33
+                <span>品类型<span style="color: red">*</span></span>
34
               </template>
34
               </template>
35
 
35
 
36
               <template slot-scope="scope">
36
               <template slot-scope="scope">
37
                 <el-form-item style="padding-top: 15px">
37
                 <el-form-item style="padding-top: 15px">
38
-                  <el-input placeholder="请输入品类型" v-model="scope.row.good_type_id"
38
+                  <el-input placeholder="请输入品类型" v-model="scope.row.good_type_id"
39
                             :value="typeName(scope.row.good_type_id)"
39
                             :value="typeName(scope.row.good_type_id)"
40
                             @focus="showDialog(scope.$index, scope.row)"></el-input>
40
                             @focus="showDialog(scope.$index, scope.row)"></el-input>
41
                 </el-form-item>
41
                 </el-form-item>
274
           const params = {
274
           const params = {
275
             id: row.id
275
             id: row.id
276
           }
276
           }
277
-          this.$confirm('确认删除该退货物品信息记录?', '删除退货物品信息记录', {
277
+          this.$confirm('确认删除该退货商品信息记录?', '删除退货商品信息记录', {
278
             confirmButtonText: '确定',
278
             confirmButtonText: '确定',
279
             cancelButtonText: '取消',
279
             cancelButtonText: '取消',
280
             type: 'warning'
280
             type: 'warning'
325
             const array = this.recordInfo.recordData
325
             const array = this.recordInfo.recordData
326
             for (let i = 0; i < array.length; i++) {
326
             for (let i = 0; i < array.length; i++) {
327
               if (array[i].good_type_id == 0) {
327
               if (array[i].good_type_id == 0) {
328
-                this.$message.error('品类型不能为空')
328
+                this.$message.error('品类型不能为空')
329
                 return
329
                 return
330
               }
330
               }
331
               if (array[i].good_id == 0) {
331
               if (array[i].good_id == 0) {
372
             this.warehouseOut = response.data.data.info
372
             this.warehouseOut = response.data.data.info
373
             this.warehouse_out_time = this.getTime(this.warehouseOut.warehouse_out_time, '{y}-{m}-{d}')
373
             this.warehouse_out_time = this.getTime(this.warehouseOut.warehouse_out_time, '{y}-{m}-{d}')
374
           }
374
           }
375
+
376
+          if( this.recordInfo.recordData.length == 0){
377
+            const tempObj = {}
378
+            tempObj['id'] = 0
379
+            tempObj['good_type_id'] = 0
380
+            tempObj['good_id'] = 0
381
+            tempObj['count'] = ''
382
+            tempObj['price'] = ''
383
+            tempObj['remark'] = ''
384
+            this.recordInfo.recordData.push(tempObj)
385
+          }
386
+
387
+
375
         })
388
         })
376
       }, calculate: function(val) {
389
       }, calculate: function(val) {
377
         if (val == 0) {
390
         if (val == 0) {

+ 1 - 1
src/xt_pages/stock/stockQuery.vue View File

9
                 v-loading="WarehouseInfo.loading"
9
                 v-loading="WarehouseInfo.loading"
10
       >
10
       >
11
 
11
 
12
-        <el-table-column label="品编码" align="center">
12
+        <el-table-column label="品编码" align="center">
13
           <template slot-scope="scope">
13
           <template slot-scope="scope">
14
             {{scope.row.good_code}}
14
             {{scope.row.good_code}}
15
           </template>
15
           </template>

+ 4 - 0
src/xt_pages/user/components/PatientForm.vue View File

60
               <el-col :span="8" >
60
               <el-col :span="8" >
61
                 <el-form-item label="透析号 : " class="is-required" prop="dialysisNo" >
61
                 <el-form-item label="透析号 : " class="is-required" prop="dialysisNo" >
62
                     <el-input v-model="form.dialysisNo" placeholder="填写或自动生成" style="width:62%;float:left;margin-right: 2%;" ></el-input> 
62
                     <el-input v-model="form.dialysisNo" placeholder="填写或自动生成" style="width:62%;float:left;margin-right: 2%;" ></el-input> 
63
+<<<<<<< .mine
64
+                    <el-button style="width:36%;padding:10px 0;" :disabled="$store.getters.xt_user.subscibe.state==3||!subscibeFlag?true:false" type="primary" @click="generatedialysisno">自动生成</el-button>   
65
+=======
63
                     <el-button style="width:36%;padding:10px 0;" :disabled="$store.getters.xt_user.subscibe.state==3||!subscibeFlag?true:false" type="primary" @click="generatedialysisno">自动生成</el-button>
66
                     <el-button style="width:36%;padding:10px 0;" :disabled="$store.getters.xt_user.subscibe.state==3||!subscibeFlag?true:false" type="primary" @click="generatedialysisno">自动生成</el-button>
67
+>>>>>>> .theirs
64
                 </el-form-item>
68
                 </el-form-item>
65
               </el-col>
69
               </el-col>
66
             </template>
70
             </template>

+ 121 - 112
src/xt_pages/workforce/template.vue View File

1
 <template>
1
 <template>
2
-<div class="main-contain">
2
+  <div class="main-contain">
3
     <div class="position">
3
     <div class="position">
4
-        <bread-crumb></bread-crumb>
5
-        <!-- <el-col :span="3" style="text-align: right;"> -->
6
-        <el-button size="small" icon="el-icon-setting" type="primary" @click="setScheduleTemplateAction">设置模板</el-button>
7
-        <!-- </el-col> -->
4
+      <bread-crumb :crumbs="crumbs"></bread-crumb>
5
+
6
+      <!-- <el-col :span="3" style="text-align: right;"> -->
7
+      <el-button size="small" icon="el-icon-setting" type="primary" @click="setScheduleTemplateAction">设置模板</el-button>
8
+      <!-- </el-col> -->
8
     </div>
9
     </div>
9
     <div class="app-container">
10
     <div class="app-container">
10
-        <!-- <el-row>
11
-            <el-col :span="21"> -->
12
-                <el-tabs v-model="activeName" tab-position="top" >
13
-                    <el-tab-pane name="schedules">
14
-                        <span slot="label"> 排班信息 </span>
15
-                        <template-table :editable="false" :device_numbers="device_numbers" :template="this_week_schedules" :patients="patients"></template-table>
16
-                    </el-tab-pane>
17
-                    <el-tab-pane name="first" :disabled="template_mode.mode == 0">
18
-                        <span slot="label"> 第一周 </span>
19
-                        <template-table :editable="true" :device_numbers="device_numbers" :template="first_template" :patients="patients"></template-table>
20
-                    </el-tab-pane>
21
-                    <el-tab-pane name="second" :disabled="template_mode.mode != 2">
22
-                        <span slot="label"> 第二周 </span>
23
-                        <template-table :editable="true" :device_numbers="device_numbers" :template="second_template" :patients="patients"></template-table>
24
-                    </el-tab-pane>
25
-                </el-tabs>
26
-            <!-- </el-col> -->
27
-            
28
-        <!-- </el-row> -->
11
+      <!-- <el-row>
12
+          <el-col :span="21"> -->
13
+      <el-tabs v-model="activeName" tab-position="top">
14
+        <el-tab-pane name="schedules">
15
+          <span slot="label"> 排班信息 </span>
16
+          <template-table :editable="false" :device_numbers="device_numbers" :template="this_week_schedules"
17
+                          :patients="patients"></template-table>
18
+        </el-tab-pane>
19
+        <el-tab-pane name="first" :disabled="template_mode.mode == 0">
20
+          <span slot="label"> 第一周 </span>
21
+          <template-table :editable="true" :device_numbers="device_numbers" :template="first_template"
22
+                          :patients="patients"></template-table>
23
+        </el-tab-pane>
24
+        <el-tab-pane name="second" :disabled="template_mode.mode != 2">
25
+          <span slot="label"> 第二周 </span>
26
+          <template-table :editable="true" :device_numbers="device_numbers" :template="second_template"
27
+                          :patients="patients"></template-table>
28
+        </el-tab-pane>
29
+      </el-tabs>
30
+      <!-- </el-col> -->
31
+
32
+      <!-- </el-row> -->
29
 
33
 
30
-        <set-up-template-dialog ref="setup_dialog" :template_mode="template_mode" :origin_mode="origin_mode" @chenge_mode="didChangeTemplateMode"></set-up-template-dialog>
34
+      <set-up-template-dialog ref="setup_dialog" :template_mode="template_mode" :origin_mode="origin_mode"
35
+                              @chenge_mode="didChangeTemplateMode"></set-up-template-dialog>
31
     </div>
36
     </div>
32
- </div>
37
+  </div>
33
 </template>
38
 </template>
34
 
39
 
35
 <script>
40
 <script>
36
-import SetUpTemplateDialog from "./components/setup_template_dialog"
37
-import TemplateTable from "./components/template_table"
38
-import { getTemplateInitData } from "@/api/schedule_template/patient"
39
-import BreadCrumb from "@/xt_pages/components/bread-crumb";
41
+  import SetUpTemplateDialog from './components/setup_template_dialog'
42
+  import TemplateTable from './components/template_table'
43
+  import { getTemplateInitData } from '@/api/schedule_template/patient'
44
+  import BreadCrumb from '@/xt_pages/components/bread-crumb'
40
 
45
 
41
-export default {
42
-    name: "WorkforceTemplate",
46
+  export default {
47
+    name: 'WorkforceTemplate',
43
     components: {
48
     components: {
44
-        SetUpTemplateDialog,
45
-        TemplateTable,
46
-        BreadCrumb
49
+      SetUpTemplateDialog,
50
+      TemplateTable,
51
+      BreadCrumb
47
     },
52
     },
48
     data: function() {
53
     data: function() {
49
-        return {
50
-            activeName: "schedules",
51
-            template_mode: {
52
-                id: 0,
53
-                mode: 0,
54
-            },
55
-            origin_mode: 0,
56
-            device_numbers: [],
57
-            patients: [],
54
+      return {
55
+        crumbs: [
56
+          { path: false, name: '排班管理' },
57
+          { path: 'workforce/template', name: '排班模版' }
58
+        ],
59
+        activeName: 'schedules',
60
+        template_mode: {
61
+          id: 0,
62
+          mode: 0
63
+        },
64
+        origin_mode: 0,
65
+        device_numbers: [],
66
+        patients: [],
58
 
67
 
59
-            first_template: {
60
-                items: [],
61
-            },
62
-            second_template: {
63
-                items: [],
64
-            },
65
-            this_week_schedules: {
66
-                id: 0,
67
-                items: [],
68
-            }
68
+        first_template: {
69
+          items: []
70
+        },
71
+        second_template: {
72
+          items: []
73
+        },
74
+        this_week_schedules: {
75
+          id: 0,
76
+          items: []
69
         }
77
         }
78
+      }
70
     },
79
     },
71
     created() {
80
     created() {
72
-        getTemplateInitData().then(rs => {
73
-            var resp = rs.data
74
-            if (resp.state == 1) {
75
-                var mode = resp.data.template_mode
76
-                var device_numbers = resp.data.device_numbers
77
-                var templates = resp.data.templates
78
-                var patients = resp.data.patients
79
-                var schedules = resp.data.schedules
81
+      getTemplateInitData().then(rs => {
82
+        var resp = rs.data
83
+        if (resp.state == 1) {
84
+          var mode = resp.data.template_mode
85
+          var device_numbers = resp.data.device_numbers
86
+          var templates = resp.data.templates
87
+          var patients = resp.data.patients
88
+          var schedules = resp.data.schedules
80
 
89
 
81
-                this.template_mode = mode
82
-                this.origin_mode = mode.mode
83
-                this.device_numbers = device_numbers,
84
-                this.patients = patients
90
+          this.template_mode = mode
91
+          this.origin_mode = mode.mode
92
+          this.device_numbers = device_numbers,
93
+            this.patients = patients
85
 
94
 
86
-                this.first_template = templates[0]
87
-                this.second_template = templates[1]
95
+          this.first_template = templates[0]
96
+          this.second_template = templates[1]
88
 
97
 
89
-                var fakeTemplateItems = []
90
-                for (let index = 0; index < schedules.length; index++) {
91
-                    const schedule = schedules[index];
92
-                    var item = {}
93
-                    this.$set(item, "id", schedule.id)
94
-                    this.$set(item, "template_id", 0)
95
-                    this.$set(item, "device_number_id", schedule.bed_id)
96
-                    this.$set(item, "treat_mode", schedule.mode_id)
97
-                    this.$set(item, "weekday", schedule.schedule_week)
98
-                    this.$set(item, "time_type", schedule.schedule_type)
99
-                    var patient = {}
100
-                    this.$set(patient, "id", schedule.patient_id)
101
-                    this.$set(patient, "name", schedule.patient)
102
-                    this.$set(item, "patient", patient)
98
+          var fakeTemplateItems = []
99
+          for (let index = 0; index < schedules.length; index++) {
100
+            const schedule = schedules[index]
101
+            var item = {}
102
+            this.$set(item, 'id', schedule.id)
103
+            this.$set(item, 'template_id', 0)
104
+            this.$set(item, 'device_number_id', schedule.bed_id)
105
+            this.$set(item, 'treat_mode', schedule.mode_id)
106
+            this.$set(item, 'weekday', schedule.schedule_week)
107
+            this.$set(item, 'time_type', schedule.schedule_type)
108
+            var patient = {}
109
+            this.$set(patient, 'id', schedule.patient_id)
110
+            this.$set(patient, 'name', schedule.patient)
111
+            this.$set(item, 'patient', patient)
103
 
112
 
104
-                    fakeTemplateItems.push(item)
105
-                }
106
-                this.this_week_schedules.items = fakeTemplateItems
113
+            fakeTemplateItems.push(item)
114
+          }
115
+          this.this_week_schedules.items = fakeTemplateItems
107
 
116
 
108
-            } else {
109
-                this.$message(resp.msg)
110
-            }
111
-        })
117
+        } else {
118
+          this.$message(resp.msg)
119
+        }
120
+      })
112
     },
121
     },
113
     methods: {
122
     methods: {
114
-        setScheduleTemplateAction: function() {
115
-            this.$refs.setup_dialog.show()
116
-        },
117
-        didChangeTemplateMode: function(mode) {
118
-            if (this.origin_mode != mode) {
119
-                if (this.origin_mode == 0) { // 0 -> 1 或 0 -> 2
120
-                    // 不处理模板 item
121
-                } else if (mode == 0) { // 1 -> 0 或 2 -> 0 清除所有模板的 item
122
-                    this.first_template.items.splice(0, this.first_template.items.length)
123
-                    this.second_template.items.splice(0, this.second_template.items.length)
124
-                    if (this.activeName != "schedules") {
125
-                        this.activeName = "schedules"
126
-                    }
127
-                } else if (this.origin_mode == 1 && mode == 2) { // 1 -> 2
128
-                    // 不处理模板 item
129
-                } else if (this.origin_mode == 2 && mode == 1) { // 2 -> 1 清除第二个模板的 item
130
-                    this.second_template.items.splice(0, this.second_template.items.length)
131
-                    if (this.activeName == "second") {
132
-                        this.activeName = "schedules"
133
-                    }
134
-                }
135
-                this.origin_mode = mode
123
+      setScheduleTemplateAction: function() {
124
+        this.$refs.setup_dialog.show()
125
+      },
126
+      didChangeTemplateMode: function(mode) {
127
+        if (this.origin_mode != mode) {
128
+          if (this.origin_mode == 0) { // 0 -> 1 或 0 -> 2
129
+            // 不处理模板 item
130
+          } else if (mode == 0) { // 1 -> 0 或 2 -> 0 清除所有模板的 item
131
+            this.first_template.items.splice(0, this.first_template.items.length)
132
+            this.second_template.items.splice(0, this.second_template.items.length)
133
+            if (this.activeName != 'schedules') {
134
+              this.activeName = 'schedules'
135
+            }
136
+          } else if (this.origin_mode == 1 && mode == 2) { // 1 -> 2
137
+            // 不处理模板 item
138
+          } else if (this.origin_mode == 2 && mode == 1) { // 2 -> 1 清除第二个模板的 item
139
+            this.second_template.items.splice(0, this.second_template.items.length)
140
+            if (this.activeName == 'second') {
141
+              this.activeName = 'schedules'
136
             }
142
             }
143
+          }
144
+          this.origin_mode = mode
137
         }
145
         }
146
+      }
138
     }
147
     }
139
-}
148
+  }
140
 </script>
149
 </script>
141
 
150
 
142
 <style scoped>
151
 <style scoped>