智慧农业后台管理页面
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)