|
|
@@ -71,6 +71,7 @@
|
|
|
<!-- 明细数据 -->
|
|
|
<el-dialog v-model="recorddialogFormVisible" :before-close="record_bomcloseDialog" width="100%" style="height: 100%;margin: 0%;padding: 0px 10px 0px 10px;" destroy-on-close>
|
|
|
<el-button type="danger" @click="record_closeDialog" style="width: 100px;height: 50px;margin-left: 10px;">关 闭</el-button>
|
|
|
+ <el-button type="primary" @click="edit_closeDialog" style="width: 100px;height: 50px;margin-left: 10px;">更 新</el-button>
|
|
|
<div class="gva-table-box">
|
|
|
<el-tabs v-model="activeName" @tab-click="handleClick">
|
|
|
<el-tab-pane label="出库明细" name="first">
|
|
|
@@ -83,21 +84,27 @@
|
|
|
:summary-method="getSummaries" tooltip-effect="dark" :data="rdetailstableData" row-key="ID" >
|
|
|
<!-- <el-table-column align="center" type="selection" width="40"/> -->
|
|
|
<el-table-column align="left" label="出库单号" prop="出库单据编号" width="140"/>
|
|
|
- <!-- <el-table-column align="left" label="批次号" prop="批次号" width="90"/> -->
|
|
|
<el-table-column align="left" label="订单编号" prop="订单编号" width="105"/>
|
|
|
- <!-- <el-table-column align="left" label="客户" prop="客户编号" width="70"/> -->
|
|
|
<el-table-column align="left" label="生产款号" prop="款号" width="140"/>
|
|
|
- <!-- <el-table-column align="left" label="款式" prop="款式" width="120"/> -->
|
|
|
- <!-- <el-table-column align="left" label="物料编码" prop="物料编码" width="150"/> -->
|
|
|
<el-table-column align="left" label="物料名称" prop="物料名称" width="140"/>
|
|
|
<el-table-column align="left" label="颜色" prop="BOM_颜色" width="100"/>
|
|
|
- <!-- <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"/>
|
|
|
<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"/>
|
|
|
- <el-table-column align="left" label="出库数量" prop="数量" width="90"/>
|
|
|
+ <el-table-column label="出库数量" prop="数量" width="90" align="left">
|
|
|
+ <template #default="scope">
|
|
|
+ <el-input class="green-bg-item"
|
|
|
+ v-model.number="scope.row.数量"
|
|
|
+ size="mini"
|
|
|
+ type="number"
|
|
|
+ :min="0"
|
|
|
+ @input="handleInputChange(scope.row)"
|
|
|
+ style="width: 80px;"
|
|
|
+ />
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <!-- <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"/>
|
|
|
<el-table-column align="left" label="投料单位" prop="单位" width="90"/>
|
|
|
@@ -308,8 +315,9 @@
|
|
|
import { Layout, LayoutSider, LayoutContent } from '@arco-design/web-vue';
|
|
|
import {ref, reactive} from 'vue'
|
|
|
import {getInputDetail,
|
|
|
- inputStash,
|
|
|
- OutOrderSearch,outReport,FabricDetail,gitReceiptNumber,FabricDetaillist,FabricDetaildel,ReceiptList,ReceiptDetail,fetchMonthlyFabricRecords} from '@/api/mes/job'
|
|
|
+ inputStash,rApictedit,
|
|
|
+ OutOrderSearch,outReport,FabricDetail,gitReceiptNumber,
|
|
|
+ FabricDetaillist,FabricDetaildel,ReceiptList,ReceiptDetail,fetchMonthlyFabricRecords} from '@/api/mes/job'
|
|
|
import { ElMessage, ElMessageBox,ElUpload, ElButton } from 'element-plus';
|
|
|
import { useUserStore } from '@/pinia/modules/user'
|
|
|
// import { get } from 'scriptjs';
|
|
|
@@ -861,24 +869,53 @@ const records_onSubmit = async () => {
|
|
|
};
|
|
|
records_onSubmit();
|
|
|
|
|
|
+
|
|
|
+const recorddialogFormVisible = ref(false)
|
|
|
+const rdetailstableData = reactive([])
|
|
|
+const _danhao = ref('')
|
|
|
+//查看明细
|
|
|
+const record_deleteRow = async (row) => {
|
|
|
+ console.log(row)
|
|
|
+ recorddialogFormVisible.value = true
|
|
|
+ rdetailstableData.splice(0,rdetailstableData.length);
|
|
|
+ _danhao.value = row['出库单']
|
|
|
+ console.log(_danhao.value)
|
|
|
+ const FabricDetaillists = await ReceiptDetail({receipt:row['出库单']});
|
|
|
+ rdetailstableData.splice(0,FabricDetaillists.length,...FabricDetaillists.data);
|
|
|
+}
|
|
|
+
|
|
|
+//关闭
|
|
|
+const record_closeDialog = async (row) => {
|
|
|
+ console.log(row)
|
|
|
+ recorddialogFormVisible.value = false
|
|
|
+}
|
|
|
|
|
|
- const recorddialogFormVisible = ref(false)
|
|
|
- const rdetailstableData = reactive([])
|
|
|
- //查看明细
|
|
|
- const record_deleteRow = async (row) => {
|
|
|
- console.log(row)
|
|
|
- recorddialogFormVisible.value = true
|
|
|
+//更新
|
|
|
+const edit_closeDialog = async (row) => {
|
|
|
+ console.log(_danhao.value)
|
|
|
+ // console.log(rdetailstableData)
|
|
|
+ //将修改的数据放入数组给到接口
|
|
|
+ const formattedData = rdetailstableData
|
|
|
+ .map(item => {
|
|
|
+ return {
|
|
|
+ id: item.id !== null ? item.id : "",
|
|
|
+ name: "出库",
|
|
|
+ sys_id:userStore.userInfo.nickName,
|
|
|
+ 数量: item.数量 !== null ? item.数量 : ""
|
|
|
+ }
|
|
|
+ });
|
|
|
+ console.log(formattedData)
|
|
|
+ const rApictedit_data = await rApictedit(formattedData);
|
|
|
+ if (rApictedit_data.code === 0) {
|
|
|
+ ElMessage({ type: 'success', message: '更新成功' });
|
|
|
+ //刷新表格保证数据最新
|
|
|
rdetailstableData.splice(0,rdetailstableData.length);
|
|
|
-
|
|
|
- const FabricDetaillists = await ReceiptDetail({receipt:row['出库单']});
|
|
|
+ const FabricDetaillists = await ReceiptDetail({receipt:_danhao.value});
|
|
|
rdetailstableData.splice(0,FabricDetaillists.length,...FabricDetaillists.data);
|
|
|
- }
|
|
|
-
|
|
|
-
|
|
|
- const record_closeDialog = async (row) => {
|
|
|
- console.log(row)
|
|
|
- recorddialogFormVisible.value = false
|
|
|
- }
|
|
|
+ } else {
|
|
|
+ ElMessage({ type: 'error', message: '更新失败' });
|
|
|
+ }
|
|
|
+}
|
|
|
|
|
|
|
|
|
|