|
@@ -58,10 +58,8 @@
|
58
|
58
|
v-show="showTwo"
|
59
|
59
|
>保存</el-button
|
60
|
60
|
>
|
61
|
|
- <el-button size="small" type="primary" @click="checkReturnOrder">审核</el-button>
|
62
|
|
- <!-- <el-button size="small" type="primary" @click="toPrint">打印</el-button>
|
63
|
|
- <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 == 1" @click="checkPurchaseOrder">反审核</el-button> -->
|
|
61
|
+ <el-button size="small" type="primary" v-if="is_check == 2" @click="checkReturnOrder">审核</el-button>
|
|
62
|
+ <el-button size="small" type="primary" v-if="is_check == 1" @click="modefyReturnOrder">反审核</el-button>
|
65
|
63
|
</div>
|
66
|
64
|
</div>
|
67
|
65
|
|
|
@@ -374,7 +372,8 @@ import {
|
374
|
372
|
getGoodOrderDetail,
|
375
|
373
|
saveGoodReturnOrder,
|
376
|
374
|
checkReturnOrder,
|
377
|
|
- updateGoodReturn
|
|
375
|
+ updateGoodReturn,
|
|
376
|
+ modefyReturnOrder
|
378
|
377
|
} from "@/api/supply";
|
379
|
378
|
export default {
|
380
|
379
|
name: "addPurchaseOrder",
|
|
@@ -435,6 +434,8 @@ export default {
|
435
|
434
|
dialogVisible: false,
|
436
|
435
|
return_remark: "",
|
437
|
436
|
warehouse_out_id:0,
|
|
437
|
+ showThree:false,
|
|
438
|
+ tableDataList:[],
|
438
|
439
|
};
|
439
|
440
|
},
|
440
|
441
|
watch: {
|
|
@@ -752,7 +753,6 @@ export default {
|
752
|
753
|
getGoodOrderDetail(id).then((response) => {
|
753
|
754
|
if (response.data.state == 1) {
|
754
|
755
|
var out = response.data.data.out;
|
755
|
|
- this.is_check = out.is_check;
|
756
|
756
|
this.id = out.id;
|
757
|
757
|
this.supplier_name = out.supplier_id;
|
758
|
758
|
this.rate_of_concession = out.rate_of_concession;
|
|
@@ -811,6 +811,8 @@ export default {
|
811
|
811
|
|
812
|
812
|
this.recordInfo.tableList = [];
|
813
|
813
|
this.recordInfo.tableList = orderInfo;
|
|
814
|
+ this.tableDataList = []
|
|
815
|
+ this.tableDataList = orderInfo
|
814
|
816
|
}
|
815
|
817
|
});
|
816
|
818
|
},
|
|
@@ -844,17 +846,30 @@ export default {
|
844
|
846
|
|
845
|
847
|
}
|
846
|
848
|
}
|
|
849
|
+ //判断是否在采购单数据中做了删除,如果长度相等则代表没有删除,如果不等则代表做了删除或者新增
|
|
850
|
+ if(this.recordInfo.tableList.length != this.tableDataList.length){
|
|
851
|
+ warehouse_out_id = 0
|
|
852
|
+ for(let i=0;i<this.recordInfo.tableList.length;i++){
|
|
853
|
+ this.recordInfo.tableList[i].id = 0
|
|
854
|
+ this.recordInfo.tableList[i].warehouse_info_id = 0
|
|
855
|
+ this.recordInfo.tableList[i].warehouse_out_id = 0
|
|
856
|
+ this.recordInfo.tableList[i].warehousing_id = 0
|
|
857
|
+ this.recordInfo.tableList[i].good_number = ""
|
|
858
|
+ this.recordInfo.tableList[i].order_number = ""
|
|
859
|
+ }
|
|
860
|
+ }
|
847
|
861
|
var params = {
|
848
|
862
|
stockIn:this.recordInfo.tableList,
|
849
|
863
|
return_marke:this.return_remark,
|
850
|
864
|
}
|
851
|
865
|
console.log("2323323232",params)
|
852
|
|
-
|
|
866
|
+ return
|
853
|
867
|
saveGoodReturnOrder(params,warehouse_out_id,this.start_time,this.rate_of_concession,this.discount_amount,this.arrearage,this.payment,this.supplier_name).then(response=>{
|
854
|
868
|
if(response.data.state == 1){
|
855
|
869
|
this.loading = false
|
856
|
870
|
this.showOne = false
|
857
|
871
|
this.showTwo = true
|
|
872
|
+ this.is_check = 2
|
858
|
873
|
this.$message.success("保存成功!")
|
859
|
874
|
var warehouseCancel = response.data.data.warehouseCancel
|
860
|
875
|
var out = response.data.data.cancelOrder
|
|
@@ -958,11 +973,28 @@ export default {
|
958
|
973
|
checkReturnOrder(params).then(response=>{
|
959
|
974
|
if(response.data.state == 1){
|
960
|
975
|
this.loading = false
|
|
976
|
+ this.showThree = false
|
|
977
|
+ this.is_check = 1
|
961
|
978
|
var msg = response.data.data.msg
|
962
|
979
|
this.$message.success("保存成功!")
|
963
|
980
|
}
|
964
|
981
|
})
|
965
|
|
- }
|
|
982
|
+ },
|
|
983
|
+ modefyReturnOrder() {
|
|
984
|
+ this.loading = true;
|
|
985
|
+ var params = {
|
|
986
|
+ warehouse_out_id: this.warehouse_out_id,
|
|
987
|
+ id: this.id,
|
|
988
|
+ };
|
|
989
|
+ modefyReturnOrder(params).then((response) => {
|
|
990
|
+ if (response.data.state == 1) {
|
|
991
|
+ this.loading = false;
|
|
992
|
+ var msg = response.data.data.msg;
|
|
993
|
+ this.$message.success("反审核成功!");
|
|
994
|
+ this.is_check = 2
|
|
995
|
+ }
|
|
996
|
+ });
|
|
997
|
+ },
|
966
|
998
|
|
967
|
999
|
},
|
968
|
1000
|
created() {
|