|
@@ -27,9 +27,8 @@
|
|
|
<!-- 存栏结构 -->
|
|
|
<chart-inventory-pie :data="inventoryPieData"></chart-inventory-pie>
|
|
|
<!-- 存栏变动 -->
|
|
|
- <chart-inventory-lines
|
|
|
- :data="inventoryLinesData"
|
|
|
- ></chart-inventory-lines>
|
|
|
+ <chart-inventory-lines :data="inventoryLinesData">
|
|
|
+ </chart-inventory-lines>
|
|
|
</div>
|
|
|
<div>
|
|
|
<!-- 存栏计数 -->
|
|
@@ -452,23 +451,14 @@ export default {
|
|
|
this.pageNum = val;
|
|
|
this.init();
|
|
|
},
|
|
|
- init() {
|
|
|
- let params = {
|
|
|
- pageNum: this.pageNum,
|
|
|
- pageSize: this.size,
|
|
|
- searchStr: this.keyword,
|
|
|
- };
|
|
|
- console.log(params);
|
|
|
- // 获取后端数据
|
|
|
- },
|
|
|
// 销售额选中日期
|
|
|
salesSetDay(data) {
|
|
|
this.salesDay = data;
|
|
|
- console.log(this.salesDay);
|
|
|
+ // console.log(this.salesDay);
|
|
|
},
|
|
|
// 销售额选中日周月
|
|
|
salesOnClickType(data) {
|
|
|
- console.log(data);
|
|
|
+ // console.log(data);
|
|
|
},
|
|
|
// 工作看板
|
|
|
initWorkBoard() {
|
|
@@ -500,22 +490,28 @@ export default {
|
|
|
getInventoryAndProduct({}).then((res) => {
|
|
|
if (res.code === 10000) {
|
|
|
// this.inventoryLinesData = res.data
|
|
|
- console.log(res.data);
|
|
|
+ // console.log(res.data);
|
|
|
+ const undefinedData = {
|
|
|
+ stockQuantity: 0,
|
|
|
+ };
|
|
|
// this.inventoryPieData = res.data.slice(0, 6)
|
|
|
this.inventoryPieData = [
|
|
|
- res.data["sow_stock"],
|
|
|
- res.data["boar_stock"],
|
|
|
- res.data["grice_stock"],
|
|
|
- res.data["piglet_stock"],
|
|
|
- res.data["fatpig_stock"],
|
|
|
+ res.data["sow_stock"] || undefinedData,
|
|
|
+ res.data["boar_stock"] || undefinedData,
|
|
|
+ res.data["grice_stock"] || undefinedData,
|
|
|
+ res.data["piglet_stock"] || undefinedData,
|
|
|
+ res.data["fatpig_stock"] || undefinedData,
|
|
|
];
|
|
|
+ // console.log("object", this.inventoryPieData);
|
|
|
this.inventoryItemsData = [
|
|
|
- res.data["sow_stock"].stockQuantity,
|
|
|
- res.data["sow_stock_1"].stockQuantity,
|
|
|
- res.data["sow_stock_2"].stockQuantity,
|
|
|
- res.data["sow_stock_3"].stockQuantity,
|
|
|
- res.data["boar_stock"].stockQuantity,
|
|
|
- res.data["business_stock"].stockQuantity,
|
|
|
+ res.data["sow_stock"] ? res.data["sow_stock"].stockQuantity : 0,
|
|
|
+ res.data["sow_stock_1"] ? res.data["sow_stock_1"].stockQuantity : 0,
|
|
|
+ res.data["sow_stock_2"] ? res.data["sow_stock_2"].stockQuantity : 0,
|
|
|
+ res.data["sow_stock_3"] ? res.data["sow_stock_3"].stockQuantity : 0,
|
|
|
+ res.data["boar_stock"] ? res.data["boar_stock"].stockQuantity : 0,
|
|
|
+ res.data["business_stock"]
|
|
|
+ ? res.data["business_stock"].stockQuantity
|
|
|
+ : 0,
|
|
|
];
|
|
|
// this.productionPercents = [
|
|
|
// res.data[12].rate * 100,
|
|
@@ -575,7 +571,7 @@ export default {
|
|
|
// 经营分析 - 成本分析
|
|
|
initCostData() {
|
|
|
getCostData({}).then((res) => {
|
|
|
- console.log(res);
|
|
|
+ // console.log(res);
|
|
|
if (res.code === 10000) {
|
|
|
this.costHisData = [
|
|
|
res.data["total"],
|
|
@@ -600,7 +596,7 @@ export default {
|
|
|
// 应付排名
|
|
|
initYingFu() {
|
|
|
getYingFu({}).then((res) => {
|
|
|
- console.log("应付", res);
|
|
|
+ // console.log("应付", res);
|
|
|
if (res.code === 10000) {
|
|
|
this.yingfuTableData = res.data;
|
|
|
}
|
|
@@ -612,13 +608,13 @@ export default {
|
|
|
current: this.size,
|
|
|
size: this.pageNum,
|
|
|
}).then((res) => {
|
|
|
- console.log(res);
|
|
|
+ // console.log(res);
|
|
|
});
|
|
|
},
|
|
|
// 生产情况
|
|
|
initProductionCondition() {
|
|
|
getProductionCondition({}).then((res) => {
|
|
|
- console.log(res.data);
|
|
|
+ // console.log(res.data);
|
|
|
if (res.code === 10000) {
|
|
|
this.productionPercents = [
|
|
|
{ ...res.data["grice_rate"], color: "rgb(112,249,250)" },
|
|
@@ -662,7 +658,7 @@ export default {
|
|
|
isWeight: res.data["isWeight"],
|
|
|
isHead: res.data["isHead"],
|
|
|
};
|
|
|
- console.log("重要指标数据----------------", this.importantTitle);
|
|
|
+ // console.log("重要指标数据----------------", this.importantTitle);
|
|
|
});
|
|
|
},
|
|
|
// 重要指标的 type 改变
|