|
@@ -1,7 +1,7 @@
|
|
|
<!--
|
|
|
* @Author: your name
|
|
|
* @Date: 2021-10-21 17:51:22
|
|
|
- * @LastEditTime: 2021-11-25 15:34:11
|
|
|
+ * @LastEditTime: 2021-11-28 17:58:59
|
|
|
* @LastEditors: Please set LastEditors
|
|
|
* @Description: 生产经营页面
|
|
|
* @FilePath: \hyyfScreen\src\views\Production\Production.vue
|
|
@@ -174,8 +174,8 @@
|
|
|
</div>
|
|
|
|
|
|
<div class="production-column-item">
|
|
|
- <pro-board :title="'应收排名'">
|
|
|
- <ying-shou :data="yingshouData"></ying-shou>
|
|
|
+ <pro-board :title="'应付排名'">
|
|
|
+ <ying-shou :data="yingfuData"></ying-shou>
|
|
|
</pro-board>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -285,7 +285,12 @@ import IndicatorItem from "./board/IndicatorItem.vue";
|
|
|
import IndicatorOneChart from "./board/IndicatorOneChart.vue";
|
|
|
|
|
|
// 网络请求
|
|
|
-import { getInventoryAndProduct, getInventoryLines } from "../../utils/chenApi";
|
|
|
+import {
|
|
|
+ getInventoryAndProduct,
|
|
|
+ getInventoryLines,
|
|
|
+ getProductionCondition,
|
|
|
+ getYingFu,
|
|
|
+} from "../../utils/chenApi";
|
|
|
|
|
|
export default {
|
|
|
name: "Production",
|
|
@@ -410,43 +415,7 @@ export default {
|
|
|
quantitys: [46, 45, 100],
|
|
|
sellDates: ["10-20周三", "10-21周四", "10-22周五"],
|
|
|
},
|
|
|
- yingshouData: [
|
|
|
- {
|
|
|
- rate: 1,
|
|
|
- name: "XX屠宰有限公司",
|
|
|
- money: 23515,
|
|
|
- person: "大概",
|
|
|
- phone: "1654564654",
|
|
|
- },
|
|
|
- {
|
|
|
- rate: 2,
|
|
|
- name: "XX屠宰有限公司",
|
|
|
- money: 23515,
|
|
|
- person: "大概",
|
|
|
- phone: "1654564654",
|
|
|
- },
|
|
|
- {
|
|
|
- rate: 3,
|
|
|
- name: "XX屠宰有限公司",
|
|
|
- money: 23515,
|
|
|
- person: "大概",
|
|
|
- phone: "1654564654",
|
|
|
- },
|
|
|
- {
|
|
|
- rate: 4,
|
|
|
- name: "XX屠宰有限公司",
|
|
|
- money: 23515,
|
|
|
- person: "大概",
|
|
|
- phone: "1654564654",
|
|
|
- },
|
|
|
- {
|
|
|
- rate: 5,
|
|
|
- name: "XX屠宰有限公司",
|
|
|
- money: 23515,
|
|
|
- person: "大概",
|
|
|
- phone: "1654564654",
|
|
|
- },
|
|
|
- ],
|
|
|
+ yingfuData: [],
|
|
|
historyData: [
|
|
|
{
|
|
|
id: 1,
|
|
@@ -480,38 +449,7 @@ export default {
|
|
|
},
|
|
|
],
|
|
|
ifWorkInfos: false, // 工作看板点击后出现的工作任务
|
|
|
- importantData: [
|
|
|
- {
|
|
|
- id: 1,
|
|
|
- name: "产房存活率",
|
|
|
- num: "99.4%",
|
|
|
- },
|
|
|
- {
|
|
|
- id: 2,
|
|
|
- name: "保育成活率",
|
|
|
- num: "99.4%",
|
|
|
- },
|
|
|
- {
|
|
|
- id: 3,
|
|
|
- name: "育肥成活率",
|
|
|
- num: "99.4%",
|
|
|
- },
|
|
|
- {
|
|
|
- id: 4,
|
|
|
- name: "七日内断配率",
|
|
|
- num: "99.4%",
|
|
|
- },
|
|
|
- {
|
|
|
- id: 5,
|
|
|
- name: "配种分娩率",
|
|
|
- num: "99.4%",
|
|
|
- },
|
|
|
- {
|
|
|
- id: 6,
|
|
|
- name: "PSY",
|
|
|
- num: "99.4%",
|
|
|
- },
|
|
|
- ],
|
|
|
+ importantData: [],
|
|
|
costPieData: [
|
|
|
{
|
|
|
name: "药品成本",
|
|
@@ -634,6 +572,8 @@ export default {
|
|
|
mounted() {
|
|
|
this.initInventoryAndProduct();
|
|
|
this.initInventoryLines();
|
|
|
+ this.initProductionCondition(); // 重要指标 - 百分率
|
|
|
+ this.initYingFu(); // 应付排名
|
|
|
},
|
|
|
methods: {
|
|
|
getWorkInfo(value) {
|
|
@@ -670,29 +610,6 @@ export default {
|
|
|
res.data["piglet_stock"],
|
|
|
res.data["fatpig_stock"],
|
|
|
];
|
|
|
- // 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,
|
|
|
- // ];
|
|
|
- // this.productionPercents = [
|
|
|
- // res.data[12].rate * 100,
|
|
|
- // res.data[13].rate * 100,
|
|
|
- // res.data[14].rate * 100,
|
|
|
- // res.data[15].rate * 100,
|
|
|
- // res.data[16].rate * 100,
|
|
|
- // ];
|
|
|
- } else {
|
|
|
- // this.inventoryLinesData = {
|
|
|
- // boarStock: [],
|
|
|
- // fatpigStock: [],
|
|
|
- // griceStock: [],
|
|
|
- // month: [],
|
|
|
- // pigletStock: [],
|
|
|
- // sowStock: []
|
|
|
- // }
|
|
|
}
|
|
|
});
|
|
|
},
|
|
@@ -713,6 +630,43 @@ export default {
|
|
|
}
|
|
|
});
|
|
|
},
|
|
|
+ // 重要指标 - 百分率
|
|
|
+ initProductionCondition() {
|
|
|
+ getProductionCondition({}).then((res) => {
|
|
|
+ this.importantData = [];
|
|
|
+ if (res.code === 10000) {
|
|
|
+ const items = [
|
|
|
+ "grice_rate",
|
|
|
+ "piglet_rate",
|
|
|
+ "fatpig_rate",
|
|
|
+ "break_rate",
|
|
|
+ "breed_rate",
|
|
|
+ "psy",
|
|
|
+ ];
|
|
|
+ items.forEach((item) => {
|
|
|
+ let itemNum =
|
|
|
+ (parseFloat(res.data[item].stockQuantity) * 100).toFixed(2) + "%";
|
|
|
+ if (item === "psy") {
|
|
|
+ itemNum = res.data[item].stockQuantity;
|
|
|
+ }
|
|
|
+ this.importantData.push({
|
|
|
+ id: res.data[item].id,
|
|
|
+ name: res.data[item].stockName,
|
|
|
+ num: itemNum,
|
|
|
+ });
|
|
|
+ });
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
+ // 应付排名
|
|
|
+ initYingFu() {
|
|
|
+ getYingFu({}).then((res) => {
|
|
|
+ console.log("应付", res);
|
|
|
+ if (res.code === 10000) {
|
|
|
+ this.yingfuData = res.data;
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
},
|
|
|
};
|
|
|
</script>
|