huangyw 3 år sedan
förälder
incheckning
0ecc13cd27

+ 14 - 0
src/views/layout/Layout.vue Visa fil

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
+<<<<<<< Updated upstream
19
         <div v-if="caigouShow" :class="index == 5 ? 'navOne navActive' : 'navOne'" @click="clickActive(5,'采购管理')">
20
         <div v-if="caigouShow" :class="index == 5 ? 'navOne navActive' : 'navOne'" @click="clickActive(5,'采购管理')">
20
           <i class="iconfont icon-kccx navIcon"></i>
21
           <i class="iconfont icon-kccx navIcon"></i>
21
           <p>采购管理</p>
22
           <p>采购管理</p>
22
         </div>
23
         </div>
24
+=======
25
+<<<<<<< Updated upstream
26
+        <!-- <div v-if="caigouShow" :class="index == 5 ? 'navOne navActive' : 'navOne'" @click="clickActive(5,'采购管理')">
27
+          <i class="iconfont icon-kccx navIcon"></i>
28
+          <p>采购管理</p>
29
+        </div> -->
30
+=======
31
+       <div v-if="caigouShow" :class="index == 5 ? 'navOne navActive' : 'navOne'" @click="clickActive(5,'采购管理')">
32
+        <i class="iconfont icon-kccx navIcon"></i>
33
+         <p>采购管理</p>
34
+       </div>
35
+>>>>>>> Stashed changes
36
+>>>>>>> Stashed changes
23
         <div v-if="kucunShow" :class="index == 3 ? 'navOne navActive' : 'navOne'" @click="clickActive(3,'库房管理')">
37
         <div v-if="kucunShow" :class="index == 3 ? 'navOne navActive' : 'navOne'" @click="clickActive(3,'库房管理')">
24
           <i class="iconfont icon-kccx navIcon"></i>
38
           <i class="iconfont icon-kccx navIcon"></i>
25
           <p>库房管理</p>
39
           <p>库房管理</p>

+ 7 - 9
src/xt_pages/supply/components/addSupply.vue Visa fil

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
43
               </el-select>
43
               </el-select>
44
             </el-form-item>
44
             </el-form-item>
45
           </el-col>
45
           </el-col>
46
-          <el-col span="6">
46
+          <el-col :span="6">
47
             <el-form-item label="增值税税率" prop="vatRate">
47
             <el-form-item label="增值税税率" prop="vatRate">
48
               <el-input
48
               <el-input
49
                 v-model="supplier.vatRate"
49
                 v-model="supplier.vatRate"
53
           </el-col>
53
           </el-col>
54
         </el-row>
54
         </el-row>
55
         <el-row>
55
         <el-row>
56
-          <el-col span="6">
56
+          <el-col :span="6">
57
             <el-form-item label="纳税人识别号" prop="number">
57
             <el-form-item label="纳税人识别号" prop="number">
58
               <el-input v-model="supplier.number"></el-input>
58
               <el-input v-model="supplier.number"></el-input>
59
             </el-form-item>
59
             </el-form-item>
60
           </el-col>
60
           </el-col>
61
-          <el-col span="6">
61
+          <el-col :span="6">
62
             <el-form-item label="开户银行" prop="bank">
62
             <el-form-item label="开户银行" prop="bank">
63
               <el-input v-model="supplier.bank"></el-input>
63
               <el-input v-model="supplier.bank"></el-input>
64
             </el-form-item>
64
             </el-form-item>
65
           </el-col>
65
           </el-col>
66
         </el-row>
66
         </el-row>
67
         <el-row>
67
         <el-row>
68
-          <el-col span="6">
68
+          <el-col :span="6">
69
             <el-form-item label="银行账号" prop="bankAccount">
69
             <el-form-item label="银行账号" prop="bankAccount">
70
               <el-input v-model="supplier.bankAccount"></el-input>
70
               <el-input v-model="supplier.bankAccount"></el-input>
71
             </el-form-item>
71
             </el-form-item>
383
         .then((res) => {
383
         .then((res) => {
384
           if (res.status == 200) {
384
           if (res.status == 200) {
385
             this.supplierType = res.data.data.list;
385
             this.supplierType = res.data.data.list;
386
-            console.log(this.supplierType, "this.supplierType");
387
           }
386
           }
388
         })
387
         })
389
         .catch((err) => {
388
         .catch((err) => {
518
           //       address: val.address,
517
           //       address: val.address,
519
           //       phone: val.phone,
518
           //       phone: val.phone,
520
           //     };
519
           //     };
521
-          //     this.$forceUpdate();
522
           //   }
520
           //   }
523
         }
521
         }
524
       });
522
       });

+ 225 - 144
src/xt_pages/supply/components/editGoodReturn.vue Visa fil

59
           <span>单据编码:{{ number }}</span>
59
           <span>单据编码:{{ number }}</span>
60
         </div>
60
         </div>
61
         <div>
61
         <div>
62
-          <el-button size="small" type="primary" @click="updateGoodReturn">保存</el-button>
63
-          <el-button size="small" type="primary" @click="checkReturnOrder">审核</el-button>
62
+          <el-button size="small" type="primary" @click="updateGoodReturn"
63
+            >保存</el-button
64
+          >
65
+          <el-button size="small" type="primary" @click="checkReturnOrder"
66
+            >审核</el-button
67
+          >
64
         </div>
68
         </div>
65
       </div>
69
       </div>
66
 
70
 
68
         <el-table
72
         <el-table
69
           :row-style="{ color: '#303133' }"
73
           :row-style="{ color: '#303133' }"
70
           :header-cell-style="{
74
           :header-cell-style="{
71
-              backgroundColor: 'rgb(245, 247, 250)',
72
-              color: '#606266'
75
+            backgroundColor: 'rgb(245, 247, 250)',
76
+            color: '#606266',
73
           }"
77
           }"
74
           :data="recordInfo.tableList"
78
           :data="recordInfo.tableList"
75
           :class="signAndWeighBoxPatients"
79
           :class="signAndWeighBoxPatients"
130
             </template>
134
             </template>
131
           </el-table-column>
135
           </el-table-column>
132
 
136
 
133
-        <el-table-column label="单位" align="center" width="120px">
137
+          <el-table-column label="单位" align="center" width="120px">
134
             <template slot="header" slot-scope="scope">
138
             <template slot="header" slot-scope="scope">
135
-                <span>单位<span style="color: red">*</span></span>
139
+              <span>单位<span style="color: red">*</span></span>
136
             </template>
140
             </template>
137
             <template slot-scope="scope">
141
             <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
142
+              <el-form-item
143
+                :prop="'tableList.' + scope.$index + '.supply_unit'"
144
+                :rules="tableRules.supply_unit"
145
+              >
146
+                <el-select
147
+                  v-model="scope.row.supply_unit"
148
+                  style="width: 100px"
149
+                  filterable
150
+                  placeholder="请选择"
151
+                  :disabled="disabled"
152
+                >
153
+                  <!-- <el-option
141
                             v-for="(item,index) in scope.row.unitList"
154
                             v-for="(item,index) in scope.row.unitList"
142
                             :key="index"
155
                             :key="index"
143
                             :label="item.name"
156
                             :label="item.name"
144
                             :value="item.name">
157
                             :value="item.name">
145
                         </el-option> -->
158
                         </el-option> -->
146
                 </el-select>
159
                 </el-select>
147
-              </el-form-item>  
160
+              </el-form-item>
148
             </template>
161
             </template>
149
           </el-table-column>
162
           </el-table-column>
150
           <el-table-column label="可用库存" align="center" width="130px">
163
           <el-table-column label="可用库存" align="center" width="130px">
168
           <el-table-column label="数量" align="center" width="120px">
181
           <el-table-column label="数量" align="center" width="120px">
169
             <template slot="header" slot-scope="scope">
182
             <template slot="header" slot-scope="scope">
170
               <span>数量<span style="color: red">*</span></span>
183
               <span>数量<span style="color: red">*</span></span>
171
-
172
             </template>
184
             </template>
173
             <template slot-scope="scope">
185
             <template slot-scope="scope">
174
               <el-form-item
186
               <el-form-item
254
             </template>
266
             </template>
255
           </el-table-column>
267
           </el-table-column>
256
 
268
 
257
-          <el-table-column label="操作" align="center" width="150px" fixed="right">
269
+          <el-table-column
270
+            label="操作"
271
+            align="center"
272
+            width="150px"
273
+            fixed="right"
274
+          >
258
             <template slot-scope="scope">
275
             <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>
276
+              <el-tooltip
277
+                class="item"
278
+                effect="dark"
279
+                content="新增"
280
+                placement="top"
281
+              >
282
+                <el-button
283
+                  size="mini"
284
+                  type="primary"
285
+                  icon="el-icon-circle-plus-outline"
286
+                  @click="handleEdit(scope.$index, scope.row)"
287
+                >
288
+                </el-button>
289
+              </el-tooltip>
290
+              <el-tooltip
291
+                class="item"
292
+                effect="dark"
293
+                content="删除"
294
+                placement="top"
295
+              >
296
+                <el-button
297
+                  size="mini"
298
+                  type="danger"
299
+                  icon="el-icon-delete"
300
+                  @click="handleDelete(scope.$index, scope.row)"
301
+                >
302
+                </el-button>
274
               </el-tooltip>
303
               </el-tooltip>
275
             </template>
304
             </template>
276
-         </el-table-column>
305
+          </el-table-column>
277
         </el-table>
306
         </el-table>
278
       </el-form>
307
       </el-form>
279
       <div style="margin-top: 10px">
308
       <div style="margin-top: 10px">
285
         >
314
         >
286
         </el-input>
315
         </el-input>
287
       </div>
316
       </div>
317
+      <div style="margin-top: 10px">合计:{{ getAllPrice() }} 元</div>
288
       <div style="margin-top: 10px">
318
       <div style="margin-top: 10px">
289
         <span
319
         <span
290
           >优惠率:<el-input
320
           >优惠率:<el-input
291
             style="width: 100px"
321
             style="width: 100px"
292
             v-model="rate_of_concession"
322
             v-model="rate_of_concession"
323
+            @input="addressChange"
324
+            placeholder="请输入优惠率"
293
           ></el-input
325
           ></el-input
294
           >%</span
326
           >%</span
295
         >
327
         >
298
           >优惠金额:<el-input
330
           >优惠金额:<el-input
299
             style="width: 100px"
331
             style="width: 100px"
300
             v-model="discount_amount"
332
             v-model="discount_amount"
333
+            @input="count_discount"
334
+            placeholder="请输入优惠金额"
301
           ></el-input
335
           ></el-input
302
         ></span>
336
         ></span>
303
 
337
 
305
           >本次付款:<el-input
339
           >本次付款:<el-input
306
             style="width: 100px"
340
             style="width: 100px"
307
             v-model="payment"
341
             v-model="payment"
342
+            @input="count_payment"
343
+            placeholder="请输入本次付款"
308
           ></el-input
344
           ></el-input
309
         ></span>
345
         ></span>
310
 
346
 
312
           >本次欠款:<el-input
348
           >本次欠款:<el-input
313
             style="width: 100px"
349
             style="width: 100px"
314
             v-model="arrearage"
350
             v-model="arrearage"
351
+            @input="count_arrearage"
352
+            placeholder="请输入本次欠款"
315
           ></el-input
353
           ></el-input
316
         ></span>
354
         ></span>
317
       </div>
355
       </div>
338
   getInitOrder,
376
   getInitOrder,
339
   getGoodReturnDetail,
377
   getGoodReturnDetail,
340
   updateGoodReturn,
378
   updateGoodReturn,
341
-  checkReturnOrder
379
+  checkReturnOrder,
342
 } from "@/api/supply";
380
 } from "@/api/supply";
343
 export default {
381
 export default {
344
   name: "addPurchaseOrder",
382
   name: "addPurchaseOrder",
347
   },
385
   },
348
   data() {
386
   data() {
349
     return {
387
     return {
350
-      tipsInfo:"",
388
+      tipsInfo: "",
351
       crumbs: [
389
       crumbs: [
352
         { path: false, name: "退货单" },
390
         { path: false, name: "退货单" },
353
         { path: "/good/return/add", name: "新增退货单" },
391
         { path: "/good/return/add", name: "新增退货单" },
381
       supplier_name: "",
419
       supplier_name: "",
382
       supplyList: [],
420
       supplyList: [],
383
       rate_of_concession: "",
421
       rate_of_concession: "",
384
-      arrearage:"",
385
-      payment:"",
422
+      arrearage: "",
423
+      payment: "",
386
       discount_amount: "",
424
       discount_amount: "",
387
       tableRules: {
425
       tableRules: {
388
         name: [{ required: true, message: "商品不能为空", trigger: "blur" }],
426
         name: [{ required: true, message: "商品不能为空", trigger: "blur" }],
399
       disabled: false,
437
       disabled: false,
400
       is_check: 0,
438
       is_check: 0,
401
       dialogVisible: false,
439
       dialogVisible: false,
402
-      return_remark:"",
403
-      warehouse_out_id:0,
440
+      return_remark: "",
441
+      warehouse_out_id: 0,
404
     };
442
     };
405
   },
443
   },
406
   methods: {
444
   methods: {
579
       tempObj["is_total"] = 1;
617
       tempObj["is_total"] = 1;
580
       tempObj["project_id"] = 0;
618
       tempObj["project_id"] = 0;
581
       tempObj["supply_unit"] = "";
619
       tempObj["supply_unit"] = "";
582
-      tempObj["supply_batch_number"] = ""
583
-      tempObj["supply_product_date"] = ""
584
-      tempObj["supply_expiry_date"] = ""
585
-      tempObj["warehousing_id"] =0
586
-      tempObj["warehouse_info_id"] =0
620
+      tempObj["supply_batch_number"] = "";
621
+      tempObj["supply_product_date"] = "";
622
+      tempObj["supply_expiry_date"] = "";
623
+      tempObj["warehousing_id"] = 0;
624
+      tempObj["warehouse_info_id"] = 0;
587
       this.recordInfo.tableList.push(tempObj);
625
       this.recordInfo.tableList.push(tempObj);
588
     },
626
     },
589
     handleDelete: function (index, row) {
627
     handleDelete: function (index, row) {
714
           this.recordInfo.tableList[i].supply_price *
752
           this.recordInfo.tableList[i].supply_price *
715
           this.recordInfo.tableList[i].supply_count;
753
           this.recordInfo.tableList[i].supply_count;
716
       }
754
       }
755
+      this.total_price = total_price;
717
       return total_price.toFixed(2);
756
       return total_price.toFixed(2);
718
     },
757
     },
758
+
759
+    addressChange() {
760
+      var discount_amount = 0;
761
+      if (this.rate_of_concession > 0) {
762
+        discount_amount = (
763
+          (this.rate_of_concession / 100) *
764
+          this.total_price
765
+        ).toFixed(2);
766
+      }
767
+      this.discount_amount = discount_amount;
768
+    },
769
+    count_discount() {
770
+      this.rate_of_concession = (
771
+        this.discount_amount /
772
+        (this.total_price * 0.01)
773
+      ).toFixed(2);
774
+    },
775
+    count_payment() {
776
+      this.arrearage = this.total_price - this.payment;
777
+    },
778
+
779
+    count_arrearage() {
780
+      this.payment = this.total_price - this.arrearage;
781
+    },
782
+
719
     checkPurchaseOrder(id, index) {
783
     checkPurchaseOrder(id, index) {
720
       this.$confirm("是否审核?", {
784
       this.$confirm("是否审核?", {
721
         confirmButtonText: "确 定",
785
         confirmButtonText: "确 定",
734
         })
798
         })
735
         .catch(() => {});
799
         .catch(() => {});
736
     },
800
     },
737
-    getGoodReturnDetail(){
738
-      
739
-      var id = this.$route.query.id
740
-      getGoodReturnDetail(id).then(response=>{
741
-        if(response.data.state == 1){
742
-          var out = response.data.data.cancelDetail
743
-          console.log("out23322323232323",out)
744
-          this.warehouse_out_id = out.warehouse_out_id
745
-          this.is_check = out.is_check
746
-          this.id = out.id
747
-          this.supplier_name = out.supplier_id
748
-          this.rate_of_concession = out.rate_of_concession
749
-          this.discount_amount = out.discount_amount
750
-          this.payment = out.payment
751
-          this.arrearage = out.arrearage
752
-          this.start_time = this.getTimes(out.document_date)
753
-          var orderInfo = response.data.data.orderCancelDetail
754
-          console.log("orderINFO233232232332",orderInfo)
755
-          var drugList = response.data.data.drugList
756
-          var goodList = response.data.data.goodList
757
-          for(let i=0;i< orderInfo.length;i++){
758
-              
759
-              orderInfo[i].supply_count =  orderInfo[i].count
760
-              orderInfo[i].supply_price =  orderInfo[i].price
761
-              orderInfo[i].supply_remake =  orderInfo[i].remark
762
-              orderInfo[i].type =  orderInfo[i].is_source
763
-              orderInfo[i].project_id =  orderInfo[i].project_id
764
-              orderInfo[i].supply_unit =  orderInfo[i].supply_unit
765
-              orderInfo[i].order_number =  orderInfo[i].order_number
766
-              orderInfo[i].good_number = orderInfo[i].good_number
767
-              orderInfo[i].supply_total_price = (orderInfo[i].count * orderInfo[i].price).toFixed(2)
768
-              orderInfo[i].supply_expiry_date =  orderInfo[i].supply_expiry_date
769
-              orderInfo[i].supply_product_date = orderInfo[i].supply_product_date
770
-            if(orderInfo[i].is_source == 1){
771
-              for(let j=0;j<drugList.length;j++){
772
-                  if( orderInfo[i].project_id == drugList[j].id){
773
-                    if(drugList[j].max_unit!=drugList[j].min_unit){
774
-                      orderInfo[i].unitList = [{id:1,name:""},{id:2,name:""}]
775
-                      orderInfo[i].unitList[0].name = drugList[j].max_unit
776
-                      orderInfo[i].unitList[1].name = drugList[j].min_unit
777
-                    }
778
-                    if(drugList[j].max_unit ==drugList[j].min_unit){
779
-                      orderInfo[i].unitList = [{id:1,name:""}]
780
-                      orderInfo[i].unitList[0].name = drugList[j].max_unit
781
-                    }
782
-                  
801
+    getGoodReturnDetail() {
802
+      var id = this.$route.query.id;
803
+      getGoodReturnDetail(id).then((response) => {
804
+        if (response.data.state == 1) {
805
+          var out = response.data.data.cancelDetail;
806
+          console.log("out23322323232323", out);
807
+          this.warehouse_out_id = out.warehouse_out_id;
808
+          this.is_check = out.is_check;
809
+          this.id = out.id;
810
+          this.supplier_name = out.supplier_id;
811
+          this.rate_of_concession = out.rate_of_concession;
812
+          this.discount_amount = out.discount_amount;
813
+          this.payment = out.payment;
814
+          this.arrearage = out.arrearage;
815
+          this.start_time = this.getTimes(out.document_date);
816
+          var orderInfo = response.data.data.orderCancelDetail;
817
+          console.log("orderINFO233232232332", orderInfo);
818
+          var drugList = response.data.data.drugList;
819
+          var goodList = response.data.data.goodList;
820
+          for (let i = 0; i < orderInfo.length; i++) {
821
+            orderInfo[i].supply_count = orderInfo[i].count;
822
+            orderInfo[i].supply_price = orderInfo[i].price;
823
+            orderInfo[i].supply_remake = orderInfo[i].remark;
824
+            orderInfo[i].type = orderInfo[i].is_source;
825
+            orderInfo[i].project_id = orderInfo[i].project_id;
826
+            orderInfo[i].supply_unit = orderInfo[i].supply_unit;
827
+            orderInfo[i].order_number = orderInfo[i].order_number;
828
+            orderInfo[i].good_number = orderInfo[i].good_number;
829
+            orderInfo[i].supply_total_price = (
830
+              orderInfo[i].count * orderInfo[i].price
831
+            ).toFixed(2);
832
+            orderInfo[i].supply_expiry_date = orderInfo[i].supply_expiry_date;
833
+            orderInfo[i].supply_product_date = orderInfo[i].supply_product_date;
834
+            if (orderInfo[i].is_source == 1) {
835
+              for (let j = 0; j < drugList.length; j++) {
836
+                if (orderInfo[i].project_id == drugList[j].id) {
837
+                  if (drugList[j].max_unit != drugList[j].min_unit) {
838
+                    orderInfo[i].unitList = [
839
+                      { id: 1, name: "" },
840
+                      { id: 2, name: "" },
841
+                    ];
842
+                    orderInfo[i].unitList[0].name = drugList[j].max_unit;
843
+                    orderInfo[i].unitList[1].name = drugList[j].min_unit;
783
                   }
844
                   }
784
-              }  
785
-              } 
786
-            if(orderInfo[i].is_source == 2){
787
-              for(let j=0;j<goodList.length;j++){
788
-                  if(orderInfo[i].project_id == goodList[j].id){
789
-                      orderInfo[i].unitList = [{id:1,name:""}]
790
-                      orderInfo[i].unitList[0].name = goodList[j].packing_unit
845
+                  if (drugList[j].max_unit == drugList[j].min_unit) {
846
+                    orderInfo[i].unitList = [{ id: 1, name: "" }];
847
+                    orderInfo[i].unitList[0].name = drugList[j].max_unit;
791
                   }
848
                   }
792
-              }  
793
-            } 
849
+                }
850
+              }
851
+            }
852
+            if (orderInfo[i].is_source == 2) {
853
+              for (let j = 0; j < goodList.length; j++) {
854
+                if (orderInfo[i].project_id == goodList[j].id) {
855
+                  orderInfo[i].unitList = [{ id: 1, name: "" }];
856
+                  orderInfo[i].unitList[0].name = goodList[j].packing_unit;
857
+                }
858
+              }
859
+            }
794
           }
860
           }
795
-        
796
-          this.recordInfo.tableList= []
797
-          this.recordInfo.tableList = orderInfo
798
-        
861
+
862
+          this.recordInfo.tableList = [];
863
+          this.recordInfo.tableList = orderInfo;
799
         }
864
         }
800
-      })  
865
+      });
801
     },
866
     },
802
     toPrint() {
867
     toPrint() {
803
       var id = this.$route.query.id;
868
       var id = this.$route.query.id;
804
       this.$router.push({ path: "/purchase/order/print?&id=" + id });
869
       this.$router.push({ path: "/purchase/order/print?&id=" + id });
805
     },
870
     },
806
-    updateGoodReturn(){
871
+    updateGoodReturn() {
807
       var warehouse_out_id = this.$route.query.id;
872
       var warehouse_out_id = this.$route.query.id;
808
-      this.$refs["tableForm"].validate((valid)=>{
809
-        if(valid){
810
-          this.loading = true
811
-          for(let i=0;i<this.recordInfo.tableList.length;i++){
812
-            this.recordInfo.tableList[i].supply_count = parseInt(this.recordInfo.tableList[i].supply_count)
813
-            this.recordInfo.tableList[i].supply_price = this.recordInfo.tableList[i].supply_price.toString()
814
-            this.recordInfo.tableList[i].supply_total = this.recordInfo.tableList[i].supply_total.toString()
815
-       
816
-            for(let j=0;j<this.manufactuerList.length;j++){
817
-                if(this.recordInfo.tableList[i].supply_manufacturer == this.manufactuerList[j].manufacturer_name){
818
-                  this.recordInfo.tableList[i].manufacturer_id = this.manufactuerList[j].id
819
-                }
820
-                if(this.recordInfo.tableList[i].supply_manufacturer == this.manufactuerList[j].id){
821
-                  this.recordInfo.tableList[i].supply_manufacturer = this.manufactuerList[j].manufacturer_name
822
-                }
873
+      this.$refs["tableForm"].validate((valid) => {
874
+        if (valid) {
875
+          this.loading = true;
876
+          for (let i = 0; i < this.recordInfo.tableList.length; i++) {
877
+            this.recordInfo.tableList[i].supply_count = parseInt(
878
+              this.recordInfo.tableList[i].supply_count
879
+            );
880
+            this.recordInfo.tableList[i].supply_price =
881
+              this.recordInfo.tableList[i].supply_price.toString();
882
+            this.recordInfo.tableList[i].supply_total =
883
+              this.recordInfo.tableList[i].supply_total.toString();
823
 
884
 
885
+            for (let j = 0; j < this.manufactuerList.length; j++) {
886
+              if (
887
+                this.recordInfo.tableList[i].supply_manufacturer ==
888
+                this.manufactuerList[j].manufacturer_name
889
+              ) {
890
+                this.recordInfo.tableList[i].manufacturer_id =
891
+                  this.manufactuerList[j].id;
892
+              }
893
+              if (
894
+                this.recordInfo.tableList[i].supply_manufacturer ==
895
+                this.manufactuerList[j].id
896
+              ) {
897
+                this.recordInfo.tableList[i].supply_manufacturer =
898
+                  this.manufactuerList[j].manufacturer_name;
899
+              }
824
             }
900
             }
825
           }
901
           }
826
           var params = {
902
           var params = {
827
-            "stockIn":this.recordInfo.tableList,
828
-            "return_marke":this.return_remark,
829
-          }
830
-          console.log("start_time232233232",this.start_time)
831
-          console.log("arrage2323322323",this.arrearage)
832
-          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=>{
833
-            if(response.data.state == 1){
834
-               var msg = response.data.msg
835
-               this.loading = false
836
-               this.$message.success("保存成功!")
903
+            stockIn: this.recordInfo.tableList,
904
+            return_marke: this.return_remark,
905
+          };
906
+          console.log("start_time232233232", this.start_time);
907
+          console.log("arrage2323322323", this.arrearage);
908
+          updateGoodReturn(
909
+            params,
910
+            warehouse_out_id,
911
+            this.start_time,
912
+            this.rate_of_concession,
913
+            this.discount_amount,
914
+            this.arrearage,
915
+            this.payment,
916
+            this.supplier_name,
917
+            this.number
918
+          ).then((response) => {
919
+            if (response.data.state == 1) {
920
+              var msg = response.data.msg;
921
+              this.loading = false;
922
+              this.$message.success("保存成功!");
837
             }
923
             }
838
-          })
924
+          });
839
         }
925
         }
840
-      })
926
+      });
927
+    },
928
+    checkReturnOrder() {
929
+      var params = {
930
+        warehouse_out_id: this.warehouse_out_id,
931
+        id: this.id,
932
+      };
933
+      checkReturnOrder(params).then((response) => {});
841
     },
934
     },
842
-    checkReturnOrder(){
843
-     var params = {
844
-       warehouse_out_id:this.warehouse_out_id,
845
-       id:this.id,
846
-     }
847
-     checkReturnOrder(params).then(response=>{
848
-       if(response.data.state == 1){
849
-        var msg = response.data.data.msg
850
-        this.$message.success("保存成功!")
851
-       }
852
-     })
853
-    }
854
   },
935
   },
855
   created() {
936
   created() {
856
     const tempObj = {};
937
     const tempObj = {};
870
     tempObj["is_total"] = 1;
951
     tempObj["is_total"] = 1;
871
     tempObj["project_id"] = 0;
952
     tempObj["project_id"] = 0;
872
     tempObj["supply_unit"] = "";
953
     tempObj["supply_unit"] = "";
873
-    tempObj["supply_batch_number"] = ""
874
-    tempObj["supply_product_date"] = ""
875
-    tempObj["supply_expiry_date"] = ""
876
-    tempObj["warehousing_id"] =0
877
-    tempObj["warehouse_info_id"] =0
954
+    tempObj["supply_batch_number"] = "";
955
+    tempObj["supply_product_date"] = "";
956
+    tempObj["supply_expiry_date"] = "";
957
+    tempObj["warehousing_id"] = 0;
958
+    tempObj["warehouse_info_id"] = 0;
878
     this.recordInfo.tableList.push(tempObj);
959
     this.recordInfo.tableList.push(tempObj);
879
     this.getInitOrder();
960
     this.getInitOrder();
880
     //获取购货单列表
961
     //获取购货单列表

+ 2 - 2
src/xt_pages/supply/supplyQuery.vue Visa fil

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