|
@@ -0,0 +1,756 @@
|
|
|
+<template>
|
|
|
+ <div class="app-container">
|
|
|
+ <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="100px">
|
|
|
+ <el-form-item label="入库单编号" prop="warehouseEntryNumber">
|
|
|
+ <el-input
|
|
|
+ v-model="queryParams.warehouseEntryNumber"
|
|
|
+ placeholder="请输入入库单编号"
|
|
|
+ clearable
|
|
|
+ @keyup.enter.native="handleQuery"
|
|
|
+ />
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="生产订单" prop="productionOrderNumber">
|
|
|
+ <el-input
|
|
|
+ v-model="queryParams.productionOrderNumber"
|
|
|
+ placeholder="请输入生产订单编号"
|
|
|
+ clearable
|
|
|
+ @keyup.enter.native="handleQuery"
|
|
|
+ />
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="日期" prop="dateOfReceipt">
|
|
|
+ <el-date-picker
|
|
|
+ v-model="queryParams.dateOfReceipt"
|
|
|
+ type="date"
|
|
|
+ @keyup.enter.native="handleQuery"
|
|
|
+ format="yyyy 年 MM 月 dd 日"
|
|
|
+ value-format="yyyy-MM-dd"
|
|
|
+ placeholder="请输入日期">
|
|
|
+ </el-date-picker>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="生产任务单号" prop="productionTaskOrderNumber">
|
|
|
+ <el-input
|
|
|
+ v-model="queryParams.productionTaskOrderNumber"
|
|
|
+ placeholder="请输入生产任务单号"
|
|
|
+ clearable
|
|
|
+ @keyup.enter.native="handleQuery"
|
|
|
+ />
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="审核人" prop="examine">
|
|
|
+ <el-input
|
|
|
+ v-model="queryParams.examine"
|
|
|
+ placeholder="请输入审核人"
|
|
|
+ clearable
|
|
|
+ @keyup.enter.native="handleQuery"
|
|
|
+ />
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="制单人" prop="documenter">
|
|
|
+ <el-input
|
|
|
+ v-model="queryParams.documenter"
|
|
|
+ placeholder="请输入制单人"
|
|
|
+ clearable
|
|
|
+ @keyup.enter.native="handleQuery"
|
|
|
+ />
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item>
|
|
|
+ <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery" style="margin-left: 20px">搜索</el-button>
|
|
|
+ <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
|
|
+ </el-form-item>
|
|
|
+ </el-form>
|
|
|
+
|
|
|
+ <el-row :gutter="10" class="mb8" style="margin-bottom: 20px">
|
|
|
+ <el-col :span="1.5">
|
|
|
+ <el-button
|
|
|
+ type="primary"
|
|
|
+ plain
|
|
|
+ icon="el-icon-plus"
|
|
|
+ size="mini"
|
|
|
+ @click="handleAdd"
|
|
|
+ v-hasPermi="['amichi:information:add']"
|
|
|
+ >新增</el-button>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="1.5">
|
|
|
+ <el-button
|
|
|
+ type="success"
|
|
|
+ plain
|
|
|
+ icon="el-icon-edit"
|
|
|
+ size="mini"
|
|
|
+ :disabled="single"
|
|
|
+ @click="handleUpdate"
|
|
|
+ v-hasPermi="['amichi:information:edit']"
|
|
|
+ >修改</el-button>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="1.5">
|
|
|
+ <el-button
|
|
|
+ type="danger"
|
|
|
+ plain
|
|
|
+ icon="el-icon-delete"
|
|
|
+ size="mini"
|
|
|
+ :disabled="multiple"
|
|
|
+ @click="handleDelete"
|
|
|
+ v-hasPermi="['amichi:information:remove']"
|
|
|
+ >删除</el-button>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="1.5">
|
|
|
+ <el-button
|
|
|
+ type="warning"
|
|
|
+ plain
|
|
|
+ icon="el-icon-download"
|
|
|
+ size="mini"
|
|
|
+ @click="handleExport"
|
|
|
+ v-hasPermi="['amichi:information:export']"
|
|
|
+ >导出</el-button>
|
|
|
+ </el-col>
|
|
|
+ <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
|
|
+ </el-row>
|
|
|
+
|
|
|
+ <el-table v-loading="loading" :data="informationList" @selection-change="handleSelectionChange">
|
|
|
+ <el-table-column type="selection" width="55" align="center" />
|
|
|
+ <el-table-column label="主键" align="center" prop="id" />
|
|
|
+ <el-table-column label="入库单编号" align="center" prop="warehouseEntryNumber" />
|
|
|
+ <el-table-column label="生产订单编号" align="center" prop="productionOrderNumber" />
|
|
|
+ <el-table-column label="日期" align="center" prop="dateOfReceipt" />
|
|
|
+ <el-table-column label="生产任务单号" align="center" prop="productionTaskOrderNumber" />
|
|
|
+ <el-table-column label="审核人" align="center" prop="examine" />
|
|
|
+ <el-table-column label="制单人" align="center" prop="documenter" />
|
|
|
+ <el-table-column label="审核状态" align="center" prop="dataApprovalStatus" >
|
|
|
+ <template v-slot="scope">
|
|
|
+ <el-tag :type="getStatusType(scope.row.dataApprovalStatus)" disable-transitions> <dict-tag :options="dict.type.rkdsh" :value="scope.row.dataApprovalStatus"/></el-tag>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="备注" align="center" prop="remark" />
|
|
|
+ <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-dropdown @command="(command)=>{handleCommand(command, scope.row)}">
|
|
|
+ <el-button type="warning">
|
|
|
+ 操作<i class="el-icon-arrow-down el-icon--right"></i>
|
|
|
+ </el-button>
|
|
|
+ <el-dropdown-menu slot="dropdown">
|
|
|
+ <el-dropdown-item icon="el-icon-edit" command="handleUpdate">修改</el-dropdown-item>
|
|
|
+ <el-dropdown-item icon="el-icon-delete" command="handleDelete">删除</el-dropdown-item>
|
|
|
+ <el-dropdown-item icon="el-icon-edit" command="handleCat">查看详情</el-dropdown-item>
|
|
|
+ <el-dropdown-item icon="el-icon-edit" command="initiateApproval">发起审批</el-dropdown-item>
|
|
|
+ </el-dropdown-menu>
|
|
|
+ </el-dropdown>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ </el-table>
|
|
|
+
|
|
|
+ <pagination
|
|
|
+ v-show="total>0"
|
|
|
+ :total="total"
|
|
|
+ :page.sync="queryParams.pageNum"
|
|
|
+ :limit.sync="queryParams.pageSize"
|
|
|
+ @pagination="getList"
|
|
|
+ />
|
|
|
+
|
|
|
+ <!-- 添加或修改入库单信息对话框 -->
|
|
|
+ <el-dialog :title="title" :visible.sync="open" width="1000px" append-to-body>
|
|
|
+ <el-form ref="form" :model="form" :rules="rules" label-width="100px">
|
|
|
+ <el-row type="flex" class="row-bg" justify="space-between">
|
|
|
+ <el-col :span="8">
|
|
|
+ <el-form-item label="入库单编号" prop="warehouseEntryNumber">
|
|
|
+ <el-input v-model="form.warehouseEntryNumber" placeholder="请输入入库单编号" />
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="8">
|
|
|
+ <el-form-item label="生产订单号" prop="productionOrderNumber">
|
|
|
+ <el-input v-model="form.productionOrderNumber" placeholder="请输入生产订单编号" />
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="8">
|
|
|
+ <el-form-item label="日期" prop="dateOfReceipt">
|
|
|
+ <el-date-picker
|
|
|
+ v-model="form.dateOfReceipt"
|
|
|
+ type="date"
|
|
|
+ @keyup.enter.native="handleQuery"
|
|
|
+ format="yyyy 年 MM 月 dd 日"
|
|
|
+ value-format="yyyy-MM-dd"
|
|
|
+ placeholder="请输入入库单日期">
|
|
|
+ </el-date-picker>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+
|
|
|
+
|
|
|
+ <el-row type="flex" class="row-bg" justify="space-between">
|
|
|
+ <el-col :span="8">
|
|
|
+ <el-form-item label="生产任务单号" prop="productionTaskOrderNumber">
|
|
|
+ <el-input v-model="form.productionTaskOrderNumber" placeholder="请输入生产任务单号" />
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="8">
|
|
|
+
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="8">
|
|
|
+
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ <el-row class="">
|
|
|
+ <div class="cesiumTabRoot">
|
|
|
+ <!-- :summary-method="getSummaries"-->
|
|
|
+ <el-table
|
|
|
+ :data="detailData"
|
|
|
+ border
|
|
|
+ show-summary
|
|
|
+ :summary-method="getSummaries"
|
|
|
+ :cell-class-name="tabCellClassName"
|
|
|
+ :row-class-name="tabRowClassName"
|
|
|
+ @cell-click="cellClick"
|
|
|
+ style="width:100%">
|
|
|
+ <el-table-column
|
|
|
+ type="index"
|
|
|
+ label="序号"
|
|
|
+ align="center"
|
|
|
+ width="50">
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ prop="materialCode"
|
|
|
+ align="center"
|
|
|
+ label="物料编码"
|
|
|
+ >
|
|
|
+ <template v-slot="{ row, column }">
|
|
|
+ <el-input
|
|
|
+ v-if="rowIndex === row.index && columnIndex === column.index"
|
|
|
+ v-model="row.materialCode"
|
|
|
+ @blur="hideInput(detailData,row.index,columnIndex,'materialCode')"
|
|
|
+ >
|
|
|
+ </el-input>
|
|
|
+ <!-- 显示 -->
|
|
|
+ <span v-else>{{ row.materialCode }}</span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+
|
|
|
+ <el-table-column
|
|
|
+ prop="productName"
|
|
|
+ label="产品名称"
|
|
|
+ align="center"
|
|
|
+ >
|
|
|
+ <template v-slot="{ row, column }">
|
|
|
+ <el-input
|
|
|
+ v-if="rowIndex === row.index && columnIndex === column.index"
|
|
|
+ v-model="row.productName"
|
|
|
+ @blur="hideInput"></el-input>
|
|
|
+ <!-- 显示 -->
|
|
|
+ <span v-else>{{ row.productName }}</span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+
|
|
|
+ <el-table-column
|
|
|
+ prop="modelNumber"
|
|
|
+ label="型号"
|
|
|
+ align="center"
|
|
|
+ >
|
|
|
+ <template v-slot="{ row, column }">
|
|
|
+ <!-- 编辑 -->
|
|
|
+ <el-input
|
|
|
+ v-if="rowIndex === row.index && columnIndex === column.index"
|
|
|
+ v-model="row.modelNumber"
|
|
|
+ @blur="hideInput"></el-input>
|
|
|
+ <!-- 显示 -->
|
|
|
+ <span v-else>{{ row.modelNumber }}</span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+
|
|
|
+ <el-table-column
|
|
|
+ prop="unit"
|
|
|
+ align="center"
|
|
|
+ :label="'单位'">
|
|
|
+ <template v-slot="{ row, column }">
|
|
|
+ <!-- 编辑 -->
|
|
|
+ <el-input
|
|
|
+ v-if="rowIndex === row.index && columnIndex === column.index"
|
|
|
+ v-model="row.unit"
|
|
|
+ @blur="hideInput"></el-input>
|
|
|
+ <!-- 显示 -->
|
|
|
+ <span v-else>{{ row.unit }}</span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+
|
|
|
+ <el-table-column
|
|
|
+ prop="quantity"
|
|
|
+ label="数量"
|
|
|
+ align="center"
|
|
|
+ >
|
|
|
+ <template v-slot="{ row, column }">
|
|
|
+ <!-- 编辑 -->
|
|
|
+ <el-input
|
|
|
+
|
|
|
+ v-if="rowIndex === row.index && columnIndex === column.index"
|
|
|
+ v-model="row.quantity"
|
|
|
+ @blur="hideInput"></el-input>
|
|
|
+ <!-- 显示 -->
|
|
|
+ <span v-else>{{ row.quantity }}</span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+
|
|
|
+ <el-table-column
|
|
|
+ prop="remark"
|
|
|
+ label="备注"
|
|
|
+ align="center"
|
|
|
+ >
|
|
|
+ <template v-slot="{ row, column }">
|
|
|
+ <!-- 编辑 -->
|
|
|
+ <el-input
|
|
|
+
|
|
|
+ v-if="rowIndex === row.index && columnIndex === column.index"
|
|
|
+ v-model="row.remark"
|
|
|
+ @blur="hideInput"></el-input>
|
|
|
+ <!-- 显示 -->
|
|
|
+ <span v-else>{{ row.remark }}</span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+
|
|
|
+ <el-table-column
|
|
|
+ align="center"
|
|
|
+ fixed="right"
|
|
|
+ label="操作"
|
|
|
+ width="120">
|
|
|
+ <template v-slot="scope">
|
|
|
+ <el-button type="danger" size="small" icon="el-icon-delete" @click.native.prevent="deleteRow(scope.$index, detailData)"></el-button>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ </el-table>
|
|
|
+ </div>
|
|
|
+ </el-row>
|
|
|
+ <el-row type="flex" class="row-bg" justify="space-between" style="margin-top: 20px">
|
|
|
+ <el-col :span="10">
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="10">
|
|
|
+ <el-button type="primary" style="float: right" icon="el-icon-circle-plus" @click="addDetails">新增明细</el-button>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+<!-- <el-row type="flex" class="row-bg" justify="space-between">-->
|
|
|
+<!-- <el-col :span="12">-->
|
|
|
+<!-- <el-form-item label="审核人" prop="examine">-->
|
|
|
+<!-- <el-input v-model="form.examine" placeholder="请输入审核人" />-->
|
|
|
+<!-- </el-form-item>-->
|
|
|
+<!-- </el-col>-->
|
|
|
+<!-- <el-col :span="8">-->
|
|
|
+<!-- <el-form-item label="制单人" prop="documenter">-->
|
|
|
+<!-- <el-input v-model="form.documenter" placeholder="请输入制单人" />-->
|
|
|
+<!-- </el-form-item>-->
|
|
|
+<!-- </el-col>-->
|
|
|
+<!-- </el-row> -->
|
|
|
+ </el-form>
|
|
|
+ <div slot="footer" class="dialog-footer">
|
|
|
+ <el-button type="primary" @click="submitForm">确 定</el-button>
|
|
|
+ <el-button @click="cancel">取 消</el-button>
|
|
|
+ </div>
|
|
|
+ </el-dialog>
|
|
|
+
|
|
|
+ <!-- 查看入库单详情信息 -->
|
|
|
+ <el-dialog :title="title" :visible.sync="catOpen" width="1000px" append-to-body>
|
|
|
+ <el-form ref="form" :model="form" :rules="rules" label-width="126px" class="catForm">
|
|
|
+ <el-row type="flex" class="row-bg" justify="space-between">
|
|
|
+ <el-col :span="8">
|
|
|
+
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="8">
|
|
|
+
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="8">
|
|
|
+ <el-form-item label="入库单编号:" prop="warehouseEntryNumber">
|
|
|
+ {{form.warehouseEntryNumber}}
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ <el-row type="flex" class="row-bg" justify="space-between">
|
|
|
+ <el-col :span="8">
|
|
|
+ <el-form-item label="生产订单号:" prop="productionOrderNumber">
|
|
|
+ {{form.productionOrderNumber}}
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="8">
|
|
|
+ <el-form-item label="日期" prop="dateOfReceipt">
|
|
|
+ {{form.dateOfReceipt}}
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="8">
|
|
|
+ <el-form-item label="生产任务单号:" prop="productionTaskOrderNumber">
|
|
|
+ {{form.productionTaskOrderNumber}}
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ <el-row class="">
|
|
|
+ <div class="cesiumTabRootA">
|
|
|
+ <table style="width: 100%; border-collapse: collapse;">
|
|
|
+ <thead>
|
|
|
+ <tr>
|
|
|
+ <th>序号</th>
|
|
|
+ <th>物料编码</th>
|
|
|
+ <th>产品名称</th>
|
|
|
+ <th>型号</th>
|
|
|
+ <th>单位</th>
|
|
|
+ <th>数量</th>
|
|
|
+ <th>备注</th>
|
|
|
+ </tr>
|
|
|
+ </thead>
|
|
|
+ <tbody>
|
|
|
+ <tr v-for="(item, index) in detailData" :key="index">
|
|
|
+ <td>{{ index + 1 }}</td>
|
|
|
+ <td>{{ item.materialCode }}</td>
|
|
|
+ <td>{{ item.productName }}</td>
|
|
|
+ <td>{{ item.modelNumber }}</td>
|
|
|
+ <td>{{ item.unit }}</td>
|
|
|
+ <td>{{ item.quantity }}</td>
|
|
|
+ <td>{{ item.remark }}</td>
|
|
|
+ </tr>
|
|
|
+ <tr>
|
|
|
+ <td colspan="5" style="text-align: left;padding-left: 40px;font-weight: bolder">合计:</td>
|
|
|
+ <td>{{ totalQuantity }}</td>
|
|
|
+ <td></td>
|
|
|
+ </tr>
|
|
|
+ </tbody>
|
|
|
+ </table>
|
|
|
+ </div>
|
|
|
+ </el-row>
|
|
|
+ <el-row type="flex" class="row-bg" justify="space-between" style="margin-top: 20px">
|
|
|
+ <el-col :span="8">
|
|
|
+ <el-form-item label="审核人:" prop="examine">
|
|
|
+ {{form.examine}}
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="8">
|
|
|
+
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="8">
|
|
|
+ <el-form-item label="制单人:" prop="documenter">
|
|
|
+ {{form.documenter}}
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ </el-form>
|
|
|
+ <div slot="footer" class="dialog-footer">
|
|
|
+ <el-button type="primary" @click="catOpen=false">确 定</el-button>
|
|
|
+ <el-button @click="catOpen=false">取 消</el-button>
|
|
|
+ </div>
|
|
|
+ </el-dialog>
|
|
|
+ </div>
|
|
|
+</template>
|
|
|
+
|
|
|
+<script>
|
|
|
+import { listInformation,addInformationInsert,getInformation, delInformation,updateInformationStatus,addInformation, updateInformation } from "@/api/amichi/warehouseWarrant/warehouseWarrant";
|
|
|
+
|
|
|
+export default {
|
|
|
+ name: "Information",
|
|
|
+ dicts: ["rkdsh"],
|
|
|
+ data() {
|
|
|
+ return {
|
|
|
+ catOpen:false,
|
|
|
+ // 行index
|
|
|
+ rowIndex: null,
|
|
|
+ // 列index
|
|
|
+ columnIndex: null,
|
|
|
+ detailData:[],
|
|
|
+ // 遮罩层
|
|
|
+ loading: true,
|
|
|
+ // 选中数组
|
|
|
+ ids: [],
|
|
|
+ // 非单个禁用
|
|
|
+ single: true,
|
|
|
+ // 非多个禁用
|
|
|
+ multiple: true,
|
|
|
+ // 显示搜索条件
|
|
|
+ showSearch: true,
|
|
|
+ // 总条数
|
|
|
+ total: 0,
|
|
|
+ // 入库单信息表格数据
|
|
|
+ informationList: [],
|
|
|
+ // 弹出层标题
|
|
|
+ title: "",
|
|
|
+ // 是否显示弹出层
|
|
|
+ open: false,
|
|
|
+ // 查询参数
|
|
|
+ queryParams: {
|
|
|
+ pageNum: 1,
|
|
|
+ pageSize: 10,
|
|
|
+ warehouseEntryNumber: null,
|
|
|
+ productionOrderNumber: null,
|
|
|
+ dateOfReceipt: null,
|
|
|
+ productionTaskOrderNumber: null,
|
|
|
+ examine: null,
|
|
|
+ documenter: null,
|
|
|
+ createById: null,
|
|
|
+ updateById: null,
|
|
|
+ dataApprovalStatus: null,
|
|
|
+ processKey: null,
|
|
|
+ taskProcessKey: null,
|
|
|
+ taskNodeKey: null
|
|
|
+ },
|
|
|
+ // 表单参数
|
|
|
+ form: {},
|
|
|
+ // 表单校验
|
|
|
+ rules: {
|
|
|
+ }
|
|
|
+ };
|
|
|
+ },
|
|
|
+ computed: {
|
|
|
+ totalQuantity() {
|
|
|
+ return this.detailData.reduce((total, item) => total + parseInt(item.quantity), 0);
|
|
|
+ },
|
|
|
+ },
|
|
|
+ created() {
|
|
|
+ this.getList();
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ //展示不同的标签
|
|
|
+ getStatusType(status) {
|
|
|
+ switch (status) {
|
|
|
+ case '3':
|
|
|
+ return 'warning';
|
|
|
+ case '0':
|
|
|
+ return 'danger';
|
|
|
+ case '1':
|
|
|
+ return 'success';
|
|
|
+ case '2':
|
|
|
+ return 'info';
|
|
|
+ default:
|
|
|
+ return '';
|
|
|
+ }
|
|
|
+ },
|
|
|
+ //下拉菜单点击事件
|
|
|
+ handleCommand(command, row) {
|
|
|
+ switch (command) {
|
|
|
+ case "handleUpdate":
|
|
|
+ this.handleUpdate(row)
|
|
|
+ break;
|
|
|
+ case "handleDelete":
|
|
|
+ this.handleDelete(row)
|
|
|
+ break;
|
|
|
+ case "handleCat":
|
|
|
+ this.handleCat(row)
|
|
|
+ break;
|
|
|
+ case "initiateApproval":
|
|
|
+ this.handleCatinitiateApproval(row)
|
|
|
+ break;
|
|
|
+
|
|
|
+ default:
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ },
|
|
|
+ handleCatinitiateApproval(row){
|
|
|
+ let data={"dataApprovalStatus":0,"id":row.id}//1等于待审批
|
|
|
+ updateInformationStatus(data).then(response => {
|
|
|
+ this.$modal.msgSuccess("审批发起成功");
|
|
|
+ this.open = false;
|
|
|
+ this.getList();
|
|
|
+ });
|
|
|
+ },
|
|
|
+ handleCat(row){
|
|
|
+ this.reset();
|
|
|
+ const id = row.id || this.ids
|
|
|
+ getInformation(id).then(response => {
|
|
|
+ this.detailData= response.data.storeEntryDetails;
|
|
|
+ this.form = response.data;
|
|
|
+ this.catOpen = true;
|
|
|
+ this.title = "入库单详情";
|
|
|
+ });
|
|
|
+ },
|
|
|
+ // 表格input失去焦点
|
|
|
+ hideInput(a,b,c,d) {
|
|
|
+ if(a=="sl"){
|
|
|
+ this.updateTotalQuantity();
|
|
|
+ }
|
|
|
+ // console.log(a,b,c,d)
|
|
|
+ // console.log(a[b-1])
|
|
|
+ // console.log("33333")
|
|
|
+ // if(a[b-1]){
|
|
|
+ // console.log("a")
|
|
|
+ // if(a[b-1][`${d}`]!=undefined&&a[b-1][`${d}`]!=""){
|
|
|
+ // a[b-1].isEmpty[`${d}`]=false;
|
|
|
+ // console.log("h")
|
|
|
+ // }else {
|
|
|
+ // console.log("m")
|
|
|
+ // a[b-1].isEmpty[`${d}`]=true;
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ // console.log(this.detailData)
|
|
|
+ this.rowIndex = null;
|
|
|
+ this.columnIndex = null;
|
|
|
+ },
|
|
|
+ //新增明细
|
|
|
+ addDetails(){
|
|
|
+ this.detailData.push(
|
|
|
+ {"materialCode":"","productName":"","modelNumber":"","unit":"","quantity":"","remark":""});
|
|
|
+ },
|
|
|
+ deleteRow(index, rows) {
|
|
|
+ rows.splice(index, 1);
|
|
|
+ },
|
|
|
+ // 对列进行合算
|
|
|
+ getSummaries(param) {
|
|
|
+ const { columns, data } = param;
|
|
|
+ const sums = [];
|
|
|
+ columns.forEach((column, index) => {
|
|
|
+ if (index === 0) {
|
|
|
+ sums[index] = '合计';
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ const values = data.map(item => Number(item[column.property]));
|
|
|
+ // 只对amount这一列进行总计核算。
|
|
|
+ if (column.property === 'quantity') {
|
|
|
+ if (!values.every(value => isNaN(value))) {
|
|
|
+ sums[index] = values.reduce((prev, curr) => {
|
|
|
+ const value = Number(curr);
|
|
|
+ if (!isNaN(value)) {
|
|
|
+ return prev + curr;
|
|
|
+ }else {
|
|
|
+ return prev;
|
|
|
+ }
|
|
|
+ }, 0);
|
|
|
+ // sums[index] += ' 元';
|
|
|
+ } else {
|
|
|
+ // sums[index] = '---'
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
+ return sums;
|
|
|
+ },
|
|
|
+ /** 查询入库单信息列表 */
|
|
|
+ getList() {
|
|
|
+ this.loading = true;
|
|
|
+ listInformation(this.queryParams).then(response => {
|
|
|
+ this.informationList = response.rows;
|
|
|
+ this.total = response.total;
|
|
|
+ this.loading = false;
|
|
|
+ });
|
|
|
+ },
|
|
|
+ // 取消按钮
|
|
|
+ cancel() {
|
|
|
+ this.open = false;
|
|
|
+ this.reset();
|
|
|
+ },
|
|
|
+ // 表单重置
|
|
|
+ reset() {
|
|
|
+ this.form = {
|
|
|
+ id: null,
|
|
|
+ warehouseEntryNumber: null,
|
|
|
+ productionOrderNumber: null,
|
|
|
+ dateOfReceipt: null,
|
|
|
+ productionTaskOrderNumber: null,
|
|
|
+ examine: null,
|
|
|
+ documenter: null,
|
|
|
+ remark: null,
|
|
|
+ createById: null,
|
|
|
+ createBy: null,
|
|
|
+ createTime: null,
|
|
|
+ updateById: null,
|
|
|
+ updateBy: null,
|
|
|
+ updateTime: null,
|
|
|
+ delFlag: null,
|
|
|
+ dataApprovalStatus: null,
|
|
|
+ processKey: null,
|
|
|
+ taskProcessKey: null,
|
|
|
+ taskNodeKey: null
|
|
|
+ };
|
|
|
+ this.resetForm("form");
|
|
|
+ },
|
|
|
+ /** 搜索按钮操作 */
|
|
|
+ handleQuery() {
|
|
|
+ this.queryParams.pageNum = 1;
|
|
|
+ this.getList();
|
|
|
+ },
|
|
|
+ // 点击表格单元格编辑
|
|
|
+ cellClick(row, column) {
|
|
|
+ this.rowIndex = row.index;
|
|
|
+ this.columnIndex = column.index;
|
|
|
+ },
|
|
|
+ // 给表格单元格数据添加列下标
|
|
|
+ tabCellClassName({ column, columnIndex }) {
|
|
|
+ column.index = columnIndex + 1;
|
|
|
+ },
|
|
|
+ // 表格行class-name
|
|
|
+ tabRowClassName({ row, rowIndex }) {
|
|
|
+ row.index = rowIndex + 1;
|
|
|
+ },
|
|
|
+ /** 重置按钮操作 */
|
|
|
+ resetQuery() {
|
|
|
+ this.resetForm("queryForm");
|
|
|
+ this.handleQuery();
|
|
|
+ },
|
|
|
+ // 多选框选中数据
|
|
|
+ handleSelectionChange(selection) {
|
|
|
+ this.ids = selection.map(item => item.id)
|
|
|
+ this.single = selection.length!==1
|
|
|
+ this.multiple = !selection.length
|
|
|
+ },
|
|
|
+ /** 新增按钮操作 */
|
|
|
+ handleAdd() {
|
|
|
+ this.reset();
|
|
|
+ this.detailData= [];
|
|
|
+ this.open = true;
|
|
|
+ this.title = "添加入库单信息";
|
|
|
+ },
|
|
|
+ /** 修改按钮操作 */
|
|
|
+ handleUpdate(row) {
|
|
|
+ this.reset();
|
|
|
+ const id = row.id || this.ids
|
|
|
+ getInformation(id).then(response => {
|
|
|
+ this.detailData= response.data.storeEntryDetails;
|
|
|
+ this.form = response.data;
|
|
|
+ this.open = true;
|
|
|
+ this.title = "修改入库单信息";
|
|
|
+ });
|
|
|
+ },
|
|
|
+ /** 提交按钮 */
|
|
|
+ submitForm() {
|
|
|
+ this.$refs["form"].validate(valid => {
|
|
|
+ if (valid) {
|
|
|
+ this.form.storeEntryDetails = this.detailData;//详情信息
|
|
|
+ if (this.form.id != null) {
|
|
|
+ updateInformation(this.form).then(response => {
|
|
|
+ this.$modal.msgSuccess("修改成功");
|
|
|
+ this.open = false;
|
|
|
+ this.getList();
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ addInformationInsert(this.form).then(response => {
|
|
|
+ this.$modal.msgSuccess("新增成功");
|
|
|
+ this.open = false;
|
|
|
+ this.getList();
|
|
|
+ });
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
+ /** 删除按钮操作 */
|
|
|
+ handleDelete(row) {
|
|
|
+ const ids = row.id || this.ids;
|
|
|
+ this.$modal.confirm('是否确认删除入库单信息编号为"' + ids + '"的数据项?').then(function() {
|
|
|
+ return delInformation(ids);
|
|
|
+ }).then(() => {
|
|
|
+ this.getList();
|
|
|
+ this.$modal.msgSuccess("删除成功");
|
|
|
+ }).catch(() => {});
|
|
|
+ },
|
|
|
+ /** 导出按钮操作 */
|
|
|
+ handleExport() {
|
|
|
+ this.download('amichi/information/export', {
|
|
|
+ ...this.queryParams
|
|
|
+ }, `information_${new Date().getTime()}.xlsx`)
|
|
|
+ }
|
|
|
+ }
|
|
|
+};
|
|
|
+</script>
|
|
|
+<style scoped>
|
|
|
+ .cesiumTabRoot input{
|
|
|
+ width: 100%;
|
|
|
+ height: 100%;
|
|
|
+ }
|
|
|
+
|
|
|
+ .cesiumTabRootA table tr th{
|
|
|
+ border: 1px solid black;
|
|
|
+ border-collapse: collapse; /* 移除单元格之间的间隔 */
|
|
|
+ text-align: center;
|
|
|
+ }
|
|
|
+
|
|
|
+ .cesiumTabRootA table tr{
|
|
|
+ height: 40px;
|
|
|
+ line-height: 40px;
|
|
|
+ }
|
|
|
+ .cesiumTabRootA table tr td{
|
|
|
+ border: 1px solid black;
|
|
|
+ border-collapse: collapse; /* 移除单元格之间的间隔 */
|
|
|
+ text-align: center;
|
|
|
+ }
|
|
|
+ .catForm ::v-deep .el-form-item__label{font-size: 18px;}
|
|
|
+</style>
|