浏览代码

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

csx 3 年前
父节点
当前提交
ccc8d4706d

+ 1 - 0
src/api/supply.js 查看文件

89
 }
89
 }
90
 
90
 
91
 export function deletePurchaseOrder(id, params) {
91
 export function deletePurchaseOrder(id, params) {
92
+  console.log("id232323223",id)
92
   return request({
93
   return request({
93
     url: '/api/supply/deletepurchorder?id=' + id,
94
     url: '/api/supply/deletepurchorder?id=' + id,
94
     method: 'Get',
95
     method: 'Get',

+ 6 - 7
src/xt_pages/data/components/consumables.vue 查看文件

334
               total:"",
334
               total:"",
335
               register_number:"",
335
               register_number:"",
336
               is_user:"2",
336
               is_user:"2",
337
+              number:"",
337
             },
338
             },
338
             isVisibility: false,
339
             isVisibility: false,
339
           }
340
           }
568
               response.data.data.goodInfo.good_type_id;
569
               response.data.data.goodInfo.good_type_id;
569
 
570
 
570
 
571
 
571
-            this.goodInfo.goodInfoDialog.formValue.good_name =
572
-              response.data.data.goodInfo.good_name;
572
+            this.goodInfo.goodInfoDialog.formValue.good_name = response.data.data.goodInfo.good_name;
573
 
573
 
574
 
574
 
575
-            this.goodInfo.goodInfoDialog.formValue.pinyin =
576
-              response.data.data.goodInfo.pinyin;
575
+            this.goodInfo.goodInfoDialog.formValue.pinyin = response.data.data.goodInfo.pinyin;
577
 
576
 
578
-            this.goodInfo.goodInfoDialog.formValue.wubi =
579
-              response.data.data.goodInfo.wubi;
577
+            this.goodInfo.goodInfoDialog.formValue.wubi = response.data.data.goodInfo.wubi;
580
 
578
 
581
 
579
 
582
 
580
 
731
             this.goodInfo.goodInfoDialog.formValue.packing_price = response.data.data.goodInfo.packing_price
729
             this.goodInfo.goodInfoDialog.formValue.packing_price = response.data.data.goodInfo.packing_price
732
             this.goodInfo.goodInfoDialog.formValue.default_count_unit = response.data.data.goodInfo.default_count_unit
730
             this.goodInfo.goodInfoDialog.formValue.default_count_unit = response.data.data.goodInfo.default_count_unit
733
             this.goodInfo.goodInfoDialog.formValue.register_number = response.data.data.goodInfo.register_number
731
             this.goodInfo.goodInfoDialog.formValue.register_number = response.data.data.goodInfo.register_number
734
-
732
+            
733
+            this.goodInfo.goodInfoDialog.formValue.number = response.data.data.goodInfo.number
735
            
734
            
736
             this.goodInfo.goodInfoDialog.formValue.is_user = response.data.data.goodInfo.is_user.toString()
735
             this.goodInfo.goodInfoDialog.formValue.is_user = response.data.data.goodInfo.is_user.toString()
737
             
736
             

+ 8 - 0
src/xt_pages/dialysis/dialysisPrintOrder.vue 查看文件

918
             v-if="org_template_info.template_id == 45"
918
             v-if="org_template_info.template_id == 45"
919
           >
919
           >
920
           </DialysisPrintOrderFortyFive>
920
           </DialysisPrintOrderFortyFive>
921
+
922
+             <DialysisPrintOrderFortySix
923
+            v-bind:childResponse="childResponse"
924
+            v-if="org_template_info.template_id == 46"
925
+          >
926
+          </DialysisPrintOrderFortySix>
921
         </div>
927
         </div>
922
       </el-container>
928
       </el-container>
923
     </div>
929
     </div>
982
 import DialysisPrintOrderFortyThree from "./template/DialysisPrintOrderFortyThree";
988
 import DialysisPrintOrderFortyThree from "./template/DialysisPrintOrderFortyThree";
983
 import DialysisPrintOrderFortyFour from "./template/DialysisPrintOrderFortyFour";
989
 import DialysisPrintOrderFortyFour from "./template/DialysisPrintOrderFortyFour";
984
 import DialysisPrintOrderFortyFive from "./template/DialysisPrintOrderFortyFive";
990
 import DialysisPrintOrderFortyFive from "./template/DialysisPrintOrderFortyFive";
991
+import DialysisPrintOrderFortySix from "./template/DialysisPrintOrderFortySix"
985
 export default {
992
 export default {
986
   name: "dialysisPrintOrder",
993
   name: "dialysisPrintOrder",
987
   components: {
994
   components: {
995
+    DialysisPrintOrderFortySix,
988
     DialysisPrintOrderFortyFive,
996
     DialysisPrintOrderFortyFive,
989
     DialysisPrintOrderFortyFour,
997
     DialysisPrintOrderFortyFour,
990
     DialysisPrintOrderFortyThree,
998
     DialysisPrintOrderFortyThree,

文件差异内容过多而无法显示
+ 2903 - 0
src/xt_pages/dialysis/template/DialysisPrintOrderFortySix.vue


+ 1 - 1
src/xt_pages/dialysis/template/DialysisPrintOrderSix.vue 查看文件

357
                   </div>
357
                   </div>
358
                   <div class="row" style="padding: 2px 0;line-height:23px;display:flex;">
358
                   <div class="row" style="padding: 2px 0;line-height:23px;display:flex;">
359
                     <div class="inline_block" style="flex:1;">
359
                     <div class="inline_block" style="flex:1;">
360
-                      透析(滤)器:
360
+                      <span>透析(滤)器:</span> 
361
                       <div class="under_line" style="width: 100px;text-align: center">
361
                       <div class="under_line" style="width: 100px;text-align: center">
362
                         {{ prescription.dialyzer_perfusion_apparatus ? prescription.dialyzer_perfusion_apparatus : "" }}
362
                         {{ prescription.dialyzer_perfusion_apparatus ? prescription.dialyzer_perfusion_apparatus : "" }}
363
                         {{prescription.dialysis_dialyszers?prescription.dialysis_dialyszers:"/"}}
363
                         {{prescription.dialysis_dialyszers?prescription.dialysis_dialyszers:"/"}}

+ 6 - 0
src/xt_pages/stock/Dialog/goodInfoDailog.vue 查看文件

211
               </el-select>
211
               </el-select>
212
              </el-form-item>
212
              </el-form-item>
213
 
213
 
214
+            <el-form-item label="批准文号:" >
215
+              <el-input v-model="form.number" style="width:180px"></el-input>
216
+            </el-form-item>
217
+
214
 
218
 
215
             <el-form-item label="备注 : " prop="name" style="width:100%;">
219
             <el-form-item label="备注 : " prop="name" style="width:100%;">
216
               <el-input type="textarea" :rows="2" placeholder="请输入内容" v-model="form.remark"></el-input>
220
               <el-input type="textarea" :rows="2" placeholder="请输入内容" v-model="form.remark"></el-input>
383
           total:"",
387
           total:"",
384
           register_number:"",
388
           register_number:"",
385
           is_user:"2",
389
           is_user:"2",
390
+          number:"",
386
         },
391
         },
387
 
392
 
388
         rules: {
393
         rules: {
610
         form["total"] = this.form.total
615
         form["total"] = this.form.total
611
         form["register_number"] = this.form.register_number
616
         form["register_number"] = this.form.register_number
612
         form["is_user"] = this.form.is_user
617
         form["is_user"] = this.form.is_user
618
+        form["number"] = this.form.number
613
 
619
 
614
         return form
620
         return form
615
       }, changeSelected: function(val) {
621
       }, changeSelected: function(val) {

+ 2 - 2
src/xt_pages/stock/stockQuery.vue 查看文件

113
        </el-table-column>
113
        </el-table-column>
114
        <el-table-column label="出库数量" align="center" v-if="showOne">
114
        <el-table-column label="出库数量" align="center" v-if="showOne">
115
          <template slot-scope="scope">
115
          <template slot-scope="scope">
116
-          <span v-if="org_id == 9671 || org_id == 10138 || org_id == 10028 || org_id == 9675 || org_id == 4 || org_id == 3877 || org_id == 10243 || org_id == 10088 || org_id== 10245 || org_id == 9779 || org_id == 10106 || org_id == 9504 || org_id ==  10215 || org_id ==  10088 || org_id == 10191 || org_id == 9919 || org_id == 10265 || org_id == 10164 || org_id ==10290 ">
116
+          <span v-if="org_id == 9671 || org_id == 10138 || org_id == 10028 || org_id == 9675 || org_id == 4 || org_id == 3877 || org_id == 10243 || org_id == 10088 || org_id== 10245 || org_id == 9779 || org_id == 10106 || org_id == 9504 || org_id ==  10215 || org_id ==  10188 || org_id == 10191 || org_id == 9919 || org_id == 10265 || org_id == 10164 || org_id ==10290 ">
117
              <span>
117
              <span>
118
               {{getWareInfo(scope.row.xt_warehouse_info) - getOverFlushInfo(scope.row.xt_warehouse_info)}}
118
               {{getWareInfo(scope.row.xt_warehouse_info) - getOverFlushInfo(scope.row.xt_warehouse_info)}}
119
             </span>
119
             </span>
124
       
124
       
125
         <el-table-column label="剩余库存量" align="center" v-if="showThree">
125
         <el-table-column label="剩余库存量" align="center" v-if="showThree">
126
          <template slot-scope="scope">
126
          <template slot-scope="scope">
127
-          <span v-if="org_id == 9671 || org_id == 10138 || org_id == 10028 || org_id == 9675 || org_id == 4 || org_id == 3877 || org_id == 10243 || org_id == 10088 || org_id == 10245 || org_id == 9779 || org_id == 10106 || org_id == 9504 || org_id ==  10215 || org_id == 10088 || org_id == 10191 || org_id == 9919 || org_id == 10265 || org_id == 10164 || org_id == 10290">
127
+          <span v-if="org_id == 9671 || org_id == 10138 || org_id == 10028 || org_id == 9675 || org_id == 4 || org_id == 3877 || org_id == 10243 || org_id == 10088 || org_id == 10245 || org_id == 9779 || org_id == 10106 || org_id == 9504 || org_id ==  10215 || org_id == 10188 || org_id == 10191 || org_id == 9919 || org_id == 10265 || org_id == 10164 || org_id == 10290">
128
             {{getOverFlushInfo(scope.row.xt_warehouse_info)}}
128
             {{getOverFlushInfo(scope.row.xt_warehouse_info)}}
129
           </span>
129
           </span>
130
           <span v-else>{{getWareInfo(scope.row.xt_warehouse_info) - getAutoCount(scope.row.id) - getOutCount(scope.row.id) + getCancelCount(scope.row.id) }}</span>
130
           <span v-else>{{getWareInfo(scope.row.xt_warehouse_info) - getAutoCount(scope.row.id) - getOutCount(scope.row.id) + getCancelCount(scope.row.id) }}</span>

+ 40 - 34
src/xt_pages/supply/components/addGoodOrder.vue 查看文件

528
       showTwo: false,
528
       showTwo: false,
529
       warese_out_id: 0,
529
       warese_out_id: 0,
530
       return_remark: "",
530
       return_remark: "",
531
-      is_warehouse:0
531
+      is_warehouse:0,
532
+      tableDataList:[]
532
     };
533
     };
533
   },
534
   },
534
   methods: {
535
   methods: {
645
             goodList[i].supply_count = "";
646
             goodList[i].supply_count = "";
646
             goodList[i].supply_total_price = "";
647
             goodList[i].supply_total_price = "";
647
             goodList[i].supply_manufacturer = goodList[i].manufacturer;
648
             goodList[i].supply_manufacturer = goodList[i].manufacturer;
648
-            goodList[i].supply_license_number = "";
649
+            goodList[i].supply_license_number = goodList[i].number;
649
             goodList[i].supply_remake = "";
650
             goodList[i].supply_remake = "";
650
             goodList[i].type = 2;
651
             goodList[i].type = 2;
651
             goodList[i].name = goodList[i].good_name;
652
             goodList[i].name = goodList[i].good_name;
815
     count_arrearage() {
816
     count_arrearage() {
816
       this.payment = this.total_price - this.arrearage;
817
       this.payment = this.total_price - this.arrearage;
817
     },
818
     },
818
-    checkPurchaseOrder() {
819
-      this.$confirm("是否审核?", {
820
-        confirmButtonText: "确 定",
821
-        cancelButtonText: "取 消",
822
-        type: "warning",
823
-      }).then(() => {
824
-          checkPurchaseOrder(this.id).then((response) => {
825
-            if (response.data.state == 1) {
826
-              var info = response.data.data.info;
827
-              this.disabled = true;
828
-              this.$message.success("审核成功!");
829
-              this.getPurchaseOrderDetail();
830
-            }
831
-          });
832
-        })
833
-        .catch(() => {});
834
-    },
819
+    // checkPurchaseOrder() {
820
+    //   this.$confirm("是否审核?", {
821
+    //     confirmButtonText: "确 定",
822
+    //     cancelButtonText: "取 消",
823
+    //     type: "warning",
824
+    //   }).then(() => {
825
+    //       checkPurchaseOrder(this.id).then((response) => {
826
+    //         if (response.data.state == 1) {
827
+    //           var info = response.data.data.info;
828
+    //           this.disabled = true;
829
+    //           this.$message.success("审核成功!");
830
+    //           this.getPurchaseOrderDetail();
831
+    //         }
832
+    //       });
833
+    //     })
834
+    //     .catch(() => {});
835
+    // },
835
     getPurchaseOrderDetail() {
836
     getPurchaseOrderDetail() {
836
       var id = this.$route.query.id;
837
       var id = this.$route.query.id;
837
       var ids = this.$route.query.ids;
838
       var ids = this.$route.query.ids;
851
             orderInfo[i].supply_product_date = "";
852
             orderInfo[i].supply_product_date = "";
852
             orderInfo[i].supply_expiry_date = "";
853
             orderInfo[i].supply_expiry_date = "";
853
           }
854
           }
854
-          console.log("drugli323322332", orderInfo);
855
           var drugList = response.data.data.baseList;
855
           var drugList = response.data.data.baseList;
856
           var goodList = response.data.data.goodList;
856
           var goodList = response.data.data.goodList;
857
           for (let i = 0; i < orderInfo.length; i++) {
857
           for (let i = 0; i < orderInfo.length; i++) {
893
 
893
 
894
           this.recordInfo.tableList = [];
894
           this.recordInfo.tableList = [];
895
           this.recordInfo.tableList = orderInfo;
895
           this.recordInfo.tableList = orderInfo;
896
-
897
-          console.log("orderINFO23323232", this.recordInfo.tableList);
896
+          //用来判断是否删除了从采购订单的数据
897
+          this.tableDataList = []
898
+          this.tableDataList = orderInfo
899
+         
898
         }
900
         }
899
       });
901
       });
900
     },
902
     },
910
       }
912
       }
911
 
913
 
912
       for (let i = 0; i < this.recordInfo.tableList.length; i++) {
914
       for (let i = 0; i < this.recordInfo.tableList.length; i++) {
913
-        this.recordInfo.tableList[i].supply_count = parseInt(
914
-          this.recordInfo.tableList[i].supply_count
915
-        );
915
+        this.recordInfo.tableList[i].supply_count = parseInt(this.recordInfo.tableList[i].supply_count);
916
         this.recordInfo.tableList[i].supply_price =
916
         this.recordInfo.tableList[i].supply_price =
917
           this.recordInfo.tableList[i].supply_price.toString();
917
           this.recordInfo.tableList[i].supply_price.toString();
918
         this.recordInfo.tableList[i].supply_total_price =
918
         this.recordInfo.tableList[i].supply_total_price =
942
         if (valid) {
942
         if (valid) {
943
           this.loading = true;
943
           this.loading = true;
944
           var warehousing_id = this.$route.query.id;
944
           var warehousing_id = this.$route.query.id;
945
+          //判断是否在采购订单数据中做了删除,如果长度相等则代表没有删除,如果不等则代表做了删除或者新增
946
+        
947
+          if(this.tableDataList.length != this.recordInfo.tableList){
948
+             warehousing_id = 0
949
+             for(let i=0;i<this.recordInfo.tableList.length;i++){
950
+              this.recordInfo.tableList[i].id = 0
951
+              this.number = ""
952
+             }
953
+          }
945
           var params = {
954
           var params = {
946
             stockIn: this.recordInfo.tableList,
955
             stockIn: this.recordInfo.tableList,
947
             return_remake: this.return_remark,
956
             return_remake: this.return_remark,
1089
     checkGoodOrder() {
1098
     checkGoodOrder() {
1090
       var id = this.warese_out_id;
1099
       var id = this.warese_out_id;
1091
       var warehousing_id = this.warehousing_id;
1100
       var warehousing_id = this.warehousing_id;
1092
-      console.log("hhh2323232323232323",id,warehousing_id)
1101
+      
1093
       getGoodOrderCountList(id, warehousing_id).then((response) => {
1102
       getGoodOrderCountList(id, warehousing_id).then((response) => {
1094
         if (response.data.state == 1) {
1103
         if (response.data.state == 1) {
1095
           this.$message.success("审核成功!");
1104
           this.$message.success("审核成功!");
1098
           this.showTwo = true;
1107
           this.showTwo = true;
1099
           this.showThree = true;
1108
           this.showThree = true;
1100
           var purcaseOrder = response.data.data.purcaseOrder;
1109
           var purcaseOrder = response.data.data.purcaseOrder;
1101
-          console.log("采购订单", purcaseOrder);
1102
-
1103
           var goodOrder = response.data.data.goodOrder;
1110
           var goodOrder = response.data.data.goodOrder;
1104
-          console.log("采购单", goodOrder);
1105
           var drugList = response.data.data.drugList;
1111
           var drugList = response.data.data.drugList;
1106
-          console.log("druglist23323223", drugList);
1112
+     
1107
           var is_warehouse = 0;
1113
           var is_warehouse = 0;
1108
           for (let i = 0; i < purcaseOrder.length; i++) {
1114
           for (let i = 0; i < purcaseOrder.length; i++) {
1109
             for (let j = 0; j < drugList.length; j++) {
1115
             for (let j = 0; j < drugList.length; j++) {
1173
                 }
1179
                 }
1174
               }
1180
               }
1175
               //如果total的长度等于 采购单的长度,怎表示该采购订单已经全部生成,全部入库
1181
               //如果total的长度等于 采购单的长度,怎表示该采购订单已经全部生成,全部入库
1176
-
1182
+             console.log("审核长度2332322323323332",arr)
1177
               if (arr.length == 0) {
1183
               if (arr.length == 0) {
1178
                 this.is_warehouse = 1;
1184
                 this.is_warehouse = 1;
1179
-                this.ModefySupplyWarehousing(is_warehouse, warehousing_id);
1185
+                this.ModefySupplyWarehousing(this.is_warehouse, warehousing_id);
1180
               }
1186
               }
1181
 
1187
 
1182
               //部分入库
1188
               //部分入库
1183
-              if (total != goodOrder.length) {
1189
+              if (arr.length > 0) {
1184
                 //修改订购单
1190
                 //修改订购单
1185
                 this.is_warehouse = 3;
1191
                 this.is_warehouse = 3;
1186
-                this.ModefySupplyWarehousing(is_warehouse, warehousing_id);
1192
+                this.ModefySupplyWarehousing(this.is_warehouse, warehousing_id);
1187
               }
1193
               }
1188
             }
1194
             }
1189
           }
1195
           }

+ 2 - 1
src/xt_pages/supply/components/addGoodReturn.vue 查看文件

537
             goodList[i].supply_count = "";
537
             goodList[i].supply_count = "";
538
             goodList[i].supply_total_price = "";
538
             goodList[i].supply_total_price = "";
539
             goodList[i].supply_manufacturer = goodList[i].manufacturer;
539
             goodList[i].supply_manufacturer = goodList[i].manufacturer;
540
-            goodList[i].supply_license_number = "";
540
+            goodList[i].supply_license_number = goodList[i].number;
541
             goodList[i].supply_remake = "";
541
             goodList[i].supply_remake = "";
542
             goodList[i].type = 2;
542
             goodList[i].type = 2;
543
             goodList[i].name = goodList[i].good_name;
543
             goodList[i].name = goodList[i].good_name;
746
           var drugList = response.data.data.drugList;
746
           var drugList = response.data.data.drugList;
747
           var goodList = response.data.data.goodList;
747
           var goodList = response.data.data.goodList;
748
           for (let i = 0; i < orderInfo.length; i++) {
748
           for (let i = 0; i < orderInfo.length; i++) {
749
+            orderInfo[i].id = orderInfo[i].id;
749
             orderInfo[i].supply_count = orderInfo[i].count;
750
             orderInfo[i].supply_count = orderInfo[i].count;
750
             orderInfo[i].count = orderInfo[i].count
751
             orderInfo[i].count = orderInfo[i].count
751
             orderInfo[i].supply_price = orderInfo[i].price;
752
             orderInfo[i].supply_price = orderInfo[i].price;

+ 50 - 14
src/xt_pages/supply/components/addPurchaseOrder.vue 查看文件

74
             size="small"
74
             size="small"
75
             type="primary"
75
             type="primary"
76
             @click="checkPurchaseOrder"
76
             @click="checkPurchaseOrder"
77
-            v-show="showOne"
78
-            >审核</el-button
79
-          >
77
+            v-show="showOne">审核
78
+         </el-button>
79
+
80
+         <!-- <el-button
81
+            size="small"
82
+            type="primary"
83
+            @click="checkReturnOrder"
84
+            v-if="is_check == 1">反审核
85
+         </el-button> -->
86
+         
80
           <el-button
87
           <el-button
81
             size="small"
88
             size="small"
82
             type="primary"
89
             type="primary"
97
           :data="recordInfo.tableList"
104
           :data="recordInfo.tableList"
98
           :class="signAndWeighBoxPatients"
105
           :class="signAndWeighBoxPatients"
99
           border
106
           border
100
-          style="width: 100%"
107
+          style="width:100%"
101
           max-height="450"
108
           max-height="450"
102
         >
109
         >
103
-          <el-table-column align="center" width="200px">
110
+          <el-table-column align="center" width="200">
104
             <template slot="header" slot-scope="scope">
111
             <template slot="header" slot-scope="scope">
105
               <span>商品<span style="color: red">*</span></span>
112
               <span>商品<span style="color: red">*</span></span>
106
             </template>
113
             </template>
111
               >
118
               >
112
                 <el-select
119
                 <el-select
113
                   v-model="scope.row.name"
120
                   v-model="scope.row.name"
114
-                  style="width: 160px"
121
+                  style="width: 160"
115
                   filterable
122
                   filterable
116
                   placeholder="请选择商品"
123
                   placeholder="请选择商品"
117
                   @change="changeName"
124
                   @change="changeName"
129
               </el-form-item>
136
               </el-form-item>
130
             </template>
137
             </template>
131
           </el-table-column>
138
           </el-table-column>
132
-          <el-table-column align="center" width="150px">
139
+          <el-table-column align="center" width="150">
133
             <template slot="header" slot-scope="scope">
140
             <template slot="header" slot-scope="scope">
134
               <span>商品类别</span>
141
               <span>商品类别</span>
135
             </template>
142
             </template>
143
               <div style="visibility: hidden">/</div>
150
               <div style="visibility: hidden">/</div>
144
             </template>
151
             </template>
145
           </el-table-column>
152
           </el-table-column>
146
-          <el-table-column label="规格&单位" align="center" width="200px">
153
+          <el-table-column label="规格&单位" align="center" width="200s">
147
             <template slot-scope="scope">
154
             <template slot-scope="scope">
148
               <el-input
155
               <el-input
149
                 placeholder="规格&单位"
156
                 placeholder="规格&单位"
340
             style="width: 150px"
347
             style="width: 150px"
341
             v-model="discount_amount"
348
             v-model="discount_amount"
342
             placeholder="请输入优惠金额"
349
             placeholder="请输入优惠金额"
350
+            @input="count_discount"
343
           ></el-input
351
           ></el-input
344
         ></span>
352
         ></span>
345
       </div>
353
       </div>
357
   savePurchaseOrder,
365
   savePurchaseOrder,
358
   updatePurchaseOrder,
366
   updatePurchaseOrder,
359
   checkPurchaseOrder,
367
   checkPurchaseOrder,
368
+  getReturnOrder
360
 } from "@/api/supply";
369
 } from "@/api/supply";
361
 import { getDataConfig } from "@/utils/data";
370
 import { getDataConfig } from "@/utils/data";
362
 export default {
371
 export default {
427
       goodList: [{ id: 1, name: "" }],
436
       goodList: [{ id: 1, name: "" }],
428
       total_price: 0,
437
       total_price: 0,
429
       return_remark:"",
438
       return_remark:"",
439
+      is_check:2,
430
     };
440
     };
431
   },
441
   },
432
   methods: {
442
   methods: {
507
         goodList[i].supply_count = ""
517
         goodList[i].supply_count = ""
508
         goodList[i].supply_total_price = ""
518
         goodList[i].supply_total_price = ""
509
         goodList[i].supply_manufacturer = goodList[i].manufacturer
519
         goodList[i].supply_manufacturer = goodList[i].manufacturer
510
-        goodList[i].supply_license_number = ""
520
+        goodList[i].supply_license_number = goodList[i].number
511
         goodList[i].supply_remake = ""
521
         goodList[i].supply_remake = ""
512
         goodList[i].type = 2
522
         goodList[i].type = 2
513
         goodList[i].name = goodList[i].good_name
523
         goodList[i].name = goodList[i].good_name
519
         this.tabList.push(goodList[i])
529
         this.tabList.push(goodList[i])
520
         }
530
         }
521
         this.goodList = goodList
531
         this.goodList = goodList
522
-        console.log(this.goodList,'oo')
532
+        
523
     } 
533
     } 
524
     })
534
     })
525
 },
535
 },
631
             return_remake:this.return_remark,
641
             return_remake:this.return_remark,
632
           };
642
           };
633
 
643
 
634
-          console.log("params23322323", params);
644
+         
635
           savePurchaseOrder(
645
           savePurchaseOrder(
636
             params,
646
             params,
637
             this.supplier_name,
647
             this.supplier_name,
645
               this.loading = false;
655
               this.loading = false;
646
               this.$message.success("保存成功!");
656
               this.$message.success("保存成功!");
647
               var warehouseInfo = response.data.data.warehouseInfo;
657
               var warehouseInfo = response.data.data.warehouseInfo;
658
+              this.is_check = warehouseInfo.is_check
648
               if(warehouseInfo.is_check == 1){
659
               if(warehouseInfo.is_check == 1){
649
                 this.Reviewed = true
660
                 this.Reviewed = true
661
+               
650
               }
662
               }
651
               this.number = warehouseInfo.number;
663
               this.number = warehouseInfo.number;
652
               this.id = warehouseInfo.id;
664
               this.id = warehouseInfo.id;
682
                 orderInfo[i].project_id = orderInfo[i].project_id;
694
                 orderInfo[i].project_id = orderInfo[i].project_id;
683
                 orderInfo[i].supply_unit = orderInfo[i].supply_unit;
695
                 orderInfo[i].supply_unit = orderInfo[i].supply_unit;
684
               }
696
               }
685
-              console.log("orderINFO23323232", orderInfo);
697
+            
686
               this.recordInfo.tableList = orderInfo;
698
               this.recordInfo.tableList = orderInfo;
687
               for(let i=0;i<orderInfo.length;i++){
699
               for(let i=0;i<orderInfo.length;i++){
688
                  orderInfo[i].name = ""
700
                  orderInfo[i].name = ""
716
       var min_str = "";
728
       var min_str = "";
717
       if (arr.length > 0) {
729
       if (arr.length > 0) {
718
         for (let i = 0; i < arr.length; i++) {
730
         for (let i = 0; i < arr.length; i++) {
719
-          total += parseInt(arr[i].stock_max_number);
731
+          total += parseInt(arr[i].stock_max_number+arr[i].stock_min_number);
720
         }
732
         }
721
       }
733
       }
722
       if (total < min_number) {
734
       if (total < min_number) {
797
             stockIn: this.recordInfo.tableList,
809
             stockIn: this.recordInfo.tableList,
798
             return_remake:this.return_remark,
810
             return_remake:this.return_remark,
799
           };
811
           };
800
-          console.log("params23232233223", params);
812
+         
801
 
813
 
802
           updatePurchaseOrder(
814
           updatePurchaseOrder(
803
             params,
815
             params,
827
       }
839
       }
828
       this.total_price = total_price;
840
       this.total_price = total_price;
829
       return total_price.toFixed(2);
841
       return total_price.toFixed(2);
842
+    },
843
+     count_discount() {
844
+      this.rate_of_concession = (
845
+        this.discount_amount /
846
+        (this.total_price * 0.01)
847
+      ).toFixed(2);
830
     },
848
     },
831
     checkPurchaseOrder(id, index) {
849
     checkPurchaseOrder(id, index) {
832
       this.$confirm("是否审核?", {
850
       this.$confirm("是否审核?", {
838
           checkPurchaseOrder(this.id).then((response) => {
856
           checkPurchaseOrder(this.id).then((response) => {
839
             if (response.data.state == 1) {
857
             if (response.data.state == 1) {
840
               var info = response.data.data.info;
858
               var info = response.data.data.info;
859
+              this.is_check = info.is_check
841
               this.disabled = true;
860
               this.disabled = true;
842
               this.$message.success("审核成功!");
861
               this.$message.success("审核成功!");
843
               this.Reviewed = true
862
               this.Reviewed = true
863
       }
882
       }
864
       this.discount_amount = discount_amount;
883
       this.discount_amount = discount_amount;
865
     },
884
     },
885
+    checkReturnOrder() {
886
+      var id = this.id;
887
+      getReturnOrder(id).then((response) => {
888
+        if (response.data.state == 1) {
889
+          var msg = response.data.data.msg;
890
+          this.disabled = false;
891
+          this.showOne = true
892
+          this.is_check =2 
893
+          this.$message.success("反审核成功!");
894
+        }
895
+      });
896
+    },
866
   },
897
   },
867
 
898
 
868
   created() {
899
   created() {
920
   transform: translateX(-50%);
951
   transform: translateX(-50%);
921
   top: 30%;
952
   top: 30%;
922
 }
953
 }
954
+
955
+/deep/ .el-table__body-wrapper::-webkit-scrollbar {
956
+width:10px;
957
+height:10px;
958
+}
923
 </style>
959
 </style>
924
 
960
 
925
 <style>
961
 <style>

+ 30 - 22
src/xt_pages/supply/components/addSupply.vue 查看文件

1
 <template>
1
 <template>
2
-  <el-dialog :title="title" :visible.sync="dialogVisible" width="35%">
2
+  <el-dialog :title="title" :visible.sync="dialogVisible" width="40%" :show-close="false">
3
     <!-- :before-close="handleClose" 如需要可添加进上方 -->
3
     <!-- :before-close="handleClose" 如需要可添加进上方 -->
4
     <div>
4
     <div>
5
       <el-form
5
       <el-form
32
                 @select="handleSelect"
32
                 @select="handleSelect"
33
               ></el-autocomplete> -->
33
               ></el-autocomplete> -->
34
 
34
 
35
-              <el-select v-model="supplier.supplierType" @select="handleSelect">
35
+              <el-select
36
+                v-model="supplier.supplierType"
37
+                @select="handleSelect"
38
+              >
36
                 <el-option
39
                 <el-option
37
                   v-for="item in supplierType"
40
                   v-for="item in supplierType"
38
                   :key="item.value"
41
                   :key="item.value"
39
-                  :label="item.label"
42
+                  :label="item.name"
40
                   :value="item.value"
43
                   :value="item.value"
41
                 >
44
                 >
42
                 </el-option>
45
                 </el-option>
87
           max-height="450"
90
           max-height="450"
88
         >
91
         >
89
           <!-- 联系人填写 -->
92
           <!-- 联系人填写 -->
90
-          <el-table-column label="联系人" align="center" width="110px">
93
+          <el-table-column label="联系人" align="center" width="130">
91
             <template slot="header" slot-scope="scope">
94
             <template slot="header" slot-scope="scope">
92
               <span>联系人<span style="color: red">*</span></span>
95
               <span>联系人<span style="color: red">*</span></span>
93
             </template>
96
             </template>
109
               >
112
               >
110
                 <el-input
113
                 <el-input
111
                   v-model="scope.row.name"
114
                   v-model="scope.row.name"
112
-                  style="width: 80px; margin-top: 3px"
115
+                  style="width: 100px; margin-top: 3px"
113
                 ></el-input>
116
                 ></el-input>
114
               </el-form-item>
117
               </el-form-item>
115
             </template>
118
             </template>
116
           </el-table-column>
119
           </el-table-column>
117
           <!-- 手机填写 -->
120
           <!-- 手机填写 -->
118
-          <el-table-column label="手机" align="center" width="100px">
121
+          <el-table-column label="手机" align="center" width="150">
119
             <template slot-scope="scope">
122
             <template slot-scope="scope">
120
               <el-input
123
               <el-input
121
                 v-model="scope.row.phone"
124
                 v-model="scope.row.phone"
122
-                style="width: 80px"
125
+                style="width: 120px"
123
               ></el-input>
126
               ></el-input>
124
               <div style="visibility: hidden">/</div>
127
               <div style="visibility: hidden">/</div>
125
             </template>
128
             </template>
127
           <!-- id填写======================================================= -->
130
           <!-- id填写======================================================= -->
128
           <el-table-column label="id" v-if="false">
131
           <el-table-column label="id" v-if="false">
129
             <template slot-scope="scope">
132
             <template slot-scope="scope">
130
-              <el-input v-model="scope.row.id" style="width: 80px"></el-input>
133
+              <el-input v-model="scope.row.id" style="width: 100px"></el-input>
131
               <div style="visibility: hidden">/</div>
134
               <div style="visibility: hidden">/</div>
132
             </template>
135
             </template>
133
           </el-table-column>
136
           </el-table-column>
134
           <!-- 联系地址填写 -->
137
           <!-- 联系地址填写 -->
135
-          <el-table-column label="联系地址" align="center" width="130px">
138
+          <el-table-column label="联系地址" align="center" width="150">
136
             <template slot-scope="scope">
139
             <template slot-scope="scope">
137
               <el-input
140
               <el-input
138
                 v-model="scope.row.address"
141
                 v-model="scope.row.address"
139
-                style="width: 115px"
142
+                style="width: 120px"
140
               ></el-input>
143
               ></el-input>
141
               <div style="visibility: hidden">/</div>
144
               <div style="visibility: hidden">/</div>
142
             </template>
145
             </template>
143
           </el-table-column>
146
           </el-table-column>
144
           <!-- 首要联系人填写 -->
147
           <!-- 首要联系人填写 -->
145
-          <el-table-column align="center" width="100px">
148
+          <el-table-column align="center" width="130px">
146
             <template slot="header" slot-scope="scope">
149
             <template slot="header" slot-scope="scope">
147
               <span>首要联系人<span style="color: red">*</span></span>
150
               <span>首要联系人<span style="color: red">*</span></span>
148
             </template>
151
             </template>
151
                 <!-- :prop="'contacts.' + scope.$index + '.name'"  如需添加可在上方标签加入 -->
154
                 <!-- :prop="'contacts.' + scope.$index + '.name'"  如需添加可在上方标签加入 -->
152
                 <el-select
155
                 <el-select
153
                   v-model="scope.row.is_first"
156
                   v-model="scope.row.is_first"
154
-                  style="width: 90px"
155
-                  placeholder="请选择"
157
+                  style="width: 110px"
156
                   @change="changeName($event, scope)"
158
                   @change="changeName($event, scope)"
157
                 >
159
                 >
158
                   <el-option
160
                   <el-option
170
           <el-table-column
172
           <el-table-column
171
             label="操作"
173
             label="操作"
172
             align="center"
174
             align="center"
173
-            width="120px"
175
+            width="150px"
174
             fixed="right"
176
             fixed="right"
175
           >
177
           >
176
             <template slot-scope="scope">
178
             <template slot-scope="scope">
181
                 placement="top"
183
                 placement="top"
182
               >
184
               >
183
                 <el-button
185
                 <el-button
184
-                  class="tablebtn"
185
                   size="mini"
186
                   size="mini"
186
                   type="primary"
187
                   type="primary"
187
                   icon="el-icon-circle-plus-outline"
188
                   icon="el-icon-circle-plus-outline"
196
                 placement="top"
197
                 placement="top"
197
               >
198
               >
198
                 <el-button
199
                 <el-button
199
-                  class="tablebtn"
200
                   size="mini"
200
                   size="mini"
201
                   type="danger"
201
                   type="danger"
202
                   icon="el-icon-delete"
202
                   icon="el-icon-delete"
287
       supplier: {
287
       supplier: {
288
         supplierName: "",
288
         supplierName: "",
289
         supplierCode: "gsy001",
289
         supplierCode: "gsy001",
290
-        supplierType: 0,
290
+        supplierType: "请选择类别",
291
         vatRate: 0,
291
         vatRate: 0,
292
         number: "",
292
         number: "",
293
         bank: "",
293
         bank: "",
429
                     this.closePop();
429
                     this.closePop();
430
                     this.$emit("init");
430
                     this.$emit("init");
431
                   } else {
431
                   } else {
432
-                    this.$message.error("新增失败");
432
+                    this.$message.error("新增失败"+res.data.msg);
433
                     setTimeout(() => {
433
                     setTimeout(() => {
434
                       this.closePop();
434
                       this.closePop();
435
                     }, 2000);
435
                     }, 2000);
477
                     this.closePop();
477
                     this.closePop();
478
                     this.$emit("init");
478
                     this.$emit("init");
479
                   } else {
479
                   } else {
480
-                    this.$message.error("修改失败");
480
+                    this.$message.error("修改失败"+res.data.msg);
481
                     setTimeout(() => {
481
                     setTimeout(() => {
482
                       this.closePop();
482
                       this.closePop();
483
                     }, 2000);
483
                     }, 2000);
571
         }
571
         }
572
       } else if (this.show_type == 2) {
572
       } else if (this.show_type == 2) {
573
         delcontactone(params).then((res) => {
573
         delcontactone(params).then((res) => {
574
-          if (res.data.data.list == "删除成功") {
575
-            this.$message.success(res.data.data.list);
574
+          if (res.data.state == 1) {
575
+            this.$message.success("删除成功");
576
             this.getcontacts(this.supplier_ids);
576
             this.getcontacts(this.supplier_ids);
577
           } else {
577
           } else {
578
             this.$message.error(res.data.data.list);
578
             this.$message.error(res.data.data.list);
630
       width: 75% !important;
630
       width: 75% !important;
631
     }
631
     }
632
     .el-select.el-select--medium {
632
     .el-select.el-select--medium {
633
-      width: 70% !important;
633
+      width: 85% !important;
634
     }
634
     }
635
   }
635
   }
636
 }
636
 }
655
 /deep/ .el-form-item__error {
655
 /deep/ .el-form-item__error {
656
   // display: none !important;
656
   // display: none !important;
657
 }
657
 }
658
+/deep/ .el-table__body-wrapper::-webkit-scrollbar {
659
+  width: 10px;
660
+  height: 10px;
661
+}
662
+
663
+/deep/ .el-table__fixed-right{
664
+  bottom: 0 !important;
665
+}
658
 </style>
666
 </style>

+ 72 - 36
src/xt_pages/supply/components/editGoodOrder.vue 查看文件

12
           align-items: center;
12
           align-items: center;
13
         "
13
         "
14
       >
14
       >
15
-        <div>
15
+        <div style="display: flex;">
16
           <span style="color: red">*</span><span>供应商:</span>
16
           <span style="color: red">*</span><span>供应商:</span>
17
           <el-select
17
           <el-select
18
             v-model="supplier_name"
18
             v-model="supplier_name"
19
             style="width: 140px; margin-right: 10px"
19
             style="width: 140px; margin-right: 10px"
20
             placeholder="请选择"
20
             placeholder="请选择"
21
+            :disabled="disabled"
21
           >
22
           >
22
             <el-option
23
             <el-option
23
               v-for="item in supplyList"
24
               v-for="item in supplyList"
39
             align="right"
40
             align="right"
40
             format="yyyy-MM-dd"
41
             format="yyyy-MM-dd"
41
             value-format="yyyy-MM-dd"
42
             value-format="yyyy-MM-dd"
43
+            :disabled="disabled"
42
           ></el-date-picker>
44
           ></el-date-picker>
43
-          <!-- <span>交货日期:</span> -->
44
-          <!-- <el-date-picker
45
-            size="small"
46
-            v-model="end_time"
47
-            prefix-icon="el-icon-date"
48
-            :editable="false"
49
-            style="width: 196px;"
50
-            type="date"
51
-            placeholder="选择日期时间"
52
-            align="right"
53
-            format="yyyy-MM-dd"
54
-            value-format="yyyy-MM-dd"
55
-            @change="endTimeChange"
56
-        ></el-date-picker> -->
45
+    
57
           <span>单据编码:{{ good_number }}</span>
46
           <span>单据编码:{{ good_number }}</span>
58
         </div>
47
         </div>
59
-        <div>
48
+      
49
+          <el-button size="small" type="primary" @click="updateGoodOrder">保存</el-button>
50
+        <div style="display: flex;" >
60
           <el-button size="small" type="primary" @click="updateGoodOrder"
51
           <el-button size="small" type="primary" @click="updateGoodOrder"
61
             >保存</el-button
52
             >保存</el-button
62
           >
53
           >
213
                   placeholder="选择日期时间"
204
                   placeholder="选择日期时间"
214
                   format="yyyy-MM-dd"
205
                   format="yyyy-MM-dd"
215
                   value-format="yyyy-MM-dd"
206
                   value-format="yyyy-MM-dd"
207
+                  :disabled="disabled"
216
                 >
208
                 >
217
                 </el-date-picker>
209
                 </el-date-picker>
218
               </el-form-item>
210
               </el-form-item>
262
           <el-table-column label="采购金额" align="center" width="120px">
254
           <el-table-column label="采购金额" align="center" width="120px">
263
             <template slot-scope="scope">
255
             <template slot-scope="scope">
264
               {{ calculate(scope.row.supply_count * scope.row.supply_price) }}
256
               {{ calculate(scope.row.supply_count * scope.row.supply_price) }}
257
+              <div style="visibility: hidden">/</div>
265
             </template>
258
             </template>
266
           </el-table-column>
259
           </el-table-column>
267
           <el-table-column label="生产日期" align="center" width="200px">
260
           <el-table-column label="生产日期" align="center" width="200px">
272
               <el-form-item
265
               <el-form-item
273
                 :prop="'tableList.' + scope.$index + '.supply_product_date'"
266
                 :prop="'tableList.' + scope.$index + '.supply_product_date'"
274
                 :rules="tableRules.supply_product_date"
267
                 :rules="tableRules.supply_product_date"
268
+
275
               >
269
               >
276
                 <el-date-picker
270
                 <el-date-picker
277
                   prefix-icon="el-icon-date"
271
                   prefix-icon="el-icon-date"
281
                   placeholder="选择日期时间"
275
                   placeholder="选择日期时间"
282
                   format="yyyy-MM-dd"
276
                   format="yyyy-MM-dd"
283
                   value-format="yyyy-MM-dd"
277
                   value-format="yyyy-MM-dd"
278
+                  :disabled="disabled"
284
                 >
279
                 >
285
                 </el-date-picker>
280
                 </el-date-picker>
286
               </el-form-item>
281
               </el-form-item>
384
             :rows="2"
379
             :rows="2"
385
             placeholder="备注信息"
380
             placeholder="备注信息"
386
             v-model="return_remark"
381
             v-model="return_remark"
382
+           :disabled="disabled"
387
           >
383
           >
388
           </el-input>
384
           </el-input>
389
         </div>
385
         </div>
386
+        <!-- 审核水印 -->
387
+        <img
388
+          src="@/assets/purchase/Reviewed.png"
389
+          alt="正在加载..."
390
+          class="reviewImg"
391
+          v-show="Reviewed == true"
392
+        />
390
       </el-form>
393
       </el-form>
391
       <div style="margin-top: 10px">合计:{{ getAllPrice() }} 元</div>
394
       <div style="margin-top: 10px">合计:{{ getAllPrice() }} 元</div>
392
       <div style="margin-top: 10px">
395
       <div style="margin-top: 10px">
396
             v-model="rate_of_concession"
399
             v-model="rate_of_concession"
397
             @input="addressChange"
400
             @input="addressChange"
398
             placeholder="请输入优惠率"
401
             placeholder="请输入优惠率"
402
+            :disabled="disabled"
399
           ></el-input
403
           ></el-input
400
           >%</span
404
           >%</span
401
         >
405
         >
406
             v-model="discount_amount"
410
             v-model="discount_amount"
407
             @input="count_discount"
411
             @input="count_discount"
408
             placeholder="请输入优惠金额"
412
             placeholder="请输入优惠金额"
413
+            :disabled="disabled"
409
           ></el-input
414
           ></el-input
410
         ></span>
415
         ></span>
411
 
416
 
415
             v-model="payment"
420
             v-model="payment"
416
             @input="count_payment"
421
             @input="count_payment"
417
             placeholder="请输入本次付款"
422
             placeholder="请输入本次付款"
423
+            :disabled="disabled"
418
           ></el-input
424
           ></el-input
419
         ></span>
425
         ></span>
420
 
426
 
424
             v-model="arrearage"
430
             v-model="arrearage"
425
             @input="count_arrearage"
431
             @input="count_arrearage"
426
             placeholder="请输入本次欠款"
432
             placeholder="请输入本次欠款"
433
+            :disabled="disabled"
427
           ></el-input
434
           ></el-input
428
         ></span>
435
         ></span>
429
       </div>
436
       </div>
430
-      <!-- <Computed></Computed> -->
431
     </div>
437
     </div>
432
     <popup ref="Popup" :content="content" :content_1="content_1" :content_2="content_2" :number="number" :orderList ="orderList" :type="type"></popup>
438
     <popup ref="Popup" :content="content" :content_1="content_1" :content_2="content_2" :number="number" :orderList ="orderList" :type="type"></popup>
433
   </div>
439
   </div>
484
       page: 1,
490
       page: 1,
485
       limit: 10,
491
       limit: 10,
486
       goodType: [],
492
       goodType: [],
493
+       Reviewed: false,
487
       goodInfo: [],
494
       goodInfo: [],
488
       org_id: 0,
495
       org_id: 0,
489
       types: [],
496
       types: [],
532
       orderInfo: [],
539
       orderInfo: [],
533
       warese_out_id: 0,
540
       warese_out_id: 0,
534
       return_remark: "",
541
       return_remark: "",
542
+      tableDataList:[],
535
     };
543
     };
536
   },
544
   },
545
+
546
+  watch(){
547
+      // total_price:function(newval,oldval){
548
+      //   console.log(newval,'op')
549
+      // }
550
+
551
+  },
552
+
537
   methods: {
553
   methods: {
538
     getInitOrder() {
554
     getInitOrder() {
539
       getInitOrder().then((response) => {
555
       getInitOrder().then((response) => {
623
             goodList[i].supply_count = "";
639
             goodList[i].supply_count = "";
624
             goodList[i].supply_total_price = "";
640
             goodList[i].supply_total_price = "";
625
             goodList[i].supply_manufacturer = goodList[i].manufacturer;
641
             goodList[i].supply_manufacturer = goodList[i].manufacturer;
626
-            goodList[i].supply_license_number = "";
642
+            goodList[i].supply_license_number = goodList[i].number;
627
             goodList[i].supply_remake = "";
643
             goodList[i].supply_remake = "";
628
             goodList[i].type = 2;
644
             goodList[i].type = 2;
629
             goodList[i].name = goodList[i].good_name;
645
             goodList[i].name = goodList[i].good_name;
712
       tempObj["good_number"] = "";
728
       tempObj["good_number"] = "";
713
       this.recordInfo.tableList.push(tempObj);
729
       this.recordInfo.tableList.push(tempObj);
714
     },
730
     },
715
-    handleDelete: function (index, row) { 
731
+    handleDelete: function (index, row) {
716
       if(this.is_check == 1){
732
       if(this.is_check == 1){
717
         this.$message.error("已审核单据,不能删除!")
733
         this.$message.error("已审核单据,不能删除!")
718
         return false
734
         return false
805
           this.recordInfo.tableList[i].supply_count;
821
           this.recordInfo.tableList[i].supply_count;
806
       }
822
       }
807
       this.total_price = total_price;
823
       this.total_price = total_price;
824
+      this.addressChange()
808
       return total_price.toFixed(2);
825
       return total_price.toFixed(2);
809
     },
826
     },
810
        addressChange() {
827
        addressChange() {
835
         confirmButtonText: "确 定",
852
         confirmButtonText: "确 定",
836
         cancelButtonText: "取 消",
853
         cancelButtonText: "取 消",
837
         type: "warning",
854
         type: "warning",
838
-      })
839
-        .then(() => {
855
+      }).then(() => {
840
           checkPurchaseOrder(this.id).then((response) => {
856
           checkPurchaseOrder(this.id).then((response) => {
841
             if (response.data.state == 1) {
857
             if (response.data.state == 1) {
842
               var info = response.data.data.info;
858
               var info = response.data.data.info;
858
             this.showOne = false;
874
             this.showOne = false;
859
             this.showTwo = true;
875
             this.showTwo = true;
860
             this.showThree = true;
876
             this.showThree = true;
877
+            this.disabled = true
878
+            this.Reviewed = true;
861
           }
879
           }
862
 
880
 
863
           this.id = out.id;
881
           this.id = out.id;
921
 
939
 
922
           this.recordInfo.tableList = [];
940
           this.recordInfo.tableList = [];
923
           this.recordInfo.tableList = orderInfo;
941
           this.recordInfo.tableList = orderInfo;
942
+          this.tableDataList = []
943
+          this.tableDataList = orderInfo
944
+
924
         }
945
         }
925
       });
946
       });
926
     },
947
     },
960
             stockIn: this.recordInfo.tableList,
981
             stockIn: this.recordInfo.tableList,
961
             return_remake: this.return_remark,
982
             return_remake: this.return_remark,
962
           }
983
           }
984
+          //判断是否在采购订单数据中做了删除,如果长度相等则代表没有删除,如果不等则代表做了删除或者新增
985
+
986
+          if(this.tableDataList.length != this.recordInfo.tableList){
987
+             warehousing_id = 0
988
+             for(let i=0;i<this.recordInfo.tableList.length;i++){
989
+              this.recordInfo.tableList[i].id = 0
990
+              this.recordInfo.tableDataList[i].order_number = ""
991
+              this.number = ""
992
+             }
993
+          }
963
           console.log("param23322332323",params)
994
           console.log("param23322332323",params)
964
-        
995
+          return
965
           updateGoodOrder(params,this.supplier_name,start,this.arrearage,this.payment,warehose_out_id,this.number,this.rate_of_concession,this.discount_amount,this.good_number).then((response) => {
996
           updateGoodOrder(params,this.supplier_name,start,this.arrearage,this.payment,warehose_out_id,this.number,this.rate_of_concession,this.discount_amount,this.good_number).then((response) => {
966
             if (response.data.state == 1) {
997
             if (response.data.state == 1) {
967
               this.loading = false;
998
               this.loading = false;
1004
             for (let j = 0; j < drugList.length; j++) {
1035
             for (let j = 0; j < drugList.length; j++) {
1005
               if (goodOrder[i].is_source == 1) {
1036
               if (goodOrder[i].is_source == 1) {
1006
                 if (goodOrder[i].supply_unit == drugList[j].max_unit) {
1037
                 if (goodOrder[i].supply_unit == drugList[j].max_unit) {
1007
-                  goodOrder[i].count =
1008
-                    goodOrder[i].count * drugList[j].min_number;
1038
+                  goodOrder[i].count = goodOrder[i].count * drugList[j].min_number;
1009
                 }
1039
                 }
1010
               }
1040
               }
1011
             }
1041
             }
1051
                   if (purcaseOrder[i].project_id == newArr[j].project_id) {
1081
                   if (purcaseOrder[i].project_id == newArr[j].project_id) {
1052
                     //根据商品ID比较数量大小,把数量不足的商品ID储存,表示采购单的数量未满足采购订单的数据,部分入库
1082
                     //根据商品ID比较数量大小,把数量不足的商品ID储存,表示采购单的数量未满足采购订单的数据,部分入库
1053
                     if (purcaseOrder[i].count > newArr[j].count) {
1083
                     if (purcaseOrder[i].count > newArr[j].count) {
1054
-                      arr.push(purcaseOrder[i].project_id);
1084
+                       arr.push(purcaseOrder[i].project_id);
1055
                     }
1085
                     }
1056
                   }
1086
                   }
1057
                 }
1087
                 }
1058
               }
1088
               }
1059
               //如果total的长度等于 采购单的长度,怎表示该采购订单已经全部生成,全部入库
1089
               //如果total的长度等于 采购单的长度,怎表示该采购订单已经全部生成,全部入库
1060
-
1090
+              console.log("审核23232323323",arr)
1061
               if (arr.length == 0) {
1091
               if (arr.length == 0) {
1062
-                is_warehouse = 1;
1092
+                 is_warehouse = 1;
1063
                 this.ModefySupplyWarehousing(is_warehouse, warehousing_id);
1093
                 this.ModefySupplyWarehousing(is_warehouse, warehousing_id);
1064
               }
1094
               }
1065
 
1095
 
1066
               //部分入库
1096
               //部分入库
1067
-              if (total != goodOrder.length) {
1097
+              if (arr.length >0) {
1068
                 //修改订购单
1098
                 //修改订购单
1069
                 is_warehouse = 3;
1099
                 is_warehouse = 3;
1070
                 this.ModefySupplyWarehousing(is_warehouse, warehousing_id);
1100
                 this.ModefySupplyWarehousing(is_warehouse, warehousing_id);
1133
             }
1163
             }
1134
 
1164
 
1135
             console.log("数据变了后23323233",outList)
1165
             console.log("数据变了后23323233",outList)
1136
-           
1166
+
1137
             let objInfo = {};
1167
             let objInfo = {};
1138
             if(cancelOrderList.length >0){
1168
             if(cancelOrderList.length >0){
1139
               cancelOrderList.forEach((item, index) => {
1169
               cancelOrderList.forEach((item, index) => {
1155
                     newArr[j].child.push(cancelOrderList[i])
1185
                     newArr[j].child.push(cancelOrderList[i])
1156
                 }
1186
                 }
1157
               }
1187
               }
1158
-              
1159
-             } 
1188
+
1189
+             }
1160
 
1190
 
1161
             for (let i = 0; i < newArr.length; i++) {
1191
             for (let i = 0; i < newArr.length; i++) {
1162
               for (let j = 0; j < newArr[i].child.length; j++) {
1192
               for (let j = 0; j < newArr[i].child.length; j++) {
1163
                 newArr[i].count += newArr[i].child[j].count;
1193
                 newArr[i].count += newArr[i].child[j].count;
1164
               }
1194
               }
1165
             }
1195
             }
1166
-           
1196
+
1167
             var arr = []
1197
             var arr = []
1168
             var total = 0;
1198
             var total = 0;
1169
             var str = "";
1199
             var str = "";
1183
 
1213
 
1184
               if (arr.length == 0) {
1214
               if (arr.length == 0) {
1185
                 this.$message.error("该订单已全部生成退库单,请知悉!");
1215
                 this.$message.error("该订单已全部生成退库单,请知悉!");
1186
-                return 
1216
+                return
1187
               }
1217
               }
1188
               console.log("arr23323232232323",arr)
1218
               console.log("arr23323232232323",arr)
1189
               if (arr.length > 0) {
1219
               if (arr.length > 0) {
1191
                 this.$router.push({ path: "/good/return/edit?id=" + id + "&ids=" + str});
1221
                 this.$router.push({ path: "/good/return/edit?id=" + id + "&ids=" + str});
1192
               }
1222
               }
1193
              }
1223
              }
1194
-         
1224
+
1195
           }
1225
           }
1196
          }
1226
          }
1197
         }
1227
         }
1198
       });
1228
       });
1199
-     
1229
+
1200
     },
1230
     },
1201
     //反审核
1231
     //反审核
1202
     MofyGoodOrder() {
1232
     MofyGoodOrder() {
1211
           var msg = response.data.data.msg;
1241
           var msg = response.data.data.msg;
1212
           if (msg == 1) {
1242
           if (msg == 1) {
1213
             this.$message.success("反审核成功!");
1243
             this.$message.success("反审核成功!");
1214
-            return 
1244
+            return
1215
           }
1245
           }
1216
           if (msg == 2) {
1246
           if (msg == 2) {
1217
             var cancelList = response.data.data.cancelList
1247
             var cancelList = response.data.data.cancelList
1412
   bottom: 20px;
1442
   bottom: 20px;
1413
   height: 100%;
1443
   height: 100%;
1414
 }
1444
 }
1445
+.reviewImg {
1446
+  position: fixed;
1447
+  left: 50%;
1448
+  transform: translateX(-50%);
1449
+  top: 30%;
1450
+}
1415
 </style>
1451
 </style>

+ 37 - 86
src/xt_pages/supply/components/editGoodReturn.vue 查看文件

62
           <el-button size="small" type="primary" @click="updateGoodReturn">保存</el-button>
62
           <el-button size="small" type="primary" @click="updateGoodReturn">保存</el-button>
63
           <el-button size="small" type="primary" @click="checkReturnOrder" v-if="is_check == 2">审核</el-button>
63
           <el-button size="small" type="primary" @click="checkReturnOrder" v-if="is_check == 2">审核</el-button>
64
           <el-button size="small" type="primary" @click="modefyReturnOrder" v-if="is_check == 1">反审核</el-button>
64
           <el-button size="small" type="primary" @click="modefyReturnOrder" v-if="is_check == 1">反审核</el-button>
65
-          <el-button size="small" type="primary" @click="updateGoodReturn"
66
-            >保存</el-button
67
-          >
68
-          <el-button size="small" type="primary" @click="checkReturnOrder"
69
-            >审核</el-button
70
-          >
71
         </div>
65
         </div>
72
       </div>
66
       </div>
73
 
67
 
548
             goodList[i].supply_count = "";
542
             goodList[i].supply_count = "";
549
             goodList[i].supply_total_price = "";
543
             goodList[i].supply_total_price = "";
550
             goodList[i].supply_manufacturer = goodList[i].manufacturer;
544
             goodList[i].supply_manufacturer = goodList[i].manufacturer;
551
-            goodList[i].supply_license_number = "";
545
+            goodList[i].supply_license_number = goodList[i].number;
552
             goodList[i].supply_remake = "";
546
             goodList[i].supply_remake = "";
553
             goodList[i].type = 2;
547
             goodList[i].type = 2;
554
             goodList[i].name = goodList[i].good_name;
548
             goodList[i].name = goodList[i].good_name;
897
       var id = this.$route.query.id;
891
       var id = this.$route.query.id;
898
       this.$router.push({ path: "/purchase/order/print?&id=" + id });
892
       this.$router.push({ path: "/purchase/order/print?&id=" + id });
899
     },
893
     },
900
-    // updateGoodReturn() {
901
-    //   var warehouse_out_id = this.$route.query.id;
902
-    //   this.$refs["tableForm"].validate((valid)=>{
903
-    //     if(valid){
904
-    //       this.loading = true
905
-    //       for(let i=0;i<this.recordInfo.tableList.length;i++){
906
-    //         this.recordInfo.tableList[i].supply_count = parseInt(this.recordInfo.tableList[i].supply_count)
907
-    //         this.recordInfo.tableList[i].supply_price = this.recordInfo.tableList[i].supply_price.toString()
908
-    //         this.recordInfo.tableList[i].supply_total = this.recordInfo.tableList[i].supply_total.toString()
909
-
910
-    //         for(let j=0;j<this.manufactuerList.length;j++){
911
-    //             if(this.recordInfo.tableList[i].supply_manufacturer == this.manufactuerList[j].manufacturer_name){
912
-    //               this.recordInfo.tableList[i].manufacturer_id = this.manufactuerList[j].id
913
-    //             }
914
-    //             if(this.recordInfo.tableList[i].supply_manufacturer == this.manufactuerList[j].id){
915
-    //               this.recordInfo.tableList[i].supply_manufacturer = this.manufactuerList[j].manufacturer_name
916
-    //             }
917
-
918
-    //   this.$refs["tableForm"].validate((valid) => {
919
-    //     if (valid) {
920
-    //       this.loading = true;
921
-    //       for (let i = 0; i < this.recordInfo.tableList.length; i++) {
922
-    //         this.recordInfo.tableList[i].supply_count = parseInt(
923
-    //           this.recordInfo.tableList[i].supply_count
924
-    //         );
925
-    //         this.recordInfo.tableList[i].supply_price =
926
-    //           this.recordInfo.tableList[i].supply_price.toString();
927
-    //         this.recordInfo.tableList[i].supply_total =
928
-    //           this.recordInfo.tableList[i].supply_total.toString();
894
+    updateGoodReturn(){
895
+      var warehouse_out_id = this.$route.query.id;
896
+      this.$refs["tableForm"].validate((valid)=>{
897
+        if(valid){
898
+          this.loading = true
899
+          for(let i=0;i<this.recordInfo.tableList.length;i++){
900
+            this.recordInfo.tableList[i].supply_count = parseInt(this.recordInfo.tableList[i].supply_count)
901
+            this.recordInfo.tableList[i].supply_price = this.recordInfo.tableList[i].supply_price.toString()
902
+            this.recordInfo.tableList[i].supply_total = this.recordInfo.tableList[i].supply_total.toString()
903
+            for(let j=0;j<this.manufactuerList.length;j++){
904
+                if(this.recordInfo.tableList[i].supply_manufacturer == this.manufactuerList[j].manufacturer_name){
905
+                  this.recordInfo.tableList[i].manufacturer_id = this.manufactuerList[j].id
906
+                }
907
+                if(this.recordInfo.tableList[i].supply_manufacturer == this.manufactuerList[j].id){
908
+                  this.recordInfo.tableList[i].supply_manufacturer = this.manufactuerList[j].manufacturer_name
909
+                }
910
+             }
911
+          }
912
+          var params = {
913
+            stockIn:this.recordInfo.tableList,
914
+            return_marke:this.return_remark,
915
+          }
916
+          updateGoodReturn(params,warehouse_out_id,this.start_time,this.rate_of_concession,this.discount_amount,this.arrearage,this.payment,this.supplier_name,this.number).then(response=>{
917
+             if(response.data.state == 1){
918
+                var msg = response.data.msg;
919
+                this.loading = false;
920
+                this.$message.success("保存成功!");
921
+             }
922
+          })
929
 
923
 
930
-    //         for (let j = 0; j < this.manufactuerList.length; j++) {
931
-    //           if (
932
-    //             this.recordInfo.tableList[i].supply_manufacturer ==
933
-    //             this.manufactuerList[j].manufacturer_name
934
-    //           ) {
935
-    //             this.recordInfo.tableList[i].manufacturer_id =
936
-    //               this.manufactuerList[j].id;
937
-    //           }
938
-    //           if (
939
-    //             this.recordInfo.tableList[i].supply_manufacturer ==
940
-    //             this.manufactuerList[j].id
941
-    //           ) {
942
-    //             this.recordInfo.tableList[i].supply_manufacturer =
943
-    //               this.manufactuerList[j].manufacturer_name;
944
-    //           }
945
-    //         }
946
-    //       }
947
-    //       var params = {
948
-    //         stockIn:this.recordInfo.tableList,
949
-    //         return_marke:this.return_remark,
950
-    //       }
951
-    //       console.log("start_time232233232",this.start_time)
952
-    //       console.log("arrage2323322323",params)
953
-    //       updateGoodReturn(
954
-    //         params,
955
-    //         warehouse_out_id,
956
-    //         this.start_time,
957
-    //         this.rate_of_concession,
958
-    //         this.discount_amount,
959
-    //         this.arrearage,
960
-    //         this.payment,
961
-    //         this.supplier_name,
962
-    //         this.number
963
-    //       ).then((response) => {
964
-    //         if (response.data.state == 1) {
965
-    //           var msg = response.data.msg;
966
-    //           this.loading = false;
967
-    //           this.$message.success("保存成功!");
968
-    //         }
969
-    //       })
970
-    // },
924
+        }
925
+      })
926
+    },
971
     checkReturnOrder(){
927
     checkReturnOrder(){
972
       this.loading = true
928
       this.loading = true
973
      var params = {
929
      var params = {
978
        if(response.data.state == 1){
934
        if(response.data.state == 1){
979
         this.loading = false
935
         this.loading = false
980
         var msg = response.data.data.msg
936
         var msg = response.data.data.msg
981
-        this.$message.success("保存成功!")
937
+        this.$message.success("审核成功!")
982
        }
938
        }
983
      })
939
      })
984
     },
940
     },
990
      }
946
      }
991
      modefyReturnOrder(params).then(response=>{
947
      modefyReturnOrder(params).then(response=>{
992
        if(response.data.state == 1){
948
        if(response.data.state == 1){
993
-
949
+         this.loading = false
950
+         var msg = response.data.data.msg
951
+         this.$message.success("反审核成功!")
994
        }
952
        }
995
      })
953
      })
996
     },
954
     },
997
-    checkReturnOrder() {
998
-      var params = {
999
-        warehouse_out_id: this.warehouse_out_id,
1000
-        id: this.id,
1001
-      };
1002
-      checkReturnOrder(params).then((response) => {});
1003
-    },
1004
   },
955
   },
1005
   created() {
956
   created() {
1006
     const tempObj = {};
957
     const tempObj = {};

+ 24 - 14
src/xt_pages/supply/components/editPurchaseOrder.vue 查看文件

141
                 style="width: 120px"
141
                 style="width: 120px"
142
                 :disabled="true"
142
                 :disabled="true"
143
               ></el-input>
143
               ></el-input>
144
+              <div style="visibility: hidden">/</div>
144
             </template>
145
             </template>
145
           </el-table-column>
146
           </el-table-column>
146
           <el-table-column label="规格&单位" align="center" width="200px">
147
           <el-table-column label="规格&单位" align="center" width="200px">
150
                 style="width: 150px"
151
                 style="width: 150px"
151
                 :disabled="true"
152
                 :disabled="true"
152
               ></el-input>
153
               ></el-input>
154
+              <div style="visibility: hidden">/</div>
153
             </template>
155
             </template>
154
           </el-table-column>
156
           </el-table-column>
155
           <el-table-column label="单位" align="center" width="120px">
157
           <el-table-column label="单位" align="center" width="120px">
187
                 style="width: 100px"
189
                 style="width: 100px"
188
                 :disabled="true"
190
                 :disabled="true"
189
               ></el-input>
191
               ></el-input>
192
+              <div style="visibility: hidden">/</div>
190
             </template>
193
             </template>
191
           </el-table-column>
194
           </el-table-column>
192
           <el-table-column label="数量" align="center" width="180px">
195
           <el-table-column label="数量" align="center" width="180px">
216
                 :disabled="disabled"
219
                 :disabled="disabled"
217
                 placeholder="请输入采购单价"
220
                 placeholder="请输入采购单价"
218
               ></el-input>
221
               ></el-input>
222
+              <div style="visibility: hidden">/</div>
219
             </template>
223
             </template>
220
           </el-table-column>
224
           </el-table-column>
221
 
225
 
222
           <el-table-column label="采购金额" align="center" width="120px">
226
           <el-table-column label="采购金额" align="center" width="120px">
223
             <template slot-scope="scope">
227
             <template slot-scope="scope">
224
               {{ calculate(scope.row.supply_count * scope.row.supply_price) }}
228
               {{ calculate(scope.row.supply_count * scope.row.supply_price) }}
229
+              <div style="visibility: hidden">/</div>
225
             </template>
230
             </template>
226
           </el-table-column>
231
           </el-table-column>
227
 
232
 
241
                 >
246
                 >
242
                 </el-option>
247
                 </el-option>
243
               </el-select>
248
               </el-select>
249
+              <div style="visibility: hidden">/</div>
244
             </template>
250
             </template>
245
           </el-table-column>
251
           </el-table-column>
246
 
252
 
251
                 style="width: 160px"
257
                 style="width: 160px"
252
                 :disabled="true"
258
                 :disabled="true"
253
               ></el-input>
259
               ></el-input>
260
+              <div style="visibility: hidden">/</div>
254
             </template>
261
             </template>
255
           </el-table-column>
262
           </el-table-column>
256
 
263
 
262
                 :disabled="disabled"
269
                 :disabled="disabled"
263
                 placeholder="请输入备注"
270
                 placeholder="请输入备注"
264
               ></el-input>
271
               ></el-input>
272
+              <div style="visibility: hidden">/</div>
265
             </template>
273
             </template>
266
           </el-table-column>
274
           </el-table-column>
267
 
275
 
374
   getAllOrderCountList,
382
   getAllOrderCountList,
375
   getGoodOrderList,
383
   getGoodOrderList,
376
   getReturnOrder,
384
   getReturnOrder,
377
-  deletePurchaseOrder
385
+  deletePurchaseOrder,
386
+  deletePurchOder
378
 } from "@/api/supply";
387
 } from "@/api/supply";
379
 export default {
388
 export default {
380
   name: "addPurchaseOrder",
389
   name: "addPurchaseOrder",
557
             goodList[i].supply_count = "";
566
             goodList[i].supply_count = "";
558
             goodList[i].supply_total_price = "";
567
             goodList[i].supply_total_price = "";
559
             goodList[i].supply_manufacturer = goodList[i].manufacturer;
568
             goodList[i].supply_manufacturer = goodList[i].manufacturer;
560
-            goodList[i].supply_license_number = "";
569
+            goodList[i].supply_license_number = goodList[i].number
561
             goodList[i].supply_remake = "";
570
             goodList[i].supply_remake = "";
562
             goodList[i].type = 2;
571
             goodList[i].type = 2;
563
             goodList[i].name = goodList[i].good_name;
572
             goodList[i].name = goodList[i].good_name;
569
             this.tabList.push(goodList[i]);
578
             this.tabList.push(goodList[i]);
570
           }
579
           }
571
           this.goodList = goodList;
580
           this.goodList = goodList;
572
-          console.log(this.goodList, "oo");
581
+          
573
         }
582
         }
574
       });
583
       });
575
     },
584
     },
631
       this.recordInfo.tableList.push(tempObj);
640
       this.recordInfo.tableList.push(tempObj);
632
     },
641
     },
633
     handleDelete: function (index, row) {
642
     handleDelete: function (index, row) {
643
+      
634
       if(this.is_check == 1){
644
       if(this.is_check == 1){
635
          this.$message.error("已审核单据,不能删除!")
645
          this.$message.error("已审核单据,不能删除!")
636
          return false
646
          return false
651
             cancelButtonText: '取消',
661
             cancelButtonText: '取消',
652
             type: 'warning'
662
             type: 'warning'
653
           }).then(() => {
663
           }).then(() => {
654
-            deletePurchaseOrder(params).then(response => {
664
+            deletePurchOder(params).then(response => {
655
               if (response.data.state == 0) {
665
               if (response.data.state == 0) {
656
                 this.$message.error(response.data.msg)
666
                 this.$message.error(response.data.msg)
657
                 return false
667
                 return false
730
       this.$refs["tableForm"].validate((valid) => {
740
       this.$refs["tableForm"].validate((valid) => {
731
         if (valid) {
741
         if (valid) {
732
           this.loading = true;
742
           this.loading = true;
733
-          console.log("生产厂商", this.recordInfo.tableList);
734
-          console.log("生产上次", this.manufactuerList);
743
+         
735
           for (let i = 0; i < this.recordInfo.tableList.length; i++) {
744
           for (let i = 0; i < this.recordInfo.tableList.length; i++) {
736
             this.recordInfo.tableList[i].supply_count = parseInt(this.recordInfo.tableList[i].supply_count);
745
             this.recordInfo.tableList[i].supply_count = parseInt(this.recordInfo.tableList[i].supply_count);
737
             this.recordInfo.tableList[i].supply_license_number =this.recordInfo.tableList[i].supply_license_number.toString();
746
             this.recordInfo.tableList[i].supply_license_number =this.recordInfo.tableList[i].supply_license_number.toString();
761
             stockIn: this.recordInfo.tableList,
770
             stockIn: this.recordInfo.tableList,
762
             return_remake: this.return_remark,
771
             return_remake: this.return_remark,
763
           };
772
           };
764
-          console.log("param23232332", params);
773
+         
765
 
774
 
766
           updatePurchaseOrder(
775
           updatePurchaseOrder(
767
             params,
776
             params,
791
           this.recordInfo.tableList[i].supply_count;
800
           this.recordInfo.tableList[i].supply_count;
792
       }
801
       }
793
       this.total_price = total_price;
802
       this.total_price = total_price;
803
+      this.addressChange()
794
       return total_price.toFixed(2);
804
       return total_price.toFixed(2);
795
     },
805
     },
796
 
806
 
845
             this.showTwo = false;
855
             this.showTwo = false;
846
             this.showThree = true;
856
             this.showThree = true;
847
           }
857
           }
848
-          console.log("drugli323322332", this.drugList);
858
+         
849
           var drugList = response.data.data.baseList;
859
           var drugList = response.data.data.baseList;
850
           var goodList = response.data.data.goodList;
860
           var goodList = response.data.data.goodList;
851
           for (let i = 0; i < orderInfo.length; i++) {
861
           for (let i = 0; i < orderInfo.length; i++) {
882
               }
892
               }
883
             }
893
             }
884
           }
894
           }
885
-          console.log("orderINFO23323232", orderInfo);
895
+         
886
           this.recordInfo.tableList = [];
896
           this.recordInfo.tableList = [];
887
           this.recordInfo.tableList = orderInfo;
897
           this.recordInfo.tableList = orderInfo;
888
         }
898
         }
902
       getAllOrderCountList(id).then((response) => {
912
       getAllOrderCountList(id).then((response) => {
903
         if (response.data.state == 1) {
913
         if (response.data.state == 1) {
904
           var purcaseOrder = response.data.data.purcaseOrder;
914
           var purcaseOrder = response.data.data.purcaseOrder;
905
-          console.log("采购订单", purcaseOrder);
906
 
915
 
907
           var goodOrder = response.data.data.goodOrder;
916
           var goodOrder = response.data.data.goodOrder;
908
-          console.log("采购单", goodOrder);
917
+         
909
           var drugList = response.data.data.drugList;
918
           var drugList = response.data.data.drugList;
910
-          console.log("druglist23323223", drugList);
919
+      
911
           var ids = "";
920
           var ids = "";
912
           // 如果采购单没有数据,则代表改订单第一次生成采购订单数据
921
           // 如果采购单没有数据,则代表改订单第一次生成采购订单数据
913
           if (goodOrder.length == 0) {
922
           if (goodOrder.length == 0) {
954
                 }
963
                 }
955
               }
964
               }
956
             }
965
             }
957
-            console.log("newAr2332232323", newArr);
966
+     
958
 
967
 
959
             for (let i = 0; i < newArr.length; i++) {
968
             for (let i = 0; i < newArr.length; i++) {
960
               for (let j = 0; j < newArr[i].child.length; j++) {
969
               for (let j = 0; j < newArr[i].child.length; j++) {
1008
       getGoodOrderList(id).then((response) => {
1017
       getGoodOrderList(id).then((response) => {
1009
         if (response.data.state == 1) {
1018
         if (response.data.state == 1) {
1010
           var list = response.data.data.list
1019
           var list = response.data.data.list
1011
-          console.log("list23232323",list)
1020
+        
1012
           this.orderList = list
1021
           this.orderList = list
1013
           //如果长度大于0,有购货单不能反审核
1022
           //如果长度大于0,有购货单不能反审核
1014
           if (list.length > 0) {
1023
           if (list.length > 0) {
1030
         if (response.data.state == 1) {
1039
         if (response.data.state == 1) {
1031
           var msg = response.data.data.msg;
1040
           var msg = response.data.data.msg;
1032
           this.disabled = false;
1041
           this.disabled = false;
1042
+          this.Reviewed = false
1033
           this.$message.success("反审核成功!");
1043
           this.$message.success("反审核成功!");
1034
           this.getPurchaseOrderDetail();
1044
           this.getPurchaseOrderDetail();
1035
         }
1045
         }

+ 1 - 1
src/xt_pages/supply/components/editSupply.vue 查看文件

918
 }
918
 }
919
 .el-table__fixed-right{
919
 .el-table__fixed-right{
920
   width:150px;
920
   width:150px;
921
-  bottom: 20px;
921
+  /* bottom: 20px; */
922
   height: 100%;
922
   height: 100%;
923
 }
923
 }
924
 </style>
924
 </style>

+ 284 - 255
src/xt_pages/supply/purchaseOrderQuery.vue 查看文件

3
     <div class="position">
3
     <div class="position">
4
       <bread-crumb :crumbs="crumbs"></bread-crumb>
4
       <bread-crumb :crumbs="crumbs"></bread-crumb>
5
     </div>
5
     </div>
6
-    <div class="app-container ">
7
-      <div style="justify-content: space-between;margin: 0px 0 12px 0;display: flex;align-items: center;">
6
+    <div class="app-container">
7
+      <div
8
+        style="
9
+          justify-content: space-between;
10
+          margin: 0px 0 12px 0;
11
+          display: flex;
12
+          align-items: center;
13
+        "
14
+      >
8
         <div>
15
         <div>
9
-        
10
           <el-date-picker
16
           <el-date-picker
11
             size="small"
17
             size="small"
12
             v-model="start_time"
18
             v-model="start_time"
13
             prefix-icon="el-icon-date"
19
             prefix-icon="el-icon-date"
14
             :editable="false"
20
             :editable="false"
15
-            style="width: 196px;"
21
+            style="width: 196px"
16
             type="date"
22
             type="date"
17
             placeholder="选择日期时间"
23
             placeholder="选择日期时间"
18
             align="right"
24
             align="right"
19
             format="yyyy-MM-dd"
25
             format="yyyy-MM-dd"
20
             value-format="yyyy-MM-dd"
26
             value-format="yyyy-MM-dd"
21
             @change="startTimeChange"
27
             @change="startTimeChange"
22
-           ></el-date-picker>-
23
-            <el-date-picker
24
-              size="small"
25
-              v-model="end_time"
26
-              prefix-icon="el-icon-date"
27
-              :editable="false"
28
-              style="width: 196px;"
29
-              type="date"
30
-              placeholder="选择日期时间"
31
-              align="right"
32
-              format="yyyy-MM-dd"
33
-              value-format="yyyy-MM-dd"
34
-              @change="endTimeChange"
28
+          ></el-date-picker
29
+          >-
30
+          <el-date-picker
31
+            size="small"
32
+            v-model="end_time"
33
+            prefix-icon="el-icon-date"
34
+            :editable="false"
35
+            style="width: 196px"
36
+            type="date"
37
+            placeholder="选择日期时间"
38
+            align="right"
39
+            format="yyyy-MM-dd"
40
+            value-format="yyyy-MM-dd"
41
+            @change="endTimeChange"
35
           ></el-date-picker>
42
           ></el-date-picker>
36
           <span>审核状态:</span>
43
           <span>审核状态:</span>
37
-           <el-select v-model="check_id" style="width:140px;margin-right:10px;" placeholder="请选择"
38
-            @change="changeTypeName">
44
+          <el-select
45
+            v-model="check_id"
46
+            style="width: 140px; margin-right: 10px"
47
+            placeholder="请选择"
48
+            @change="changeTypeName"
49
+          >
39
             <el-option
50
             <el-option
40
-                v-for="item in checkList"
41
-                :key="item.id"
42
-                :label="item.name"
43
-                :value="item.id">
51
+              v-for="item in checkList"
52
+              :key="item.id"
53
+              :label="item.name"
54
+              :value="item.id"
55
+            >
44
             </el-option>
56
             </el-option>
45
           </el-select>
57
           </el-select>
46
           <el-input
58
           <el-input
47
             size="small"
59
             size="small"
48
-            style="width: 200px;margin-left:10px;"
60
+            style="width: 200px; margin-left: 10px"
49
             class="filter-item"
61
             class="filter-item"
50
             v-model.trim="keywords"
62
             v-model.trim="keywords"
51
             placeholder="订单编号或供应商名称"
63
             placeholder="订单编号或供应商名称"
64
         </div>
76
         </div>
65
       </div>
77
       </div>
66
 
78
 
67
-
68
-       <el-table
79
+      <el-table
69
         :row-style="{ color: '#303133' }"
80
         :row-style="{ color: '#303133' }"
70
         :header-cell-style="{
81
         :header-cell-style="{
71
           backgroundColor: 'rgb(245, 247, 250)',
82
           backgroundColor: 'rgb(245, 247, 250)',
72
-          color: '#606266'
83
+          color: '#606266',
73
         }"
84
         }"
74
         :data="tableList"
85
         :data="tableList"
75
         :class="signAndWeighBoxPatients"
86
         :class="signAndWeighBoxPatients"
77
       >
88
       >
78
         <el-table-column label="订单日期" align="center">
89
         <el-table-column label="订单日期" align="center">
79
           <template slot-scope="scope">
90
           <template slot-scope="scope">
80
-            <span>{{getTimes(scope.row.document_date)}}</span>
81
-         </template>
91
+            <span>{{ getTimes(scope.row.document_date) }}</span>
92
+          </template>
82
         </el-table-column>
93
         </el-table-column>
83
         <el-table-column label="订单编号" align="center">
94
         <el-table-column label="订单编号" align="center">
84
           <template slot-scope="scope">
95
           <template slot-scope="scope">
85
-            <span>{{scope.row.number}}</span>
96
+            <span>{{ scope.row.number }}</span>
86
           </template>
97
           </template>
87
         </el-table-column>
98
         </el-table-column>
88
         <el-table-column label="供应商" align="center">
99
         <el-table-column label="供应商" align="center">
89
-            <template slot-scope="scope">
90
-              <span>{{getName(scope.row.supplier_id)}}</span>
91
-            </template>
92
-         </el-table-column>
93
-        <el-table-column label="关联采购单号" align="center">
94
           <template slot-scope="scope">
100
           <template slot-scope="scope">
95
-            <div style="width:100%;height:100%">
96
-              <tr class="annotation-rs cluster-rs" v-for="(item,index) in scope.row.orderOut" :key="index">
101
+            <span>{{ getName(scope.row.supplier_id) }}</span>
102
+          </template>
103
+        </el-table-column>
104
+        <el-table-column label="关联采购单号" align="center" width="150">
105
+          <template slot-scope="scope">
106
+            <div style="width: 100%; height: 100%">
107
+              <tr class="color" v-for="(item,index) in scope.row.orderOut" :key="index">
97
                  <td>{{item.good_number}}</td>
108
                  <td>{{item.good_number}}</td>
98
               </tr>
109
               </tr>
110
+
99
             </div>
111
             </div>
100
           </template>
112
           </template>
101
         </el-table-column>
113
         </el-table-column>
102
         <el-table-column label="采购金额" align="center">
114
         <el-table-column label="采购金额" align="center">
103
           <template slot-scope="scope">
115
           <template slot-scope="scope">
104
-             <span v-if="getAllBuyPrice(scope.row.orderInfo)>0">{{getAllBuyPrice(scope.row.orderInfo)}}</span> 
116
+            <span v-if="getAllBuyPrice(scope.row.orderInfo) > 0">{{
117
+              getAllBuyPrice(scope.row.orderInfo)
118
+            }}</span>
119
+          </template>
120
+        </el-table-column>
121
+
122
+        <el-table-column label="数量" align="center">
123
+          <template slot-scope="scope">
124
+            {{ getAllCount(scope.row.orderInfo) }}
125
+          </template>
126
+        </el-table-column>
127
+        <el-table-column label="订单状态" align="center">
128
+          <template slot-scope="scope">
129
+            <span v-if="scope.row.is_warehouse == 1">全部入库</span>
130
+            <span v-if="scope.row.is_warehouse == 2">未入库</span>
131
+            <span v-if="scope.row.is_warehouse == 3">部分入库</span>
105
           </template>
132
           </template>
106
         </el-table-column>
133
         </el-table-column>
107
 
134
 
108
-       <el-table-column label="数量" align="center">
109
-         <template slot-scope="scope">
110
-           {{getAllCount(scope.row.orderInfo)}}
111
-         </template>
112
-       </el-table-column>
113
-       <el-table-column label="订单状态" align="center">
114
-         <template slot-scope="scope">
115
-           <span v-if="scope.row.is_warehouse == 1">全部入库</span>
116
-           <span v-if="scope.row.is_warehouse == 2">未入库</span>
117
-           <span v-if="scope.row.is_warehouse == 3">部分入库</span>
118
-         </template>
119
-       </el-table-column>
120
-     
121
         <el-table-column label="交货日期" align="center">
135
         <el-table-column label="交货日期" align="center">
122
-         <template slot-scope="scope">
123
-           {{getTimes(scope.row.delivery_date)}}
124
-         </template>
125
-       </el-table-column>
126
-        
127
-    
128
-      <el-table-column label="制单人" align="center">
129
-         <template slot-scope="scope">
130
-          {{getDocName(scope.row.creater)}}
131
-         </template>
132
-       </el-table-column>
136
+          <template slot-scope="scope">
137
+            {{ getTimes(scope.row.delivery_date) }}
138
+          </template>
139
+        </el-table-column>
133
 
140
 
134
-      <el-table-column label="审核人" align="center">
135
-         <template slot-scope="scope">
136
-          {{getDocName(scope.row.checker)}}
137
-         </template>
138
-       </el-table-column>
141
+        <el-table-column label="制单人" align="center">
142
+          <template slot-scope="scope">
143
+            {{ getDocName(scope.row.creater) }}
144
+          </template>
145
+        </el-table-column>
139
 
146
 
140
-       <el-table-column label="操作" align="center" width="200px">
147
+        <el-table-column label="审核人" align="center">
141
           <template slot-scope="scope">
148
           <template slot-scope="scope">
142
-              <el-button
143
-                icon="el-icon-edit-outline"
144
-                size="small"
145
-                type="primary"
146
-                @click="toClick(scope.row.id)"
149
+            {{ getDocName(scope.row.checker) }}
150
+          </template>
151
+        </el-table-column>
152
+
153
+        <el-table-column label="操作" align="center" width="200px">
154
+          <template slot-scope="scope">
155
+            <el-button
156
+              icon="el-icon-edit-outline"
157
+              size="small"
158
+              type="primary"
159
+              @click="toClick(scope.row.id)"
147
               >编辑
160
               >编辑
148
-              </el-button>
149
-              <el-button
150
-                icon="el-icon-delete"
151
-                size="small"
152
-                type="danger"
153
-                @click="toDelete(scope.row,scope.$index)"
161
+            </el-button>
162
+            <el-button
163
+              icon="el-icon-delete"
164
+              size="small"
165
+              type="danger"
166
+              @click="toDelete(scope.row, scope.$index)"
154
               >删除
167
               >删除
155
-              </el-button>
168
+            </el-button>
156
           </template>
169
           </template>
157
         </el-table-column>
170
         </el-table-column>
158
       </el-table>
171
       </el-table>
159
       <el-pagination
172
       <el-pagination
160
         @size-change="handleSizeChange"
173
         @size-change="handleSizeChange"
161
         @current-change="handleCurrentChange"
174
         @current-change="handleCurrentChange"
162
-        :page-sizes="[10, 50, 100,200,500,1000]"
175
+        :page-sizes="[10, 50, 100, 200, 500, 1000]"
163
         :page-size="10"
176
         :page-size="10"
164
         background
177
         background
165
         align="right"
178
         align="right"
166
-        style="margin-top:20px;"
179
+        style="margin-top: 20px"
167
         layout="total, sizes, prev, pager, next, jumper"
180
         layout="total, sizes, prev, pager, next, jumper"
168
         :total="total"
181
         :total="total"
169
       >
182
       >
170
       </el-pagination>
183
       </el-pagination>
171
-
172
     </div>
184
     </div>
173
   </div>
185
   </div>
174
 </template>
186
 </template>
176
 <script>
188
 <script>
177
 import BreadCrumb from "@/xt_pages/components/bread-crumb";
189
 import BreadCrumb from "@/xt_pages/components/bread-crumb";
178
 
190
 
179
-import {getAllSupply,getAllPurchaseOrderList,deletePurchaseOrder} from "@/api/supply"
180
-import {uParseTime } from '@/utils/tools'
191
+import {
192
+  getAllSupply,
193
+  getAllPurchaseOrderList,
194
+  deletePurchaseOrder,
195
+} from "@/api/supply";
196
+import { uParseTime } from "@/utils/tools";
181
 export default {
197
 export default {
182
   name: "stockIn",
198
   name: "stockIn",
183
-   components: {
184
-     
185
-   },
199
+  components: {},
186
   components: {
200
   components: {
187
-    BreadCrumb
201
+    BreadCrumb,
188
   },
202
   },
189
   data() {
203
   data() {
190
     return {
204
     return {
205
+      isActive: false,
206
+      aa: ["111111", "22222"],
207
+      Color_txt: true,
191
       crumbs: [
208
       crumbs: [
192
         { path: false, name: "采购管理" },
209
         { path: false, name: "采购管理" },
193
-        { path: "/supply/query", name: "采购订单" }
210
+        { path: "/supply/query", name: "采购订单" },
194
       ],
211
       ],
195
       keywords: "",
212
       keywords: "",
196
       total: 0,
213
       total: 0,
197
       multipleSelection: [],
214
       multipleSelection: [],
198
       signAndWeighBoxPatients: "sign-and-weigh-box-patients",
215
       signAndWeighBoxPatients: "sign-and-weigh-box-patients",
199
       start_time: "",
216
       start_time: "",
200
-      end_time:"",
217
+      end_time: "",
201
       page: 1,
218
       page: 1,
202
       limit: 10,
219
       limit: 10,
203
       goodType: [],
220
       goodType: [],
204
       goodInfo: [],
221
       goodInfo: [],
205
-      org_id:0,
206
-      types:[],
207
-      tableList:[{}],
208
-      type_name:"",
209
-      checkList:[
210
-        {id:0,name:"请选择"},
211
-        {id:1,name:"已审核"},
212
-        {id:2,name:"未审核"},
222
+      org_id: 0,
223
+      types: [],
224
+      tableList: [{}],
225
+      type_name: "",
226
+      checkList: [
227
+        { id: 0, name: "请选择" },
228
+        { id: 1, name: "已审核" },
229
+        { id: 2, name: "未审核" },
213
       ],
230
       ],
214
-      supplyList:[],
215
-      check_id:0,
216
-      doctorList:[],
231
+      supplyList: [],
232
+      check_id: 0,
233
+      doctorList: [],
217
     };
234
     };
218
   },
235
   },
219
-  methods:{
220
-     toAdd(){
221
-       this.$router.push({path:"/purchase/order/add"})
222
-     },
223
-     changeTypeName(){
224
-       this.getlist()
225
-     },
226
-     startTimeChange(){
227
-      this.getlist()
228
-     },
229
-     endTimeChange(){
230
-      this.getlist()
231
-     },
232
-     search(){
233
-      this.getlist()
234
-     },
235
-     handleSizeChange(val){
236
-       this.limit = val
237
-       this.getlist()
238
-     },
239
-     handleCurrentChange(val){
240
-       this.page = val
241
-       this.getlist()
242
-     },
243
-     getAllSupply(){
244
-       getAllSupply().then(response=>{
245
-         if(response.data.state == 1){
246
-            var supplyList = response.data.data.supplyList
247
-            this.doctorList = response.data.data.doctorList
248
-            for(let i=0;i<supplyList.length;i++){
249
-              this.supplyList.push(supplyList[i])
250
-            }
251
-         }
252
-       })
253
-     },
254
-     getTimes(time) {
255
-      if (time === '') {
256
-      return ''
236
+  methods: {
237
+    toAdd() {
238
+      this.$router.push({ path: "/purchase/order/add" });
239
+    },
240
+    changeTypeName() {
241
+      this.getlist();
242
+    },
243
+    startTimeChange() {
244
+      this.getlist();
245
+    },
246
+    endTimeChange() {
247
+      this.getlist();
248
+    },
249
+    search() {
250
+      this.getlist();
251
+    },
252
+    handleSizeChange(val) {
253
+      this.limit = val;
254
+      this.getlist();
255
+    },
256
+    handleCurrentChange(val) {
257
+      this.page = val;
258
+      this.getlist();
259
+    },
260
+    getAllSupply() {
261
+      getAllSupply().then((response) => {
262
+        if (response.data.state == 1) {
263
+          var supplyList = response.data.data.supplyList;
264
+          this.doctorList = response.data.data.doctorList;
265
+          for (let i = 0; i < supplyList.length; i++) {
266
+            this.supplyList.push(supplyList[i]);
267
+          }
268
+        }
269
+      });
270
+    },
271
+    getTimes(time) {
272
+      if (time === "") {
273
+        return "";
257
       }
274
       }
258
-      return uParseTime(time, '{y}-{m}-{d}')
259
-     },
260
-     getlist(){
261
-        console.log("hhhhhh",this.end_time)
262
-        var params = {
263
-          check_id:this.check_id,
264
-          start_time:this.start_time,
265
-          end_time:this.end_time,
266
-          keyword:this.keywords,
267
-          page:this.page,
268
-          limit:this.limit,
275
+      return uParseTime(time, "{y}-{m}-{d}");
276
+    },
277
+    getlist() {
278
+      console.log("hhhhhh", this.end_time);
279
+      var params = {
280
+        check_id: this.check_id,
281
+        start_time: this.start_time,
282
+        end_time: this.end_time,
283
+        keyword: this.keywords,
284
+        page: this.page,
285
+        limit: this.limit,
286
+      };
287
+      console.log("params2332232332", params);
288
+      getAllPurchaseOrderList(params).then((response) => {
289
+        if (response.data.state == 1) {
290
+          var list = response.data.data.list;
291
+          this.tableList = list;
292
+          var total = response.data.data.total;
293
+          this.total = total;
269
         }
294
         }
270
-       console.log("params2332232332",params)
271
-       getAllPurchaseOrderList(params).then(response=>{
272
-          if(response.data.state == 1){
273
-            var list = response.data.data.list 
274
-            this.tableList = list
275
-            var total = response.data.data.total
276
-            this.total = total
277
-          }
278
-       })
279
-     },
280
-     getName(id){
281
-       var name = ""
282
-       for(let i=0;i<this.supplyList.length;i++){
283
-         if(id == this.supplyList[i].id){
284
-           name = this.supplyList[i].supplier_name
285
-         }
286
-       }
287
-       return name
288
-     },
289
-     getDocName(id){
290
-      var user_name = ""
291
-      for(let i=0;i<this.doctorList.length;i++){
292
-        if(id == this.doctorList[i].admin_user_id){
293
-          user_name = this.doctorList[i].user_name
295
+      });
296
+    },
297
+    getName(id) {
298
+      var name = "";
299
+      for (let i = 0; i < this.supplyList.length; i++) {
300
+        if (id == this.supplyList[i].id) {
301
+          name = this.supplyList[i].supplier_name;
294
         }
302
         }
295
       }
303
       }
296
-      return user_name
297
-     },
298
-     getAllBuyPrice(arr){
299
-       var buy_price = 0
300
-       if(arr!=undefined && arr.length > 0){
301
-          for(let i=0;i<arr.length;i++){
302
-            buy_price += (arr[i].count * arr[i].price)
303
-          }
304
-       }
305
-       return buy_price.toFixed(2)
306
-     },
307
-     getAllCount(arr){
308
-       var count = 0
309
-        if(arr!=undefined && arr.length > 0){
310
-          for(let i=0;i<arr.length;i++){
311
-            count += parseInt(arr[i].count)
312
-          }
313
-       }
314
-       if(count == 0){
315
-         return ""
316
-       }
317
-       if(count > 0){
318
-         return count
319
-       }
320
-      
321
-     },
322
-     toClick(id){
323
-       this.$router.push({path:"/purchase/order/edit?id="+id})
324
-     },
325
-     toDelete(val,index){
326
-       if(val.is_check == 1){
327
-         this.$message.error("已审核单据,不能删除!")
328
-         return false
329
-       }
330
-       if(val.orderOut.length >0 ){
331
-         this.$message.error("已关联单据,不能删除!")
332
-         return false
333
-       }
334
-       this.$confirm('确认删除吗?', '删除', {
335
-          confirmButtonText: '确 定',
336
-          cancelButtonText: '取 消',
337
-          type: 'warning'
338
-        }).then(() => {
339
-            
340
-          deletePurchaseOrder(val.id).then(response => {
304
+      return name;
305
+    },
306
+    getDocName(id) {
307
+      var user_name = "";
308
+      for (let i = 0; i < this.doctorList.length; i++) {
309
+        if (id == this.doctorList[i].admin_user_id) {
310
+          user_name = this.doctorList[i].user_name;
311
+        }
312
+      }
313
+      return user_name;
314
+    },
315
+    getAllBuyPrice(arr) {
316
+      var buy_price = 0;
317
+      if (arr != undefined && arr.length > 0) {
318
+        for (let i = 0; i < arr.length; i++) {
319
+          buy_price += arr[i].count * arr[i].price;
320
+        }
321
+      }
322
+      return buy_price.toFixed(2);
323
+    },
324
+    getAllCount(arr) {
325
+      var count = 0;
326
+      if (arr != undefined && arr.length > 0) {
327
+        for (let i = 0; i < arr.length; i++) {
328
+          count += parseInt(arr[i].count);
329
+        }
330
+      }
331
+      if (count == 0) {
332
+        return "";
333
+      }
334
+      if (count > 0) {
335
+        return count;
336
+      }
337
+    },
338
+    toClick(id) {
339
+      this.$router.push({ path: "/purchase/order/edit?id=" + id });
340
+    },
341
+    toDelete(val, index) {
342
+      if (val.is_check == 1) {
343
+        this.$message.error("已审核单据,不能删除!");
344
+        return false;
345
+      }
346
+      if (val.orderOut.length > 0) {
347
+        this.$message.error("已关联单据,不能删除!");
348
+        return false;
349
+      }
350
+      this.$confirm("确认删除吗?", "删除", {
351
+        confirmButtonText: "确 定",
352
+        cancelButtonText: "取 消",
353
+        type: "warning",
354
+      })
355
+        .then(() => {
356
+          deletePurchaseOrder(val.id).then((response) => {
341
             if (response.data.state == 1) {
357
             if (response.data.state == 1) {
342
-                var msg = response.data.data.msg
343
-                this.tableList.splice(index, 1);
344
-                this.$message.success("删除成功")
358
+              var msg = response.data.data.msg;
359
+              this.tableList.splice(index, 1);
360
+              this.$message.success("删除成功");
345
             } else {
361
             } else {
346
-                this.$message.error("删除失败")
362
+              this.$message.error("删除失败");
347
             }
363
             }
348
-          })
364
+          });
349
         })
365
         })
350
-        .catch(() => {
351
-        }) 
352
-      }
366
+        .catch(() => {});
367
+    },
368
+    // 动态改变表格样式
369
+    Color_Change() {
370
+      this.Color_txt = true;
371
+      console.log(this.Color_txt, "op");
372
+    },
373
+
374
+    Color_Changeleave() {
375
+      this.Color_txt = false;
376
+      console.log(this.Color_txt, "false");
377
+    },
353
   },
378
   },
354
   created() {
379
   created() {
355
-    var now = new Date(); //当前日期 
356
-    var nowMonth = now.getMonth(); //当前月 
357
-    var nowYear = now.getFullYear(); //当前年 
380
+    var now = new Date(); //当前日期
381
+    var nowMonth = now.getMonth(); //当前月
382
+    var nowYear = now.getFullYear(); //当前年
358
     //本月的开始时间
383
     //本月的开始时间
359
-    var monthStartDate = new Date(nowYear, nowMonth, 1); 
360
-    this.start_time = this.getTimes(monthStartDate) 
361
-    this.end_time = this.getTimes(new Date())
362
-    this.org_id =  this.$store.getters.xt_user.org_id
363
-    this.getAllSupply()
364
-    this.getlist()
384
+    var monthStartDate = new Date(nowYear, nowMonth, 1);
385
+    this.start_time = this.getTimes(monthStartDate);
386
+    this.end_time = this.getTimes(new Date());
387
+    this.org_id = this.$store.getters.xt_user.org_id;
388
+    this.getAllSupply();
389
+    this.getlist();
365
   },
390
   },
366
- 
367
 };
391
 };
368
 </script>
392
 </script>
369
 <style lang="scss">
393
 <style lang="scss">
370
-  .cluster-rs {
394
+.cluster-rs {
395
+  text-align: center;
396
+}
397
+.annotation-rs {
398
+  width: 100%;
399
+  height: 100%;
400
+  border: none;
401
+  td {
402
+    width: 155px;
403
+    padding: 5px;
404
+    border-right: none;
371
     text-align: center;
405
     text-align: center;
406
+    vertical-align: middle;
372
   }
407
   }
373
-  .annotation-rs{
374
-    width: 100%;
375
-    height: 100%;
376
-    border: none;
377
-    td{
378
-      width: 155px;
379
-      padding: 5px;
380
-      border-right: none;
381
-      text-align: center;
382
-      vertical-align: middle;
383
-    }
384
-  }
385
-  tr:last-child{
386
-    td{
387
-      border-bottom: none;
388
-    }
408
+}
409
+tr:last-child {
410
+  td {
411
+    border-bottom: none;
389
   }
412
   }
413
+}
390
 </style>
414
 </style>
391
 
415
 
392
 <style rel="stylesheet/css" lang="scss" scoped>
416
 <style rel="stylesheet/css" lang="scss" scoped>
440
   background-color: #d0d3da;
464
   background-color: #d0d3da;
441
 }
465
 }
442
 
466
 
467
+.color {
468
+  background: none !important;
469
+  display: flex;
470
+  flex-direction: column;
471
+}
443
 </style>
472
 </style>

+ 7 - 0
src/xt_pages/supply/supplyQuery.vue 查看文件

16
           <el-select
16
           <el-select
17
             v-model="type_name"
17
             v-model="type_name"
18
             style="width: 170px; margin-right: 10px"
18
             style="width: 170px; margin-right: 10px"
19
+            clearable
19
             placeholder="请选择供应商类别"
20
             placeholder="请选择供应商类别"
20
             @change="changeTypeName"
21
             @change="changeTypeName"
21
           >
22
           >
230
     },
231
     },
231
 
232
 
232
     toDelete(val, index) {
233
     toDelete(val, index) {
234
+      this.$confirm('确认删除吗?','删除',{
235
+        confirmButtonText: '确 定',
236
+        concelmButtonText: '取 消',
237
+        type: 'warning'
238
+      }).then(() => {
233
       delsupplys(val.ID)
239
       delsupplys(val.ID)
234
         .then((res) => {
240
         .then((res) => {
235
           if (res.data.code == 0) {
241
           if (res.data.code == 0) {
242
         .catch((err) => {
248
         .catch((err) => {
243
           console.log(err);
249
           console.log(err);
244
         });
250
         });
251
+      }).catch(() => {})
245
     },
252
     },
246
 
253
 
247
     toAdd(val) {
254
     toAdd(val) {