Browse Source

Merge branch '20201109_pc_vue_new_branch' of http://git.shengws.com/csx/Vue_New into 20201109_pc_vue_new_branch

see999 3 years ago
parent
commit
fc543efc43

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

135
     params: params
135
     params: params
136
   })
136
   })
137
 }
137
 }
138
+
139
+export function ModefySupplyWarehousing(params) {
140
+  return request({
141
+    url: '/api/supply/modefysupplywarehousing',
142
+    method: 'get',
143
+    params: params
144
+  })
145
+}

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

137
     addStockIn: '入库',
137
     addStockIn: '入库',
138
     stockQuery: '库存查询',
138
     stockQuery: '库存查询',
139
     supplyQuery: '供应商管理',
139
     supplyQuery: '供应商管理',
140
-    purchaseOrderQuery: '购订单',
141
-    goodOrderQuery: '购单',
142
-    goodReturnQuery:'退货单',
143
-    addPurchaseOrder: '新增购订单',
140
+    purchaseOrderQuery: '购订单',
141
+    goodOrderQuery: '购单',
142
+    goodReturnQuery: '退货单',
143
+    addPurchaseOrder: '新增购订单',
144
     workforce_template: '排班模板设置',
144
     workforce_template: '排班模板设置',
145
     statistics: '统计分析',
145
     statistics: '统计分析',
146
     statisticalConfig: '统计配置',
146
     statisticalConfig: '统计配置',

+ 21 - 2
src/xt_pages/outpatientCharges/components/chargeDialog.vue View File

20
         <el-input type="number" v-model="form.private_price" :disabled="true"></el-input>
20
         <el-input type="number" v-model="form.private_price" :disabled="true"></el-input>
21
       </el-form-item>
21
       </el-form-item>
22
 
22
 
23
+      <el-form-item label="个账支出:" prop="age" :validate-event="is_Name" style="width:33%;">
24
+        <el-input type="number" v-model="form.acc_pay" :disabled="true"></el-input>
25
+      </el-form-item>
26
+
27
+
28
+      <el-form-item label="个人现金支出:" prop="age" :validate-event="is_Name" style="width:33%;">
29
+        <el-input type="number" v-model="form.psn_pay" :disabled="true"></el-input>
30
+      </el-form-item>
31
+
32
+
23
 
33
 
24
       <el-form-item label="支付方式:" style="width:100%;">
34
       <el-form-item label="支付方式:" style="width:100%;">
25
         <!-- <el-select v-model="form.pay_way" placeholder="请选择">
35
         <!-- <el-select v-model="form.pay_way" placeholder="请选择">
112
           total:0,
122
           total:0,
113
           fapiao_code:"",
123
           fapiao_code:"",
114
           fapiao_number:"",
124
           fapiao_number:"",
115
-          order:null
125
+          order:null,
126
+          acct_pay:'',
127
+          psn_pay:'',
128
+
116
 
129
 
117
 
130
 
118
         },
131
         },
141
           reality_price:'',
154
           reality_price:'',
142
           found_price:'',
155
           found_price:'',
143
           fapiao_code:"",
156
           fapiao_code:"",
144
-          fapiao_number:""
157
+          fapiao_number:"",
158
+          acct_pay:"",
159
+          psn_pay:"",
145
         },
160
         },
146
 
161
 
147
       }
162
       }
175
         this.form.discount_price = 0.0
190
         this.form.discount_price = 0.0
176
         this.form.preferential_price = 0.0
191
         this.form.preferential_price = 0.0
177
 
192
 
193
+
194
+
178
         this.form.fapiao_code =""
195
         this.form.fapiao_code =""
179
         this.form.fapiao_number = ""
196
         this.form.fapiao_number = ""
180
         this.order = order
197
         this.order = order
181
 
198
 
182
         if(this.order && this.order.id > 0){
199
         if(this.order && this.order.id > 0){
200
+          this.form.acct_pay = this.order.acct_pay
201
+          this.form.psn_pay = this.order.psn_cash_pay
183
           this.form.total = this.order.medfee_sumamt
202
           this.form.total = this.order.medfee_sumamt
184
           this.form.pay_price = this.order.medfee_sumamt
203
           this.form.pay_price = this.order.medfee_sumamt
185
           this.form.medical_insurance_price = this.order.fund_pay_sumamt
204
           this.form.medical_insurance_price = this.order.fund_pay_sumamt

+ 0 - 4
src/xt_pages/outpatientCharges/components/prescriptionTable.vue View File

267
     }, methods:  {
267
     }, methods:  {
268
 
268
 
269
       getName(id){
269
       getName(id){
270
-        console.log("!!!!!!!!!")
271
-
272
         let  name = ""
270
         let  name = ""
273
         for(let i = 0; i  < this.manufacturers.length; i++){
271
         for(let i = 0; i  < this.manufacturers.length; i++){
274
-          console.log(this.manufacturers[i].manufacturer_name)
275
           if(id == this.manufacturers[i].id){
272
           if(id == this.manufacturers[i].id){
276
-            console.log("!!!!!!!!!")
277
             name =  this.manufacturers[i].manufacturer_name
273
             name =  this.manufacturers[i].manufacturer_name
278
           }
274
           }
279
         }
275
         }

+ 11 - 8
src/xt_pages/outpatientCharges/outpatientChargesManagement.vue View File

18
             :editable="false"
18
             :editable="false"
19
             style="width: 100%;"
19
             style="width: 100%;"
20
             type="date"
20
             type="date"
21
-            :picker-options="pickerOptions"
22
             placeholder="选择开始时间"
21
             placeholder="选择开始时间"
23
             align="right"
22
             align="right"
24
             format="yyyy-MM-dd"
23
             format="yyyy-MM-dd"
261
                             value-format="yyyy-MM-dd HH:mm:ss">
260
                             value-format="yyyy-MM-dd HH:mm:ss">
262
                         </el-date-picker>
261
                         </el-date-picker>
263
                       </el-form-item>
262
                       </el-form-item>
264
-
265
-
266
                     </el-form>
263
                     </el-form>
267
-
268
                   </div>
264
                   </div>
269
-
270
                   <p class="centerRightTitle">人员信息</p>
265
                   <p class="centerRightTitle">人员信息</p>
271
                   <div style="display:flex;justify-content: space-between;line-height:30px;">
266
                   <div style="display:flex;justify-content: space-between;line-height:30px;">
272
                     <span style="font-size:14px;">人员编码:{{ patientInfo.dialysis_no }}</span>
267
                     <span style="font-size:14px;">人员编码:{{ patientInfo.dialysis_no }}</span>
277
                     <li style="width:50%;">性别:{{ patientInfo.gender == 1 ? '男' : '女' }}</li>
272
                     <li style="width:50%;">性别:{{ patientInfo.gender == 1 ? '男' : '女' }}</li>
278
                     <li style="width:50%;">年龄:{{ patientInfo.age }}</li>
273
                     <li style="width:50%;">年龄:{{ patientInfo.age }}</li>
279
                     <li style="width:50%;">电话:{{ patientInfo.phone }}</li>
274
                     <li style="width:50%;">电话:{{ patientInfo.phone }}</li>
280
-
281
-
282
                   </ul>
275
                   </ul>
283
                   <p class="centerRightTitle" style="padding-top: 10px;">诊断信息</p>
276
                   <p class="centerRightTitle" style="padding-top: 10px;">诊断信息</p>
284
                   <div style="display:flex;justify-content: space-between;line-height:30px;">
277
                   <div style="display:flex;justify-content: space-between;line-height:30px;">
288
                     <li style="width:50%;">医生:{{ info.doctor }}</li>
281
                     <li style="width:50%;">医生:{{ info.doctor }}</li>
289
                     <li style="width:50%;">科室:{{ info.departments }}</li>
282
                     <li style="width:50%;">科室:{{ info.departments }}</li>
290
                     <!--<li style="width:100%;">总费用:{{ getTotal() }}</li>-->
283
                     <!--<li style="width:100%;">总费用:{{ getTotal() }}</li>-->
291
-
292
                     <li style="width:100%;">判断结果:{{ info.diagnosis }}</li>
284
                     <li style="width:100%;">判断结果:{{ info.diagnosis }}</li>
293
                     <li style="width:100%;">是否有传染病:</li>
285
                     <li style="width:100%;">是否有传染病:</li>
294
                     <li style="width:100%;">血压:</li>
286
                     <li style="width:100%;">血压:</li>
694
       register: [
686
       register: [
695
         { value: 11, label: '普通门诊' },
687
         { value: 11, label: '普通门诊' },
696
         { value: 14, label: '门诊特殊病' },
688
         { value: 14, label: '门诊特殊病' },
689
+        { value: '9922', label: '家庭通道' },
697
         { value: '1111', label: '精一' },
690
         { value: '1111', label: '精一' },
691
+        { value: '1112', label: '精二' },
698
         { value: '1112', label: '精二' }
692
         { value: '1112', label: '精二' }
693
+
699
       ],
694
       ],
700
 
695
 
701
       registerThree: [
696
       registerThree: [
702
         { value: 11, label: '普通门诊' },
697
         { value: 11, label: '普通门诊' },
703
         { value: 14, label: '门诊特殊病' },
698
         { value: 14, label: '门诊特殊病' },
699
+        { value: '9922', label: '家庭通道' },
704
         { value: '1111', label: '精一' },
700
         { value: '1111', label: '精一' },
705
         { value: '1112', label: '精二' },
701
         { value: '1112', label: '精二' },
706
         { value: '9933', label: '门诊特殊病(9933)' },
702
         { value: '9933', label: '门诊特殊病(9933)' },
711
       register_two: [
707
       register_two: [
712
         { value: '11', label: '普通门诊' },
708
         { value: '11', label: '普通门诊' },
713
         { value: '14', label: '门诊特殊病' },
709
         { value: '14', label: '门诊特殊病' },
710
+        { value: '9922', label: '家庭通道' },
714
         { value: '9933', label: '门诊特殊病(9933)' },
711
         { value: '9933', label: '门诊特殊病(9933)' },
715
         { value: '990602', label: '门诊特殊病(990602)' },
712
         { value: '990602', label: '门诊特殊病(990602)' },
716
         { value: '1402', label: '门诊特殊病(1402)' }
713
         { value: '1402', label: '门诊特殊病(1402)' }
3442
           break
3439
           break
3443
         case 1112:
3440
         case 1112:
3444
           return '精二' + '处方' + index
3441
           return '精二' + '处方' + index
3442
+          break
3445
         case 9933:
3443
         case 9933:
3446
           return '门诊特殊病(9933)' + '处方' + index
3444
           return '门诊特殊病(9933)' + '处方' + index
3445
+          break
3447
         case 990602:
3446
         case 990602:
3448
           return '门诊特殊病(990602)' + '处方' + index
3447
           return '门诊特殊病(990602)' + '处方' + index
3448
+          break
3449
         case 1402:
3449
         case 1402:
3450
           return '门诊特殊病(1402)' + '处方' + index
3450
           return '门诊特殊病(1402)' + '处方' + index
3451
           break
3451
           break
3452
+        case 9922:
3453
+          return '家庭通道' + '处方' + index
3454
+          break
3452
       }
3455
       }
3453
     }, unique_four(array) {
3456
     }, unique_four(array) {
3454
       // res用来存储结果
3457
       // res用来存储结果

+ 3 - 2
src/xt_pages/outpatientDoctorStation/components/deskPrescription.vue View File

534
           { value: 11, label: '普通门诊' },
534
           { value: 11, label: '普通门诊' },
535
           { value: 14, label: '门诊特殊病' },
535
           { value: 14, label: '门诊特殊病' },
536
           { value: 1111, label: '精一' },
536
           { value: 1111, label: '精一' },
537
-          { value: 1112, label: '精二' }
537
+          { value: 1112, label: '精二' },
538
+          { value: 9922, label: '家庭通道' },
539
+
538
 
540
 
539
 
541
 
540
         ],
542
         ],
2127
           return false
2129
           return false
2128
         }
2130
         }
2129
       }, open_three() {
2131
       }, open_three() {
2130
-        console.log(this.prescriptions)
2131
         for (let i = 0; i < this.prescriptions.length; i++) {
2132
         for (let i = 0; i < this.prescriptions.length; i++) {
2132
           for (let b = 0; b < this.prescriptions[i].advices.length; b++) {
2133
           for (let b = 0; b < this.prescriptions[i].advices.length; b++) {
2133
             if (this.prescriptions[i].advices[b].prescribing_number == 0 || this.prescriptions[i].advices[b].prescribing_number == '') {
2134
             if (this.prescriptions[i].advices[b].prescribing_number == 0 || this.prescriptions[i].advices[b].prescribing_number == '') {

+ 46 - 21
src/xt_pages/supply/components/addGoodOrder.vue View File

156
         </template>
156
         </template>
157
     </el-table-column>
157
     </el-table-column>
158
 
158
 
159
-    <el-table-column label="购单价" align="center" width="120px">
159
+    <el-table-column label="购单价" align="center" width="120px">
160
         <template slot-scope="scope">
160
         <template slot-scope="scope">
161
         <el-input v-model="scope.row.supply_price" style="width:80px" :disabled="disabled"></el-input>
161
         <el-input v-model="scope.row.supply_price" style="width:80px" :disabled="disabled"></el-input>
162
         </template>
162
         </template>
163
     </el-table-column>
163
     </el-table-column>
164
 
164
 
165
-    <el-table-column label="购金额" align="center" width="120px">
165
+    <el-table-column label="购金额" align="center" width="120px">
166
         <template slot-scope="scope">
166
         <template slot-scope="scope">
167
           {{calculate(scope.row.supply_count * scope.row.supply_price)}}
167
           {{calculate(scope.row.supply_count * scope.row.supply_price)}}
168
         </template>
168
         </template>
276
 data() {
276
 data() {
277
 return {
277
 return {
278
     crumbs: [
278
     crumbs: [
279
-       { path: false, name: "购单" },
280
-       { path: "/spply/query", name: "新增购单" }
279
+       { path: false, name: "购单" },
280
+       { path: "/supply/good/order/query", name: "新增购单" }
281
     ],
281
     ],
282
     showTwo:true,
282
     showTwo:true,
283
     showOne:false,
283
     showOne:false,
309
     supplyList:[],
309
     supplyList:[],
310
     rate_of_concession:"",
310
     rate_of_concession:"",
311
     discount_amount:"",
311
     discount_amount:"",
312
-    start_time:new Date(),
313
-    end_time:new Date(),
312
+    start_time:"",
313
+    end_time:"",
314
     tableRules: {
314
     tableRules: {
315
      name: [{ required: true, message: '商品不能为空', trigger: 'blur' }],
315
      name: [{ required: true, message: '商品不能为空', trigger: 'blur' }],
316
      supply_count: [{ required: true, message: '数量不能为空', trigger: 'blur' }],
316
      supply_count: [{ required: true, message: '数量不能为空', trigger: 'blur' }],
348
         this.supplyList = response.data.data.supplyList
348
         this.supplyList = response.data.data.supplyList
349
        for(let i=0;i<drugList.length;i++){
349
        for(let i=0;i<drugList.length;i++){
350
           for(let z=0;z<drugList[i].drug_warehouse_info.length;z++){
350
           for(let z=0;z<drugList[i].drug_warehouse_info.length;z++){
351
-            drugList[i].drug_warehouse_info[z].stock_max_number = drugList[i].drug_warehouse_info[z].stock_max_number * drugList[i].min_number
351
+            if(drugList[i].max_unit == drugList[i].drug_warehouse_info[z].max_unit){
352
+              drugList[i].drug_warehouse_info[z].stock_max_number = drugList[i].drug_warehouse_info[z].stock_max_number * drugList[i].min_number
353
+            }
352
           }
354
           }
353
         for(let j=0;j<this.manufactuerList.length;j++){
355
         for(let j=0;j<this.manufactuerList.length;j++){
354
             if(drugList[i].manufacturer == this.manufactuerList[j].id){
356
             if(drugList[i].manufacturer == this.manufactuerList[j].id){
372
         drugList[i].type = 1
374
         drugList[i].type = 1
373
         drugList[i].supply_price = drugList[i].last_price
375
         drugList[i].supply_price = drugList[i].last_price
374
         drugList[i].name = drugList[i].drug_name
376
         drugList[i].name = drugList[i].drug_name
375
-        drugList[i].unitList = [{id:1,name:""},{id:2,name:""}]
377
+        if(drugList[i].max_unit != drugList[i].min_unit){
378
+          drugList[i].unitList = [{id:1,name:""},{id:2,name:""}]
379
+        }
380
+        if(drugList[i].max_unit == drugList[i].min_unit){
381
+          drugList[i].unitList = [{id:1,name:""}]
382
+        }
383
+       
376
         drugList[i].supply_unit = drugList[i].max_unit 
384
         drugList[i].supply_unit = drugList[i].max_unit 
377
         for(let j=0;j<drugList[i].unitList.length;j++){
385
         for(let j=0;j<drugList[i].unitList.length;j++){
378
-           drugList[i].unitList[0].name = drugList[i].max_unit
379
-           drugList[i].unitList[1].name = drugList[i].min_unit
386
+          if(drugList[i].max_unit != drugList[i].min_unit){
387
+            drugList[i].unitList[0].name = drugList[i].max_unit
388
+            drugList[i].unitList[1].name = drugList[i].min_unit
389
+          }
390
+           if(drugList[i].max_unit == drugList[i].min_unit){
391
+             drugList[i].unitList[0].name = drugList[i].max_unit
392
+           }
380
         }
393
         }
381
         this.tabList.push(drugList[i])
394
         this.tabList.push(drugList[i])
382
         }
395
         }
405
         goodList[i].supply_remake = ""
418
         goodList[i].supply_remake = ""
406
         goodList[i].type = 2
419
         goodList[i].type = 2
407
         goodList[i].name = goodList[i].good_name
420
         goodList[i].name = goodList[i].good_name
408
-        goodList[i].unitList =  [{id:1,name:""},{id:2,name:""}]
421
+        goodList[i].unitList =  [{id:1,name:""}]
409
         goodList[i].supply_unit = goodList[i].packing_unit
422
         goodList[i].supply_unit = goodList[i].packing_unit
410
         for(let j=0;j<goodList[i].unitList.length;j++){
423
         for(let j=0;j<goodList[i].unitList.length;j++){
411
            goodList[i].unitList[0].name = goodList[i].packing_unit 
424
            goodList[i].unitList[0].name = goodList[i].packing_unit 
502
     var min_str = ""
515
     var min_str = ""
503
     if (arr.length > 0) {
516
     if (arr.length > 0) {
504
       for(let i=0;i<arr.length;i++){
517
       for(let i=0;i<arr.length;i++){
505
-        total += parseInt(arr[i].stock_max_number)
518
+        total += parseInt(arr[i].stock_max_number+arr[i].stock_min_number)
506
       }
519
       }
507
     }
520
     }
508
     if (total < min_number){
521
     if (total < min_number){
605
            if(orderInfo[i].is_source == 1){
618
            if(orderInfo[i].is_source == 1){
606
             for(let j=0;j<drugList.length;j++){
619
             for(let j=0;j<drugList.length;j++){
607
                 if( orderInfo[i].project_id == drugList[j].id){
620
                 if( orderInfo[i].project_id == drugList[j].id){
608
-                  orderInfo[i].unitList = [{id:1,name:""},{id:2,name:""}]
609
-                  orderInfo[i].unitList[0].name = drugList[j].max_unit
610
-                  orderInfo[i].unitList[1].name = drugList[j].min_unit
621
+                  if(drugList[j].max_unit!=drugList[j].min_unit){
622
+                    orderInfo[i].unitList = [{id:1,name:""},{id:2,name:""}]
623
+                    orderInfo[i].unitList[0].name = drugList[j].max_unit
624
+                    orderInfo[i].unitList[1].name = drugList[j].min_unit
625
+                  }
626
+                  if(drugList[j].max_unit == drugList[j].min_unit){
627
+                    orderInfo[i].unitList = [{id:1,name:""}]
628
+                    orderInfo[i].unitList[0].name = drugList[j].max_unit
629
+                  }
611
                 }
630
                 }
612
              }  
631
              }  
613
             } 
632
             } 
685
              this.payment =warehouseOut.payment
704
              this.payment =warehouseOut.payment
686
              this.arrearage =warehouseOut.arrearage
705
              this.arrearage =warehouseOut.arrearage
687
              this.supplier_name = warehouseOut.supplier_id
706
              this.supplier_name = warehouseOut.supplier_id
688
-            
707
+             this.start_time = this.getTimes(warehouseOut.document_date)
689
             for(let i=0;i< orderInfo.length;i++){
708
             for(let i=0;i< orderInfo.length;i++){
690
               orderInfo[i].supply_count =  orderInfo[i].count
709
               orderInfo[i].supply_count =  orderInfo[i].count
691
               orderInfo[i].supply_price =  orderInfo[i].price
710
               orderInfo[i].supply_price =  orderInfo[i].price
700
             if(orderInfo[i].is_source == 1){
719
             if(orderInfo[i].is_source == 1){
701
               for(let j=0;j<this.drugList.length;j++){
720
               for(let j=0;j<this.drugList.length;j++){
702
                   if( orderInfo[i].project_id == this.drugList[j].id){
721
                   if( orderInfo[i].project_id == this.drugList[j].id){
703
-                    orderInfo[i].unitList = [{id:1,name:""},{id:2,name:""}]
704
-                    orderInfo[i].unitList[0].name = this.drugList[j].max_unit
705
-                    orderInfo[i].unitList[1].name = this.drugList[j].min_unit
722
+                    if(this.drugList[j].max_unit !=this.drugList[j].min_unit){
723
+                      orderInfo[i].unitList = [{id:1,name:""},{id:2,name:""}]
724
+                      orderInfo[i].unitList[0].name = this.drugList[j].max_unit
725
+                      orderInfo[i].unitList[1].name = this.drugList[j].min_unit
726
+                    }
727
+                    if(this.drugList[j].max_unit ==this.drugList[j].min_unit){
728
+                      orderInfo[i].unitList[0].name = this.drugList[j].max_unit
729
+                    }
706
                   }
730
                   }
707
               }  
731
               }  
708
               } 
732
               } 
753
 
777
 
754
         }
778
         }
755
     }
779
     }
756
-    var start = this.getTimes(this.start_time)
780
+    var start = this.start_time
757
     this.$refs["tableForm"].validate((valid)=>{
781
     this.$refs["tableForm"].validate((valid)=>{
758
         if(valid){
782
         if(valid){
759
            this.loading = true
783
            this.loading = true
802
     if(parseInt(this.$route.query.id) > 0){
826
     if(parseInt(this.$route.query.id) > 0){
803
       this.getPurchaseOrderDetail()
827
       this.getPurchaseOrderDetail()
804
     }
828
     }
805
-  
829
+    this.start_time = this.getTimes(new Date())
830
+    this.end_time = this.getTimes(new Date())
806
 }
831
 }
807
 };
832
 };
808
 </script>
833
 </script>

+ 50 - 54
src/xt_pages/supply/components/addPurchaseOrder.vue View File

130
 
130
 
131
    
131
    
132
 
132
 
133
-    <el-table-column label="购单价" align="center" width="120px">
133
+    <el-table-column label="购单价" align="center" width="120px">
134
         <template slot-scope="scope">
134
         <template slot-scope="scope">
135
         <el-input v-model="scope.row.supply_price" style="width:80px" :disabled="disabled"></el-input>
135
         <el-input v-model="scope.row.supply_price" style="width:80px" :disabled="disabled"></el-input>
136
         </template>
136
         </template>
137
     </el-table-column>
137
     </el-table-column>
138
 
138
 
139
-    <el-table-column label="购金额" align="center" width="120px">
139
+    <el-table-column label="购金额" align="center" width="120px">
140
         <template slot-scope="scope">
140
         <template slot-scope="scope">
141
           {{calculate(scope.row.supply_count * scope.row.supply_price)}}
141
           {{calculate(scope.row.supply_count * scope.row.supply_price)}}
142
         </template>
142
         </template>
212
 import {getDataConfig } from '@/utils/data'
212
 import {getDataConfig } from '@/utils/data'
213
 export default {
213
 export default {
214
 name: "addPurchaseOrder",
214
 name: "addPurchaseOrder",
215
-created() {
216
-this.org_id =  this.$store.getters.xt_user.org_id
217
 
215
 
218
-var start_time =  window.sessionStorage.getItem('start_time')
219
-var end_time =  window.sessionStorage.getItem('end_time')
220
-
221
-if(start_time !=null){
222
-    this.start_time = start_time
223
-}
224
-if(end_time!=null){
225
-    this.end_time = end_time
226
-}
227
-window.sessionStorage.removeItem('start_time')
228
-window.sessionStorage.removeItem('end_time')
229
-},
230
 components: {
216
 components: {
231
 BreadCrumb
217
 BreadCrumb
232
 },
218
 },
233
 data() {
219
 data() {
234
 return {
220
 return {
235
     crumbs: [
221
     crumbs: [
236
-       { path: false, name: "购订单" },
237
-       { path: "/spply/query", name: "新增购订单" }
222
+       { path: false, name: "采购订单" },
223
+       { path: "/supply/query", name: "新增采购订单" }
238
     ],
224
     ],
239
     showTwo:true,
225
     showTwo:true,
240
     showOne:false,
226
     showOne:false,
266
     supplyList:[],
252
     supplyList:[],
267
     rate_of_concession:"",
253
     rate_of_concession:"",
268
     discount_amount:"",
254
     discount_amount:"",
269
-    start_time:new Date(),
270
-    end_time:new Date(),
255
+    start_time:"",
256
+    end_time:"",
271
     tableRules: {
257
     tableRules: {
272
      name: [{ required: true, message: '商品不能为空', trigger: 'blur' }],
258
      name: [{ required: true, message: '商品不能为空', trigger: 'blur' }],
273
      supply_count: [{ required: true, message: '数量不能为空', trigger: 'blur' }],
259
      supply_count: [{ required: true, message: '数量不能为空', trigger: 'blur' }],
296
     getInitOrder().then(response=>{
282
     getInitOrder().then(response=>{
297
     if(response.data.state == 1){
283
     if(response.data.state == 1){
298
         var drugList = response.data.data.drugList
284
         var drugList = response.data.data.drugList
299
-        
285
+        console.log("druglist23232232323232332",drugList)
300
         this.manufactuerList = response.data.data.manufactuerList
286
         this.manufactuerList = response.data.data.manufactuerList
301
         this.goodTypeList = response.data.data.goodTypeList
287
         this.goodTypeList = response.data.data.goodTypeList
302
         this.drugTypeList = response.data.data.drugTypeList
288
         this.drugTypeList = response.data.data.drugTypeList
303
         this.supplyList = response.data.data.supplyList
289
         this.supplyList = response.data.data.supplyList
304
        for(let i=0;i<drugList.length;i++){
290
        for(let i=0;i<drugList.length;i++){
305
-          
306
           for(let z=0;z<drugList[i].drug_warehouse_info.length;z++){
291
           for(let z=0;z<drugList[i].drug_warehouse_info.length;z++){
307
-            drugList[i].drug_warehouse_info[z].stock_max_number = drugList[i].drug_warehouse_info[z].stock_max_number * drugList[i].min_number
292
+            if(drugList[i].max_unit == drugList[i].drug_warehouse_info[z].max_unit){
293
+              drugList[i].drug_warehouse_info[z].stock_max_number = drugList[i].drug_warehouse_info[z].stock_max_number * drugList[i].min_number
294
+            }
295
+           
308
           }
296
           }
309
         for(let j=0;j<this.manufactuerList.length;j++){
297
         for(let j=0;j<this.manufactuerList.length;j++){
310
             if(drugList[i].manufacturer == this.manufactuerList[j].id){
298
             if(drugList[i].manufacturer == this.manufactuerList[j].id){
329
         drugList[i].supply_price = drugList[i].last_price
317
         drugList[i].supply_price = drugList[i].last_price
330
         drugList[i].name = drugList[i].drug_name
318
         drugList[i].name = drugList[i].drug_name
331
         drugList[i].supply_unit = drugList[i].max_unit
319
         drugList[i].supply_unit = drugList[i].max_unit
332
-        drugList[i].unitList = [{id:1,name:""},{id:2,name:""}]
320
+        if(drugList[i].max_unit!=drugList[i].min_unit){
321
+          drugList[i].unitList = [{id:1,name:""},{id:2,name:""}]
322
+        }
323
+        if(drugList[i].max_unit ==drugList[i].min_unit){
324
+          drugList[i].unitList = [{id:1,name:""}]
325
+        }
326
+       
333
         for(let j=0;j<drugList[i].unitList.length;j++){
327
         for(let j=0;j<drugList[i].unitList.length;j++){
334
-           drugList[i].unitList[0].name = drugList[i].max_unit
335
-           drugList[i].unitList[1].name = drugList[i].min_unit
328
+           if(drugList[i].max_unit!=drugList[i].min_unit){
329
+             drugList[i].unitList[0].name = drugList[i].max_unit
330
+             drugList[i].unitList[1].name = drugList[i].min_unit
331
+           }
332
+           if(drugList[i].max_unit ==drugList[i].min_unit){
333
+             drugList[i].unitList[0].name = drugList[i].max_unit
334
+           }
335
+          
336
         }
336
         }
337
         this.tabList.push(drugList[i])
337
         this.tabList.push(drugList[i])
338
         }
338
         }
364
         goodList[i].type = 2
364
         goodList[i].type = 2
365
         goodList[i].name = goodList[i].good_name
365
         goodList[i].name = goodList[i].good_name
366
         goodList[i].supply_unit = goodList[i].packing_unit
366
         goodList[i].supply_unit = goodList[i].packing_unit
367
-        goodList[i].unitList =  [{id:1,name:""},{id:2,name:""}]
367
+        goodList[i].unitList =  [{id:1,name:""}]
368
         for(let j=0;j<goodList[i].unitList.length;j++){
368
         for(let j=0;j<goodList[i].unitList.length;j++){
369
            goodList[i].unitList[0].name = goodList[i].packing_unit 
369
            goodList[i].unitList[0].name = goodList[i].packing_unit 
370
         }
370
         }
461
 
461
 
462
             }
462
             }
463
         }
463
         }
464
-        var start = this.getTimes(this.start_time)
465
-        var end = this.getTimes(this.end_time)
464
+        var start = this.start_time
465
+        var end = this.end_time
466
         const params = {
466
         const params = {
467
             'stockIn': this.recordInfo.tableList
467
             'stockIn': this.recordInfo.tableList
468
         }
468
         }
476
                 var warehouseInfo = response.data.data.warehouseInfo
476
                 var warehouseInfo = response.data.data.warehouseInfo
477
                 this.number  = warehouseInfo.number
477
                 this.number  = warehouseInfo.number
478
                 this.id = warehouseInfo.id
478
                 this.id = warehouseInfo.id
479
+                this.supplier_name = warehouseInfo.supplier_id
480
+                this.rate_of_concession = warehouseInfo.rate_of_concession
481
+                this.discount_amount = warehouseInfo.discount_amount
482
+                this.start_time = this.getTimes(warehouseInfo.document_date)
483
+                this.end_time = this.getTimes(warehouseInfo.delivery_date)
479
                 this.recordInfo.tableList = []
484
                 this.recordInfo.tableList = []
480
                 var orderInfo = response.data.data.orderInfo
485
                 var orderInfo = response.data.data.orderInfo
481
                 for(let i=0;i<orderInfo.length;i++){
486
                 for(let i=0;i<orderInfo.length;i++){
482
                    if(orderInfo[i].is_source == 1){
487
                    if(orderInfo[i].is_source == 1){
483
                     for(let j=0;j<this.drugList.length;j++){
488
                     for(let j=0;j<this.drugList.length;j++){
484
                        if(orderInfo[i].project_id == this.drugList[j].id){
489
                        if(orderInfo[i].project_id == this.drugList[j].id){
485
-                          orderInfo[i].unitList = [{id:1,name:""},{id:2,name:""}]
486
-                          orderInfo[i].unitList[0].name = this.drugList[j].max_unit
487
-                          orderInfo[i].unitList[1].name = this.drugList[j].min_unit
490
+                         if(this.drugList[j].max_unit !=this.drugList[j].min_unit){
491
+                            orderInfo[i].unitList = [{id:1,name:""},{id:2,name:""}]
492
+                            orderInfo[i].unitList[0].name = this.drugList[j].max_unit
493
+                            orderInfo[i].unitList[1].name = this.drugList[j].min_unit
494
+                         }
495
+                         if(this.drugList[j].max_unit ==this.drugList[j].min_unit){
496
+                            orderInfo[i].unitList = [{id:1,name:""}]
497
+                            orderInfo[i].unitList[0].name = this.drugList[j].max_unit
498
+                         }
488
                        }
499
                        }
489
                     }  
500
                     }  
490
                    } 
501
                    } 
505
                 }
516
                 }
506
                 console.log("orderINFO23323232",orderInfo)
517
                 console.log("orderINFO23323232",orderInfo)
507
                 this.recordInfo.tableList = orderInfo
518
                 this.recordInfo.tableList = orderInfo
508
-                // for(let i=0;i<orderInfo.length;i++){
509
-                //    orderInfo[i].name = "" 
510
-                //    orderInfo[i].supply_name = ""
511
-                //    orderInfo[i].supply_specification_name = ""
512
-                //   if(orderInfo[i].is_source == 1){
513
-                //     for(let j=0;j<this.drugList.length;j++){
514
-                //        if(orderInfo[i].project_id == this.drugList[j].id){
515
-                //           orderInfo[i].name = this.drugList[j].drug_name
516
-                //        }
517
-                //     }
518
-                //   }
519
-                //   if(orderInfo[i].is_source == 2){
520
-                //     for(let y=0;y<this.goodList.length;y++){
521
-                //        if(orderInfo[i].project_id = this.goodList[y].id){
522
-                //           orderInfo[i].name = this.goodList[y].good_name
523
-                //        }
524
-                //     }
525
-                //   }
526
-                // }
519
+                
527
                 this.showTwo = false
520
                 this.showTwo = false
528
                 this.showOne = true
521
                 this.showOne = true
529
             }
522
             }
534
 
527
 
535
 },
528
 },
536
 getWarehoseInfo(arr,max_unit,min_unit,min_number){
529
 getWarehoseInfo(arr,max_unit,min_unit,min_number){
530
+    console.log("arr2332233232",arr)
537
     var total = 0
531
     var total = 0
538
     var max_str=  ""
532
     var max_str=  ""
539
     var min_str = ""
533
     var min_str = ""
540
     if (arr.length > 0) {
534
     if (arr.length > 0) {
541
       for(let i=0;i<arr.length;i++){
535
       for(let i=0;i<arr.length;i++){
542
-        total += parseInt(arr[i].stock_max_number)
536
+        total += parseInt(arr[i].stock_max_number+arr[i].stock_min_number)
543
       }
537
       }
544
     }
538
     }
545
     if (total < min_number){
539
     if (total < min_number){
603
               }
597
               }
604
            }
598
            }
605
         }
599
         }
606
-        var start = this.getTimes(this.start_time)
607
-        var end = this.getTimes(this.end_time)
600
+        var start = this.start_time
601
+        var end =   this.end_time
608
         const params = {
602
         const params = {
609
         'stockIn': this.recordInfo.tableList
603
         'stockIn': this.recordInfo.tableList
610
         }
604
         }
686
     tempObj["supply_unit"] = ""
680
     tempObj["supply_unit"] = ""
687
     this.recordInfo.tableList.push(tempObj)
681
     this.recordInfo.tableList.push(tempObj)
688
     this.getInitOrder()
682
     this.getInitOrder()
683
+    this.start_time = this.getTimes(new Date())
684
+    this.end_time = this.getTimes(new Date())
689
 }
685
 }
690
 };
686
 };
691
 </script>
687
 </script>

+ 51 - 18
src/xt_pages/supply/components/editGoodOrder.vue View File

155
         </template>
155
         </template>
156
     </el-table-column>
156
     </el-table-column>
157
 
157
 
158
-    <el-table-column label="购单价" align="center" width="120px">
158
+    <el-table-column label="购单价" align="center" width="120px">
159
         <template slot-scope="scope">
159
         <template slot-scope="scope">
160
         <el-input v-model="scope.row.supply_price" style="width:80px" :disabled="disabled"></el-input>
160
         <el-input v-model="scope.row.supply_price" style="width:80px" :disabled="disabled"></el-input>
161
         </template>
161
         </template>
162
     </el-table-column>
162
     </el-table-column>
163
 
163
 
164
-    <el-table-column label="购金额" align="center" width="120px">
164
+    <el-table-column label="购金额" align="center" width="120px">
165
         <template slot-scope="scope">
165
         <template slot-scope="scope">
166
           {{calculate(scope.row.supply_count * scope.row.supply_price)}}
166
           {{calculate(scope.row.supply_count * scope.row.supply_price)}}
167
         </template>
167
         </template>
266
 <script>
266
 <script>
267
 import BreadCrumb from "@/xt_pages/components/bread-crumb";
267
 import BreadCrumb from "@/xt_pages/components/bread-crumb";
268
 import {uParseTime } from '@/utils/tools'
268
 import {uParseTime } from '@/utils/tools'
269
-import {getInitOrder,checkPurchaseOrder,getGoodOrderDetail,updateGoodOrder,getGoodOrderCountList} from "@/api/supply"
269
+import {getInitOrder,checkPurchaseOrder,getGoodOrderDetail,updateGoodOrder,getGoodOrderCountList,ModefySupplyWarehousing} from "@/api/supply"
270
 export default {
270
 export default {
271
 name: "addPurchaseOrder",
271
 name: "addPurchaseOrder",
272
 components: {
272
 components: {
275
 data() {
275
 data() {
276
 return {
276
 return {
277
     crumbs: [
277
     crumbs: [
278
-       { path: false, name: "购单" },
279
-       { path: "/spply/query", name: "编辑购单" }
278
+       { path: false, name: "购单" },
279
+       { path: "/supply/good/order/query", name: "编辑购单" }
280
     ],
280
     ],
281
     showTwo:true,
281
     showTwo:true,
282
     showOne:false,
282
     showOne:false,
308
     supplyList:[],
308
     supplyList:[],
309
     rate_of_concession:"",
309
     rate_of_concession:"",
310
     discount_amount:"",
310
     discount_amount:"",
311
-    start_time:new Date(),
312
-    end_time:new Date(),
311
+    start_time:"",
312
+    end_time:"",
313
     tableRules: {
313
     tableRules: {
314
      name: [{ required: true, message: '商品不能为空', trigger: 'blur' }],
314
      name: [{ required: true, message: '商品不能为空', trigger: 'blur' }],
315
      supply_count: [{ required: true, message: '数量不能为空', trigger: 'blur' }],
315
      supply_count: [{ required: true, message: '数量不能为空', trigger: 'blur' }],
347
         this.supplyList = response.data.data.supplyList
347
         this.supplyList = response.data.data.supplyList
348
        for(let i=0;i<drugList.length;i++){
348
        for(let i=0;i<drugList.length;i++){
349
           for(let z=0;z<drugList[i].drug_warehouse_info.length;z++){
349
           for(let z=0;z<drugList[i].drug_warehouse_info.length;z++){
350
-            drugList[i].drug_warehouse_info[z].stock_max_number = drugList[i].drug_warehouse_info[z].stock_max_number * drugList[i].min_number
350
+             if(drugList[i].max_unit == drugList[i].drug_warehouse_info[z].max_unit){
351
+              drugList[i].drug_warehouse_info[z].stock_max_number = drugList[i].drug_warehouse_info[z].stock_max_number * drugList[i].min_number
352
+            }
351
           }
353
           }
352
         for(let j=0;j<this.manufactuerList.length;j++){
354
         for(let j=0;j<this.manufactuerList.length;j++){
353
             if(drugList[i].manufacturer == this.manufactuerList[j].id){
355
             if(drugList[i].manufacturer == this.manufactuerList[j].id){
371
         drugList[i].type = 1
373
         drugList[i].type = 1
372
         drugList[i].supply_price = drugList[i].last_price
374
         drugList[i].supply_price = drugList[i].last_price
373
         drugList[i].name = drugList[i].drug_name
375
         drugList[i].name = drugList[i].drug_name
374
-        drugList[i].unitList = [{id:1,name:""},{id:2,name:""}]
376
+        if(drugList[i].max_unit != drugList[i].min_unit){
377
+          drugList[i].unitList = [{id:1,name:""},{id:2,name:""}]
378
+        }
379
+        if(drugList[i].max_unit == drugList[i].min_unit){
380
+          drugList[i].unitList = [{id:1,name:""}]
381
+        }
382
+       
375
         drugList[i].warehouse_info_id = 0
383
         drugList[i].warehouse_info_id = 0
376
         drugList[i].warehousing_id= 0
384
         drugList[i].warehousing_id= 0
377
         drugList[i].supply_unit = drugList[i].max_unit 
385
         drugList[i].supply_unit = drugList[i].max_unit 
378
         for(let j=0;j<drugList[i].unitList.length;j++){
386
         for(let j=0;j<drugList[i].unitList.length;j++){
379
-           drugList[i].unitList[0].name = drugList[i].max_unit
380
-           drugList[i].unitList[1].name = drugList[i].min_unit
387
+          if(drugList[i].max_unit != drugList[i].min_unit){
388
+            drugList[i].unitList[0].name = drugList[i].max_unit
389
+            drugList[i].unitList[1].name = drugList[i].min_unit
390
+          }
391
+          if(drugList[i].max_unit  == drugList[i].min_unit){
392
+            drugList[i].unitList[0].name = drugList[i].max_unit
393
+          }
381
         }
394
         }
382
         this.tabList.push(drugList[i])
395
         this.tabList.push(drugList[i])
383
         }
396
         }
406
         goodList[i].supply_remake = ""
419
         goodList[i].supply_remake = ""
407
         goodList[i].type = 2
420
         goodList[i].type = 2
408
         goodList[i].name = goodList[i].good_name
421
         goodList[i].name = goodList[i].good_name
409
-        goodList[i].unitList =  [{id:1,name:""},{id:2,name:""}]
422
+        goodList[i].unitList =  [{id:1,name:""}]
410
         goodList[i].supply_unit = goodList[i].packing_unit
423
         goodList[i].supply_unit = goodList[i].packing_unit
411
         goodList[i].warehouse_info_id = 0
424
         goodList[i].warehouse_info_id = 0
412
         goodList[i].warehousing_id= 0
425
         goodList[i].warehousing_id= 0
510
     var min_str = ""
523
     var min_str = ""
511
     if (arr.length > 0) {
524
     if (arr.length > 0) {
512
       for(let i=0;i<arr.length;i++){
525
       for(let i=0;i<arr.length;i++){
513
-        total += parseInt(arr[i].stock_max_number)
526
+        total += parseInt(arr[i].stock_max_number+arr[i].stock_min_number)
514
       }
527
       }
515
     }
528
     }
516
     if (total < min_number){
529
     if (total < min_number){
593
         this.arrearage = out.arrearage
606
         this.arrearage = out.arrearage
594
         this.number = out.number
607
         this.number = out.number
595
         this.good_number = out.good_number
608
         this.good_number = out.good_number
609
+        this.start_time = this.getTimes(out.document_date)
596
         var orderInfo = response.data.data.list
610
         var orderInfo = response.data.data.list
597
         
611
         
598
         var drugList = response.data.data.drugList
612
         var drugList = response.data.data.drugList
612
            if(orderInfo[i].is_source == 1){
626
            if(orderInfo[i].is_source == 1){
613
             for(let j=0;j<drugList.length;j++){
627
             for(let j=0;j<drugList.length;j++){
614
                 if( orderInfo[i].project_id == drugList[j].id){
628
                 if( orderInfo[i].project_id == drugList[j].id){
615
-                  orderInfo[i].unitList = [{id:1,name:""},{id:2,name:""}]
616
-                  orderInfo[i].unitList[0].name = drugList[j].max_unit
617
-                  orderInfo[i].unitList[1].name = drugList[j].min_unit
629
+                  if(drugList[j].max_unit!=drugList[j].min_unit){
630
+                    orderInfo[i].unitList = [{id:1,name:""},{id:2,name:""}]
631
+                    orderInfo[i].unitList[0].name = drugList[j].max_unit
632
+                    orderInfo[i].unitList[1].name = drugList[j].min_unit
633
+                  }
634
+                  if(drugList[j].max_unit ==drugList[j].min_unit){
635
+                    orderInfo[i].unitList = [{id:1,name:""}]
636
+                    orderInfo[i].unitList[0].name = drugList[j].max_unit
637
+                  }
638
+                
618
                 }
639
                 }
619
              }  
640
              }  
620
             } 
641
             } 
669
 
690
 
670
         }
691
         }
671
     }
692
     }
672
-    var start = this.getTimes(this.start_time)
693
+    var start = this.start_time
673
     this.$refs["tableForm"].validate((valid)=>{
694
     this.$refs["tableForm"].validate((valid)=>{
674
         if(valid){
695
         if(valid){
675
            this.loading = true
696
            this.loading = true
785
         }
806
         }
786
       }
807
       }
787
     })
808
     })
809
+  },
810
+  ModefySupplyWarehousing(is_warehouse,warehousing_id){
811
+     var params = {
812
+       is_warehouse:is_warehouse,
813
+       warehousing_id:warehousing_id,
814
+     }
815
+    ModefySupplyWarehousing(params).then(response=>{
816
+      if(response.data.state == 1){
817
+        var msg = response.data.data.msg
818
+      }
819
+    })
788
   }
820
   }
789
 },
821
 },
790
 created(){
822
 created(){
817
     if(parseInt(this.$route.query.id) > 0){
849
     if(parseInt(this.$route.query.id) > 0){
818
       this.getGoodOrderDetail()
850
       this.getGoodOrderDetail()
819
     }
851
     }
820
-  
852
+    this.start_time = this.getTimes(new Date())
853
+    this.end_time = this.getTimes(new Date())
821
 }
854
 }
822
 };
855
 };
823
 </script>
856
 </script>

+ 49 - 25
src/xt_pages/supply/components/editPurchaseOrder.vue View File

8
     <div>
8
     <div>
9
         <span style="color:red">*</span><span>供应商:</span>
9
         <span style="color:red">*</span><span>供应商:</span>
10
         <el-select v-model="supplier_name" style="width:140px;margin-right:10px;" placeholder="请选择"
10
         <el-select v-model="supplier_name" style="width:140px;margin-right:10px;" placeholder="请选择"
11
-        @change="changeTypeName">
11
+        @change="changeTypeName" :disabled="disabled">
12
         <el-option
12
         <el-option
13
             v-for="item in supplyList"
13
             v-for="item in supplyList"
14
             :key="item.id"
14
             :key="item.id"
29
         format="yyyy-MM-dd"
29
         format="yyyy-MM-dd"
30
         value-format="yyyy-MM-dd"
30
         value-format="yyyy-MM-dd"
31
         @change="startTimeChange"
31
         @change="startTimeChange"
32
+        :disabled="disabled"
32
         ></el-date-picker>
33
         ></el-date-picker>
33
         <span>交货日期:</span>
34
         <span>交货日期:</span>
34
         <el-date-picker
35
         <el-date-picker
43
             format="yyyy-MM-dd"
44
             format="yyyy-MM-dd"
44
             value-format="yyyy-MM-dd"
45
             value-format="yyyy-MM-dd"
45
             @change="endTimeChange"
46
             @change="endTimeChange"
47
+            :disabled="disabled"
46
         ></el-date-picker>
48
         ></el-date-picker>
47
         <span>单据编码:{{number}}</span>
49
         <span>单据编码:{{number}}</span>
48
 
50
 
49
     </div>
51
     </div>
50
     <div>
52
     <div>
51
-        <el-button size="small" type="primary" @click="toAdd" v-show="showOne">生成购单</el-button>
53
+        <el-button size="small" type="primary" @click="toAdd" v-show="showOne">生成购单</el-button>
52
         <el-button size="small" type="primary" @click="updatePurchaseOrder">修改</el-button>
54
         <el-button size="small" type="primary" @click="updatePurchaseOrder">修改</el-button>
53
         <el-button size="small" type="primary" @click="toPrint">打印</el-button>
55
         <el-button size="small" type="primary" @click="toPrint">打印</el-button>
54
         <el-button size="small" type="primary" v-if="is_check == 2" @click="checkPurchaseOrder" v-show="showTwo">审核</el-button>
56
         <el-button size="small" type="primary" v-if="is_check == 2" @click="checkPurchaseOrder" v-show="showTwo">审核</el-button>
135
         </template>
137
         </template>
136
     </el-table-column>
138
     </el-table-column>
137
 
139
 
138
-    <el-table-column label="购单价" align="center" width="120px">
140
+    <el-table-column label="购单价" align="center" width="120px">
139
         <template slot-scope="scope">
141
         <template slot-scope="scope">
140
         <el-input v-model="scope.row.supply_price" style="width:80px" :disabled="disabled"></el-input>
142
         <el-input v-model="scope.row.supply_price" style="width:80px" :disabled="disabled"></el-input>
141
         </template>
143
         </template>
142
     </el-table-column>
144
     </el-table-column>
143
 
145
 
144
-    <el-table-column label="购金额" align="center" width="120px">
146
+    <el-table-column label="购金额" align="center" width="120px">
145
         <template slot-scope="scope">
147
         <template slot-scope="scope">
146
           {{calculate(scope.row.supply_count * scope.row.supply_price)}}
148
           {{calculate(scope.row.supply_count * scope.row.supply_price)}}
147
         </template>
149
         </template>
149
 
151
 
150
     <el-table-column label="生产厂家" align="center" width="200px">
152
     <el-table-column label="生产厂家" align="center" width="200px">
151
         <template slot-scope="scope">
153
         <template slot-scope="scope">
152
-           <el-select size="small" v-model="scope.row.supply_manufacturer" filterable placeholder="请选择厂商" :disabled="disabled">
154
+           <el-select size="small" v-model="scope.row.supply_manufacturer" filterable placeholder="请选择厂家" :disabled="true">
153
                 <el-option
155
                 <el-option
154
                   v-for="(option, index) in manufactuerList"
156
                   v-for="(option, index) in manufactuerList"
155
                   :key="index"
157
                   :key="index"
163
 
165
 
164
     <el-table-column label="批准文号" align="center" width="200px">
166
     <el-table-column label="批准文号" align="center" width="200px">
165
         <template slot-scope="scope">
167
         <template slot-scope="scope">
166
-        <el-input v-model="scope.row.supply_license_number" style="width:160px" :disabled="disabled"></el-input>
168
+        <el-input v-model="scope.row.supply_license_number" style="width:160px" :disabled="true"></el-input>
167
         </template>
169
         </template>
168
     </el-table-column>
170
     </el-table-column>
169
  
171
  
200
       合计:{{getAllPrice()}} 元
202
       合计:{{getAllPrice()}} 元
201
    </div>
203
    </div>
202
    <div style="margin-top:10px">
204
    <div style="margin-top:10px">
203
-        <span>优惠率:<el-input style="width:100px" v-model="rate_of_concession" @input='addressChange'></el-input>%</span>
205
+        <span>优惠率:<el-input style="width:100px" v-model="rate_of_concession" @input='addressChange' :disabled="disabled"></el-input>%</span>
204
 
206
 
205
-        <span>优惠金额:<el-input style="width:100px" v-model="discount_amount"></el-input></span>
207
+        <span>优惠金额:<el-input style="width:100px" v-model="discount_amount" :disabled="disabled"></el-input></span>
206
 
208
 
207
     </div>
209
     </div>
208
 </div>
210
 </div>
212
   :visible.sync="dialogVisible"
214
   :visible.sync="dialogVisible"
213
   width="30%">
215
   width="30%">
214
   <span>
216
   <span>
215
-    购订单{{number}}已有以下关联数据,不能反审核
217
+    购订单{{number}}已有以下关联数据,不能反审核
216
     <div v-for="(item,index) in orderList" :key="index">
218
     <div v-for="(item,index) in orderList" :key="index">
217
-        <li>购单{{item.good_number}}</li> <a @click="toClick(item.id)">点击查看</a>
219
+        <li>购单{{item.good_number}}</li> <a @click="toClick(item.id)">点击查看</a>
218
     </div>
220
     </div>
219
   </span>
221
   </span>
220
   <span slot="footer" class="dialog-footer">
222
   <span slot="footer" class="dialog-footer">
236
 data() {
238
 data() {
237
 return {
239
 return {
238
     crumbs: [
240
     crumbs: [
239
-       { path: false, name: "购订单" },
240
-       { path: "/spply/query", name: "编辑购订单" }
241
+       { path: false, name: "购订单" },
242
+       { path: "/supply/query", name: "编辑购订单" }
241
     ],
243
     ],
242
     showTwo:true,
244
     showTwo:true,
243
     showOne:false,
245
     showOne:false,
269
     supplyList:[],
271
     supplyList:[],
270
     rate_of_concession:"",
272
     rate_of_concession:"",
271
     discount_amount:"",
273
     discount_amount:"",
272
-    start_time:new Date(),
273
-    end_time:new Date(),
274
     tableRules: {
274
     tableRules: {
275
      name: [{ required: true, message: '商品不能为空', trigger: 'blur' }],
275
      name: [{ required: true, message: '商品不能为空', trigger: 'blur' }],
276
      supply_count: [{ required: true, message: '数量不能为空', trigger: 'blur' }],
276
      supply_count: [{ required: true, message: '数量不能为空', trigger: 'blur' }],
303
         this.supplyList = response.data.data.supplyList
303
         this.supplyList = response.data.data.supplyList
304
        for(let i=0;i<drugList.length;i++){
304
        for(let i=0;i<drugList.length;i++){
305
           for(let z=0;z<drugList[i].drug_warehouse_info.length;z++){
305
           for(let z=0;z<drugList[i].drug_warehouse_info.length;z++){
306
-            drugList[i].drug_warehouse_info[z].stock_max_number = drugList[i].drug_warehouse_info[z].stock_max_number * drugList[i].min_number
306
+            if(drugList[i].max_unit == drugList[i].drug_warehouse_info[z].max_unit){
307
+              drugList[i].drug_warehouse_info[z].stock_max_number = drugList[i].drug_warehouse_info[z].stock_max_number * drugList[i].min_number
308
+            }
307
           }
309
           }
308
         for(let j=0;j<this.manufactuerList.length;j++){
310
         for(let j=0;j<this.manufactuerList.length;j++){
309
             if(drugList[i].manufacturer == this.manufactuerList[j].id){
311
             if(drugList[i].manufacturer == this.manufactuerList[j].id){
327
         drugList[i].type = 1
329
         drugList[i].type = 1
328
         drugList[i].supply_price = drugList[i].last_price
330
         drugList[i].supply_price = drugList[i].last_price
329
         drugList[i].name = drugList[i].drug_name
331
         drugList[i].name = drugList[i].drug_name
330
-        drugList[i].unitList = [{id:1,name:""},{id:2,name:""}]
332
+        if(drugList[i].max_unit!=drugList[i].min_unit){
333
+          drugList[i].unitList = [{id:1,name:""},{id:2,name:""}]
334
+        }
335
+        if(drugList[i].max_unit == drugList[i].min_unit){
336
+          drugList[i].unitList = [{id:1,name:""}]
337
+        }
338
+      
331
         drugList[i].supply_unit = drugList[i].max_unit 
339
         drugList[i].supply_unit = drugList[i].max_unit 
332
         for(let j=0;j<drugList[i].unitList.length;j++){
340
         for(let j=0;j<drugList[i].unitList.length;j++){
333
-           drugList[i].unitList[0].name = drugList[i].max_unit
334
-           drugList[i].unitList[1].name = drugList[i].min_unit
341
+          if(drugList[i].max_unit!=drugList[i].min_unit){
342
+            drugList[i].unitList[0].name = drugList[i].max_unit
343
+            drugList[i].unitList[1].name = drugList[i].min_unit
344
+          }
345
+          if(drugList[i].max_unit ==drugList[i].min_unit){
346
+            drugList[i].unitList[0].name = drugList[i].max_unit
347
+          }
348
+         
335
         }
349
         }
336
         this.tabList.push(drugList[i])
350
         this.tabList.push(drugList[i])
337
         }
351
         }
360
         goodList[i].supply_remake = ""
374
         goodList[i].supply_remake = ""
361
         goodList[i].type = 2
375
         goodList[i].type = 2
362
         goodList[i].name = goodList[i].good_name
376
         goodList[i].name = goodList[i].good_name
363
-        goodList[i].unitList =  [{id:1,name:""},{id:2,name:""}]
377
+        goodList[i].unitList =  [{id:1,name:""}]
364
         goodList[i].supply_unit = goodList[i].packing_unit
378
         goodList[i].supply_unit = goodList[i].packing_unit
365
         for(let j=0;j<goodList[i].unitList.length;j++){
379
         for(let j=0;j<goodList[i].unitList.length;j++){
366
            goodList[i].unitList[0].name = goodList[i].packing_unit 
380
            goodList[i].unitList[0].name = goodList[i].packing_unit 
457
     var min_str = ""
471
     var min_str = ""
458
     if (arr.length > 0) {
472
     if (arr.length > 0) {
459
       for(let i=0;i<arr.length;i++){
473
       for(let i=0;i<arr.length;i++){
460
-        total += parseInt(arr[i].stock_max_number)
474
+        total += parseInt(arr[i].stock_max_number+arr[i].stock_min_number)
461
       }
475
       }
462
     }
476
     }
463
     if (total < min_number){
477
     if (total < min_number){
523
               }
537
               }
524
            }
538
            }
525
         }
539
         }
526
-        var start = this.getTimes(this.start_time)
527
-        var end = this.getTimes(this.end_time)
540
+        var start = this.start_time
541
+        var end = this.end_time
528
         const params = {
542
         const params = {
529
         'stockIn': this.recordInfo.tableList
543
         'stockIn': this.recordInfo.tableList
530
         }
544
         }
580
         this.supplier_name = info.supplier_id
594
         this.supplier_name = info.supplier_id
581
         this.rate_of_concession = info.rate_of_concession
595
         this.rate_of_concession = info.rate_of_concession
582
         this.discount_amount = info.discount_amount
596
         this.discount_amount = info.discount_amount
597
+        this.start_time = this.getTimes(info.document_date)
598
+        this.end_time = this.getTimes(info.delivery_date)
583
         var orderInfo = response.data.data.orderInfo
599
         var orderInfo = response.data.data.orderInfo
600
+
584
         if(info.is_check == 2){
601
         if(info.is_check == 2){
585
            this.disabled = false
602
            this.disabled = false
586
            this.showOne = false
603
            this.showOne = false
606
            if(orderInfo[i].is_source == 1){
623
            if(orderInfo[i].is_source == 1){
607
             for(let j=0;j<drugList.length;j++){
624
             for(let j=0;j<drugList.length;j++){
608
                 if(orderInfo[i].project_id == drugList[j].id){
625
                 if(orderInfo[i].project_id == drugList[j].id){
609
-                  orderInfo[i].unitList = [{id:1,name:""},{id:2,name:""}]
610
-                  orderInfo[i].unitList[0].name = drugList[j].max_unit
611
-                  orderInfo[i].unitList[1].name = drugList[j].min_unit
626
+                  if(drugList[j].max_unit != drugList[j].min_unit){
627
+                    orderInfo[i].unitList = [{id:1,name:""},{id:2,name:""}]
628
+                    orderInfo[i].unitList[0].name = drugList[j].max_unit
629
+                    orderInfo[i].unitList[1].name = drugList[j].min_unit
630
+                  }
631
+                  if(drugList[j].max_unit  == drugList[j].min_unit){
632
+                    orderInfo[i].unitList = [{id:1,name:""}]
633
+                    orderInfo[i].unitList[0].name = drugList[j].max_unit
634
+                  }
635
+                 
612
                 }
636
                 }
613
              }  
637
              }  
614
             } 
638
             } 

+ 6 - 5
src/xt_pages/supply/goodOrderQuery.vue View File

90
               <span>{{getName(scope.row.supplier_id)}}</span>
90
               <span>{{getName(scope.row.supplier_id)}}</span>
91
             </template>
91
             </template>
92
          </el-table-column>
92
          </el-table-column>
93
-        <el-table-column label="关联购订单号" align="center" width="200">
93
+        <el-table-column label="关联购订单号" align="center" width="200">
94
           <template slot-scope="scope">
94
           <template slot-scope="scope">
95
             <span>{{scope.row.number}}</span>
95
             <span>{{scope.row.number}}</span>
96
           </template>
96
           </template>
97
         </el-table-column>
97
         </el-table-column>
98
-        <el-table-column label="购金额" align="center">
98
+        <el-table-column label="购金额" align="center">
99
           <template slot-scope="scope">
99
           <template slot-scope="scope">
100
              <span v-if="getAllBuyPrice(scope.row.orderOut)>0">{{getAllBuyPrice(scope.row.orderOut)}}</span> 
100
              <span v-if="getAllBuyPrice(scope.row.orderOut)>0">{{getAllBuyPrice(scope.row.orderOut)}}</span> 
101
           </template>
101
           </template>
189
     return {
189
     return {
190
       crumbs: [
190
       crumbs: [
191
         { path: false, name: "采购管理" },
191
         { path: false, name: "采购管理" },
192
-        { path: "/spply/query", name: "购单" }
192
+        { path: "/supply/good/order/query", name: "购单" }
193
       ],
193
       ],
194
       keywords: "",
194
       keywords: "",
195
       total: 0,
195
       total: 0,
196
       multipleSelection: [],
196
       multipleSelection: [],
197
       signAndWeighBoxPatients: "sign-and-weigh-box-patients",
197
       signAndWeighBoxPatients: "sign-and-weigh-box-patients",
198
       start_time: "",
198
       start_time: "",
199
-      end_time:new Date(),
199
+      end_time:"",
200
       page: 1,
200
       page: 1,
201
       limit: 10,
201
       limit: 10,
202
       goodType: [],
202
       goodType: [],
326
     var nowYear = now.getFullYear(); //当前年 
326
     var nowYear = now.getFullYear(); //当前年 
327
     //本月的开始时间
327
     //本月的开始时间
328
     var monthStartDate = new Date(nowYear, nowMonth, 1); 
328
     var monthStartDate = new Date(nowYear, nowMonth, 1); 
329
-    this.start_time = monthStartDate
329
+    this.start_time =  this.getTimes(monthStartDate)
330
+    this.end_time = this.getTimes(new Date())
330
     this.org_id =  this.$store.getters.xt_user.org_id
331
     this.org_id =  this.$store.getters.xt_user.org_id
331
     this.getAllSupply()
332
     this.getAllSupply()
332
     this.getlist()
333
     this.getlist()

+ 10 - 7
src/xt_pages/supply/purchaseOrderQuery.vue View File

90
               <span>{{getName(scope.row.supplier_id)}}</span>
90
               <span>{{getName(scope.row.supplier_id)}}</span>
91
             </template>
91
             </template>
92
          </el-table-column>
92
          </el-table-column>
93
-        <el-table-column label="关联购单号" align="center">
93
+        <el-table-column label="关联购单号" align="center">
94
           <template slot-scope="scope">
94
           <template slot-scope="scope">
95
             <div style="width:100%;height:100%">
95
             <div style="width:100%;height:100%">
96
               <tr class="annotation-rs cluster-rs" v-for="(item,index) in scope.row.orderOut" :key="index">
96
               <tr class="annotation-rs cluster-rs" v-for="(item,index) in scope.row.orderOut" :key="index">
99
             </div>
99
             </div>
100
           </template>
100
           </template>
101
         </el-table-column>
101
         </el-table-column>
102
-        <el-table-column label="购金额" align="center">
102
+        <el-table-column label="购金额" align="center">
103
           <template slot-scope="scope">
103
           <template slot-scope="scope">
104
              <span v-if="getAllBuyPrice(scope.row.orderInfo)>0">{{getAllBuyPrice(scope.row.orderInfo)}}</span> 
104
              <span v-if="getAllBuyPrice(scope.row.orderInfo)>0">{{getAllBuyPrice(scope.row.orderInfo)}}</span> 
105
           </template>
105
           </template>
190
     return {
190
     return {
191
       crumbs: [
191
       crumbs: [
192
         { path: false, name: "采购管理" },
192
         { path: false, name: "采购管理" },
193
-        { path: "/spply/query", name: "购订单" }
193
+        { path: "/supply/query", name: "购订单" }
194
       ],
194
       ],
195
       keywords: "",
195
       keywords: "",
196
       total: 0,
196
       total: 0,
197
       multipleSelection: [],
197
       multipleSelection: [],
198
       signAndWeighBoxPatients: "sign-and-weigh-box-patients",
198
       signAndWeighBoxPatients: "sign-and-weigh-box-patients",
199
       start_time: "",
199
       start_time: "",
200
-      end_time:new Date(),
200
+      end_time:"",
201
       page: 1,
201
       page: 1,
202
       limit: 10,
202
       limit: 10,
203
       goodType: [],
203
       goodType: [],
258
       return uParseTime(time, '{y}-{m}-{d}')
258
       return uParseTime(time, '{y}-{m}-{d}')
259
      },
259
      },
260
      getlist(){
260
      getlist(){
261
+        console.log("hhhhhh",this.end_time)
261
         var params = {
262
         var params = {
262
           check_id:this.check_id,
263
           check_id:this.check_id,
263
-          start_time:this.getTimes(this.start_time),
264
-          end_time:this.getTimes(this.end_time),
264
+          start_time:this.start_time,
265
+          end_time:this.end_time,
265
           keyword:this.keywords,
266
           keyword:this.keywords,
266
           page:this.page,
267
           page:this.page,
267
           limit:this.limit,
268
           limit:this.limit,
268
         }
269
         }
270
+       console.log("params2332232332",params)
269
        getAllPurchaseOrderList(params).then(response=>{
271
        getAllPurchaseOrderList(params).then(response=>{
270
           if(response.data.state == 1){
272
           if(response.data.state == 1){
271
             var list = response.data.data.list 
273
             var list = response.data.data.list 
355
     var nowYear = now.getFullYear(); //当前年 
357
     var nowYear = now.getFullYear(); //当前年 
356
     //本月的开始时间
358
     //本月的开始时间
357
     var monthStartDate = new Date(nowYear, nowMonth, 1); 
359
     var monthStartDate = new Date(nowYear, nowMonth, 1); 
358
-    this.start_time = monthStartDate
360
+    this.start_time = this.getTimes(monthStartDate) 
361
+    this.end_time = this.getTimes(new Date())
359
     this.org_id =  this.$store.getters.xt_user.org_id
362
     this.org_id =  this.$store.getters.xt_user.org_id
360
     this.getAllSupply()
363
     this.getAllSupply()
361
     this.getlist()
364
     this.getlist()

+ 1 - 1
src/xt_pages/supply/supplyQuery.vue View File

191
       type_name:"",
191
       type_name:"",
192
       crumbs: [
192
       crumbs: [
193
         { path: false, name: "采购管理" },
193
         { path: false, name: "采购管理" },
194
-        { path: "/spply/query", name: "供应商管理" }
194
+        { path: "/supply/good/order/query", name: "供应商管理" }
195
       ],
195
       ],
196
       keywords: "",
196
       keywords: "",
197
       total: 0,
197
       total: 0,