|
@@ -60,7 +60,8 @@
|
60
|
60
|
</div>
|
61
|
61
|
<div>
|
62
|
62
|
<el-button size="small" type="primary" @click="updateGoodReturn">保存</el-button>
|
63
|
|
- <el-button size="small" type="primary" @click="checkReturnOrder">审核</el-button>
|
|
63
|
+ <el-button size="small" type="primary" @click="checkReturnOrder" v-if="is_check == 2">审核</el-button>
|
|
64
|
+ <el-button size="small" type="primary" @click="modefyReturnOrder" v-if="is_check == 1">反审核</el-button>
|
64
|
65
|
</div>
|
65
|
66
|
</div>
|
66
|
67
|
|
|
@@ -159,7 +160,7 @@
|
159
|
160
|
<el-table-column label="可退数量" align="center" width="200px">
|
160
|
161
|
<template slot-scope="scope">
|
161
|
162
|
<el-input
|
162
|
|
- v-model="scope.row.supply_specification_name"
|
|
163
|
+ v-model="scope.row.count"
|
163
|
164
|
style="width: 150px"
|
164
|
165
|
:disabled="true"
|
165
|
166
|
></el-input>
|
|
@@ -168,7 +169,6 @@
|
168
|
169
|
<el-table-column label="数量" align="center" width="120px">
|
169
|
170
|
<template slot="header" slot-scope="scope">
|
170
|
171
|
<span>数量<span style="color: red">*</span></span>
|
171
|
|
-
|
172
|
172
|
</template>
|
173
|
173
|
<template slot-scope="scope">
|
174
|
174
|
<el-form-item
|
|
@@ -338,7 +338,9 @@ import {
|
338
|
338
|
getInitOrder,
|
339
|
339
|
getGoodReturnDetail,
|
340
|
340
|
updateGoodReturn,
|
341
|
|
- checkReturnOrder
|
|
341
|
+ checkReturnOrder,
|
|
342
|
+ deleteReturnOrderById,
|
|
343
|
+ modefyReturnOrder
|
342
|
344
|
} from "@/api/supply";
|
343
|
345
|
export default {
|
344
|
346
|
name: "addPurchaseOrder",
|
|
@@ -584,22 +586,42 @@ export default {
|
584
|
586
|
tempObj["supply_expiry_date"] = ""
|
585
|
587
|
tempObj["warehousing_id"] =0
|
586
|
588
|
tempObj["warehouse_info_id"] =0
|
|
589
|
+ tempObj["count"] = ""
|
587
|
590
|
this.recordInfo.tableList.push(tempObj);
|
588
|
591
|
},
|
589
|
592
|
handleDelete: function (index, row) {
|
590
|
|
- if (this.recordInfo.tableList.length <= 1) {
|
591
|
|
- this.$message.error("只有一条记录的时候无法删除");
|
592
|
|
- return;
|
593
|
|
- } else {
|
594
|
|
- this.recordInfo.tableList.splice(index, 1);
|
|
593
|
+ if(row.id == 0){
|
|
594
|
+ if (this.recordInfo.tableList.length <= 1) {
|
|
595
|
+ this.$message.error("只有一条记录的时候无法删除");
|
|
596
|
+ return;
|
|
597
|
+ } else {
|
|
598
|
+ this.recordInfo.tableList.splice(index, 1);
|
|
599
|
+ }
|
|
600
|
+ }
|
|
601
|
+ if(row.id >0){
|
|
602
|
+ if(this.is_check == 1){
|
|
603
|
+ this.$message.error("已审核单据,不能删除!")
|
|
604
|
+ return false
|
|
605
|
+ }
|
|
606
|
+ this.$confirm('确认删除吗?', '删除', {
|
|
607
|
+ confirmButtonText: '确 定',
|
|
608
|
+ cancelButtonText: '取 消',
|
|
609
|
+ type: 'warning'
|
|
610
|
+ }).then(() => {
|
|
611
|
+ deleteReturnOrderById(val.id).then(response => {
|
|
612
|
+ if (response.data.state == 1) {
|
|
613
|
+ var msg = response.data.data.msg
|
|
614
|
+ this.recordInfo.tableList.splice(index, 1);
|
|
615
|
+ this.$message.success("删除成功")
|
|
616
|
+ } else {
|
|
617
|
+ this.$message.error("删除失败")
|
|
618
|
+ }
|
|
619
|
+ })
|
|
620
|
+ }).catch(() => {
|
|
621
|
+ })
|
595
|
622
|
}
|
|
623
|
+
|
596
|
624
|
},
|
597
|
|
-
|
598
|
|
- changeTypeName() {},
|
599
|
|
- startTimeChange() {},
|
600
|
|
- endTimeChange() {},
|
601
|
|
- search() {},
|
602
|
|
-
|
603
|
625
|
getWarehoseInfo(arr, max_unit, min_unit, min_number) {
|
604
|
626
|
var total = 0;
|
605
|
627
|
var max_str = "";
|
|
@@ -716,24 +738,6 @@ export default {
|
716
|
738
|
}
|
717
|
739
|
return total_price.toFixed(2);
|
718
|
740
|
},
|
719
|
|
- checkPurchaseOrder(id, index) {
|
720
|
|
- this.$confirm("是否审核?", {
|
721
|
|
- confirmButtonText: "确 定",
|
722
|
|
- cancelButtonText: "取 消",
|
723
|
|
- type: "warning",
|
724
|
|
- })
|
725
|
|
- .then(() => {
|
726
|
|
- checkPurchaseOrder(this.id).then((response) => {
|
727
|
|
- if (response.data.state == 1) {
|
728
|
|
- var info = response.data.data.info;
|
729
|
|
- this.disabled = true;
|
730
|
|
- this.$message.success("审核成功!");
|
731
|
|
- this.getPurchaseOrderDetail();
|
732
|
|
- }
|
733
|
|
- });
|
734
|
|
- })
|
735
|
|
- .catch(() => {});
|
736
|
|
- },
|
737
|
741
|
getGoodReturnDetail(){
|
738
|
742
|
|
739
|
743
|
var id = this.$route.query.id
|
|
@@ -742,6 +746,7 @@ export default {
|
742
|
746
|
var out = response.data.data.cancelDetail
|
743
|
747
|
console.log("out23322323232323",out)
|
744
|
748
|
this.warehouse_out_id = out.warehouse_out_id
|
|
749
|
+ this.number = out.number
|
745
|
750
|
this.is_check = out.is_check
|
746
|
751
|
this.id = out.id
|
747
|
752
|
this.supplier_name = out.supplier_id
|
|
@@ -751,12 +756,16 @@ export default {
|
751
|
756
|
this.arrearage = out.arrearage
|
752
|
757
|
this.start_time = this.getTimes(out.document_date)
|
753
|
758
|
var orderInfo = response.data.data.orderCancelDetail
|
754
|
|
- console.log("orderINFO233232232332",orderInfo)
|
|
759
|
+ if(out.is_check == 1){
|
|
760
|
+ this.disabled = true
|
|
761
|
+ }
|
|
762
|
+ console.log("退库单详情",orderInfo)
|
755
|
763
|
var drugList = response.data.data.drugList
|
756
|
764
|
var goodList = response.data.data.goodList
|
757
|
765
|
for(let i=0;i< orderInfo.length;i++){
|
758
|
|
-
|
|
766
|
+ orderInfo[i].id = orderInfo[i].id
|
759
|
767
|
orderInfo[i].supply_count = orderInfo[i].count
|
|
768
|
+ orderInfo[i].count = orderInfo[i].source_count
|
760
|
769
|
orderInfo[i].supply_price = orderInfo[i].price
|
761
|
770
|
orderInfo[i].supply_remake = orderInfo[i].remark
|
762
|
771
|
orderInfo[i].type = orderInfo[i].is_source
|
|
@@ -812,7 +821,7 @@ export default {
|
812
|
821
|
this.recordInfo.tableList[i].supply_count = parseInt(this.recordInfo.tableList[i].supply_count)
|
813
|
822
|
this.recordInfo.tableList[i].supply_price = this.recordInfo.tableList[i].supply_price.toString()
|
814
|
823
|
this.recordInfo.tableList[i].supply_total = this.recordInfo.tableList[i].supply_total.toString()
|
815
|
|
-
|
|
824
|
+
|
816
|
825
|
for(let j=0;j<this.manufactuerList.length;j++){
|
817
|
826
|
if(this.recordInfo.tableList[i].supply_manufacturer == this.manufactuerList[j].manufacturer_name){
|
818
|
827
|
this.recordInfo.tableList[i].manufacturer_id = this.manufactuerList[j].id
|
|
@@ -824,11 +833,11 @@ export default {
|
824
|
833
|
}
|
825
|
834
|
}
|
826
|
835
|
var params = {
|
827
|
|
- "stockIn":this.recordInfo.tableList,
|
828
|
|
- "return_marke":this.return_remark,
|
|
836
|
+ stockIn:this.recordInfo.tableList,
|
|
837
|
+ return_marke:this.return_remark,
|
829
|
838
|
}
|
830
|
839
|
console.log("start_time232233232",this.start_time)
|
831
|
|
- console.log("arrage2323322323",this.arrearage)
|
|
840
|
+ console.log("arrage2323322323",params)
|
832
|
841
|
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
|
842
|
if(response.data.state == 1){
|
834
|
843
|
var msg = response.data.msg
|
|
@@ -840,16 +849,30 @@ export default {
|
840
|
849
|
})
|
841
|
850
|
},
|
842
|
851
|
checkReturnOrder(){
|
|
852
|
+ this.loading = true
|
843
|
853
|
var params = {
|
844
|
854
|
warehouse_out_id:this.warehouse_out_id,
|
845
|
855
|
id:this.id,
|
846
|
856
|
}
|
847
|
857
|
checkReturnOrder(params).then(response=>{
|
848
|
858
|
if(response.data.state == 1){
|
|
859
|
+ this.loading = false
|
849
|
860
|
var msg = response.data.data.msg
|
850
|
861
|
this.$message.success("保存成功!")
|
851
|
862
|
}
|
852
|
863
|
})
|
|
864
|
+ },
|
|
865
|
+ modefyReturnOrder(){
|
|
866
|
+ this.loading = true
|
|
867
|
+ var params = {
|
|
868
|
+ warehouse_out_id:this.warehouse_out_id,
|
|
869
|
+ id:this.id,
|
|
870
|
+ }
|
|
871
|
+ modefyReturnOrder(params).then(response=>{
|
|
872
|
+ if(response.data.state == 1){
|
|
873
|
+
|
|
874
|
+ }
|
|
875
|
+ })
|
853
|
876
|
}
|
854
|
877
|
},
|
855
|
878
|
created() {
|
|
@@ -875,6 +898,7 @@ export default {
|
875
|
898
|
tempObj["supply_expiry_date"] = ""
|
876
|
899
|
tempObj["warehousing_id"] =0
|
877
|
900
|
tempObj["warehouse_info_id"] =0
|
|
901
|
+ tempObj["count"] = ""
|
878
|
902
|
this.recordInfo.tableList.push(tempObj);
|
879
|
903
|
this.getInitOrder();
|
880
|
904
|
//获取购货单列表
|