|
@@ -46,11 +46,8 @@
|
46
|
46
|
<span>单据编码:{{ good_number }}</span>
|
47
|
47
|
</div>
|
48
|
48
|
|
49
|
|
- <el-button size="small" type="primary" @click="updateGoodOrder">保存</el-button>
|
50
|
|
- <div style="display: flex;" >
|
51
|
|
- <el-button size="small" type="primary" @click="updateGoodOrder"
|
52
|
|
- >保存</el-button
|
53
|
|
- >
|
|
49
|
+ <div style="display: flex;" >
|
|
50
|
+ <el-button size="small" type="primary" @click="updateGoodOrder">保存</el-button>
|
54
|
51
|
<el-button
|
55
|
52
|
size="small"
|
56
|
53
|
type="primary"
|
|
@@ -478,9 +475,7 @@ export default {
|
478
|
475
|
showOne: true,
|
479
|
476
|
showTwo: false,
|
480
|
477
|
showThree: false,
|
481
|
|
- recordInfo: {
|
482
|
|
- tableList: [],
|
483
|
|
- },
|
|
478
|
+ recordInfo: {tableList: []},
|
484
|
479
|
keywords: "",
|
485
|
480
|
total: 0,
|
486
|
481
|
multipleSelection: [],
|
|
@@ -700,6 +695,10 @@ export default {
|
700
|
695
|
}
|
701
|
696
|
},
|
702
|
697
|
handleEdit() {
|
|
698
|
+ if (this.is_check == 1) {
|
|
699
|
+ this.$message.error("已审核的不能新增!");
|
|
700
|
+ return false;
|
|
701
|
+ }
|
703
|
702
|
const tempObj = {};
|
704
|
703
|
tempObj["id"] = 0;
|
705
|
704
|
tempObj["name"] = "";
|
|
@@ -893,6 +892,7 @@ export default {
|
893
|
892
|
var drugList = response.data.data.drugList;
|
894
|
893
|
var goodList = response.data.data.goodList;
|
895
|
894
|
for (let i = 0; i < orderInfo.length; i++) {
|
|
895
|
+ orderInfo[i].id = orderInfo[i].id
|
896
|
896
|
orderInfo[i].supply_count = orderInfo[i].count;
|
897
|
897
|
orderInfo[i].supply_price = orderInfo[i].price;
|
898
|
898
|
orderInfo[i].supply_remake = orderInfo[i].remark;
|
|
@@ -900,9 +900,7 @@ export default {
|
900
|
900
|
orderInfo[i].project_id = orderInfo[i].project_id;
|
901
|
901
|
orderInfo[i].supply_unit = orderInfo[i].supply_unit;
|
902
|
902
|
orderInfo[i].order_number = orderInfo[i].order_number;
|
903
|
|
- orderInfo[i].supply_total_price = (
|
904
|
|
- orderInfo[i].count * orderInfo[i].price
|
905
|
|
- ).toFixed(2);
|
|
903
|
+ orderInfo[i].supply_total_price = (orderInfo[i].count * orderInfo[i].price).toFixed(2);
|
906
|
904
|
orderInfo[i].supply_expiry_date = this.getTimes(
|
907
|
905
|
orderInfo[i].supply_expiry_date
|
908
|
906
|
);
|
|
@@ -936,12 +934,42 @@ export default {
|
936
|
934
|
}
|
937
|
935
|
}
|
938
|
936
|
}
|
|
937
|
+ if(orderInfo.length == 0){
|
|
938
|
+ const tempObj = {};
|
|
939
|
+ tempObj["id"] = 0;
|
|
940
|
+ tempObj["name"] = "";
|
|
941
|
+ tempObj["supply_name"] = "";
|
|
942
|
+ tempObj["supply_type"] = "";
|
|
943
|
+ tempObj["supply_specification_name"] = "";
|
|
944
|
+ tempObj["supply_total"] = "";
|
|
945
|
+ tempObj["supply_count"] = "";
|
|
946
|
+ tempObj["supply_price"] = "";
|
|
947
|
+ tempObj["supply_total_price"] = "";
|
|
948
|
+ tempObj["supply_manufacturer"] = "";
|
|
949
|
+ tempObj["supply_license_number"] = "";
|
|
950
|
+ tempObj["supply_remake"] = "";
|
|
951
|
+ tempObj["type"] = 0;
|
|
952
|
+ tempObj["is_total"] = 1;
|
|
953
|
+ tempObj["project_id"] = 0;
|
|
954
|
+ tempObj["supply_unit"] = "";
|
|
955
|
+ tempObj["supply_batch_number"] = "";
|
|
956
|
+ tempObj["supply_product_date"] = "";
|
|
957
|
+ tempObj["order_number"] = "";
|
|
958
|
+ tempObj["supply_expiry_date"] = "";
|
|
959
|
+ tempObj["manufacturer_id"] = "";
|
|
960
|
+ tempObj["warehouse_info_id"] = "";
|
|
961
|
+ tempObj["warehousing_id"] = "";
|
|
962
|
+ tempObj["number"] = "";
|
|
963
|
+ tempObj["good_number"] = "";
|
|
964
|
+ this.recordInfo.tableList = [];
|
|
965
|
+ this.recordInfo.tableList.push(tempObj);
|
|
966
|
+ }else{
|
|
967
|
+ this.recordInfo.tableList = [];
|
|
968
|
+ this.recordInfo.tableList = orderInfo;
|
|
969
|
+ this.tableDataList = []
|
939
|
970
|
|
940
|
|
- this.recordInfo.tableList = [];
|
941
|
|
- this.recordInfo.tableList = orderInfo;
|
942
|
|
- this.tableDataList = []
|
943
|
|
- this.tableDataList = orderInfo
|
944
|
|
-
|
|
971
|
+ this.tableDataList = orderInfo
|
|
972
|
+ }
|
945
|
973
|
}
|
946
|
974
|
});
|
947
|
975
|
},
|
|
@@ -983,16 +1011,17 @@ export default {
|
983
|
1011
|
}
|
984
|
1012
|
//判断是否在采购订单数据中做了删除,如果长度相等则代表没有删除,如果不等则代表做了删除或者新增
|
985
|
1013
|
|
986
|
|
- if(this.tableDataList.length != this.recordInfo.tableList){
|
987
|
|
- warehousing_id = 0
|
|
1014
|
+ if(this.tableDataList.length != this.recordInfo.tableList.length){
|
|
1015
|
+
|
988
|
1016
|
for(let i=0;i<this.recordInfo.tableList.length;i++){
|
989
|
|
- this.recordInfo.tableList[i].id = 0
|
990
|
|
- this.recordInfo.tableDataList[i].order_number = ""
|
|
1017
|
+ this.recordInfo.tableList[i].warehousing_id = 0
|
|
1018
|
+ this.recordInfo.tableList[i].warehouse_info_id = 0
|
|
1019
|
+ this.recordInfo.tableList[i].order_number = ""
|
991
|
1020
|
this.number = ""
|
992
|
1021
|
}
|
993
|
1022
|
}
|
994
|
1023
|
console.log("param23322332323",params)
|
995
|
|
- return
|
|
1024
|
+
|
996
|
1025
|
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) => {
|
997
|
1026
|
if (response.data.state == 1) {
|
998
|
1027
|
this.loading = false;
|
|
@@ -1241,6 +1270,8 @@ export default {
|
1241
|
1270
|
var msg = response.data.data.msg;
|
1242
|
1271
|
if (msg == 1) {
|
1243
|
1272
|
this.$message.success("反审核成功!");
|
|
1273
|
+ this.disabled = false
|
|
1274
|
+ this.Reviewed = false
|
1244
|
1275
|
return
|
1245
|
1276
|
}
|
1246
|
1277
|
if (msg == 2) {
|