From eec73ea94ae416977451b09c6e2dc7c83624414b Mon Sep 17 00:00:00 2001
From: guoshilong <123456>
Date: Tue, 02 Aug 2022 10:09:40 +0800
Subject: [PATCH] 加工产品库存显示更新,删除加工记录表中数据,农产品和加工产品数据回滚
---
src/views/farmplant/process.vue | 20 +++++++++++++-------
1 files changed, 13 insertions(+), 7 deletions(-)
diff --git a/src/views/farmplant/process.vue b/src/views/farmplant/process.vue
index de6fc42..57d439d 100644
--- a/src/views/farmplant/process.vue
+++ b/src/views/farmplant/process.vue
@@ -28,7 +28,11 @@
<div class="cai">{{ item.processName }}</div>
<div class="area">
库存量:
- <span>{{ item.processNum }}</span>公斤
+ <span>{{ item.productInventoryNum }}</span>公斤
+ </div>
+ <div class="area">
+ 原材料:
+ <span>{{ item.strainName }}</span>
</div>
<div class="btn">
<el-button style="width: 65px;" plain size="small" @click="openWindow(0,item)">
@@ -193,10 +197,12 @@
</template>
<script>
-import {
- getList,
-} from "@/api/process/process"
+//获取加工产品库存数据
+import{
+ getPage,
+} from "@/api/processinv/processinv"
+//向销售表和损耗表中添加数据
import {
insert,insertKC
} from "@/api/sale/sale"
@@ -735,7 +741,7 @@
if (index == 0) { //销售
this.form.name = this.userInfo.nick_name
this.form.createUser = this.userInfo.user_id
- this.form.weight = data.processNum
+ this.form.weight = data.productInventoryNum
this.form.proid = data.id
this.form.landId = data.landId
this.form.strainId = data.strainId
@@ -746,7 +752,7 @@
} else if (index == 1) { //库存损耗
this.formKC.name = this.userInfo.nick_name
this.formKC.createUser = this.userInfo.user_id
- this.formKC.weight = data.processNum
+ this.formKC.weight = data.productInventoryNum
this.formKC.proid = data.id
this.formKC.landId = data.landId
this.formKC.strainId = data.strainId
@@ -796,7 +802,7 @@
onLoad (page, params = {}) {
params['tenantId'] = this.userInfo.tenant_id
params['deptId'] = this.userInfo.dept_id
- getList(
+ getPage(
page.currentPage,
page.pageSize,
Object.assign(params, this.query)
--
Gitblit v1.9.3