|
@@ -113,7 +113,7 @@
|
|
<!-- 子表单区域 -->
|
|
<!-- 子表单区域 -->
|
|
<a-tabs v-model:activeKey="activeKey" animated style="padding: 24px; padding-top: 0px">
|
|
<a-tabs v-model:activeKey="activeKey" animated style="padding: 24px; padding-top: 0px">
|
|
<a-tab-pane tab="采购入库 - 入库明细(stock in details)" key="stockIn" :forceRender="true">
|
|
<a-tab-pane tab="采购入库 - 入库明细(stock in details)" key="stockIn" :forceRender="true">
|
|
- <a-button type="primary" style="margin-right: 1%; margin-bottom: 1%" @click="selectArrivalList" :disabled="disabled">
|
|
|
|
|
|
+ <a-button type="primary" style="margin-right: 1%; margin-bottom: 1%" @click="selectArrivalList" :disabled="disabled || notAllowEdit">
|
|
选择到货单(select arrival)</a-button
|
|
选择到货单(select arrival)</a-button
|
|
>
|
|
>
|
|
<j-vxe-table
|
|
<j-vxe-table
|
|
@@ -164,7 +164,7 @@
|
|
import { defineComponent, ref, reactive, computed, toRaw } from 'vue';
|
|
import { defineComponent, ref, reactive, computed, toRaw } from 'vue';
|
|
import { defHttp } from '/@/utils/http/axios';
|
|
import { defHttp } from '/@/utils/http/axios';
|
|
import { useValidateAntFormAndTable } from '/@/hooks/system/useJvxeMethods';
|
|
import { useValidateAntFormAndTable } from '/@/hooks/system/useJvxeMethods';
|
|
- import { queryPurInFormShipFormShippTable, querystockInByMainId, queryDataById, saveOrUpdate, ClassList } from '../purchaseInForm.api';
|
|
|
|
|
|
+ import { queryPurInFormShipFormShippTable, querystockInByMainId, queryDataById, saveOrUpdate, ClassList, getArrivalDetailList } from '../purchaseInForm.api';
|
|
import { JVxeTable } from '/@/components/jeecg/JVxeTable';
|
|
import { JVxeTable } from '/@/components/jeecg/JVxeTable';
|
|
import { purInShipColumns, stockInColumns } from '../puechaseInForm.data';
|
|
import { purInShipColumns, stockInColumns } from '../puechaseInForm.data';
|
|
import BaseShipArchiveAccessoriesModal from '../../../publicComponents/BaseShipArchiveAccessoriesModal.vue';
|
|
import BaseShipArchiveAccessoriesModal from '../../../publicComponents/BaseShipArchiveAccessoriesModal.vue';
|
|
@@ -207,6 +207,7 @@
|
|
const SelectArrivalListRef = ref();
|
|
const SelectArrivalListRef = ref();
|
|
const purInShipTableRef = ref();
|
|
const purInShipTableRef = ref();
|
|
const BaseShipArchiveAccessoriesModalRef = ref();
|
|
const BaseShipArchiveAccessoriesModalRef = ref();
|
|
|
|
+ var notAllowEdit = ref(false);
|
|
const purInShipTable = reactive<Record<string, any>>({
|
|
const purInShipTable = reactive<Record<string, any>>({
|
|
loading: false,
|
|
loading: false,
|
|
columns: purInShipColumns,
|
|
columns: purInShipColumns,
|
|
@@ -274,6 +275,7 @@
|
|
var goodsAllocationArr = await initDictOptions('goods_allocation');
|
|
var goodsAllocationArr = await initDictOptions('goods_allocation');
|
|
formData.warehouse = warehouseArr[0].value;
|
|
formData.warehouse = warehouseArr[0].value;
|
|
formData.goodsAllocation = goodsAllocationArr[0].value;
|
|
formData.goodsAllocation = goodsAllocationArr[0].value;
|
|
|
|
+ notAllowEdit.value = false;
|
|
}
|
|
}
|
|
async function edit(row) {
|
|
async function edit(row) {
|
|
//主表数据
|
|
//主表数据
|
|
@@ -283,6 +285,7 @@
|
|
purInShipTable.dataSource = [...purInShipDataList];
|
|
purInShipTable.dataSource = [...purInShipDataList];
|
|
const stockInDataList = await querystockInByMainId(row['id']);
|
|
const stockInDataList = await querystockInByMainId(row['id']);
|
|
stockInTable.dataSource = [...stockInDataList];
|
|
stockInTable.dataSource = [...stockInDataList];
|
|
|
|
+ notAllowEdit.value = true;
|
|
}
|
|
}
|
|
|
|
|
|
async function queryMainData(id) {
|
|
async function queryMainData(id) {
|
|
@@ -375,27 +378,32 @@
|
|
function selectArrivalList() {
|
|
function selectArrivalList() {
|
|
SelectArrivalListRef.value.getTable(formData);
|
|
SelectArrivalListRef.value.getTable(formData);
|
|
}
|
|
}
|
|
- function addStockInList(data) {
|
|
|
|
- formData.project = data[0].project;
|
|
|
|
- formData.projectName = data[0].projectName;
|
|
|
|
- formData.supplier = data[0].supplier;
|
|
|
|
- formData.supplierName = data[0].supplierName;
|
|
|
|
- formData.delivery = data[0].delivery;
|
|
|
|
- formData.productionClass = data[0].productionClass;
|
|
|
|
- formData.model = data[0].model;
|
|
|
|
- formData.maker = data[0].maker;
|
|
|
|
- formData.sourceCode = data[0].billCode;
|
|
|
|
- formData.arrivalDetails = data[0].arrivalDetails;
|
|
|
|
- getShipList(data[0].headId);
|
|
|
|
- data.map((item) => {
|
|
|
|
- item.model = item.childModel;
|
|
|
|
- item.sourceId = item.childId;
|
|
|
|
- item.arrivalQuantity = item.quantity;
|
|
|
|
- item.stockInQuantity = item.quantity;
|
|
|
|
- });
|
|
|
|
- var xTable = stockInTableRef.value!.getXTable();
|
|
|
|
- var arr = xTable.data.concat(data);
|
|
|
|
- stockInTable.dataSource = arr;
|
|
|
|
|
|
+ async function addStockInList(data) {
|
|
|
|
+ var arr = await getArrivalDetailList({ headId: data[0].id, pageSize: -1 })
|
|
|
|
+ if(arr.records.length!==0) {
|
|
|
|
+ formData.project = arr.records[0].project;
|
|
|
|
+ formData.projectName = arr.records[0].projectName;
|
|
|
|
+ formData.supplier = arr.records[0].supplier;
|
|
|
|
+ formData.supplierName = arr.records[0].supplierName;
|
|
|
|
+ formData.delivery = arr.records[0].delivery;
|
|
|
|
+ formData.productionClass = arr.records[0].productionClass;
|
|
|
|
+ formData.model = arr.records[0].model;
|
|
|
|
+ formData.maker = arr.records[0].maker;
|
|
|
|
+ formData.sourceCode = arr.records[0].billCode;
|
|
|
|
+ formData.arrivalDetails = arr.records[0].arrivalDetails;
|
|
|
|
+ getShipList(arr.records[0].headId);
|
|
|
|
+ data.map((item) => {
|
|
|
|
+ item.model = item.childModel;
|
|
|
|
+ item.sourceId = item.childId;
|
|
|
|
+ item.arrivalQuantity = item.quantity;
|
|
|
|
+ item.stockInQuantity = item.quantity;
|
|
|
|
+ });
|
|
|
|
+ stockInTable.dataSource = arr.records;
|
|
|
|
+ notAllowEdit.value = true;
|
|
|
|
+ }
|
|
|
|
+ // var xTable = stockInTableRef.value!.getXTable();
|
|
|
|
+ // var arr = xTable.data.concat(data);
|
|
|
|
+ // stockInTable.dataSource = arr;
|
|
}
|
|
}
|
|
/**
|
|
/**
|
|
* 值改变事件触发-树控件回调
|
|
* 值改变事件触发-树控件回调
|
|
@@ -432,6 +440,7 @@
|
|
addStockInList,
|
|
addStockInList,
|
|
baseUrl,
|
|
baseUrl,
|
|
ClassList,
|
|
ClassList,
|
|
|
|
+ notAllowEdit,
|
|
};
|
|
};
|
|
},
|
|
},
|
|
});
|
|
});
|