|
@@ -47,9 +47,9 @@
|
|
|
<!-- 选择入库弹窗 -->
|
|
<!-- 选择入库弹窗 -->
|
|
|
<el-dialog v-model="res_bomdialogFormVisible" :before-close="res_bomcloseDialog" width="100%" style="height: 100%;margin: 0%;padding: 0px 10px 0px 10px;" destroy-on-close>
|
|
<el-dialog v-model="res_bomdialogFormVisible" :before-close="res_bomcloseDialog" width="100%" style="height: 100%;margin: 0%;padding: 0px 10px 0px 10px;" destroy-on-close>
|
|
|
<div class="dialog-footer" style="margin: 0px;">
|
|
<div class="dialog-footer" style="margin: 0px;">
|
|
|
- <el-input v-model="add_lysearchInfo" placeholder="请扫描订单编号进行操作"
|
|
|
|
|
|
|
+ <!-- <el-input v-model="add_lysearchInfo" placeholder="请扫描订单编号进行操作"
|
|
|
@keyup.enter="add_lyonSubmit" id="ly_searchInput" style="width: 340px;height: 50px;margin-left: 10px;">
|
|
@keyup.enter="add_lyonSubmit" id="ly_searchInput" style="width: 340px;height: 50px;margin-left: 10px;">
|
|
|
- </el-input>
|
|
|
|
|
|
|
+ </el-input> -->
|
|
|
<el-button type="primary" @click="res_bomcloseDialog" style="width: 100px;height: 50px;margin-left: 10px;">关 闭</el-button>
|
|
<el-button type="primary" @click="res_bomcloseDialog" style="width: 100px;height: 50px;margin-left: 10px;">关 闭</el-button>
|
|
|
<el-button type="primary" @click="res_bomenterDialog" style="width: 100px;height: 50px;">一键出库</el-button>
|
|
<el-button type="primary" @click="res_bomenterDialog" style="width: 100px;height: 50px;">一键出库</el-button>
|
|
|
</div>
|
|
</div>
|
|
@@ -92,6 +92,7 @@
|
|
|
style="height: 30px;"
|
|
style="height: 30px;"
|
|
|
:id="`input${idx}${$index}`"
|
|
:id="`input${idx}${$index}`"
|
|
|
@keyup="resbom_handleKeyDown($event, idx, $index, item.prop)"
|
|
@keyup="resbom_handleKeyDown($event, idx, $index, item.prop)"
|
|
|
|
|
+ @input="handleInput2($event, row, item.prop)"
|
|
|
/>
|
|
/>
|
|
|
</div>
|
|
</div>
|
|
|
<div v-else>
|
|
<div v-else>
|
|
@@ -259,6 +260,7 @@
|
|
|
const danhao = ref('')
|
|
const danhao = ref('')
|
|
|
const riqi = ref('')
|
|
const riqi = ref('')
|
|
|
const chukuren = ref('')
|
|
const chukuren = ref('')
|
|
|
|
|
+ const linguser = ref('')
|
|
|
const add_searchInfo = ref('')//搜索
|
|
const add_searchInfo = ref('')//搜索
|
|
|
const add_lysearchInfo = ref('')//搜索
|
|
const add_lysearchInfo = ref('')//搜索
|
|
|
const restableData = reactive([])//表格
|
|
const restableData = reactive([])//表格
|
|
@@ -376,7 +378,7 @@
|
|
|
{ label: '定额用料', prop: '定额用料', width: '90' },
|
|
{ label: '定额用料', prop: '定额用料', width: '90' },
|
|
|
{ label: '定额门幅', prop: 'BOM_定额门幅', width: '90' },
|
|
{ label: '定额门幅', prop: 'BOM_定额门幅', width: '90' },
|
|
|
{ label: '实际门幅', prop: '实际门幅', width: '100' },
|
|
{ label: '实际门幅', prop: '实际门幅', width: '100' },
|
|
|
- { label: '领用', prop: '领用', width: '100' },
|
|
|
|
|
|
|
+ { label: '领用数量', prop: '领用数量', width: '100' },
|
|
|
{ label: '入仓总量', prop: '入仓总量', width: '90' },
|
|
{ label: '入仓总量', prop: '入仓总量', width: '90' },
|
|
|
{ label: '库存数量', prop: '库存数量', width: '90' },
|
|
{ label: '库存数量', prop: '库存数量', width: '90' },
|
|
|
{ label: '出库数量', prop: '出库数量', width: '90' },
|
|
{ label: '出库数量', prop: '出库数量', width: '90' },
|
|
@@ -460,7 +462,15 @@
|
|
|
// 确定
|
|
// 确定
|
|
|
const res_bomenterDialog = async () => {
|
|
const res_bomenterDialog = async () => {
|
|
|
console.log(resbomtableData);
|
|
console.log(resbomtableData);
|
|
|
-
|
|
|
|
|
|
|
+ if(linguser.value === '' || linguser.value === null){
|
|
|
|
|
+ ElMessage({type: 'warning',message: '请输入领用人'})
|
|
|
|
|
+ return
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ if(resbomtableData.value[0]['出库数量'] === ''|| resbomtableData.value[0]['出库数量'] === undefined){
|
|
|
|
|
+ ElMessage({type: 'warning',message: '出库数量不能为空'})
|
|
|
|
|
+ return
|
|
|
|
|
+ }
|
|
|
// 直接构造一个对象,不用 JSON 格式的索引
|
|
// 直接构造一个对象,不用 JSON 格式的索引
|
|
|
const formattedData = {
|
|
const formattedData = {
|
|
|
order_id: ddhformData.ddh,
|
|
order_id: ddhformData.ddh,
|
|
@@ -495,9 +505,37 @@
|
|
|
|
|
|
|
|
// 取消
|
|
// 取消
|
|
|
const res_bomcloseDialog = () => {
|
|
const res_bomcloseDialog = () => {
|
|
|
- res_bomdialogFormVisible.value = false;
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
|
|
+ _orderid.value = '';
|
|
|
|
|
+ add_searchInfo.value = '';
|
|
|
|
|
+ restableData.splice(0, restableData.length);
|
|
|
|
|
+ res_bomdialogFormVisible.value = false;
|
|
|
|
|
+ //自动获取光标
|
|
|
|
|
+ getMachineMacdata();
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+ // 输入框只能输入数字和小数点
|
|
|
|
|
+ const handleInput2 = (value, row, prop) => {
|
|
|
|
|
+ if(prop != "物料名称" && prop != "备注" ){
|
|
|
|
|
+ // 使用正则表达式过滤非数字和小数点的字符
|
|
|
|
|
+ let filteredValue = value.replace(/[^\d.]/g, '');
|
|
|
|
|
+
|
|
|
|
|
+ // 不允许以 . 开头
|
|
|
|
|
+ if (filteredValue.startsWith('.')) {
|
|
|
|
|
+ filteredValue = filteredValue.slice(1); // 去掉开头的 .
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ // 确保只有一个小数点
|
|
|
|
|
+ const parts = filteredValue.split('.');
|
|
|
|
|
+ if (parts.length > 2) {
|
|
|
|
|
+ // 如果超过一个小数点,只保留第一个
|
|
|
|
|
+ row[prop] = `${parts[0]}.${parts.slice(1).join('')}`;
|
|
|
|
|
+ } else {
|
|
|
|
|
+ // 否则直接赋值
|
|
|
|
|
+ row[prop] = filteredValue;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+};
|
|
|
|
|
|
|
|
|
|
|
|
|
//=============出库退还记录==================
|
|
//=============出库退还记录==================
|