|
|
@@ -6,7 +6,7 @@
|
|
|
<!--按钮部分-->
|
|
|
<el-form ref="elSearchFormRef" class="demo-form-inline" >
|
|
|
<el-form-item>
|
|
|
- <el-input v-model="searchInfo" placeholder="输入订单编号或生产款号" style="width: 180px;" @keyup.enter="onSubmit()"></el-input>
|
|
|
+ <el-input v-model="searchInfo" placeholder="查询订单编号、生产款号" style="width: 180px;" @keyup.enter="onSubmit()"></el-input>
|
|
|
<el-button type="primary" icon="search" @click="onSubmit" title="查询" >查询</el-button>
|
|
|
<el-button type="primary" icon="edit" @click="cp_gdprintonClick" class="bt" title="打印生产订单" >订单打印</el-button>
|
|
|
<el-button type="primary" class="bt" icon="edit" @click="jsfjClick">附件上传</el-button>
|
|
|
@@ -274,6 +274,7 @@
|
|
|
<el-table-column align="left" label="订单编号" prop="订单编号" width="105"/>
|
|
|
<el-table-column align="left" label="物料分类" prop="物料分类" width="100"/>
|
|
|
<el-table-column align="left" label="物料名称" prop="物料名称" width="210"/>
|
|
|
+ <el-table-column align="left" label="计划入库时间" prop="计划入库时间" width="160" />
|
|
|
<el-table-column align="left" label="计划用料" prop="计划用料" width="90" />
|
|
|
<el-table-column align="left" label="计划门幅" prop="计划门幅" width="90"/>
|
|
|
<el-table-column align="left" label="定额用料" prop="定额用料" width="90"/>
|
|
|
@@ -790,6 +791,16 @@
|
|
|
<span v-else>{{ row[item.prop] }}</span> <!-- 如果UNIQID有值,则直接显示内容 -->
|
|
|
</div>
|
|
|
|
|
|
+ <div v-else-if="item.prop === '计划入库时间'">
|
|
|
+ <el-date-picker
|
|
|
+ v-model="row['计划入库时间']"
|
|
|
+ type="date"
|
|
|
+ value-format="YYYY-MM-DD"
|
|
|
+ placeholder="选择日期"
|
|
|
+ style="width: 100%"
|
|
|
+ />
|
|
|
+ </div>
|
|
|
+
|
|
|
<!-- 其他列的处理 -->
|
|
|
<div v-else-if="['物料分类','计划用料', '定额用料', '计划门幅', '定额门幅', '备注'].includes(item.prop)">
|
|
|
<el-input
|
|
|
@@ -2799,10 +2810,24 @@ function Input_handle() {
|
|
|
ks: '',
|
|
|
ml: '',
|
|
|
});
|
|
|
+ const getTodayYmd = () => {
|
|
|
+ const t = new Date()
|
|
|
+ return `${t.getFullYear()}-${String(t.getMonth() + 1).padStart(2, '0')}-${String(t.getDate()).padStart(2, '0')}`
|
|
|
+ }
|
|
|
+ const fillDefaultPlanRuku = (rows) => {
|
|
|
+ if (!Array.isArray(rows)) return
|
|
|
+ rows.forEach((row) => {
|
|
|
+ const v = row['计划入库时间']
|
|
|
+ if (v === undefined || v === null || String(v).trim() === '') {
|
|
|
+ row['计划入库时间'] = getTodayYmd()
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
const resbom_tableColumns = ref(
|
|
|
[
|
|
|
{ label: '物料分类', prop: '物料分类', width: '130' },
|
|
|
{ label: '物料名称', prop: '物料名称', width: '300' },
|
|
|
+ { label: '计划入库时间', prop: '计划入库时间', width: '160' },
|
|
|
{ label: '计划用料', prop: '计划用料', width: '130' },
|
|
|
{ label: '计划门幅', prop: '计划门幅', width: '130' },
|
|
|
{ label: '定额用料', prop: '定额用料', width: '130' },
|
|
|
@@ -2831,7 +2856,7 @@ function Input_handle() {
|
|
|
}
|
|
|
|
|
|
const handleInput = (value, row, prop) => {
|
|
|
- if(prop != "物料名称" && prop != "备注" && prop != "物料分类" ){
|
|
|
+ if(prop != "物料名称" && prop != "备注" && prop != "物料分类" && prop != "计划入库时间" ){
|
|
|
// 使用正则表达式过滤非数字和小数点的字符
|
|
|
let filteredValue = value.replace(/[^\d.]/g, '');
|
|
|
|
|
|
@@ -2873,6 +2898,7 @@ function Input_handle() {
|
|
|
// item.UNIQID = item.UNIQID;
|
|
|
return item
|
|
|
});
|
|
|
+ fillDefaultPlanRuku(resbomtableData.value)
|
|
|
} catch (error) {
|
|
|
console.error(error);
|
|
|
}
|
|
|
@@ -2917,7 +2943,8 @@ function Input_handle() {
|
|
|
column.label === '备注' ||
|
|
|
column.label === '物料名称' ||
|
|
|
column.label === '计划用量' ||
|
|
|
- column.label === '定额用料' ) {
|
|
|
+ column.label === '定额用料' ||
|
|
|
+ column.label === '计划入库时间' ) {
|
|
|
return 'background-plan-usage-low';
|
|
|
}
|
|
|
}
|
|
|
@@ -2928,6 +2955,7 @@ function Input_handle() {
|
|
|
const newRow = {
|
|
|
'BOM_desc': '',
|
|
|
'物料名称': '',
|
|
|
+ '计划入库时间': getTodayYmd(),
|
|
|
'计划用料': '',
|
|
|
'定额用料': '',
|
|
|
'裁床实际用料': '',
|
|
|
@@ -3003,6 +3031,7 @@ function Input_handle() {
|
|
|
bomtableData.splice(0, bomtableData.length, ...orderBomListdata.data);
|
|
|
//批量新增/更新BOM数据列表
|
|
|
resbomtableData.value = orderBomListdata.data;
|
|
|
+ fillDefaultPlanRuku(resbomtableData.value)
|
|
|
}
|
|
|
}).catch(() => {
|
|
|
// 取消删除
|
|
|
@@ -3034,7 +3063,11 @@ function Input_handle() {
|
|
|
BOM_定额门幅: item.定额门幅 !== null ? item.定额门幅 : "",
|
|
|
BOM_投料单位: "",
|
|
|
Sys_ID: userStore.userInfo.nickName,
|
|
|
- Sys_rq: currentDate
|
|
|
+ Sys_rq: currentDate,
|
|
|
+ 计划入库时间: item['计划入库时间'] != null && String(item['计划入库时间']).trim() !== ''
|
|
|
+ ? String(item['计划入库时间']).trim()
|
|
|
+ : getTodayYmd(),
|
|
|
+ 计划入库操作人:userStore.userInfo.nickName,
|
|
|
}
|
|
|
});
|
|
|
console.log(formattedData);
|