出库时间修改

This commit is contained in:
hongchao 2025-03-27 19:06:42 +08:00
parent 10791f31ba
commit e997a6ba2e
2 changed files with 80 additions and 5 deletions

View File

@ -410,3 +410,13 @@ export function getPreNumInUse(params) {
params, params,
}) })
} }
export function updateOutTime(data) {
return request({
url: '/material//base/leaseOutDetails/updateOutTime',
method: 'post',
headers: {
repeatSubmit: false,
},
data,
})
}

View File

@ -403,7 +403,7 @@
</el-dialog> </el-dialog>
<!-- 领料单弹窗 --> <!-- 领料单弹窗 -->
<el-dialog :visible.sync="open" width="1138px" append-to-body> <el-dialog :visible.sync="open" width="1138px" append-to-body @close="closePage">
<div style="height: 500px; overflow-y: scroll; padding: 0 20px"> <div style="height: 500px; overflow-y: scroll; padding: 0 20px">
<vue-easy-print tableShow ref="remarksPrintRef" class="print"> <vue-easy-print tableShow ref="remarksPrintRef" class="print">
<div class="title" style="text-align: center; font-weight: 600; font-size: 26px"> <div class="title" style="text-align: center; font-weight: 600; font-size: 26px">
@ -414,8 +414,23 @@
<span>领料单位</span>{{ leaseOutData.unitName }} <span>领料单位</span>{{ leaseOutData.unitName }}
</div> </div>
<div class="item" style="width: 50%; flex-shrink: 0; margin-bottom: 5px; font-size: 14px"> <div class="item" style="width: 50%; flex-shrink: 0; margin-bottom: 5px; font-size: 14px">
<span>出库时间</span>{{ leaseOutData.updateTime }} <span>出库时间</span>
<!-- 添加精确到时分秒的日期选择器 -->
<el-date-picker
v-show="showSelect"
v-model="leaseOutData.updateTime"
type="datetime"
value-format="yyyy-MM-dd HH:mm:ss"
style="width: 200px"
placeholder="请选择出库时间"
@change="changeTime"
/>
<span v-show="!showSelect" @click="showSelect = true" style="cursor: pointer">{{leaseOutData.updateTime
}}</span>
</div> </div>
<!-- <div class="item" style="width: 50%; flex-shrink: 0; margin-bottom: 5px; font-size: 14px">
<span>出库时间</span>{{ leaseOutData.updateTime }}
</div> -->
<div class="item" style="width: 50%; flex-shrink: 0; margin-bottom: 5px; font-size: 14px"> <div class="item" style="width: 50%; flex-shrink: 0; margin-bottom: 5px; font-size: 14px">
<span>工程名称</span>{{ leaseOutData.proName }} <span>工程名称</span>{{ leaseOutData.proName }}
</div> </div>
@ -460,7 +475,7 @@
<div slot="footer" class="dialog-footer" style="text-align: center"> <div slot="footer" class="dialog-footer" style="text-align: center">
<div style="text-align: left;color: #bbb;">提示: 请使用横向打印</div> <div style="text-align: left;color: #bbb;">提示: 请使用横向打印</div>
<el-button type="primary" @click="print"> </el-button> <el-button type="primary" @click="print"> </el-button>
<el-button @click="open = false"> </el-button> <el-button @click="closePage"> </el-button>
</div> </div>
</el-dialog> </el-dialog>
</div> </div>
@ -478,6 +493,7 @@ import {
getLeaseOutDetailRecordApi, getLeaseOutDetailRecordApi,
getLeaseListAll, getLeaseListAll,
getLeaseOutOrder, getLeaseOutOrder,
updateOutTime,
} from '@/api/claimAndRefund/receive.js' } from '@/api/claimAndRefund/receive.js'
import { queryCompleteSetToolsApi } from '@/api/store/completeTools.js' import { queryCompleteSetToolsApi } from '@/api/store/completeTools.js'
import { getTypeList } from '@/api/store/warehousing' import { getTypeList } from '@/api/store/warehousing'
@ -589,7 +605,9 @@ export default {
today.setHours(0, 0, 0, 0); // 便 today.setHours(0, 0, 0, 0); // 便
return date.getTime() > today.getTime(); // return date.getTime() > today.getTime(); //
}, },
} },
showSelect: true,
rowTemp: {}, //
} }
}, },
created() { created() {
@ -846,6 +864,7 @@ export default {
/* 打开出库单 */ /* 打开出库单 */
async openLld(row, type) { async openLld(row, type) {
this.open = true this.open = true
this.rowTemp = row;
const params = { const params = {
parentId: type == 1 ? row.id : row.parentId, parentId: type == 1 ? row.id : row.parentId,
typeId: type == 1 ? '' : row.typeId, typeId: type == 1 ? '' : row.typeId,
@ -859,7 +878,15 @@ export default {
}, },
// //
print() { print() {
this.$refs.remarksPrintRef.print() this.showSelect = false;
this.$nextTick(() => {
this.$refs.remarksPrintRef.print()
})
},
closePage() {
this.showSelect = true;
this.open = false;
}, },
async onHandleQuery() { async onHandleQuery() {
@ -909,6 +936,44 @@ export default {
this.openFileVisible = true this.openFileVisible = true
}, },
changeTime(newValue) {
this.$confirm('确认要修改出库时间吗?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
//
updateOutTime({
id: this.rowTemp.id, // ID
updateTime: newValue,
taskId: this.rowTemp.taskId,
}).then((response) => {
if (response.code === 200) { // 200
this.leaseOutData.updateTime = newValue;
this.showSelect = false;
this.$message({
type: 'success',
message: '出库时间修改成功'
});
} else {
this.$message({
type: 'error',
message: '出库时间修改失败'
});
}
}).catch((error) => {
this.$message({
type: 'error',
message: '出库时间修改失败'
});
});
}).catch(() => {
this.$message({
type: 'info',
message: '已取消修改'
});
});
}
}, },
} }
</script> </script>