XMLWAN vor 3 Jahren
Ursprung
Commit
f94f05aaf2
40 geänderte Dateien mit 1165 neuen und 769 gelöschten Zeilen
  1. 16 0
      src/api/stock.js
  2. 64 65
      src/lang/zh.js
  3. 12 8
      src/router/index_路由未分离前.js
  4. 12 12
      src/router/modules/drugs.js
  5. 25 14
      src/router/modules/stock.js
  6. 1 1
      src/xt_pages/data/components/addDrugs.vue
  7. 2 2
      src/xt_pages/dialysis/template/DialysisPrintOrderThirteen.vue
  8. 87 35
      src/xt_pages/stock/cancelStockOrder.vue
  9. 100 65
      src/xt_pages/stock/cancelStockOrderAdd.vue
  10. 2 1
      src/xt_pages/stock/cancelStockOrderDetail.vue
  11. 113 52
      src/xt_pages/stock/cancelStockOrderEdit.vue
  12. 6 6
      src/xt_pages/stock/detail/cancelStockDetail.vue
  13. 3 7
      src/xt_pages/stock/detail/print.vue
  14. 12 11
      src/xt_pages/stock/detail/stockInDetail.vue
  15. 7 6
      src/xt_pages/stock/detail/stockOutDetail.vue
  16. 17 11
      src/xt_pages/stock/drugs/components/drugInOrder.vue
  17. 18 13
      src/xt_pages/stock/drugs/components/drugOutDetail.vue
  18. 4 4
      src/xt_pages/stock/drugs/drugIndex.vue
  19. 5 1
      src/xt_pages/stock/drugs/drugOutOrderPrint.vue
  20. 6 1
      src/xt_pages/stock/drugs/drugPrint.vue
  21. 3 2
      src/xt_pages/stock/drugs/drugStockFlow.vue
  22. 24 34
      src/xt_pages/stock/drugs/drugStockInOrder.vue
  23. 56 29
      src/xt_pages/stock/drugs/drugStockInOrderAdd.vue
  24. 1 1
      src/xt_pages/stock/drugs/drugStockInOrderDetailPrint.vue
  25. 71 5
      src/xt_pages/stock/drugs/drugStockInOrderEdit.vue
  26. 49 53
      src/xt_pages/stock/drugs/drugStockOutOrder.vue
  27. 113 175
      src/xt_pages/stock/drugs/drugStockOutOrderAdd.vue
  28. 97 73
      src/xt_pages/stock/drugs/drugStockOutOrderEdit.vue
  29. 2 2
      src/xt_pages/stock/drugs/query.vue
  30. 34 2
      src/xt_pages/stock/stockBatchNumber.vue
  31. 2 2
      src/xt_pages/stock/stockDetailIndex.vue
  32. 15 4
      src/xt_pages/stock/stockFlow.vue
  33. 18 7
      src/xt_pages/stock/stockInOrder.vue
  34. 16 29
      src/xt_pages/stock/stockInOrderAdd.vue
  35. 36 13
      src/xt_pages/stock/stockInOrderEdit.vue
  36. 23 9
      src/xt_pages/stock/stockOutOrder.vue
  37. 28 6
      src/xt_pages/stock/stockOutOrderAdd.vue
  38. 1 1
      src/xt_pages/stock/stockOutOrderDetailPrint.vue
  39. 42 5
      src/xt_pages/stock/stockOutOrderEdit.vue
  40. 22 2
      src/xt_pages/stock/stockQuery.vue

+ 16 - 0
src/api/stock.js Datei anzeigen

673
     params: params
673
     params: params
674
   })
674
   })
675
 }
675
 }
676
+
677
+export function getSingCancelOrder(params) {
678
+  return request({
679
+    url: '/api/stock/getsinglecancelorder',
680
+    method: 'get',
681
+    params: params
682
+  })
683
+}
684
+
685
+export function getCancelStockOrderPrint(params) {
686
+  return request({
687
+    url: '/api/stock/getcancelstockorderprint',
688
+    method: 'get',
689
+    params: params
690
+  })
691
+}

+ 64 - 65
src/lang/zh.js Datei anzeigen

61
     theme: '换肤',
61
     theme: '换肤',
62
     clipboardDemo: 'Clipboard',
62
     clipboardDemo: 'Clipboard',
63
     i18n: '国际化',
63
     i18n: '国际化',
64
-    medicalScheduling:'医护排班',
65
-    medicalSchedulingIndex:'排班管理',
66
-    class:'班种列表',
67
-    schedulingStatistics:'排班统计',
64
+    medicalScheduling: '医护排班',
65
+    medicalSchedulingIndex: '排班管理',
66
+    class: '班种列表',
67
+    schedulingStatistics: '排班统计',
68
     permissionManage: '权限管理',
68
     permissionManage: '权限管理',
69
     adminManage: '员工管理',
69
     adminManage: '员工管理',
70
     roleManage: '权限管理',
70
     roleManage: '权限管理',
150
     special_permission_manage: '特殊权限管理',
150
     special_permission_manage: '特殊权限管理',
151
     schedule_print: '排班打印',
151
     schedule_print: '排班打印',
152
 
152
 
153
-    otherManagement:'其他管理',
154
-    drugsExpiryDate:'药品有效期预警',
155
-    drugsSurplus:'药品剩余预警',
156
-    drugsQuery:'库存查询',
157
-    drugsReportLoss:'药品报损',
158
-    drugsAdjustPrice:'药品调价',
159
-    drugsStockCancel:'退库单',
160
-    drugsStockReturn:'退货单',
161
-    drugsStockOut:'出库单',
162
-    drugsStockIn:'入库单',
163
-    stockDrugs:'药品管理',
164
-    selfPreparedMedicineInfo:'自备药信息',
165
-    selfPreparedMedicineQuery:'自备药查询',
166
-    selfPreparedMedicineIndex:'自备药管理',
167
-    selfPreparedMedicine:'自备药管理',
168
-    consumablesManagement:'耗材管理',
153
+    otherManagement: '其他管理',
154
+    drugsExpiryDate: '药品有效期预警',
155
+    drugsSurplus: '药品剩余预警',
156
+    drugsQuery: '库存查询',
157
+    drugsReportLoss: '药品报损',
158
+    drugsAdjustPrice: '药品调价',
159
+    // drugsStockCancel: '退库单',
160
+    // drugsStockReturn:'退货单',
161
+    drugsStockOut: '出库单',
162
+    drugsStockIn: '入库单',
163
+    stockDrugs: '药品管理',
164
+    selfPreparedMedicineInfo: '自备药信息',
165
+    selfPreparedMedicineQuery: '自备药查询',
166
+    selfPreparedMedicineIndex: '自备药管理',
167
+    selfPreparedMedicine: '自备药管理',
168
+    consumablesManagement: '耗材管理',
169
     warehouseReceipt: '出入库',
169
     warehouseReceipt: '出入库',
170
     warehouseReceiptOther: '出入库',
170
     warehouseReceiptOther: '出入库',
171
     stockInOrder: '入库单',
171
     stockInOrder: '入库单',
172
-    salesReturnOrder: '退货单',
172
+    // salesReturnOrder: '退货单',
173
     stockOutOrder: '出库单',
173
     stockOutOrder: '出库单',
174
     cancelStockOrder: '退库单',
174
     cancelStockOrder: '退库单',
175
     otherStockInOrder: '入库单',
175
     otherStockInOrder: '入库单',
176
-    otherSalesReturnOrder: '退货单',
176
+    // otherSalesReturnOrder: '退货单',
177
     otherStockOutOrder: '出库单',
177
     otherStockOutOrder: '出库单',
178
-    otherCancelStockOrder: '退库单',
178
+    // otherCancelStockOrder: '退库单',
179
     stockInOrderAdd: '新增入库单',
179
     stockInOrderAdd: '新增入库单',
180
     salesReturnOrderAdd: '新增退货单',
180
     salesReturnOrderAdd: '新增退货单',
181
     stockOutOrderAdd: '新增出库单',
181
     stockOutOrderAdd: '新增出库单',
199
     system_prescription: '透析方案模版',
199
     system_prescription: '透析方案模版',
200
     integration_config: '集成配置',
200
     integration_config: '集成配置',
201
     his_config: 'HIS集成配置',
201
     his_config: 'HIS集成配置',
202
-    medical_template:'门诊模版',
202
+    medical_template: '门诊模版',
203
     slow: '慢病管理',
203
     slow: '慢病管理',
204
     scrm: 'SCRM',
204
     scrm: 'SCRM',
205
     shop: '分销商城',
205
     shop: '分销商城',
206
 
206
 
207
-    costComparison:'医保费用对照',
208
-    incomeStatistics:'收入统计',
209
-    outpatientRegistration:'门诊挂号',
210
-    outpatientRegistrationIndex:'门诊挂号',
211
-    hospitalIndex:'住院登记',
212
-    hospitalChargesManagement:"住院收费管理",
213
-    outpatientRegistrationRegistrationHistory:'挂号历史',
214
-    outpatientDoctorStation:"门诊医生站",
215
-    outpatientDoctorStationDoctorDesk:'医生工作台',
216
-    outpatientDoctorStationPastInquiries:'既往查询',
217
-    outpatientDoctorStationTemplateManagement:'模板管理',
218
-    outpatientCharges:'门诊收费',
219
-    outpatientChargesManagement:'门诊收费管理',
220
-    outpatientInvoice:'门诊发票',
221
-    outpatientRecord:'住院工作站',
222
-    advancePayment:'预交金',
223
-    labelPrinting:'标签打印',
224
-    summary:'项目消费明细汇总',
225
-    outpatientPharmacy:'门诊药房',
226
-    pharmacyFormula:'药房配发药',
227
-    prescriptionDrugReturn:'处方退药',
228
-    dispensingInquiry:'处方发药查询',
229
-    drugReturnInquiry:'处方退药查询',
230
-    signIndex:'签到排队',
231
-    signIn:'签到窗口',
232
-    lineUp:'排队窗口',
233
-    calling:'排队叫号',
234
-    bedManagement:'床位管理',
235
-    dictionaryManagement:'字典管理',
236
-    templateManagement:'模板管理',
237
-    drugStockUserDetail:"出库人明细",
238
-    DepartManage:"科室管理",
239
-    basicConfig:'基础配置',
207
+    costComparison: '医保费用对照',
208
+    incomeStatistics: '收入统计',
209
+    outpatientRegistration: '门诊挂号',
210
+    outpatientRegistrationIndex: '门诊挂号',
211
+    hospitalIndex: '住院登记',
212
+    hospitalChargesManagement: '住院收费管理',
213
+    outpatientRegistrationRegistrationHistory: '挂号历史',
214
+    outpatientDoctorStation: '门诊医生站',
215
+    outpatientDoctorStationDoctorDesk: '医生工作台',
216
+    outpatientDoctorStationPastInquiries: '既往查询',
217
+    outpatientDoctorStationTemplateManagement: '模板管理',
218
+    outpatientCharges: '门诊收费',
219
+    outpatientChargesManagement: '门诊收费管理',
220
+    outpatientInvoice: '门诊发票',
221
+    outpatientRecord: '住院工作站',
222
+    advancePayment: '预交金',
223
+    labelPrinting: '标签打印',
224
+    summary: '项目消费明细汇总',
225
+    outpatientPharmacy: '门诊药房',
226
+    pharmacyFormula: '药房配发药',
227
+    prescriptionDrugReturn: '处方退药',
228
+    dispensingInquiry: '处方发药查询',
229
+    drugReturnInquiry: '处方退药查询',
230
+    signIndex: '签到排队',
231
+    signIn: '签到窗口',
232
+    lineUp: '排队窗口',
233
+    calling: '排队叫号',
234
+    bedManagement: '床位管理',
235
+    dictionaryManagement: '字典管理',
236
+    templateManagement: '模板管理',
237
+    drugStockUserDetail: '出库人明细',
238
+    DepartManage: '科室管理',
239
+    basicConfig: '基础配置',
240
 
240
 
241
-    histemplate:'处方模版',
242
-    outpatientSickRecord:"人员定点病种备案",
243
-    airDisinfect:'空气消毒',
244
-    objectTableDisinfect:'物表消毒',
241
+    histemplate: '处方模版',
242
+    outpatientSickRecord: '人员定点病种备案',
243
+    airDisinfect: '空气消毒',
244
+    objectTableDisinfect: '物表消毒',
245
 
245
 
246
+    hospitalStation: '住院工作站',
247
+    pastInquiries: '既往查询',
246
 
248
 
247
-    hospitalStation:"住院工作站",
248
-    pastInquiries:"既往查询",
249
-
250
-    prescriptionTemplate:"处方模版",
249
+    prescriptionTemplate: '处方模版'
251
 
250
 
252
   },
251
   },
253
   navbar: {
252
   navbar: {

+ 12 - 8
src/router/index_路由未分离前.js Datei anzeigen

784
         component: () => import('@/xt_pages/stock/otherStockInOrder'),
784
         component: () => import('@/xt_pages/stock/otherStockInOrder'),
785
         name: 'otherStockInOrder',
785
         name: 'otherStockInOrder',
786
         meta: { title: 'otherStockInOrder', noCache: true }
786
         meta: { title: 'otherStockInOrder', noCache: true }
787
-      }, {
788
-        path: '/stock/return',
789
-        component: () => import('@/xt_pages/stock/salesReturnOrder'),
790
-        name: 'salesReturnOrder',
791
-        meta: { title: 'salesReturnOrder', noCache: true }
792
-      }, {
787
+      },
788
+      // {
789
+      //   path: '/stock/return',
790
+      //   component: () => import('@/xt_pages/stock/salesReturnOrder'),
791
+      //   name: 'salesReturnOrder',
792
+      //   meta: { title: 'salesReturnOrder', noCache: true }
793
+      // },
794
+      {
793
         path: '/stock/return/other',
795
         path: '/stock/return/other',
794
         component: () => import('@/xt_pages/stock/otherSalesReturnOrder'),
796
         component: () => import('@/xt_pages/stock/otherSalesReturnOrder'),
795
         name: 'otherSalesReturnOrder',
797
         name: 'otherSalesReturnOrder',
820
         component: () => import('@/xt_pages/stock/stockQuery'),
822
         component: () => import('@/xt_pages/stock/stockQuery'),
821
         name: 'stockQuery',
823
         name: 'stockQuery',
822
         meta: { title: 'stockQuery' }
824
         meta: { title: 'stockQuery' }
823
-      }, {
825
+      },
826
+      {
824
         path: '/stock/detail',
827
         path: '/stock/detail',
825
         component: () => import('@/xt_pages/stock/stockDetailIndex'),
828
         component: () => import('@/xt_pages/stock/stockDetailIndex'),
826
         name: 'stockDetail',
829
         name: 'stockDetail',
827
         meta: { title: 'stockDetail' }
830
         meta: { title: 'stockDetail' }
828
-      }, {
831
+      },
832
+      {
829
         path: '/stock/in/add',
833
         path: '/stock/in/add',
830
         component: () => import('@/xt_pages/stock/stockInOrderAdd'),
834
         component: () => import('@/xt_pages/stock/stockInOrderAdd'),
831
         name: 'stockInOrderAdd',
835
         name: 'stockInOrderAdd',

+ 12 - 12
src/router/modules/drugs.js Datei anzeigen

30
       name: 'drugsStockOut',
30
       name: 'drugsStockOut',
31
       meta: { title: 'drugsStockOut', noCache: true }
31
       meta: { title: 'drugsStockOut', noCache: true }
32
     },
32
     },
33
-    {
34
-      path: '/stock/drugs/stock/return',
35
-      component: () => import('@/xt_pages/stock/drugs/drugSalesReturnOrder'),
36
-      name: 'drugsStockReturn',
37
-      meta: { title: 'drugsStockReturn', noCache: true }
38
-    },
39
-    {
40
-      path: '/stock/drugs/stock/cancel',
41
-      component: () => import('@/xt_pages/stock/drugs/cancelDrugStockOrder'),
42
-      name: 'drugsStockCancel',
43
-      meta: { title: 'drugsStockCancel', noCache: true }
44
-    },
33
+    // {
34
+    //   path: '/stock/drugs/stock/return',
35
+    //   component: () => import('@/xt_pages/stock/drugs/drugSalesReturnOrder'),
36
+    //   name: 'drugsStockReturn',
37
+    //   meta: { title: 'drugsStockReturn', noCache: true }
38
+    // },
39
+    // {
40
+    //   path: '/stock/drugs/stock/cancel',
41
+    //   component: () => import('@/xt_pages/stock/drugs/cancelDrugStockOrder'),
42
+    //   name: 'drugsStockCancel',
43
+    //   meta: { title: 'drugsStockCancel', noCache: true }
44
+    // },
45
     {
45
     {
46
       path: '/stock/drugs/stock/detail',
46
       path: '/stock/drugs/stock/detail',
47
       component: () => import('@/xt_pages/stock/drugs/drugIndex'),
47
       component: () => import('@/xt_pages/stock/drugs/drugIndex'),

+ 25 - 14
src/router/modules/stock.js Datei anzeigen

24
       name: 'stockInOrder',
24
       name: 'stockInOrder',
25
       meta: { title: 'stockInOrder', noCache: true }
25
       meta: { title: 'stockInOrder', noCache: true }
26
     },
26
     },
27
-    {
28
-      path: '/stock/return',
29
-      component: () => import('@/xt_pages/stock/salesReturnOrder'),
30
-      name: 'salesReturnOrder',
31
-      meta: { title: 'salesReturnOrder', noCache: true }
32
-    },
27
+    // {
28
+    //   path: '/stock/return',
29
+    //   component: () => import('@/xt_pages/stock/salesReturnOrder'),
30
+    //   name: 'salesReturnOrder',
31
+    //   meta: { title: 'salesReturnOrder', noCache: true }
32
+    // },
33
     {
33
     {
34
       path: '/stock/out',
34
       path: '/stock/out',
35
       component: () => import('@/xt_pages/stock/stockOutOrder'),
35
       component: () => import('@/xt_pages/stock/stockOutOrder'),
42
       name: 'cancelStockOrder',
42
       name: 'cancelStockOrder',
43
       meta: { title: 'cancelStockOrder', noCache: true }
43
       meta: { title: 'cancelStockOrder', noCache: true }
44
     },
44
     },
45
-    
45
+
46
     // {
46
     // {
47
     //   path: "/stock/",
47
     //   path: "/stock/",
48
     //   component: Layout,
48
     //   component: Layout,
93
     //     }
93
     //     }
94
     //   ]
94
     //   ]
95
     // },
95
     // },
96
-    
96
+
97
     {
97
     {
98
       path: '/stock/detail',
98
       path: '/stock/detail',
99
       component: () => import('@/xt_pages/stock/stockDetailIndex'),
99
       component: () => import('@/xt_pages/stock/stockDetailIndex'),
202
       }
202
       }
203
     },
203
     },
204
     {
204
     {
205
-      path:"/stock/drugcancelprint",
206
-      component:()=>import('@/xt_pages/stock/drugs/drugCancelOurderPrint'),
205
+      path: '/stock/drugcancelprint',
206
+      component: () => import('@/xt_pages/stock/drugs/drugCancelOurderPrint'),
207
       hidden: true,
207
       hidden: true,
208
       is_menu: false,
208
       is_menu: false,
209
       name: 'stock_print',
209
       name: 'stock_print',
213
       }
213
       }
214
     },
214
     },
215
     {
215
     {
216
-      path:"/stock/drugoutorderprint",
217
-      component:()=>import('@/xt_pages/stock/drugs/drugOutOrderPrint'),
216
+      path: '/stock/drugoutorderprint',
217
+      component: () => import('@/xt_pages/stock/drugs/drugOutOrderPrint'),
218
       hidden: true,
218
       hidden: true,
219
       is_menu: false,
219
       is_menu: false,
220
       name: 'stock_print',
220
       name: 'stock_print',
224
       }
224
       }
225
     },
225
     },
226
     {
226
     {
227
-      path:"/stock/drugcanceldetaiprint",
228
-      component:()=>import('@/xt_pages/stock/drugs/drugCancelDetailPrint'),
227
+      path: '/stock/drugcanceldetaiprint',
228
+      component: () => import('@/xt_pages/stock/drugs/drugCancelDetailPrint'),
229
       hidden: true,
229
       hidden: true,
230
       is_menu: false,
230
       is_menu: false,
231
       name: 'stock_print',
231
       name: 'stock_print',
269
         noCache: true
269
         noCache: true
270
       }
270
       }
271
     },
271
     },
272
+    {
273
+      path: '/stock/cancel/cancelstockorderedit',
274
+      component: () => import('@/xt_pages/stock/cancelStockOrderEdit'),
275
+      hidden: true,
276
+      is_menu: false,
277
+      name: 'drugQueryPrint',
278
+      meta: {
279
+        title: '耗材退库打印',
280
+        noCache: true
281
+      }
282
+    }
272
   ]
283
   ]
273
 }
284
 }

+ 1 - 1
src/xt_pages/data/components/addDrugs.vue Datei anzeigen

112
                                       maxlength="30"></el-input>
112
                                       maxlength="30"></el-input>
113
                           <el-select v-model="form.drug_dose_unit" style="width:80px;" placeholder="单次用量单位">
113
                           <el-select v-model="form.drug_dose_unit" style="width:80px;" placeholder="单次用量单位">
114
                                 <el-option
114
                                 <el-option
115
-                                        v-for="(item,index) in unitList"
115
+                                        v-for="(item,index) in  getDataConfig('hemodialysis','units')"
116
                                         :key="index"
116
                                         :key="index"
117
                                         :label="item.name"
117
                                         :label="item.name"
118
                                         :value="item.id">
118
                                         :value="item.id">

+ 2 - 2
src/xt_pages/dialysis/template/DialysisPrintOrderThirteen.vue Datei anzeigen

236
               预设脱水
236
               预设脱水
237
               <div class="inline_block under_line" style="width:100px;">
237
               <div class="inline_block under_line" style="width:100px;">
238
                   {{ prescription.target_ultrafiltration ? prescription.target_ultrafiltration : ' ' }}
238
                   {{ prescription.target_ultrafiltration ? prescription.target_ultrafiltration : ' ' }}
239
-              </div>kg
239
+              </div>L
240
           </div>
240
           </div>
241
       </div>
241
       </div>
242
       <div class="row">
242
       <div class="row">
259
               实际脱水
259
               实际脱水
260
               <div class="inline_block under_line" style="width:100px;">
260
               <div class="inline_block under_line" style="width:100px;">
261
                   {{ afterdialysis.actual_ultrafiltration ? afterdialysis.actual_ultrafiltration : " " }}
261
                   {{ afterdialysis.actual_ultrafiltration ? afterdialysis.actual_ultrafiltration : " " }}
262
-              </div>kg
262
+              </div>L
263
           </div>
263
           </div>
264
       </div>
264
       </div>
265
       <div class="row">
265
       <div class="row">

+ 87 - 35
src/xt_pages/stock/cancelStockOrder.vue Datei anzeigen

70
           @change="changeAllSelected"
70
           @change="changeAllSelected"
71
           >全选</el-checkbox
71
           >全选</el-checkbox
72
         >
72
         >
73
-        <el-button size="small" icon="el-icon-delete" @click="batchDelete"
74
-          >删除</el-button
75
-        >
73
+        <el-button size="small" icon="el-icon-delete" @click="batchDelete">删除</el-button>
74
+        <!-- <el-button size="small" type="primary" @click="toPrint">打印</el-button> -->
76
       </div>
75
       </div>
77
 
76
 
78
       <el-row :gutter="12" style="margin-top: 10px">
77
       <el-row :gutter="12" style="margin-top: 10px">
79
         <el-table
78
         <el-table
80
           :data="cancelStockDate"
79
           :data="cancelStockDate"
80
+          @current-change='currentChange' 
81
           :class="signAndWeighBoxPatients"
81
           :class="signAndWeighBoxPatients"
82
           border
82
           border
83
           highlight-current-row
83
           highlight-current-row
109
             </template>
109
             </template>
110
           </el-table-column>
110
           </el-table-column>
111
 
111
 
112
-          <el-table-column label="厂家" align="center">
113
-            <template slot-scope="scope">
114
-              {{ getManufactuerName(scope.row.manufacturer) }}
115
-            </template>
116
-          </el-table-column>
117
-
118
-          <el-table-column label="经销商" align="center">
119
-            <template slot-scope="scope">
120
-              {{ getDealerName(scope.row.dealer) }}
121
-            </template>
122
-          </el-table-column>
123
-
124
           <el-table-column label="操作" align="center">
112
           <el-table-column label="操作" align="center">
125
             <template slot-scope="scope">
113
             <template slot-scope="scope">
126
               <el-tooltip
114
               <el-tooltip
167
         >
155
         >
168
         </el-pagination>
156
         </el-pagination>
169
       </el-row>
157
       </el-row>
158
+
159
+     <div   v-show="showTable" style="margin-top:10px">
160
+       <el-table
161
+          :data="tableList"
162
+          :class="signAndWeighBoxPatients"
163
+          border
164
+          highlight-current-row
165
+          ref="multipleTableOne"
166
+          @selection-change="select"
167
+          :row-style="{ color: '#303133' }"
168
+          :header-cell-style="{
169
+            backgroundColor: 'rgb(245, 247, 250)',
170
+            color: '#606266'
171
+          }"
172
+        >
173
+          <el-table-column type="selection" width="55"> </el-table-column>
174
+
175
+          <el-table-column label="耗材名称" align="center">
176
+            <template slot-scope="scope">
177
+              {{scope.row.GoodInfo.good_name}}
178
+            </template>
179
+          </el-table-column>
180
+
181
+          <el-table-column label="规格&单位" align="center">
182
+            <template slot-scope="scope">
183
+              {{scope.row.GoodInfo.specification_name}} / {{scope.row.GoodInfo.packing_unit}}
184
+            </template>
185
+          </el-table-column>
186
+
187
+          <el-table-column label="退库数量" align="center">
188
+            <template slot-scope="scope">
189
+              {{ scope.row.count}}{{scope.row.GoodInfo.packing_unit}}
190
+            </template>
191
+          </el-table-column>
192
+        </el-table>
193
+      </div>
170
     </div>
194
     </div>
171
   </div>
195
   </div>
172
 </template>
196
 </template>
177
 import {
201
 import {
178
   deleteCancelStock,
202
   deleteCancelStock,
179
   GetAllConfig,
203
   GetAllConfig,
180
-  getCancelStockList
204
+  getCancelStockList,
205
+  getSingCancelOrder,
206
+  getCancelStockOrderPrint
181
 } from "@/api/stock";
207
 } from "@/api/stock";
182
 import BreadCrumb from "../components/bread-crumb";
208
 import BreadCrumb from "../components/bread-crumb";
183
 
209
 
205
       (nowMonth < 10 ? "0" + nowMonth : nowMonth) +
231
       (nowMonth < 10 ? "0" + nowMonth : nowMonth) +
206
       "-" +
232
       "-" +
207
       (nowDay < 10 ? "0" + nowDay : nowDay);
233
       (nowDay < 10 ? "0" + nowDay : nowDay);
208
-    // var date1 = new Date();
209
-    // var date2 = new Date(date1);
210
-
211
-    // //-30为30天前,+30可以获得30天后的日期
212
-    // date2.setDate(date1.getDate() - 30);
213
-
214
-    // //30天前(月份判断是否小于10,小于10的前面+0)
215
-    // var agoDay = `${date2.getFullYear()}-${date2.getMonth() + 1<10?`0${date2.getMonth() + 1}`:date2.getMonth() + 1}-${date2.getDate()}`;
216
-      
217
-    // //当前日期
218
-    // var nowDay = `${date1.getFullYear()}-${date1.getMonth() + 1<10?`0${date1.getMonth() + 1}`:date1.getMonth() + 1}-${date1.getDate()}`;
219
-
220
-    //  this.start_time = agoDay
221
-    //  console.log("333333332222",this.start_time)
234
+   
222
     this.GetCancelStock();
235
     this.GetCancelStock();
223
     this.GetConfigInfo();
236
     this.GetConfigInfo();
224
     this.fetchAllAdminUsers();
237
     this.fetchAllAdminUsers();
247
       goodInfo: [],
260
       goodInfo: [],
248
       manufacturer: [],
261
       manufacturer: [],
249
       selectedTableData: [],
262
       selectedTableData: [],
250
-      dealer: []
263
+      dealer: [],
264
+      tableList:[],
265
+      showTable:false,
266
+      order_id:"",
251
     };
267
     };
252
   },
268
   },
253
   methods: {
269
   methods: {
400
       }
416
       }
401
     },
417
     },
402
     handleEdit: function(index, row) {
418
     handleEdit: function(index, row) {
403
-      this.$router.push({
404
-        name: "cancelStockDetail",
405
-        query: { id: row.id, type: this.type }
406
-      });
419
+      console.log("row22222",row.id)
420
+      this.$router.push({"path":"/stock/cancel/cancelstockorderedit?id="+row.id})
407
     },
421
     },
408
     handleDelete: function(index, row) {
422
     handleDelete: function(index, row) {
409
       const ids = [];
423
       const ids = [];
444
         .catch(() => {});
458
         .catch(() => {});
445
     },
459
     },
446
     changeAllSelected: function(val) {
460
     changeAllSelected: function(val) {
461
+      var ids = []
462
+      for(let i=0;i<val.length;i++){
463
+         ids.push(val[i].id)
464
+      }
465
+      this.order_id = ids.join(",")
466
+
447
       if (val) {
467
       if (val) {
448
         this.$refs.multipleTable.toggleAllSelection();
468
         this.$refs.multipleTable.toggleAllSelection();
449
       } else {
469
       } else {
495
           });
515
           });
496
         })
516
         })
497
         .catch(() => {});
517
         .catch(() => {});
518
+    },
519
+    currentChange(val){
520
+        var params ={
521
+          id:val.id
522
+        }
523
+      getSingCancelOrder(params).then(response=>{
524
+        if(response.data.state == 1){
525
+          var list = response.data.data.list
526
+          console.log("list0000000000",list)
527
+          this.tableList = list
528
+          this.showTable = true
529
+        }
530
+      }) 
531
+    },
532
+    toPrint(){
533
+      console.log("22222",this.order_id)
534
+      if(this.order_id == ""){
535
+        this.$message.error("请勾选退库单")
536
+      }else{
537
+        this.getCancelStockOrderPrint()
538
+      }
539
+    },
540
+    getCancelStockOrderPrint(){
541
+       var params = {
542
+         id:this.order_id
543
+       }
544
+      getCancelStockOrderPrint(params).then(response=>{
545
+         if(response.data.state ==1){
546
+           var list =  response.data.data.list
547
+           console.log("list222",list)
548
+         }
549
+      })
498
     }
550
     }
499
   }
551
   }
500
 };
552
 };

+ 100 - 65
src/xt_pages/stock/cancelStockOrderAdd.vue Datei anzeigen

50
             value-format="yyyy-MM-dd"
50
             value-format="yyyy-MM-dd"
51
           ></el-date-picker>
51
           ></el-date-picker>
52
         </div>
52
         </div>
53
-
54
-        <div class="cell clearfix">
55
-          <label class="title"><span class="name">经销商</span> : </label>
56
-          <el-select
57
-            size="small"
58
-            v-model="form.dealer"
59
-            filterable
60
-            placeholder="请选择经销商"
61
-            @change="changeDealer"
62
-          >
63
-            <el-option
64
-              v-for="(option, index) in dealer"
65
-              :key="index"
66
-              :label="option.dealer_name"
67
-              :value="option.id"
68
-            >
69
-            </el-option>
70
-          </el-select>
71
-        </div>
72
-
73
-        <div class="cell clearfix">
74
-          <label class="title"><span class="name">厂商</span> : </label>
75
-          <el-select
76
-            size="small"
77
-            v-model="form.manufacturer"
78
-            filterable
79
-            placeholder="请选择厂商"
80
-            @change="changeManufacturer"
81
-          >
82
-            <el-option
83
-              v-for="(option, index) in manufacturer"
84
-              :key="index"
85
-              :label="option.manufacturer_name"
86
-              :value="option.id"
87
-            >
88
-            </el-option>
89
-          </el-select>
90
-        </div>
91
       </div>
53
       </div>
92
 
54
 
93
       <el-form :rules="tableRules" :model="recordInfo" ref="tableForm">
55
       <el-form :rules="tableRules" :model="recordInfo" ref="tableForm">
99
           max-height="450"
61
           max-height="450"
100
           :header-cell-style="{ backgroundColor: 'rgb(245, 247, 250)' }"
62
           :header-cell-style="{ backgroundColor: 'rgb(245, 247, 250)' }"
101
         >
63
         >
102
-          <el-table-column min-width="35" align="center">
103
-            <template slot="header" slot-scope="scope">
104
-              <span>商品类型<span style="color: red">*</span></span>
64
+       
65
+          <el-table-column align="center" width="250">
66
+             <template slot="header" slot-scope="scope">
67
+              <span>耗材名称</span>
105
             </template>
68
             </template>
106
-
107
             <template slot-scope="scope">
69
             <template slot-scope="scope">
108
-              <!--<span @click="showDialog(scope.$index, scope.row)" v-if="scope.row.good_type_id == 0" style="color:#c5c8cf">请输入类型</span>-->
109
-              <!--<span @click="showDialog(scope.$index, scope.row)" v-if="scope.row.good_type_id != 0">{{typeName(scope.row.good_type_id)}}</span>-->
110
-
111
-              <el-form-item style="padding-top: 15px">
112
-                <el-input
113
-                  placeholder="请输入商品类型"
114
-                  v-model="scope.row.good_type_id"
115
-                  :value="typeName(scope.row.good_type_id)"
116
-                  @focus="showDialog(scope.$index, scope.row)"
117
-                ></el-input>
118
-              </el-form-item>
70
+                <el-autocomplete
71
+                    class="checkSearch"
72
+                    popper-class="my-autocomplete"
73
+                    v-model="scope.row.good_name"
74
+                    :fetch-suggestions="querySearchAsync"
75
+                    :trigger-on-focus="false"
76
+                    placeholder="请输入耗材名称"
77
+                    @select="handleSelect"
78
+                    @input="changeGoodName(scope.$index)"
79
+                    style="width:200px;"
80
+                  >
81
+                    <i class="el-icon-search el-input__icon" slot="suffix"></i>
82
+                  <template slot-scope="{ item }">
83
+                    <div class="name">{{ item.good_name +"  " +item.specification_name + "  "+item.manufacturer }}</div>
84
+                  </template>
85
+                 </el-autocomplete>
119
             </template>
86
             </template>
120
           </el-table-column>
87
           </el-table-column>
121
-          <el-table-column min-width="35" align="center">
88
+          <el-table-column align="center" width="300">
122
             <template slot="header" slot-scope="scope">
89
             <template slot="header" slot-scope="scope">
123
-              <span>规格名称<span style="color: red">*</span></span>
90
+              <span>规格&单位<span style="color: red">*</span></span>
124
             </template>
91
             </template>
125
             <template slot-scope="scope">
92
             <template slot-scope="scope">
126
-              <el-form-item style="padding-top: 15px">
127
-                <el-input
128
-                  placeholder="请输入规格名称"
129
-                  v-model="scope.row.good_id"
130
-                  :value="specificationName(scope.row.good_id)"
131
-                  @focus="showDialog(scope.$index, scope.row)"
132
-                ></el-input>
93
+
94
+              <el-form-item style="padding-top: 20px">
95
+                <el-input placeholder="请输入规格名称" v-model="scope.row.name"></el-input>
133
               </el-form-item>
96
               </el-form-item>
97
+
134
             </template>
98
             </template>
135
           </el-table-column>
99
           </el-table-column>
136
-
137
-          <el-table-column min-width="23" align="center">
100
+        
101
+          <el-table-column width="300" align="center">
138
             <template slot="header" slot-scope="scope">
102
             <template slot="header" slot-scope="scope">
139
               <span>退库数量<span style="color: red">*</span></span>
103
               <span>退库数量<span style="color: red">*</span></span>
140
             </template>
104
             </template>
149
                   type="number"
113
                   type="number"
150
                   v-model="scope.row.return_count"
114
                   v-model="scope.row.return_count"
151
                 ></el-input>
115
                 ></el-input>
116
+                {{scope.row.packing_unit}}
152
               </el-form-item>
117
               </el-form-item>
153
             </template>
118
             </template>
154
           </el-table-column>
119
           </el-table-column>
192
 
157
 
193
 <script>
158
 <script>
194
 import { uParseTime } from "@/utils/tools";
159
 import { uParseTime } from "@/utils/tools";
195
-import { getCancelStockConfig, postCancelStock,GetAllConfig,GetAllGoodInfoByID } from "@/api/stock";
160
+import { getCancelStockConfig, postCancelStock,GetAllConfig,GetAllGoodInfoByID,postSearchGoodList } from "@/api/stock";
196
 import BreadCrumb from "../components/bread-crumb";
161
 import BreadCrumb from "../components/bread-crumb";
197
 import StockInDialog from './Dialog/stockInDialog'
162
 import StockInDialog from './Dialog/stockInDialog'
198
 
163
 
447
           const params = {
412
           const params = {
448
             cancelStock: this.recordInfo.recordData
413
             cancelStock: this.recordInfo.recordData
449
           };
414
           };
415
+          console.log("params",params)
416
+         
450
           postCancelStock(
417
           postCancelStock(
451
             params,
418
             params,
452
             this.return_time,
419
             this.return_time,
478
     },
445
     },
479
     changeDealer(val) {
446
     changeDealer(val) {
480
       this.propForm.dealer = val;
447
       this.propForm.dealer = val;
448
+    },
449
+    querySearchAsync(keyword, cb) {
450
+      let key = '';
451
+      if (keyword != undefined) {
452
+        key = keyword
453
+      }
454
+    postSearchGoodList(key).then(response => {
455
+        if (response.data.state == 1) {
456
+          
457
+            var list = response.data.data.list
458
+            
459
+            this.goodList = list
460
+            var manufacturerList = response.data.data.manufacturerList
461
+            this.manufacturerList = manufacturerList
462
+            var dealer =  response.data.data.dealerList
463
+            this.dealerList = dealer
464
+            for(let i=0;i<this.goodList.length;i++){
465
+              for(let j=0;j<this.manufacturerList.length;j++){
466
+                if(this.goodList[i].manufacturer == this.manufacturerList[j].id){
467
+                    this.goodList[i].manufacturer = this.manufacturerList[j].manufacturer_name
468
+                }
469
+              }
470
+            }
471
+
472
+            for(let i=0;i<this.goodList.length;i++){
473
+              for(let j=0;j<this.dealerList.length;j++){
474
+                if(this.goodList[i].dealer == this.dealerList[j].id){
475
+                  this.goodList[i].dealer = this.dealerList[j].dealer_name
476
+                }
477
+              }
478
+            }
479
+          
480
+            cb(this.goodList)
481
+        } else {
482
+          cb([])
483
+        }
484
+      })
485
+    },
486
+    changeGoodName(val){
487
+      this.currentIndex = val
488
+    },
489
+    handleSelect(val){
490
+      for(let i=0;i<this.recordInfo.recordData.length;i++){
491
+        if(this.currentIndex == i){
492
+          this.recordInfo.recordData[i].good_type_id = val.id
493
+          this.recordInfo.recordData[i].good_name = val.good_name
494
+          this.recordInfo.recordData[i].good_type_id = val.good_type_id
495
+          this.recordInfo.recordData[i].name = val.specification_name +"/"+val.packing_unit
496
+          this.recordInfo.recordData[i].number =  val.number
497
+          this.recordInfo.recordData[i].manufacturer = val.manufacturer
498
+          this.recordInfo.recordData[i].remark = val.remark
499
+          if(val.buy_price == 0){
500
+            this.recordInfo.recordData[i].price = ""
501
+          }else{
502
+            this.recordInfo.recordData[i].price = val.buy_price
503
+          }
504
+          
505
+          this.recordInfo.recordData[i].specification_name = val.specification_name
506
+          this.recordInfo.recordData[i].good_id = val.id
507
+          this.recordInfo.recordData[i].packing_unit = val.packing_unit
508
+          if(val.dealer == 0){
509
+            this.recordInfo.recordData[i].dealer = ""
510
+          }else{
511
+            this.recordInfo.recordData[i].dealer = val.dealer
512
+          }
513
+          
514
+        }
515
+      }
481
     }
516
     }
482
   },
517
   },
483
   created() {
518
   created() {

+ 2 - 1
src/xt_pages/stock/cancelStockOrderDetail.vue Datei anzeigen

200
           })
200
           })
201
         }).catch(() => {
201
         }).catch(() => {
202
         })
202
         })
203
-      }, editRecord: function() {
203
+      }, 
204
+      editRecord: function() {
204
         this.$emit('edit-record')
205
         this.$emit('edit-record')
205
       }
206
       }
206
     }
207
     }

+ 113 - 52
src/xt_pages/stock/cancelStockOrderEdit.vue Datei anzeigen

23
                         value-format="yyyy-MM-dd"></el-date-picker>
23
                         value-format="yyyy-MM-dd"></el-date-picker>
24
       </div>
24
       </div>
25
 
25
 
26
-      <div class="cell clearfix">
27
-        <label class="title"><span class="name">经销商</span> : </label>
28
-        <el-select   size="small"  v-model="form.dealer" clearable  placeholder="请选择经销商"  @change="changeDealer">
29
-          <el-option
30
-            v-for="(option, index) in dealer"
31
-            :key="index"
32
-            :label="option.dealer_name"
33
-            :value="option.id">
34
-          </el-option>
35
-        </el-select>
36
-      </div>
37
-
38
-      <div class="cell clearfix">
39
-        <label class="title"><span class="name">厂商</span> : </label>
40
-        <el-select  size="small"   v-model="form.manufacturer" clearable  placeholder="请选择厂商" @change="changeManufacturer">
41
-          <el-option
42
-            v-for="(option, index) in manufacturer"
43
-            :key="index"
44
-            :label="option.manufacturer_name"
45
-            :value="option.id">
46
-          </el-option>
47
-        </el-select>
48
-      </div>
49
-
50
-
51
-
52
-
53
-
54
-
26
+     
55
       <el-form :rules="tableRules" :model="recordInfo" ref="tableForm">
27
       <el-form :rules="tableRules" :model="recordInfo" ref="tableForm">
56
         <el-table :data="recordInfo.recordData" :class="signAndWeighBoxPatients" style="width: 100%" border
28
         <el-table :data="recordInfo.recordData" :class="signAndWeighBoxPatients" style="width: 100%" border
57
-                  max-height="450" :header-cell-style="{ backgroundColor: 'rgb(245, 247, 250)'}"
58
-        >
59
-
29
+             max-height="450" :header-cell-style="{ backgroundColor: 'rgb(245, 247, 250)'}">
60
 
30
 
61
-          <el-table-column min-width="35" align="center">
62
-
63
-            <template slot="header" slot-scope="scope">
64
-              <span>商品类型<span style="color: red">*</span></span>
31
+          <el-table-column align="center" width="300">
32
+             <template slot="header" slot-scope="scope">
33
+              <span>耗材名称</span>
65
             </template>
34
             </template>
66
-
67
             <template slot-scope="scope">
35
             <template slot-scope="scope">
68
-              <el-form-item style="padding-top: 15px">
69
-                <el-input placeholder="请输入商品类型" v-model="scope.row.good_type_id"
70
-                          :value="typeName(scope.row.good_type_id)"
71
-                          @focus="showDialog(scope.$index, scope.row)"></el-input>
72
-              </el-form-item>
36
+                <el-autocomplete
37
+                    class="checkSearch"
38
+                    popper-class="my-autocomplete"
39
+                    v-model="scope.row.good_name"
40
+                    :fetch-suggestions="querySearchAsync"
41
+                    :trigger-on-focus="false"
42
+                    placeholder="请输入耗材名称"
43
+                    @select="handleSelect"
44
+                    @input="changeGoodName(scope.$index)"
45
+                    style="width:200px;"
46
+                  >
47
+                    <i class="el-icon-search el-input__icon" slot="suffix"></i>
48
+                  <template slot-scope="{ item }">
49
+                    <div class="name">{{ item.good_name +"  " +item.specification_name + "  "+item.manufacturer }}</div>
50
+                  </template>
51
+                 </el-autocomplete>
73
             </template>
52
             </template>
74
           </el-table-column>
53
           </el-table-column>
75
-          <el-table-column min-width="35" align="center">
54
+
55
+
56
+         <el-table-column align="center" width="300">
57
+            
76
             <template slot="header" slot-scope="scope">
58
             <template slot="header" slot-scope="scope">
77
-              <span>规格名称<span style="color: red">*</span></span>
59
+              <span>规格&单位<span style="color: red">*</span></span>
78
             </template>
60
             </template>
79
             <template slot-scope="scope">
61
             <template slot-scope="scope">
80
 
62
 
81
-              <el-form-item style="padding-top: 15px">
82
-                <el-input placeholder="请输入规格名称" v-model="scope.row.good_id"
83
-                          :value="specificationName(scope.row.good_id)"
84
-                          @focus="showDialog(scope.$index, scope.row)"></el-input>
63
+              <el-form-item style="padding-top: 20px">
64
+                <el-input placeholder="请输入规格名称" v-model="scope.row.name"></el-input>
85
               </el-form-item>
65
               </el-form-item>
86
 
66
 
87
             </template>
67
             </template>
88
-          </el-table-column>
68
+        </el-table-column>
89
 
69
 
90
 
70
 
91
-          <el-table-column min-width="23" align="center">
71
+          <el-table-column width="300" align="center">
92
             <template slot="header" slot-scope="scope">
72
             <template slot="header" slot-scope="scope">
93
               <span>退库数量<span style="color: red">*</span></span>
73
               <span>退库数量<span style="color: red">*</span></span>
94
             </template>
74
             </template>
96
               <el-form-item :prop="'recordData.' + scope.$index + '.count'" :rules='tableRules.count'
76
               <el-form-item :prop="'recordData.' + scope.$index + '.count'" :rules='tableRules.count'
97
                             style="padding-top: 17px">
77
                             style="padding-top: 17px">
98
                 <el-input type="number" v-model="scope.row.count"></el-input>
78
                 <el-input type="number" v-model="scope.row.count"></el-input>
79
+                {{scope.row.packing_unit}}
99
               </el-form-item>
80
               </el-form-item>
100
             </template>
81
             </template>
101
           </el-table-column>
82
           </el-table-column>
102
 
83
 
84
+          
85
+
103
           <el-table-column label="操作" align="center" min-width="20">
86
           <el-table-column label="操作" align="center" min-width="20">
104
             <template slot-scope="scope">
87
             <template slot-scope="scope">
105
               <el-tooltip class="item" effect="dark" content="新增" placement="top">
88
               <el-tooltip class="item" effect="dark" content="新增" placement="top">
136
 <script>
119
 <script>
137
   import { uParseTime } from '@/utils/tools'
120
   import { uParseTime } from '@/utils/tools'
138
 
121
 
139
-  import { deleteCancelStockInfo, editCancelStockInfo, getCancelStockConfig, getCancelStockInfo,GetAllGoodInfoByID,GetAllConfig  } from '@/api/stock'
122
+  import { deleteCancelStockInfo, editCancelStockInfo, getCancelStockConfig, getCancelStockInfo,GetAllGoodInfoByID,GetAllConfig,postSearchGoodList  } from '@/api/stock'
140
   import BreadCrumb from '../components/bread-crumb'
123
   import BreadCrumb from '../components/bread-crumb'
141
   import StockInDialog from './Dialog/stockInDialog'
124
   import StockInDialog from './Dialog/stockInDialog'
142
 
125
 
204
         dealer: [],
187
         dealer: [],
205
         goodType: [],
188
         goodType: [],
206
         goodInfo:[],
189
         goodInfo:[],
190
+        goodList:[],
191
+        manufacturerList:[],
192
+        dealerList:[],
207
       }
193
       }
208
     },
194
     },
209
     methods: {
195
     methods: {
410
             return false
396
             return false
411
           }
397
           }
412
         })
398
         })
413
-      }, GetOrderDetail: function(order_id) {
399
+      }, 
400
+      GetOrderDetail: function(order_id) {
414
         const params = {
401
         const params = {
415
           'id': order_id
402
           'id': order_id
416
         }
403
         }
419
             this.$message.error(response.data.msg)
406
             this.$message.error(response.data.msg)
420
             return false
407
             return false
421
           } else {
408
           } else {
409
+           
422
             for (let i = 0; i < response.data.data.list.length; i++) {
410
             for (let i = 0; i < response.data.data.list.length; i++) {
411
+              response.data.data.list[i].good_name = response.data.data.list[i].GoodInfo.good_name
412
+              response.data.data.list[i].name = response.data.data.list[i].GoodInfo.specification_name + "/" + response.data.data.list[i].GoodInfo.packing_unit
413
+              response.data.data.list[i].packing_unit = response.data.data.list[i].GoodInfo.packing_unit
423
               response.data.data.list[i].count = response.data.data.list[i].count.toString()
414
               response.data.data.list[i].count = response.data.data.list[i].count.toString()
424
               this.recordInfo.recordData.push(response.data.data.list[i])
415
               this.recordInfo.recordData.push(response.data.data.list[i])
425
             }
416
             }
441
         this.propForm.manufacturer = val
432
         this.propForm.manufacturer = val
442
       },changeDealer(val){
433
       },changeDealer(val){
443
         this.propForm.dealer = val
434
         this.propForm.dealer = val
435
+      },
436
+
437
+      querySearchAsync(keyword, cb) {
438
+        let key = '';
439
+        if (keyword != undefined) {
440
+          key = keyword
441
+        }
442
+        postSearchGoodList(key).then(response => {
443
+          if (response.data.state == 1) {
444
+           
445
+             var list = response.data.data.list
446
+             
447
+             this.goodList = list
448
+             var manufacturerList = response.data.data.manufacturerList
449
+             this.manufacturerList = manufacturerList
450
+             var dealer =  response.data.data.dealerList
451
+             this.dealerList = dealer
452
+             for(let i=0;i<this.goodList.length;i++){
453
+                for(let j=0;j<this.manufacturerList.length;j++){
454
+                  if(this.goodList[i].manufacturer == this.manufacturerList[j].id){
455
+                     this.goodList[i].manufacturer = this.manufacturerList[j].manufacturer_name
456
+                  }
457
+                }
458
+             }
459
+
460
+             for(let i=0;i<this.goodList.length;i++){
461
+               for(let j=0;j<this.dealerList.length;j++){
462
+                  if(this.goodList[i].dealer == this.dealerList[j].id){
463
+                    this.goodList[i].dealer = this.dealerList[j].dealer_name
464
+                  }
465
+               }
466
+             }
467
+           
468
+             cb(this.goodList)
469
+          } else {
470
+            cb([])
471
+          }
472
+        })
473
+      },
474
+      changeGoodName(val){
475
+        this.currentIndex = val
476
+      },
477
+      handleSelect(val){
478
+        console.log("val",val)
479
+         for(let i=0;i<this.recordInfo.recordData.length;i++){
480
+           if(this.currentIndex == i){
481
+              this.recordInfo.recordData[i].good_type_id = val.id
482
+              this.recordInfo.recordData[i].good_name = val.good_name
483
+              this.recordInfo.recordData[i].good_type_id = val.good_type_id
484
+              this.recordInfo.recordData[i].name = val.specification_name +"/"+val.packing_unit
485
+              this.recordInfo.recordData[i].number =  val.number
486
+              this.recordInfo.recordData[i].manufacturer = val.manufacturer
487
+              this.recordInfo.recordData[i].remark = val.remark
488
+              if(val.buy_price == 0){
489
+               this.recordInfo.recordData[i].price = ""
490
+              }else{
491
+                this.recordInfo.recordData[i].price = val.buy_price
492
+              }
493
+              
494
+              this.recordInfo.recordData[i].specification_name = val.specification_name
495
+              this.recordInfo.recordData[i].good_id = val.id
496
+              this.recordInfo.recordData[i].packing_unit = val.packing_unit
497
+              if(val.dealer == 0){
498
+                this.recordInfo.recordData[i].dealer = ""
499
+              }else{
500
+                this.recordInfo.recordData[i].dealer = val.dealer
501
+              }
502
+             
503
+           }
504
+         }
444
       }
505
       }
445
     },
506
     },
446
     created() {
507
     created() {

+ 6 - 6
src/xt_pages/stock/detail/cancelStockDetail.vue Datei anzeigen

11
     <el-button
11
     <el-button
12
       style="float: right;margin-right:10px"
12
       style="float: right;margin-right:10px"
13
       size="small"
13
       size="small"
14
-      icon="el-icon-printer"
15
       @click="exportList"
14
       @click="exportList"
16
       type="primary"
15
       type="primary"
17
       >导出
16
       >导出
65
       ></el-date-picker>
64
       ></el-date-picker>
66
     </div>
65
     </div>
67
 
66
 
68
-    <div class="cell clearfix">
67
+    <!-- <div class="cell clearfix">
69
       <label class="title"><span class="name">单据类型</span> : </label>
68
       <label class="title"><span class="name">单据类型</span> : </label>
70
       <el-select
69
       <el-select
71
         size="small"
70
         size="small"
82
         >
81
         >
83
         </el-option>
82
         </el-option>
84
       </el-select>
83
       </el-select>
85
-    </div>
84
+    </div> -->
86
 
85
 
87
-    <div class="cell clearfix">
86
+    <!-- <div class="cell clearfix">
88
       <label class="title"><span class="name">其它</span> : </label>
87
       <label class="title"><span class="name">其它</span> : </label>
89
       <el-select
88
       <el-select
90
         size="small"
89
         size="small"
101
         >
100
         >
102
         </el-option>
101
         </el-option>
103
       </el-select>
102
       </el-select>
104
-    </div>
103
+    </div> -->
105
 
104
 
106
     <el-row :gutter="12" style="margin-top: 10px">
105
     <el-row :gutter="12" style="margin-top: 10px">
107
       <el-table
106
       <el-table
563
           this.tableList[i].drug_spec =  this.specificationName(this.tableList[i].good_id)
562
           this.tableList[i].drug_spec =  this.specificationName(this.tableList[i].good_id)
564
           this.tableList[i].min_unit = this.getUnit(this.tableList[i].GoodInfo.good_unit)
563
           this.tableList[i].min_unit = this.getUnit(this.tableList[i].GoodInfo.good_unit)
565
           this.tableList[i].remark = this.tableList[i].GoodInfo.remark
564
           this.tableList[i].remark = this.tableList[i].GoodInfo.remark
565
+          this.tableList[i].packing_unit = this.tableList[i].packing_unit
566
          
566
          
567
         }
567
         }
568
        import('@/vendor/Export2Excel').then(excel => {
568
        import('@/vendor/Export2Excel').then(excel => {
569
        const tHeader = ['序号','耗材名称', '规格型号', '单位','数量','备注']
569
        const tHeader = ['序号','耗材名称', '规格型号', '单位','数量','备注']
570
-       const filterVal = ['index','drug_name', 'drug_spec', 'min_unit','count','remark']
570
+       const filterVal = ['index','drug_name', 'drug_spec', 'packing_unit','count','remark']
571
        
571
        
572
        const data = this.formatJson(filterVal, this.tableList)
572
        const data = this.formatJson(filterVal, this.tableList)
573
        console.log("data",data)
573
        console.log("data",data)

+ 3 - 7
src/xt_pages/stock/detail/print.vue Datei anzeigen

26
               <td style="line-height: 50px" width="250">耗材名称</td>
26
               <td style="line-height: 50px" width="250">耗材名称</td>
27
               <td style="line-height: 50px" width="250">规格型号</td>
27
               <td style="line-height: 50px" width="250">规格型号</td>
28
               <td style="line-height: 50px" width="50">单位</td>
28
               <td style="line-height: 50px" width="50">单位</td>
29
-              <!-- <td style="line-height: 50px" width="250">耗材类型</td> -->
30
-
31
-
29
+            
32
               <td style="line-height: 50px" width="80">数量</td>
30
               <td style="line-height: 50px" width="80">数量</td>
33
               <td style="line-height:50px" width="80" v-if="type == 1">进货价</td>
31
               <td style="line-height:50px" width="80" v-if="type == 1">进货价</td>
34
               <td style="line-height:50px" width="80" v-if="type == 3">出货价</td>
32
               <td style="line-height:50px" width="80" v-if="type == 3">出货价</td>
47
                 <span v-if="stock">{{stock.specification_name}}</span>
45
                 <span v-if="stock">{{stock.specification_name}}</span>
48
               </td>
46
               </td>
49
               <td style="line-height: 50px">
47
               <td style="line-height: 50px">
50
-                <span>{{getUnit(stock.good_unit)}}</span>
48
+                <span>{{stock.packing_unit}}</span>
51
               </td>
49
               </td>
52
-              <!-- <td style="line-height: 50px">
53
-                <span v-if="stock.type && stock.type.type_name.length > 0">{{stock.type.type_name}}</span>
54
-              </td> -->
50
+            
55
               <td style="line-height: 50px">
51
               <td style="line-height: 50px">
56
                 <span v-if="type == 3">
52
                 <span v-if="type == 3">
57
                   <span v-if="org_id == 10090">{{getWareOut(stock.id)}}</span>
53
                   <span v-if="org_id == 10090">{{getWareOut(stock.id)}}</span>

+ 12 - 11
src/xt_pages/stock/detail/stockInDetail.vue Datei anzeigen

12
     <el-button
12
     <el-button
13
       style="float: right;margin-right:10px"
13
       style="float: right;margin-right:10px"
14
       size="small"
14
       size="small"
15
-      icon="el-icon-printer"
16
       @click="exportList"
15
       @click="exportList"
17
       type="primary"
16
       type="primary"
18
       >导出
17
       >导出
67
       ></el-date-picker>
66
       ></el-date-picker>
68
     </div>
67
     </div>
69
 
68
 
70
-    <div class="cell clearfix">
69
+    <!-- <div class="cell clearfix">
71
       <label class="title"><span class="name">单据类型</span> : </label>
70
       <label class="title"><span class="name">单据类型</span> : </label>
72
       <el-select
71
       <el-select
73
         size="small"
72
         size="small"
84
         >
83
         >
85
         </el-option>
84
         </el-option>
86
       </el-select>
85
       </el-select>
87
-    </div>
86
+    </div> -->
88
 
87
 
89
-    <div class="cell clearfix">
88
+    <!-- <div class="cell clearfix">
90
       <label class="title"><span class="name">其它</span> : </label>
89
       <label class="title"><span class="name">其它</span> : </label>
91
       <el-select
90
       <el-select
92
         size="small"
91
         size="small"
103
         >
102
         >
104
         </el-option>
103
         </el-option>
105
       </el-select>
104
       </el-select>
106
-    </div>
105
+    </div> -->
107
 
106
 
108
     <el-row :gutter="12" style="margin-top: 10px">
107
     <el-row :gutter="12" style="margin-top: 10px">
109
       <el-table
108
       <el-table
143
           </template>
142
           </template>
144
         </el-table-column>
143
         </el-table-column>
145
 
144
 
146
-        <el-table-column label="单据类型" align="center">
145
+        <!-- <el-table-column label="单据类型" align="center">
147
           <template slot-scope="scope">
146
           <template slot-scope="scope">
148
             {{ getTypeName(scope.row) }}
147
             {{ getTypeName(scope.row) }}
149
           </template>
148
           </template>
150
-        </el-table-column>
149
+        </el-table-column> -->
151
 
150
 
152
         <el-table-column label="操作时间" align="center">
151
         <el-table-column label="操作时间" align="center">
153
           <template slot-scope="scope">
152
           <template slot-scope="scope">
742
           this.tableList[i].total = this.calTotal(this.tableList[i])
741
           this.tableList[i].total = this.calTotal(this.tableList[i])
743
           this.tableList[i].price = this.tableList[i].query_warehousing_info[0].price
742
           this.tableList[i].price = this.tableList[i].query_warehousing_info[0].price
744
           this.tableList[i].remark = this.tableList[i].query_warehousing_info[0].remark
743
           this.tableList[i].remark = this.tableList[i].query_warehousing_info[0].remark
745
-
744
+          this.tableList[i].packing_unit = this.tableList[i].packing_unit
746
         }
745
         }
747
-        console.log("总共条数",this.tableList)
746
+        console.log("总共条数555",this.tableList)
747
+         
748
         if(this.org_id == 10024){
748
         if(this.org_id == 10024){
749
           var arr = this.uniqueOne(this.tableList)
749
           var arr = this.uniqueOne(this.tableList)
750
           this.tableList = arr
750
           this.tableList = arr
753
         
753
         
754
           import('@/vendor/Export2Excel').then(excel => {
754
           import('@/vendor/Export2Excel').then(excel => {
755
           const tHeader = ['序号','耗材名称', '规格型号', '单位','数量','出货价','总价','备注']
755
           const tHeader = ['序号','耗材名称', '规格型号', '单位','数量','出货价','总价','备注']
756
-          const filterVal = ['index','good_name', 'specification_name', 'min_unit','count','price','total','remark']
756
+          const filterVal = ['index','good_name', 'specification_name', 'packing_unit','count','price','total','remark']
757
           
757
           
758
           const data = this.formatJson(filterVal, this.tableList)
758
           const data = this.formatJson(filterVal, this.tableList)
759
+
759
           console.log("data222222222",data)
760
           console.log("data222222222",data)
760
             excel.export_json_to_excel({
761
             excel.export_json_to_excel({
761
               header: tHeader,
762
               header: tHeader,
773
           
774
           
774
             import('@/vendor/Export2Excel').then(excel => {
775
             import('@/vendor/Export2Excel').then(excel => {
775
             const tHeader = ['序号','耗材名称', '规格型号', '单位','数量','出货价','总价','备注']
776
             const tHeader = ['序号','耗材名称', '规格型号', '单位','数量','出货价','总价','备注']
776
-            const filterVal = ['index','good_name', 'specification_name', 'min_unit','count','price','total','remark']
777
+            const filterVal = ['index','good_name', 'specification_name', 'packing_unit','count','price','total','remark']
777
             
778
             
778
             const data = this.formatJson(filterVal, this.tableList)
779
             const data = this.formatJson(filterVal, this.tableList)
779
             console.log("data222222222",data)
780
             console.log("data222222222",data)

+ 7 - 6
src/xt_pages/stock/detail/stockOutDetail.vue Datei anzeigen

11
      <el-button
11
      <el-button
12
       style="float: right;margin-right:10px"
12
       style="float: right;margin-right:10px"
13
       size="small"
13
       size="small"
14
-      icon="el-icon-printer"
15
       @click="exportList"
14
       @click="exportList"
16
       type="primary"
15
       type="primary"
17
       >导出
16
       >导出
65
       ></el-date-picker>
64
       ></el-date-picker>
66
     </div>
65
     </div>
67
 
66
 
68
-    <div class="cell clearfix">
67
+    <!-- <div class="cell clearfix">
69
       <label class="title"><span class="name">单据类型</span> : </label>
68
       <label class="title"><span class="name">单据类型</span> : </label>
70
       <el-select
69
       <el-select
71
         size="small"
70
         size="small"
82
         >
81
         >
83
         </el-option>
82
         </el-option>
84
       </el-select>
83
       </el-select>
85
-    </div>
84
+    </div> -->
86
 
85
 
87
-    <div class="cell clearfix">
86
+    <!-- <div class="cell clearfix">
88
       <label class="title"><span class="name">其它</span> : </label>
87
       <label class="title"><span class="name">其它</span> : </label>
89
       <el-select
88
       <el-select
90
         size="small"
89
         size="small"
101
         >
100
         >
102
         </el-option>
101
         </el-option>
103
       </el-select>
102
       </el-select>
104
-    </div>
103
+    </div> -->
105
 
104
 
106
     <el-row :gutter="12" style="margin-top: 10px">
105
     <el-row :gutter="12" style="margin-top: 10px">
107
       <el-table
106
       <el-table
756
          }
755
          }
757
       }
756
       }
758
       console.log('合并后',this.tableList)
757
       console.log('合并后',this.tableList)
758
+      
759
       var obj = {index:"合计",total:0}
759
       var obj = {index:"合计",total:0}
760
        obj.total = this.getTotalPrice()
760
        obj.total = this.getTotalPrice()
761
        for(let i=0;i<this.tableList.length;i++){
761
        for(let i=0;i<this.tableList.length;i++){
764
         this.tableList[i].count = this.getStockCount(this.tableList[i].id)
764
         this.tableList[i].count = this.getStockCount(this.tableList[i].id)
765
         this.tableList[i].total = (this.getStockCount(this.tableList[i].id) * this.tableList[i].buy_price).toFixed(2)
765
         this.tableList[i].total = (this.getStockCount(this.tableList[i].id) * this.tableList[i].buy_price).toFixed(2)
766
         this.tableList[i].remark = this.tableList[i].query_warehouseout_info[0].remark
766
         this.tableList[i].remark = this.tableList[i].query_warehouseout_info[0].remark
767
+        this.tableList[i].packing_unit = this.tableList[i].packing_unit
767
        }
768
        }
768
        var arr = this.unique(this.tableList)
769
        var arr = this.unique(this.tableList)
769
      
770
      
771
        this.tableList.push(obj)
772
        this.tableList.push(obj)
772
        import('@/vendor/Export2Excel').then(excel => {
773
        import('@/vendor/Export2Excel').then(excel => {
773
        const tHeader = ['序号','耗材名称', '规格型号', '单位','数量','出货价','总价','备注']
774
        const tHeader = ['序号','耗材名称', '规格型号', '单位','数量','出货价','总价','备注']
774
-       const filterVal = ['index','good_name', 'specification_name', 'min_unit','count','buy_price','total','remark']
775
+       const filterVal = ['index','good_name', 'specification_name', 'packing_unit','count','buy_price','total','remark']
775
 
776
 
776
        const data = this.formatJson(filterVal, this.tableList)
777
        const data = this.formatJson(filterVal, this.tableList)
777
        console.log("data",data)
778
        console.log("data",data)

+ 17 - 11
src/xt_pages/stock/drugs/components/drugInOrder.vue Datei anzeigen

12
      <el-button
12
      <el-button
13
       style="float: right;margin-right:10px"
13
       style="float: right;margin-right:10px"
14
       size="small"
14
       size="small"
15
-      icon="el-icon-printer"
16
       @click="exportList"
15
       @click="exportList"
17
       type="primary"
16
       type="primary"
18
       >导出
17
       >导出
24
         style="width: 400px;"
23
         style="width: 400px;"
25
         class="filter-item"
24
         class="filter-item"
26
         v-model.trim="searchKey"
25
         v-model.trim="searchKey"
27
-        placeholder="单据编码/制单人/规格名称"
26
+        placeholder="单据编码/制单人/药品名称"
28
       />
27
       />
29
       <el-button
28
       <el-button
30
         size="small"
29
         size="small"
67
       ></el-date-picker>
66
       ></el-date-picker>
68
     </div>
67
     </div>
69
 
68
 
70
-    <div class="cell clearfix">
69
+    <!-- <div class="cell clearfix">
71
       <label class="title"><span class="name">单据类型</span> : </label>
70
       <label class="title"><span class="name">单据类型</span> : </label>
72
       <el-select
71
       <el-select
73
         size="small"
72
         size="small"
84
         >
83
         >
85
         </el-option>
84
         </el-option>
86
       </el-select>
85
       </el-select>
87
-    </div>
86
+    </div> -->
88
 
87
 
89
-    <div class="cell clearfix">
88
+    <!-- <div class="cell clearfix">
90
       <label class="title"><span class="name">其它</span> : </label>
89
       <label class="title"><span class="name">其它</span> : </label>
91
       <el-select
90
       <el-select
92
         size="small"
91
         size="small"
103
         >
102
         >
104
         </el-option>
103
         </el-option>
105
       </el-select>
104
       </el-select>
106
-    </div>
105
+    </div> -->
107
 
106
 
108
     <el-row :gutter="12" style="margin-top: 10px">
107
     <el-row :gutter="12" style="margin-top: 10px">
109
       <el-table
108
       <el-table
141
 
140
 
142
         <el-table-column label="规格型号" align="center">
141
         <el-table-column label="规格型号" align="center">
143
           <template slot-scope="scope">
142
           <template slot-scope="scope">
144
-           {{scope.row.drug_spec}}
143
+           <!-- {{scope.row.drug_spec}} -->
144
+           {{scope.row.dose}}{{scope.row.dose_unit}} * {{scope.row.min_number}}{{scope.row.min_unit}} / {{scope.row.max_unit}}
145
           </template>
145
           </template>
146
         </el-table-column>
146
         </el-table-column>
147
 
147
 
148
-        <el-table-column label="单据类型" align="center">
148
+        <!-- <el-table-column label="单据类型" align="center">
149
           <template slot-scope="scope">
149
           <template slot-scope="scope">
150
             <span v-if="scope.row.type == 1">药品入库单</span>
150
             <span v-if="scope.row.type == 1">药品入库单</span>
151
             <span v-if="scope.row.type == 2">其他</span>
151
             <span v-if="scope.row.type == 2">其他</span>
152
           </template>
152
           </template>
153
-        </el-table-column>
153
+        </el-table-column> -->
154
 
154
 
155
         <el-table-column label="操作时间" align="center">
155
         <el-table-column label="操作时间" align="center">
156
           <template slot-scope="scope">
156
           <template slot-scope="scope">
379
                  warehousing_count:0,
379
                  warehousing_count:0,
380
                  price:item.price,
380
                  price:item.price,
381
                  remark:item.remark,
381
                  remark:item.remark,
382
-                 total_price:0
382
+                 total_price:0,
383
+                 dose:item.dose,
384
+                 dose_unit:item.dose_unit,
385
+                 min_number:item.min_number,
386
+                 max_unit:item.max_unit
383
                }
387
                }
384
              }
388
              }
385
           })
389
           })
429
      exportList(){
433
      exportList(){
430
         for(let i=0;i<this.tableList.length;i++){
434
         for(let i=0;i<this.tableList.length;i++){
431
           this.tableList[i].index = i+1
435
           this.tableList[i].index = i+1
436
+          this.tableList[i].unit = this.tableList[i].dose + this.tableList[i].dose_unit + "*" + this.tableList[i].min_number +this.tableList[i].min_unit +"/"+this.tableList[i].max_unit
432
         }
437
         }
438
+        
433
        import('@/vendor/Export2Excel').then(excel => {
439
        import('@/vendor/Export2Excel').then(excel => {
434
        const tHeader = ['序号','药品名称', '规格型号', '单位','数量','单价','总价','备注']
440
        const tHeader = ['序号','药品名称', '规格型号', '单位','数量','单价','总价','备注']
435
-       const filterVal = ['index','drug_name', 'drug_spec', 'min_unit','warehousing_count','price','total_price','remark']
441
+       const filterVal = ['index','drug_name', 'unit', 'min_unit','warehousing_count','price','total_price','remark']
436
        console.log("表格22222222",this.tableList)
442
        console.log("表格22222222",this.tableList)
437
        let obj = {'index':'合计','total_price':0}
443
        let obj = {'index':'合计','total_price':0}
438
        for(let i=0;i<this.tableList.length;i++){
444
        for(let i=0;i<this.tableList.length;i++){

+ 18 - 13
src/xt_pages/stock/drugs/components/drugOutDetail.vue Datei anzeigen

11
      <el-button
11
      <el-button
12
       style="float: right;margin-right:10px"
12
       style="float: right;margin-right:10px"
13
       size="small"
13
       size="small"
14
-      icon="el-icon-printer"
15
       @click="exportList"
14
       @click="exportList"
16
       type="primary"
15
       type="primary"
17
       >导出
16
       >导出
22
         style="width: 400px;"
21
         style="width: 400px;"
23
         class="filter-item"
22
         class="filter-item"
24
         v-model.trim="searchKey"
23
         v-model.trim="searchKey"
25
-        placeholder="单据编码/制单人/规格名称"
24
+        placeholder="单据编码/制单人/药品名称"
26
       />
25
       />
27
       <el-button
26
       <el-button
28
         size="small"
27
         size="small"
65
       ></el-date-picker>
64
       ></el-date-picker>
66
     </div>
65
     </div>
67
 
66
 
68
-    <div class="cell clearfix">
67
+    <!-- <div class="cell clearfix">
69
       <label class="title"><span class="name">单据类型</span> : </label>
68
       <label class="title"><span class="name">单据类型</span> : </label>
70
       <el-select
69
       <el-select
71
         size="small"
70
         size="small"
82
         >
81
         >
83
         </el-option>
82
         </el-option>
84
       </el-select>
83
       </el-select>
85
-    </div>
84
+    </div> -->
86
 
85
 
87
-    <div class="cell clearfix">
86
+    <!-- <div class="cell clearfix">
88
       <label class="title"><span class="name">其它</span> : </label>
87
       <label class="title"><span class="name">其它</span> : </label>
89
       <el-select
88
       <el-select
90
         size="small"
89
         size="small"
101
         >
100
         >
102
         </el-option>
101
         </el-option>
103
       </el-select>
102
       </el-select>
104
-    </div>
103
+    </div> -->
105
 
104
 
106
     <el-row :gutter="12" style="margin-top: 10px">
105
     <el-row :gutter="12" style="margin-top: 10px">
107
       <el-table
106
       <el-table
139
 
138
 
140
         <el-table-column label="规格型号" align="center">
139
         <el-table-column label="规格型号" align="center">
141
           <template slot-scope="scope">
140
           <template slot-scope="scope">
142
-           {{scope.row.drug_spec}}
141
+           <!-- {{scope.row.drug_spec}} -->
142
+           {{scope.row.dose}}{{scope.row.dose_unit}}*{{scope.row.min_number}}{{scope.row.min_unit}}/{{scope.row.max_unit}}
143
           </template>
143
           </template>
144
         </el-table-column>
144
         </el-table-column>
145
 
145
 
146
-        <el-table-column label="单据类型" align="center">
146
+        <!-- <el-table-column label="单据类型" align="center">
147
           <template slot-scope="scope">
147
           <template slot-scope="scope">
148
             <span v-if="scope.row.type == 1">药品出库单</span>
148
             <span v-if="scope.row.type == 1">药品出库单</span>
149
             <span v-if="scope.row.type == 2">其他</span>
149
             <span v-if="scope.row.type == 2">其他</span>
150
           </template>
150
           </template>
151
-        </el-table-column>
151
+        </el-table-column> -->
152
 
152
 
153
         <el-table-column label="操作时间" align="center">
153
         <el-table-column label="操作时间" align="center">
154
           <template slot-scope="scope">
154
           <template slot-scope="scope">
405
                  price:item.price,
405
                  price:item.price,
406
                  remark:item.remark,
406
                  remark:item.remark,
407
                  total_price:0,
407
                  total_price:0,
408
+                 dose:item.dose,
409
+                 dose_unit:item.dose_unit,
410
+                 min_number:item.min_number,
411
+                 max_unit:item.max_unit
408
                }
412
                }
409
              }
413
              }
410
           })
414
           })
411
           let list = Object.values(objInfo);
415
           let list = Object.values(objInfo);
412
-          console.log("list2334444",list)
416
+          
413
           for(let i=0;i<order.length;i++){
417
           for(let i=0;i<order.length;i++){
414
             list.map(item=>{
418
             list.map(item=>{
415
               if(order[i].drug_id == item.drug_id){
419
               if(order[i].drug_id == item.drug_id){
418
             })
422
             })
419
           }
423
           }
420
           
424
           
421
-          console.log("list22333333",list)
425
+         
422
           for(let i=0;i<list.length;i++){
426
           for(let i=0;i<list.length;i++){
423
             for(let j=0;j<list[i].child.length;j++){
427
             for(let j=0;j<list[i].child.length;j++){
424
               if(list[i].child[j].count!=null || list[i].child[j].count != "" || list[i].child[j].count!=0){
428
               if(list[i].child[j].count!=null || list[i].child[j].count != "" || list[i].child[j].count!=0){
429
           for(let i=0;i<list.length;i++){
433
           for(let i=0;i<list.length;i++){
430
              list[i].total_price = list[i].count * list[i].price
434
              list[i].total_price = list[i].count * list[i].price
431
           }
435
           }
432
-          console.log("list666666666",list)
436
+         
433
           this.tableList = list
437
           this.tableList = list
434
           var total = response.data.data.total
438
           var total = response.data.data.total
435
           this.total = total
439
           this.total = total
464
         }
468
         }
465
         for(let i=0;i<this.tableList.length;i++){
469
         for(let i=0;i<this.tableList.length;i++){
466
            this.tableList[i].total_price = this.tableList[i].last_price * this.tableList[i].count
470
            this.tableList[i].total_price = this.tableList[i].last_price * this.tableList[i].count
471
+           this.tableList[i].unit = this.tableList[i].dose + this.tableList[i].dose_unit + "*" + this.tableList[i].min_number +this.tableList[i].min_unit +"/"+this.tableList[i].max_unit
467
         }
472
         }
468
        console.log("列表数据333333333",this.tableList)
473
        console.log("列表数据333333333",this.tableList)
469
       
474
       
470
        import('@/vendor/Export2Excel').then(excel => {
475
        import('@/vendor/Export2Excel').then(excel => {
471
        const tHeader = ['序号','药品名称', '规格型号', '单位','数量','单价','总价','备注']
476
        const tHeader = ['序号','药品名称', '规格型号', '单位','数量','单价','总价','备注']
472
-       const filterVal = ['index','drug_name', 'drug_spec', 'min_unit','count','last_price','total_price','remark']
477
+       const filterVal = ['index','drug_name', 'unit', 'min_unit','count','last_price','total_price','remark']
473
        let obj = {'index':'合计','total_price':0}
478
        let obj = {'index':'合计','total_price':0}
474
        for(let i=0;i<this.tableList.length;i++){
479
        for(let i=0;i<this.tableList.length;i++){
475
          obj.total_price += (this.tableList[i].last_price * this.tableList[i].count)
480
          obj.total_price += (this.tableList[i].last_price * this.tableList[i].count)

+ 4 - 4
src/xt_pages/stock/drugs/drugIndex.vue Datei anzeigen

9
           <el-tab-pane label="入库明细" name="first">
9
           <el-tab-pane label="入库明细" name="first">
10
             <drug-in-order></drug-in-order>
10
             <drug-in-order></drug-in-order>
11
           </el-tab-pane>
11
           </el-tab-pane>
12
-          <el-tab-pane label="退货明细">
12
+          <!-- <el-tab-pane label="退货明细">
13
             <drug-cancel-order></drug-cancel-order>
13
             <drug-cancel-order></drug-cancel-order>
14
-          </el-tab-pane>
14
+          </el-tab-pane> -->
15
           <el-tab-pane label="出库明细">
15
           <el-tab-pane label="出库明细">
16
             <drug-out-detail></drug-out-detail>
16
             <drug-out-detail></drug-out-detail>
17
           </el-tab-pane>
17
           </el-tab-pane>
18
-          <el-tab-pane label="退库明细">
18
+          <!-- <el-tab-pane label="退库明细">
19
             <drug-cancel-detail></drug-cancel-detail>
19
             <drug-cancel-detail></drug-cancel-detail>
20
-          </el-tab-pane>
20
+          </el-tab-pane> -->
21
 
21
 
22
         </el-tabs>
22
         </el-tabs>
23
       </div>
23
       </div>

+ 5 - 1
src/xt_pages/stock/drugs/drugOutOrderPrint.vue Datei anzeigen

34
                 <span>{{item.drug_name}}</span>
34
                 <span>{{item.drug_name}}</span>
35
               </td>
35
               </td>
36
               <td style="line-height: 50px">
36
               <td style="line-height: 50px">
37
-                <span>{{item.drug_spec}}</span>
37
+                <span>{{item.dose}}{{item.dose_unit}}*{{item.min_number}}{{item.min_unit}}/{{item.max_unit}}</span>
38
               </td>
38
               </td>
39
               <td style="line-height: 50px">
39
               <td style="line-height: 50px">
40
                 <span>{{item.min_unit}}</span>
40
                 <span>{{item.min_unit}}</span>
187
                  price:item.price,
187
                  price:item.price,
188
                  remark:item.remark,
188
                  remark:item.remark,
189
                  total_price:"",
189
                  total_price:"",
190
+                 dose:item.dose,
191
+                 dose_unit:item.dose_unit,
192
+                 min_number:item.min_number,
193
+                 max_unit:item.max_unit
190
                }
194
                }
191
              }
195
              }
192
           })
196
           })

+ 6 - 1
src/xt_pages/stock/drugs/drugPrint.vue Datei anzeigen

34
                 <span>{{item.drug_name}}</span>
34
                 <span>{{item.drug_name}}</span>
35
               </td>
35
               </td>
36
               <td style="line-height: 50px">
36
               <td style="line-height: 50px">
37
-                <span>{{item.drug_spec}}</span>
37
+                <!-- <span>{{item.drug_spec}}</span> -->
38
+                <span>{{item.dose}}{{item.dose_unit}}*{{item.min_number}}{{item.min_unit}}/{{item.max_unit}}</span>
38
               </td>
39
               </td>
39
               <td style="line-height: 50px">
40
               <td style="line-height: 50px">
40
                 <span>{{item.min_unit}}</span>
41
                 <span>{{item.min_unit}}</span>
182
                  warehousing_count:0,
183
                  warehousing_count:0,
183
                  price:item.price,
184
                  price:item.price,
184
                  remark:item.remark,
185
                  remark:item.remark,
186
+                 dose:item.dose,
187
+                 dose_unit:item.dose_unit,
188
+                 min_number:item.min_number,
189
+                 max_unit:item.max_unit
185
                }
190
                }
186
              }
191
              }
187
           })
192
           })

+ 3 - 2
src/xt_pages/stock/drugs/drugStockFlow.vue Datei anzeigen

64
         </el-table-column>
64
         </el-table-column>
65
         <el-table-column prop="drug_type" label="出入库方式" width="180" align="center">
65
         <el-table-column prop="drug_type" label="出入库方式" width="180" align="center">
66
            <template slot-scope="scope">
66
            <template slot-scope="scope">
67
-             <span v-if="scope.row.drug_way == 4">采购入库</span>
67
+             <span v-if="scope.row.drug_way == 4">手动入库</span>
68
              <span v-if="scope.row.drug_way == 2">自动出库</span>
68
              <span v-if="scope.row.drug_way == 2">自动出库</span>
69
              <span v-if="scope.row.drug_way == 1">手动出库</span>
69
              <span v-if="scope.row.drug_way == 1">手动出库</span>
70
            </template>
70
            </template>
89
         </el-table-column>
89
         </el-table-column>
90
          <el-table-column prop="drug_name" label="剩余库存量" align="center">
90
          <el-table-column prop="drug_name" label="剩余库存量" align="center">
91
            <template slot-scope="scope">
91
            <template slot-scope="scope">
92
+             <!-- {{getCountTwo(this.$route.query.drug_id,this.$route.query.min_number,this.$route.query.max_unit,this.$route.query.min_unit)}} -->
92
                {{getCountTwo(scope.row.drug_id,scope.row.min_number,scope.row.max_unit,scope.row.min_unit)}}
93
                {{getCountTwo(scope.row.drug_id,scope.row.min_number,scope.row.max_unit,scope.row.min_unit)}}
93
               <!-- {{getInCount(scope.row.drug_id) - getOutCount(scope.row.drug_id) - getAutoCount(scope.row.drug_id)}} -->
94
               <!-- {{getInCount(scope.row.drug_id) - getOutCount(scope.row.drug_id) - getAutoCount(scope.row.drug_id)}} -->
94
              <span></span>
95
              <span></span>
218
           {id:0,name:"全部"},
219
           {id:0,name:"全部"},
219
           {id:1,name:"手动出库"},
220
           {id:1,name:"手动出库"},
220
           {id:2,name:"自动出库"},
221
           {id:2,name:"自动出库"},
221
-          {id:3,name:"采购入库"},
222
+          {id:3,name:"手动入库"},
222
 
223
 
223
         ],
224
         ],
224
         outList:[],
225
         outList:[],

+ 24 - 34
src/xt_pages/stock/drugs/drugStockInOrder.vue Datei anzeigen

20
           style="width: 400px;"
20
           style="width: 400px;"
21
           v-model.trim="searchKey"
21
           v-model.trim="searchKey"
22
           class="filter-item"
22
           class="filter-item"
23
-          placeholder="单据编码/制单人/厂商"
23
+          placeholder="单据编码/制单人/药品名称"
24
         />
24
         />
25
         <el-button
25
         <el-button
26
           size="small"
26
           size="small"
111
           </template>
111
           </template>
112
         </el-table-column>
112
         </el-table-column>
113
 
113
 
114
-        <!-- <el-table-column label="厂家" align="center">
115
-          <template slot-scope="scope">
116
-            {{scope.row.manufacturers ? scope.row.manufacturers.manufacturer_name:''}}
117
-          </template>
118
-        </el-table-column>
119
-
120
-        <el-table-column label="经销商" align="center">
121
-          <template slot-scope="scope">
122
-            {{scope.row.dealers ? scope.row.dealers.dealer_name:''}}
123
-          </template>
124
-        </el-table-column> -->
125
-
126
         <el-table-column label="操作" align="center" width="240">
114
         <el-table-column label="操作" align="center" width="240">
127
           <template slot-scope="scope">
115
           <template slot-scope="scope">
128
 
116
 
129
-             <!-- <el-tooltip
130
-              class="item"
131
-              effect="dark"
132
-              content="详情"
133
-              placement="top"
134
-            >
135
-              <el-button
136
-                size="small"
137
-                type="warning"
138
-                icon="el-icon-document"
139
-                @click="handleSearch(scope.row.id)"
140
-              >
141
-              </el-button>
142
-            </el-tooltip> -->
143
-            
144
             <el-tooltip
117
             <el-tooltip
145
               class="item"
118
               class="item"
146
               effect="dark"
119
               effect="dark"
217
         </el-table-column>
190
         </el-table-column>
218
         <el-table-column label="批号" align="center">
191
         <el-table-column label="批号" align="center">
219
           <template slot-scope="scope">
192
           <template slot-scope="scope">
220
-            {{scope.row.number}}
193
+            {{scope.row.batch_number}}
221
           </template>
194
           </template>
222
         </el-table-column>
195
         </el-table-column>
223
         <el-table-column label="入库数量" align="center">
196
         <el-table-column label="入库数量" align="center">
224
           <template slot-scope="scope">
197
           <template slot-scope="scope">
225
-            {{scope.row.warehousing_count}}
198
+            {{scope.row.warehousing_count}}{{scope.row.drug.max_unit}}
226
           </template>
199
           </template>
227
         </el-table-column>
200
         </el-table-column>
228
         <el-table-column label="进货价" align="center">
201
         <el-table-column label="进货价" align="center">
249
           <template slot-scope="scope">
222
           <template slot-scope="scope">
250
             {{getTime(scope.row.expiry_date)}}
223
             {{getTime(scope.row.expiry_date)}}
251
           </template>
224
           </template>
225
+        </el-table-column>
226
+         <el-table-column label="经销商" align="center">
227
+          <template slot-scope="scope">
228
+            {{getDealer(scope.row.dealer)}}
229
+          </template>
252
         </el-table-column>
230
         </el-table-column>
253
         <el-table-column label="批准文号" align="center">
231
         <el-table-column label="批准文号" align="center">
254
           <template slot-scope="scope">
232
           <template slot-scope="scope">
443
       showOne:false,
421
       showOne:false,
444
       drugTypeList:[],
422
       drugTypeList:[],
445
       manufacturerList:[],
423
       manufacturerList:[],
446
-      order_id:""
424
+      order_id:"",
425
+      dealerList:[]
447
     };
426
     };
448
   },
427
   },
449
   methods: {
428
   methods: {
456
         type: this.type,
435
         type: this.type,
457
         keywords: this.searchKey
436
         keywords: this.searchKey
458
       };
437
       };
438
+      console.log("parasm2222222",Params)
459
       this.Warehouse.warehouseDate = [];
439
       this.Warehouse.warehouseDate = [];
460
       getDrugWarehouseList(Params).then(response => {
440
       getDrugWarehouseList(Params).then(response => {
461
         if (response.data.state == 0) {
441
         if (response.data.state == 0) {
478
         limit: this.limit,
458
         limit: this.limit,
479
         start_time: this.start_time,
459
         start_time: this.start_time,
480
         end_time: this.end_time,
460
         end_time: this.end_time,
481
-        type: this.type
461
+        type: this.type,
462
+        keywords:this.searchKey,
482
       };
463
       };
483
-      console.log("params",Params)
484
       this.Warehouse.warehouseDate = [];
464
       this.Warehouse.warehouseDate = [];
485
       getDrugWarehouseList(Params).then(response => {
465
       getDrugWarehouseList(Params).then(response => {
486
         if (response.data.state == 0) {
466
         if (response.data.state == 0) {
493
           for (let i = 0; i < response.data.data.list.length; i++) {
473
           for (let i = 0; i < response.data.data.list.length; i++) {
494
             this.Warehouse.warehouseDate.push(response.data.data.list[i]);
474
             this.Warehouse.warehouseDate.push(response.data.data.list[i]);
495
           }
475
           }
496
-          console.log("列表",this.warehouse.warehouseDate)
476
+          console.log("列表999988888",this.warehouse.warehouseDate)
497
         }
477
         }
498
       });
478
       });
499
     },
479
     },
781
           if(response.data.state == 1){
761
           if(response.data.state == 1){
782
             var manufacturerList = response.data.data.manufacturerList
762
             var manufacturerList = response.data.data.manufacturerList
783
             this.manufacturerList = manufacturerList
763
             this.manufacturerList = manufacturerList
764
+            this.dealerList = response.data.data.dealerList
784
           }
765
           }
785
        })
766
        })
786
      },
767
      },
793
         }
774
         }
794
         return name
775
         return name
795
      },
776
      },
777
+     getDealer(id){
778
+       var name = ""
779
+       for(let i=0;i<this.dealerList.length;i++){
780
+          if(id == this.dealerList[i].id){
781
+             name = this.dealerList[i].dealer_name
782
+          }
783
+       }
784
+      return name
785
+     },
796
      getDictionaryDataConfig(module, filed_name) {
786
      getDictionaryDataConfig(module, filed_name) {
797
         return getDictionaryDataConfig(module, filed_name)
787
         return getDictionaryDataConfig(module, filed_name)
798
       },
788
       },

+ 56 - 29
src/xt_pages/stock/drugs/drugStockInOrderAdd.vue Datei anzeigen

31
          <!-- <div class="titleOne">当前进货价合计:</div> -->
31
          <!-- <div class="titleOne">当前进货价合计:</div> -->
32
       </div>
32
       </div>
33
      
33
      
34
-      <!-- <div class="cell clearfix">
35
-        <label class="title"><span class="name">经销商</span> : </label>
36
-        <el-select size="small" v-model="form.dealer" filterable placeholder="请选择经销商" @change="changeDealer">
37
-          <el-option
38
-            v-for="(option, index) in dealer"
39
-            :key="index"
40
-            :label="option.dealer_name"
41
-            :value="option.id">
42
-          </el-option>
43
-        </el-select>
44
-      </div> -->
45
-
46
-      <!-- <div class="cell clearfix">
47
-        <label class="title"><span class="name">厂商</span> : </label>
48
-
49
-        <el-select size="small" v-model="form.manufacturer" filterable placeholder="请选择厂商"
50
-                   @change="changeManufacturer">
51
-          <el-option
52
-            v-for="(option, index) in manufacturer"
53
-            :key="index"
54
-            :label="option.manufacturer_name"
55
-            :value="option.id">
56
-          </el-option>
57
-        </el-select>
58
-      </div> -->
34
+     
59
 
35
 
60
       <el-form :rules="tableRules" :model="recordInfo" ref="tableForm">
36
       <el-form :rules="tableRules" :model="recordInfo" ref="tableForm">
61
         <el-table
37
         <el-table
130
                 <el-form-item style="padding-top: 20px">
106
                 <el-form-item style="padding-top: 20px">
131
                   <el-input
107
                   <el-input
132
                     placeholder="请输入批号"
108
                     placeholder="请输入批号"
133
-                    v-model="scope.row.lot_number"
109
+                    v-model="scope.row.batch_number"
134
                   ></el-input>
110
                   ></el-input>
135
                 </el-form-item>
111
                 </el-form-item>
136
               </template>
112
               </template>
223
               ></el-date-picker>
199
               ></el-date-picker>
224
             </template>
200
             </template>
225
           </el-table-column>
201
           </el-table-column>
202
+
203
+
204
+      <el-table-column label="经销商" width="140" align="center">
205
+          <template slot-scope="scope">
206
+              <el-select v-model="scope.row.dealer" filterable placeholder="请选择厂商">
207
+              <el-option
208
+                v-for="(option, index) in dealerList"
209
+                :key="index"
210
+                :label="option.dealer_name"
211
+                :value="option.id">
212
+              </el-option>
213
+              </el-select>
214
+          </template>
215
+        </el-table-column>
226
         
216
         
227
         <el-table-column align="center" width="150" label="批准文号">
217
         <el-table-column align="center" width="150" label="批准文号">
228
             <template slot-scope="scope">
218
             <template slot-scope="scope">
229
               <el-form-item style="padding-top: 20px">
219
               <el-form-item style="padding-top: 20px">
230
                 <el-input
220
                 <el-input
231
                   placeholder="请输入批准文号"
221
                   placeholder="请输入批准文号"
232
-                  v-model="scope.row.batch_number"
222
+                  v-model="scope.row.number"
233
                 ></el-input>
223
                 ></el-input>
234
               </el-form-item>
224
               </el-form-item>
235
             </template>
225
             </template>
405
         goodInfo:[],
395
         goodInfo:[],
406
         drugList:[],
396
         drugList:[],
407
         manufacturerList:[],
397
         manufacturerList:[],
398
+        dealerList:[],
408
         showOne:true,
399
         showOne:true,
409
         showTwo:false,
400
         showTwo:false,
410
         drugTypeList:[],
401
         drugTypeList:[],
550
         tempObj['batch_number'] = ''
541
         tempObj['batch_number'] = ''
551
         tempObj['dose']= ''
542
         tempObj['dose']= ''
552
         tempObj['dose_unit']=''
543
         tempObj['dose_unit']=''
544
+        tempObj['dealer'] = ''
553
         this.recordInfo.recordData.push(tempObj)
545
         this.recordInfo.recordData.push(tempObj)
554
       }, handleDelete: function(index, row) {
546
       }, handleDelete: function(index, row) {
555
         if (this.recordInfo.recordData.length <= 1) {
547
         if (this.recordInfo.recordData.length <= 1) {
676
               return
668
               return
677
             }
669
             }
678
             for(let i=0;i<this.recordInfo.recordData.length;i++){
670
             for(let i=0;i<this.recordInfo.recordData.length;i++){
671
+             if(this.recordInfo.recordData[i].dealer == ""){
672
+                this.recordInfo.recordData[i].dealer = 0
673
+             }
679
                this.recordInfo.recordData[i].last_price = this.recordInfo.recordData[i].last_price.toString()
674
                this.recordInfo.recordData[i].last_price = this.recordInfo.recordData[i].last_price.toString()
675
+             if(this.recordInfo.recordData[i].dealer == ""){
676
+                this.recordInfo.recordData[i].dealer = 0
677
+             }
678
+              for(let j=0;j<this.manufacturerList.length;j++){
679
+                 if(this.recordInfo.recordData[i].manufacturer == this.manufacturerList[j].manufacturer_name){
680
+                      this.recordInfo.recordData[i].manufacturer =  this.manufacturerList[j].id
681
+                 }
682
+              }
683
+
684
+              for(let z=0;z<this.dealerList.length;z++){
685
+                if(this.recordInfo.recordData[i].dealer == this.dealerList[z].dealer_name){
686
+                   this.recordInfo.recordData[i].dealer = this.dealerList[z].id
687
+                }
688
+              }
680
             }
689
             }
681
             const params = {
690
             const params = {
682
               'stockIn': this.recordInfo.recordData
691
               'stockIn': this.recordInfo.recordData
753
              this.drugList = list
762
              this.drugList = list
754
              var manufacturerList = response.data.data.manufacturerList
763
              var manufacturerList = response.data.data.manufacturerList
755
              this.manufacturerList = manufacturerList
764
              this.manufacturerList = manufacturerList
765
+             var dealerList = response.data.data.dealerList
766
+             this.dealerList = dealerList
756
              for(let i=0;i<this.drugList.length;i++){
767
              for(let i=0;i<this.drugList.length;i++){
757
              
768
              
758
                 for(let j=0;j<this.manufacturerList.length;j++){
769
                 for(let j=0;j<this.manufacturerList.length;j++){
760
                      this.drugList[i].manufacturer = this.manufacturerList[j].manufacturer_name
771
                      this.drugList[i].manufacturer = this.manufacturerList[j].manufacturer_name
761
                   }
772
                   }
762
                 }
773
                 }
774
+               
775
+
776
+                for(let z=0;z<dealerList.length;z++){
777
+                  if(this.drugList[i].dealer == this.dealerList[z].id){
778
+                      this.drugList[i].dealer = this.dealerList[z].dealer_name
779
+                  }
780
+               
781
+                }
763
              }
782
              }
783
+            
784
+            
764
            
785
            
765
              cb(this.drugList)
786
              cb(this.drugList)
766
           } else {
787
           } else {
780
              this.recordInfo.recordData[i].name  = val.dose +val.dose_unit+"*"+val.min_number+ val.min_unit+"/"+val.max_unit
801
              this.recordInfo.recordData[i].name  = val.dose +val.dose_unit+"*"+val.min_number+ val.min_unit+"/"+val.max_unit
781
              this.recordInfo.recordData[i].last_price = val.last_price
802
              this.recordInfo.recordData[i].last_price = val.last_price
782
              this.recordInfo.recordData[i].manufacturer =  val.manufacturer
803
              this.recordInfo.recordData[i].manufacturer =  val.manufacturer
783
-             this.recordInfo.recordData[i].batch_number = val.number
804
+             this.recordInfo.recordData[i].number =  val.number
784
              this.recordInfo.recordData[i].max_unit = val.max_unit
805
              this.recordInfo.recordData[i].max_unit = val.max_unit
785
              this.recordInfo.recordData[i].min_unit = val.min_unit
806
              this.recordInfo.recordData[i].min_unit = val.min_unit
807
+             if(val.dealer == 0){
808
+               this.recordInfo.recordData[i].dealer = ""
809
+             }else{
810
+               this.recordInfo.recordData[i].dealer = val.dealer
811
+             }
812
+            
786
            }
813
            }
787
         }
814
         }
788
         console.log("333333",this.recordInfo.recordData)
815
         console.log("333333",this.recordInfo.recordData)
822
       tempObj['batch_number'] = ''
849
       tempObj['batch_number'] = ''
823
       tempObj['drug_type'] = ''
850
       tempObj['drug_type'] = ''
824
       tempObj['batch_number'] = ''
851
       tempObj['batch_number'] = ''
825
-      
852
+      tempObj['dealer'] = ''
826
       this.recordInfo.recordData.push(tempObj)
853
       this.recordInfo.recordData.push(tempObj)
827
       
854
       
828
       this.GetConfigInfo()
855
       this.GetConfigInfo()

+ 1 - 1
src/xt_pages/stock/drugs/drugStockInOrderDetailPrint.vue Datei anzeigen

36
               <td style="line-height: 18px">
36
               <td style="line-height: 18px">
37
                  <span v-if="item.drug_id != 0">{{item.drug_name}}</span>
37
                  <span v-if="item.drug_id != 0">{{item.drug_name}}</span>
38
               </td>
38
               </td>
39
-              <td style="line-height: 18px">{{ item.remark }}</td>
39
+              <td style="line-height: 18px">{{ item.number }}</td>
40
               <td style="line-height: 18px">
40
               <td style="line-height: 18px">
41
                  <span v-if="item.drug_id != 0">{{item.dose}}{{item.dose_unit}}*{{item.min_number}}{{item.min_unit}}/{{item.max_unit}}</span>
41
                  <span v-if="item.drug_id != 0">{{item.dose}}{{item.dose_unit}}*{{item.min_number}}{{item.min_unit}}/{{item.max_unit}}</span>
42
               </td>
42
               </td>

+ 71 - 5
src/xt_pages/stock/drugs/drugStockInOrderEdit.vue Datei anzeigen

171
                   <el-form-item style="padding-top: 20px">
171
                   <el-form-item style="padding-top: 20px">
172
                     <el-input
172
                     <el-input
173
                       placeholder="请输入批号"
173
                       placeholder="请输入批号"
174
-                      v-model="scope.row.lot_number"
174
+                      v-model="scope.row.batch_number"
175
                     ></el-input>
175
                     ></el-input>
176
                   </el-form-item>
176
                   </el-form-item>
177
                 </template>
177
                 </template>
266
               ></el-date-picker>
266
               ></el-date-picker>
267
             </template>
267
             </template>
268
           </el-table-column>
268
           </el-table-column>
269
+
270
+          <el-table-column label="经销商" width="140" align="center">
271
+            <template slot-scope="scope">
272
+                <el-select v-model="scope.row.dealer" filterable placeholder="请选择厂商">
273
+                <el-option
274
+                  v-for="(option, index) in dealerList"
275
+                  :key="index"
276
+                  :label="option.dealer_name"
277
+                  :value="option.id">
278
+                </el-option>
279
+                </el-select>
280
+            </template>
281
+          </el-table-column>
282
+
283
+          
284
+        <el-table-column align="center" width="150" label="批准文号">
285
+            <template slot-scope="scope">
286
+              <el-form-item style="padding-top: 20px">
287
+                <el-input
288
+                  placeholder="请输入批准文号"
289
+                  v-model="scope.row.number"
290
+                ></el-input>
291
+              </el-form-item>
292
+            </template>
293
+          </el-table-column>
269
  
294
  
270
           <el-table-column label="备注" width="150" align="center">
295
           <el-table-column label="备注" width="150" align="center">
271
             <template slot-scope="scope">
296
             <template slot-scope="scope">
402
       goodInfo:[],
427
       goodInfo:[],
403
       drugList:[],
428
       drugList:[],
404
       manufacturerList:[],
429
       manufacturerList:[],
430
+      dealerList:[],
405
     };
431
     };
406
   },
432
   },
407
   methods: {
433
   methods: {
637
                  this.recordInfo.recordData[i].manufacturer = this.manufacturerList[j].id
663
                  this.recordInfo.recordData[i].manufacturer = this.manufacturerList[j].id
638
                }
664
                }
639
             }
665
             }
666
+
667
+            for(let z=0;z<this.dealerList.length;z++){
668
+              if(this.recordInfo.recordData[i].dealer == this.dealerList[z].dealer_name){
669
+                  this.recordInfo.recordData[i].dealer = this.dealerList[z].id
670
+              }
671
+            }
640
             
672
             
641
           }
673
           }
642
           const params = {
674
           const params = {
678
        
710
        
679
           var manufacturerList = response.data.data.manufacturerList
711
           var manufacturerList = response.data.data.manufacturerList
680
           console.log("000000000000",response.data.data.info)
712
           console.log("000000000000",response.data.data.info)
713
+          this.manufacturerList = manufacturerList
714
+          var dealerList  = response.data.data.dealerList
715
+          this.dealerList = dealerList
681
           for (let i = 0; i < response.data.data.info.length; i++) {
716
           for (let i = 0; i < response.data.data.info.length; i++) {
682
             response.data.data.info[i].product_date = this.getTime(
717
             response.data.data.info[i].product_date = this.getTime(
683
               response.data.data.info[i].product_date,
718
               response.data.data.info[i].product_date,
708
            if(response.data.data.info[i].manufacturer == 0){
743
            if(response.data.data.info[i].manufacturer == 0){
709
                response.data.data.info[i].manufacturer = ""
744
                response.data.data.info[i].manufacturer = ""
710
             }
745
             }
746
+
747
+           if(response.data.data.info[i].dealer == 0){
748
+               response.data.data.info[i].dealer = ""
749
+            }
711
           
750
           
712
             this.recordInfo.recordData.push(response.data.data.info[i]);
751
             this.recordInfo.recordData.push(response.data.data.info[i]);
713
            
752
            
716
                  response.data.data.info[i].manufacturer = manufacturerList[j].manufacturer_name
755
                  response.data.data.info[i].manufacturer = manufacturerList[j].manufacturer_name
717
                }
756
                }
718
             }
757
             }
758
+
759
+            for(let z=0;z<dealerList.length;z++){
760
+               if(response.data.data.info[i].dealer == dealerList[z].id){
761
+                 response.data.data.info[i].dealer = dealerList[z].dealer_name
762
+               }
763
+            }
719
           }
764
           }
720
           console.log("列表详情",this.recordInfo.recordData)
765
           console.log("列表详情",this.recordInfo.recordData)
721
 
766
 
722
 
767
 
723
           this.warehouse = response.data.data.warehousing;
768
           this.warehouse = response.data.data.warehousing;
724
-          this.form.manufacturer = this.warehouse.manufacturer;
725
-          this.form.dealer = this.warehouse.dealer;
769
+          // this.form.manufacturer = this.warehouse.manufacturer;
770
+          // this.form.dealer = this.warehouse.dealer;
726
 
771
 
727
           this.warehousing_time = this.getTime(
772
           this.warehousing_time = this.getTime(
728
             this.warehouse.warehousing_time,
773
             this.warehouse.warehousing_time,
751
              this.drugList = list
796
              this.drugList = list
752
              var manufacturerList = response.data.data.manufacturerList
797
              var manufacturerList = response.data.data.manufacturerList
753
              this.manufacturerList = manufacturerList
798
              this.manufacturerList = manufacturerList
799
+
800
+             var dealerList = response.data.data.dealerList
801
+             this.dealerList = dealerList
754
              for(let i=0;i<this.drugList.length;i++){
802
              for(let i=0;i<this.drugList.length;i++){
755
                
803
                
756
                 for(let j=0;j<this.manufacturerList.length;j++){
804
                 for(let j=0;j<this.manufacturerList.length;j++){
759
 
807
 
760
                   }
808
                   }
761
                 }
809
                 }
810
+
811
+               for(let z=0;z<dealerList.length;z++){
812
+                  if(this.drugList[i].dealer == this.dealerList[z].id){
813
+                      this.drugList[i].dealer = this.dealerList[z].dealer_name
814
+                  }
815
+               
816
+                }
762
              }
817
              }
763
              cb(this.drugList)
818
              cb(this.drugList)
764
           } else {
819
           } else {
778
              this.recordInfo.recordData[i].drug_name = val.drug_name
833
              this.recordInfo.recordData[i].drug_name = val.drug_name
779
              this.recordInfo.recordData[i].drug_type = val.drug_type
834
              this.recordInfo.recordData[i].drug_type = val.drug_type
780
              this.recordInfo.recordData[i].name  = val.dose +val.dose_unit+"*"+val.min_number+ val.min_unit+"/"+val.max_unit
835
              this.recordInfo.recordData[i].name  = val.dose +val.dose_unit+"*"+val.min_number+ val.min_unit+"/"+val.max_unit
781
-             this.recordInfo.recordData[i].last_price = val.last_price
836
+             if(val.last_price == 0){
837
+               this.recordInfo.recordData[i].last_price =""
838
+             }else{
839
+               this.recordInfo.recordData[i].last_price = val.last_price
840
+             }
841
+           
782
              this.recordInfo.recordData[i].manufacturer =  val.manufacturer
842
              this.recordInfo.recordData[i].manufacturer =  val.manufacturer
783
-             this.recordInfo.recordData[i].batch_number = val.number
843
+             this.recordInfo.recordData[i].number = val.number
784
              this.recordInfo.recordData[i].max_unit = val.max_unit
844
              this.recordInfo.recordData[i].max_unit = val.max_unit
785
              this.recordInfo.recordData[i].min_unit = val.min_unit
845
              this.recordInfo.recordData[i].min_unit = val.min_unit
846
+             if(val.dealer == 0){
847
+               this.recordInfo.recordData[i].dealer = ""
848
+             }else{
849
+               this.recordInfo.recordData[i].dealer =  val.dealer
850
+             }
851
+            
786
            }
852
            }
787
         }
853
         }
788
       },
854
       },

+ 49 - 53
src/xt_pages/stock/drugs/drugStockOutOrder.vue Datei anzeigen

223
               {{scope.row.dose}}&nbsp;{{scope.row.dose_unit}}*{{scope.row.min_number}}{{scope.row.min_unit}}/{{scope.row.max_unit}}
223
               {{scope.row.dose}}&nbsp;{{scope.row.dose_unit}}*{{scope.row.min_number}}{{scope.row.min_unit}}/{{scope.row.max_unit}}
224
             </template>
224
             </template>
225
           </el-table-column>
225
           </el-table-column>
226
-          <!-- <el-table-column label="批号" align="center">
226
+          <el-table-column label="批号" align="center">
227
             <template slot-scope="scope">
227
             <template slot-scope="scope">
228
-            {{scope.row.number}}
228
+              <span v-if="scope.row.batch_number!=''">{{scope.row.batch_number}}</span> 
229
+             <span v-if="scope.row.batch_number == '0'"></span> 
229
             </template>
230
             </template>
230
-          </el-table-column> -->
231
+          </el-table-column>
231
           <el-table-column label="出库数量" align="center">
232
           <el-table-column label="出库数量" align="center">
232
             <template slot-scope="scope">
233
             <template slot-scope="scope">
233
-              {{scope.row.count}}
234
+              {{scope.row.count}}{{scope.row.max_unit}}
234
             </template>
235
             </template>
235
           </el-table-column>
236
           </el-table-column>
236
           <el-table-column label="进货价" align="center">
237
           <el-table-column label="进货价" align="center">
237
             <template slot-scope="scope">
238
             <template slot-scope="scope">
238
-              {{scope.row.last_price}}
239
+              {{scope.row.price}}
239
             </template>
240
             </template>
240
           </el-table-column>
241
           </el-table-column>
241
           <el-table-column label="总价" align="center">
242
           <el-table-column label="总价" align="center">
242
             <template slot-scope="scope">
243
             <template slot-scope="scope">
243
-              {{scope.row.count * scope.row.last_price}}
244
+              {{(scope.row.count * scope.row.price).toFixed(2)}}
244
             </template>
245
             </template>
245
           </el-table-column>
246
           </el-table-column>
246
           <el-table-column label="生产厂家" align="center">
247
           <el-table-column label="生产厂家" align="center">
258
               {{getTime(scope.row.expiry_date)}}
259
               {{getTime(scope.row.expiry_date)}}
259
             </template>
260
             </template>
260
           </el-table-column>
261
           </el-table-column>
261
-          <!-- <el-table-column label="批准文号" align="center">
262
+          <el-table-column label="经销商" align="center">
263
+            <template slot-scope="scope">
264
+              {{getDealerName(scope.row.dealer)}}
265
+            </template>
266
+          </el-table-column>
267
+          <el-table-column label="批准文号" align="center">
262
             <template slot-scope="scope">
268
             <template slot-scope="scope">
263
-              {{scope.row.number}}
269
+             <span v-if="scope.row.number!=''">{{scope.row.number}}</span> 
270
+             <span v-if="scope.row.number == '0'"></span>
264
             </template>
271
             </template>
265
-          </el-table-column> -->
272
+          </el-table-column>
266
           <el-table-column label="备注" align="center">
273
           <el-table-column label="备注" align="center">
267
             <template slot-scope="scope">
274
             <template slot-scope="scope">
268
               {{scope.row.remark}}
275
               {{scope.row.remark}}
303
             </template>
310
             </template>
304
             <template slot-scope="scope">
311
             <template slot-scope="scope">
305
               <span v-if="scope.row.is_total == 0">{{scope.row.user.name}}</span>
312
               <span v-if="scope.row.is_total == 0">{{scope.row.user.name}}</span>
306
-              <span v-if="scope.row.is_total == 1"></span>
313
+              <span  v-if="scope.row.is_total == 1"></span>
307
             </template>
314
             </template>
308
           </el-table-column>
315
           </el-table-column>
309
           <el-table-column min-width="35" align="center">
316
           <el-table-column min-width="35" align="center">
311
               <span>使用数量</span>
318
               <span>使用数量</span>
312
             </template>
319
             </template>
313
             <template slot-scope="scope">
320
             <template slot-scope="scope">
314
-              <span >{{scope.row.count}}</span>
321
+              <span >{{scope.row.count}}{{scope.row.count_unit}}</span>
322
+              <span  v-if="scope.row.is_total == 1">{{scope.row.total}}</span>
315
             </template>
323
             </template>
316
           </el-table-column>
324
           </el-table-column>
317
 
325
 
321
             </template>
329
             </template>
322
             <template slot-scope="scope">
330
             <template slot-scope="scope">
323
               <span  v-if="scope.row.is_total == 0">{{scope.row.ctime | parseTime('{y}-{m}-{d} {h}:{i}')}} </span>
331
               <span  v-if="scope.row.is_total == 0">{{scope.row.ctime | parseTime('{y}-{m}-{d} {h}:{i}')}} </span>
324
-              <span  v-if="scope.row.is_total == 1">{{scope.row.total}} </span>
325
             </template>
332
             </template>
326
           </el-table-column>
333
           </el-table-column>
327
 
334
 
376
       "-" +
383
       "-" +
377
       (nowDay < 10 ? "0" + nowDay : nowDay);
384
       (nowDay < 10 ? "0" + nowDay : nowDay);
378
     this.GetWarehouseOut();
385
     this.GetWarehouseOut();
379
-    this.GetConfigInfo();
380
-    // this.fetchAllAdminUsers();
386
+    // this.GetConfigInfo();
387
+    this.fetchAllAdminUsers();
381
   },
388
   },
382
   data() {
389
   data() {
383
     return {
390
     return {
421
       manufacturerList:[],
428
       manufacturerList:[],
422
       drugDialogVisible:false,
429
       drugDialogVisible:false,
423
       order_id:0,
430
       order_id:0,
431
+      dealerList:[]
424
     };
432
     };
425
   },
433
   },
426
   methods: {
434
   methods: {
433
         type: this.type,
441
         type: this.type,
434
         keywords: this.searchKey
442
         keywords: this.searchKey
435
       };
443
       };
444
+      console.log("paras22222222",Params)
436
       this.warehouseOutDate = [];
445
       this.warehouseOutDate = [];
437
       getDrugWarehouseOutList(Params).then(response => {
446
       getDrugWarehouseOutList(Params).then(response => {
438
         if (response.data.state == 0) {
447
         if (response.data.state == 0) {
458
         limit: this.limit,
467
         limit: this.limit,
459
         start_time: this.start_time,
468
         start_time: this.start_time,
460
         end_time: this.end_time,
469
         end_time: this.end_time,
461
-        type: this.type
470
+        type: this.type,
471
+        keywords: this.searchKey
462
       };
472
       };
463
       this.warehouseOutDate = [];
473
       this.warehouseOutDate = [];
464
       getDrugWarehouseOutList(Params).then(response => {
474
       getDrugWarehouseOutList(Params).then(response => {
561
     },
571
     },
562
 
572
 
563
     handleEdit: function(index, row) {
573
     handleEdit: function(index, row) {
564
-      // this.$router.push({
565
-      //   name: "drugStockOutDetail",
566
-      //   query: { id: row.id, type: this.type }
567
-      // });
568
-      this.$router.push({path:"/drug/out/drugstockoutorderedit?id="+row.id+"&type="+this.type})
574
+      console.log("row2222222",row)
575
+      this.$router.push({path:"/drug/out/drugstockoutorderedit?id="+row.id+"&type="+this.type+"&is_sys="+row.is_sys})
569
     },
576
     },
570
-    // handleSearch(id,time,warehouse_out_order_number){
571
-    //   this.warehousingOutInfo.warehousingOutData = []
572
-    //   this.GetOrderDetail(id)
573
-    //   this.list = []
574
-    //   this.getDrugAutoMaticList(id,time,warehouse_out_order_number)
575
-    //   this.dialogVisible = true
576
-    // },
577
     handleSearch(val){
577
     handleSearch(val){
578
-       console.log("val2222222222",val)
578
+      
579
        this.getInitializtion()
579
        this.getInitializtion()
580
        this.getSinleOrderDetail(val.id)
580
        this.getSinleOrderDetail(val.id)
581
        this.list = []
581
        this.list = []
582
       //  this.getDrugAutoMaticList(val.id,val.time,val.warehouse_out_order_number)
582
       //  this.getDrugAutoMaticList(val.id,val.time,val.warehouse_out_order_number)
583
 
583
 
584
     },
584
     },
585
-    GetOrderDetail(order_id) {
586
-        const params = {
587
-          'id': order_id
588
-        }
589
-        getDrugWarehouseOutInfo(params).then(response => {
590
-          if (response.data.state == 0) {
591
-
592
-            this.$message.error(response.data.msg)
593
-            return false
594
-          } else {
595
-            this.tableShow = true
596
-            this.warehousingOutInfo.warehousingOutData=[]
597
-            for (let i = 0; i < response.data.data.list.length; i++) {
598
-              this.warehousingOutInfo.warehousingOutData.push(response.data.data.list[i])
599
-              this.tableList.push(response.data.data.list[i])
600
 
585
 
601
-            }
602
-            console.log("详情222",this.tableList)
603
-            this.warehousingOutInfo.info = response.data.data.info
604
-            var manulist = response.data.data.manulist
605
-            this.manufacturerList = manulist
606
-            console.log("厂家列表",this.manufacturerList)
607
-            this.handleSpanTempArr()
608
-          }
609
-        })
610
-      },
611
     handleDelete: function(index, row) {
586
     handleDelete: function(index, row) {
612
       const ids = [];
587
       const ids = [];
613
       ids.push(row.id);
588
       ids.push(row.id);
864
      }
839
      }
865
      return name
840
      return name
866
    },
841
    },
842
+   getDealerName(id){
843
+      var name = ""
844
+     for(let i=0;i<this.dealerList.length;i++){
845
+       if(id == this.dealerList[i].id){
846
+         name = this.dealerList[i].dealer_name
847
+       }
848
+     }
849
+     return name
850
+   },
867
    getSinleOrderDetail(id){
851
    getSinleOrderDetail(id){
868
        var params = {
852
        var params = {
869
          id:id,
853
          id:id,
874
           this.tableList = []
858
           this.tableList = []
875
           var list =  response.data.data.list
859
           var list =  response.data.data.list
876
           console.log("list",list)
860
           console.log("list",list)
861
+         this.manufacturerList = response.data.data.manufacturerList
862
+         this.dealerList = response.data.data.dealerList
863
+         for(let i=0;i<list.length;i++){
864
+           if(list[i].batch_number == "0" || list[i].batch_number == 0){
865
+              list[i].batch_number = ""
866
+           }
867
+
868
+           if(list[i].number == "0" || list[i].number == 0){
869
+              list[i].number = ""
870
+           }
871
+         }
877
           this.tableList = list
872
           this.tableList = list
878
         }
873
         }
879
      })
874
      })
896
           this.userList.push(obj)
891
           this.userList.push(obj)
897
           total = total + response.data.data.list[i].count
892
           total = total + response.data.data.list[i].count
898
         }
893
         }
894
+        console.log("出库数据222222222",this.userList)
899
         this.userList.push({
895
         this.userList.push({
900
           is_total: 1,
896
           is_total: 1,
901
           total: total,
897
           total: total,

+ 113 - 175
src/xt_pages/stock/drugs/drugStockOutOrderAdd.vue Datei anzeigen

51
         ></el-date-picker>
51
         ></el-date-picker>
52
       </div>
52
       </div>
53
 
53
 
54
-      <!-- <div class="cell clearfix">
55
-        <label class="title"><span class="name">经销商</span> : </label>
56
-        <el-select
57
-          size="small"
58
-          v-model="form.dealer"
59
-          filterable
60
-          placeholder="请选择经销商"
61
-          @change="changeDealer"
62
-          style="width: 200px;"
63
-        >
64
-          <el-option
65
-            v-for="(option, index) in dealer"
66
-            :key="index"
67
-            :label="option.dealer_name"
68
-            :value="option.id"
69
-          >
70
-          </el-option>
71
-        </el-select>
72
-      </div> -->
73
-
74
-      <!-- <div class="cell clearfix">
75
-        <label class="title"><span class="name">厂商</span> : </label>
76
-        <el-select
77
-          size="small"
78
-          v-model="form.manufacturer"
79
-          filterable
80
-          placeholder="请选择厂商"
81
-          @change="changeManufacturer"
82
-          style="width: 200px;"
83
-        >
84
-          <el-option
85
-            v-for="(option, index) in manufacturer"
86
-            :key="index"
87
-            :label="option.manufacturer_name"
88
-            :value="option.id"
89
-          >
90
-          </el-option>
91
-        </el-select>
92
-      </div> -->
93
-
54
+    
94
       <el-form :rules="tableRules" :model="recordInfo" ref="tableForm">
55
       <el-form :rules="tableRules" :model="recordInfo" ref="tableForm">
95
         <el-table
56
         <el-table
96
           :data="recordInfo.recordData"
57
           :data="recordInfo.recordData"
155
               </el-form-item>
116
               </el-form-item>
156
             </template>
117
             </template>
157
           </el-table-column>
118
           </el-table-column>
158
-          <!-- <el-table-column align="center" width="150">
119
+          <el-table-column align="center" width="150">
159
             <template slot="header" slot-scope="scope" >
120
             <template slot="header" slot-scope="scope" >
160
                   <span>批号</span>
121
                   <span>批号</span>
161
               </template>
122
               </template>
167
                     ></el-input>
128
                     ></el-input>
168
                   </el-form-item>
129
                   </el-form-item>
169
               </template>
130
               </template>
170
-          </el-table-column> -->
131
+          </el-table-column>
171
           <el-table-column width="120" align="center">
132
           <el-table-column width="120" align="center">
172
             <template slot="header" slot-scope="scope">
133
             <template slot="header" slot-scope="scope">
173
               <span>出库数量<span style="color: red">*</span></span>
134
               <span>出库数量<span style="color: red">*</span></span>
197
             <template slot-scope="scope">
158
             <template slot-scope="scope">
198
             
159
             
199
               <el-form-item
160
               <el-form-item
200
-                :prop="'recordData.' + scope.$index + '.last_price'"
201
-                :rules="tableRules.last_price"
161
+                :prop="'recordData.' + scope.$index + '.price'"
162
+                :rules="tableRules.price"
202
                 style="padding-top: 20px"
163
                 style="padding-top: 20px"
203
               >
164
               >
204
                 <el-input
165
                 <el-input
205
                   placeholder="请输入出货价"
166
                   placeholder="请输入出货价"
206
                   type="number"
167
                   type="number"
207
-                  v-model="scope.row.last_price"
168
+                  v-model="scope.row.price"
208
                 ></el-input>
169
                 ></el-input>
209
               </el-form-item>
170
               </el-form-item>
210
             </template>
171
             </template>
212
 
173
 
213
           <el-table-column label="总价" width="80" align="center">
174
           <el-table-column label="总价" width="80" align="center">
214
             <template slot-scope="scope">
175
             <template slot-scope="scope">
215
-              {{ calculate(scope.row.last_price * scope.row.count) }}
176
+              {{ calculate(scope.row.price * scope.row.count) }}
216
             </template>
177
             </template>
217
           </el-table-column>
178
           </el-table-column>
218
    
179
    
256
               ></el-date-picker>
217
               ></el-date-picker>
257
             </template>
218
             </template>
258
           </el-table-column>
219
           </el-table-column>
259
-<!--         
220
+        
260
         <el-table-column align="center" width="150" label="批准文号">
221
         <el-table-column align="center" width="150" label="批准文号">
261
             <template slot-scope="scope">
222
             <template slot-scope="scope">
262
               <el-form-item style="padding-top: 20px">
223
               <el-form-item style="padding-top: 20px">
266
                 ></el-input>
227
                 ></el-input>
267
               </el-form-item>
228
               </el-form-item>
268
             </template>
229
             </template>
269
-          </el-table-column> -->
230
+        </el-table-column>
231
+
232
+         <el-table-column label="经销商" width="140" align="center">
233
+            <template slot-scope="scope">
234
+               <el-select v-model="scope.row.dealer" filterable placeholder="请选择厂商">
235
+                <el-option
236
+                  v-for="(option, index) in dealerList"
237
+                  :key="index"
238
+                  :label="option.dealer"
239
+                  :value="option.id">
240
+                </el-option>
241
+               </el-select>
242
+            </template>
243
+          </el-table-column>
270
 
244
 
271
           <el-table-column label="备注" width="120" align="center">
245
           <el-table-column label="备注" width="120" align="center">
272
             <template slot-scope="scope">
246
             <template slot-scope="scope">
374
       goodInfo:[],
348
       goodInfo:[],
375
       drugList:[],
349
       drugList:[],
376
       manufacturerList:[],
350
       manufacturerList:[],
351
+      dealerList:[],
377
       showOne:true,
352
       showOne:true,
378
       showTwo:false,
353
       showTwo:false,
379
       drugTypeList:[],
354
       drugTypeList:[],
381
     };
356
     };
382
   },
357
   },
383
   methods: {
358
   methods: {
384
-    comfirm: function(val) {
385
-      this.propForm.goodType = []
386
-      this.propForm.goods = []
387
-
388
-      this.$refs.dialog.hide()
389
-
390
-      if (val.selectedGoodInfo.length > 0) {
391
-        for (let i = val.selectedGoodInfo.length - 1; i >= 0; i--) {
392
-          if (i == 0) {
393
-            this.recordInfo.recordData[this.currentIndex].drug_id = val.selectedGoodInfo[i].id
394
-            this.recordInfo.recordData[this.currentIndex].price = val.selectedGoodInfo[i].last_price.toString()
395
-            this.recordInfo.recordData[this.currentIndex].retail_price = val.selectedGoodInfo[i].retail_price.toString()
396
-            this.recordInfo.recordData[this.currentIndex].min_unit = val.selectedGoodInfo[i].min_unit.toString()
397
-          } else {
398
-            const tempForm = {}
399
-            tempForm['drug_id'] = val.selectedGoodInfo[i].id
400
-            tempForm['retail_price'] = val.selectedGoodInfo[i].retail_price.toString()
401
-            tempForm['price'] =  val.selectedGoodInfo[i].last_price.toString()
402
-            tempForm['count'] = ''
403
-            tempForm['remark'] = ''
404
-            tempForm['min_unit'] = val.selectedGoodInfo[i].min_unit
405
-            this.recordInfo.recordData.splice(this.currentIndex + 1, 0, tempForm)
406
-          }
407
-        }
408
-      }
409
-
410
-      this.currentIndex = -1
411
-
412
-      // this.$refs.dialog.hide();
413
-      // this.propForm.goodType = [];
414
-      // if (val.selectedGoodInfo.length > 0) {
415
-      //   for (let i = val.selectedGoodInfo.length - 1; i >= 0; i--) {
416
-      //     if (i == 0) {
417
-      //       this.recordInfo.recordData[this.currentIndex].good_type_id =
418
-      //         val.selectedGoodInfo[i].good_type_id;
419
-      //       this.recordInfo.recordData[this.currentIndex].good_id =
420
-      //         val.selectedGoodInfo[i].id;
421
-      //       this.recordInfo.recordData[
422
-      //         this.currentIndex
423
-      //       ].price = val.selectedGoodInfo[i].buy_price.toString();
424
-      //     } else {
425
-      //       console.log(val.selectedGoodInfo[i].buy_price.toString());
426
-      //       const tempForm = {};
427
-      //       tempForm["good_type_id"] = val.selectedGoodInfo[i].good_type_id;
428
-      //       tempForm["good_id"] = val.selectedGoodInfo[i].id;
429
-      //       tempForm["count"] = "";
430
-      //       tempForm["price"] = val.selectedGoodInfo[i].buy_price.toString();
431
-      //       tempForm["remark"] = "";
432
-      //       this.recordInfo.recordData.splice(
433
-      //         this.currentIndex + 1,
434
-      //         0,
435
-      //         tempForm
436
-      //       );
437
-      //     }
438
-      //   }
439
-      // }
440
-      //
441
-      // this.currentIndex = -1;
442
-    },
359
+    // comfirm: function(val) {
360
+    //   this.propForm.goodType = []
361
+    //   this.propForm.goods = []
362
+
363
+    //   this.$refs.dialog.hide()
364
+
365
+    //   if (val.selectedGoodInfo.length > 0) {
366
+    //     for (let i = val.selectedGoodInfo.length - 1; i >= 0; i--) {
367
+    //       if (i == 0) {
368
+    //         this.recordInfo.recordData[this.currentIndex].drug_id = val.selectedGoodInfo[i].id
369
+    //         this.recordInfo.recordData[this.currentIndex].price = val.selectedGoodInfo[i].last_price.toString()
370
+    //         this.recordInfo.recordData[this.currentIndex].retail_price = val.selectedGoodInfo[i].retail_price.toString()
371
+    //         this.recordInfo.recordData[this.currentIndex].min_unit = val.selectedGoodInfo[i].min_unit.toString()
372
+    //       } else {
373
+    //         const tempForm = {}
374
+    //         tempForm['drug_id'] = val.selectedGoodInfo[i].id
375
+    //         tempForm['retail_price'] = val.selectedGoodInfo[i].retail_price.toString()
376
+    //         tempForm['price'] =  val.selectedGoodInfo[i].last_price.toString()
377
+    //         tempForm['count'] = ''
378
+    //         tempForm['remark'] = ''
379
+    //         tempForm['min_unit'] = val.selectedGoodInfo[i].min_unit
380
+    //         this.recordInfo.recordData.splice(this.currentIndex + 1, 0, tempForm)
381
+    //       }
382
+    //     }
383
+    //   }
384
+
385
+    //   this.currentIndex = -1
386
+
387
+    // },
443
     cancle: function() {
388
     cancle: function() {
444
       this.$refs.dialog.hide();
389
       this.$refs.dialog.hide();
445
     },
390
     },
508
       tempObj['dose'] = ""
453
       tempObj['dose'] = ""
509
       tempObj['dose_unit'] = ""
454
       tempObj['dose_unit'] = ""
510
       tempObj["min_number"] = ""
455
       tempObj["min_number"] = ""
456
+      tempObj["number"] = ""
457
+      tempObj["batch_number"] = ""
511
       this.recordInfo.recordData.push(tempObj);
458
       this.recordInfo.recordData.push(tempObj);
512
     },
459
     },
513
     handleDelete: function(index, row) {
460
     handleDelete: function(index, row) {
610
             return;
557
             return;
611
           }
558
           }
612
           for(let i=0;i<this.recordInfo.recordData.length;i++){
559
           for(let i=0;i<this.recordInfo.recordData.length;i++){
613
-            this.recordInfo.recordData[i].last_price = this.recordInfo.recordData[i].last_price.toString()
560
+            this.recordInfo.recordData[i].price = this.recordInfo.recordData[i].price.toString()
561
+
562
+            for(let j=0;j<this.manufacturerList.length;j++){
563
+              if(this.recordInfo.recordData[i].manufacturer == this.manufacturerList[j].manufacturer_name){
564
+                  this.recordInfo.recordData[i].manufacturer =  this.manufacturerList[j].id
565
+              }
566
+              
567
+            }
568
+             if(this.recordInfo.recordData[i].dealer == ""){
569
+                this.recordInfo.recordData[i].dealer = 0
570
+             }
571
+            for(let z=0;z<this.dealerList.length;z++){
572
+              if(this.recordInfo.recordData[i].dealer == this.dealerList[z].dealer_name){
573
+                  this.recordInfo.recordData[i].dealer = this.dealerList[z].id
574
+              }
575
+            }
614
           }
576
           }
615
           const params = {
577
           const params = {
616
             stockOut: this.recordInfo.recordData
578
             stockOut: this.recordInfo.recordData
617
           };
579
           };
618
           console.log("params222222",params)
580
           console.log("params222222",params)
619
-          
581
+         
620
           postDrugWarehouseOut(
582
           postDrugWarehouseOut(
621
             params,
583
             params,
622
             this.warehouse_out_time,
584
             this.warehouse_out_time,
625
             this.type
587
             this.type
626
           ).then(response => {
588
           ).then(response => {
627
             if (response.data.state == 0) {
589
             if (response.data.state == 0) {
628
-              this.$message.error(response.data.msg);
590
+              this.$message.error("库存不足");
629
               return false;
591
               return false;
630
             } else {
592
             } else {
631
-              this.$message.success("出库成功");
632
-              this.recordInfo.recordData = [];
633
-              this.$router.back(-1);
593
+              var msg = response.data.data.msg
594
+              var drug_name =  response.data.data.drug_name
595
+              var dose = response.data.data.dose
596
+              var dose_unit = response.data.data.dose_unit
597
+              var min_number = response.data.data.min_number
598
+              var min_unit =  response.data.data.min_unit
599
+              var max_unit =  response.data.data.max_unit
600
+
601
+              var str = drug_name + "" + dose + dose_unit * min_number + min_unit+"/"+max_unit
602
+              console.log("str22222222",str)
603
+              if(msg == 1){
604
+                this.$message.error(str + "库存不足,请入库")
605
+              }else{
606
+                this.$message.success("出库成功");
607
+                this.recordInfo.recordData = [];
608
+                this.$router.back(-1);
609
+              }
610
+              
634
             }
611
             }
635
           });
612
           });
636
         } else {
613
         } else {
665
              this.drugList = list
642
              this.drugList = list
666
              var manufacturerList = response.data.data.manufacturerList
643
              var manufacturerList = response.data.data.manufacturerList
667
              this.manufacturerList = manufacturerList
644
              this.manufacturerList = manufacturerList
645
+             var dealerList = response.data.data.dealerList
646
+             this.dealerList = dealerList
668
              for(let i=0;i<this.drugList.length;i++){
647
              for(let i=0;i<this.drugList.length;i++){
669
                 for(let j=0;j<this.manufacturerList.length;j++){
648
                 for(let j=0;j<this.manufacturerList.length;j++){
670
                   if(this.drugList[i].manufacturer == this.manufacturerList[j].id){
649
                   if(this.drugList[i].manufacturer == this.manufacturerList[j].id){
671
                      this.drugList[i].manufacturer = this.manufacturerList[j].manufacturer_name
650
                      this.drugList[i].manufacturer = this.manufacturerList[j].manufacturer_name
672
                   }
651
                   }
673
                 }
652
                 }
653
+               for(let z=0;z<dealerList.length;z++){
654
+                  if(this.drugList[i].dealer == this.dealerList[z].id){
655
+                      this.drugList[i].dealer = this.dealerList[z].dealer_name
656
+                  }
657
+               
658
+                }
674
              }
659
              }
660
+
675
              cb(this.drugList)
661
              cb(this.drugList)
676
           } else {
662
           } else {
677
             cb([])
663
             cb([])
682
         this.currentIndex = val
668
         this.currentIndex = val
683
       },
669
       },
684
       handleSelect(val){
670
       handleSelect(val){
671
+        console.log("val2222222",val)
685
         for(let i=0;i<this.recordInfo.recordData.length;i++){
672
         for(let i=0;i<this.recordInfo.recordData.length;i++){
686
           if(this.currentIndex == i){
673
           if(this.currentIndex == i){
687
             this.recordInfo.recordData[i].drug_id = val.id
674
             this.recordInfo.recordData[i].drug_id = val.id
694
             this.recordInfo.recordData[i].min_unit = val.min_unit
681
             this.recordInfo.recordData[i].min_unit = val.min_unit
695
          
682
          
696
             this.recordInfo.recordData[i].number = val.number
683
             this.recordInfo.recordData[i].number = val.number
697
-            this.recordInfo.recordData[i].last_price = val.last_price
684
+            if(val.retail_price == 0){
685
+              this.recordInfo.recordData[i].price = ""
686
+            }else{
687
+              this.recordInfo.recordData[i].price = val.retail_price
688
+            }
689
+           
698
             this.recordInfo.recordData[i].manufacturer = val.manufacturer
690
             this.recordInfo.recordData[i].manufacturer = val.manufacturer
699
             this.recordInfo.recordData[i].name = this.recordInfo.recordData[i].dose + this.recordInfo.recordData[i].dose_unit + "*" + this.recordInfo.recordData[i].min_number + this.recordInfo.recordData[i].min_unit + "/"+this.recordInfo.recordData[i].max_unit
691
             this.recordInfo.recordData[i].name = this.recordInfo.recordData[i].dose + this.recordInfo.recordData[i].dose_unit + "*" + this.recordInfo.recordData[i].min_number + this.recordInfo.recordData[i].min_unit + "/"+this.recordInfo.recordData[i].max_unit
692
+          
693
+            if(val.dealer == 0){
694
+               this.recordInfo.recordData[i].dealer = ""
695
+            }else{
696
+               this.recordInfo.recordData[i].dealer = val.dealer
697
+            }
700
           }
698
           }
701
         }
699
         }
702
       }, 
700
       }, 
703
-      // handleSelect(val){
704
-      //     console.log("val222222",val)
705
-      //    if(this.recordInfo.recordData.length == 1){
706
-      //       this.recordInfo.recordData[0].drug_id = val.id
707
-      //       this.recordInfo.recordData[0].drug_name = val.drug_name
708
-      //       this.recordInfo.recordData[0].drug_type = val.drug_type
709
-      //       this.recordInfo.recordData[0].dose = val.dose
710
-      //       this.recordInfo.recordData[0].dose_unit = val.dose_unit
711
-      //       this.recordInfo.recordData[0].max_unit = val.max_unit
712
-      //       this.recordInfo.recordData[0].min_number = val.min_number
713
-      //       this.recordInfo.recordData[0].min_unit = val.min_unit
714
-      //       this.recordInfo.recordData[0].packing_unit = val.packing_unit
715
-      //       this.recordInfo.recordData[0].number = val.number
716
-      //       this.recordInfo.recordData[0].last_price = val.last_price
717
-      //       this.recordInfo.recordData[0].manufacturer = val.manufacturer
718
-      //    for(let i=0;i<this.recordInfo.recordData.length;i++){       
719
-      //      this.recordInfo.recordData[i].name = this.recordInfo.recordData[i].dose + this.recordInfo.recordData[i].dose_unit + "*" + this.recordInfo.recordData[i].min_number + this.recordInfo.recordData[i].min_unit + "/"+this.recordInfo.recordData[i].max_unit
720
-      //      this.totalPrice += this.recordInfo.recordData[i].last_price * this.recordInfo.recordData[i].warehousing_count
721
-      //      for(let j=0;j<this.drugTypeList.length;j++){
722
-      //          if(this.recordInfo.recordData[i].drug_type == this.drugTypeList[j].id){
723
-      //             this.recordInfo.recordData[i].drug_type = this.drugTypeList[j].name
724
-      //          } 
725
-      //      }
726
-      //    }
727
-      //    }else{
728
-      //       var arr = []
729
-      //       for(let i=0;i<this.recordInfo.recordData.length;i++){ 
730
-      //         if(this.recordInfo.recordData[i].drug_id> 0){
731
-      //            arr.push(this.recordInfo.recordData[i])
732
-      //         }
733
-      //       } 
734
-      //       this.recordInfo.recordData = arr
735
-      //       const tempObj = {}
736
-      //       tempObj['drug_name'] = val.drug_name
737
-      //       tempObj['drug_id'] = val.id
738
-      //       tempObj['number'] = ''
739
-      //       tempObj['product_date'] = ''
740
-      //       tempObj['expiry_date'] = ''
741
-      //       tempObj['warehousing_count'] = ''
742
-      //       tempObj['retail_price'] = ''
743
-      //       tempObj['price'] = ''
744
-      //       tempObj['remark'] = ''
745
-      //       tempObj['dealer'] = ''
746
-      //       tempObj['manufacturer'] = ''
747
-      //       tempObj['min_unit'] = ''
748
-      //       tempObj['batch_number'] = ''
749
-      //       tempObj['drug_type'] = ''
750
-      //       this.recordInfo.recordData.push(tempObj) 
751
-      //    }
752
-
753
-      //   for(let i=0;i<this.recordInfo.recordData.length;i++){       
754
-      //     this.recordInfo.recordData[i].name = this.recordInfo.recordData[i].dosage + this.recordInfo.recordData[i].max_unit + "*" + this.recordInfo.recordData[i].unval + this.recordInfo.recordData[i].min_unit + "/"+this.recordInfo.recordData[i].packing_unit
755
-      //     this.totalPrice += this.recordInfo.recordData[i].last_price * this.recordInfo.recordData[i].warehousing_count
756
-      //     for(let j=0;j<this.drugTypeList.length;j++){
757
-      //        if(this.recordInfo.recordData[i].drug_type == this.drugTypeList[j].id){
758
-      //           this.recordInfo.recordData[i].drug_type = this.drugTypeList[j].name
759
-      //         } 
760
-      //      }
761
-      //   }
762
-      // },
763
       getDictionaryDataConfig(module, filed_name) {
701
       getDictionaryDataConfig(module, filed_name) {
764
         return getDictionaryDataConfig(module, filed_name)
702
         return getDictionaryDataConfig(module, filed_name)
765
       },
703
       },
789
     tempObj['dose'] = ""
727
     tempObj['dose'] = ""
790
     tempObj['dose_unit'] = ""
728
     tempObj['dose_unit'] = ""
791
     tempObj["min_number"] = ""
729
     tempObj["min_number"] = ""
792
-    
730
+    tempObj["dealer"] = ""
793
     this.recordInfo.recordData.push(tempObj);
731
     this.recordInfo.recordData.push(tempObj);
794
     this.GetConfigInfo();
732
     this.GetConfigInfo();
795
     this.propForm.goodUnit = this.$store.getters.good_unit;
733
     this.propForm.goodUnit = this.$store.getters.good_unit;

+ 97 - 73
src/xt_pages/stock/drugs/drugStockOutOrderEdit.vue Datei anzeigen

13
 
13
 
14
     <div class="app-container">
14
     <div class="app-container">
15
 
15
 
16
-      <!--<stock-in-dialog-->
17
-        <!--ref="dialog"-->
18
-        <!--:propForm="propForm"-->
19
-        <!--:visibility="isVisibility"-->
20
-        <!--v-on:dialog-comfirm="comfirm"-->
21
-        <!--v-on:dialog-cancle="cancle"-->
22
-      <!--&gt;</stock-in-dialog>-->
23
-      <!--<stock-in-dialog-->
24
-        <!--ref="dialog"-->
25
-        <!--:propForm="propForm"-->
26
-        <!--:visibility="isVisibility"-->
27
-        <!--v-on:dialog-comfirm="comfirm"-->
28
-        <!--v-on:dialog-cancle="cancle"-->
29
-      <!--&gt;-->
30
-      <!--</stock-in-dialog>-->
31
-
32
       <drugs-stock-dialog
16
       <drugs-stock-dialog
33
         ref="dialog"
17
         ref="dialog"
34
         :propForm="propForm"
18
         :propForm="propForm"
38
       >
22
       >
39
       </drugs-stock-dialog>
23
       </drugs-stock-dialog>
40
 
24
 
41
-      <!-- <div class="cell clearfix">
42
-        <label class="title"><span class="name">出库时间</span> : </label>
43
-        <el-date-picker size="small" v-model="warehouse_out_time" prefix-icon="el-icon-date" :editable="false"
44
-                        style="width: 196px;"
45
-                        type="date" placeholder="选择日期时间" align="right" format="yyyy-MM-dd"
46
-                        value-format="yyyy-MM-dd"></el-date-picker>
47
-      </div> -->
48
-
49
-
50
-      <!-- <div class="cell clearfix">
51
-        <label class="title"><span class="name">经销商</span> : </label>
52
-        <el-select size="small" v-model="form.dealer" clearable placeholder="请选择经销商" @change="changeDealer">
53
-          <el-option
54
-            v-for="(option, index) in dealer"
55
-            :key="index"
56
-            :label="option.dealer_name"
57
-            :value="option.id">
58
-          </el-option>
59
-        </el-select>
60
-      </div> -->
61
-
62
-<!-- 
63
-      <div class="cell clearfix">
64
-        <label class="title"><span class="name">厂商</span> : </label>
65
-
66
-        <el-select size="small" v-model="form.manufacturer" clearable placeholder="请选择厂商" @change="changeManufacturer">
67
-          <el-option
68
-            v-for="(option, index) in manufacturer"
69
-            :key="index"
70
-            :label="option.manufacturer_name"
71
-            :value="option.id">
72
-          </el-option>
73
-        </el-select>
74
-      </div> -->
75
 
25
 
76
       <el-form :rules="tableRules" :model="recordInfo" ref="tableForm">
26
       <el-form :rules="tableRules" :model="recordInfo" ref="tableForm">
77
         <el-table :data="recordInfo.recordData" :class="signAndWeighBoxPatients" style="width: 100%" border
27
         <el-table :data="recordInfo.recordData" :class="signAndWeighBoxPatients" style="width: 100%" border
94
                     placeholder="请输入药品名称"
44
                     placeholder="请输入药品名称"
95
                     @select="handleSelect"
45
                     @select="handleSelect"
96
                     @input="changeDrugName(scope.$index)"
46
                     @input="changeDrugName(scope.$index)"
97
-                    style="width:160px;"
47
+                    style="width:120px;"
48
+                    :disabled="drug_show"
98
                   >
49
                   >
99
                     <i class="el-icon-search el-input__icon" slot="suffix"></i>
50
                     <i class="el-icon-search el-input__icon" slot="suffix"></i>
100
                   <template slot-scope="{ item }">
51
                   <template slot-scope="{ item }">
109
               <span>药品类型</span>
60
               <span>药品类型</span>
110
             </template>
61
             </template>
111
              <template slot-scope="scope">
62
              <template slot-scope="scope">
112
-               <el-select v-model="scope.row.drug_type" filterable placeholder="请选择厂商">
63
+               <el-select v-model="scope.row.drug_type" filterable placeholder="请选择厂商"  :disabled="drug_show">
113
                 <el-option
64
                 <el-option
114
                   v-for="(option, index) in drugTypeList"
65
                   v-for="(option, index) in drugTypeList"
115
                   :key="index"
66
                   :key="index"
133
               </el-form-item>
84
               </el-form-item>
134
             </template>
85
             </template>
135
           </el-table-column>
86
           </el-table-column>
136
-         <!-- <el-table-column align="center" width="150">
87
+         <el-table-column align="center" width="150">
137
             <template slot="header" slot-scope="scope" >
88
             <template slot="header" slot-scope="scope" >
138
                   <span>批号</span>
89
                   <span>批号</span>
139
               </template>
90
               </template>
140
                 <template slot-scope="scope">
91
                 <template slot-scope="scope">
141
                   <el-form-item style="padding-top: 20px">
92
                   <el-form-item style="padding-top: 20px">
142
                     <el-input
93
                     <el-input
94
+                     :disabled="drug_show"
143
                       placeholder="请输入批号"
95
                       placeholder="请输入批号"
144
                       v-model="scope.row.batch_number"
96
                       v-model="scope.row.batch_number"
145
                     ></el-input>
97
                     ></el-input>
146
                   </el-form-item>
98
                   </el-form-item>
147
               </template>
99
               </template>
148
-          </el-table-column> -->
100
+          </el-table-column>
149
            <el-table-column width="120" align="center">
101
            <el-table-column width="120" align="center">
150
             <template slot="header" slot-scope="scope">
102
             <template slot="header" slot-scope="scope">
151
               <span>出库数量<span style="color: red">*</span></span>
103
               <span>出库数量<span style="color: red">*</span></span>
158
               >
110
               >
159
                 <div style="display:flex;">
111
                 <div style="display:flex;">
160
                   <el-input
112
                   <el-input
113
+                   :disabled="drug_show"
161
                     placeholder="请输入出库数量"
114
                     placeholder="请输入出库数量"
162
                     type="number"
115
                     type="number"
163
                     v-model="scope.row.count"
116
                     v-model="scope.row.count"
175
             <template slot-scope="scope">
128
             <template slot-scope="scope">
176
             
129
             
177
               <el-form-item
130
               <el-form-item
178
-                :prop="'recordData.' + scope.$index + '.last_price'"
179
-                :rules="tableRules.last_price"
131
+                :prop="'recordData.' + scope.$index + '.price'"
132
+                :rules="tableRules.price"
180
                 style="padding-top: 20px"
133
                 style="padding-top: 20px"
181
               >
134
               >
182
                 <el-input
135
                 <el-input
136
+                 :disabled="drug_show"
183
                   placeholder="请输入出货价"
137
                   placeholder="请输入出货价"
184
                   type="number"
138
                   type="number"
185
-                  v-model="scope.row.last_price"
139
+                  v-model="scope.row.price"
186
                 ></el-input>
140
                 ></el-input>
187
               </el-form-item>
141
               </el-form-item>
188
             </template>
142
             </template>
194
           </el-table-column>
148
           </el-table-column>
195
           <el-table-column label="生产厂家" width="140" align="center">
149
           <el-table-column label="生产厂家" width="140" align="center">
196
             <template slot-scope="scope">
150
             <template slot-scope="scope">
197
-               <el-select v-model="scope.row.manufacturer" filterable placeholder="请选择厂商">
151
+               <el-select v-model="scope.row.manufacturer" filterable placeholder="请选择厂商"  :disabled="drug_show">
198
                 <el-option
152
                 <el-option
199
                   v-for="(option, index) in manufacturerList"
153
                   v-for="(option, index) in manufacturerList"
200
                   :key="index"
154
                   :key="index"
207
             <el-table-column label="生产日期" width="180" align="center">
161
             <el-table-column label="生产日期" width="180" align="center">
208
             <template slot-scope="scope">
162
             <template slot-scope="scope">
209
               <el-date-picker
163
               <el-date-picker
164
+               :disabled="drug_show"
210
                 prefix-icon="el-icon-date"
165
                 prefix-icon="el-icon-date"
211
                 style="width: 145px"
166
                 style="width: 145px"
212
                 v-model="scope.row.product_date"
167
                 v-model="scope.row.product_date"
220
           <el-table-column label="有效日期" width="180" align="center">
175
           <el-table-column label="有效日期" width="180" align="center">
221
             <template slot-scope="scope">
176
             <template slot-scope="scope">
222
               <el-date-picker
177
               <el-date-picker
178
+               :disabled="drug_show"
223
                 prefix-icon="el-icon-date"
179
                 prefix-icon="el-icon-date"
224
                 style="width: 145px"
180
                 style="width: 145px"
225
                 v-model="scope.row.expiry_date"
181
                 v-model="scope.row.expiry_date"
230
               ></el-date-picker>
186
               ></el-date-picker>
231
             </template>
187
             </template>
232
           </el-table-column>
188
           </el-table-column>
233
-           <!-- <el-table-column align="center" width="150" label="批准文号">
189
+          <el-table-column label="经销商" width="140" align="center">
190
+            <template slot-scope="scope">
191
+               <el-select v-model="scope.row.dealer" filterable placeholder="请选择厂商"  :disabled="drug_show">
192
+                <el-option
193
+                  v-for="(option, index) in dealerList"
194
+                  :key="index"
195
+                  :label="option.dealer_name"
196
+                  :value="option.id">
197
+                </el-option>
198
+               </el-select>
199
+            </template>
200
+          </el-table-column>
201
+           <el-table-column align="center" width="150" label="批准文号">
234
             <template slot-scope="scope">
202
             <template slot-scope="scope">
235
               <el-form-item style="padding-top: 20px">
203
               <el-form-item style="padding-top: 20px">
236
                 <el-input
204
                 <el-input
205
+                 :disabled="drug_show"
237
                   placeholder="请输入批准文号"
206
                   placeholder="请输入批准文号"
238
                   v-model="scope.row.number"
207
                   v-model="scope.row.number"
239
                 ></el-input>
208
                 ></el-input>
240
               </el-form-item>
209
               </el-form-item>
241
             </template>
210
             </template>
242
-          </el-table-column> -->
211
+          </el-table-column>
243
 
212
 
244
           <el-table-column label="备注" width="120" align="center">
213
           <el-table-column label="备注" width="120" align="center">
245
             <template slot-scope="scope">
214
             <template slot-scope="scope">
246
-              <el-input v-model="scope.row.remark"></el-input>
215
+              <el-input v-model="scope.row.remark"  :disabled="drug_show"></el-input>
247
             </template>
216
             </template>
248
           </el-table-column>
217
           </el-table-column>
249
 
218
 
350
         goodType: [],
319
         goodType: [],
351
         goodInfo:[],
320
         goodInfo:[],
352
         drugTypeList:[],
321
         drugTypeList:[],
353
-        manufacturerList:[]
322
+        manufacturerList:[],
323
+        drug_show:false
354
       }
324
       }
355
     },
325
     },
356
     methods: {
326
     methods: {
396
         this.propForm.goods = [];
366
         this.propForm.goods = [];
397
 
367
 
398
         this.propForm.goodType = [];
368
         this.propForm.goodType = [];
399
-      }, GetConfigInfo: function() {
369
+      }, 
370
+      GetConfigInfo: function() {
400
         const loading = this.$loading({
371
         const loading = this.$loading({
401
           lock: true,
372
           lock: true,
402
           text: "Loading",
373
           text: "Loading",
442
           }
413
           }
443
         }
414
         }
444
         return name;
415
         return name;
445
-      }, handleEdit: function(index, row) {
416
+      },
417
+       handleEdit: function(index, row) {
418
+        if(this.drug_show == true){
419
+          this.$message.error("自动出库数据不能编辑")
420
+          return
421
+        }
446
         const tempObj = {}
422
         const tempObj = {}
447
         tempObj['id'] = 0
423
         tempObj['id'] = 0
448
         tempObj['drug_id'] = 0
424
         tempObj['drug_id'] = 0
451
         tempObj['count'] = ''
427
         tempObj['count'] = ''
452
         tempObj['price'] = ''
428
         tempObj['price'] = ''
453
         tempObj['remark'] = ''
429
         tempObj['remark'] = ''
430
+        tempObj['batch_number'] = ''
431
+        tempObj['number'] = ''
454
         this.recordInfo.recordData.push(tempObj)
432
         this.recordInfo.recordData.push(tempObj)
455
       }, handleDelete: function(index, row) {
433
       }, handleDelete: function(index, row) {
434
+        if(this.drug_show == true){
435
+          this.$message.error("自动出库数据不能编辑")
436
+          return
437
+        }
456
         if (row.id == 0) {
438
         if (row.id == 0) {
457
           this.recordInfo.recordData.splice(index, 1)
439
           this.recordInfo.recordData.splice(index, 1)
458
         } else {
440
         } else {
544
                 return;
526
                 return;
545
               }
527
               }
546
             }
528
             }
529
+            console.log("经销商",this.dealerList)
547
             for(let i=0;i<this.recordInfo.recordData.length;i++){
530
             for(let i=0;i<this.recordInfo.recordData.length;i++){
531
+              if(this.recordInfo.recordData[i].dealer == ""){
532
+                this.recordInfo.recordData[i].dealer = 0
533
+              }
548
                for(let j=0;j<this.manufacturerList.length;j++){
534
                for(let j=0;j<this.manufacturerList.length;j++){
549
-                 if(this.recordInfo.recordData[i].manufacturer = this.manufacturerList[j].manufacturer_name){
535
+                 if(this.recordInfo.recordData[i].manufacturer == this.manufacturerList[j].manufacturer_name){
550
                     this.recordInfo.recordData[i].manufacturer = this.manufacturerList[j].id
536
                     this.recordInfo.recordData[i].manufacturer = this.manufacturerList[j].id
551
                  }
537
                  }
552
                }
538
                }
539
+               for(let z=0;z<this.dealerList.length;z++){
540
+                 if(this.recordInfo.recordData[i].dealer == this.dealerList[z].dealer_name){
541
+                    this.recordInfo.recordData[i].dealer = this.dealerList[z].id
542
+                 }
543
+               }
553
             }
544
             }
554
             const params = {
545
             const params = {
555
               'stockOut': this.recordInfo.recordData
546
               'stockOut': this.recordInfo.recordData
578
             this.$message.error(response.data.msg)
569
             this.$message.error(response.data.msg)
579
             return false
570
             return false
580
           } else {
571
           } else {
581
-             console.log("list222222",response.data.data.list)
572
+             console.log("出库详情",response.data.data.list)
582
             var manulist = response.data.data.manulist
573
             var manulist = response.data.data.manulist
574
+            this.manufacturerList = manulist
575
+            this.dealerList =  response.data.data.dealerList
583
             for (let i = 0; i < response.data.data.list.length; i++) {
576
             for (let i = 0; i < response.data.data.list.length; i++) {
584
               response.data.data.list[i].drug_name = response.data.data.list[i].drug.drug_name,
577
               response.data.data.list[i].drug_name = response.data.data.list[i].drug.drug_name,
585
               response.data.data.list[i].drug_type = response.data.data.list[i].drug.drug_type
578
               response.data.data.list[i].drug_type = response.data.data.list[i].drug.drug_type
586
               response.data.data.list[i].name = response.data.data.list[i].drug.dose + response.data.data.list[i].drug.dose_unit +"*"+response.data.data.list[i].drug.min_number+response.data.data.list[i].drug.min_unit + "/" + response.data.data.list[i].drug.max_unit
579
               response.data.data.list[i].name = response.data.data.list[i].drug.dose + response.data.data.list[i].drug.dose_unit +"*"+response.data.data.list[i].drug.min_number+response.data.data.list[i].drug.min_unit + "/" + response.data.data.list[i].drug.max_unit
587
-              response.data.data.list[i].last_price = response.data.data.list[i].drug.last_price.toString()
588
-              response.data.data.list[i].number = response.data.data.list[i].drug.number
589
-              response.data.data.list[i].manufacturer = response.data.data.list[i].drug.manufacturer
580
+              if(response.data.data.list[i].number == "0" || response.data.data.list[i].number == 0){
581
+                  response.data.data.list[i].number = ""
582
+              }else{
583
+                response.data.data.list[i].number = response.data.data.list[i].number
584
+              }
585
+              
586
+              if(response.data.data.list[i].manufacturer == "0" || response.data.data.list[i].manufacturer == 0){
587
+                response.data.data.list[i].manufacturer = ""
588
+              }else{
589
+                response.data.data.list[i].manufacturer = response.data.data.list[i].drug.manufacturer
590
+              }
591
+              
592
+             
590
               response.data.data.list[i].price = response.data.data.list[i].price.toString()
593
               response.data.data.list[i].price = response.data.data.list[i].price.toString()
591
               response.data.data.list[i].retail_price = response.data.data.list[i].retail_price.toString()
594
               response.data.data.list[i].retail_price = response.data.data.list[i].retail_price.toString()
592
               response.data.data.list[i].count = response.data.data.list[i].count.toString()
595
               response.data.data.list[i].count = response.data.data.list[i].count.toString()
596
+              if(response.data.data.list[i].dealer == "0" || response.data.data.list[i].dealer == 0){
597
+                  response.data.data.list[i].dealer = ""
598
+              }else{
599
+                response.data.data.list[i].dealer = response.data.data.list[i].dealer
600
+              }
601
+             
602
+              response.data.data.list[i].product_date = this.getTime(response.data.data.list[i].product_date,"{y}-{h}-{d}")
603
+              response.data.data.list[i].expiry_date = this.getTime(response.data.data.list[i].expiry_date,"{y}-{h}-{d}")
604
+              
593
               this.recordInfo.recordData.push(response.data.data.list[i])
605
               this.recordInfo.recordData.push(response.data.data.list[i])
594
             }
606
             }
595
              for(let j=0;j<this.recordInfo.recordData.length;j++){
607
              for(let j=0;j<this.recordInfo.recordData.length;j++){
598
                      this.recordInfo.recordData[j].manufacturer = manulist[i].manufacturer_name
610
                      this.recordInfo.recordData[j].manufacturer = manulist[i].manufacturer_name
599
                   }
611
                   }
600
                }
612
                }
613
+               for(let z=0;z<this.dealerList.length;z++){
614
+                 if(this.recordInfo.recordData[j].dealer == this.dealerList[z].id){
615
+                    this.recordInfo.recordData[j].dealer = this.dealerList[z].dealer_name
616
+                 }
617
+               }
601
               }
618
               }
602
 
619
 
603
             this.warehouseOut = response.data.data.info
620
             this.warehouseOut = response.data.data.info
604
             this.warehouse_out_time = this.getTime(this.warehouseOut.warehouse_out_time, '{y}-{m}-{d}')
621
             this.warehouse_out_time = this.getTime(this.warehouseOut.warehouse_out_time, '{y}-{m}-{d}')
605
-            this.form.manufacturer = this.warehouseOut.manufacturer
606
-            this.form.dealer = this.warehouseOut.dealer
622
+          
607
 
623
 
608
           }
624
           }
609
 
625
 
671
              this.recordInfo.recordData[i].drug_name = val.drug_name
687
              this.recordInfo.recordData[i].drug_name = val.drug_name
672
              this.recordInfo.recordData[i].drug_type = val.drug_type
688
              this.recordInfo.recordData[i].drug_type = val.drug_type
673
              this.recordInfo.recordData[i].name  = val.dose +val.dose_unit+"*"+val.min_number+ val.min_unit+"/"+val.max_unit
689
              this.recordInfo.recordData[i].name  = val.dose +val.dose_unit+"*"+val.min_number+ val.min_unit+"/"+val.max_unit
674
-             this.recordInfo.recordData[i].last_price = val.last_price
690
+             this.recordInfo.recordData[i].last_price = val.retail_price
675
              this.recordInfo.recordData[i].manufacturer =  val.manufacturer
691
              this.recordInfo.recordData[i].manufacturer =  val.manufacturer
676
-             this.recordInfo.recordData[i].batch_number = val.number
692
+             this.recordInfo.recordData[i].number = val.number
677
              this.recordInfo.recordData[i].max_unit = val.max_unit
693
              this.recordInfo.recordData[i].max_unit = val.max_unit
678
              this.recordInfo.recordData[i].min_unit = val.min_unit
694
              this.recordInfo.recordData[i].min_unit = val.min_unit
695
+           
679
            }
696
            }
680
         }
697
         }
681
         console.log("333333",this.recordInfo.recordData)
698
         console.log("333333",this.recordInfo.recordData)
690
       this.propForm.goodUnit = this.$store.getters.good_unit
707
       this.propForm.goodUnit = this.$store.getters.good_unit
691
       const order_id = this.$route.query.id
708
       const order_id = this.$route.query.id
692
       this.GetOrderDetail(order_id)
709
       this.GetOrderDetail(order_id)
710
+      var sys = this.$route.query.is_sys
711
+      if(sys == 0){
712
+        this.drug_show = false
713
+      }
714
+      if(sys == 1){
715
+        this.drug_show = true
716
+      }
693
     }
717
     }
694
 
718
 
695
   }
719
   }

+ 2 - 2
src/xt_pages/stock/drugs/query.vue Datei anzeigen

123
         </el-table-column>
123
         </el-table-column>
124
         <el-table-column prop="drug_name" label="剩余库存量" align="center">
124
         <el-table-column prop="drug_name" label="剩余库存量" align="center">
125
            <template slot-scope="scope">
125
            <template slot-scope="scope">
126
-            <!-- {{getInCount(scope.row.drug_id) - getOutCount(scope.row.drug_id) - getAutoCount(scope.row.drug_id)}} -->
126
+           
127
             {{getCountTwo(scope.row.drug_id,scope.row.min_number,scope.row.max_unit,scope.row.min_unit)}}
127
             {{getCountTwo(scope.row.drug_id,scope.row.min_number,scope.row.max_unit,scope.row.min_unit)}}
128
            </template>
128
            </template>
129
         </el-table-column>
129
         </el-table-column>
451
            this.tableList[i].overplusCount = this.getCountTwo(this.tableList[i].drug_id,this.tableList[i].min_number,this.tableList[i].max_unit,this.tableList[i].min_unit)
451
            this.tableList[i].overplusCount = this.getCountTwo(this.tableList[i].drug_id,this.tableList[i].min_number,this.tableList[i].max_unit,this.tableList[i].min_unit)
452
          }
452
          }
453
        
453
        
454
-         console.log("2322323232",this.tableList)
454
+         console.log("hhhhhhhadhfadf 列表",this.tableList)
455
          import('@/vendor/Export2Excel').then(excel => {
455
          import('@/vendor/Export2Excel').then(excel => {
456
          const tHeader = ['序号', '药品类型', '药品名称','规格型号&单位','进货单价','厂家','入库数量','出库数量','剩余库存量']
456
          const tHeader = ['序号', '药品类型', '药品名称','规格型号&单位','进货单价','厂家','入库数量','出库数量','剩余库存量']
457
          const filterVal = ['index', 'drug_type_name', 'drug_name','unit','last_price','manufacturer_name','inCount','outCount','overplusCount']
457
          const filterVal = ['index', 'drug_type_name', 'drug_name','unit','last_price','manufacturer_name','inCount','outCount','overplusCount']

+ 34 - 2
src/xt_pages/stock/stockBatchNumber.vue Datei anzeigen

6
     <div class="app-container ">
6
     <div class="app-container ">
7
       <div class="cell clearfix">
7
       <div class="cell clearfix">
8
         耗材名称:{{this.$route.query.good_name}} &nbsp;
8
         耗材名称:{{this.$route.query.good_name}} &nbsp;
9
-        库存:{{getInCount(this.$route.query.id)}} &nbsp;
9
+        库存: {{getInCount(this.$route.query.id)- getOutCount(this.$route.query.id) - getAutoCount(this.$route.query.id) + getCancelCount(this.$route.query.id)}}{{this.$route.query.packing_unit}}&nbsp;
10
         规格:{{this.$route.query.specification_name}} &nbsp;
10
         规格:{{this.$route.query.specification_name}} &nbsp;
11
         厂家:{{this.$route.query.manufacturer}} 
11
         厂家:{{this.$route.query.manufacturer}} 
12
       </div>
12
       </div>
187
         outCountList:[],
187
         outCountList:[],
188
         autoCountList:[],
188
         autoCountList:[],
189
         keywords:"",
189
         keywords:"",
190
-        packing_unit:""
190
+        packing_unit:"",
191
+        cancelCountList:[],
191
       }
192
       }
192
     },
193
     },
193
     methods:{
194
     methods:{
273
         }
274
         }
274
         return count
275
         return count
275
      },
276
      },
277
+     getOutCount(id){
278
+        console.log("id222",id)
279
+        var count = ""
280
+        for(let i=0;i<this.outCountList.length;i++){
281
+          if(id == this.outCountList[i].good_id){
282
+            count = this.outCountList[i].count
283
+          }
284
+        }
285
+        return count
286
+      },
287
+      getAutoCount(id){
288
+        var count= ""
289
+        for(let i=0;i<this.autoCountList.length;i++){
290
+          if(id == this.autoCountList[i].good_id){
291
+            count = this.autoCountList[i].count
292
+          }
293
+        }
294
+        return count
295
+      },
296
+    getCancelCount(id){
297
+      var count = 0
298
+      for(let i=0;i<this.cancelCountList.length;i++){
299
+        if(id == this.cancelCountList[i].good_id){
300
+            count = this.cancelCountList[i].count
301
+        }
302
+      }
303
+      return count
304
+    },
276
      getTimestamp(time) {
305
      getTimestamp(time) {
277
       // 把时间日期转成时间戳
306
       // 把时间日期转成时间戳
278
       return new Date(time).getTime() / 1000;
307
       return new Date(time).getTime() / 1000;
295
            var autoCount = response.data.data.autoCount
324
            var autoCount = response.data.data.autoCount
296
            console.log("详情自动出库",autoCount)
325
            console.log("详情自动出库",autoCount)
297
            this.autoCountList = autoCount
326
            this.autoCountList = autoCount
327
+           var totalCount = response.data.data.totalCount
328
+           console.log("totalcount",totalCount)
329
+           this.cancelCountList = totalCount
298
          }
330
          }
299
       })
331
       })
300
     },
332
     },

+ 2 - 2
src/xt_pages/stock/stockDetailIndex.vue Datei anzeigen

9
           <el-tab-pane label="入库明细" name="first">
9
           <el-tab-pane label="入库明细" name="first">
10
             <stock-in-detail></stock-in-detail>
10
             <stock-in-detail></stock-in-detail>
11
           </el-tab-pane>
11
           </el-tab-pane>
12
-          <el-tab-pane label="退货明细">
12
+          <!-- <el-tab-pane label="退货明细">
13
             <sales-return-detail></sales-return-detail>
13
             <sales-return-detail></sales-return-detail>
14
 
14
 
15
-          </el-tab-pane>
15
+          </el-tab-pane> -->
16
           <el-tab-pane label="出库明细">
16
           <el-tab-pane label="出库明细">
17
             <stock-out-detail></stock-out-detail>
17
             <stock-out-detail></stock-out-detail>
18
 
18
 

+ 15 - 4
src/xt_pages/stock/stockFlow.vue Datei anzeigen

6
     <div class="app-container ">
6
     <div class="app-container ">
7
       <div class="cell clearfix">
7
       <div class="cell clearfix">
8
        耗材名称:{{this.$route.query.good_name}} &nbsp;
8
        耗材名称:{{this.$route.query.good_name}} &nbsp;
9
-       库存:{{getInCount(this.$route.query.id)}} &nbsp;
9
+       库存:  {{getInCount(this.$route.query.id)- getOutCount(this.$route.query.id) - getAutoCount(this.$route.query.id) + getCancelCount(this.$route.query.id)}}{{this.$route.query.packing_unit }} &nbsp;
10
        规格:{{this.$route.query.specification_name}} &nbsp;
10
        规格:{{this.$route.query.specification_name}} &nbsp;
11
        厂家:{{this.$route.query.manufacturer}} 
11
        厂家:{{this.$route.query.manufacturer}} 
12
       </div>
12
       </div>
212
         autoCountList:[],
212
         autoCountList:[],
213
         keywords:"",
213
         keywords:"",
214
         obj:{},
214
         obj:{},
215
-        packing_unit:""
215
+        packing_unit:"",
216
+        cancelCountList:[]
216
       }
217
       }
217
     },
218
     },
218
     methods:{
219
     methods:{
342
            var autoCount = response.data.data.autoCount
343
            var autoCount = response.data.data.autoCount
343
            console.log("详情自动出库",autoCount)
344
            console.log("详情自动出库",autoCount)
344
            this.autoCountList = autoCount
345
            this.autoCountList = autoCount
346
+           var totalCount = response.data.data.totalCount
347
+           console.log("totalcount",totalCount)
348
+           this.cancelCountList = totalCount
345
          }
349
          }
346
       })
350
       })
347
     },
351
     },
373
         }
377
         }
374
         return count
378
         return count
375
       },
379
       },
380
+    getCancelCount(id){
381
+      var count = 0
382
+      for(let i=0;i<this.cancelCountList.length;i++){
383
+        if(id == this.cancelCountList[i].good_id){
384
+            count = this.cancelCountList[i].count
385
+        }
386
+      }
387
+      return count
388
+    },
376
      getTimestamp(time) {
389
      getTimestamp(time) {
377
       // 把时间日期转成时间戳
390
       // 把时间日期转成时间戳
378
       return new Date(time).getTime() / 1000;
391
       return new Date(time).getTime() / 1000;
385
        if(val == 2 || val == 3 || val == 0){
398
        if(val == 2 || val == 3 || val == 0){
386
         this.getStockOutList()
399
         this.getStockOutList()
387
        }
400
        }
388
-      
389
-      
390
      }
401
      }
391
     }
402
     }
392
   }
403
   }

+ 18 - 7
src/xt_pages/stock/stockInOrder.vue Datei anzeigen

189
         </el-table-column>
189
         </el-table-column>
190
         <el-table-column label="规格&单位" align="center">
190
         <el-table-column label="规格&单位" align="center">
191
           <template slot-scope="scope">
191
           <template slot-scope="scope">
192
-            {{ scope.row.GoodInfo.specification_name}} * {{scope.row.GoodInfo.min_number}}{{scope.row.GoodInfo.min_unit}}
192
+            {{ scope.row.GoodInfo.specification_name}} / {{scope.row.GoodInfo.packing_unit}}
193
           </template>
193
           </template>
194
         </el-table-column>
194
         </el-table-column>
195
         <el-table-column label="批号" align="center">
195
         <el-table-column label="批号" align="center">
199
         </el-table-column>
199
         </el-table-column>
200
         <el-table-column label="入库数量" align="center">
200
         <el-table-column label="入库数量" align="center">
201
           <template slot-scope="scope">
201
           <template slot-scope="scope">
202
-            {{ scope.row.warehousing_count}}
202
+            {{ scope.row.warehousing_count}}{{scope.row.GoodInfo.packing_unit}}
203
           </template>
203
           </template>
204
         </el-table-column>
204
         </el-table-column>
205
         <el-table-column label="进货价" align="center">
205
         <el-table-column label="进货价" align="center">
227
             {{ getTime(scope.row.expiry_date,"{y}-{m}-{d}")}}
227
             {{ getTime(scope.row.expiry_date,"{y}-{m}-{d}")}}
228
           </template>
228
           </template>
229
         </el-table-column>
229
         </el-table-column>
230
+       <el-table-column label="经销商" align="center">
231
+          <template slot-scope="scope">
232
+            {{ getDealerName(scope.row.dealer)}}
233
+          </template>
234
+        </el-table-column>
230
        <el-table-column label="批准文号" align="center">
235
        <el-table-column label="批准文号" align="center">
231
           <template slot-scope="scope">
236
           <template slot-scope="scope">
232
             {{ scope.row.license_number}}
237
             {{ scope.row.license_number}}
545
               ></el-date-picker>
550
               ></el-date-picker>
546
             </template>
551
             </template>
547
           </el-table-column>
552
           </el-table-column>
553
+          
548
           <el-table-column label="备注" width="150" align="center">
554
           <el-table-column label="备注" width="150" align="center">
549
             <template slot-scope="scope">
555
             <template slot-scope="scope">
550
               <el-input v-model="scope.row.remark"></el-input>
556
               <el-input v-model="scope.row.remark"></el-input>
1093
       for(let i=0;i<selection.length;i++){
1099
       for(let i=0;i<selection.length;i++){
1094
         ids.push(selection[i].id)
1100
         ids.push(selection[i].id)
1095
       }
1101
       }
1102
+      this.exportList = []
1096
       var str = ids.join(",")
1103
       var str = ids.join(",")
1097
       this.order_id = str
1104
       this.order_id = str
1098
       this.selectedTableData = selection;
1105
       this.selectedTableData = selection;
1457
       getExportStockList(params).then(response=>{
1464
       getExportStockList(params).then(response=>{
1458
         if(response.data.state == 1){
1465
         if(response.data.state == 1){
1459
            var list = response.data.data.list
1466
            var list = response.data.data.list
1460
-           console.log("l类型",this.manufacturer)
1467
+           console.log("数据导出222222",list)
1461
            for(let i=0;i<this.goodType.length;i++){
1468
            for(let i=0;i<this.goodType.length;i++){
1462
              for(let j=0;j<list.length;j++){
1469
              for(let j=0;j<list.length;j++){
1463
                if(this.goodType[i].id == list[j].good_type_id){
1470
                if(this.goodType[i].id == list[j].good_type_id){
1482
                }
1489
                }
1483
             }
1490
             }
1484
           }
1491
           }
1485
-         
1492
+          console.log("表格2222222",this.exportList)
1486
           this.exportList = list
1493
           this.exportList = list
1487
         }
1494
         }
1488
       })
1495
       })
1489
     },
1496
     },
1490
     toExport(){
1497
     toExport(){
1491
-       console.log("列表22222222222",this.exportList)
1498
+     if(this.order_id == ""){
1499
+        this.$message.error("请勾选入库单")
1500
+        return
1501
+      }
1492
       import('@/vendor/Export2Excel').then(excel => {
1502
       import('@/vendor/Export2Excel').then(excel => {
1493
 
1503
 
1494
-      const tHeader = ['耗材类型', '耗材名称', '规格&单位','批号','入库数量','进货价','总价','生产厂家','生产日期','有效日期','经销商','备注']
1495
-      const filterVal = ['good_type_name', 'good_name', 'unit','number','total_count','price','total_price','manufacturer','product_date','expiry_date','dealer','remark']
1504
+      const tHeader = ['耗材名称','注册证号/批准文号/备案凭证号', '规格型号','生产厂家','单位','进货价','入库数量','总价','批号','生产日期','有效日期']
1505
+      const filterVal = ['good_name', 'license_number', 'unit','manufacturer','packing_unit','price','warehousing_count','total_price','number','product_date','expiry_date']
1496
 
1506
 
1497
       console.log("table",this.exportList)
1507
       console.log("table",this.exportList)
1508
+      
1498
       const data = this.formatJson(filterVal, this.exportList)
1509
       const data = this.formatJson(filterVal, this.exportList)
1499
       excel.export_json_to_excel({
1510
       excel.export_json_to_excel({
1500
         header: tHeader,
1511
         header: tHeader,

+ 16 - 29
src/xt_pages/stock/stockInOrderAdd.vue Datei anzeigen

26
                         value-format="yyyy-MM-dd"></el-date-picker>
26
                         value-format="yyyy-MM-dd"></el-date-picker>
27
       </div>
27
       </div>
28
 
28
 
29
-      <!-- <div class="cell clearfix">
30
-        <label class="title"><span class="name">经销商</span> : </label>
31
-       
32
-       <el-select size="small" v-model="form.dealer" filterable placeholder="请选择经销商"  @change="changeDealer">
33
-           <el-option
34
-            v-for="(option, index) in dealer"
35
-            :key="index"
36
-            :label="option.dealer_name"
37
-            :value="option.id">
38
-          </el-option>
39
-        </el-select>
40
-      </div> -->
41
-
42
-      <!-- <div class="cell clearfix">
43
-        <label class="title"><span class="name">厂商</span> : </label>
44
-
45
-        <el-select size="small" v-model="form.manufacturer" filterable placeholder="请选择厂商"
46
-                   @change="changeManufacturer">
47
-          <el-option
48
-            v-for="(option, index) in manufacturer"
49
-            :key="index"
50
-            :label="option.manufacturer_name"
51
-            :value="option.id">
52
-          </el-option>
53
-        </el-select>
54
-      </div> -->
55
-
29
+    
56
       <el-form :rules="tableRules" :model="recordInfo" ref="tableForm">
30
       <el-form :rules="tableRules" :model="recordInfo" ref="tableForm">
57
         <el-table id="oictable" :data="recordInfo.recordData" :class="signAndWeighBoxPatients" border
31
         <el-table id="oictable" :data="recordInfo.recordData" :class="signAndWeighBoxPatients" border
58
                   style="width: 100%"
32
                   style="width: 100%"
672
               return
646
               return
673
             }
647
             }
674
             for(let i=0;i<this.recordInfo.recordData.length;i++){
648
             for(let i=0;i<this.recordInfo.recordData.length;i++){
649
+             if(this.recordInfo.recordData[i].dealer == ""){
650
+                this.recordInfo.recordData[i].dealer = 0
651
+             }
675
               for(let j=0;j<this.manufacturerList.length;j++){
652
               for(let j=0;j<this.manufacturerList.length;j++){
676
                  if(this.recordInfo.recordData[i].manufacturer == this.manufacturerList[j].manufacturer_name){
653
                  if(this.recordInfo.recordData[i].manufacturer == this.manufacturerList[j].manufacturer_name){
677
                
654
                
768
               this.recordInfo.recordData[i].number =  val.number
745
               this.recordInfo.recordData[i].number =  val.number
769
               this.recordInfo.recordData[i].manufacturer = val.manufacturer
746
               this.recordInfo.recordData[i].manufacturer = val.manufacturer
770
               this.recordInfo.recordData[i].remark = val.remark
747
               this.recordInfo.recordData[i].remark = val.remark
771
-              this.recordInfo.recordData[i].price = val.buy_price
748
+              if(val.buy_price == 0){
749
+               this.recordInfo.recordData[i].price = ""
750
+              }else{
751
+                this.recordInfo.recordData[i].price = val.buy_price
752
+              }
753
+              
772
               this.recordInfo.recordData[i].specification_name = val.specification_name
754
               this.recordInfo.recordData[i].specification_name = val.specification_name
773
               this.recordInfo.recordData[i].good_id = val.id
755
               this.recordInfo.recordData[i].good_id = val.id
774
               this.recordInfo.recordData[i].packing_unit = val.packing_unit
756
               this.recordInfo.recordData[i].packing_unit = val.packing_unit
775
-              this.recordInfo.recordData[i].dealer = val.dealer
757
+              if(val.dealer == 0){
758
+                this.recordInfo.recordData[i].dealer = ""
759
+              }else{
760
+                this.recordInfo.recordData[i].dealer = val.dealer
761
+              }
762
+             
776
            }
763
            }
777
          }
764
          }
778
       }
765
       }

+ 36 - 13
src/xt_pages/stock/stockInOrderEdit.vue Datei anzeigen

651
          
651
          
652
           for(let i=0;i<this.recordInfo.recordData.length;i++){
652
           for(let i=0;i<this.recordInfo.recordData.length;i++){
653
             this.recordInfo.recordData[i].price = this.recordInfo.recordData[i].price.toString()
653
             this.recordInfo.recordData[i].price = this.recordInfo.recordData[i].price.toString()
654
-            
655
-          for(let j=0;j<this.manufacturerList.length;j++){
654
+             if(this.recordInfo.recordData[i].dealer == ""){
655
+                this.recordInfo.recordData[i].dealer = 0
656
+             }
657
+            for(let j=0;j<this.manufacturerList.length;j++){
656
               if(this.recordInfo.recordData[i].manufacturer == this.manufacturerList[j].manufacturer_name){
658
               if(this.recordInfo.recordData[i].manufacturer == this.manufacturerList[j].manufacturer_name){
657
                   this.recordInfo.recordData[i].manufacturer = this.manufacturerList[j].id
659
                   this.recordInfo.recordData[i].manufacturer = this.manufacturerList[j].id
658
-                 }
660
+                  }
659
               }
661
               }
662
+             for(let z=0;z<this.dealerList.length;z++){
663
+               if(this.recordInfo.recordData[i].dealer == this.dealerList[z].dealer_name){
664
+                  this.recordInfo.recordData[i].dealer = this.dealerList[z].id
665
+               }
666
+             }
660
           }
667
           }
661
          
668
          
662
           const params = {
669
           const params = {
713
             response.data.data.info[i].name = response.data.data.info[i].GoodInfo.specification_name + "/"+response.data.data.info[i].GoodInfo.packing_unit
720
             response.data.data.info[i].name = response.data.data.info[i].GoodInfo.specification_name + "/"+response.data.data.info[i].GoodInfo.packing_unit
714
             response.data.data.info[i].packing_unit = response.data.data.info[i].GoodInfo.packing_unit
721
             response.data.data.info[i].packing_unit = response.data.data.info[i].GoodInfo.packing_unit
715
             
722
             
723
+            if(response.data.data.info[i].manufacturer == 0){
724
+              response.data.data.manufacturer = ""
725
+            }
726
+            if(response.data.data.info[i].dealer == 0){
727
+              response.data.data.info[i].dealer = ""
728
+            }
716
            
729
            
717
             this.recordInfo.recordData.push(response.data.data.info[i]);
730
             this.recordInfo.recordData.push(response.data.data.info[i]);
718
            
731
            
758
             this.goodList = list
771
             this.goodList = list
759
             var manufacturerList = response.data.data.manufacturerList
772
             var manufacturerList = response.data.data.manufacturerList
760
             this.manufacturerList = manufacturerList
773
             this.manufacturerList = manufacturerList
761
-            // this.dealerList = response.data.data.dealerList
774
+            this.dealerList = response.data.data.dealerList
762
             for(let i=0;i<this.goodList.length;i++){
775
             for(let i=0;i<this.goodList.length;i++){
763
                 for(let j=0;j<manufacturerList.length;j++){
776
                 for(let j=0;j<manufacturerList.length;j++){
764
                   if(this.goodList[i].manufacturer == manufacturerList[j].id){
777
                   if(this.goodList[i].manufacturer == manufacturerList[j].id){
766
                   }
779
                   }
767
                 }
780
                 }
768
             }
781
             }
769
-            // for(let i=0;i<this.goodList.length;i++){
770
-            //    for(let j=0;j<this.dealerList.length;j++){
771
-            //       if(this.goodList[i].dealer == this.dealerList[j].id){
772
-            //         this.goodList[i].dealer = this.dealerList[j].dealer_name
773
-            //       }
774
-            //    }
775
-            //  }
782
+            for(let i=0;i<this.goodList.length;i++){
783
+               for(let j=0;j<this.dealerList.length;j++){
784
+                  if(this.goodList[i].dealer == this.dealerList[j].id){
785
+                    this.goodList[i].dealer = this.dealerList[j].dealer_name
786
+                  }
787
+               }
788
+             }
776
             cb(this.goodList)
789
             cb(this.goodList)
777
           } else {
790
           } else {
778
             cb([])
791
             cb([])
793
             this.recordInfo.recordData[i].number =  val.number
806
             this.recordInfo.recordData[i].number =  val.number
794
             this.recordInfo.recordData[i].manufacturer = val.manufacturer
807
             this.recordInfo.recordData[i].manufacturer = val.manufacturer
795
             this.recordInfo.recordData[i].remark = val.remark
808
             this.recordInfo.recordData[i].remark = val.remark
796
-            this.recordInfo.recordData[i].price = val.buy_price
809
+            if(val.buy_price == 0){
810
+               this.recordInfo.recordData[i].price= ""
811
+            }else{
812
+               this.recordInfo.recordData[i].price = val.buy_price
813
+            }
814
+          
797
             this.recordInfo.recordData[i].specification_name = val.specification_name
815
             this.recordInfo.recordData[i].specification_name = val.specification_name
798
             this.recordInfo.recordData[i].good_id = val.id
816
             this.recordInfo.recordData[i].good_id = val.id
799
             this.recordInfo.recordData[i].packing_unit = val.packing_unit
817
             this.recordInfo.recordData[i].packing_unit = val.packing_unit
800
-            this.recordInfo.recordData[i].dealer = val.dealer
818
+            if(val.dealer == 0){
819
+              this.recordInfo.recordData[i].dealer
820
+            }else{
821
+              this.recordInfo.recordData[i].dealer = val.dealer
822
+            }
823
+          
801
           }
824
           }
802
          
825
          
803
          if(val.xt_warehouse_info.length > 0){
826
          if(val.xt_warehouse_info.length > 0){

+ 23 - 9
src/xt_pages/stock/stockOutOrder.vue Datei anzeigen

191
           </el-table-column>
191
           </el-table-column>
192
           <el-table-column label="规格&单位" align="center">
192
           <el-table-column label="规格&单位" align="center">
193
             <template slot-scope="scope">
193
             <template slot-scope="scope">
194
-              {{ scope.row.specification_name}} * {{scope.row.min_number}}{{scope.row.min_unit}}
194
+              {{ scope.row.specification_name}} / {{scope.row.packing_unit}}
195
             </template>
195
             </template>
196
           </el-table-column>
196
           </el-table-column>
197
           <el-table-column label="批号" align="center">
197
           <el-table-column label="批号" align="center">
201
           </el-table-column>
201
           </el-table-column>
202
           <el-table-column label="出库数量" align="center">
202
           <el-table-column label="出库数量" align="center">
203
             <template slot-scope="scope">
203
             <template slot-scope="scope">
204
-              <span v-if="scope.row.is_sys == 0">{{ scope.row.count}}</span> 
205
-              <span v-if="scope.row.is_sys == 1">{{getOutStockCount(scope.row.good_id)}}</span> 
204
+              <span v-if="scope.row.is_sys == 0">{{ scope.row.count}}{{scope.row.packing_unit}}</span> 
205
+              <span v-if="scope.row.is_sys == 1">{{getOutStockCount(scope.row.good_id)}}{{scope.row.packing_unit}}</span> 
206
             </template>
206
             </template>
207
           </el-table-column>
207
           </el-table-column>
208
           <el-table-column label="出货价" align="center">
208
           <el-table-column label="出货价" align="center">
227
           </el-table-column>
227
           </el-table-column>
228
           <el-table-column label="生产日期" align="center">
228
           <el-table-column label="生产日期" align="center">
229
             <template slot-scope="scope">
229
             <template slot-scope="scope">
230
-              {{ getTime(scope.row.product_date,"{y}-{h}-{d}")}}
230
+              {{ getTime(scope.row.product_date,"{y}-{m}-{d}")}}
231
             </template>
231
             </template>
232
           </el-table-column>
232
           </el-table-column>
233
           <el-table-column label="有效期" align="center">
233
           <el-table-column label="有效期" align="center">
234
             <template slot-scope="scope">
234
             <template slot-scope="scope">
235
-              {{ getTime(scope.row.expiry_date,"{y}-{h}-{d}")}}
235
+              {{ getTime(scope.row.expiry_date,"{y}-{m}-{d}")}}
236
+            </template>
237
+          </el-table-column>
238
+          <el-table-column label="批准文号" align="center">
239
+            <template slot-scope="scope">
240
+              {{ scope.row.license_number}}
236
             </template>
241
             </template>
237
           </el-table-column>
242
           </el-table-column>
238
           <el-table-column label="备注" align="center">
243
           <el-table-column label="备注" align="center">
406
               <span>使用数量</span>
411
               <span>使用数量</span>
407
             </template>
412
             </template>
408
             <template slot-scope="scope">
413
             <template slot-scope="scope">
409
-              <span v-if="scope.row.is_total == 0">{{scope.row.count}}</span>
410
-              <span  v-if="scope.row.is_total == 1">{{scope.row.total}} </span>
414
+              <span v-if="scope.row.is_total == 0">{{scope.row.count}}{{scope.row.info.packing_unit}}</span>
415
+              <span  v-if="scope.row.is_total == 1">{{scope.row.total}}{{scope.row.info.packing_unit}} </span>
411
 
416
 
412
             </template>
417
             </template>
413
           </el-table-column>
418
           </el-table-column>
609
               <span>使用数量</span>
614
               <span>使用数量</span>
610
             </template>
615
             </template>
611
             <template slot-scope="scope">
616
             <template slot-scope="scope">
612
-              <span v-if="scope.row.is_total == 0">{{scope.row.count}}</span>
617
+              <span v-if="scope.row.is_total == 0">{{scope.row.count}}{{scope.row.info.packing_unit}}</span>
613
               <span  v-if="scope.row.is_total == 1">{{scope.row.total}} </span>
618
               <span  v-if="scope.row.is_total == 1">{{scope.row.total}} </span>
614
 
619
 
615
             </template>
620
             </template>
1004
         ids.push(selection[i].id)
1009
         ids.push(selection[i].id)
1005
       }
1010
       }
1006
       console.log("ids",ids)
1011
       console.log("ids",ids)
1012
+      this.exportList = []
1007
       this.order_id = ids.join(",")
1013
       this.order_id = ids.join(",")
1008
       this.warehouse_out_time = selection[0].warehouse_out_time
1014
       this.warehouse_out_time = selection[0].warehouse_out_time
1009
       this.selectedTableData = selection;
1015
       this.selectedTableData = selection;
1010
       this.getlist()
1016
       this.getlist()
1017
+
1011
     },
1018
     },
1012
     batchDelete() {
1019
     batchDelete() {
1013
       if (this.selectedTableData.length <= 0) {
1020
       if (this.selectedTableData.length <= 0) {
1519
             var outCount = response.data.data.outCount
1526
             var outCount = response.data.data.outCount
1520
             console.log("outCount",outCount)
1527
             console.log("outCount",outCount)
1521
             for(let i=0;i<list.length;i++){
1528
             for(let i=0;i<list.length;i++){
1529
+               list[i].unit = list[i].specification_name + list[i].packing_unit
1530
+               list[i].total_price = (list[i].total_count * list[i].price).toFixed(2)
1531
+               list[i].expiry_date = this.getTime(list[i].expiry_date,"{y}-{m}-{d}")
1532
+               list[i].product_date = this.getTime(list[i].product_date,"{y}-{m}-{d}") 
1522
               for(let j=0;j<this.manufacturer.length;j++){
1533
               for(let j=0;j<this.manufacturer.length;j++){
1523
                 if(list[i].manufacturer == this.manufacturer[j].id){
1534
                 if(list[i].manufacturer == this.manufacturer[j].id){
1524
                   list[i].manufacturer = this.manufacturer[j].manufacturer_name
1535
                   list[i].manufacturer = this.manufacturer[j].manufacturer_name
1541
         })
1552
         })
1542
       },
1553
       },
1543
       toExport(){
1554
       toExport(){
1544
-       console.log("列表22222222222",this.exportList)
1555
+        if(this.order_id == ""){
1556
+         this.$message.error("请勾选出库单")
1557
+         return
1558
+        }
1545
         import('@/vendor/Export2Excel').then(excel => {
1559
         import('@/vendor/Export2Excel').then(excel => {
1546
         for(let i=0;i<this.exportList.length;i++){
1560
         for(let i=0;i<this.exportList.length;i++){
1547
           this.exportList[i].total_price = this.exportList[i].count * this.exportList[i].price
1561
           this.exportList[i].total_price = this.exportList[i].count * this.exportList[i].price

+ 28 - 6
src/xt_pages/stock/stockOutOrderAdd.vue Datei anzeigen

33
         v-on:dialog-comfirm="comfirm"
33
         v-on:dialog-comfirm="comfirm"
34
         v-on:dialog-cancle="cancle"
34
         v-on:dialog-cancle="cancle"
35
       >
35
       >
36
-
37
-
38
       </stock-in-dialog>
36
       </stock-in-dialog>
39
 
37
 
40
 
38
 
263
             </template>
261
             </template>
264
           </el-table-column>
262
           </el-table-column>
265
          
263
          
264
+          <el-table-column  width="150" align="center">
265
+            <template slot="header" slot-scope="scope">
266
+            <span>批准文号<span style="color: red"></span></span>
267
+          </template>
268
+          <template slot-scope="scope">
269
+              <el-input placeholder="请输入批准文号" v-model="scope.row.license_number"></el-input>
270
+          </template>
271
+        </el-table-column>
272
+
266
 
273
 
267
           <el-table-column label="经销商"  width="150" align="center">
274
           <el-table-column label="经销商"  width="150" align="center">
268
             <template slot-scope="scope">
275
             <template slot-scope="scope">
490
       tempObj["number"] = ""
497
       tempObj["number"] = ""
491
       tempObj["expiry_date"] = ""
498
       tempObj["expiry_date"] = ""
492
       tempObj["product_date"] = ""
499
       tempObj["product_date"] = ""
500
+      tempObj["license_number"] = ""
493
       this.recordInfo.recordData.push(tempObj);
501
       this.recordInfo.recordData.push(tempObj);
494
     },
502
     },
495
     handleDelete: function(index, row) {
503
     handleDelete: function(index, row) {
605
           }
613
           }
606
        
614
        
607
           for(let i=0;i<this.recordInfo.recordData.length;i++){
615
           for(let i=0;i<this.recordInfo.recordData.length;i++){
616
+             if(this.recordInfo.recordData[i].dealer == ""){
617
+                this.recordInfo.recordData[i].dealer = 0
618
+             }
608
             if(this.recordInfo.recordData[i].expiry_date == "" || this.recordInfo.recordData[i].expiry_date == undefined){
619
             if(this.recordInfo.recordData[i].expiry_date == "" || this.recordInfo.recordData[i].expiry_date == undefined){
609
               this.recordInfo.recordData[i].expiry_date = ""
620
               this.recordInfo.recordData[i].expiry_date = ""
610
             } 
621
             } 
630
             stockOut: this.recordInfo.recordData
641
             stockOut: this.recordInfo.recordData
631
           };
642
           };
632
           console.log("2323223223",this.recordInfo.recordData);
643
           console.log("2323223223",this.recordInfo.recordData);
633
-         
644
+ 
634
           postWarehouseOut(
645
           postWarehouseOut(
635
             params,
646
             params,
636
             this.warehouse_out_time,
647
             this.warehouse_out_time,
712
       this.currentIndex = val
723
       this.currentIndex = val
713
     },
724
     },
714
     handleSelect(val){
725
     handleSelect(val){
715
-      console.log("val",val)
716
         for(let i=0;i<this.recordInfo.recordData.length;i++){
726
         for(let i=0;i<this.recordInfo.recordData.length;i++){
717
           if(this.currentIndex == i){
727
           if(this.currentIndex == i){
718
             this.recordInfo.recordData[i].good_type_id = val.id
728
             this.recordInfo.recordData[i].good_type_id = val.id
721
             this.recordInfo.recordData[i].name = val.specification_name +"/"+val.packing_unit
731
             this.recordInfo.recordData[i].name = val.specification_name +"/"+val.packing_unit
722
             this.recordInfo.recordData[i].manufacturer = val.manufacturer
732
             this.recordInfo.recordData[i].manufacturer = val.manufacturer
723
             this.recordInfo.recordData[i].remark = val.remark
733
             this.recordInfo.recordData[i].remark = val.remark
724
-            this.recordInfo.recordData[i].price = val.buy_price
734
+            if(val.packing_price == 0){
735
+              this.recordInfo.recordData[i].price =""
736
+            }else{
737
+              this.recordInfo.recordData[i].price = val.packing_price
738
+            }
739
+           
725
             this.recordInfo.recordData[i].specification_name = val.specification_name
740
             this.recordInfo.recordData[i].specification_name = val.specification_name
726
             this.recordInfo.recordData[i].good_id = val.id
741
             this.recordInfo.recordData[i].good_id = val.id
727
-            this.recordInfo.recordData[i].dealer = val.dealer
742
+            if(val.dealer == 0){
743
+             this.recordInfo.recordData[i].dealer = ""
744
+            }else{
745
+             this.recordInfo.recordData[i].dealer = val.dealer
746
+            }
747
+           
728
          }
748
          }
729
       }
749
       }
730
 
750
 
759
     tempObj["number"] = ""
779
     tempObj["number"] = ""
760
     tempObj["specification_name"] = ""
780
     tempObj["specification_name"] = ""
761
     tempObj["number"] = ""
781
     tempObj["number"] = ""
782
+    tempObj["dealer"] = ""
783
+    tempObj["license_number"] = ""
762
     this.recordInfo.recordData.push(tempObj);
784
     this.recordInfo.recordData.push(tempObj);
763
     this.GetConfigInfo();
785
     this.GetConfigInfo();
764
     this.propForm.goodUnit = this.$store.getters.good_unit;
786
     this.propForm.goodUnit = this.$store.getters.good_unit;

+ 1 - 1
src/xt_pages/stock/stockOutOrderDetailPrint.vue Datei anzeigen

46
                                     <td>{{getOutStockCount(item.good_id) + getWarehouseOutInfoCount(item.warehouse_out_id,item.good_id)}}</td>
46
                                     <td>{{getOutStockCount(item.good_id) + getWarehouseOutInfoCount(item.warehouse_out_id,item.good_id)}}</td>
47
                                     <td>{{item.price}}</td>
47
                                     <td>{{item.price}}</td>
48
                                     <td>{{((getOutStockCount(item.good_id) +getWarehouseOutInfoCount(item.warehouse_out_id,item.good_id))*item.price).toFixed(2)}}</td>
48
                                     <td>{{((getOutStockCount(item.good_id) +getWarehouseOutInfoCount(item.warehouse_out_id,item.good_id))*item.price).toFixed(2)}}</td>
49
-                                    <td>{{getNumber(item.good_id)}}</td>
49
+                                    <td>{{item.number}}</td>
50
                                     <td>{{getTime(item.product_date)}}</td>
50
                                     <td>{{getTime(item.product_date)}}</td>
51
                                     <td>{{getTime(item.expiry_date)}}</td>
51
                                     <td>{{getTime(item.expiry_date)}}</td>
52
                                 </tr>
52
                                 </tr>

+ 42 - 5
src/xt_pages/stock/stockOutOrderEdit.vue Datei anzeigen

190
               ></el-date-picker>
190
               ></el-date-picker>
191
             </template>
191
             </template>
192
           </el-table-column>
192
           </el-table-column>
193
-         
193
+          
194
+        <el-table-column  width="150" align="center">
195
+            <template slot="header" slot-scope="scope">
196
+            <span>批准文号<span style="color: red"></span></span>
197
+          </template>
198
+          <template slot-scope="scope">
199
+              <el-input placeholder="请输入批准文号" v-model="scope.row.license_number"></el-input>
200
+          </template>
201
+        </el-table-column>
194
 
202
 
195
           <el-table-column label="经销商"  width="150" align="center">
203
           <el-table-column label="经销商"  width="150" align="center">
196
             <template slot-scope="scope">
204
             <template slot-scope="scope">
404
         tempObj['price'] = ''
412
         tempObj['price'] = ''
405
         tempObj['remark'] = ''
413
         tempObj['remark'] = ''
406
         tempObj['number'] = ""
414
         tempObj['number'] = ""
415
+        tempObj['license_number'] = ""
416
+        tempObj['dealer'] = ""
417
+        tempObj['manufacturer'] = ""
407
         this.recordInfo.recordData.push(tempObj)
418
         this.recordInfo.recordData.push(tempObj)
408
       }, 
419
       }, 
409
       handleDelete: function(index, row) {
420
       handleDelete: function(index, row) {
524
               }
535
               }
525
             }
536
             }
526
             for(let i=0;i<this.recordInfo.recordData.length;i++){
537
             for(let i=0;i<this.recordInfo.recordData.length;i++){
538
+               if(this.recordInfo.recordData[i].dealer == ""){
539
+                this.recordInfo.recordData[i].dealer = 0
540
+             }
527
               if(this.recordInfo.recordData[i].expiry_date == "" || this.recordInfo.recordData[i].expiry_date == undefined){
541
               if(this.recordInfo.recordData[i].expiry_date == "" || this.recordInfo.recordData[i].expiry_date == undefined){
528
                 this.recordInfo.recordData[i].expiry_date = ""
542
                 this.recordInfo.recordData[i].expiry_date = ""
529
               } 
543
               } 
618
             this.recordInfo.recordData[i].name = val.specification_name  +"/"+val.packing_unit
632
             this.recordInfo.recordData[i].name = val.specification_name  +"/"+val.packing_unit
619
             this.recordInfo.recordData[i].manufacturer = val.manufacturer
633
             this.recordInfo.recordData[i].manufacturer = val.manufacturer
620
             this.recordInfo.recordData[i].remark = val.remark
634
             this.recordInfo.recordData[i].remark = val.remark
621
-            this.recordInfo.recordData[i].price = val.buy_price
635
+            this.recordInfo.recordData[i].license_number = ""
636
+            if(val.packing_price == 0){
637
+               this.recordInfo.recordData[i].price = ""
638
+            }else{
639
+               this.recordInfo.recordData[i].price = val.packing_price
640
+            }
641
+           
622
             this.recordInfo.recordData[i].specification_name = val.specification_name
642
             this.recordInfo.recordData[i].specification_name = val.specification_name
623
             this.recordInfo.recordData[i].good_id = val.id
643
             this.recordInfo.recordData[i].good_id = val.id
624
-             this.recordInfo.recordData[i].dealer = val.dealer
644
+             if(val.dealer == 0){
645
+               this.recordInfo.recordData[i].dealer = ""
646
+             }else{
647
+               this.recordInfo.recordData[i].dealer = val.dealer
648
+             }
649
+           
625
          }
650
          }
626
       }
651
       }
627
       // if(val.xt_warehouse_info.length > 0){
652
       // if(val.xt_warehouse_info.length > 0){
634
       // }
659
       // }
635
     },
660
     },
636
      getSingleOutOrderDetail(order_id){
661
      getSingleOutOrderDetail(order_id){
662
+
663
+        const loading = this.$loading({
664
+          lock: true,
665
+          text: "Loading",
666
+          spinner: "el-icon-loading",
667
+          background: "rgba(0, 0, 0, 0.7)"
668
+        });
637
        const params = {
669
        const params = {
638
           'id': order_id
670
           'id': order_id
639
         }
671
         }
656
             response.data.data.list[i].expiry_date = this.getTime(response.data.data.list[i].expiry_date,"{y}-{m}-{d}")
688
             response.data.data.list[i].expiry_date = this.getTime(response.data.data.list[i].expiry_date,"{y}-{m}-{d}")
657
             response.data.data.list[i].product_date = this.getTime(response.data.data.list[i].product_date,"{y}-{m}-{d}")
689
             response.data.data.list[i].product_date = this.getTime(response.data.data.list[i].product_date,"{y}-{m}-{d}")
658
             response.data.data.list[i].remark = response.data.data.list[i].remark
690
             response.data.data.list[i].remark = response.data.data.list[i].remark
659
-            // this.numberList.push(response.data.data.list[i])
691
+            if(response.data.data.list[i].dealer == 0){
692
+               response.data.data.list[i].dealer = ""
693
+            }
694
+            if(response.data.data.list[i].manufacturer ==0 ){
695
+               response.data.data.list[i].manufacturer = ""
696
+            }
660
             this.recordInfo.recordData.push(response.data.data.list[i])
697
             this.recordInfo.recordData.push(response.data.data.list[i])
661
           }
698
           }
662
-         
699
+          loading.close();
663
         }
700
         }
664
       })
701
       })
665
     }
702
     }

+ 22 - 2
src/xt_pages/stock/stockQuery.vue Datei anzeigen

112
 
112
 
113
          </template>
113
          </template>
114
        </el-table-column>
114
        </el-table-column>
115
+
116
+       <el-table-column label="退库数量" align="center">
117
+         <template slot-scope="scope">
118
+           <span>{{getCancelCount(scope.row.good_id)}}{{scope.row.packing_unit}}</span>
119
+
120
+         </template>
121
+       </el-table-column>
115
       
122
       
116
        <el-table-column label="剩余库存量" align="center">
123
        <el-table-column label="剩余库存量" align="center">
117
          <template slot-scope="scope">
124
          <template slot-scope="scope">
118
-           {{getInCount(scope.row.good_id)- getOutCount(scope.row.good_id) - getAutoCount(scope.row.good_id)}}{{scope.row.packing_unit}}
125
+           {{getInCount(scope.row.good_id)- getOutCount(scope.row.good_id) - getAutoCount(scope.row.good_id) + getCancelCount(scope.row.good_id)}} {{scope.row.packing_unit}}
119
          </template>
126
          </template>
120
        </el-table-column>
127
        </el-table-column>
121
        <el-table-column label="操作" align="center" width="260px">
128
        <el-table-column label="操作" align="center" width="260px">
222
       countList:[],
229
       countList:[],
223
       outCountList:[],
230
       outCountList:[],
224
       autoCountList:[],
231
       autoCountList:[],
232
+      cancelCountList:[]
225
     };
233
     };
226
   },
234
   },
227
   methods: {
235
   methods: {
401
            this.tableList[i].type_name = this.getGoodType(this.tableList[i].good_type_id)
409
            this.tableList[i].type_name = this.getGoodType(this.tableList[i].good_type_id)
402
            this.tableList[i].unit = this.tableList[i].specification_name + "/" + this.tableList[i].packing_unit
410
            this.tableList[i].unit = this.tableList[i].specification_name + "/" + this.tableList[i].packing_unit
403
            this.tableList[i].prodect_name = this.getManufacture(this.tableList[i].manufacturer)
411
            this.tableList[i].prodect_name = this.getManufacture(this.tableList[i].manufacturer)
404
-           this.tableList[i].inCount =  this.getOutCount(this.tableList[i].good_id) + this.getAutoCount(this.tableList[i].good_id)
412
+           this.tableList[i].inCount =  this.getInCount(this.tableList[i].good_id)
405
            this.tableList[i].outCount = this.getOutCount(this.tableList[i].good_id) + this.getAutoCount(this.tableList[i].good_id)
413
            this.tableList[i].outCount = this.getOutCount(this.tableList[i].good_id) + this.getAutoCount(this.tableList[i].good_id)
406
            this.tableList[i].overplus =this.getInCount(this.tableList[i].good_id)- this.getOutCount(this.tableList[i].good_id) - this.getAutoCount(this.tableList[i].good_id)
414
            this.tableList[i].overplus =this.getInCount(this.tableList[i].good_id)- this.getOutCount(this.tableList[i].good_id) - this.getAutoCount(this.tableList[i].good_id)
407
          }
415
          }
521
            var autoCount = response.data.data.autoCount
529
            var autoCount = response.data.data.autoCount
522
            console.log("autoCount",autoCount)
530
            console.log("autoCount",autoCount)
523
            this.autoCountList = autoCount
531
            this.autoCountList = autoCount
532
+           var totalCount = response.data.data.totalCount
533
+           console.log("totalcount",totalCount)
534
+           this.cancelCountList = totalCount
524
          }
535
          }
525
       })
536
       })
526
     },
537
     },
550
        }
561
        }
551
      }
562
      }
552
      return count
563
      return count
564
+   },
565
+   getCancelCount(id){
566
+     var count = 0
567
+     for(let i=0;i<this.cancelCountList.length;i++){
568
+       if(id == this.cancelCountList[i].good_id){
569
+          count = this.cancelCountList[i].count
570
+       }
571
+     }
572
+     return count
553
    }
573
    }
554
   }
574
   }
555
 };
575
 };