fix: 修复原始单据

dev_ksck_z
chenhc 7 months ago
parent 3962860171
commit 634db17e69

@ -56,6 +56,14 @@ export function deleteByOrder(query) {
});
}
export function deleteOriginOrder(query) {
return axios({
url: "/udiwms/basic/collect/order/deleteOriginOrder",
method: "post",
data: query
});
}
/**
* 手动扫码明细
@ -173,6 +181,15 @@ export function downloadOrder(query) {
});
}
export function getThrOrderPage(query) {
return axios({
url: "/udiwms/basic/collect/origin/order/getThrOrderPage",
method: "post",
data: query
});
}
export function orderUpload(query) {
return axios({
url: "/udiwms/basic/collect/order/upload",
@ -191,6 +208,16 @@ export function errorHandle(query) {
}
export function errorHandleSubmit(query) {
return axios({
url: "/udiwms/basic/collect/origin/order/errorHandleSubmit",
method: "post",
data: query
});
}
//已完成单
export function orderFinish(query) {
return axios({

@ -378,7 +378,7 @@ import {
deleteByOrder,
importOrder,
downloadOrder,
errorHandle
errorHandle,errorHandleSubmit,deleteOriginOrder
} from "@/api/collect/collectOrder";
import {
orderPage,
@ -531,7 +531,6 @@ export default {
},
///------------end
hideSearch() {
this.showSearch = !this.showSearch;
},
@ -549,41 +548,44 @@ export default {
this.getList();
},
downloadPrescription() {
// this.downloadPrescriptionVisible = true
this.loading = true;
importOrder().then(res => {
this.loading = false
if (res.code == 20000) {
this.$message.success("下载成功!")
this.getList()
} else {
this.$message.error(res.message)
}
}
).catch(() => {
this.loading = false
})
this.downloadPrescriptionVisible = true
// this.loading = true;
// importOrder().then(res => {
// this.loading = false
// if (res.code == 20000) {
// this.$message.success("")
// this.getList()
// } else {
// this.$message.error(res.message)
// }
// }
// ).catch(() => {
// this.loading = false
// })
},
downloadData() {
this.downloadPrescriptionVisible = true
// if (this.filterQuery.workPlaceCode == null) {
// return this.$message.error("")
// }
if (this.actDateRange !== null) {
this.filterQuery.startTime = this.actDateRange[0];
this.filterQuery.endTime = this.actDateRange[1];
} else {
this.filterQuery.startTime = null;
this.filterQuery.endTime = null;
}
downloadOrder(this.filterQuery).then(res => {
if (res.code == 20000) {
return this.$message.success(res.data)
} else {
return this.$message.error(res.message)
}
})
// if (this.actDateRange !== null) {
// this.filterQuery.startTime = this.actDateRange[0];
// this.filterQuery.endTime = this.actDateRange[1];
// } else {
// this.filterQuery.startTime = null;
// this.filterQuery.endTime = null;
// }
//
// this.filterQuery.busType = '24'
// // downloadOrder(this.filterQuery).then(res => {
// getThrOrderPage(this.filterQuery).then(res => {
// if (res.code == 20000) {
// return this.$message.success(res.data)
// } else {
// return this.$message.error(res.message)
// }
// })
},
clearAllOrder() {
this.loading = true;
@ -603,11 +605,13 @@ export default {
closeDialog() {
this.downloadPrescriptionVisible = false;
this.getList();
this.getErrorList(this);
}
,
onSubmit() {
this.filterQuery.page = 1;
this.getList();
this.getErrorList(this);
}
,
@ -652,7 +656,6 @@ export default {
})
},
getList2(_this) {
_this.loading = true;
if (_this.actDateRange !== null) {
@ -699,7 +702,7 @@ export default {
type: "warning",
})
.then(() => {
_this.deleteOrders(row.code);
_this.deleteOrders(row.billNo);
})
.catch(() => {
});
@ -708,10 +711,11 @@ export default {
deleteOrders(data) {
this.loading = true;
this.deleteData.billNo = data;
deleteByOrder(this.deleteData)
deleteOriginOrder(this.deleteData)
.then((response) => {
if (response.code == 20000) {
this.getList();
this.getErrorList(this);
this.$message({
type: "success",
message: "删除成功!",
@ -719,9 +723,11 @@ export default {
} else if (response.code == 520) {
this.$message.error(response.message);
this.getList();
this.getErrorList(this);
} else {
this.$message.error(response.message);
this.getList();
this.getErrorList(this);
}
})
@ -776,7 +782,6 @@ export default {
})
},
submitDialog() {
},
@ -799,14 +804,48 @@ export default {
errorHandle(params)
.then((response) => {
if (response.code == 20000) {
this.getList2(_this);
this.getErrorList(_this);
_this.$message.success("处理成功!")
} else if (response.code == 520) {
_this.$message.error(response.message);
this.getList2(_this);
this.getErrorList(_this);
} else {
_this.$message.error(response.message);
this.getList2(_this);
this.getErrorList(_this);
}
})
.catch(() => {
});
})
.catch(() => {
});
},
errorHandleSubmit(_this, row) {
_this.$confirm("此操作将提交该订单, 是否继续?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
this.loading = true;
let params = {
billNo: row.billNo,
busType: row.busType,
workPlaceCode: row.workPlaceCode,
tagStatus: row.tagStatus,
fromTpye: row.fromTpye,
};
errorHandleSubmit(params)
.then((response) => {
if (response.code == 20000) {
this.getErrorList(_this);
_this.$message.success("处理成功!")
} else if (response.code == 520) {
_this.$message.error(response.message);
this.getErrorList(_this);
} else {
_this.$message.error(response.message);
this.getErrorList(_this);
}
})
.catch(() => {
@ -815,7 +854,6 @@ export default {
.catch(() => {
});
}
},
created() {
getHead("prescribeDownloadOrigin", "1").then((re) => {

@ -93,11 +93,11 @@
>查询
</el-button
>
<el-button type="primary" icon="el-icon-check" @click="downloadPrescription"
<el-button type="primary" icon="el-icon-check" @click="downloadPrescription(2)"
>按查询结果下载
</el-button
>
<el-button type="primary" icon="el-icon-check" @click="downloadPrescription"
<el-button type="primary" icon="el-icon-check" @click="downloadPrescription(1)"
>选中下载
</el-button
>
@ -221,6 +221,8 @@
import {prescribeOnline, prescribeSave} from "@/api/basic/sicker/skPersonApi";
import {executeFuc, getHead} from "@/utils/customConfig";
import {deleteDataByCode} from "@/api/basic/sicker/prescribeApi";
import {getThrOrderPage} from "@/api/collect/collectOrder";
import {getWorkBindBusTypes} from '@/api/basic/workPlace/sysWorkplaceDocuments'
export default {
name: "prescribeDownloadDialog",
@ -279,10 +281,24 @@ export default {
fromList1: [],
showSearch: true,
filterQuery: {
busType: null,
billNo: null,
page: 1,
limit: 10,
},
busQuery: {
busKey: '',
workplaceCode: null,
page: 1,
limit: 100
},
options: {
getInvList: [],
getDeptList: [],
getBusType: [],
getWorkPlaceList: [],
findWorkPlace: [],
},
defaultSort: {prop: 'createTime', order: 'desc'},
loading: false,
list: [],
@ -327,17 +343,31 @@ export default {
this.showSearch = !this.showSearch;
},
onReset() {
this.filterQuery = {};
this.filterQuery = {
busType: null,
billNo: null,
page: 1,
limit: 10,};
this.actDateRange = [];
this.getList();
},
downloadPrescription() {
if (this.selectList.length == 0) {
this.$message.error("请选择下载处方")
return
} else {
downloadPrescription(status) {
if(status == 1){
if (this.selectList.length == 0) {
this.$message.error("请选择下载处方")
return
}
}
let post = {
stauts: status,
billNo: this.filterQuery.billNo,
busType: this.filterQuery.busType,
endTime: this.filterQuery.endTime,
startTime: this.filterQuery.startTime,
list: this.selectList,
}
//
prescribeSave(this.selectList).then(res => {
prescribeSave(post).then(res => {
if (res.code == 20000) {
this.closeDialog()
this.$message.success("操作成功")
@ -347,8 +377,6 @@ export default {
}).catch(() => {
this.$message.error(res.message)
})
}
},
handleUserSelectionChange(val) {
this.selectList = val.map(i => i)
@ -367,7 +395,7 @@ export default {
this.filterQuery.startTime = null;
this.filterQuery.endTime = null;
}
prescribeOnline(this.filterQuery).then(res => {
getThrOrderPage(this.filterQuery).then(res => {
this.loading = false
this.list = res.data.list || []
this.total = res.data.total || 0
@ -448,6 +476,22 @@ export default {
.catch(() => {
});
},
getWorkBindBusTypes(_this) {
getWorkBindBusTypes(this.busQuery).then(res => {
if (res.code == 20000) {
let busTypes = res.data.list || [];
// _this.options.getWorkPlace = res.data.list || [];
let getWorkPlace = busTypes.map(busType => {
return {
code: busType.documentTypeCode,
label: busType.thrBusName
};
});
_this.options.getBusType = getWorkPlace
}
return
})
},
},
created() {
@ -457,7 +501,8 @@ export default {
this.tableHeader = re.data.tableList;
this.queryList = re.data.queryList;
this.fromList = re.data.fromList;
// this.getList();
this.getWorkBindBusTypes(this)
this.getList();
});
}

Loading…
Cancel
Save