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