fix 物料冲销

This commit is contained in:
Amjacks 2025-04-03 11:32:06 +08:00
parent 0c1d2a05b8
commit d2c15a6614
2 changed files with 21 additions and 27 deletions

View File

@ -26,7 +26,7 @@
<el-form-item label="料号" prop="MATERIALSPECNAME">
<el-Input v-model="queryParams.MATERIALSPECNAME" clearable />
</el-form-item>
</el-col>
</el-col>
<el-col :span="6">
<el-form-item label="品名" prop="DESC_CN">
<el-Input v-model="queryParams.DESC_CN" clearable />
@ -229,6 +229,7 @@ function handleQueryInfo() {
state.page.pageNum = 1
state.page_d.pageNum = 1
state.page.total = 0
state.page_d.total = 0;
handleQuery()
}
function handleQuery() {
@ -247,22 +248,18 @@ function handleQuery() {
pageNum: state.page.pageNum,
pageSize: state.page.pageSize,
}).then((res: any) => {
if(res.data.list.length == 0){
ElMessageBox.alert('查无数据', '提醒框', {
confirmButtonText: 'OK',
})
state.loading = false
} else {
state.list = res.data.list;
for(let i=0;i<state.list.length;i++)
{
var dates = new Date(state.list[i].ORDERDATE).toJSON();
state.list[i].ORDERDATE=new Date(+new Date(dates) + 8 * 3600 * 1000).toISOString().replace(/T/g, ' ').replace(/\.[\d]{3}Z/, '')
console.log( state.list[i].ORDERDATE);
state.list = res.data.list;
state.page.total = res.data.total;
state.loading = false
if (state.list.length > 0) {
for (const element of state.list) {
let dates = new Date(element.ORDERDATE).toJSON()
element.ORDERDATE = new Date(+new Date(dates) + 8 * 3600 * 1000)
.toISOString()
.replace(/T/g, ' ')
.replace(/\.[\d]{3}Z/, '')
console.log(element.ORDERDATE)
}
state.page.total = res.data.total;
state.loading = false
state.active_row = state.list[0]
if (state.active_row) {
handleQuery_d()

View File

@ -189,7 +189,11 @@ function handleQueryInfo() {
}
function handleQuery() {
state.list_d = []
state.list = []
state.page.total = 0;
state.loading = true
state.page_d.total = 0;
state.loading_d = false
queryFormRef.value.validate((isValid: boolean) => {
if (isValid) {
getQueryPageList({
@ -202,17 +206,10 @@ function handleQuery() {
pageNum: state.page.pageNum,
pageSize: state.page.pageSize,
}).then((res: any) => {
if(res.data.list.length == 0){
ElMessageBox.alert('查无数据', '提醒框', {
confirmButtonText: 'OK',
})
state.loading = false
state.list = []
state.list_d = []
} else {
state.list = res.data.list;
state.page.total = res.data.total;
state.loading = false
state.list = res.data.list;
state.page.total = res.data.total;
state.loading = false
if (state.list.length > 0) {
state.active_row = state.list[0]
if (state.active_row) {
handleQuery_d()