|
@@ -0,0 +1,763 @@
|
|
|
+<template>
|
|
|
+ <div class="app-container">
|
|
|
+ <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="90px">
|
|
|
+ <el-form-item label="订单号" prop="orderNumber">
|
|
|
+ <el-input
|
|
|
+ v-model="queryParams.orderNumber"
|
|
|
+ placeholder="请输入订单号"
|
|
|
+ clearable
|
|
|
+ @keyup.enter.native="handleQuery"
|
|
|
+ />
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="日期" prop="createTimeString">
|
|
|
+ <el-date-picker
|
|
|
+ v-model="queryParams.createTimeString"
|
|
|
+ value-format="yyyy-MM-dd"
|
|
|
+ type="daterange"
|
|
|
+ range-separator="至"
|
|
|
+ start-placeholder="开始日期"
|
|
|
+ end-placeholder="结束日期">
|
|
|
+ </el-date-picker>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item>
|
|
|
+ <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</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">
|
|
|
+ <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
|
|
+ </el-row>
|
|
|
+
|
|
|
+ <el-table v-loading="loading" :data="sheetList" @selection-change="handleSelectionChange" :row-style="tableRowStyle" style="margin-top: 20px">
|
|
|
+ <el-table-column label="订单号" align="center" prop="orderNumber" />
|
|
|
+ <el-table-column label="订单数" align="center" prop="totalQuantity" />
|
|
|
+ <el-table-column label="完成数量" align="center" prop="he" :formatter="formatHe" />
|
|
|
+ <el-table-column label="订单创建时间" align="center" prop="creationtimeString" />
|
|
|
+ </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="1100px" append-to-body>
|
|
|
+ <el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
|
|
+ <el-row type="flex" class="row-bg" justify="space-between">
|
|
|
+ <el-col :span="8">
|
|
|
+ <el-form-item label="订单号" prop="orderNumber">
|
|
|
+ <el-input v-model="form.orderNumber" placeholder="请输入订单号" />
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="8">
|
|
|
+ <el-form-item label="单据编号" prop="documentNumber">
|
|
|
+ <el-input v-model="form.documentNumber" placeholder="请输入单据编号" />
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="8">
|
|
|
+ <el-form-item label="合同号" prop="contractNumber">
|
|
|
+ <el-input v-model="form.contractNumber" placeholder="请输入合同号" />
|
|
|
+ </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="customerName">
|
|
|
+ <el-select
|
|
|
+ v-model="form.customerName"
|
|
|
+ size="small"
|
|
|
+ style="width: 273.32px"
|
|
|
+ clearable
|
|
|
+ placeholder="请选择客户"
|
|
|
+ filterable
|
|
|
+ @change="handleCustomerChange"
|
|
|
+ >
|
|
|
+ <el-option
|
|
|
+ v-for="(item,index) in customerCollection"
|
|
|
+ :key="index"
|
|
|
+ :label="item.customerName"
|
|
|
+ :value="{value:item.id,label:item.customerName}"
|
|
|
+ ></el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="8">
|
|
|
+ <el-form-item label="客户电话" prop="customerPhone">
|
|
|
+ <el-input v-model="form.customerPhone" placeholder="请输入客户电话" />
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="8">
|
|
|
+ <el-form-item label="客户传真" prop="customerFax">
|
|
|
+ <el-input v-model="form.customerFax" placeholder="请输入客户传真" />
|
|
|
+ </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="customerAddress">
|
|
|
+ <el-input v-model="form.customerAddress" placeholder="请输入客户地址" />
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="8">
|
|
|
+ <el-form-item label="联系人" prop="contactPerson">
|
|
|
+ <el-input v-model="form.contactPerson" placeholder="请输入联系人" />
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="8">
|
|
|
+ <el-form-item label="联系电话" prop="contactNumber">
|
|
|
+ <el-input v-model="form.contactNumber" placeholder="请输入联系电话" />
|
|
|
+ </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="deliveryAddress">
|
|
|
+ <el-input v-model="form.deliveryAddress" placeholder="请输入收货地址" />
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="8">
|
|
|
+ <el-form-item label="填单日期" prop="createTime">
|
|
|
+ <el-date-picker
|
|
|
+ v-model="form.createTime"
|
|
|
+ type="date"
|
|
|
+ format="yyyy 年 MM 月 dd 日"
|
|
|
+ style="width: 273.32px"
|
|
|
+ value-format="yyyy-MM-dd HH:mm:ss"
|
|
|
+ placeholder="请选择填单日期">
|
|
|
+ </el-date-picker>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="8">
|
|
|
+
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ <el-row class="">
|
|
|
+ <div class="cesiumTabRoot">
|
|
|
+ <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="productName"
|
|
|
+ align="center"
|
|
|
+ label="产品名称"
|
|
|
+ >
|
|
|
+ <template v-slot="{ row, column }">
|
|
|
+ <el-input
|
|
|
+ v-if="rowIndex === row.index && columnIndex === column.index"
|
|
|
+ v-model="row.productName"
|
|
|
+ @blur="hideInput(detailData,row.index,columnIndex,'productName')"
|
|
|
+ >
|
|
|
+ </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"
|
|
|
+ label="单位"
|
|
|
+ align="center"
|
|
|
+ >
|
|
|
+ <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-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="1200px" append-to-body>
|
|
|
+ <el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
|
|
+ <el-row type="flex" class="row-bg" justify="space-between">
|
|
|
+ <el-col :span="8">
|
|
|
+ <el-form-item label="订单号:" prop="orderNumber">
|
|
|
+ {{form.orderNumber}}
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="8">
|
|
|
+ <el-form-item label="单据编号:" prop="documentNumber">
|
|
|
+ {{form.documentNumber}}
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="8">
|
|
|
+ <el-form-item label="合同号:" prop="contractNumber">
|
|
|
+ {{form.contractNumber}}
|
|
|
+ </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="customerName">
|
|
|
+ {{form.customerName}}
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="8">
|
|
|
+ <el-form-item label="客户电话:" prop="customerPhone">
|
|
|
+ {{form.customerPhone}}
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="8">
|
|
|
+ <el-form-item label="客户传真:" prop="customerFax">
|
|
|
+ {{form.customerFax}}
|
|
|
+ </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="customerAddress">
|
|
|
+ {{form.customerAddress}}
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="8">
|
|
|
+ <el-form-item label="联系人:" prop="contactPerson">
|
|
|
+ {{form.contactPerson}}
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="8">
|
|
|
+ <el-form-item label="联系电话:" prop="contactNumber">
|
|
|
+ {{form.contactNumber}}
|
|
|
+ </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="deliveryAddress">
|
|
|
+ {{form.deliveryAddress}}
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="8">
|
|
|
+ <el-form-item label="填单日期:" prop="createTime">
|
|
|
+ {{form.createTime}}
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="8">
|
|
|
+ <el-form-item label="制单人:" prop="deliveryAddress">
|
|
|
+ {{form.documenter}}
|
|
|
+ </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>
|
|
|
+ </tr>
|
|
|
+ </thead>
|
|
|
+ <tbody>
|
|
|
+ <tr v-for="(item, index) in detailData" :key="index">
|
|
|
+ <td>{{ index + 1 }}</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="4" 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="createTime">
|
|
|
+ {{form.auditor}}
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="8">
|
|
|
+ <el-form-item label="签收人" prop="createTime">
|
|
|
+ {{form.signer}}
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="8">
|
|
|
+ <el-form-item label="签收时间" prop="createTime">
|
|
|
+ {{form.dateOfReceipt}}
|
|
|
+ </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 {
|
|
|
+ listSheet,
|
|
|
+ getSheet,
|
|
|
+ delSheet,
|
|
|
+ addSheet,
|
|
|
+ updateSheet,
|
|
|
+ insertSheet,
|
|
|
+ updateSheetVo, changeStatus
|
|
|
+} from "@/api/amichi/outSheet/sheet";
|
|
|
+import {listInformationList,getInformation} from "@/api/amichi/customerinformation/information";
|
|
|
+import {ringScanInformationFirstListHe} from "@/api/amichi/ringScanInformation/index";
|
|
|
+
|
|
|
+export default {
|
|
|
+ name: "Sheet",
|
|
|
+ dicts: ["rkdsh"],
|
|
|
+ data() {
|
|
|
+ return {
|
|
|
+ catOpen: false,
|
|
|
+ // 行index
|
|
|
+ rowIndex: null,
|
|
|
+ // 列index
|
|
|
+ columnIndex: null,
|
|
|
+ detailData:[],
|
|
|
+ // 遮罩层
|
|
|
+ loading: true,
|
|
|
+ // 选中数组
|
|
|
+ ids: [],
|
|
|
+ // 非单个禁用
|
|
|
+ single: true,
|
|
|
+ // 非多个禁用
|
|
|
+ multiple: true,
|
|
|
+ // 显示搜索条件
|
|
|
+ showSearch: true,
|
|
|
+ // 总条数
|
|
|
+ total: 0,
|
|
|
+ // 产品出库单表格数据
|
|
|
+ sheetList: [
|
|
|
+ ],
|
|
|
+ // 弹出层标题
|
|
|
+ title: "",
|
|
|
+ // 是否显示弹出层
|
|
|
+ open: false,
|
|
|
+ // 查询参数
|
|
|
+ queryParams: {
|
|
|
+ pageNum: 1,
|
|
|
+ pageSize: 10,
|
|
|
+ orderNumber: null,
|
|
|
+ createTimeString:null
|
|
|
+ },
|
|
|
+ customerCollection:[],
|
|
|
+ // 表单参数
|
|
|
+ form: {},
|
|
|
+ // 表单校验
|
|
|
+ rules: {
|
|
|
+ }
|
|
|
+ };
|
|
|
+ },
|
|
|
+ computed: {
|
|
|
+ totalQuantity() {
|
|
|
+ return this.detailData.reduce((total, item) => total + parseInt(item.quantity), 0);
|
|
|
+ },
|
|
|
+ },
|
|
|
+ created() {
|
|
|
+ this.getList();
|
|
|
+ //查询所有用户信息
|
|
|
+ this.listInformationList();
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ formatHe(row, column, cellValue) {
|
|
|
+ return parseInt(cellValue, 10) || 0; // 将 'he' 字段解析为整数,如果解析失败则默认为 0
|
|
|
+ },
|
|
|
+ // ... 其他方法
|
|
|
+ tableRowStyle({ row, rowIndex }) {
|
|
|
+ if (row.totalQuantity === row.he) {
|
|
|
+ return { 'background-color': 'green', color: 'white' };
|
|
|
+ }
|
|
|
+ return {};
|
|
|
+ },
|
|
|
+ //展示不同的标签
|
|
|
+ getStatusType(status) {
|
|
|
+ switch (status) {
|
|
|
+ case '3':
|
|
|
+ return 'warning';
|
|
|
+ case '0':
|
|
|
+ return 'danger';
|
|
|
+ case '1':
|
|
|
+ return 'success';
|
|
|
+ case '2':
|
|
|
+ return 'info';
|
|
|
+ default:
|
|
|
+ return '';
|
|
|
+ }
|
|
|
+ },
|
|
|
+ //下拉菜单点击事件 productDeliverySheetDetailsList
|
|
|
+ handleCommand(command, row) {
|
|
|
+ switch (command) {
|
|
|
+ case "handleUpdate":
|
|
|
+ this.handleUpdate(row)
|
|
|
+ break;
|
|
|
+ case "handleDelete":
|
|
|
+ this.handleDelete(row)
|
|
|
+ break;
|
|
|
+ case "initiateApproval":
|
|
|
+ this.initiateApproval(row)
|
|
|
+ break;
|
|
|
+ case "catInfo":
|
|
|
+ this.catInfo(row)
|
|
|
+ default:
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ },
|
|
|
+ catInfo(row){
|
|
|
+ this.reset();
|
|
|
+ const id = row.id || this.ids
|
|
|
+ getSheet(id).then(response => {
|
|
|
+ this.detailData = response.data.productDeliverySheetDetailsList;
|
|
|
+ this.form = response.data;
|
|
|
+ this.catOpen= true;
|
|
|
+ this.title = "产品出库单详情";
|
|
|
+ });
|
|
|
+ },
|
|
|
+ initiateApproval(row){
|
|
|
+ //改状态
|
|
|
+ this.form.dataApprovalStatus = 0;
|
|
|
+ this.form.id = row.id;
|
|
|
+ changeStatus(this.form).then(response => {
|
|
|
+ if(response.code==200){
|
|
|
+ this.$modal.msgSuccess("审批发起成功");
|
|
|
+ this.getList();
|
|
|
+ }
|
|
|
+ }).catch(err => {});
|
|
|
+ },
|
|
|
+ //处理下拉框选择其他框赋值
|
|
|
+ handleCustomerChange(row){
|
|
|
+ console.log(row);
|
|
|
+ this.form.customerName = row.label;//表单赋值对应的公司名称
|
|
|
+ getInformation(row.value).then(response => {
|
|
|
+ console.log(response.data);
|
|
|
+ //电话
|
|
|
+ this.form.customerPhone = response.data.customerPhone;
|
|
|
+ //传真
|
|
|
+ this.form.customerFax = response.data.customerFax;
|
|
|
+ //地址
|
|
|
+ this.form.customerAddress = response.data.customerAddress;
|
|
|
+ //联系人
|
|
|
+ this.form.contactPerson = response.data.contactPerson;
|
|
|
+ //收货地址
|
|
|
+ this.form.deliveryAddress = response.data.deliveryAddress;
|
|
|
+ //联系电话
|
|
|
+ this.form.contactNumber = response.data.contactNumber;
|
|
|
+ }).catch(err => {});
|
|
|
+ },
|
|
|
+ //查询用户信息
|
|
|
+ listInformationList(){
|
|
|
+ listInformationList().then(response => {
|
|
|
+ this.customerCollection = response.data;
|
|
|
+ }).catch(err => {});
|
|
|
+ },
|
|
|
+ deleteRow(index, rows) {
|
|
|
+ rows.splice(index, 1);
|
|
|
+ },
|
|
|
+ //新增明细
|
|
|
+ addDetails(){
|
|
|
+ this.detailData.push(
|
|
|
+ {"productName":"","modelNumber":"","unit":"","quantity":"","remark":""});
|
|
|
+ },
|
|
|
+ // 表格input失去焦点
|
|
|
+ hideInput(a,b,c,d) {
|
|
|
+ if(a=="sl"){
|
|
|
+ this.updateTotalQuantity();
|
|
|
+ }
|
|
|
+ this.rowIndex = null;
|
|
|
+ this.columnIndex = null;
|
|
|
+ },
|
|
|
+ // 给表格单元格数据添加列下标
|
|
|
+ tabCellClassName({ column, columnIndex }) {
|
|
|
+ column.index = columnIndex + 1;
|
|
|
+ },
|
|
|
+ // 表格行class-name
|
|
|
+ tabRowClassName({ row, rowIndex }) {
|
|
|
+ row.index = rowIndex + 1;
|
|
|
+ },
|
|
|
+ // 点击表格单元格编辑
|
|
|
+ cellClick(row, column) {
|
|
|
+ this.rowIndex = row.index;
|
|
|
+ this.columnIndex = column.index;
|
|
|
+ },
|
|
|
+ // 对列进行合算
|
|
|
+ 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;
|
|
|
+ ringScanInformationFirstListHe(this.queryParams).then(response => {
|
|
|
+ this.sheetList = response.rows;
|
|
|
+ // let a = {"orderNumber":"MC0000001","totalQuantity":"10","he":"10"}
|
|
|
+ // this.sheetList.unshift(a);
|
|
|
+ this.total = response.total;
|
|
|
+ this.loading = false;
|
|
|
+ });
|
|
|
+ },
|
|
|
+ // 取消按钮
|
|
|
+ cancel() {
|
|
|
+ this.open = false;
|
|
|
+ this.reset();
|
|
|
+ },
|
|
|
+ // 表单重置
|
|
|
+ reset() {
|
|
|
+ this.form = {
|
|
|
+ id: null,
|
|
|
+ customerName: null,
|
|
|
+ customerPhone: null,
|
|
|
+ customerFax: null,
|
|
|
+ customerAddress: null,
|
|
|
+ contactPerson: null,
|
|
|
+ deliveryAddress: null,
|
|
|
+ contactNumber: 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,
|
|
|
+ productDeliverySheetDetailsList:[]
|
|
|
+ };
|
|
|
+ this.detailData = []
|
|
|
+ this.resetForm("form");
|
|
|
+ },
|
|
|
+ /** 搜索按钮操作 */
|
|
|
+ handleQuery() {
|
|
|
+ this.queryParams.pageNum = 1;
|
|
|
+ this.getList();
|
|
|
+ },
|
|
|
+ /** 重置按钮操作 */
|
|
|
+ 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.open = true;
|
|
|
+ this.title = "添加产品出库单";
|
|
|
+ },
|
|
|
+ /** 修改按钮操作 */
|
|
|
+ handleUpdate(row) {
|
|
|
+ this.reset();
|
|
|
+ const id = row.id || this.ids
|
|
|
+ getSheet(id).then(response => {
|
|
|
+ this.detailData = response.data.productDeliverySheetDetailsList;
|
|
|
+ this.form = response.data;
|
|
|
+ this.open = true;
|
|
|
+ this.title = "修改产品出库单";
|
|
|
+ });
|
|
|
+ },
|
|
|
+ /** 提交按钮 */
|
|
|
+ submitForm() {
|
|
|
+ this.$refs["form"].validate(valid => {
|
|
|
+ if (valid) {
|
|
|
+ this.form.productDeliverySheetDetailsList = this.detailData;
|
|
|
+ if (this.form.id != null) {
|
|
|
+ updateSheetVo(this.form).then(response => {
|
|
|
+ this.$modal.msgSuccess("修改成功");
|
|
|
+ this.open = false;
|
|
|
+ this.getList();
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ insertSheet(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 delSheet(ids);
|
|
|
+ }).then(() => {
|
|
|
+ this.getList();
|
|
|
+ this.$modal.msgSuccess("删除成功");
|
|
|
+ }).catch(() => {});
|
|
|
+ },
|
|
|
+ /** 导出按钮操作 */
|
|
|
+ handleExport() {
|
|
|
+ this.download('amichi/sheet/export', {
|
|
|
+ ...this.queryParams
|
|
|
+ }, `sheet_${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;}
|
|
|
+
|
|
|
+.el-table__body tr.hover-row.current-row>td,.el-table__body tr.hover-row.el-table__row--striped.current-row>td,.el-table__body tr.hover-row.el-table__row--striped>td,.el-table__body tr.hover-row>td{
|
|
|
+ background-color:red;
|
|
|
+ color: red;
|
|
|
+}
|
|
|
+</style>
|