|
|
@@ -13,7 +13,7 @@
|
|
|
<el-button type="primary" icon="edit" @click="addgd_onclick" class="bt" title="新增工单资料">新增订单资料</el-button>
|
|
|
<el-button type="primary" icon="edit" @click="addgdyj_onclick" class="bt" title="新增颜色资料">新增颜色资料</el-button>
|
|
|
<el-button type="primary" icon="edit" @click="addgdgy_onclick" class="bt" title="新增工序资料" >新增工序资料</el-button>
|
|
|
- <el-button type="primary" icon="edit" @click="BOMclick" class="bt" title="BOM面料">修改BOM资料</el-button>
|
|
|
+ <el-button type="primary" icon="edit" @click="BOMclick" class="bt" title="BOM面料">批量修改BOM资料</el-button>
|
|
|
<el-button type="primary" icon="edit" @click="del_ddzlClick" v-if="table_del=== true" :disabled="table_Selection === ''" class="bt" title="删除订单资料" >删除订单资料</el-button>
|
|
|
<el-button type="primary" icon="edit" @click="delgd_delclick" v-if="delall=== true" :disabled="ysSelection === '' && gySelection === ''" class="bt" >删除颜色工艺资料</el-button>
|
|
|
<!-- <el-button type="primary" icon="edit" @click="CSclick" class="bt" title="库存测试">库存测试</el-button> -->
|
|
|
@@ -190,14 +190,14 @@
|
|
|
style="width: 100%;height: 36vh" border tooltip-effect="dark" :data="bomtableData" row-key="ID" @selection-change="handleSelectionChange">
|
|
|
<!-- <el-table-column type="selection" width="30" />-->
|
|
|
<!-- <el-table-column align="left" label="物料编号" prop="物料编号" width="100"/> -->
|
|
|
- <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="100" />
|
|
|
- <el-table-column align="left" label="定额用料" prop="定额用料" width="100"/>
|
|
|
+ <el-table-column align="left" label="物料名称" prop="物料名称" width="170"/>
|
|
|
+ <el-table-column align="left" label="计划用料" prop="计划用料" width="170" />
|
|
|
+ <el-table-column align="left" label="定额用料" prop="定额用料" width="170"/>
|
|
|
<el-table-column align="left" label="裁床实际用料" prop="裁床实际用料" width="140"/>
|
|
|
<el-table-column align="left" label="裁床领用面料" prop="裁床领用面料" width="140"/>
|
|
|
<el-table-column align="left" label="裁床退回仓库面料" prop="裁床退回仓库面料" width="140"/>
|
|
|
- <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="180"/>
|
|
|
<el-table-column align="left" label="UNIQID" prop="UNIQID" width="80"/>
|
|
|
</el-table>
|
|
|
</el-tab-pane>
|
|
|
@@ -515,26 +515,81 @@
|
|
|
</template>
|
|
|
</el-dialog>
|
|
|
|
|
|
+ <!-- 修改BOM资料 -->
|
|
|
+ <el-dialog v-model="edit_bomdialogFormVisible" :before-close="edit_bomcloseDialog" title="修改BOM资料" width="80%" top="2%" destroy-on-close>
|
|
|
+ <el-descriptions class="margin-top" :column="2" :size="size" border>
|
|
|
+ <el-descriptions-item label="订单编号" class="ddh">{{ ddhformData['ddh'] }}</el-descriptions-item>
|
|
|
+ <el-descriptions-item label="客户">{{ ddhformData['kh'] }}</el-descriptions-item>
|
|
|
+ <el-descriptions-item label="生产款号">{{ ddhformData['sckh'] }}</el-descriptions-item>
|
|
|
+ <el-descriptions-item label="款式">{{ ddhformData['ks'] }}</el-descriptions-item>
|
|
|
+ </el-descriptions>
|
|
|
+ <el-divider content-position="left">
|
|
|
+ <span style="font-size: 18px;color:red;font-weight: bold;margin-left: 20px;">绿色部分可进行修改</span>
|
|
|
+ </el-divider>
|
|
|
+ <div style="margin-top: 5px;">
|
|
|
+ <el-table ref="paichengRef"
|
|
|
+ :show-overflow-tooltip="true"
|
|
|
+ highlight-current-row="true"
|
|
|
+ :row-style="{ height: '0px' }"
|
|
|
+ :cell-style="{ padding: '0px' }" :header-row-style="{ height: '0px' }"
|
|
|
+ :header-cell-style="{ padding: '0px' }"
|
|
|
+ style="width: 100%;height: 60vh" border tooltip-effect="dark"
|
|
|
+ :data="edit_resbomtableData" row-key="ID"
|
|
|
+ :cell-class-name="scfjfpxsCellClass">
|
|
|
+ <template v-for="(item, idx) in edit_resbom_tableColumns">
|
|
|
+ <el-table-column #default="{ row, column, $index }" align="left" :label="item.label" :width="item.width" >
|
|
|
+ <div v-if="['物料名称', '计划用料', '定额用料', '裁床实际用料', '备注'].includes(item.prop)">
|
|
|
+ <el-input v-model="row[item.prop]" :clearable="false"
|
|
|
+ :id="`input${idx}${$index}`" @keyup="resbom_handleKeyDown($event, idx, $index, item.prop)"/>
|
|
|
+ </div>
|
|
|
+ <div v-else>{{ row[item.prop] }}</div>
|
|
|
+ </el-table-column>
|
|
|
+ </template>
|
|
|
+ </el-table>
|
|
|
+ </div>
|
|
|
+ <div class="dialog-footer" style="text-align: right;margin-top: 5px;">
|
|
|
+ <el-button @click="editres_bomcloseDialog">取 消</el-button>
|
|
|
+ <el-button type="primary" @click="editres_bomenterDialog">一键修改</el-button>
|
|
|
+ </div>
|
|
|
+ </el-dialog>
|
|
|
|
|
|
- <!-- 新增BOM资料弹窗 -->
|
|
|
- <el-dialog v-model="res_bomdialogFormVisible" :before-close="res_bomcloseDialog" title="修改BOM资料" width="70%" top="2%" destroy-on-close>
|
|
|
- <div class="dialog-footer">
|
|
|
- <el-button @click="res_bomcloseDialog">取消</el-button>
|
|
|
- <el-button type="primary" @click="res_bomenterDialog">确定</el-button>
|
|
|
- </div>
|
|
|
- <div style="width: 100%; height: 60px; padding: 0px; margin: 10px 0px 0px 0px; display: flex; align-items: center;">
|
|
|
+ <!-- 批量修改BOM资料弹窗 -->
|
|
|
+ <el-dialog v-model="res_bomdialogFormVisible" :before-close="res_bomcloseDialog" title="批量修改BOM资料" width="70%" top="1%" destroy-on-close>
|
|
|
+
|
|
|
+ <el-descriptions class="margin-top" :column="2" :size="size" border>
|
|
|
+ <el-descriptions-item label="订单编号" class="ddh">{{ ddhformData['ddh'] }}</el-descriptions-item>
|
|
|
+ <el-descriptions-item label="客户">{{ ddhformData['kh'] }}</el-descriptions-item>
|
|
|
+ <el-descriptions-item label="生产款号">{{ ddhformData['sckh'] }}</el-descriptions-item>
|
|
|
+ <el-descriptions-item label="款式">{{ ddhformData['ks'] }}</el-descriptions-item>
|
|
|
+ </el-descriptions>
|
|
|
+
|
|
|
+ <!-- <div style="width: 100%; height: 60px; padding: 0px; margin: 0px 0px 0px 0px; display: flex; align-items: center;">
|
|
|
<el-form-item label="订单编号 :" prop="currentProcess" style="margin-right: 20px; padding: 0px">
|
|
|
- <el-input v-model="ddhformData['ddh']" disabled style="width: 200px;"/>
|
|
|
+ <el-input v-model="ddhformData['ddh']" disabled style="width: 170px;"/>
|
|
|
</el-form-item>
|
|
|
- </div>
|
|
|
- <div>
|
|
|
+ <el-form-item label="客户 :" prop="currentProcess" style="margin-right: 20px; padding: 0px">
|
|
|
+ <el-input v-model="ddhformData['kh']" disabled style="width: 100px;"/>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="生产款号 :" prop="currentProcess" style="margin-right: 20px; padding: 0px">
|
|
|
+ <el-input v-model="ddhformData['sckh']" disabled style="width: 200px;"/>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="款式 :" prop="currentProcess" style="margin-right: 20px; padding: 0px">
|
|
|
+ <el-input v-model="ddhformData['ks']" disabled style="width: 200px;"/>
|
|
|
+ </el-form-item>
|
|
|
+ </div> -->
|
|
|
+
|
|
|
+ <el-divider content-position="left">
|
|
|
+ <el-button type="primary" icon="plus" @click="add_bomenterDialog">新增一行</el-button>
|
|
|
+ <span style="font-size: 18px;color:red;font-weight: bold;margin-left: 20px;">绿色部分可进行修改</span>
|
|
|
+ </el-divider>
|
|
|
+ <div style="margin-top: 5px;">
|
|
|
<el-table ref="paichengRef"
|
|
|
:show-overflow-tooltip="true"
|
|
|
highlight-current-row="true"
|
|
|
:row-style="{ height: '0px' }"
|
|
|
:cell-style="{ padding: '0px' }" :header-row-style="{ height: '0px' }"
|
|
|
:header-cell-style="{ padding: '0px' }"
|
|
|
- style="width: 100%;height: 60vh" border tooltip-effect="dark"
|
|
|
+ style="width: 100%;height: 58vh" border tooltip-effect="dark"
|
|
|
:data="resbomtableData" row-key="ID"
|
|
|
:cell-class-name="scfjfpxsCellClass">
|
|
|
<template v-for="(item, idx) in resbom_tableColumns">
|
|
|
@@ -548,17 +603,15 @@
|
|
|
</template>
|
|
|
</el-table>
|
|
|
</div>
|
|
|
+ <div class="dialog-footer" style="text-align: right;margin-top: 5px;">
|
|
|
+ <el-button @click="res_bomcloseDialog" style="width: 100px;height: 40px;">关闭</el-button>
|
|
|
+ <el-button type="primary" @click="res_bomenterDialog" style="width: 100px;height: 40px;">确认修改</el-button>
|
|
|
+ </div>
|
|
|
</el-dialog>
|
|
|
|
|
|
|
|
|
- <el-dialog
|
|
|
- v-model="ddzl_dialogFormVisible"
|
|
|
- :before-close="dd_closeDialog"
|
|
|
- title="修改订单资料"
|
|
|
- width="70%"
|
|
|
- top="3%"
|
|
|
- destroy-on-close
|
|
|
- >
|
|
|
+ <el-dialog v-model="ddzl_dialogFormVisible" :before-close="dd_closeDialog" title="修改订单资料"
|
|
|
+ width="70%" top="3%" destroy-on-close >
|
|
|
<!-- 主布局,分为左右两部分 -->
|
|
|
<el-row>
|
|
|
<!-- 左侧部分,包括第一列和第二列 -->
|
|
|
@@ -980,26 +1033,25 @@
|
|
|
style="margin-top: 40px" height="300px" width="1000px" destroy-on-close>
|
|
|
<el-form :model="mlformdata" label-position="right" ref="elFormRef" :rules="rule" label-width="90px">
|
|
|
<el-table
|
|
|
- ref="table"
|
|
|
- highlight-current-row
|
|
|
- show-overflow-tooltip
|
|
|
- border
|
|
|
- :data="historytableData"
|
|
|
- :row-style="{ height: '25px' }"
|
|
|
- :cell-style="{ padding: '0px' }"
|
|
|
- :header-row-style="{ height: '20px' }"
|
|
|
- :header-cell-style="{ padding: '0px' }"
|
|
|
- style="width: 100%;height: 75vh;"
|
|
|
- >
|
|
|
-
|
|
|
- <el-table-column label="订单编号" prop="订单编号"width="110" ></el-table-column>
|
|
|
- <el-table-column label="面料" prop="面料" width="110"></el-table-column>
|
|
|
- <el-table-column label="颜色" prop="颜色" width="110"></el-table-column>
|
|
|
- <el-table-column label="入库数量" prop="入库数量" width="110"></el-table-column>
|
|
|
- <el-table-column label="出库数量" prop="出库数量" width="110"></el-table-column>
|
|
|
- <el-table-column label="领料部门" prop="领料部门" width="110"></el-table-column>
|
|
|
- <el-table-column label="领料时间" prop="领料时间" width="110"></el-table-column>
|
|
|
- </el-table>
|
|
|
+ ref="table"
|
|
|
+ highlight-current-row
|
|
|
+ show-overflow-tooltip
|
|
|
+ border
|
|
|
+ :data="historytableData"
|
|
|
+ :row-style="{ height: '25px' }"
|
|
|
+ :cell-style="{ padding: '0px' }"
|
|
|
+ :header-row-style="{ height: '20px' }"
|
|
|
+ :header-cell-style="{ padding: '0px' }"
|
|
|
+ style="width: 100%;height: 75vh;" >
|
|
|
+
|
|
|
+ <el-table-column label="订单编号" prop="订单编号"width="110" ></el-table-column>
|
|
|
+ <el-table-column label="面料" prop="面料" width="110"></el-table-column>
|
|
|
+ <el-table-column label="颜色" prop="颜色" width="110"></el-table-column>
|
|
|
+ <el-table-column label="入库数量" prop="入库数量" width="110"></el-table-column>
|
|
|
+ <el-table-column label="出库数量" prop="出库数量" width="110"></el-table-column>
|
|
|
+ <el-table-column label="领料部门" prop="领料部门" width="110"></el-table-column>
|
|
|
+ <el-table-column label="领料时间" prop="领料时间" width="110"></el-table-column>
|
|
|
+ </el-table>
|
|
|
<br>
|
|
|
</el-form>
|
|
|
<template #footer>
|
|
|
@@ -1032,6 +1084,7 @@ export default {
|
|
|
currentTable: '', // 当前展示的表格
|
|
|
activeName: 'first',
|
|
|
_ddhval:'',
|
|
|
+ size: '',
|
|
|
add_gddialogFormVisible: true,
|
|
|
};
|
|
|
},
|
|
|
@@ -2022,18 +2075,21 @@ const res_bomdialogFormVisible = ref(false)
|
|
|
const resbomtableData = ref([]);
|
|
|
const ddhformData = reactive({
|
|
|
ddh: '',
|
|
|
+ kh: '',
|
|
|
+ sckh: '',
|
|
|
+ ks: '',
|
|
|
});
|
|
|
const resbom_tableColumns = ref(
|
|
|
[
|
|
|
{ label: '物料名称', prop: '物料名称', width: '170' },
|
|
|
- { label: '计划用料', prop: '计划用料', width: '110' },
|
|
|
- { label: '定额用料', prop: '定额用料', width: '100' },
|
|
|
+ { label: '计划用料', prop: '计划用料', width: '170' },
|
|
|
+ { label: '定额用料', prop: '定额用料', width: '170' },
|
|
|
{ label: '裁床实际用料', prop: '裁床实际用料', width: '130' },
|
|
|
{ label: '裁床领用面料', prop: '裁床领用面料', width: '130' },
|
|
|
{ label: '裁床退回仓库面料', prop: '裁床退回仓库面料', width: '170' },
|
|
|
- { label: '备注', prop: '备注', width: '130' },
|
|
|
+ { label: '备注', prop: '备注', width: '170' },
|
|
|
{ label: '投料单位', prop: '投料单位', width: '100' },
|
|
|
- { label: 'UNIQID', prop: 'UNIQID', width: '80' },
|
|
|
+ // { label: 'UNIQID', prop: 'UNIQID', width: '80' },
|
|
|
]
|
|
|
)
|
|
|
//修改BOM资料按钮
|
|
|
@@ -2043,6 +2099,9 @@ const BOMclick = () => {
|
|
|
}else{
|
|
|
res_bomdialogFormVisible.value = true
|
|
|
ddhformData.ddh = _Gd_gdbh.value
|
|
|
+ ddhformData.kh = _Gd_kh.value
|
|
|
+ ddhformData.sckh = _Gd_sckh.value
|
|
|
+ ddhformData.ks = _Gd_ks.value
|
|
|
_TestCoefficient();
|
|
|
}
|
|
|
}
|
|
|
@@ -2068,37 +2127,37 @@ const _TestCoefficient = async ()=>{
|
|
|
console.error(error);
|
|
|
}
|
|
|
}
|
|
|
-const resbom_handleKeyDown = (event, x, y, prop) => {
|
|
|
- const currentElement = document.getElementById(`input${x}${y}`);
|
|
|
- if (currentElement === null && currentElement === undefined) return
|
|
|
- let move = 0
|
|
|
- switch (event.keyCode) {
|
|
|
- case 13: // Enter
|
|
|
- case 40: // 向下箭头
|
|
|
- if (y < resbomtableData.value.length )
|
|
|
- document.getElementById(`input${x}${y + 1}`).focus();
|
|
|
- break;
|
|
|
- case 38: // 向上箭头
|
|
|
- if ( y > 0) {
|
|
|
- document.getElementById(`input${x}${y - 1}`).focus();
|
|
|
- }
|
|
|
- break;
|
|
|
- case 39: // 向左箭头
|
|
|
- if (x >= 0 && x <=6) {
|
|
|
- move = x + 1
|
|
|
- }
|
|
|
- document.getElementById(`input${move}${y}`).focus();
|
|
|
- break;
|
|
|
- case 37: // 向右箭头
|
|
|
- if (x = 0 && x <=6) {
|
|
|
- move = x - 1
|
|
|
- }
|
|
|
- document.getElementById(`input${move}${y}`).focus();
|
|
|
- break;
|
|
|
- default:
|
|
|
- break;
|
|
|
- }
|
|
|
-}
|
|
|
+// const resbom_handleKeyDown = (event, x, y, prop) => {
|
|
|
+// const currentElement = document.getElementById(`input${x}${y}`);
|
|
|
+// if (currentElement === null && currentElement === undefined) return
|
|
|
+// let move = 0
|
|
|
+// switch (event.keyCode) {
|
|
|
+// case 13: // Enter
|
|
|
+// case 40: // 向下箭头
|
|
|
+// if (y < resbomtableData.value.length )
|
|
|
+// document.getElementById(`input${x}${y + 1}`).focus();
|
|
|
+// break;
|
|
|
+// case 38: // 向上箭头
|
|
|
+// if ( y > 0) {
|
|
|
+// document.getElementById(`input${x}${y - 1}`).focus();
|
|
|
+// }
|
|
|
+// break;
|
|
|
+// case 39: // 向左箭头
|
|
|
+// if (x >= 0 && x <=6) {
|
|
|
+// move = x + 1
|
|
|
+// }
|
|
|
+// document.getElementById(`input${move}${y}`).focus();
|
|
|
+// break;
|
|
|
+// case 37: // 向右箭头
|
|
|
+// if (x = 0 && x <=6) {
|
|
|
+// move = x - 1
|
|
|
+// }
|
|
|
+// document.getElementById(`input${move}${y}`).focus();
|
|
|
+// break;
|
|
|
+// default:
|
|
|
+// break;
|
|
|
+// }
|
|
|
+// }
|
|
|
//质检废品系数颜色
|
|
|
const scfjfpxsCellClass = ({row, column, rowIndex, columnIndex}) =>{
|
|
|
if (column.label === '计划用料' || column.label === '备注' || column.label === '物料名称' || column.label === '计划用量' || column.label === '定额用料' || column.label === '裁床实际用料' || column.label === '裁床领用面料' || column.label === '裁床退回仓库面料') {
|
|
|
@@ -2106,25 +2165,44 @@ const scfjfpxsCellClass = ({row, column, rowIndex, columnIndex}) =>{
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-// 确定
|
|
|
-const res_bomenterDialog = async() => {
|
|
|
- const rawValueArray = resbomtableData._rawValue;
|
|
|
- const formattedData = rawValueArray.map(item => {
|
|
|
- return {
|
|
|
- UNIQID: item.UNIQID,
|
|
|
- BOM_物料名称: item.物料名称 !== null ? item.物料名称 : "",
|
|
|
- BOM_计划用量: item.计划用料 !== null ? item.计划用料 : "",
|
|
|
- BOM_标准用量: item.定额用料 !== null ? item.定额用料 : "",
|
|
|
- BOM_实际用量: item.裁床实际用料 !== null ? item.裁床实际用料 : "",
|
|
|
- Bom_领用数量: item.裁床领用面料 !== null ? item.裁床领用面料 : "",
|
|
|
- BOM_退还数量: item.裁床退回仓库面料 !== null ? item.裁床退回仓库面料 : "",
|
|
|
- BOM_desc: item.备注 !== null ? item.备注 : ""
|
|
|
- }
|
|
|
- });
|
|
|
-
|
|
|
- console.log(formattedData);
|
|
|
+//新增
|
|
|
+const add_bomenterDialog = async() => {
|
|
|
+ // 创建一行空数据,字段值可以根据需求初始化
|
|
|
+ const newRow = {
|
|
|
+ '物料名称': '',
|
|
|
+ '计划用料': '',
|
|
|
+ '定额用料': '',
|
|
|
+ '裁床实际用料': '',
|
|
|
+ '裁床领用面料': '',
|
|
|
+ '裁床退回仓库面料': '',
|
|
|
+ '备注': '',
|
|
|
+ '投料单位': ''
|
|
|
+ };
|
|
|
+
|
|
|
+ // 将新增的行数据推入到表格数据中
|
|
|
+ resbomtableData.value.push(newRow);
|
|
|
+}
|
|
|
+
|
|
|
+
|
|
|
+// 一键确定
|
|
|
+const res_bomenterDialog = async () => {
|
|
|
+ const rawValueArray = resbomtableData._rawValue;
|
|
|
+ const formattedData = rawValueArray
|
|
|
+ .filter(item => item.物料名称 !== null && item.物料名称 !== "") // 过滤掉物料名称为空的行
|
|
|
+ .map(item => {
|
|
|
+ return {
|
|
|
+ UNIQID: item.UNIQID !== undefined ? item.UNIQID : "",
|
|
|
+ BOM_物料名称: item.物料名称 !== null ? item.物料名称 : "",
|
|
|
+ BOM_计划用量: item.计划用料 !== null ? item.计划用料 : "",
|
|
|
+ BOM_标准用量: item.定额用料 !== null ? item.定额用料 : "",
|
|
|
+ BOM_实际用量: item.裁床实际用料 !== null ? item.裁床实际用料 : "",
|
|
|
+ Bom_领用数量: item.裁床领用面料 !== null ? item.裁床领用面料 : "",
|
|
|
+ BOM_退还数量: item.裁床退回仓库面料 !== null ? item.裁床退回仓库面料 : "",
|
|
|
+ BOM_desc: item.备注 !== null ? item.备注 : ""
|
|
|
+ }
|
|
|
+ });
|
|
|
+ console.log(formattedData);
|
|
|
|
|
|
-
|
|
|
const add_FabricEditdata = await FabricEdit(formattedData);
|
|
|
if (add_FabricEditdata.code === 0) {
|
|
|
res_bomdialogFormVisible.value = false;
|
|
|
@@ -2136,6 +2214,7 @@ const res_bomenterDialog = async() => {
|
|
|
}
|
|
|
|
|
|
}
|
|
|
+
|
|
|
// 取消
|
|
|
const res_bomcloseDialog = () => {
|
|
|
res_bomdialogFormVisible.value = false;
|
|
|
@@ -2143,17 +2222,103 @@ const res_bomcloseDialog = () => {
|
|
|
|
|
|
|
|
|
//BOM资料表格双击
|
|
|
+const edit_bomdialogFormVisible = ref(false)
|
|
|
+const edit_resbomtableData = ref([]);
|
|
|
+const edit_resbom_tableColumns = ref(
|
|
|
+ [
|
|
|
+ { label: '物料名称', prop: '物料名称', width: '170' },
|
|
|
+ { label: '计划用料', prop: '计划用料', width: '170' },
|
|
|
+ { label: '定额用料', prop: '定额用料', width: '170' },
|
|
|
+ { label: '裁床实际用料', prop: '裁床实际用料', width: '130' },
|
|
|
+ { label: '裁床领用面料', prop: '裁床领用面料', width: '130' },
|
|
|
+ { label: '裁床退回仓库面料', prop: '裁床退回仓库面料', width: '170' },
|
|
|
+ { label: '备注', prop: '备注', width: '170' },
|
|
|
+ { label: '投料单位', prop: '投料单位', width: '100' },
|
|
|
+ // { label: 'UNIQID', prop: 'UNIQID', width: '80' },
|
|
|
+ ]
|
|
|
+)
|
|
|
+
|
|
|
+const UNIQID = ref('')
|
|
|
const bombomupdateCompanyFunc = async (row) => {
|
|
|
-
|
|
|
+ edit_bomdialogFormVisible.value = true
|
|
|
+ ddhformData.ddh = _Gd_gdbh.value
|
|
|
+ ddhformData.kh = _Gd_kh.value
|
|
|
+ ddhformData.sckh = _Gd_sckh.value
|
|
|
+ ddhformData.ks = _Gd_ks.value
|
|
|
+ UNIQID.value = row.UNIQID
|
|
|
+ _editTestCoefficient()
|
|
|
}
|
|
|
|
|
|
|
|
|
-
|
|
|
+// BOM数据获取
|
|
|
+const _editTestCoefficient = async () => {
|
|
|
+ try {
|
|
|
+ // 获取 BOM 数据
|
|
|
+ const orderBomListdata = await orderBomList({ order: _Gd_gdbh.value });
|
|
|
+ console.log(orderBomListdata);
|
|
|
+
|
|
|
+ // 过滤数据,只保留 UNIQID 相同的项
|
|
|
+ const filteredData = orderBomListdata.data.filter(item => item.UNIQID === UNIQID.value);
|
|
|
+
|
|
|
+ // 处理数据
|
|
|
+ edit_resbomtableData.value = filteredData.map(item => ({
|
|
|
+ 物料名称: item.物料名称,
|
|
|
+ 计划用料: item.计划用料,
|
|
|
+ 定额用料: item.定额用料,
|
|
|
+ 裁床实际用料: item.裁床实际用料,
|
|
|
+ 裁床领用面料: item.裁床领用面料,
|
|
|
+ 裁床退回仓库面料: item.裁床退回仓库面料,
|
|
|
+ 备注: item.备注,
|
|
|
+ UNIQID: item.UNIQID // 保留 UNIQID 以便后续使用
|
|
|
+ }));
|
|
|
+
|
|
|
+ } catch (error) {
|
|
|
+ console.error(error);
|
|
|
+ }
|
|
|
+};
|
|
|
+
|
|
|
+
|
|
|
+//确定
|
|
|
+const editres_bomenterDialog = async () => {
|
|
|
+ const rawValueArray = edit_resbomtableData._rawValue;
|
|
|
+ const formattedData = rawValueArray
|
|
|
+ .filter(item => item.物料名称 !== null && item.物料名称 !== "") // 过滤掉物料名称为空的行
|
|
|
+ .map(item => {
|
|
|
+ return {
|
|
|
+ UNIQID: item.UNIQID !== undefined ? item.UNIQID : "",
|
|
|
+ BOM_物料名称: item.物料名称 !== null ? item.物料名称 : "",
|
|
|
+ BOM_计划用量: item.计划用料 !== null ? item.计划用料 : "",
|
|
|
+ BOM_标准用量: item.定额用料 !== null ? item.定额用料 : "",
|
|
|
+ BOM_实际用量: item.裁床实际用料 !== null ? item.裁床实际用料 : "",
|
|
|
+ Bom_领用数量: item.裁床领用面料 !== null ? item.裁床领用面料 : "",
|
|
|
+ BOM_退还数量: item.裁床退回仓库面料 !== null ? item.裁床退回仓库面料 : "",
|
|
|
+ BOM_desc: item.备注 !== null ? item.备注 : ""
|
|
|
+ }
|
|
|
+ });
|
|
|
+ console.log(formattedData);
|
|
|
+
|
|
|
+ const add_FabricEditdata = await FabricEdit(formattedData);
|
|
|
+ if (add_FabricEditdata.code === 0) {
|
|
|
+ edit_bomdialogFormVisible.value = false;
|
|
|
+ ElMessage({type: 'success',message: '修改成功'})
|
|
|
+ const orderBomListdata = await orderBomList({order:_Gd_gdbh.value});
|
|
|
+ bomtableData.splice(0,orderBomListdata.data.length,...orderBomListdata.data);//bom表格数据
|
|
|
+ } else {
|
|
|
+ ElMessage({ type: 'error',message: '修改失败'})
|
|
|
+ }
|
|
|
+}
|
|
|
+// 取消
|
|
|
+const editres_bomcloseDialog = () => {
|
|
|
+ edit_bomdialogFormVisible.value = false;
|
|
|
+}
|
|
|
//点击表格行获取下方表格数据列表
|
|
|
// =========== 颜色资料、工艺资料、技术资料附件 ===========
|
|
|
//全局调用订单号编号
|
|
|
const _Gd_gdbh = ref('')
|
|
|
const _ddhval = ref('')
|
|
|
+const _Gd_kh = ref('')
|
|
|
+const _Gd_sckh = ref('')
|
|
|
+const _Gd_ks = ref('')
|
|
|
//颜色资料
|
|
|
const ystableData = reactive([])
|
|
|
//尺寸列表
|
|
|
@@ -2181,6 +2346,9 @@ const tableRowClick = async (row) => {
|
|
|
mltableData.splice(0, mltableData.length);
|
|
|
_Gd_gdbh.value = row.订单编号
|
|
|
_ddhval.value = row.订单编号
|
|
|
+ _Gd_kh.value = row.客户编号
|
|
|
+ _Gd_sckh.value = row.生产款号
|
|
|
+ _Gd_ks.value = row.款式
|
|
|
try {
|
|
|
//数据列表显示
|
|
|
const PrintListDatas = await PrintListData({order:_Gd_gdbh.value})
|
|
|
@@ -2663,4 +2831,11 @@ const jsfjenterDialog = () => {
|
|
|
top: 30%;
|
|
|
left: 30%;
|
|
|
}
|
|
|
+::v-deep(.el-descriptions__table tbody tr .is-bordered-label){
|
|
|
+ width: 30px;
|
|
|
+}
|
|
|
+::v-deep(.el-descriptions__table tbody tr .el-descriptions__content){
|
|
|
+ width: 120px;
|
|
|
+}
|
|
|
+
|
|
|
</style>
|