|
@@ -468,62 +468,7 @@ const emit = defineEmits(["auxiliaryChange"]);
|
|
|
let auxiliaryData = ref([
|
|
|
{
|
|
|
label: "供应商最近采购",
|
|
|
- data: [
|
|
|
- [
|
|
|
- {
|
|
|
- label: "合同编号",
|
|
|
- value: "",
|
|
|
- fn: () => {},
|
|
|
- num: 1,
|
|
|
- },
|
|
|
- {
|
|
|
- label: "下单日期",
|
|
|
- value: "",
|
|
|
- num: 1,
|
|
|
- },
|
|
|
- {
|
|
|
- label: "合同金额",
|
|
|
- value: "",
|
|
|
- num: 1,
|
|
|
- },
|
|
|
- ],
|
|
|
- [
|
|
|
- {
|
|
|
- label: "合同编号",
|
|
|
- value: "",
|
|
|
- fn: () => {},
|
|
|
- num: 1,
|
|
|
- },
|
|
|
- {
|
|
|
- label: "下单日期",
|
|
|
- value: "",
|
|
|
- num: 1,
|
|
|
- },
|
|
|
- {
|
|
|
- label: "合同金额",
|
|
|
- value: "",
|
|
|
- num: 1,
|
|
|
- },
|
|
|
- ],
|
|
|
- [
|
|
|
- {
|
|
|
- label: "合同编号",
|
|
|
- value: "",
|
|
|
- fn: () => {},
|
|
|
- num: 1,
|
|
|
- },
|
|
|
- {
|
|
|
- label: "下单日期",
|
|
|
- value: "",
|
|
|
- num: 1,
|
|
|
- },
|
|
|
- {
|
|
|
- label: "合同金额",
|
|
|
- value: "",
|
|
|
- num: 1,
|
|
|
- },
|
|
|
- ],
|
|
|
- ],
|
|
|
+ data: [],
|
|
|
},
|
|
|
{
|
|
|
label: "产品价格",
|
|
@@ -545,26 +490,41 @@ const getAuxiliaryData = (supplyId, productIdList) => {
|
|
|
// 获取数组长度
|
|
|
let dataLength = auxiliaryData.value.length;
|
|
|
// 供应商最近采购
|
|
|
- auxiliaryData.value[dataLength - 2].data = auxiliaryData.value[
|
|
|
- dataLength - 2
|
|
|
- ].data.map((x, index) => {
|
|
|
- return x.map((y, sonIndex) => {
|
|
|
- let obj = { ...y };
|
|
|
- let value = "";
|
|
|
- if (sonIndex === 0) {
|
|
|
- value = res.purchaseList[index].code;
|
|
|
- } else if (sonIndex === 1) {
|
|
|
- value = res.purchaseList[index].createTime;
|
|
|
- } else {
|
|
|
- value =
|
|
|
- res.purchaseList[index].currency +
|
|
|
- " " +
|
|
|
- proxy.moneyFormat(res.purchaseList[index].amount, 2);
|
|
|
- }
|
|
|
- obj.value = value;
|
|
|
- return obj;
|
|
|
- });
|
|
|
- });
|
|
|
+ const recentlyArr = [
|
|
|
+ {
|
|
|
+ label: "合同编号",
|
|
|
+ value: "",
|
|
|
+ fn: () => {},
|
|
|
+ num: 1,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "下单日期",
|
|
|
+ value: "",
|
|
|
+ num: 1,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "合同金额",
|
|
|
+ value: "",
|
|
|
+ num: 1,
|
|
|
+ },
|
|
|
+ ];
|
|
|
+ auxiliaryData.value[dataLength - 2].data = res.purchaseList.map(
|
|
|
+ (x, index) => {
|
|
|
+ return recentlyArr.map((y, sonIndex) => {
|
|
|
+ let obj = { ...y };
|
|
|
+ let value = "";
|
|
|
+ if (sonIndex === 0) {
|
|
|
+ value = x.code;
|
|
|
+ } else if (sonIndex === 1) {
|
|
|
+ value = x.createTime;
|
|
|
+ } else {
|
|
|
+ value = x.currency + " " + proxy.moneyFormat(x.amount, 2);
|
|
|
+ }
|
|
|
+ obj.value = value;
|
|
|
+ return obj;
|
|
|
+ });
|
|
|
+ }
|
|
|
+ );
|
|
|
// 产品价格
|
|
|
const arrConfig = [
|
|
|
{
|