|
@@ -2,7 +2,7 @@
|
|
|
<div>
|
|
<div>
|
|
|
<layout>
|
|
<layout>
|
|
|
<div class="gva-table-box">
|
|
<div class="gva-table-box">
|
|
|
- <h1 style="margin: 0%;margin-bottom: 6px;">出库领料</h1>
|
|
|
|
|
|
|
+ <h1 style="margin: 0%;margin-bottom: 6px;">出库</h1>
|
|
|
<el-row :gutter="24" style="margin-bottom: 6px;">
|
|
<el-row :gutter="24" style="margin-bottom: 6px;">
|
|
|
<el-input v-model="add_searchInfo" placeholder="请扫描订单号或输入生产款号进行出库领料"
|
|
<el-input v-model="add_searchInfo" placeholder="请扫描订单号或输入生产款号进行出库领料"
|
|
|
@keyup.enter="add_onSubmit"
|
|
@keyup.enter="add_onSubmit"
|
|
@@ -43,11 +43,9 @@
|
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
<el-dialog v-model="res_bomdialogFormVisible" :before-close="res_bomcloseDialog" width="100%" style="height: 100%;margin: 0%;" destroy-on-close>
|
|
<el-dialog v-model="res_bomdialogFormVisible" :before-close="res_bomcloseDialog" width="100%" style="height: 100%;margin: 0%;" destroy-on-close>
|
|
|
-
|
|
|
|
|
- <!-- <h3 style="font-size: 20px;margin: 0px;text-align: center;">面料领用页</h3> -->
|
|
|
|
|
<div class="dialog-footer" style="margin-top: 5px;">
|
|
<div class="dialog-footer" style="margin-top: 5px;">
|
|
|
- <el-input v-model="add_searchInfo" placeholder="请扫描订单号或输入生产款号进行出库领料"
|
|
|
|
|
- @keyup.enter="add_onSubmit" id="searchInput"
|
|
|
|
|
|
|
+ <el-input v-model="add_lysearchInfo" placeholder="请扫描订单号或输入生产款号进行出库领料"
|
|
|
|
|
+ @keyup.enter="add_lyonSubmit" id="searchInput"
|
|
|
style="width: 340px;height: 50px;margin-left: 10px;">
|
|
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>
|
|
@@ -57,13 +55,6 @@
|
|
|
<el-divider content-position="left">
|
|
<el-divider content-position="left">
|
|
|
<span style="font-size: 18px;color:red;font-weight: bold;margin-left: 20px;">绿色部分可进行填写</span>
|
|
<span style="font-size: 18px;color:red;font-weight: bold;margin-left: 20px;">绿色部分可进行填写</span>
|
|
|
</el-divider>
|
|
</el-divider>
|
|
|
- <!-- <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="margin-top: 5px;">
|
|
<div style="margin-top: 5px;">
|
|
|
<el-table ref="paichengRef"
|
|
<el-table ref="paichengRef"
|
|
|
:show-overflow-tooltip="true"
|
|
:show-overflow-tooltip="true"
|
|
@@ -89,15 +80,15 @@
|
|
|
<span style="font-size: 18px;color:red;font-weight: bold;margin-left: 20px;">面料领用页</span>
|
|
<span style="font-size: 18px;color:red;font-weight: bold;margin-left: 20px;">面料领用页</span>
|
|
|
</el-divider>
|
|
</el-divider>
|
|
|
<div style="margin-top: 5px;">
|
|
<div style="margin-top: 5px;">
|
|
|
- <el-table ref="paichengRef"
|
|
|
|
|
|
|
+ <el-table ref="paichengRef1"
|
|
|
:show-overflow-tooltip="true"
|
|
:show-overflow-tooltip="true"
|
|
|
highlight-current-row="true"
|
|
highlight-current-row="true"
|
|
|
- :row-style="{ height: '0px' }" :header-cell-style="{ padding: '0px' }"
|
|
|
|
|
- :cell-style="{ padding: '0px' }" :header-row-style="{ height: '0px' }"
|
|
|
|
|
- style="width: 100%;height: 25vh" border tooltip-effect="dark"
|
|
|
|
|
|
|
+ :row-style="{ height: '40px' }" :header-cell-style="{ padding: '0px' }"
|
|
|
|
|
+ :cell-style="{ padding: '0px' }" :header-row-style="{ height: '20px' }"
|
|
|
|
|
+ style="width: 100%;height: 45vh" border tooltip-effect="dark"
|
|
|
:data="FabriccollartableData" row-key="ID"
|
|
:data="FabriccollartableData" row-key="ID"
|
|
|
:cell-class-name="scfjfpxsCellClass">
|
|
:cell-class-name="scfjfpxsCellClass">
|
|
|
- <template v-for="(item, idx) in resbom_tableColumns">
|
|
|
|
|
|
|
+ <template v-for="(item, idx) in Fabriccollar_tableColumns">
|
|
|
<el-table-column #default="{ row, column, $index }" align="left" :label="item.label" :width="item.width" >
|
|
<el-table-column #default="{ row, column, $index }" align="left" :label="item.label" :width="item.width" >
|
|
|
<div v-if="['领用'].includes(item.prop)">
|
|
<div v-if="['领用'].includes(item.prop)">
|
|
|
<el-input v-model="row[item.prop]" :clearable="false"
|
|
<el-input v-model="row[item.prop]" :clearable="false"
|
|
@@ -217,31 +208,56 @@ getMachineMacdata();
|
|
|
|
|
|
|
|
//全局调用参数
|
|
//全局调用参数
|
|
|
const add_searchInfo = ref('')//搜索
|
|
const add_searchInfo = ref('')//搜索
|
|
|
|
|
+const add_lysearchInfo = ref('')//搜索
|
|
|
const restableData = reactive([])//表格
|
|
const restableData = reactive([])//表格
|
|
|
const _orderid = ref('')//订单子编号
|
|
const _orderid = ref('')//订单子编号
|
|
|
const _kh = ref('')//生产款号
|
|
const _kh = ref('')//生产款号
|
|
|
|
|
|
|
|
-//表格行点击
|
|
|
|
|
-const tableRowClick = async (row)=>{
|
|
|
|
|
- console.log(row)
|
|
|
|
|
- _orderid.value = row.订单编号
|
|
|
|
|
- _kh.value = row.生产款号
|
|
|
|
|
-}
|
|
|
|
|
-
|
|
|
|
|
//查询按钮
|
|
//查询按钮
|
|
|
const add_onSubmit = async ()=>{
|
|
const add_onSubmit = async ()=>{
|
|
|
- restableData.splice(0, restableData.length);
|
|
|
|
|
|
|
+ restableData.splice(0, restableData.length);//清空表格
|
|
|
//订单信息数据查询【接口】
|
|
//订单信息数据查询【接口】
|
|
|
const orderSearchdata = await orderSearch({search:add_searchInfo.value});
|
|
const orderSearchdata = await orderSearch({search:add_searchInfo.value});
|
|
|
- console.log(orderSearchdata)
|
|
|
|
|
if(orderSearchdata.data.length === 1){
|
|
if(orderSearchdata.data.length === 1){
|
|
|
res_bomdialogFormVisible.value = true
|
|
res_bomdialogFormVisible.value = true
|
|
|
_orderid.value = orderSearchdata.data[0]['订单编号']
|
|
_orderid.value = orderSearchdata.data[0]['订单编号']
|
|
|
|
|
+ add_lysearchInfo.value = add_searchInfo.value
|
|
|
Reporting_onSubmit()
|
|
Reporting_onSubmit()
|
|
|
|
|
+ }else{
|
|
|
|
|
+ restableData.splice(0,orderSearchdata.length,...orderSearchdata.data);
|
|
|
}
|
|
}
|
|
|
- restableData.splice(0,orderSearchdata.length,...orderSearchdata.data);
|
|
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
|
|
+//表格行点击
|
|
|
|
|
+const tableRowClick = async (row)=>{
|
|
|
|
|
+ console.log(row)
|
|
|
|
|
+ add_searchInfo.value = row.订单编号
|
|
|
|
|
+ _orderid.value = row.订单编号
|
|
|
|
|
+ _kh.value = row.生产款号
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+//出库查询
|
|
|
|
|
+const add_lyonSubmit = async ()=>{
|
|
|
|
|
+ try {
|
|
|
|
|
+ const orderBomListdata = await orderBomList({order:add_lysearchInfo.value});
|
|
|
|
|
+ resbomtableData.value = orderBomListdata.data;
|
|
|
|
|
+ const formattedData = orderBomListdata.data.map(item=>{
|
|
|
|
|
+ item.物料名称 = item.物料名称;
|
|
|
|
|
+ item.计划用料 = item.计划用料;
|
|
|
|
|
+ item.定额用料 = item.定额用料;
|
|
|
|
|
+ item.裁床实际用料 = item.裁床实际用料;
|
|
|
|
|
+ item.裁床领用面料 = item.裁床领用面料;
|
|
|
|
|
+ item.裁床退回仓库面料 = item.裁床退回仓库面料;
|
|
|
|
|
+ item.备注 = item.备注;
|
|
|
|
|
+ item.UNIQID = item.UNIQID;
|
|
|
|
|
+ item.领用 = '';
|
|
|
|
|
+ return item
|
|
|
|
|
+ });
|
|
|
|
|
+ } catch (error) {
|
|
|
|
|
+ console.error(error);
|
|
|
|
|
+ }
|
|
|
|
|
+};
|
|
|
|
|
|
|
|
//===========报工==========
|
|
//===========报工==========
|
|
|
const res_bomdialogFormVisible = ref(false)
|
|
const res_bomdialogFormVisible = ref(false)
|
|
@@ -256,7 +272,28 @@ const ddhformData = reactive({
|
|
|
const resbom_tableColumns = ref(
|
|
const resbom_tableColumns = ref(
|
|
|
[
|
|
[
|
|
|
{ label: '订单编号', prop: '订单编号', width: '170' },
|
|
{ label: '订单编号', prop: '订单编号', width: '170' },
|
|
|
- { label: '客户', prop: '客户', width: '170' },
|
|
|
|
|
|
|
+ { label: '客户', prop: '客户编号', width: '170' },
|
|
|
|
|
+ { label: '生产款号', prop: '生产款号', width: '170' },
|
|
|
|
|
+ { label: '款式', prop: '款式', width: '170' },
|
|
|
|
|
+ { label: '物料名称', prop: '物料名称', width: '170' },
|
|
|
|
|
+ { label: '计划用料', prop: '计划用料', width: '110' },
|
|
|
|
|
+ { label: '定额用料', prop: '定额用料', width: '110' },
|
|
|
|
|
+ { label: '裁床实际用料', prop: '裁床实际用料', width: '115' },
|
|
|
|
|
+ { label: '裁床领用面料', prop: '裁床领用面料', width: '115' },
|
|
|
|
|
+ { label: '裁床退回仓库面料', prop: '裁床退回仓库面料', width: '150' },
|
|
|
|
|
+ { label: '入库总量', prop: '入库总量', width: '100' },
|
|
|
|
|
+ { label: '面料结余', prop: '面料结余', width: '110' },
|
|
|
|
|
+ { label: '本次领用', prop: '领用', width: '110' },
|
|
|
|
|
+ // { label: '备注', prop: '备注', width: '120' },
|
|
|
|
|
+ { label: '投料单位', prop: '投料单位', width: '100' },
|
|
|
|
|
+ // { label: 'UNIQID', prop: 'UNIQID', width: '80' },
|
|
|
|
|
+ ]
|
|
|
|
|
+)
|
|
|
|
|
+
|
|
|
|
|
+const Fabriccollar_tableColumns = ref(
|
|
|
|
|
+ [
|
|
|
|
|
+ { label: '订单编号', prop: '订单编号', width: '170' },
|
|
|
|
|
+ { label: '客户', prop: '客户编号', width: '170' },
|
|
|
{ label: '生产款号', prop: '生产款号', width: '170' },
|
|
{ label: '生产款号', prop: '生产款号', width: '170' },
|
|
|
{ label: '款式', prop: '款式', width: '170' },
|
|
{ label: '款式', prop: '款式', width: '170' },
|
|
|
{ label: '物料名称', prop: '物料名称', width: '170' },
|
|
{ label: '物料名称', prop: '物料名称', width: '170' },
|
|
@@ -278,7 +315,9 @@ const Reporting_onSubmit = async ()=>{
|
|
|
if(_orderid.value === '' || _orderid.value === null){
|
|
if(_orderid.value === '' || _orderid.value === null){
|
|
|
ElMessage({type: 'warning',message: '请扫描订单后,再操作此功能'})
|
|
ElMessage({type: 'warning',message: '请扫描订单后,再操作此功能'})
|
|
|
}else{
|
|
}else{
|
|
|
|
|
+ add_lysearchInfo.value = add_searchInfo.value
|
|
|
res_bomdialogFormVisible.value = true
|
|
res_bomdialogFormVisible.value = true
|
|
|
|
|
+ FabriccollartableData.value = [];
|
|
|
const orderBomListlsit = await orderBomList({order:_orderid.value});
|
|
const orderBomListlsit = await orderBomList({order:_orderid.value});
|
|
|
console.log(orderBomListlsit)
|
|
console.log(orderBomListlsit)
|
|
|
_TestCoefficient();
|
|
_TestCoefficient();
|
|
@@ -349,7 +388,11 @@ const scfjfpxsCellClass = ({row, column, rowIndex, columnIndex}) =>{
|
|
|
|
|
|
|
|
// 确定
|
|
// 确定
|
|
|
const res_bomenterDialog = async() => {
|
|
const res_bomenterDialog = async() => {
|
|
|
- const rawValueArray = resbomtableData._rawValue;
|
|
|
|
|
|
|
+ if(FabriccollartableData.value.length === 0){
|
|
|
|
|
+ ElMessage({ type: 'warning',message: '请先添加领用信息'})
|
|
|
|
|
+ return
|
|
|
|
|
+ }
|
|
|
|
|
+ const rawValueArray = FabriccollartableData._rawValue;
|
|
|
const formattedData = rawValueArray.map(item => {
|
|
const formattedData = rawValueArray.map(item => {
|
|
|
return {
|
|
return {
|
|
|
order_id: ddhformData.ddh,
|
|
order_id: ddhformData.ddh,
|
|
@@ -379,7 +422,9 @@ const res_bomcloseDialog = () => {
|
|
|
|
|
|
|
|
// 增加至领用页
|
|
// 增加至领用页
|
|
|
const print_lingyong = async () => {
|
|
const print_lingyong = async () => {
|
|
|
- FabriccollartableData.value.push(...resbomtableData.value)
|
|
|
|
|
|
|
+ const filteredData = resbomtableData.value.filter(item => item.领用 && item.领用.trim() !== "");
|
|
|
|
|
+ // 将过滤后的数据添加到 FabriccollartableData
|
|
|
|
|
+ FabriccollartableData.value.push(...filteredData);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
|