<template>
|
<section>
|
<!--工具条-->
|
<SearchBar
|
:buttonList="buttonList"
|
@callFunction="callFunction"
|
></SearchBar>
|
|
<!--列表-->
|
<el-table
|
:data="WMSaleInfo"
|
highlight-current-row
|
@current-change="selectCurrentRow"
|
v-loading="listLoading"
|
@selection-change="selsChange"
|
@select="selsChangeOne"
|
style="width: 100%"
|
ref="multipleTable"
|
>
|
<el-table-column type="selection" width="50"></el-table-column>
|
<el-table-column type="index" width="50"></el-table-column>
|
<el-table-column
|
prop="SaleCode"
|
label="领料编号"
|
width="120"
|
sortable
|
></el-table-column>
|
<el-table-column
|
prop="ProductName"
|
label="商品名称"
|
width="250"
|
sortable
|
></el-table-column>
|
<el-table-column
|
prop="ProductCode"
|
label="商品编号"
|
width="150"
|
sortable
|
></el-table-column>
|
<el-table-column
|
prop="SaleStatus"
|
label="审核状态"
|
width="100"
|
sortable
|
></el-table-column>
|
<el-table-column
|
prop="WareHouseName"
|
label="所属仓库"
|
width="110"
|
sortable
|
></el-table-column>
|
<el-table-column
|
prop="DepartmentName"
|
label="部门名称"
|
width="110"
|
sortable
|
></el-table-column>
|
<el-table-column
|
prop="EmployeeName"
|
label="领料人"
|
width="110"
|
sortable
|
></el-table-column>
|
<el-table-column
|
prop="CheckAdminName"
|
label="审核人"
|
width="110"
|
sortable
|
></el-table-column>
|
<el-table-column
|
prop="PayTypeName"
|
label="领料类型"
|
width="100"
|
sortable
|
></el-table-column>
|
<el-table-column
|
prop="CreateTime"
|
label="创建时间"
|
:formatter="formatDateTime"
|
width="150"
|
sortable
|
></el-table-column>
|
<el-table-column label="操作">
|
<template scope="scope">
|
<el-button
|
size="small"
|
class="el-icon-reading jbtn"
|
@click="handleDetail(scope.$index, scope.row)"
|
>详情</el-button
|
>
|
<el-button
|
v-if="scope.row.Status == 40 && scope.row.MayOut"
|
size="small"
|
class="el-icon-reading jbtn"
|
@click="handleOutDetail(scope.$index, scope.row)"
|
>出库</el-button
|
>
|
<!-- <el-button
|
v-if="scope.row.Status == 20"
|
size="small"
|
class="el-icon-reading jbtn"
|
@click="handleAgainDetail(scope.$index, scope.row)"
|
>再次申请</el-button
|
> -->
|
<el-button
|
class="el-icon-s-platform jbtn"
|
size="small"
|
@click="handleLog(scope.$index, scope.row)"
|
>操作日志</el-button
|
>
|
</template>
|
</el-table-column>
|
</el-table>
|
|
<!--工具条-->
|
<el-col :span="24" class="toolbar">
|
<el-pagination
|
layout="prev, pager, next"
|
@current-change="handleCurrentChange"
|
:page-size="20"
|
:total="total"
|
style="float: right"
|
></el-pagination>
|
</el-col>
|
|
<!--新增界面-->
|
<el-dialog
|
title="新增"
|
:visible.sync="addFormVisible"
|
v-model="addFormVisible"
|
:close-on-click-modal="false"
|
width="1400px"
|
v-on:back="mapBack"
|
>
|
<el-button
|
class="el-icon-back jbtn"
|
@click.native="addFormVisible = false"
|
>返回</el-button
|
>
|
<el-form
|
:model="addForm"
|
label-width="80px"
|
:rules="addFormRules"
|
ref="addForm"
|
>
|
<div
|
style="
|
font-size: 30px;
|
line-height: 40px;
|
height: 42px;
|
color: #000;
|
width: 160px;
|
margin: 0 auto;
|
"
|
>
|
领料申请
|
</div>
|
<h3>领料信息</h3>
|
<el-form-item label="所属仓库" prop="WareHouseId">
|
<el-select
|
style="width: 100%"
|
v-model="addForm.WareHouseId"
|
filterable
|
placeholder="请选择所属仓库"
|
@change="handleChange"
|
>
|
<el-option
|
v-for="item in wareHouseModules"
|
:key="item.Id"
|
:value="item.Id"
|
:label="item.Name"
|
>
|
<span style="float: left">{{ item.Name }}</span>
|
</el-option>
|
</el-select>
|
</el-form-item>
|
<el-form-item label="领料类型" prop="PayType">
|
<el-select v-model="addForm.PayType" placeholder="请选择领料类型">
|
<el-option
|
v-for="item in statusList"
|
:key="item.value"
|
:label="item.name"
|
:value="item.value"
|
></el-option>
|
</el-select>
|
</el-form-item>
|
<el-form-item label="备注" prop="Remark">
|
<el-input type="textarea" v-model="addForm.Remark"></el-input>
|
</el-form-item>
|
</el-form>
|
<el-divider></el-divider>
|
<h3>添加出库商品</h3>
|
<el-button
|
class="el-icon-reading jbtn"
|
size="small"
|
@click="handleSearchProduct()"
|
>请选择出库商品</el-button
|
>
|
|
<div
|
class="flex-1"
|
style="width: 100%; overflow: auto; max-height: 400px"
|
v-if="addForm.noMatchData.length > 0"
|
>
|
<div
|
v-if="addForm.noMatchData.length > 0"
|
style="
|
float: left;
|
width: 40px;
|
padding-top: 20px;
|
margin-right: 15px;
|
"
|
></div>
|
<el-table
|
v-bind:data="addForm.noMatchData"
|
:visible.sync="noLoad"
|
tooltip-effect="dark"
|
style="width: 100%"
|
v-on:selection-change="handleTransChange"
|
>
|
<el-table-column type="index" width="50"></el-table-column>
|
<el-table-column
|
prop="Name"
|
label="商品名称"
|
width="350"
|
sortable
|
></el-table-column>
|
<el-table-column
|
prop="Code"
|
label="商品编号"
|
width="200"
|
sortable
|
></el-table-column>
|
<el-table-column
|
prop="SpecName"
|
label="商品规格"
|
width="150"
|
sortable
|
></el-table-column>
|
<el-table-column
|
prop="UnitName"
|
label="商品单位"
|
width="150"
|
sortable
|
></el-table-column>
|
<el-table-column
|
prop="Quantity"
|
label="库存数量"
|
width="150"
|
sortable
|
></el-table-column>
|
<el-table-column prop="WNum" label="商品数量" width="200" sortable>
|
<template slot-scope="scope">
|
<el-input-number
|
style="width: 130px"
|
v-model="scope.row.WNum"
|
class="none"
|
controls-position="right"
|
></el-input-number>
|
</template>
|
</el-table-column>
|
<el-table-column label="操作">
|
<template slot-scope="scope">
|
<el-button
|
class="jbtn"
|
size="mini"
|
v-on:click="handleRemoveItem(scope.$index, scope.row)"
|
>移除</el-button
|
>
|
</template>
|
</el-table-column>
|
</el-table>
|
</div>
|
|
<div slot="footer" class="dialog-footer text-center">
|
<el-button @click.native="addFormVisible = false">取消</el-button>
|
<el-button
|
type="primary"
|
@click.native="addSubmit"
|
:loading="addLoading"
|
>提交</el-button
|
>
|
</div>
|
</el-dialog>
|
<el-dialog
|
title="选择商品"
|
:visible.sync="SearchProductVisible"
|
v-model="SearchProductVisible"
|
:close-on-click-modal="false"
|
width="1000px"
|
>
|
<el-col :span="24" class="toolbar" style="padding-bottom: 0px">
|
<el-form :inline="true" :model="filters" @submit.native.prevent>
|
<el-form-item>
|
<el-input
|
v-model="filters.name"
|
placeholder="请输入商品名称"
|
></el-input>
|
</el-form-item>
|
<el-form-item>
|
<el-button class="el-icon-search jbtn" @click="getWMProductList"
|
>查询</el-button
|
>
|
</el-form-item>
|
</el-form>
|
</el-col>
|
<div class="flex-row" style="width: 100%">
|
<div class="flex-1" style="overflow: auto; max-height: 600px">
|
<!--列表-->
|
<el-table
|
:data="WMProductList"
|
highlight-current-row
|
@current-change="selectCurrentRow"
|
v-loading="ProductListLoading"
|
style="width: 100%"
|
>
|
<el-table-column type="index" width="40"></el-table-column>
|
<el-table-column
|
prop="Name"
|
label="商品名称"
|
width="250"
|
sortable
|
></el-table-column>
|
<el-table-column
|
prop="Code"
|
label="商品编号"
|
width="150"
|
sortable
|
></el-table-column>
|
<el-table-column
|
prop="SpecName"
|
label="商品规格"
|
width="220"
|
sortable
|
></el-table-column>
|
<el-table-column
|
prop="UnitName"
|
label="商品单位"
|
width="100"
|
sortable
|
></el-table-column>
|
<el-table-column
|
prop="Quantity"
|
label="库存数量"
|
width="100"
|
sortable
|
></el-table-column>
|
<el-table-column label="操作">
|
<template slot-scope="scope">
|
<el-button
|
class="jbtn"
|
size="mini"
|
v-on:click="handleAddItem(scope.$index, scope.row)"
|
>添加</el-button
|
>
|
</template>
|
</el-table-column>
|
</el-table>
|
|
<!--工具条-->
|
<el-col :span="24" class="toolbar">
|
<el-pagination
|
layout="prev, pager, next"
|
@current-change="handleCurrentChangeProductList"
|
:page-size="20"
|
:total="totalProduct"
|
style="float: right"
|
></el-pagination>
|
</el-col>
|
</div>
|
</div>
|
</el-dialog>
|
|
<!--详情页面-->
|
<el-dialog
|
title="详情"
|
:visible.sync="detailFormVisible"
|
v-model="detailFormVisible"
|
:close-on-click-modal="false"
|
width="1400px"
|
>
|
<el-button
|
class="el-icon-back jbtn"
|
@click.native="detailFormVisible = false"
|
>返回</el-button
|
>
|
<el-button
|
@click.native="checkSubmit"
|
:loading="checkLoading"
|
v-if="
|
(detailForm.Status == 10 || detailForm.Status == 30) &&
|
detailForm.CheckAdminId == detailForm.AdminId
|
"
|
class="jbtn"
|
>审核</el-button
|
>
|
<el-button
|
@click.native="setFinishSubmit"
|
:loading="setFinishLoading"
|
v-if="detailForm.Status == 50"
|
class="jbtn"
|
>设置交易完成</el-button
|
>
|
<el-button v-if="detailForm.Status >= 40" v-print="'#print'" class="jbtn"
|
>打印</el-button
|
>
|
|
<div
|
style="
|
font-size: 30px;
|
line-height: 40px;
|
height: 42px;
|
color: #000;
|
width: 130px;
|
margin: 0 auto;
|
"
|
>
|
领料详情
|
</div>
|
|
<h3 style="margin-top: 0">审批流</h3>
|
<el-divider></el-divider>
|
<div class="step">
|
<el-steps
|
:active="detailForm.CheckRankStep"
|
finish-status="success"
|
align-center
|
>
|
<el-step
|
:title="item"
|
:key="item"
|
v-for="item in detailForm.CheckStrStep"
|
></el-step>
|
</el-steps>
|
</div>
|
|
<!-- <h3>领料信息</h3>
|
<el-divider></el-divider>
|
<el-form
|
:inline="true"
|
:model="detailForm"
|
label-width="110px"
|
style="font-weight: bold"
|
ref="detailForm"
|
>
|
<el-form-item label="仓库名称" prop="WareHouseName">
|
<el-input
|
:disabled="true"
|
v-model="detailForm.WareHouseName"
|
></el-input>
|
</el-form-item>
|
<el-form-item label="领料类型" prop="PayTypeName">
|
<el-input
|
:disabled="true"
|
v-model="detailForm.PayTypeName"
|
></el-input>
|
</el-form-item>
|
<el-form-item label="审核状态" prop="SaleStatus">
|
<el-input :disabled="true" v-model="detailForm.SaleStatus"></el-input>
|
</el-form-item>
|
<el-form-item label="创建时间" prop="CreateTime">
|
<el-input
|
:disabled="true"
|
v-model="detailForm.CreateTime"
|
:formatter="formatDateTime"
|
></el-input>
|
</el-form-item>
|
<el-form-item label="部门名称" prop="DepartmentName">
|
<el-input
|
:disabled="true"
|
v-model="detailForm.DepartmentName"
|
></el-input>
|
</el-form-item>
|
<el-form-item label="备注" prop="Remark">
|
<el-input :disabled="true" v-model="detailForm.Remark"></el-input>
|
</el-form-item>
|
</el-form>
|
|
<h3>出库商品列表</h3>
|
<el-divider></el-divider>
|
<el-form
|
:model="detailForm"
|
label-width="80px"
|
style="font-weight: bold"
|
:rules="detailFormRules"
|
ref="detailForm"
|
>
|
<el-table :data="detailForm.SaleDetailList" border>
|
<el-table-column
|
prop="ProductName"
|
label="商品名称"
|
width="170"
|
></el-table-column>
|
<el-table-column
|
prop="ProductCode"
|
label="商品编号"
|
width="140"
|
></el-table-column>
|
<el-table-column
|
prop="ProductSpec"
|
label="商品规格"
|
width="150"
|
></el-table-column>
|
<el-table-column
|
prop="ProductUnit"
|
label="商品单位"
|
width="80"
|
></el-table-column>
|
<el-table-column
|
prop="Quantity"
|
label="商品数量"
|
width="80"
|
></el-table-column>
|
<el-table-column
|
prop="CheckNum"
|
label="审批数量"
|
width="120"
|
v-if="
|
(detailForm.Status == 10 || detailForm.Status == 30) &&
|
detailForm.CheckAdminId == detailForm.AdminId
|
"
|
>
|
<template scope="scope">
|
<el-input-number
|
style="width: 110px"
|
v-model="scope.row.CheckNum"
|
auto-complete="off"
|
size="mini"
|
controls-position="right"
|
></el-input-number>
|
</template>
|
</el-table-column>
|
<el-table-column
|
prop="ActualNum"
|
label="出库数量"
|
width="80"
|
></el-table-column>
|
<el-table-column
|
prop="StockNum"
|
label="库存数量"
|
width="80"
|
></el-table-column>
|
<el-table-column
|
prop="WeekNum"
|
label="周用量"
|
width="70"
|
></el-table-column>
|
<el-table-column
|
prop="MonthNum"
|
label="月用量"
|
width="70"
|
></el-table-column>
|
<el-table-column
|
prop="ProductStatus"
|
label="商品状态"
|
width="80"
|
></el-table-column>
|
<el-table-column prop="Remark" label="商品备注"></el-table-column>
|
<el-table-column label="操作" width="150">
|
<template slot-scope="scope">
|
<el-button
|
v-if="
|
detailForm.Status == 10 &&
|
detailForm.AdminId == detailForm.EmployeeId
|
"
|
@click.native.prevent="
|
deleteProductList(scope.$index, scope.row)
|
"
|
type="danger"
|
size="small"
|
>
|
删除
|
</el-button>
|
<el-radio-group
|
v-if="
|
(detailForm.Status == 10 || detailForm.Status == 30) &&
|
detailForm.CheckAdminId == detailForm.AdminId
|
"
|
v-model="scope.row.Checked"
|
>
|
<el-radio class="radio" :label="1">通过</el-radio>
|
<el-radio class="radio" :label="2">不通过</el-radio>
|
</el-radio-group>
|
<el-input
|
type="textarea"
|
v-model="scope.row.SaleDetailRemark"
|
placeholder="请输入备注"
|
v-if="
|
(detailForm.Status == 10 || detailForm.Status == 30) &&
|
detailForm.CheckAdminId == detailForm.AdminId
|
"
|
></el-input>
|
</template>
|
</el-table-column>
|
</el-table>
|
</el-form> -->
|
|
<div id="print">
|
<h3 style="margin-top: 0">领料信息</h3>
|
<el-divider></el-divider>
|
<table class="jeod">
|
<template v-if="detailForm">
|
<tr v-bind:data="detailForm">
|
<th>仓库名称</th>
|
<td>
|
{{ detailForm.WareHouseName }}
|
</td>
|
<th>领料类型</th>
|
<td>
|
{{ detailForm.PayTypeName }}
|
</td>
|
<th>审核状态</th>
|
<td>
|
{{ detailForm.SaleStatus }}
|
</td>
|
</tr>
|
<tr v-bind:data="detailForm">
|
<th>创建时间</th>
|
<td>
|
{{ detailForm.CreateTime }}
|
</td>
|
<th>部门名称</th>
|
<td>
|
{{ detailForm.DepartmentName }}
|
</td>
|
<th>备注</th>
|
<td>
|
{{ detailForm.Remark }}
|
</td>
|
</tr>
|
</template>
|
</table>
|
<h3>出库商品列表</h3>
|
<el-divider></el-divider>
|
<table class="kgld">
|
<tr>
|
<th style="width: 130px">商品名称</th>
|
<th style="width: 140px">商品编号</th>
|
<th style="width: 150px">商品规格</th>
|
<th style="width: 80px">商品单位</th>
|
<th style="width: 80px">商品数量</th>
|
<th
|
style="width: 120px"
|
v-if="
|
(detailForm.Status == 10 || detailForm.Status == 30) &&
|
detailForm.CheckAdminId == detailForm.AdminId
|
"
|
>
|
审批数量
|
</th>
|
<th style="width: 80px">出库数量</th>
|
<th style="width: 80px" class="print_hide">库存数量</th>
|
<th style="width: 70px" class="print_hide">周用量</th>
|
<th style="width: 70px" class="print_hide">月用量</th>
|
<th style="width: 80px">商品状态</th>
|
<th style="width: 120px">商品备注</th>
|
<th style="width: 100px" class="print_hide">操作</th>
|
</tr>
|
<template v-if="detailForm.SaleDetailList">
|
<tr
|
v-for="(item, index) in detailForm.SaleDetailList"
|
v-bind:key="index"
|
>
|
<td>{{ item.ProductName }}</td>
|
<td>{{ item.ProductCode }}</td>
|
<td>{{ item.ProductSpec }}</td>
|
<td>{{ item.ProductUnit }}</td>
|
<td>{{ item.Quantity }}</td>
|
<td
|
v-if="
|
(detailForm.Status == 10 || detailForm.Status == 30) &&
|
detailForm.CheckAdminId == detailForm.AdminId
|
"
|
>
|
<el-input-number
|
style="width: 110px"
|
v-model="item.CheckNum"
|
auto-complete="off"
|
size="mini"
|
controls-position="right"
|
></el-input-number>
|
</td>
|
<td>{{ item.ActualNum }}</td>
|
<td class="print_hide">{{ item.StockNum }}</td>
|
<td class="print_hide">{{ item.WeekNum }}</td>
|
<td class="print_hide">{{ item.MonthNum }}</td>
|
<td>{{ item.ProductStatus }}</td>
|
<td>{{ item.Remark }}</td>
|
<td class="print_hide">
|
<el-button
|
v-if="
|
detailForm.Status == 10 &&
|
detailForm.AdminId == detailForm.EmployeeId
|
"
|
v-on:click="deleteProductList(null, item)"
|
type="danger"
|
size="small"
|
>
|
删除
|
</el-button>
|
<el-radio-group
|
v-if="
|
(detailForm.Status == 10 || detailForm.Status == 30) &&
|
detailForm.CheckAdminId == detailForm.AdminId
|
"
|
v-model="item.Checked"
|
>
|
<el-radio class="radio" :label="1">通过</el-radio>
|
<el-radio class="radio" :label="2">不通过</el-radio>
|
</el-radio-group>
|
<el-input
|
type="textarea"
|
v-model="item.SaleDetailRemark"
|
placeholder="请输入备注"
|
v-if="
|
(detailForm.Status == 10 || detailForm.Status == 30) &&
|
detailForm.CheckAdminId == detailForm.AdminId
|
"
|
></el-input>
|
</td>
|
</tr>
|
</template>
|
</table>
|
<el-divider></el-divider>
|
<div style="text-align: center">
|
<span class="fds" v-if="detailForm">制单人:</span
|
>{{ detailForm.EmployeeName }}
|
<span class="fds" style="margin-left: 200px" v-if="detailForm"
|
>审核人:</span
|
>{{ detailForm.CheckAdminName }}
|
<span class="fds" style="margin-left: 200px" v-if="detailForm"
|
>发料人:</span
|
>{{ detailForm.IssueName }}
|
</div>
|
</div>
|
</el-dialog>
|
|
<!--出库页面-->
|
<el-dialog
|
title="出库"
|
:visible.sync="outFormVisible"
|
v-model="outFormVisible"
|
:close-on-click-modal="false"
|
width="1400px"
|
>
|
<el-button
|
class="el-icon-back jbtn"
|
@click.native="outFormVisible = false"
|
>返回</el-button
|
>
|
<el-button
|
@click.native="outSubmit"
|
:loading="outLoading"
|
v-if="outForm.Status == 40 && outForm.MayOut"
|
class="jbtn"
|
>出库</el-button
|
>
|
<div
|
style="
|
font-size: 30px;
|
line-height: 40px;
|
height: 42px;
|
color: #000;
|
width: 160px;
|
margin: 0 auto;
|
"
|
>
|
出库单详情
|
</div>
|
<h3>领料信息</h3>
|
<el-divider></el-divider>
|
<el-form
|
:inline="true"
|
:model="outForm"
|
label-width="110px"
|
ref="outForm"
|
>
|
<el-form-item label="所属仓库" prop="WareHouseId">
|
<el-select
|
style="width: 100%"
|
v-model="outForm.WareHouseId"
|
placeholder="请选择所属仓库"
|
:disabled="true"
|
>
|
<el-option
|
v-for="item in wareHouseModules"
|
:key="item.Id"
|
:value="item.Id"
|
:label="item.Name"
|
>
|
<span style="float: left">{{ item.Name }}</span>
|
</el-option>
|
</el-select>
|
</el-form-item>
|
<!-- <el-form-item label="实付金额" prop="PayAmount">
|
<el-input
|
v-model.number="outForm.PayAmount"
|
placeholder="请输入实付金额"
|
></el-input>
|
</el-form-item> -->
|
<el-form-item label="备注" prop="Remark">
|
<el-input v-model="outForm.Remark" :disabled="true"></el-input>
|
</el-form-item>
|
</el-form>
|
|
<h3>出库商品列表</h3>
|
<el-divider></el-divider>
|
<el-form
|
:model="outForm"
|
label-width="80px"
|
:rules="outFormRules"
|
ref="outForm"
|
>
|
<el-table :data="outForm.SaleDetailList" border>
|
<el-table-column
|
prop="ProductName"
|
label="商品名称"
|
></el-table-column>
|
<el-table-column
|
prop="ProductCode"
|
label="商品编号"
|
width="170"
|
></el-table-column>
|
<el-table-column
|
prop="ProductSpec"
|
label="商品规格"
|
width="250"
|
></el-table-column>
|
<el-table-column
|
prop="ProductUnit"
|
label="商品单位"
|
width="150"
|
></el-table-column>
|
<el-table-column
|
prop="Quantity"
|
label="商品数量"
|
width="150"
|
></el-table-column>
|
<el-table-column
|
prop="ActualNum"
|
label="出库数量"
|
width="150"
|
></el-table-column>
|
<el-table-column prop="GiveNum" label="实发数量" width="180">
|
<template scope="scope">
|
<el-input-number
|
v-model="scope.row.GiveNum"
|
auto-complete="off"
|
size="mini"
|
controls-position="right"
|
></el-input-number>
|
</template>
|
</el-table-column>
|
<el-table-column
|
prop="StockNum"
|
label="库存数量"
|
width="150"
|
></el-table-column>
|
</el-table>
|
</el-form>
|
</el-dialog>
|
|
<!--操作日志-->
|
<el-dialog
|
title="操作日志"
|
:visible.sync="LogVisible"
|
v-model="LogVisible"
|
@close="closeDialog"
|
:close-on-click-modal="false"
|
>
|
<!--列表-->
|
<el-table
|
:data="WMSaleInfoLog"
|
highlight-current-row
|
v-loading="logLoading"
|
@selection-change="selsChange"
|
style="width: 100%"
|
>
|
<el-table-column type="index" width="80"></el-table-column>
|
<el-table-column
|
prop="CreateTime"
|
label="操作时间"
|
:formatter="formatDateTime"
|
width
|
sortable
|
></el-table-column>
|
<el-table-column
|
prop="UserName"
|
label="操作人"
|
width
|
sortable
|
></el-table-column>
|
<el-table-column
|
prop="Content"
|
label="操作内容"
|
width
|
sortable
|
></el-table-column>
|
</el-table>
|
<!--工具条-->
|
<el-col :span="24" class="toolbar">
|
<el-pagination
|
layout="prev, pager, next"
|
@current-change="handleCurrentChangeLog"
|
:page-size="10"
|
:total="totalLog"
|
style="float: right"
|
></el-pagination>
|
</el-col>
|
</el-dialog>
|
</section>
|
</template>
|
|
<style scoped>
|
.inline-block {
|
display: inline-block;
|
}
|
.flex-row {
|
display: flex;
|
flex-direction: row;
|
}
|
.flex-1 {
|
flex: 1;
|
}
|
.text-center {
|
text-align: center;
|
}
|
.jbtn {
|
background-color: #f90;
|
color: #f3f7fc;
|
border: 1px solid #f90;
|
}
|
.jbtn:hover {
|
background-color: #f90;
|
}
|
.jeod {
|
width: 100%;
|
text-align: center;
|
font-size: 15px;
|
color: #000;
|
line-height: 40px;
|
padding: 0 12px 0 0;
|
box-sizing: border-box;
|
border-collapse: collapse; /* 表格相邻边合并*/
|
}
|
.jeod th {
|
width: 130px;
|
text-align: center;
|
border: 1px #000 solid;
|
}
|
.jeod td {
|
width: 250px;
|
text-align: left;
|
border: 1px #000 solid;
|
padding-left: 20px;
|
}
|
.kgld {
|
width: 100%;
|
font-size: 15px;
|
color: #000;
|
line-height: 40px;
|
border-collapse: collapse; /* 表格相邻边合并*/
|
}
|
.kgld th {
|
text-align: center;
|
border: 1px #000 solid;
|
}
|
.kgld td {
|
text-align: center;
|
margin: 10px;
|
border: 1px #000 solid;
|
}
|
.fds {
|
font-size: 15px;
|
color: #000;
|
}
|
.el-divider {
|
margin: 10px 0 10px 0;
|
}
|
@media print {
|
.print_hide {
|
display: none; /* 隐藏打印元素 */
|
}
|
}
|
</style>
|
|
<script>
|
import util from "../../../../util/date";
|
import {
|
getWMSaleInfoListPage, //领料列表
|
addWMSaleInfo, //增加
|
detailWMSaleInfo, //详情
|
checkWMSaleInfo, //审核
|
outDetailWMSaleInfo, //出库详情
|
getWMWareHouseGet, //仓库下拉
|
getWMProductListListPage, //商品列表
|
outWMSaleInfo, //出库
|
setFinishWMSaleInfo, //设置交易完成
|
getWMSaleInfoLogListPage, //领料操作日志列表
|
deleteWMProductList, //删除商品
|
} from "../../../api/api";
|
import { getButtonList } from "../../../promissionRouter";
|
import Toolbar from "../../../components/Toolbar";
|
import date from "../../../../util/date";
|
import SearchBar from "./SearchBar";
|
export default {
|
components: { SearchBar },
|
data() {
|
return {
|
setid: "",
|
filters: {
|
name: "",
|
options: "", //仓库下拉
|
typeoptions: "", //类型下拉
|
startdate: "", //开始时间
|
enddate: "", //结束时间
|
statusoptions: "", //状态下拉
|
},
|
WMSaleInfo: [],
|
wareHouseModules: [], //仓库下拉
|
WMProductList: [],
|
noMatchData: [],
|
total: 0,
|
buttonList: [],
|
statusList: [
|
{ name: "对内领料", value: 1 },
|
{ name: "对外领料", value: 2 },
|
],
|
currentRow: null,
|
page: 1,
|
listLoading: false,
|
noLoad: false,
|
sels: [], //列表选中列
|
//新增
|
addDialogFormVisible: false,
|
addFormVisible: false, //新增界面是否显示
|
addLoading: false,
|
addFormRules: {
|
WareHouseId: [
|
{ required: true, message: "请选择所属仓库", trigger: "blur" },
|
],
|
PayType: [
|
{ required: true, message: "请选择领料类型", trigger: "blur" },
|
],
|
},
|
SearchProductVisible: false, //领料时选择商品信息是否显示
|
ProductListLoading: false,
|
totalProduct: 0,
|
addForm: {
|
noMatchData: [],
|
}, //新增界面数据
|
//详情
|
detailForm: {},
|
detailFormRules: {},
|
detailFormVisible: false, //详情界面是否显示
|
//审核
|
checkLoading: false,
|
//出库
|
outForm: {},
|
outFormVisible: false,
|
outLoading: false,
|
outFormRules: {},
|
//设置交易完成
|
setFinishLoading: false,
|
//操作日志
|
LogVisible: false, //操作日志是否显示
|
logLoading: false,
|
WMSaleInfoLog: [],
|
totalLog: 0,
|
};
|
},
|
methods: {
|
//选中行时勾选框
|
selsChangeOne(selection, row) {
|
this.currentRow = row;
|
this.$refs.multipleTable.toggleRowSelection(row); //选中当前选择
|
this.selectCurrentRow(row);
|
},
|
selectCurrentRow(val) {
|
this.currentRow = val;
|
this.$refs.multipleTable.toggleRowSelection(val); //选中当前选择
|
},
|
mapBack: function () {
|
this.addFormVisible.visible = false;
|
this.getWMSaleInfoListPage(true);
|
},
|
callFunction(item) {
|
this.filters = {
|
name: item.nameSearch,
|
options: item.optionsSearch, //仓库下拉
|
typeoptions: item.typeoptionsSearch, //类型下拉
|
startdate: item.startdateSearch, //开始时间
|
enddate: item.enddateSearch, //结束时间
|
statusoptions: item.statusoptionsSearch, //枚举状态下拉
|
};
|
this[item.Func].apply(this, item);
|
},
|
//显示转换
|
formatIsUse: function (row, column) {
|
return row.IsUse == 1 ? "启用" : row.IsUse == 0 ? "禁用" : "未知";
|
},
|
formatDateTime: function (row, column) {
|
return !row.CreateTime || row.CreateTime == ""
|
? ""
|
: util.formatDate.format(new Date(row.CreateTime), "yyyy-MM-dd hh:mm");
|
},
|
handleCurrentChange(val) {
|
this.page = val;
|
this.getWMSaleInfo();
|
},
|
//领料管理列表
|
getWMSaleInfo() {
|
let para = {
|
page: this.page,
|
key: this.filters.name,
|
options: this.filters.options,
|
typeoptions: this.filters.typeoptions,
|
startdate: this.filters.startdate,
|
enddate: this.filters.enddate,
|
statusoptions: this.filters.statusoptions,
|
};
|
this.listLoading = true;
|
//NProgress.start();
|
getWMSaleInfoListPage(para).then((res) => {
|
this.total = res.data.response.dataCount;
|
this.WMSaleInfo = res.data.response.data;
|
this.listLoading = false;
|
//NProgress.done();
|
});
|
},
|
//显示新增界面
|
handleAdd() {
|
this.addFormVisible = true;
|
this.addForm = {
|
Status: 0,
|
Remark: "",
|
wareHouseList: [],
|
noMatchData: [],
|
PayType: 1,
|
WareHouseId: this.addForm.WareHouseId,
|
};
|
this.getWMProductList();
|
},
|
handleCurrentChangeProductList(val) {
|
this.page = val;
|
this.getWMProductList();
|
},
|
getWMProductList() {
|
let para = {
|
page: this.page,
|
key: this.filters.name,
|
wareHouseId: this.addForm.WareHouseId,
|
};
|
this.ProductListLoading = true;
|
getWMProductListListPage(para).then((res) => {
|
this.totalProduct = res.data.response.dataCount;
|
this.WMProductList = res.data.response.data;
|
this.ProductListLoading = false;
|
});
|
if (this.filters.name != null) {
|
this.page = 1;
|
}
|
},
|
//显示详情界面
|
handleDetail: function (index, row) {
|
if (!row) {
|
row = this.currentRow;
|
}
|
let prms = { id: row.Id };
|
detailWMSaleInfo(prms).then((res) => {
|
this.detailForm = Object.assign({}, res.data.response);
|
});
|
this.detailFormVisible = true;
|
},
|
//显示出库界面
|
handleOutDetail: function (index, row) {
|
if (!row) {
|
row = this.currentRow;
|
}
|
let prms = { id: row.Id };
|
outDetailWMSaleInfo(prms).then((res) => {
|
this.outForm = Object.assign({}, res.data.response);
|
});
|
this.outFormVisible = true;
|
},
|
//显示添加出库商品
|
handleSearchProduct() {
|
this.SearchProductVisible = true;
|
},
|
//显示操作日志界面
|
handleLog: function (index, row) {
|
if (!row) {
|
row = this.currentRow;
|
}
|
let prms = { id: row.Id };
|
|
this.getWMSaleInfoLog(prms);
|
this.LogVisible = true;
|
},
|
closeDialog() {
|
this.setid = "";
|
},
|
//操作日志列表
|
getWMSaleInfoLog(prms) {
|
let para = {
|
page: this.page,
|
};
|
if (this.setid == "") {
|
para.id = prms.id;
|
this.setid = prms.id;
|
} else {
|
para.id = this.setid;
|
}
|
getWMSaleInfoLogListPage(para).then((res) => {
|
this.totalLog = res.data.response.dataCount;
|
this.WMSaleInfoLog = res.data.response.data;
|
});
|
},
|
handleCurrentChangeLog(val) {
|
this.page = val;
|
this.getWMSaleInfoLog();
|
},
|
//添加商品
|
handleAddItem: function (index, row) {
|
for (var i in this.addForm.noMatchData) {
|
if (this.addForm.noMatchData[i].Id == row.Id) {
|
//已存在
|
this.$message({
|
message: "商品已经存在,请填写物料数量!",
|
type: "error",
|
});
|
return;
|
}
|
}
|
this.addForm.noMatchData.push(row);
|
this.addForm.noMatchData;
|
},
|
//移除商品
|
handleRemoveItem: function (index, row) {
|
row.inputNum = 0;
|
this.$delete(this.addForm.noMatchData, index);
|
},
|
handleTransChange: function (selection) {
|
this.selectRows = selection;
|
},
|
//新增
|
addSubmit: function () {
|
this.$refs.addForm.validate((valid) => {
|
if (valid) {
|
this.$confirm("确认提交吗?", "提示", {}).then(() => {
|
this.addLoading = true;
|
//NProgress.start();
|
let para = Object.assign({}, this.addForm);
|
addWMSaleInfo(para).then((res) => {
|
if (util.isEmt.format(res)) {
|
this.addLoading = false;
|
return;
|
}
|
if (res.data.success) {
|
this.addLoading = false;
|
//NProgress.done();
|
this.$message({
|
message: res.data.msg,
|
type: "success",
|
});
|
this.$refs["addForm"].resetFields();
|
this.addFormVisible = false;
|
this.getWMSaleInfo();
|
} else {
|
this.addLoading = false;
|
this.$message({
|
message: res.data.msg,
|
type: "error",
|
});
|
}
|
});
|
});
|
}
|
});
|
},
|
//审核
|
checkSubmit: function () {
|
// this.$refs.detailForm.validate((valid) => {
|
// if (valid) {
|
this.$confirm("确认审核吗?", "提示", {}).then(() => {
|
this.checkLoading = true;
|
let para = Object.assign({}, this.detailForm);
|
checkWMSaleInfo(para).then((res) => {
|
if (util.isEmt.format(res)) {
|
this.checkLoading = false;
|
return;
|
}
|
if (res.data.success) {
|
this.checkLoading = false;
|
//NProgress.done();
|
this.$message({
|
message: res.data.msg,
|
type: "success",
|
});
|
// this.$refs["detailForm"].resetFields();
|
this.detailFormVisible = false;
|
this.getWMSaleInfo();
|
} else {
|
this.checkLoading = false;
|
this.$message({
|
message: res.data.msg,
|
type: "error",
|
});
|
}
|
});
|
});
|
// }
|
// });
|
},
|
//出库
|
outSubmit: function () {
|
this.$refs.outForm.validate((valid) => {
|
if (valid) {
|
this.$confirm("确认出库吗?", "提示", {}).then(() => {
|
this.outLoading = true;
|
let para = Object.assign({}, this.outForm);
|
outWMSaleInfo(para).then((res) => {
|
if (util.isEmt.format(res)) {
|
this.outLoading = false;
|
return;
|
}
|
if (res.data.success) {
|
this.outLoading = false;
|
//NProgress.done();
|
this.$message({
|
message: res.data.msg,
|
type: "success",
|
});
|
this.$refs["outForm"].resetFields();
|
this.outFormVisible = false;
|
this.getWMSaleInfo();
|
} else {
|
this.outLoading = false;
|
this.$message({
|
message: res.data.msg,
|
type: "error",
|
});
|
}
|
});
|
});
|
}
|
});
|
},
|
//设置交易完成
|
setFinishSubmit: function () {
|
this.$refs.detailForm.validate((valid) => {
|
if (valid) {
|
this.$confirm("确认设置交易完成吗?", "提示", {}).then(() => {
|
this.setFinishLoading = true;
|
let para = Object.assign({}, this.detailForm);
|
setFinishWMSaleInfo(para).then((res) => {
|
if (util.isEmt.format(res)) {
|
this.setFinishLoading = false;
|
return;
|
}
|
if (res.data.success) {
|
this.setFinishLoading = false;
|
//NProgress.done();
|
this.$message({
|
message: res.data.msg,
|
type: "success",
|
});
|
this.$refs["detailForm"].resetFields();
|
this.detailFormVisible = false;
|
this.getWMSaleInfo();
|
} else {
|
this.setFinishLoading = false;
|
this.$message({
|
message: res.data.msg,
|
type: "error",
|
});
|
}
|
});
|
});
|
}
|
});
|
},
|
selsChange: function (sels) {
|
this.sels = sels;
|
},
|
//删除商品
|
deleteProductList: function (index, row) {
|
this.$confirm("确认删除商品吗?", "提示", {}).then(() => {
|
let para = { id: row.Id };
|
deleteWMProductList(para).then((res) => {
|
if (util.isEmt.format(res)) {
|
return;
|
}
|
if (res.data.success) {
|
this.$message({
|
message: res.data.msg,
|
type: "success",
|
});
|
// this.$refs["detailForm"].resetFields();
|
this.detailFormVisible = false;
|
this.getWMSaleInfo();
|
} else {
|
this.$message({
|
message: res.data.msg,
|
type: "error",
|
});
|
}
|
});
|
});
|
},
|
//选择仓库联动商品列表
|
handleChange(value) {
|
this.getWMProductList();
|
},
|
},
|
mounted() {
|
this.getWMSaleInfo();
|
// this.getWMProductList();
|
|
//仓库下拉列表
|
getWMWareHouseGet().then((res) => {
|
this.wareHouseModules = res.data.response.wareHouseList;
|
this.addForm.WareHouseId = this.wareHouseModules[0].Id;
|
});
|
|
//商品列表
|
// getWMProductListListPage().then((res) => {
|
// this.WMProductList = res.data.response.data;
|
// });
|
|
let routers = window.localStorage.router
|
? JSON.parse(window.localStorage.router)
|
: [];
|
this.buttonList = getButtonList(this.$route.path, routers);
|
},
|
};
|
</script>
|