|
@@ -351,7 +351,7 @@
|
351
|
351
|
import BreadCrumb from "../../components/bread-crumb";
|
352
|
352
|
import { getDataConfig, getDictionaryDataConfig } from "@/utils/data";
|
353
|
353
|
import { getAllDrugList, postSearchDrugList } from "@/api/data";
|
354
|
|
- import { getallPatientList,postSearchSelfDrugList,postSelfDrugWarehouseOut,getSelfDrugBatchNumber,getSelfDrugWarehouseOutById} from "@/api/drug/drug"
|
|
354
|
+ import { getallPatientList,postSearchSelfDrugList,modifySelfDrugWarehouseOut,getSelfDrugBatchNumber,getSelfDrugWarehouseOutById} from "@/api/drug/drug"
|
355
|
355
|
export default {
|
356
|
356
|
components: { BreadCrumb },
|
357
|
357
|
name: "stockIn",
|
|
@@ -473,6 +473,7 @@
|
473
|
473
|
showReturnCheck:false,
|
474
|
474
|
patientList:[],
|
475
|
475
|
patient_id:"",
|
|
476
|
+ numberList:[]
|
476
|
477
|
};
|
477
|
478
|
},
|
478
|
479
|
methods: {
|
|
@@ -808,11 +809,7 @@
|
808
|
809
|
this.recordInfo.recordData[i].warehouse_info_id = this.numberList[y].id;
|
809
|
810
|
}
|
810
|
811
|
}
|
811
|
|
- // for (let s = 0; s < this.doctorList.length; s++) {
|
812
|
|
- // if (this.recordInfo.recordData[i].admin_user_id == this.doctorList[s].user_name) {
|
813
|
|
- // this.recordInfo.recordData[i].admin_user_id = this.doctorList[s].admin_user_id;
|
814
|
|
- // }
|
815
|
|
- // }
|
|
812
|
+
|
816
|
813
|
|
817
|
814
|
this.recordInfo.recordData[i].last_price = 0
|
818
|
815
|
this.recordInfo.recordData[i].stock_count = this.recordInfo.recordData[i].stock_count.toString();
|
|
@@ -821,14 +818,14 @@
|
821
|
818
|
stockOut: this.recordInfo.recordData,
|
822
|
819
|
};
|
823
|
820
|
console.log("param22222222",params)
|
824
|
|
-
|
|
821
|
+ console.log("haaaaaaaaaaaaaaa",this.warehouse_out_time,)
|
825
|
822
|
const loading = this.$loading({
|
826
|
823
|
lock: true,
|
827
|
824
|
text: "Loading",
|
828
|
825
|
spinner: "el-icon-loading",
|
829
|
826
|
background: "rgba(0, 0, 0, 0.7)",
|
830
|
827
|
});
|
831
|
|
- postSelfDrugWarehouseOut(
|
|
828
|
+ modifySelfDrugWarehouseOut(
|
832
|
829
|
params,
|
833
|
830
|
this.warehouse_out_time,
|
834
|
831
|
this.form.dealer,
|
|
@@ -858,6 +855,7 @@
|
858
|
855
|
var dealerList = response.data.data.dealerList
|
859
|
856
|
var manufacturerList = response.data.data.manufacturerList
|
860
|
857
|
var drugTypeList = response.data.data.drugTypeList
|
|
858
|
+
|
861
|
859
|
for(let i=0;i<warehousingOutInfo.length;i++){
|
862
|
860
|
for(let j=0;j<dealerList.length;j++){
|
863
|
861
|
if(warehousingOutInfo[i].dealer == dealerList[j].id){
|
|
@@ -1165,9 +1163,80 @@
|
1165
|
1163
|
|
1166
|
1164
|
getSelfDrugWarehouseOutById(id){
|
1167
|
1165
|
getSelfDrugWarehouseOutById(id).then(response=>{
|
1168
|
|
-
|
|
1166
|
+ if(response.data.state ==1){
|
|
1167
|
+ var outInfo = response.data.data.outInfo
|
|
1168
|
+ this.manufacturerList = response.data.data.manufacturerList
|
|
1169
|
+ this.dealerList = response.data.data.dealerList
|
|
1170
|
+ this.drugTypeList = response.data.data.drugTypeList
|
|
1171
|
+ console.log("out_info",outInfo)
|
|
1172
|
+ const tempObj = {};
|
|
1173
|
+ this.patient_id = outInfo.patient_id
|
|
1174
|
+ this.warehouse_out_time = this.getTimeOne(outInfo.sys_record_time);
|
|
1175
|
+ this.warehouse_out_id = outInfo.warehouse_out_id
|
|
1176
|
+ tempObj["id"] = outInfo.id;
|
|
1177
|
+ tempObj["drug_id"] = outInfo.drug_id;
|
|
1178
|
+ tempObj["max_unit"] = outInfo.count_unit;
|
|
1179
|
+ tempObj["min_unit"] = outInfo.min_unit,
|
|
1180
|
+ tempObj["return_count"] = "";
|
|
1181
|
+ tempObj["price"] = "";
|
|
1182
|
+ tempObj["remark"] = outInfo.remark;
|
|
1183
|
+ tempObj["manufacturer"] = this.getManufacturer(outInfo.manufacturer)
|
|
1184
|
+ tempObj["batch_number"] = outInfo.batch_number;
|
|
1185
|
+ tempObj["drug_type"] = this.GetDrugTypeName(outInfo.drug.drug_type)
|
|
1186
|
+ tempObj["dose"] = "";
|
|
1187
|
+ tempObj["dose_unit"] = "";
|
|
1188
|
+ tempObj["min_number"] = "";
|
|
1189
|
+ tempObj["dealer"] = this.getDealer(outInfo.dealer)
|
|
1190
|
+ tempObj["number"] = "";
|
|
1191
|
+ tempObj["warehouse_info_id"] = outInfo.warehouse_info_id;
|
|
1192
|
+ tempObj["count"] = (outInfo.count).toString();
|
|
1193
|
+ tempObj["admin_user_id"] = this.$store.getters.xt_user.user.user_name;
|
|
1194
|
+ tempObj["retail_price"] = 0;
|
|
1195
|
+ tempObj["last_price"] = "";
|
|
1196
|
+ tempObj["stock_count"] = "";
|
|
1197
|
+ tempObj["total_count"] = 0;
|
|
1198
|
+ tempObj["max_unit_fisrt"] = 0;
|
|
1199
|
+ tempObj["min_unit_fisrt"] = 0;
|
|
1200
|
+ tempObj["total_price"] = 0;
|
|
1201
|
+ tempObj["patient_id"] = outInfo.patient_id
|
|
1202
|
+ tempObj["product_date"] = this.getTimeOne(outInfo.product_date);
|
|
1203
|
+ tempObj["expiry_date"]=this.getTimeOne(outInfo.expiry_date)
|
|
1204
|
+ tempObj["class_type"] = ""
|
|
1205
|
+ tempObj["drug_name"] = outInfo.drug.drug_name
|
|
1206
|
+ tempObj["name"] = outInfo.drug.dose + outInfo.drug.dose_unit + "*" + outInfo.drug.min_number+outInfo.drug.min_unit +"/"+outInfo.drug.max_unit
|
|
1207
|
+ this.recordInfo.recordData = []
|
|
1208
|
+ this.recordInfo.recordData.push(tempObj);
|
|
1209
|
+ }
|
1169
|
1210
|
})
|
1170
|
|
- }
|
|
1211
|
+ },
|
|
1212
|
+
|
|
1213
|
+ getManufacturer(id) {
|
|
1214
|
+ var name = "";
|
|
1215
|
+ for (let i = 0; i < this.manufacturerList.length; i++) {
|
|
1216
|
+ if (id == this.manufacturerList[i].id) {
|
|
1217
|
+ name = this.manufacturerList[i].manufacturer_name;
|
|
1218
|
+ }
|
|
1219
|
+ }
|
|
1220
|
+ return name;
|
|
1221
|
+ },
|
|
1222
|
+ getDealer(id) {
|
|
1223
|
+ var name = "";
|
|
1224
|
+ for (let i = 0; i < this.dealerList.length; i++) {
|
|
1225
|
+ if (id == this.dealerList[i].id) {
|
|
1226
|
+ name = this.dealerList[i].dealer_name;
|
|
1227
|
+ }
|
|
1228
|
+ }
|
|
1229
|
+ return name;
|
|
1230
|
+ },
|
|
1231
|
+ GetDrugTypeName(drug_type){
|
|
1232
|
+ var name = ""
|
|
1233
|
+ for(let i=0;i<this.drugTypeList.length;i++){
|
|
1234
|
+ if(drug_type == this.drugTypeList[i].value){
|
|
1235
|
+ name = this.drugTypeList[i].name
|
|
1236
|
+ }
|
|
1237
|
+ }
|
|
1238
|
+ return name
|
|
1239
|
+ },
|
1171
|
1240
|
|
1172
|
1241
|
|
1173
|
1242
|
},
|