Selaa lähdekoodia

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

csx 3 vuotta sitten
vanhempi
commit
d91b8ca17a

+ 53 - 3
src/api/supply.js Näytä tiedosto

160
   })
160
   })
161
 }
161
 }
162
 
162
 
163
-
164
 export function getSupplierId(params) {
163
 export function getSupplierId(params) {
165
   return request({
164
   return request({
166
     url: '/api/supply/getsupplycode',
165
     url: '/api/supply/getsupplycode',
185
   })
184
   })
186
 }
185
 }
187
 
186
 
188
-
189
 export function getexporthistory(params) {
187
 export function getexporthistory(params) {
190
   return request({
188
   return request({
191
     url: '/api/supply/getsupplylist',
189
     url: '/api/supply/getsupplylist',
267
 }
265
 }
268
 
266
 
269
 export function updatesupply(data) {
267
 export function updatesupply(data) {
270
-  console.log(data,'oopo')
268
+  console.log(data, 'oopo')
271
   return request({
269
   return request({
272
     url: '/api/supply/updatesupply',
270
     url: '/api/supply/updatesupply',
273
     method: 'post',
271
     method: 'post',
275
   })
273
   })
276
 }
274
 }
277
 
275
 
276
+export function checkGoodOrderById(id, params) {
277
+  return request({
278
+    url: '/api/supply/checkgoodorderbyid?id=' + id,
279
+    method: 'get',
280
+    params: params
281
+  })
282
+}
278
 
283
 
279
 // export function getsupplytype(params) {
284
 // export function getsupplytype(params) {
280
 //   return request({
285
 //   return request({
284
 //   })
289
 //   })
285
 // }
290
 // }
286
 
291
 
292
+export function checkReturnOrder(params) {
293
+  return request({
294
+    url: '/api/supply/checkreturnorder',
295
+    method: 'Get',
296
+    params: params
297
+  })
298
+}
299
+
300
+export function deletePurchOder(params) {
301
+  return request({
302
+    url: '/api/supply/deletepurchaseorder',
303
+    method: 'get',
304
+    params: params
305
+  })
306
+}
307
+
308
+export function deleteGoodOrderById(params) {
309
+  return request({
310
+    url: '/api/supply/deletegoodorderbyid',
311
+    method: 'get',
312
+    params: params
313
+  })
314
+}
315
+
316
+export function deleteReturnOrder(id, params) {
317
+  return request({
318
+    url: '/api/supply/deletereturnorder?id=' + id,
319
+    method: 'Get',
320
+    params: params
321
+  })
322
+}
287
 
323
 
324
+export function deleteReturnOrderById(id, params) {
325
+  return request({
326
+    url: '/api/supply/deletereturnorderbyid?id=' + id,
327
+    method: 'get',
328
+    params: params
329
+  })
330
+}
288
 
331
 
332
+export function modefyReturnOrder(params) {
333
+  return request({
334
+    url: '/api/supply/modefyreturnorder',
335
+    method: 'get',
336
+    params: params
337
+  })
338
+}

+ 6 - 0
src/views/layout/Layout.vue Näytä tiedosto

16
           <i class="iconfont icon-computer_fill navIcon"></i>
16
           <i class="iconfont icon-computer_fill navIcon"></i>
17
           <p>透析管理</p>
17
           <p>透析管理</p>
18
         </div>
18
         </div>
19
+
20
+
21
+
19
         <!-- <div v-if="caigouShow" :class="index == 5 ? 'navOne navActive' : 'navOne'" @click="clickActive(5,'采购管理')">
22
         <!-- <div v-if="caigouShow" :class="index == 5 ? 'navOne navActive' : 'navOne'" @click="clickActive(5,'采购管理')">
20
           <i class="iconfont icon-kccx navIcon"></i>
23
           <i class="iconfont icon-kccx navIcon"></i>
21
           <p>采购管理</p>
24
           <p>采购管理</p>
22
         </div> -->
25
         </div> -->
26
+
27
+
28
+
23
         <div v-if="kucunShow" :class="index == 3 ? 'navOne navActive' : 'navOne'" @click="clickActive(3,'库房管理')">
29
         <div v-if="kucunShow" :class="index == 3 ? 'navOne navActive' : 'navOne'" @click="clickActive(3,'库房管理')">
24
           <i class="iconfont icon-kccx navIcon"></i>
30
           <i class="iconfont icon-kccx navIcon"></i>
25
           <p>库房管理</p>
31
           <p>库房管理</p>

+ 6 - 5
src/xt_pages/dialysis/template/DialysisPrintOrderSix.vue Näytä tiedosto

76
             </div>
76
             </div>
77
           </div>
77
           </div>
78
         </div>
78
         </div>
79
-        <div class="row">
79
+        <div class="row" v-if="org_id != 10307">
80
           <div class="inline_block">
80
           <div class="inline_block">
81
             入科方式:
81
             入科方式:
82
             <div v-for="(item, index) in way_arr" class="under_line" v-if="receiverTreatmentAccess.way == item.id" style="width: 180px;text-align: left">
82
             <div v-for="(item, index) in way_arr" class="under_line" v-if="receiverTreatmentAccess.way == item.id" style="width: 180px;text-align: left">
776
               </div>
776
               </div>
777
             </div>
777
             </div>
778
           </div>
778
           </div>
779
-          <div class="row" style="margin-bottom:10px;">
779
+          <div class="row" style="margin-bottom:10px;" v-if="org_id != 10307" >
780
             <div class="inline_block">
780
             <div class="inline_block">
781
               入科方式:
781
               入科方式:
782
               <!--<check-box v-for="item, index in nutrition_arr" :key="index" :text="item.name" :checked="receiverTreatmentAccess.nutrition == item.id?true:false"></check-box>-->
782
               <!--<check-box v-for="item, index in nutrition_arr" :key="index" :text="item.name" :checked="receiverTreatmentAccess.nutrition == item.id?true:false"></check-box>-->
817
               <!--平车-->
817
               <!--平车-->
818
               <!--</div>-->
818
               <!--</div>-->
819
             </div>
819
             </div>
820
-            <div class="inline_block" style="margin-left: 10px;">
820
+            <div class="inline_block" style="margin-left: 10px;" >
821
               诊断:
821
               诊断:
822
               <div class="under_line" style="width: 640px;text-align: left;word-break: break-all;word-wrap: break-word;display: inline-block;">
822
               <div class="under_line" style="width: 640px;text-align: left;word-break: break-all;word-wrap: break-word;display: inline-block;">
823
                 {{ patientInfo.diagnose }}
823
                 {{ patientInfo.diagnose }}
888
                 </tr>
888
                 </tr>
889
               </template>
889
               </template>
890
 
890
 
891
-              <tr>
891
+              <tr v-if="org_id != 10307">
892
                 <td colspan="7" style="letter-spacing:5px;text-align:center;font-weight:520;font-size:16px;padding: 6px 8px;line-height: 30px;">
892
                 <td colspan="7" style="letter-spacing:5px;text-align:center;font-weight:520;font-size:16px;padding: 6px 8px;line-height: 30px;">
893
                   透析后情况
893
                   透析后情况
894
                 </td>
894
                 </td>
895
               </tr>
895
               </tr>
896
-              <tr>
896
+              <tr v-if="org_id != 10307">
897
                 <td colspan="7">
897
                 <td colspan="7">
898
                   <div class="row" style="padding: 2px 0;line-height:23px; display:flex;">
898
                   <div class="row" style="padding: 2px 0;line-height:23px; display:flex;">
899
                     <div class="inline_block" style="flex:1;">
899
                     <div class="inline_block" style="flex:1;">
2020
     }
2020
     }
2021
   },
2021
   },
2022
   created() {
2022
   created() {
2023
+    console.log(this.org_id,'opop')
2023
     this.way_arr = getDataConfig('hemodialysis', 'way')
2024
     this.way_arr = getDataConfig('hemodialysis', 'way')
2024
     this.consciousness_arr = getDataConfig('hemodialysis', 'consciousness')
2025
     this.consciousness_arr = getDataConfig('hemodialysis', 'consciousness')
2025
     this.appetite_arr = getDataConfig('hemodialysis', 'appetite')
2026
     this.appetite_arr = getDataConfig('hemodialysis', 'appetite')

+ 126 - 27
src/xt_pages/supply/components/addGoodOrder.vue Näytä tiedosto

71
             v-show="showTwo"
71
             v-show="showTwo"
72
             >保存</el-button
72
             >保存</el-button
73
           >
73
           >
74
-          <el-button size="small" type="primary" @click="checkPurchaseOrder"
75
-            >审核</el-button
76
-          >
74
+          <el-button size="small" type="primary" @click="checkGoodOrder" >审核</el-button>
77
         </div>
75
         </div>
78
       </div>
76
       </div>
79
 
77
 
449
   getPurchaseOrderInfo,
447
   getPurchaseOrderInfo,
450
   addGoodOrder,
448
   addGoodOrder,
451
   updateGoodOrder,
449
   updateGoodOrder,
450
+  checkGoodOrderById,
451
+  getGoodOrderCountList,
452
+  ModefySupplyWarehousing
452
 } from "@/api/supply";
453
 } from "@/api/supply";
453
 export default {
454
 export default {
454
   name: "addPurchaseOrder",
455
   name: "addPurchaseOrder",
527
       showTwo: false,
528
       showTwo: false,
528
       warese_out_id: 0,
529
       warese_out_id: 0,
529
       return_remark: "",
530
       return_remark: "",
531
+      is_warehouse:0
530
     };
532
     };
531
   },
533
   },
532
   methods: {
534
   methods: {
631
                 goodList[i].good_type_id = this.goodTypeList[y].type_name;
633
                 goodList[i].good_type_id = this.goodTypeList[y].type_name;
632
               }
634
               }
633
             }
635
             }
634
-            goodList[i].supply_name =
635
-              goodList[i].good_name +
636
-              " " +
637
-              goodList[i].specification_name +
638
-              " " +
636
+            goodList[i].supply_name =goodList[i].good_name +" " +goodList[i].specification_name + " " +
639
               goodList[i].manufacturer;
637
               goodList[i].manufacturer;
640
             goodList[i].supply_type = goodList[i].good_type_id;
638
             goodList[i].supply_type = goodList[i].good_type_id;
641
             goodList[i].supply_specification_name =
639
             goodList[i].supply_specification_name =
817
     count_arrearage() {
815
     count_arrearage() {
818
       this.payment = this.total_price - this.arrearage;
816
       this.payment = this.total_price - this.arrearage;
819
     },
817
     },
820
-    checkPurchaseOrder(id, index) {
818
+    checkPurchaseOrder() {
821
       this.$confirm("是否审核?", {
819
       this.$confirm("是否审核?", {
822
         confirmButtonText: "确 定",
820
         confirmButtonText: "确 定",
823
         cancelButtonText: "取 消",
821
         cancelButtonText: "取 消",
824
         type: "warning",
822
         type: "warning",
825
-      })
826
-        .then(() => {
823
+      }).then(() => {
827
           checkPurchaseOrder(this.id).then((response) => {
824
           checkPurchaseOrder(this.id).then((response) => {
828
             if (response.data.state == 1) {
825
             if (response.data.state == 1) {
829
               var info = response.data.data.info;
826
               var info = response.data.data.info;
949
             stockIn: this.recordInfo.tableList,
946
             stockIn: this.recordInfo.tableList,
950
             return_remake: this.return_remark,
947
             return_remake: this.return_remark,
951
           };
948
           };
952
-          console.log("stockIN2323322332322323", params);
953
-
954
-          addGoodOrder(
955
-            params,
956
-            this.supplier_name,
957
-            start,
958
-            this.arrearage,
959
-            this.payment,
960
-            warehousing_id,
961
-            this.number,
962
-            this.rate_of_concession,
963
-            this.discount_amount
964
-          ).then((response) => {
949
+          addGoodOrder( params,this.supplier_name,start,this.arrearage,this.payment, warehousing_id,this.number,this.rate_of_concession,this.discount_amount).then((response) => {
965
             if (response.data.state == 1) {
950
             if (response.data.state == 1) {
966
               this.loading = false;
951
               this.loading = false;
967
               this.$message.success("保存成功!");
952
               this.$message.success("保存成功!");
977
               this.arrearage = warehouseOut.arrearage;
962
               this.arrearage = warehouseOut.arrearage;
978
               this.supplier_name = warehouseOut.supplier_id;
963
               this.supplier_name = warehouseOut.supplier_id;
979
               this.return_remake = warehouseOut.return_remake;
964
               this.return_remake = warehouseOut.return_remake;
965
+              this.warehousing_id  = warehouseOut.warehousing_id
980
               this.start_time = this.getTimes(warehouseOut.document_date);
966
               this.start_time = this.getTimes(warehouseOut.document_date);
981
               for (let i = 0; i < orderInfo.length; i++) {
967
               for (let i = 0; i < orderInfo.length; i++) {
982
                 orderInfo[i].supply_count = orderInfo[i].count;
968
                 orderInfo[i].supply_count = orderInfo[i].count;
1042
         this.loading = false;
1028
         this.loading = false;
1043
         return false;
1029
         return false;
1044
       }
1030
       }
1045
-      console.log("表哥2323233232", this.recordInfo.tableList);
1046
       for (let i = 0; i < this.recordInfo.tableList.length; i++) {
1031
       for (let i = 0; i < this.recordInfo.tableList.length; i++) {
1047
         this.recordInfo.tableList[i].supply_count = parseInt(
1032
         this.recordInfo.tableList[i].supply_count = parseInt(
1048
           this.recordInfo.tableList[i].supply_count
1033
           this.recordInfo.tableList[i].supply_count
1080
             stockIn: this.recordInfo.tableList,
1065
             stockIn: this.recordInfo.tableList,
1081
             return_remake: this.return_remake,
1066
             return_remake: this.return_remake,
1082
           };
1067
           };
1083
-          console.log("sotckind23232232323232323232", params);
1084
-
1068
+         
1085
           updateGoodOrder(
1069
           updateGoodOrder(
1086
             params,
1070
             params,
1087
             this.supplier_name,
1071
             this.supplier_name,
1102
         }
1086
         }
1103
       });
1087
       });
1104
     },
1088
     },
1089
+    checkGoodOrder() {
1090
+      var id = this.warese_out_id;
1091
+      var warehousing_id = this.warehousing_id;
1092
+      console.log("hhh2323232323232323",id,warehousing_id)
1093
+      getGoodOrderCountList(id, warehousing_id).then((response) => {
1094
+        if (response.data.state == 1) {
1095
+          this.$message.success("审核成功!");
1096
+          this.is_check = 1
1097
+          this.showOne = false;
1098
+          this.showTwo = true;
1099
+          this.showThree = true;
1100
+          var purcaseOrder = response.data.data.purcaseOrder;
1101
+          console.log("采购订单", purcaseOrder);
1102
+
1103
+          var goodOrder = response.data.data.goodOrder;
1104
+          console.log("采购单", goodOrder);
1105
+          var drugList = response.data.data.drugList;
1106
+          console.log("druglist23323223", drugList);
1107
+          var is_warehouse = 0;
1108
+          for (let i = 0; i < purcaseOrder.length; i++) {
1109
+            for (let j = 0; j < drugList.length; j++) {
1110
+              if (purcaseOrder[i].is_source == 1) {
1111
+                if (purcaseOrder[i].supply_unit == drugList[j].max_unit) {
1112
+                  purcaseOrder[i].count =
1113
+                    purcaseOrder[i].count * drugList[j].min_number;
1114
+                }
1115
+              }
1116
+            }
1117
+          }
1118
+
1119
+          for (let i = 0; i < goodOrder.length; i++) {
1120
+            for (let j = 0; j < drugList.length; j++) {
1121
+              if (goodOrder[i].is_source == 1) {
1122
+                if (goodOrder[i].supply_unit == drugList[j].max_unit) {
1123
+                  goodOrder[i].count =
1124
+                    goodOrder[i].count * drugList[j].min_number;
1125
+                }
1126
+              }
1127
+            }
1128
+          }
1129
+
1130
+          let objInfo = {};
1131
+          if (goodOrder.length > 0) {
1132
+            goodOrder.forEach((item, index) => {
1133
+              let { project_id } = item;
1134
+              if (!objInfo[project_id]) {
1135
+                objInfo[project_id] = {
1136
+                  project_id,
1137
+                  child: [],
1138
+                  count: 0,
1139
+                };
1140
+              }
1141
+            });
1142
+            let newArr = Object.values(objInfo);
1143
+
1144
+            for (let i = 0; i < goodOrder.length; i++) {
1145
+              for (let j = 0; j < newArr.length; j++) {
1146
+                if (goodOrder[i].project_id == newArr[j].project_id) {
1147
+                  newArr[j].child.push(goodOrder[i]);
1148
+                }
1149
+              }
1150
+            }
1151
+            console.log("newAr2332232323", newArr);
1152
+
1153
+            for (let i = 0; i < newArr.length; i++) {
1154
+              for (let j = 0; j < newArr[i].child.length; j++) {
1155
+                newArr[i].count += newArr[i].child[j].count;
1156
+              }
1157
+            }
1158
+
1159
+            var arr = [];
1160
+            var total = 0;
1161
+            var str = "";
1162
+
1163
+            //如果采购单有数据,则需要比较数量
1164
+            if (newArr.length > 0) {
1165
+              for (let i = 0; i < purcaseOrder.length; i++) {
1166
+                for (let j = 0; j < newArr.length; j++) {
1167
+                  if (purcaseOrder[i].project_id == newArr[j].project_id) {
1168
+                    //根据商品ID比较数量大小,把数量不足的商品ID储存,表示采购单的数量未满足采购订单的数据,部分入库
1169
+                    if (purcaseOrder[i].count > newArr[j].count) {
1170
+                      arr.push(purcaseOrder[i].project_id);
1171
+                    }
1172
+                  }
1173
+                }
1174
+              }
1175
+              //如果total的长度等于 采购单的长度,怎表示该采购订单已经全部生成,全部入库
1176
+
1177
+              if (arr.length == 0) {
1178
+                this.is_warehouse = 1;
1179
+                this.ModefySupplyWarehousing(is_warehouse, warehousing_id);
1180
+              }
1181
+
1182
+              //部分入库
1183
+              if (total != goodOrder.length) {
1184
+                //修改订购单
1185
+                this.is_warehouse = 3;
1186
+                this.ModefySupplyWarehousing(is_warehouse, warehousing_id);
1187
+              }
1188
+            }
1189
+          }
1190
+        }
1191
+      });
1192
+    },
1193
+    ModefySupplyWarehousing(is_warehouse, warehousing_id) {
1194
+      var params = {
1195
+        is_warehouse: this.is_warehouse,
1196
+        warehousing_id: this.warehousing_id,
1197
+      };
1198
+      ModefySupplyWarehousing(params).then((response) => {
1199
+        if (response.data.state == 1) {
1200
+          var msg = response.data.data.msg;
1201
+        }
1202
+      });
1203
+    },
1105
   },
1204
   },
1106
   created() {
1205
   created() {
1107
     const tempObj = {};
1206
     const tempObj = {};

+ 96 - 88
src/xt_pages/supply/components/addGoodReturn.vue Näytä tiedosto

40
             align="right"
40
             align="right"
41
             format="yyyy-MM-dd"
41
             format="yyyy-MM-dd"
42
             value-format="yyyy-MM-dd"
42
             value-format="yyyy-MM-dd"
43
-            @change="startTimeChange"
44
           ></el-date-picker>
43
           ></el-date-picker>
45
-          <!-- <span>交货日期:</span>
46
-        <el-date-picker
47
-            size="small"
48
-            v-model="end_time"
49
-            prefix-icon="el-icon-date"
50
-            :editable="false"
51
-            style="width: 196px;"
52
-            type="date"
53
-            placeholder="选择日期时间"
54
-            align="right"
55
-            format="yyyy-MM-dd"
56
-            value-format="yyyy-MM-dd"
57
-            @change="endTimeChange"
58
-        ></el-date-picker> -->
44
+         
59
           <span>单据编码:{{ number }}</span>
45
           <span>单据编码:{{ number }}</span>
60
         </div>
46
         </div>
61
         <div>
47
         <div>
69
           <el-button
55
           <el-button
70
             size="small"
56
             size="small"
71
             type="primary"
57
             type="primary"
72
-            @click=""
58
+            @click="updateGoodReturn"
73
             v-show="showTwo"
59
             v-show="showTwo"
74
             >保存</el-button
60
             >保存</el-button
75
           >
61
           >
76
-          <el-button size="small" type="primary" @click="updatePurchaseOrder">审核</el-button>
62
+          <el-button size="small" type="primary" @click="checkReturnOrder">审核</el-button>
77
           <!-- <el-button size="small" type="primary" @click="toPrint">打印</el-button>
63
           <!-- <el-button size="small" type="primary" @click="toPrint">打印</el-button>
78
         <el-button size="small" type="primary" v-if="is_check == 2" @click="checkPurchaseOrder">审核</el-button>
64
         <el-button size="small" type="primary" v-if="is_check == 2" @click="checkPurchaseOrder">审核</el-button>
79
         <el-button size="small" type="primary" v-if="is_check == 1" @click="checkPurchaseOrder">反审核</el-button> -->
65
         <el-button size="small" type="primary" v-if="is_check == 1" @click="checkPurchaseOrder">反审核</el-button> -->
133
                 :disabled="true"
119
                 :disabled="true"
134
                 placeholder="商品类别"
120
                 placeholder="商品类别"
135
               ></el-input>
121
               ></el-input>
122
+               <div style="visibility: hidden">/</div>
136
             </template>
123
             </template>
137
           </el-table-column>
124
           </el-table-column>
138
           <el-table-column label="规格&单位" align="center" width="200px">
125
           <el-table-column label="规格&单位" align="center" width="200px">
143
                 :disabled="true"
130
                 :disabled="true"
144
                 placeholder="规格&单位"
131
                 placeholder="规格&单位"
145
               ></el-input>
132
               ></el-input>
133
+               <div style="visibility: hidden">/</div>
146
             </template>
134
             </template>
147
           </el-table-column>
135
           </el-table-column>
148
 
136
 
162
                   placeholder="请选择"
150
                   placeholder="请选择"
163
                   :disabled="disabled"
151
                   :disabled="disabled"
164
                 >
152
                 >
165
-                  <!-- <el-option
166
-                            v-for="(item,index) in scope.row.unitList"
167
-                            :key="index"
168
-                            :label="item.name"
169
-                            :value="item.name">
170
-                        </el-option> -->
153
+                  <el-option
154
+                    v-for="(item,index) in scope.row.unitList"
155
+                    :key="index"
156
+                    :label="item.name"
157
+                    :value="item.name">
158
+                   </el-option>
171
                 </el-select>
159
                 </el-select>
172
               </el-form-item>
160
               </el-form-item>
173
             </template>
161
             </template>
179
                 style="width: 100px"
167
                 style="width: 100px"
180
                 :disabled="true"
168
                 :disabled="true"
181
               ></el-input>
169
               ></el-input>
170
+               <div style="visibility: hidden">/</div>
182
             </template>
171
             </template>
183
           </el-table-column>
172
           </el-table-column>
184
           <el-table-column label="可退数量" align="center" width="200px">
173
           <el-table-column label="可退数量" align="center" width="200px">
185
             <template slot-scope="scope">
174
             <template slot-scope="scope">
186
               <el-input
175
               <el-input
187
-                v-model="scope.row.supply_specification_name"
176
+                v-model="scope.row.count"
188
                 style="width: 150px"
177
                 style="width: 150px"
189
                 :disabled="true"
178
                 :disabled="true"
190
                 placeholder="可退数量"
179
                 placeholder="可退数量"
191
               ></el-input>
180
               ></el-input>
181
+               <div style="visibility: hidden">/</div>
192
             </template>
182
             </template>
193
           </el-table-column>
183
           </el-table-column>
194
           <el-table-column label="数量" align="center" width="120px">
184
           <el-table-column label="数量" align="center" width="120px">
217
                 :disabled="disabled"
207
                 :disabled="disabled"
218
                 placeholder="请输入采购单价"
208
                 placeholder="请输入采购单价"
219
               ></el-input>
209
               ></el-input>
210
+               <div style="visibility: hidden">/</div>
220
             </template>
211
             </template>
221
           </el-table-column>
212
           </el-table-column>
222
 
213
 
244
                 style="width: 160px"
235
                 style="width: 160px"
245
                 :disabled="true"
236
                 :disabled="true"
246
               ></el-input>
237
               ></el-input>
238
+               <div style="visibility: hidden">/</div>
247
             </template>
239
             </template>
248
           </el-table-column>
240
           </el-table-column>
249
 
241
 
254
                 style="width: 160px"
246
                 style="width: 160px"
255
                 :disabled="true"
247
                 :disabled="true"
256
               ></el-input>
248
               ></el-input>
249
+               <div style="visibility: hidden">/</div>
257
             </template>
250
             </template>
258
           </el-table-column>
251
           </el-table-column>
259
 
252
 
260
-          <el-table-column label="源购订单号" align="center" width="200px">
253
+          <el-table-column label="源购订单号" align="center" width="200px">
261
             <template slot-scope="scope">
254
             <template slot-scope="scope">
262
               <el-input
255
               <el-input
263
                 v-model="scope.row.good_number"
256
                 v-model="scope.row.good_number"
264
                 style="width: 160px"
257
                 style="width: 160px"
265
                 :disabled="true"
258
                 :disabled="true"
266
               ></el-input>
259
               ></el-input>
260
+               <div style="visibility: hidden">/</div>
267
             </template>
261
             </template>
268
           </el-table-column>
262
           </el-table-column>
269
 
263
 
275
                 :disabled="disabled"
269
                 :disabled="disabled"
276
                 placeholder="请输入备注"
270
                 placeholder="请输入备注"
277
               ></el-input>
271
               ></el-input>
272
+               <div style="visibility: hidden">/</div>
278
             </template>
273
             </template>
279
           </el-table-column>
274
           </el-table-column>
280
 
275
 
376
   getInitOrder,
371
   getInitOrder,
377
   getGoodOrderDetail,
372
   getGoodOrderDetail,
378
   saveGoodReturnOrder,
373
   saveGoodReturnOrder,
374
+  checkReturnOrder,
375
+  updateGoodReturn
379
 } from "@/api/supply";
376
 } from "@/api/supply";
380
 export default {
377
 export default {
381
   name: "addPurchaseOrder",
378
   name: "addPurchaseOrder",
386
     return {
383
     return {
387
       tipsInfo: "",
384
       tipsInfo: "",
388
       crumbs: [
385
       crumbs: [
389
-        { path: false, name: "货单" },
386
+        { path: false, name: "退货单" },
390
         { path: "/good/return/add", name: "新增退货单" },
387
         { path: "/good/return/add", name: "新增退货单" },
391
       ],
388
       ],
392
       showTwo: false,
389
       showTwo: false,
435
       is_check: 0,
432
       is_check: 0,
436
       dialogVisible: false,
433
       dialogVisible: false,
437
       return_remark: "",
434
       return_remark: "",
435
+      warehouse_out_id:0,
438
     };
436
     };
439
   },
437
   },
440
   methods: {
438
   methods: {
603
       tempObj["supply_type"] = "";
601
       tempObj["supply_type"] = "";
604
       tempObj["supply_specification_name"] = "";
602
       tempObj["supply_specification_name"] = "";
605
       tempObj["supply_total"] = "";
603
       tempObj["supply_total"] = "";
604
+      tempObj["count"] = "";
606
       tempObj["supply_count"] = "";
605
       tempObj["supply_count"] = "";
607
       tempObj["supply_price"] = "";
606
       tempObj["supply_price"] = "";
608
       tempObj["supply_total_price"] = "";
607
       tempObj["supply_total_price"] = "";
614
       tempObj["project_id"] = 0;
613
       tempObj["project_id"] = 0;
615
       tempObj["supply_unit"] = "";
614
       tempObj["supply_unit"] = "";
616
       tempObj["order_number"] = ""
615
       tempObj["order_number"] = ""
616
+      tempObj["supply_batch_number"] = ""
617
+      tempObj["supply_product_date"] = ""
618
+      tempObj["supply_expiry_date"] = ""
619
+      tempObj["warehousing_id"] =0
620
+      tempObj["warehouse_info_id"] =0
617
       this.recordInfo.tableList.push(tempObj);
621
       this.recordInfo.tableList.push(tempObj);
618
     },
622
     },
619
     handleDelete: function (index, row) {
623
     handleDelete: function (index, row) {
624
         this.recordInfo.tableList.splice(index, 1);
628
         this.recordInfo.tableList.splice(index, 1);
625
       }
629
       }
626
     },
630
     },
627
-
628
-    changeTypeName() {},
629
-    startTimeChange() {},
630
-    endTimeChange() {},
631
-    search() {},
632
-
633
     getWarehoseInfo(arr, max_unit, min_unit, min_number) {
631
     getWarehoseInfo(arr, max_unit, min_unit, min_number) {
634
       var total = 0;
632
       var total = 0;
635
       var max_str = "";
633
       var max_str = "";
678
       }
676
       }
679
       return uParseTime(time, "{y}-{m}-{d}");
677
       return uParseTime(time, "{y}-{m}-{d}");
680
     },
678
     },
681
-    updatePurchaseOrder() {
682
-      this.loading = true;
683
-      if (this.supplier_name == 0 || this.supplier_name == "") {
684
-        this.$message.error("供应商不能为空!");
685
-        this.loading = false;
686
-        return false;
687
-      }
688
-      this.$refs["tableForm"].validate((valid) => {
689
-        if (valid) {
690
-          for (let i = 0; i < this.recordInfo.tableList.length; i++) {
691
-            this.recordInfo.tableList[i].supply_count = parseInt(this.recordInfo.tableList[i].supply_count);
692
-            this.recordInfo.tableList[i].supply_license_number =this.recordInfo.tableList[i].supply_license_number.toString();
693
-            this.recordInfo.tableList[i].supply_total_price = (this.recordInfo.tableList[i].supply_count *this.recordInfo.tableList[i].supply_price).toString();
694
-            this.recordInfo.tableList[i].supply_total = this.recordInfo.tableList[i].supply_total.toString();
695
-            this.recordInfo.tableList[i].supply_price =this.recordInfo.tableList[i].supply_price.toString();
696
-            for (let j = 0; j < this.manufactuerList.length; j++) {
697
-              if (this.recordInfo.tableList[i].supply_manufacturer ==this.manufactuerList[j].manufacturer_name) {
698
-                this.recordInfo.tableList[i].manufacturer_id =this.manufactuerList[j].id;
699
-              }
700
-            }
701
-          }
702
-          var start = this.getTimes(this.start_time);
703
-          var end = this.getTimes(this.end_time);
704
-          const params = {
705
-            stockIn: this.recordInfo.tableList,
706
-          };
707
-          console.log("param23232332", params);
708
-
709
-          updatePurchaseOrder(
710
-            params,
711
-            this.supplier_name,
712
-            start,
713
-            end,
714
-            this.rate_of_concession,
715
-            this.discount_amount,
716
-            this.id,
717
-            this.number
718
-          ).then((response) => {
719
-            if (response.data.state == 1) {
720
-              this.loading = false;
721
-              var warehousingInfo = response.data.data.warehousingInfo;
722
-              this.$message.success("保存成功!");
723
-            }
724
-          });
725
-        }
726
-      });
727
-    },
679
+   
728
     getAllPrice() {
680
     getAllPrice() {
729
       var total_price = 0;
681
       var total_price = 0;
730
       for (let i = 0; i < this.recordInfo.tableList.length; i++) {
682
       for (let i = 0; i < this.recordInfo.tableList.length; i++) {
795
           var goodList = response.data.data.goodList;
747
           var goodList = response.data.data.goodList;
796
           for (let i = 0; i < orderInfo.length; i++) {
748
           for (let i = 0; i < orderInfo.length; i++) {
797
             orderInfo[i].supply_count = orderInfo[i].count;
749
             orderInfo[i].supply_count = orderInfo[i].count;
750
+            orderInfo[i].count = orderInfo[i].count
798
             orderInfo[i].supply_price = orderInfo[i].price;
751
             orderInfo[i].supply_price = orderInfo[i].price;
799
             orderInfo[i].supply_remake = orderInfo[i].remark;
752
             orderInfo[i].supply_remake = orderInfo[i].remark;
800
             orderInfo[i].type = orderInfo[i].is_source;
753
             orderInfo[i].type = orderInfo[i].is_source;
802
             orderInfo[i].supply_unit = orderInfo[i].supply_unit;
755
             orderInfo[i].supply_unit = orderInfo[i].supply_unit;
803
             orderInfo[i].order_number = orderInfo[i].order_number;
756
             orderInfo[i].order_number = orderInfo[i].order_number;
804
             orderInfo[i].good_number = orderInfo[i].good_number;
757
             orderInfo[i].good_number = orderInfo[i].good_number;
805
-            orderInfo[i].supply_total_price = (
806
-              orderInfo[i].count * orderInfo[i].price
807
-            ).toFixed(2);
808
-            orderInfo[i].supply_expiry_date = this.getTimes(
809
-              orderInfo[i].supply_expiry_date
810
-            );
811
-            orderInfo[i].supply_product_date = this.getTimes(
812
-              orderInfo[i].supply_product_date
813
-            );
758
+            orderInfo[i].supply_total_price = ( orderInfo[i].count * orderInfo[i].price).toFixed(2);
759
+            orderInfo[i].supply_expiry_date = orderInfo[i].supply_expiry_date;
760
+            orderInfo[i].supply_product_date = orderInfo[i].supply_product_date;
761
+            orderInfo[i].supply_batch_number = orderInfo[i].supply_batch_number
762
+            orderInfo[i].warehousing_id = orderInfo[i].warehousing_id
763
+            orderInfo[i].warehouse_info_id = orderInfo[i].warehouse_info_id
814
             if (orderInfo[i].is_source == 1) {
764
             if (orderInfo[i].is_source == 1) {
815
               for (let j = 0; j < drugList.length; j++) {
765
               for (let j = 0; j < drugList.length; j++) {
816
                 if (orderInfo[i].project_id == drugList[j].id) {
766
                 if (orderInfo[i].project_id == drugList[j].id) {
865
                 this.recordInfo.tableList[i].supply_manufacturer = this.manufactuerList[j].manufacturer_name;
815
                 this.recordInfo.tableList[i].supply_manufacturer = this.manufactuerList[j].manufacturer_name;
866
               }
816
               }
867
             }
817
             }
818
+          } 
868
            var params = {
819
            var params = {
869
             stockIn:this.recordInfo.tableList,
820
             stockIn:this.recordInfo.tableList,
870
             return_marke:this.return_remark,
821
             return_marke:this.return_remark,
880
                 var warehouseCancel = response.data.data.warehouseCancel
831
                 var warehouseCancel = response.data.data.warehouseCancel
881
                 var out = response.data.data.cancelOrder
832
                 var out = response.data.data.cancelOrder
882
                 this.id = out.id
833
                 this.id = out.id
834
+                this.warehouse_out_id = out.warehouse_out_id
883
                 this.supplier_name = out.supplier_id
835
                 this.supplier_name = out.supplier_id
884
                 this.rate_of_concession = out.rate_of_concession
836
                 this.rate_of_concession = out.rate_of_concession
885
                 this.discount_amount = out.discount_amount
837
                 this.discount_amount = out.discount_amount
929
                 }
881
                 }
930
              }
882
              }
931
            })
883
            })
884
+          
885
+        }
886
+      })
887
+    },
888
+    updateGoodReturn(){
889
+      var warehouse_out_id = this.id;
890
+      this.$refs["tableForm"].validate((valid)=>{
891
+        if(valid){
892
+          this.loading = true
893
+          for(let i=0;i<this.recordInfo.tableList.length;i++){
894
+            this.recordInfo.tableList[i].supply_count = parseInt(this.recordInfo.tableList[i].supply_count)
895
+            this.recordInfo.tableList[i].supply_price = this.recordInfo.tableList[i].supply_price.toString()
896
+            this.recordInfo.tableList[i].supply_total = this.recordInfo.tableList[i].supply_total.toString()
897
+            
898
+            for(let j=0;j<this.manufactuerList.length;j++){
899
+                if(this.recordInfo.tableList[i].supply_manufacturer == this.manufactuerList[j].manufacturer_name){
900
+                  this.recordInfo.tableList[i].manufacturer_id = this.manufactuerList[j].id
901
+                }
902
+                if(this.recordInfo.tableList[i].supply_manufacturer == this.manufactuerList[j].id){
903
+                  this.recordInfo.tableList[i].supply_manufacturer = this.manufactuerList[j].manufacturer_name
904
+                }
905
+
906
+            }
932
           }
907
           }
908
+          var params = {
909
+            stockIn:this.recordInfo.tableList,
910
+            return_marke:this.return_remark,
911
+          }
912
+          console.log("start_time232233232",this.start_time)
913
+          console.log("arrage2323322323",params)
914
+          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=>{
915
+            if(response.data.state == 1){
916
+               var msg = response.data.msg
917
+               this.loading = false
918
+               this.$message.success("保存成功!")
919
+            }
920
+          })
933
         }
921
         }
934
       })
922
       })
923
+    },
924
+    checkReturnOrder(){
925
+      this.loading = true
926
+     var params = {
927
+       warehouse_out_id:this.warehouse_out_id,
928
+       id:this.id,
929
+     }
930
+     checkReturnOrder(params).then(response=>{
931
+       if(response.data.state == 1){
932
+        this.loading = false
933
+        var msg = response.data.data.msg
934
+        this.$message.success("保存成功!")
935
+       }
936
+     })
935
     }
937
     }
936
    
938
    
937
   },
939
   },
954
     tempObj["project_id"] = 0;
956
     tempObj["project_id"] = 0;
955
     tempObj["supply_unit"] = "";
957
     tempObj["supply_unit"] = "";
956
     tempObj["order_number"] = ""
958
     tempObj["order_number"] = ""
959
+    tempObj["supply_batch_number"] = ""
960
+    tempObj["supply_product_date"] = ""
961
+    tempObj["supply_expiry_date"] = ""
962
+    tempObj["warehousing_id"] =0
963
+    tempObj["warehouse_info_id"] =0
964
+    tempObj["count"] = "";
957
     this.recordInfo.tableList.push(tempObj);
965
     this.recordInfo.tableList.push(tempObj);
958
     console.log("即哪里地方2",this.recordInfo.tableList)
966
     console.log("即哪里地方2",this.recordInfo.tableList)
959
     this.getInitOrder();
967
     this.getInitOrder();

+ 5 - 5
src/xt_pages/supply/components/addPurchaseOrder.vue Näytä tiedosto

211
             </template>
211
             </template>
212
           </el-table-column>
212
           </el-table-column>
213
 
213
 
214
-          <el-table-column label="购单价" align="center" width="140px">
214
+          <el-table-column label="购单价" align="center" width="140px">
215
             <template slot-scope="scope">
215
             <template slot-scope="scope">
216
               <el-input
216
               <el-input
217
                 v-model="scope.row.supply_price"
217
                 v-model="scope.row.supply_price"
218
                 style="width: 80px"
218
                 style="width: 80px"
219
                 :disabled="disabled"
219
                 :disabled="disabled"
220
-                 placeholder="请输入购单价"
220
+                 placeholder="请输入购单价"
221
               ></el-input>
221
               ></el-input>
222
               <div style="visibility: hidden">/</div>
222
               <div style="visibility: hidden">/</div>
223
             </template>
223
             </template>
224
           </el-table-column>
224
           </el-table-column>
225
 
225
 
226
-          <el-table-column label="购金额" align="center" width="120px">
226
+          <el-table-column label="购金额" align="center" width="120px">
227
             <template slot-scope="scope">
227
             <template slot-scope="scope">
228
               {{ calculate(scope.row.supply_count * scope.row.supply_price) }}
228
               {{ calculate(scope.row.supply_count * scope.row.supply_price) }}
229
             </template>
229
             </template>
369
     return {
369
     return {
370
       Reviewed:false,
370
       Reviewed:false,
371
       crumbs: [
371
       crumbs: [
372
-        { path: false, name: "购订单" },
373
-        { path: "/spply/query", name: "新增购订单" },
372
+        { path: false, name: "购订单" },
373
+        { path: "/spply/query", name: "新增购订单" },
374
       ],
374
       ],
375
       showTwo: true,
375
       showTwo: true,
376
       showOne: false,
376
       showOne: false,

+ 52 - 59
src/xt_pages/supply/components/addSupply.vue Näytä tiedosto

11
         ref="supplier"
11
         ref="supplier"
12
       >
12
       >
13
         <el-row>
13
         <el-row>
14
-          <el-col span="6">
14
+          <el-col :span="6">
15
             <el-form-item label="供应商编码" prop="supplierCode">
15
             <el-form-item label="供应商编码" prop="supplierCode">
16
               <el-input v-model="supplier.supplierCode"></el-input>
16
               <el-input v-model="supplier.supplierCode"></el-input>
17
             </el-form-item>
17
             </el-form-item>
18
           </el-col>
18
           </el-col>
19
-          <el-col span="6">
19
+          <el-col :span="6">
20
             <el-form-item label="供应商名称" prop="supplierName">
20
             <el-form-item label="供应商名称" prop="supplierName">
21
               <el-input v-model="supplier.supplierName"></el-input>
21
               <el-input v-model="supplier.supplierName"></el-input>
22
             </el-form-item>
22
             </el-form-item>
23
           </el-col>
23
           </el-col>
24
         </el-row>
24
         </el-row>
25
         <el-row>
25
         <el-row>
26
-          <el-col span="6">
26
+          <el-col :span="6">
27
             <el-form-item label="供应商类别" prop="supplierType">
27
             <el-form-item label="供应商类别" prop="supplierType">
28
               <!-- <el-input v-model="supplier.type"></el-input> -->
28
               <!-- <el-input v-model="supplier.type"></el-input> -->
29
-              <el-autocomplete
29
+              <!-- <el-autocomplete
30
                 v-model="supplier.supplierType"
30
                 v-model="supplier.supplierType"
31
                 :fetch-suggestions="querySearchAsync"
31
                 :fetch-suggestions="querySearchAsync"
32
                 @select="handleSelect"
32
                 @select="handleSelect"
33
-              ></el-autocomplete>
33
+              ></el-autocomplete> -->
34
+
35
+              <el-select v-model="supplier.supplierType" @select="handleSelect">
36
+                <el-option
37
+                  v-for="item in supplierType"
38
+                  :key="item.value"
39
+                  :label="item.label"
40
+                  :value="item.value"
41
+                >
42
+                </el-option>
43
+              </el-select>
34
             </el-form-item>
44
             </el-form-item>
35
           </el-col>
45
           </el-col>
36
-          <el-col span="6">
46
+          <el-col :span="6">
37
             <el-form-item label="增值税税率" prop="vatRate">
47
             <el-form-item label="增值税税率" prop="vatRate">
38
               <el-input
48
               <el-input
39
                 v-model="supplier.vatRate"
49
                 v-model="supplier.vatRate"
40
                 @keyup.native="supplier.vatRate = oninput(supplier.vatRate)"
50
                 @keyup.native="supplier.vatRate = oninput(supplier.vatRate)"
41
-              ></el-input>
51
+              ></el-input>%
42
             </el-form-item>
52
             </el-form-item>
43
           </el-col>
53
           </el-col>
44
         </el-row>
54
         </el-row>
45
         <el-row>
55
         <el-row>
46
-          <el-col span="6">
56
+          <el-col :span="6">
47
             <el-form-item label="纳税人识别号" prop="number">
57
             <el-form-item label="纳税人识别号" prop="number">
48
               <el-input v-model="supplier.number"></el-input>
58
               <el-input v-model="supplier.number"></el-input>
49
             </el-form-item>
59
             </el-form-item>
50
           </el-col>
60
           </el-col>
51
-          <el-col span="6">
61
+          <el-col :span="6">
52
             <el-form-item label="开户银行" prop="bank">
62
             <el-form-item label="开户银行" prop="bank">
53
               <el-input v-model="supplier.bank"></el-input>
63
               <el-input v-model="supplier.bank"></el-input>
54
             </el-form-item>
64
             </el-form-item>
55
           </el-col>
65
           </el-col>
56
         </el-row>
66
         </el-row>
57
         <el-row>
67
         <el-row>
58
-          <el-col span="6">
68
+          <el-col :span="6">
59
             <el-form-item label="银行账号" prop="bankAccount">
69
             <el-form-item label="银行账号" prop="bankAccount">
60
               <el-input v-model="supplier.bankAccount"></el-input>
70
               <el-input v-model="supplier.bankAccount"></el-input>
61
             </el-form-item>
71
             </el-form-item>
91
                         {
101
                         {
92
                           required: 'true',
102
                           required: 'true',
93
                           message: '请输入主要联系人',
103
                           message: '请输入主要联系人',
94
-                          trigger: ['blur', 'change'],
104
+                          trigger: ['blur'],
95
                         },
105
                         },
96
                       ]
106
                       ]
97
                     : null
107
                     : null
227
       supplier_ids: "",
237
       supplier_ids: "",
228
       title: "",
238
       title: "",
229
       Template,
239
       Template,
240
+      supplierType: [],
230
       signAndWeighBoxPatients: "sign-and-weigh-box-patients",
241
       signAndWeighBoxPatients: "sign-and-weigh-box-patients",
231
       list: ["001", "002"],
242
       list: ["001", "002"],
232
       // 表单验证规则
243
       // 表单验证规则
297
         this.initSupplierData();
308
         this.initSupplierData();
298
         this.show_type = 1;
309
         this.show_type = 1;
299
         this.title = "新增供应商";
310
         this.title = "新增供应商";
311
+        this.getsupplytype();
300
         this.dialogVisible = true;
312
         this.dialogVisible = true;
301
       } else if (type == 2) {
313
       } else if (type == 2) {
314
+        this.getsupplytype();
302
         // console.log(data,'oop')
315
         // console.log(data,'oop')
303
         this.show_type = 2;
316
         this.show_type = 2;
304
         this.supplier_ids = data.ID;
317
         this.supplier_ids = data.ID;
306
         this.supplier.supplierCode = data.SupplierCode;
319
         this.supplier.supplierCode = data.SupplierCode;
307
         this.supplier.supplierName = data.SupplierName;
320
         this.supplier.supplierName = data.SupplierName;
308
         this.supplier.supplierType = data.SupplierType;
321
         this.supplier.supplierType = data.SupplierType;
322
+
309
         this.supplier.vatRate = data.VatRate;
323
         this.supplier.vatRate = data.VatRate;
310
         this.supplier.number = data.Number;
324
         this.supplier.number = data.Number;
311
         this.supplier.bank = data.Bank;
325
         this.supplier.bank = data.Bank;
363
       });
377
       });
364
     },
378
     },
365
 
379
 
366
-    querySearchAsync(queryString, cb) {
367
-      clearTimeout(this.timeout);
368
-      var results = [];
369
-      if (queryString == "") {
370
-        cb(results);
371
-      } else {
372
-        // 获取供应商类别接口
373
-        getsupplytype()
374
-          .then((res) => {
375
-            if (res.status == 200) {
376
-              var result = res.data.data.list;
377
-              //远程搜索需要的数组
378
-              for (let i = 0; i < result.length; i++) {
379
-                const element = result[i];
380
-                results.push({
381
-                  value: element.name,
382
-                  name: element.value,
383
-                });
384
-              }
385
-              cb(results);
386
-            } else {
387
-              results = [];
388
-              cb(results);
389
-            }
390
-          })
391
-          .catch((err) => {
392
-            console.log(err);
393
-          });
394
-      }
380
+    getsupplytype() {
381
+      // 获取供应商类别接口
382
+      getsupplytype()
383
+        .then((res) => {
384
+          if (res.status == 200) {
385
+            this.supplierType = res.data.data.list;
386
+          }
387
+        })
388
+        .catch((err) => {
389
+          console.log(err);
390
+        });
395
     },
391
     },
396
 
392
 
397
     handleSelect(item) {
393
     handleSelect(item) {
429
                 };
425
                 };
430
                 savesupply(params).then((res) => {
426
                 savesupply(params).then((res) => {
431
                   if (res.data.state == 1) {
427
                   if (res.data.state == 1) {
432
-                    this.$message.success("修改成功");
428
+                    this.$message.success("新增成功");
433
                     this.closePop();
429
                     this.closePop();
434
                     this.$emit("init");
430
                     this.$emit("init");
435
                   } else {
431
                   } else {
436
-                    this.$message.error("修改失败");
432
+                    this.$message.error("新增失败");
437
                     setTimeout(() => {
433
                     setTimeout(() => {
438
                       this.closePop();
434
                       this.closePop();
439
                     }, 2000);
435
                     }, 2000);
466
                 let params = {
462
                 let params = {
467
                   suppliercode: this.supplier.supplierCode || "",
463
                   suppliercode: this.supplier.supplierCode || "",
468
                   suppliername: this.supplier.supplierName || "",
464
                   suppliername: this.supplier.supplierName || "",
469
-                  id: this.supplier.id|| 0,
465
+                  id: this.supplier_ids || 0,
470
                   suppliertype: this.supplier.supplierType || "",
466
                   suppliertype: this.supplier.supplierType || "",
471
                   vatrate: this.supplier.vatRate || 0,
467
                   vatrate: this.supplier.vatRate || 0,
472
                   number: this.supplier.number || "",
468
                   number: this.supplier.number || "",
511
           if (this.recordInfo.contacts.length == 0) {
507
           if (this.recordInfo.contacts.length == 0) {
512
             this.recordInfo.contacts = [{}];
508
             this.recordInfo.contacts = [{}];
513
             this.recordInfo.contacts[0].is_first = data.value;
509
             this.recordInfo.contacts[0].is_first = data.value;
514
-          } else if (this.recordInfo.contacts.length == 1) {
515
-            let val = res.data.data.contact[0];
516
-            this.recordInfo.contacts[0].is_first = data.value;
517
-            this.recordInfo.contacts[0] = {
518
-              id: val.id,
519
-              name: val.name,
520
-              address: val.address,
521
-              phone: val.phone,
522
-            };
523
-            this.$forceUpdate();
524
-          } else {
525
-            this.recordInfo.contacts.forEach((o) => {
526
-              if (o.isfirst == 0) {
527
-              } else if (o.isfirst == 1) {
528
-              }
529
-            });
530
           }
510
           }
511
+          // else if (this.recordInfo.contacts.length == 1) {
512
+          //     let val = res.data.data.contact[0];
513
+          //     this.recordInfo.contacts[0].is_first = data.value;
514
+          //     this.recordInfo.contacts[0] = {
515
+          //       id: parseFloat(val.id),
516
+          //       name: val.name,
517
+          //       address: val.address,
518
+          //       phone: val.phone,
519
+          //     };
520
+          //   }
531
         }
521
         }
532
       });
522
       });
533
     },
523
     },
639
     .el-autocomplete {
629
     .el-autocomplete {
640
       width: 75% !important;
630
       width: 75% !important;
641
     }
631
     }
632
+    .el-select.el-select--medium {
633
+      width: 70% !important;
634
+    }
642
   }
635
   }
643
 }
636
 }
644
 
637
 

+ 62 - 30
src/xt_pages/supply/components/editGoodOrder.vue Näytä tiedosto

448
   MofyGoodOrder,
448
   MofyGoodOrder,
449
   UpdateSupplyWahouseingInfo,
449
   UpdateSupplyWahouseingInfo,
450
   getSupplyWarehouseOutById,
450
   getSupplyWarehouseOutById,
451
+  deleteGoodOrderById
451
 } from "@/api/supply";
452
 } from "@/api/supply";
452
 
453
 
453
 export default {
454
 export default {
711
       tempObj["good_number"] = "";
712
       tempObj["good_number"] = "";
712
       this.recordInfo.tableList.push(tempObj);
713
       this.recordInfo.tableList.push(tempObj);
713
     },
714
     },
714
-    handleDelete: function (index, row) {
715
-      if (this.recordInfo.tableList.length <= 1) {
715
+    handleDelete: function (index, row) { 
716
+      if(this.is_check == 1){
717
+        this.$message.error("已审核单据,不能删除!")
718
+        return false
719
+      }
720
+      if(row.id == 0){
721
+        if (this.recordInfo.tableList.length <= 1) {
716
         this.$message.error("只有一条记录的时候无法删除");
722
         this.$message.error("只有一条记录的时候无法删除");
717
         return;
723
         return;
718
       } else {
724
       } else {
719
         this.recordInfo.tableList.splice(index, 1);
725
         this.recordInfo.tableList.splice(index, 1);
726
+       }
727
+      }else{
728
+         const params = {
729
+            id: row.id
730
+          }
731
+          this.$confirm('确认删除吗?', {
732
+            confirmButtonText: '确定',
733
+            cancelButtonText: '取消',
734
+            type: 'warning'
735
+          }).then(() => {
736
+            deleteGoodOrderById(params).then(response => {
737
+              if (response.data.state == 0) {
738
+                this.$message.error(response.data.msg)
739
+                return false
740
+              } else {
741
+                this.$message.success('删除成功')
742
+
743
+                this.recordInfo.tableList.splice(index, 1)
744
+              }
745
+            })
746
+          }).catch(() => {
747
+        })
720
       }
748
       }
721
     },
749
     },
722
 
750
 
931
           var params = {
959
           var params = {
932
             stockIn: this.recordInfo.tableList,
960
             stockIn: this.recordInfo.tableList,
933
             return_remake: this.return_remark,
961
             return_remake: this.return_remark,
934
-          };
935
-          updateGoodOrder(
936
-            params,
937
-            this.supplier_name,
938
-            start,
939
-            this.arrearage,
940
-            this.payment,
941
-            warehose_out_id,
942
-            this.number,
943
-            this.rate_of_concession,
944
-            this.discount_amount,
945
-            this.good_number
946
-          ).then((response) => {
962
+          }
963
+          console.log("param23322332323",params)
964
+        
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) => {
947
             if (response.data.state == 1) {
966
             if (response.data.state == 1) {
948
               this.loading = false;
967
               this.loading = false;
949
               this.$message.success("保存成功!");
968
               this.$message.success("保存成功!");
1076
       getSupplyWarehouseOutById(id).then((response) => {
1095
       getSupplyWarehouseOutById(id).then((response) => {
1077
         if (response.data.state == 1) {
1096
         if (response.data.state == 1) {
1078
           var cancelList = response.data.data.cancelList;
1097
           var cancelList = response.data.data.cancelList;
1079
-          console.log("cancelList23232232323323223", cancelList);
1098
+          console.log("退库单", cancelList);
1080
            var drugList = response.data.data.drugList;
1099
            var drugList = response.data.data.drugList;
1081
-          console.log("drugList233223232323232", drugList);
1100
+          console.log("药品列表", drugList);
1082
           var cancelOrderList = response.data.data.cancelOrderList;
1101
           var cancelOrderList = response.data.data.cancelOrderList;
1083
-          console.log("cancelOrderList2323322322332", cancelOrderList);
1102
+          console.log("退库单详情", cancelOrderList);
1084
           var ids =""
1103
           var ids =""
1085
           if(cancelList.length == 0){
1104
           if(cancelList.length == 0){
1086
             this.$router.push({ path: "/good/return/add?id=" + this.id+"&ids="+ids });
1105
             this.$router.push({ path: "/good/return/add?id=" + this.id+"&ids="+ids });
1087
           }
1106
           }
1088
           if (cancelList.length > 0) {
1107
           if (cancelList.length > 0) {
1089
             var outList = response.data.data.outList;
1108
             var outList = response.data.data.outList;
1109
+            console.log("购货单2322323",outList)
1090
             for(let i=0;i<outList.length;i++){
1110
             for(let i=0;i<outList.length;i++){
1091
               if(outList[i].is_source == 1){
1111
               if(outList[i].is_source == 1){
1092
                 for(let j=0;j<drugList.length;j++){
1112
                 for(let j=0;j<drugList.length;j++){
1103
             for(let i=0;i<cancelOrderList.length;i++){
1123
             for(let i=0;i<cancelOrderList.length;i++){
1104
              if(cancelOrderList[i].is_source == 1){
1124
              if(cancelOrderList[i].is_source == 1){
1105
                 for(let j=0;j<drugList.length;j++){
1125
                 for(let j=0;j<drugList.length;j++){
1106
-                  if(cancelOrderList[i].supply_unit == drugList[j].max_unit){
1107
-                    cancelOrderList[i].count = cancelOrderList[i].count * drugList[j].min_number
1126
+                  if(cancelOrderList[i].project_id == drugList[j].id){
1127
+                    if(cancelOrderList[i].supply_unit == drugList[j].max_unit){
1128
+                      cancelOrderList[i].count = cancelOrderList[i].count * drugList[j].min_number
1129
+                    }
1108
                   }
1130
                   }
1109
                  }
1131
                  }
1110
                }
1132
                }
1111
             }
1133
             }
1112
-            
1134
+
1135
+            console.log("数据变了后23323233",outList)
1136
+           
1113
             let objInfo = {};
1137
             let objInfo = {};
1114
             if(cancelOrderList.length >0){
1138
             if(cancelOrderList.length >0){
1115
               cancelOrderList.forEach((item, index) => {
1139
               cancelOrderList.forEach((item, index) => {
1123
                 }
1147
                 }
1124
               });
1148
               });
1125
               let newArr = Object.values(objInfo)
1149
               let newArr = Object.values(objInfo)
1126
-
1127
-              console.log("outList2332232332", outList)
1150
+              console.log("最好的输3233232323323223", newArr)
1151
+              console.log("数据变了后23323233",cancelOrderList)
1128
               for (let i = 0; i < cancelOrderList.length; i++) {
1152
               for (let i = 0; i < cancelOrderList.length; i++) {
1129
                 for (let j = 0; j < newArr.length; j++) {
1153
                 for (let j = 0; j < newArr.length; j++) {
1130
                   if (cancelOrderList[i].project_id == newArr[j].project_id) {
1154
                   if (cancelOrderList[i].project_id == newArr[j].project_id) {
1131
                     newArr[j].child.push(cancelOrderList[i])
1155
                     newArr[j].child.push(cancelOrderList[i])
1132
                 }
1156
                 }
1133
               }
1157
               }
1134
-              console.log("newAr2332232323", newArr)
1158
+              
1159
+             } 
1160
+
1161
+            for (let i = 0; i < newArr.length; i++) {
1162
+              for (let j = 0; j < newArr[i].child.length; j++) {
1163
+                newArr[i].count += newArr[i].child[j].count;
1164
+              }
1165
+            }
1135
            
1166
            
1136
             var arr = []
1167
             var arr = []
1137
             var total = 0;
1168
             var total = 0;
1143
                   if (outList[i].project_id == newArr[j].project_id) {
1174
                   if (outList[i].project_id == newArr[j].project_id) {
1144
                     //根据商品ID比较数量大小,把数量不足的商品ID储存,表示退货单的数量未满足采购单的数据,可以继续生成退货单
1175
                     //根据商品ID比较数量大小,把数量不足的商品ID储存,表示退货单的数量未满足采购单的数据,可以继续生成退货单
1145
                     if (outList[i].count > newArr[j].count) {
1176
                     if (outList[i].count > newArr[j].count) {
1146
-                      arr.push(outList[i].project_id);
1177
+                       arr.push(outList[i].project_id);
1147
                     }
1178
                     }
1148
                   }
1179
                   }
1149
                 }
1180
                 }
1151
               //如果total的长度等于 采购单的长度,怎表示该采购订单已经全部生成
1182
               //如果total的长度等于 采购单的长度,怎表示该采购订单已经全部生成
1152
 
1183
 
1153
               if (arr.length == 0) {
1184
               if (arr.length == 0) {
1154
-                this.$message.error("该订单已全部生成采购单,请知悉!");
1155
-                return;
1185
+                this.$message.error("该订单已全部生成退库单,请知悉!");
1186
+                return 
1156
               }
1187
               }
1157
-
1158
-              if (total != cancelOrderList.length) {
1188
+              console.log("arr23323232232323",arr)
1189
+              if (arr.length > 0) {
1159
                 str = arr.join(",");
1190
                 str = arr.join(",");
1160
                 this.$router.push({ path: "/good/return/edit?id=" + id + "&ids=" + str});
1191
                 this.$router.push({ path: "/good/return/edit?id=" + id + "&ids=" + str});
1161
               }
1192
               }
1162
              }
1193
              }
1163
-            }
1194
+         
1164
           }
1195
           }
1165
          }
1196
          }
1166
         }
1197
         }
1180
           var msg = response.data.data.msg;
1211
           var msg = response.data.data.msg;
1181
           if (msg == 1) {
1212
           if (msg == 1) {
1182
             this.$message.success("反审核成功!");
1213
             this.$message.success("反审核成功!");
1214
+            return 
1183
           }
1215
           }
1184
           if (msg == 2) {
1216
           if (msg == 2) {
1185
             var cancelList = response.data.data.cancelList
1217
             var cancelList = response.data.data.cancelList

+ 273 - 97
src/xt_pages/supply/components/editGoodReturn.vue Näytä tiedosto

60
         </div>
60
         </div>
61
         <div>
61
         <div>
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="updatePurchaseOrder">审核</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>
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
+          >
64
         </div>
71
         </div>
65
       </div>
72
       </div>
66
 
73
 
68
         <el-table
75
         <el-table
69
           :row-style="{ color: '#303133' }"
76
           :row-style="{ color: '#303133' }"
70
           :header-cell-style="{
77
           :header-cell-style="{
71
-              backgroundColor: 'rgb(245, 247, 250)',
72
-              color: '#606266'
78
+            backgroundColor: 'rgb(245, 247, 250)',
79
+            color: '#606266',
73
           }"
80
           }"
74
           :data="recordInfo.tableList"
81
           :data="recordInfo.tableList"
75
           :class="signAndWeighBoxPatients"
82
           :class="signAndWeighBoxPatients"
130
             </template>
137
             </template>
131
           </el-table-column>
138
           </el-table-column>
132
 
139
 
133
-        <el-table-column label="单位" align="center" width="120px">
140
+          <el-table-column label="单位" align="center" width="120px">
134
             <template slot="header" slot-scope="scope">
141
             <template slot="header" slot-scope="scope">
135
-                <span>单位<span style="color: red">*</span></span>
142
+              <span>单位<span style="color: red">*</span></span>
136
             </template>
143
             </template>
137
             <template slot-scope="scope">
144
             <template slot-scope="scope">
138
-              <el-form-item :prop="'tableList.' + scope.$index + '.supply_unit'" :rules='tableRules.supply_unit'>
139
-                <el-select v-model="scope.row.supply_unit" style="width:100px;" filterable placeholder="请选择"  :disabled="disabled">
140
-                        <!-- <el-option
145
+              <el-form-item
146
+                :prop="'tableList.' + scope.$index + '.supply_unit'"
147
+                :rules="tableRules.supply_unit"
148
+              >
149
+                <el-select
150
+                  v-model="scope.row.supply_unit"
151
+                  style="width: 100px"
152
+                  filterable
153
+                  placeholder="请选择"
154
+                  :disabled="disabled"
155
+                >
156
+                  <!-- <el-option
141
                             v-for="(item,index) in scope.row.unitList"
157
                             v-for="(item,index) in scope.row.unitList"
142
                             :key="index"
158
                             :key="index"
143
                             :label="item.name"
159
                             :label="item.name"
144
                             :value="item.name">
160
                             :value="item.name">
145
                         </el-option> -->
161
                         </el-option> -->
146
                 </el-select>
162
                 </el-select>
147
-              </el-form-item>  
163
+              </el-form-item>
148
             </template>
164
             </template>
149
           </el-table-column>
165
           </el-table-column>
150
           <el-table-column label="可用库存" align="center" width="130px">
166
           <el-table-column label="可用库存" align="center" width="130px">
159
           <el-table-column label="可退数量" align="center" width="200px">
175
           <el-table-column label="可退数量" align="center" width="200px">
160
             <template slot-scope="scope">
176
             <template slot-scope="scope">
161
               <el-input
177
               <el-input
162
-                v-model="scope.row.supply_specification_name"
178
+                v-model="scope.row.count"
163
                 style="width: 150px"
179
                 style="width: 150px"
164
                 :disabled="true"
180
                 :disabled="true"
165
               ></el-input>
181
               ></el-input>
168
           <el-table-column label="数量" align="center" width="120px">
184
           <el-table-column label="数量" align="center" width="120px">
169
             <template slot="header" slot-scope="scope">
185
             <template slot="header" slot-scope="scope">
170
               <span>数量<span style="color: red">*</span></span>
186
               <span>数量<span style="color: red">*</span></span>
171
-
172
             </template>
187
             </template>
173
             <template slot-scope="scope">
188
             <template slot-scope="scope">
174
               <el-form-item
189
               <el-form-item
233
             </template>
248
             </template>
234
           </el-table-column>
249
           </el-table-column>
235
 
250
 
236
-          <el-table-column label="源购订单号" align="center" width="200px">
251
+          <el-table-column label="源购订单号" align="center" width="200px">
237
             <template slot-scope="scope">
252
             <template slot-scope="scope">
238
               <el-input
253
               <el-input
239
                 v-model="scope.row.good_number"
254
                 v-model="scope.row.good_number"
254
             </template>
269
             </template>
255
           </el-table-column>
270
           </el-table-column>
256
 
271
 
257
-          <el-table-column label="操作" align="center" width="150px" fixed="right">
272
+          <el-table-column
273
+            label="操作"
274
+            align="center"
275
+            width="150px"
276
+            fixed="right"
277
+          >
258
             <template slot-scope="scope">
278
             <template slot-scope="scope">
259
-              <el-tooltip class="item" effect="dark" content="新增" placement="top" >
260
-                  <el-button
261
-                      size="mini"
262
-                      type="primary"
263
-                      icon="el-icon-circle-plus-outline"
264
-                      @click="handleEdit(scope.$index, scope.row)">
265
-                  </el-button>
266
-            </el-tooltip>
267
-            <el-tooltip class="item" effect="dark" content="删除" placement="top">
268
-                  <el-button
269
-                      size="mini"
270
-                      type="danger"
271
-                      icon="el-icon-delete"
272
-                      @click="handleDelete(scope.$index, scope.row)">
273
-                  </el-button>
279
+              <el-tooltip
280
+                class="item"
281
+                effect="dark"
282
+                content="新增"
283
+                placement="top"
284
+              >
285
+                <el-button
286
+                  size="mini"
287
+                  type="primary"
288
+                  icon="el-icon-circle-plus-outline"
289
+                  @click="handleEdit(scope.$index, scope.row)"
290
+                >
291
+                </el-button>
292
+              </el-tooltip>
293
+              <el-tooltip
294
+                class="item"
295
+                effect="dark"
296
+                content="删除"
297
+                placement="top"
298
+              >
299
+                <el-button
300
+                  size="mini"
301
+                  type="danger"
302
+                  icon="el-icon-delete"
303
+                  @click="handleDelete(scope.$index, scope.row)"
304
+                >
305
+                </el-button>
274
               </el-tooltip>
306
               </el-tooltip>
275
             </template>
307
             </template>
276
-         </el-table-column>
308
+          </el-table-column>
277
         </el-table>
309
         </el-table>
278
       </el-form>
310
       </el-form>
279
       <div style="margin-top: 10px">
311
       <div style="margin-top: 10px">
285
         >
317
         >
286
         </el-input>
318
         </el-input>
287
       </div>
319
       </div>
320
+      <div style="margin-top: 10px">合计:{{ getAllPrice() }} 元</div>
288
       <div style="margin-top: 10px">
321
       <div style="margin-top: 10px">
289
         <span
322
         <span
290
           >优惠率:<el-input
323
           >优惠率:<el-input
291
             style="width: 100px"
324
             style="width: 100px"
292
             v-model="rate_of_concession"
325
             v-model="rate_of_concession"
326
+            @input="addressChange"
327
+            placeholder="请输入优惠率"
293
           ></el-input
328
           ></el-input
294
           >%</span
329
           >%</span
295
         >
330
         >
298
           >优惠金额:<el-input
333
           >优惠金额:<el-input
299
             style="width: 100px"
334
             style="width: 100px"
300
             v-model="discount_amount"
335
             v-model="discount_amount"
336
+            @input="count_discount"
337
+            placeholder="请输入优惠金额"
301
           ></el-input
338
           ></el-input
302
         ></span>
339
         ></span>
303
 
340
 
305
           >本次付款:<el-input
342
           >本次付款:<el-input
306
             style="width: 100px"
343
             style="width: 100px"
307
             v-model="payment"
344
             v-model="payment"
345
+            @input="count_payment"
346
+            placeholder="请输入本次付款"
308
           ></el-input
347
           ></el-input
309
         ></span>
348
         ></span>
310
 
349
 
312
           >本次欠款:<el-input
351
           >本次欠款:<el-input
313
             style="width: 100px"
352
             style="width: 100px"
314
             v-model="arrearage"
353
             v-model="arrearage"
354
+            @input="count_arrearage"
355
+            placeholder="请输入本次欠款"
315
           ></el-input
356
           ></el-input
316
         ></span>
357
         ></span>
317
       </div>
358
       </div>
337
 import {
378
 import {
338
   getInitOrder,
379
   getInitOrder,
339
   getGoodReturnDetail,
380
   getGoodReturnDetail,
340
-  updateGoodReturn
381
+  updateGoodReturn,
382
+  checkReturnOrder,
383
+  deleteReturnOrderById,
384
+  modefyReturnOrder
341
 } from "@/api/supply";
385
 } from "@/api/supply";
342
 export default {
386
 export default {
343
   name: "addPurchaseOrder",
387
   name: "addPurchaseOrder",
346
   },
390
   },
347
   data() {
391
   data() {
348
     return {
392
     return {
349
-      tipsInfo:"",
393
+      tipsInfo: "",
350
       crumbs: [
394
       crumbs: [
351
-        { path: false, name: "货单" },
395
+        { path: false, name: "退货单" },
352
         { path: "/good/return/add", name: "新增退货单" },
396
         { path: "/good/return/add", name: "新增退货单" },
353
       ],
397
       ],
354
       showTwo: true,
398
       showTwo: true,
380
       supplier_name: "",
424
       supplier_name: "",
381
       supplyList: [],
425
       supplyList: [],
382
       rate_of_concession: "",
426
       rate_of_concession: "",
383
-      arrearage:"",
384
-      payment:"",
427
+      arrearage: "",
428
+      payment: "",
385
       discount_amount: "",
429
       discount_amount: "",
386
       tableRules: {
430
       tableRules: {
387
         name: [{ required: true, message: "商品不能为空", trigger: "blur" }],
431
         name: [{ required: true, message: "商品不能为空", trigger: "blur" }],
398
       disabled: false,
442
       disabled: false,
399
       is_check: 0,
443
       is_check: 0,
400
       dialogVisible: false,
444
       dialogVisible: false,
401
-      return_remark:"",
445
+      return_remark: "",
446
+      warehouse_out_id: 0,
402
     };
447
     };
403
   },
448
   },
404
   methods: {
449
   methods: {
577
       tempObj["is_total"] = 1;
622
       tempObj["is_total"] = 1;
578
       tempObj["project_id"] = 0;
623
       tempObj["project_id"] = 0;
579
       tempObj["supply_unit"] = "";
624
       tempObj["supply_unit"] = "";
625
+      tempObj["supply_batch_number"] = ""
626
+      tempObj["supply_product_date"] = ""
627
+      tempObj["supply_expiry_date"] = ""
628
+      tempObj["warehousing_id"] =0
629
+      tempObj["warehouse_info_id"] =0
630
+      tempObj["count"] = ""
631
+
580
       this.recordInfo.tableList.push(tempObj);
632
       this.recordInfo.tableList.push(tempObj);
581
     },
633
     },
582
     handleDelete: function (index, row) {
634
     handleDelete: function (index, row) {
583
-      if (this.recordInfo.tableList.length <= 1) {
584
-        this.$message.error("只有一条记录的时候无法删除");
585
-        return;
586
-      } else {
587
-        this.recordInfo.tableList.splice(index, 1);
635
+      if(row.id == 0){
636
+        if (this.recordInfo.tableList.length <= 1) {
637
+          this.$message.error("只有一条记录的时候无法删除");
638
+          return;
639
+        } else {
640
+          this.recordInfo.tableList.splice(index, 1);
641
+        }
642
+      }
643
+      if(row.id >0){
644
+       if(this.is_check == 1){
645
+         this.$message.error("已审核单据,不能删除!")
646
+         return false
647
+       }
648
+       this.$confirm('确认删除吗?', '删除', {
649
+          confirmButtonText: '确 定',
650
+          cancelButtonText: '取 消',
651
+          type: 'warning'
652
+        }).then(() => {
653
+          deleteReturnOrderById(val.id).then(response => {
654
+            if (response.data.state == 1) {
655
+                var msg = response.data.data.msg
656
+                this.recordInfo.tableList.splice(index, 1);
657
+                this.$message.success("删除成功")
658
+            } else {
659
+                this.$message.error("删除失败")
660
+            }
661
+          })
662
+        }).catch(() => {
663
+       })
588
       }
664
       }
589
-    },
590
-
591
-    changeTypeName() {},
592
-    startTimeChange() {},
593
-    endTimeChange() {},
594
-    search() {},
595
 
665
 
666
+    },
596
     getWarehoseInfo(arr, max_unit, min_unit, min_number) {
667
     getWarehoseInfo(arr, max_unit, min_unit, min_number) {
597
       var total = 0;
668
       var total = 0;
598
       var max_str = "";
669
       var max_str = "";
707
           this.recordInfo.tableList[i].supply_price *
778
           this.recordInfo.tableList[i].supply_price *
708
           this.recordInfo.tableList[i].supply_count;
779
           this.recordInfo.tableList[i].supply_count;
709
       }
780
       }
781
+      this.total_price = total_price;
710
       return total_price.toFixed(2);
782
       return total_price.toFixed(2);
711
     },
783
     },
784
+
785
+    addressChange() {
786
+      var discount_amount = 0;
787
+      if (this.rate_of_concession > 0) {
788
+        discount_amount = (
789
+          (this.rate_of_concession / 100) *
790
+          this.total_price
791
+        ).toFixed(2);
792
+      }
793
+      this.discount_amount = discount_amount;
794
+    },
795
+    count_discount() {
796
+      this.rate_of_concession = (
797
+        this.discount_amount /
798
+        (this.total_price * 0.01)
799
+      ).toFixed(2);
800
+    },
801
+    count_payment() {
802
+      this.arrearage = this.total_price - this.payment;
803
+    },
804
+
805
+    count_arrearage() {
806
+      this.payment = this.total_price - this.arrearage;
807
+    },
808
+
712
     checkPurchaseOrder(id, index) {
809
     checkPurchaseOrder(id, index) {
713
       this.$confirm("是否审核?", {
810
       this.$confirm("是否审核?", {
714
         confirmButtonText: "确 定",
811
         confirmButtonText: "确 定",
727
         })
824
         })
728
         .catch(() => {});
825
         .catch(() => {});
729
     },
826
     },
730
-    getGoodReturnDetail(){
731
-      
827
+   getGoodReturnDetail(){
828
+
732
       var id = this.$route.query.id
829
       var id = this.$route.query.id
733
       getGoodReturnDetail(id).then(response=>{
830
       getGoodReturnDetail(id).then(response=>{
734
         if(response.data.state == 1){
831
         if(response.data.state == 1){
735
           var out = response.data.data.cancelDetail
832
           var out = response.data.data.cancelDetail
736
           console.log("out23322323232323",out)
833
           console.log("out23322323232323",out)
834
+          this.warehouse_out_id = out.warehouse_out_id
835
+          this.number = out.number
737
           this.is_check = out.is_check
836
           this.is_check = out.is_check
738
           this.id = out.id
837
           this.id = out.id
739
           this.supplier_name = out.supplier_id
838
           this.supplier_name = out.supplier_id
743
           this.arrearage = out.arrearage
842
           this.arrearage = out.arrearage
744
           this.start_time = this.getTimes(out.document_date)
843
           this.start_time = this.getTimes(out.document_date)
745
           var orderInfo = response.data.data.orderCancelDetail
844
           var orderInfo = response.data.data.orderCancelDetail
746
-          console.log("orderINFO233232232332",orderInfo)
845
+          if(out.is_check == 1){
846
+            this.disabled = true
847
+          }
848
+          console.log("退库单详情",orderInfo)
747
           var drugList = response.data.data.drugList
849
           var drugList = response.data.data.drugList
748
           var goodList = response.data.data.goodList
850
           var goodList = response.data.data.goodList
749
           for(let i=0;i< orderInfo.length;i++){
851
           for(let i=0;i< orderInfo.length;i++){
750
-              
852
+              orderInfo[i].id = orderInfo[i].id
751
               orderInfo[i].supply_count =  orderInfo[i].count
853
               orderInfo[i].supply_count =  orderInfo[i].count
854
+              orderInfo[i].count = orderInfo[i].source_count
752
               orderInfo[i].supply_price =  orderInfo[i].price
855
               orderInfo[i].supply_price =  orderInfo[i].price
753
               orderInfo[i].supply_remake =  orderInfo[i].remark
856
               orderInfo[i].supply_remake =  orderInfo[i].remark
754
               orderInfo[i].type =  orderInfo[i].is_source
857
               orderInfo[i].type =  orderInfo[i].is_source
757
               orderInfo[i].order_number =  orderInfo[i].order_number
860
               orderInfo[i].order_number =  orderInfo[i].order_number
758
               orderInfo[i].good_number = orderInfo[i].good_number
861
               orderInfo[i].good_number = orderInfo[i].good_number
759
               orderInfo[i].supply_total_price = (orderInfo[i].count * orderInfo[i].price).toFixed(2)
862
               orderInfo[i].supply_total_price = (orderInfo[i].count * orderInfo[i].price).toFixed(2)
760
-              orderInfo[i].supply_expiry_date = this.getTimes(orderInfo[i].supply_expiry_date)
761
-              orderInfo[i].supply_product_date = this.getTimes(orderInfo[i].supply_product_date)
863
+              orderInfo[i].supply_expiry_date =  orderInfo[i].supply_expiry_date
864
+              orderInfo[i].supply_product_date = orderInfo[i].supply_product_date
762
             if(orderInfo[i].is_source == 1){
865
             if(orderInfo[i].is_source == 1){
763
               for(let j=0;j<drugList.length;j++){
866
               for(let j=0;j<drugList.length;j++){
764
                   if( orderInfo[i].project_id == drugList[j].id){
867
                   if( orderInfo[i].project_id == drugList[j].id){
771
                       orderInfo[i].unitList = [{id:1,name:""}]
874
                       orderInfo[i].unitList = [{id:1,name:""}]
772
                       orderInfo[i].unitList[0].name = drugList[j].max_unit
875
                       orderInfo[i].unitList[0].name = drugList[j].max_unit
773
                     }
876
                     }
774
-                  
877
+
775
                   }
878
                   }
776
-              }  
777
-              } 
879
+              }
880
+              }
778
             if(orderInfo[i].is_source == 2){
881
             if(orderInfo[i].is_source == 2){
779
               for(let j=0;j<goodList.length;j++){
882
               for(let j=0;j<goodList.length;j++){
780
                   if(orderInfo[i].project_id == goodList[j].id){
883
                   if(orderInfo[i].project_id == goodList[j].id){
781
                       orderInfo[i].unitList = [{id:1,name:""}]
884
                       orderInfo[i].unitList = [{id:1,name:""}]
782
                       orderInfo[i].unitList[0].name = goodList[j].packing_unit
885
                       orderInfo[i].unitList[0].name = goodList[j].packing_unit
783
                   }
886
                   }
784
-              }  
785
-            } 
887
+              }
888
+            }
786
           }
889
           }
787
-        
788
-          this.recordInfo.tableList= []
789
-          this.recordInfo.tableList = orderInfo
790
-        
890
+
891
+          this.recordInfo.tableList = [];
892
+          this.recordInfo.tableList = orderInfo;
791
         }
893
         }
792
-      })  
894
+      });
793
     },
895
     },
794
     toPrint() {
896
     toPrint() {
795
       var id = this.$route.query.id;
897
       var id = this.$route.query.id;
796
       this.$router.push({ path: "/purchase/order/print?&id=" + id });
898
       this.$router.push({ path: "/purchase/order/print?&id=" + id });
797
     },
899
     },
798
-    updateGoodReturn(){
799
-      var warehouse_out_id = this.$route.query.id;
800
-      this.$refs["tableForm"].validate((valid)=>{
801
-        if(valid){
802
-          this.loading = true
803
-          for(let i=0;i<this.recordInfo.tableList.length;i++){
804
-            this.recordInfo.tableList[i].supply_count = parseInt(this.recordInfo.tableList[i].supply_count)
805
-            this.recordInfo.tableList[i].supply_price = this.recordInfo.tableList[i].supply_price.toString()
806
-            this.recordInfo.tableList[i].supply_total = this.recordInfo.tableList[i].supply_total.toString()
807
-       
808
-            for(let j=0;j<this.manufactuerList.length;j++){
809
-                if(this.recordInfo.tableList[i].supply_manufacturer == this.manufactuerList[j].manufacturer_name){
810
-                  this.recordInfo.tableList[i].manufacturer_id = this.manufactuerList[j].id
811
-                }
812
-                if(this.recordInfo.tableList[i].supply_manufacturer == this.manufactuerList[j].id){
813
-                  this.recordInfo.tableList[i].supply_manufacturer = this.manufactuerList[j].manufacturer_name
814
-                }
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()
815
 
909
 
816
-            }
817
-          }
818
-          var params = {
819
-            "stockIn":this.recordInfo.tableList,
820
-            "return_marke":this.return_remark,
821
-          }
822
-          console.log("start_time232233232",this.start_time)
823
-          console.log("arrage2323322323",this.arrearage)
824
-          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=>{
825
-            if(response.data.state == 1){
826
-               var msg = response.data.msg
827
-               this.loading = false
828
-               this.$message.success("保存成功!")
829
-            }
830
-          })
831
-        }
832
-      })
833
-    }
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();
929
+
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
+    // },
971
+    checkReturnOrder(){
972
+      this.loading = true
973
+     var params = {
974
+       warehouse_out_id:this.warehouse_out_id,
975
+       id:this.id,
976
+     }
977
+     checkReturnOrder(params).then(response=>{
978
+       if(response.data.state == 1){
979
+        this.loading = false
980
+        var msg = response.data.data.msg
981
+        this.$message.success("保存成功!")
982
+       }
983
+     })
984
+    },
985
+    modefyReturnOrder(){
986
+      this.loading = true
987
+     var params = {
988
+       warehouse_out_id:this.warehouse_out_id,
989
+       id:this.id,
990
+     }
991
+     modefyReturnOrder(params).then(response=>{
992
+       if(response.data.state == 1){
993
+
994
+       }
995
+     })
996
+    },
997
+    checkReturnOrder() {
998
+      var params = {
999
+        warehouse_out_id: this.warehouse_out_id,
1000
+        id: this.id,
1001
+      };
1002
+      checkReturnOrder(params).then((response) => {});
1003
+    },
834
   },
1004
   },
835
   created() {
1005
   created() {
836
     const tempObj = {};
1006
     const tempObj = {};
850
     tempObj["is_total"] = 1;
1020
     tempObj["is_total"] = 1;
851
     tempObj["project_id"] = 0;
1021
     tempObj["project_id"] = 0;
852
     tempObj["supply_unit"] = "";
1022
     tempObj["supply_unit"] = "";
1023
+    tempObj["supply_batch_number"] = ""
1024
+    tempObj["supply_product_date"] = ""
1025
+    tempObj["supply_expiry_date"] = ""
1026
+    tempObj["warehousing_id"] =0
1027
+    tempObj["warehouse_info_id"] =0
1028
+    tempObj["count"] = ""
853
     this.recordInfo.tableList.push(tempObj);
1029
     this.recordInfo.tableList.push(tempObj);
854
     this.getInitOrder();
1030
     this.getInitOrder();
855
     //获取购货单列表
1031
     //获取购货单列表

+ 40 - 13
src/xt_pages/supply/components/editPurchaseOrder.vue Näytä tiedosto

374
   getAllOrderCountList,
374
   getAllOrderCountList,
375
   getGoodOrderList,
375
   getGoodOrderList,
376
   getReturnOrder,
376
   getReturnOrder,
377
+  deletePurchaseOrder
377
 } from "@/api/supply";
378
 } from "@/api/supply";
378
 export default {
379
 export default {
379
   name: "addPurchaseOrder",
380
   name: "addPurchaseOrder",
383
   },
384
   },
384
   data() {
385
   data() {
385
     return {
386
     return {
386
-      content_2:"购单",
387
-      content:"购订单",
387
+      content_2:"购单",
388
+      content:"购订单",
388
       content_1:"已有以下关联数据,不能反审核",
389
       content_1:"已有以下关联数据,不能反审核",
389
       type:1,
390
       type:1,
390
       Reviewed: false,
391
       Reviewed: false,
630
       this.recordInfo.tableList.push(tempObj);
631
       this.recordInfo.tableList.push(tempObj);
631
     },
632
     },
632
     handleDelete: function (index, row) {
633
     handleDelete: function (index, row) {
633
-      if (this.recordInfo.tableList.length <= 1) {
634
-        this.$message.error("只有一条记录的时候无法删除");
635
-        return;
636
-      } else {
637
-        this.recordInfo.tableList.splice(index, 1);
634
+      if(this.is_check == 1){
635
+         this.$message.error("已审核单据,不能删除!")
636
+         return false
638
       }
637
       }
638
+      if(row.id == 0){
639
+        if (this.recordInfo.tableList.length <= 1) {
640
+          this.$message.error("只有一条记录的时候无法删除");
641
+          return;
642
+        } else {
643
+          this.recordInfo.tableList.splice(index, 1);
644
+        }
645
+      }else{
646
+          const params = {
647
+            id: row.id
648
+          }
649
+          this.$confirm('确认删除吗?', {
650
+            confirmButtonText: '确定',
651
+            cancelButtonText: '取消',
652
+            type: 'warning'
653
+          }).then(() => {
654
+            deletePurchaseOrder(params).then(response => {
655
+              if (response.data.state == 0) {
656
+                this.$message.error(response.data.msg)
657
+                return false
658
+              } else {
659
+                this.$message.success('删除成功')
660
+
661
+                this.recordInfo.tableList.splice(index, 1)
662
+              }
663
+            })
664
+          }).catch(() => {
665
+        })
666
+        
667
+      }
668
+      
639
     },
669
     },
640
 
670
 
641
     changeTypeName() {},
671
     changeTypeName() {},
769
         confirmButtonText: "确 定",
799
         confirmButtonText: "确 定",
770
         cancelButtonText: "取 消",
800
         cancelButtonText: "取 消",
771
         type: "warning",
801
         type: "warning",
772
-      })
773
-        .then(() => {
802
+      }).then(() => {
774
           checkPurchaseOrder(this.id).then((response) => {
803
           checkPurchaseOrder(this.id).then((response) => {
775
             if (response.data.state == 1) {
804
             if (response.data.state == 1) {
776
               var info = response.data.data.info;
805
               var info = response.data.data.info;
882
           var ids = "";
911
           var ids = "";
883
           // 如果采购单没有数据,则代表改订单第一次生成采购订单数据
912
           // 如果采购单没有数据,则代表改订单第一次生成采购订单数据
884
           if (goodOrder.length == 0) {
913
           if (goodOrder.length == 0) {
885
-            this.$router.push({
886
-              path: "/good/order/add?id=" + id + "&ids=" + ids,
887
-            });
914
+            this.$router.push({path: "/good/order/add?id=" + id + "&ids=" + ids});
888
           }
915
           }
889
           for (let i = 0; i < purcaseOrder.length; i++) {
916
           for (let i = 0; i < purcaseOrder.length; i++) {
890
             for (let j = 0; j < drugList.length; j++) {
917
             for (let j = 0; j < drugList.length; j++) {
958
                 return;
985
                 return;
959
               }
986
               }
960
 
987
 
961
-              if (total != goodOrder.length) {
988
+              if (arr.length >0) {
962
                 str = arr.join(",");
989
                 str = arr.join(",");
963
                 this.$router.push({path: "/good/order/add?id=" + id + "&ids=" + str});
990
                 this.$router.push({path: "/good/order/add?id=" + id + "&ids=" + str});
964
               }
991
               }

+ 40 - 14
src/xt_pages/supply/goodreturn.vue Näytä tiedosto

105
         </el-table-column>
105
         </el-table-column>
106
         <el-table-column label="购货金额" align="center" width="200">
106
         <el-table-column label="购货金额" align="center" width="200">
107
           <template slot-scope="scope">
107
           <template slot-scope="scope">
108
-             <!-- <span v-if="getAllBuyPrice(scope.row.orderInfo)>0">{{getAllBuyPrice(scope.row.orderInfo)}}</span>  -->
108
+             <span v-if="getAllBuyPrice(scope.row.cancelOrder)>0">{{getAllBuyPrice(scope.row.cancelOrder)}}</span> 
109
           </template>
109
           </template>
110
         </el-table-column>
110
         </el-table-column>
111
         <el-table-column label="优惠后金额" align="center" width="200">
111
         <el-table-column label="优惠后金额" align="center" width="200">
112
          <template slot-scope="scope">
112
          <template slot-scope="scope">
113
-           <!-- {{getAllCount(scope.row.orderInfo)}} -->
113
+          <span v-if="getAllBuyPrice(scope.row.cancelOrder)>0">{{getAllBuyPrice(scope.row.cancelOrder) - scope.row.discount_amount}}</span> 
114
          </template>
114
          </template>
115
        </el-table-column>
115
        </el-table-column>
116
-        <el-table-column label="已退款" align="center" width="200">
116
+        <!-- <el-table-column label="已退款" align="center" width="200">
117
          <template slot-scope="scope">
117
          <template slot-scope="scope">
118
-           <!-- {{getAllCount(scope.row.orderInfo)}} -->
118
+         
119
          </template>
119
          </template>
120
-       </el-table-column>
120
+       </el-table-column> -->
121
        <el-table-column label="源数量" align="center" width="200">
121
        <el-table-column label="源数量" align="center" width="200">
122
          <template slot-scope="scope">
122
          <template slot-scope="scope">
123
-           <!-- {{getAllCount(scope.row.orderInfo)}} -->
123
+           {{scope.row.source_count}}
124
          </template>
124
          </template>
125
        </el-table-column>
125
        </el-table-column>
126
 
126
 
127
-       <el-table-column label="退款状态" align="center" width="200">
127
+       <el-table-column label="款状态" align="center" width="200">
128
          <template slot-scope="scope">
128
          <template slot-scope="scope">
129
-           <span v-if="scope.row.is_check == 2">未审核</span>
130
-           <span v-if="scope.row.is_check == 1">已审核</span>
129
+           <!-- <span v-if="scope.row.is_check == 2">未审核</span>
130
+           <span v-if="scope.row.is_check == 1">已审核</span> -->
131
          </template>
131
          </template>
132
        </el-table-column>
132
        </el-table-column>
133
       
133
       
183
 <script>
183
 <script>
184
 import BreadCrumb from "@/xt_pages/components/bread-crumb";
184
 import BreadCrumb from "@/xt_pages/components/bread-crumb";
185
 
185
 
186
-import {getAllSupply,getAllGoodReturnOrderList} from "@/api/supply"
186
+import {getAllSupply,getAllGoodReturnOrderList,deleteReturnOrder} from "@/api/supply"
187
 import {uParseTime } from '@/utils/tools'
187
 import {uParseTime } from '@/utils/tools'
188
 export default {
188
 export default {
189
   name: "stockIn",
189
   name: "stockIn",
228
        this.$router.push({path:"/good/return/add"})
228
        this.$router.push({path:"/good/return/add"})
229
      },
229
      },
230
      changeTypeName(){
230
      changeTypeName(){
231
-
231
+       this.getlist()
232
      },
232
      },
233
      startTimeChange(){
233
      startTimeChange(){
234
-
234
+       this.getlist()
235
      },
235
      },
236
      endTimeChange(){
236
      endTimeChange(){
237
-
237
+      this.getlist()
238
      },
238
      },
239
      search(){
239
      search(){
240
-
240
+      this.getlist()
241
      },
241
      },
242
      handleSizeChange(val){
242
      handleSizeChange(val){
243
        this.limit = val
243
        this.limit = val
324
      },
324
      },
325
      editGoodReturn(id){
325
      editGoodReturn(id){
326
        this.$router.push({path:"/good/return/edit?id="+id})
326
        this.$router.push({path:"/good/return/edit?id="+id})
327
+     },
328
+     toClickOne(val,index){
329
+       if(val.is_check == 1){
330
+         this.$message.error("已审核单据,不能删除!")
331
+         return false
332
+       }
333
+       if(val.cancelOut.length >0 ){
334
+         this.$message.error("已关联单据,不能删除!")
335
+         return false
336
+       }
337
+       this.$confirm('确认删除吗?', '删除', {
338
+          confirmButtonText: '确 定',
339
+          cancelButtonText: '取 消',
340
+          type: 'warning'
341
+        }).then(() => {
342
+          deleteReturnOrder(val.id).then(response => {
343
+            if (response.data.state == 1) {
344
+                var msg = response.data.data.msg
345
+                this.tableList.splice(index, 1);
346
+                this.$message.success("删除成功")
347
+            } else {
348
+                this.$message.error("删除失败")
349
+            }
350
+          })
351
+        }).catch(() => {
352
+       }) 
327
      }
353
      }
328
   },
354
   },
329
   created() {
355
   created() {

+ 3 - 3
src/xt_pages/supply/supplyQuery.vue Näytä tiedosto

180
       page: 1,
180
       page: 1,
181
       limit: 10,
181
       limit: 10,
182
 
182
 
183
-      type_name: 0,
183
+      type_name: "请选择",
184
       crumbs: [
184
       crumbs: [
185
         { path: false, name: "采购管理" },
185
         { path: false, name: "采购管理" },
186
         { path: "/supply/good/order/query", name: "供应商管理" },
186
         { path: "/supply/good/order/query", name: "供应商管理" },
213
       };
213
       };
214
       getexporthistory(params).then((res) => {
214
       getexporthistory(params).then((res) => {
215
         if (res.data.state == 1) {
215
         if (res.data.state == 1) {
216
-          console.log(res.data.data.list, "res.data.data.list");
216
+
217
           this.tableList = res.data.data.list;
217
           this.tableList = res.data.data.list;
218
           this.total = res.data.data.total;
218
           this.total = res.data.data.total;
219
         }
219
         }
225
         if (res.data.state == 1) {
225
         if (res.data.state == 1) {
226
           this.sType = res.data.data.list;
226
           this.sType = res.data.data.list;
227
         }
227
         }
228
-        console.log(res, "oo");
228
+
229
       });
229
       });
230
     },
230
     },
231
 
231