|
|
|
@ -1,161 +1,172 @@
|
|
|
|
|
<template>
|
|
|
|
|
<div class="app-container">
|
|
|
|
|
<el-card >
|
|
|
|
|
<div slot="header" class="clearfix">
|
|
|
|
|
<i class="el-icon-back" @click="goToAbout">返回 | </i>
|
|
|
|
|
<!-- <el-link icon="el-icon-edit" :underline="false" @click="goToAbout">编辑</el-link>-->
|
|
|
|
|
<span> 盘点详情</span>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="card-change-1-search">
|
|
|
|
|
<!-- <div slot="header" class="clearfix">-->
|
|
|
|
|
<!-- <i class="el-icon-back" @click="goToAbout">返回 | </i>-->
|
|
|
|
|
<!-- <span> 盘点详情</span>-->
|
|
|
|
|
<!-- </div>-->
|
|
|
|
|
<div class="" style="height: 110px; display: flex; justify-content: space-between;">
|
|
|
|
|
<div style="height: 100%; display: flex; justify-content: space-between;">
|
|
|
|
|
<div style="height: 100%; width: 70%; display: flex; justify-content: space-between;">
|
|
|
|
|
<div style="height: 100%; width: 70%; display: flex; justify-content: space-between;align-items: center">
|
|
|
|
|
<div class="box">
|
|
|
|
|
<span style="font-size: 26px;color: #0DC291;font-weight: bold" >{{inventoryForm.productQuantity}}</span>
|
|
|
|
|
<span style="font-size: 26px;color: #0DC291;font-weight: bold">{{ inventoryForm.productQuantity }}</span>
|
|
|
|
|
<span style="display: flex">
|
|
|
|
|
<div style="background-color: #0DC291;width: 10px;height: 10px;border-radius: 50%;margin-top: 6px;margin-right: 10px"></div>
|
|
|
|
|
商品数量</span>
|
|
|
|
|
<div
|
|
|
|
|
style="background-color: #0DC291;width: 10px;height: 10px;border-radius: 50%;margin-top: 6px;margin-right: 10px"></div>
|
|
|
|
|
商品种类</span>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="box">
|
|
|
|
|
<span style="font-size: 26px;color: #00CAFF;font-weight: bold">{{inventoryForm.inventoryQuantity}}</span>
|
|
|
|
|
<span
|
|
|
|
|
style="font-size: 26px;color: #00CAFF;font-weight: bold">{{ inventoryForm.inventoryQuantity }}</span>
|
|
|
|
|
<span style="display: flex">
|
|
|
|
|
<div style="background-color: #00CAFF;width: 10px;height: 10px;border-radius: 50%;margin-top: 6px;margin-right: 10px"></div>
|
|
|
|
|
盘点数量</span>
|
|
|
|
|
<div
|
|
|
|
|
style="background-color: #00CAFF;width: 10px;height: 10px;border-radius: 50%;margin-top: 6px;margin-right: 10px"></div>
|
|
|
|
|
盘点正常商品量</span>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="box">
|
|
|
|
|
<span style="font-size: 26px;color: #F44522;font-weight: bold" >{{inventoryForm.inventoryDiscrepancy}}</span>
|
|
|
|
|
<span
|
|
|
|
|
style="font-size: 26px;color: #F44522;font-weight: bold">{{ inventoryForm.inventoryDiscrepancy }}</span>
|
|
|
|
|
<span style="display: flex">
|
|
|
|
|
<div style="background-color: #F44522;width: 10px;height: 10px;border-radius: 50%;margin-top: 6px;margin-right: 10px"></div>
|
|
|
|
|
库存差异</span>
|
|
|
|
|
<div
|
|
|
|
|
style="background-color: #F44522;width: 10px;height: 10px;border-radius: 50%;margin-top: 6px;margin-right: 10px"></div>
|
|
|
|
|
盘点货损数量</span>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="box">
|
|
|
|
|
<span style="font-size: 26px;color: #FA6400;font-weight: bold">{{inventoryForm.profitLossAmount}}</span>
|
|
|
|
|
<span style="font-size: 26px;color: #FA6400;font-weight: bold">{{ inventoryForm.profitLossAmount }}</span>
|
|
|
|
|
<span style="display: flex">
|
|
|
|
|
<div style="background-color: #FA6400;width: 10px;height: 10px;border-radius: 50%;margin-top: 6px;margin-right: 10px"></div>
|
|
|
|
|
盈亏总额
|
|
|
|
|
<div
|
|
|
|
|
style="background-color: #FA6400;width: 10px;height: 10px;border-radius: 50%;margin-top: 6px;margin-right: 10px"></div>
|
|
|
|
|
盈亏金额
|
|
|
|
|
</span>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div style="height: 100%; width: 40%; display: flex; flex-direction: column; justify-content: space-between;">
|
|
|
|
|
<el-form ref="" label-width="100px">
|
|
|
|
|
<el-form-item label="制单人" style="margin-bottom: 1px">
|
|
|
|
|
<el-input size="mini" v-model="inventoryForm.creataByName" disabled="true"
|
|
|
|
|
style="width: 220Px;margin-bottom: 1px;">
|
|
|
|
|
</el-input>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="制单时间" style="margin-bottom: 1px">
|
|
|
|
|
<el-input size="mini" v-model="inventoryForm.orderDate" disabled="true"
|
|
|
|
|
style="width: 220Px">
|
|
|
|
|
</el-input>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="盘点编号" style="margin-bottom: 1px">
|
|
|
|
|
<el-input size="mini" v-model="inventoryForm.orderNumber" disabled="true"
|
|
|
|
|
style="width: 220Px">
|
|
|
|
|
</el-input>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</div>
|
|
|
|
|
<div style="height: 100%; width: 40%; display: flex; flex-direction: column; justify-content: space-between;">
|
|
|
|
|
<el-form ref="" label-width="100px">
|
|
|
|
|
<el-form-item label="制单人" style="margin-bottom: 1px">
|
|
|
|
|
<el-input size="mini" v-model="inventoryForm.creataByName" disabled="true"
|
|
|
|
|
style="width: 220Px;margin-bottom: 1px;">
|
|
|
|
|
</el-input>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="制单时间" style="margin-bottom: 1px">
|
|
|
|
|
<el-input size="mini" v-model="inventoryForm.orderDate" disabled="true"
|
|
|
|
|
style="width: 220Px">
|
|
|
|
|
</el-input>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="盘点编号" style="margin-bottom: 1px">
|
|
|
|
|
<el-input size="mini" v-model="inventoryForm.orderNumber" disabled="true"
|
|
|
|
|
style="width: 220Px">
|
|
|
|
|
</el-input>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
|
|
|
|
</el-form>
|
|
|
|
|
<!-- <table class="container1">-->
|
|
|
|
|
<!-- <tr>-->
|
|
|
|
|
<!-- <td>制单人</td>-->
|
|
|
|
|
<!-- <td style="width: 10px;"> </td>-->
|
|
|
|
|
<!-- <td style=""><span class="underlined-text" >{{inventoryForm.creataByName}}</span></td>-->
|
|
|
|
|
<!-- </tr>-->
|
|
|
|
|
<!-- <tr>-->
|
|
|
|
|
<!-- <td>制单时间</td>-->
|
|
|
|
|
<!-- <td> </td>-->
|
|
|
|
|
<!-- <td><span class="underlined-text">{{parseTime(inventoryForm.orderDate)}}</span></td>-->
|
|
|
|
|
<!-- </tr>-->
|
|
|
|
|
<!-- <tr>-->
|
|
|
|
|
<!-- <td>盘点编号</td>-->
|
|
|
|
|
<!-- <td> </td>-->
|
|
|
|
|
<!-- <td><span class="underlined-text">{{inventoryForm.orderNumber}}</span></td>-->
|
|
|
|
|
<!-- </tr>-->
|
|
|
|
|
<!-- </table>-->
|
|
|
|
|
</el-form>
|
|
|
|
|
<!-- <table class="container1">-->
|
|
|
|
|
<!-- <tr>-->
|
|
|
|
|
<!-- <td>制单人</td>-->
|
|
|
|
|
<!-- <td style="width: 10px;"> </td>-->
|
|
|
|
|
<!-- <td style=""><span class="underlined-text" >{{inventoryForm.creataByName}}</span></td>-->
|
|
|
|
|
<!-- </tr>-->
|
|
|
|
|
<!-- <tr>-->
|
|
|
|
|
<!-- <td>制单时间</td>-->
|
|
|
|
|
<!-- <td> </td>-->
|
|
|
|
|
<!-- <td><span class="underlined-text">{{parseTime(inventoryForm.orderDate)}}</span></td>-->
|
|
|
|
|
<!-- </tr>-->
|
|
|
|
|
<!-- <tr>-->
|
|
|
|
|
<!-- <td>盘点编号</td>-->
|
|
|
|
|
<!-- <td> </td>-->
|
|
|
|
|
<!-- <td><span class="underlined-text">{{inventoryForm.orderNumber}}</span></td>-->
|
|
|
|
|
<!-- </tr>-->
|
|
|
|
|
<!-- </table>-->
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div style="height: 100%; width: 30%; display: flex; align-items: center; justify-content: flex-end;">
|
|
|
|
|
<el-button type="primary" v-if="state=='await'" :disabled="saveFlag" @click="save()">保存</el-button>
|
|
|
|
|
<el-button type="success" v-if="state=='await'" :disabled="auditFlag" @click="audit()">生成差异单</el-button>
|
|
|
|
|
<el-button type="success" v-if="state=='ysh'" :disabled="storageFlag" @click="storage">退货处理库存</el-button>
|
|
|
|
|
<el-button type="warning" v-if="state !='await' || state=='ysh'" :disabled="voidFlag" @click="abolition()">作废</el-button>
|
|
|
|
|
<el-button type="warning" v-if="state !='await'" @click="exportExcel()">导出</el-button>
|
|
|
|
|
<el-button type="primary" @click="cancelPurchase" v-if="state=='qrts'">关闭</el-button>
|
|
|
|
|
<el-button @click="cancelPurchase" v-else>取消</el-button>
|
|
|
|
|
<el-button type="success" v-if="state=='await'" :disabled="saveFlag" @click="save()">保存</el-button>
|
|
|
|
|
<el-button type="primary" v-if="state=='await'" :disabled="auditFlag" @click="audit()">
|
|
|
|
|
保存并审核<!--生成差异单-->
|
|
|
|
|
</el-button>
|
|
|
|
|
<el-button type="danger" v-if="state=='ysh'" :disabled="voidFlag" @click="abolition()">作废</el-button>
|
|
|
|
|
<el-button type="success" v-if="state=='ysh'" @click="exportExcel()">导出</el-button>
|
|
|
|
|
<el-button type="primary" v-if="state=='ysh'" :disabled="storageFlag" @click="storage">退货处理库存
|
|
|
|
|
</el-button>
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
</el-card>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<el-card style="margin-top: 20px" >
|
|
|
|
|
<div class="card-change-1-1">
|
|
|
|
|
<el-row :gutter="10" class="mb8">
|
|
|
|
|
<el-col :span="1.5" style="text-align: right; float: right">
|
|
|
|
|
<el-button
|
|
|
|
|
v-if="!numberInput"
|
|
|
|
|
v-if="!numberInput"
|
|
|
|
|
type="primary"
|
|
|
|
|
icon="el-icon-plus"
|
|
|
|
|
@click="commodityAdd"
|
|
|
|
|
>添加盘点</el-button>
|
|
|
|
|
>添加盘点商品
|
|
|
|
|
</el-button>
|
|
|
|
|
</el-col>
|
|
|
|
|
<!-- <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>-->
|
|
|
|
|
</el-row>
|
|
|
|
|
<el-table ref="tables"
|
|
|
|
|
v-loading="loading"
|
|
|
|
|
:data="detailsList"
|
|
|
|
|
:default-sort="defaultSort">
|
|
|
|
|
<el-table ref="tables" border
|
|
|
|
|
v-loading="loading"
|
|
|
|
|
:data="detailsList"
|
|
|
|
|
:default-sort="defaultSort">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<el-table-column label="序号" align="center" prop="commodityName"/>
|
|
|
|
|
<el-table-column label="序号" align="center" type="index"/>
|
|
|
|
|
<el-table-column label="商品名称" align="center" prop="commodityName"/>
|
|
|
|
|
<el-table-column label="商品编码" align="center" prop="goodsNo"/>
|
|
|
|
|
<el-table-column label="品类名称" align="center" prop="cvsGoodName"/>
|
|
|
|
|
<el-table-column label="条形码" align="center" prop="goodsNo"/>
|
|
|
|
|
<el-table-column label="进货量" align="center" prop="purchase">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
{{scope.row.purchase?scope.row.purchase:'--'}}
|
|
|
|
|
{{ scope.row.purchase ? scope.row.purchase : '--' }}
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column label="商品规格" align="center" prop="goodsSpecs"/>
|
|
|
|
|
<el-table-column label="单位" align="center" prop="unit"/>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<el-table-column label="销售量" align="center" prop="unit">
|
|
|
|
|
<el-table-column label="便利店销售" align="center" prop="goodsSales">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
{{scope.row.goodsSales?scope.row.goodsSales:'0'}}
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column label="积分兑换" align="center" prop="inventorySales">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
{{scope.row.inventorySales?scope.row.inventorySales:'0'}}
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column label="兑换卷兑换" align="center" prop="inventorySales">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
{{scope.row.exchangeSales?scope.row.exchangeSales:'0'}}
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column label="便利店销售量" align="center" prop="goodsSales">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
{{ scope.row.goodsSales ? scope.row.goodsSales : '0' }}
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column label="积分兑换量" align="center" prop="inventorySales">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
{{ scope.row.inventorySales ? scope.row.inventorySales : '0' }}
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column label="兑换券兑换量" align="center" prop="inventorySales">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
{{ scope.row.exchangeSales ? scope.row.exchangeSales : '0' }}
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
|
|
|
|
|
<el-table-column label="当前进价" align="center" prop="purchasePrice"/>
|
|
|
|
|
<el-table-column label="库存数量" align="center" prop="stock"/>
|
|
|
|
|
|
|
|
|
|
<el-table-column label="盘点数量" align="center" prop="unit">
|
|
|
|
|
<el-table-column label="正常商品" align="center" prop="purchasePrice">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<el-input-number :disabled="numberInput" v-model="scope.row.inventoryQuantity" @change="change(scope.row,2)" controls-position="right" :precision="0" :min="0" :max="100000000" :step="1" style="max-width: 100%"></el-input-number>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column label="货损数量" align="center" prop="damageQuantity">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<el-input-number :disabled="numberInput" v-model="scope.row.damageQuantity" @change="change(scope.row,2)" controls-position="right" :precision="0" :min="0" :max="100000000" :step="1" style="max-width: 100%"></el-input-number>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
|
|
|
|
|
<el-table-column label="总盘点数量" align="center" prop="inventoryQuantity">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
{{ scope.row.inventoryQuantity + scope.row.damageQuantity}}
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column label="成本价" align="center" prop="purchasePrice"/>
|
|
|
|
|
<el-table-column label="当前库存" align="center" prop="stock"/>
|
|
|
|
|
|
|
|
|
|
<el-table-column label="盘点正常商品量" align="center" prop="purchasePrice">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<el-input-number :disabled="numberInput" v-model="scope.row.inventoryQuantity" @change="change(scope.row,2)"
|
|
|
|
|
controls-position="right" :precision="0" :min="0" :max="100000000" :step="1"
|
|
|
|
|
style="max-width: 100%"></el-input-number>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column label="盘点货损量" align="center" prop="damageQuantity">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<el-input-number :disabled="numberInput" v-model="scope.row.damageQuantity" @change="change(scope.row,2)"
|
|
|
|
|
controls-position="right" :precision="0" :min="0" :max="100000000" :step="1"
|
|
|
|
|
style="max-width: 100%"></el-input-number>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
|
|
|
|
|
<el-table-column label="总盘点量" align="center" prop="inventoryQuantity">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
{{ scope.row.inventoryQuantity + scope.row.damageQuantity }}
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<el-table-column label="库存差异" align="center" prop="inventoryDiscrepancy"/>
|
|
|
|
|
<el-table-column label="盈亏金额" align="center" prop="profitLossAmount"/>
|
|
|
|
@ -167,7 +178,8 @@
|
|
|
|
|
type="text"
|
|
|
|
|
icon="el-icon-edit"
|
|
|
|
|
@click="commodityDel(scope.row)"
|
|
|
|
|
>删除</el-button>
|
|
|
|
|
>删除
|
|
|
|
|
</el-button>
|
|
|
|
|
</template>
|
|
|
|
|
<!-- v-hasPermi="['']"-->
|
|
|
|
|
|
|
|
|
@ -181,45 +193,37 @@
|
|
|
|
|
<!-- :limit.sync="queryParams.pageSize"-->
|
|
|
|
|
<!-- @pagination="getList"-->
|
|
|
|
|
<!-- />-->
|
|
|
|
|
</el-card>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<el-dialog :title="title" :visible.sync="open" width="1000px" append-to-body :close-on-click-modal="false">
|
|
|
|
|
<el-container>
|
|
|
|
|
<el-header style="">
|
|
|
|
|
<el-form ref="tankForm" :model="commodityForm" label-width="80px">
|
|
|
|
|
<el-row :gutter="24">
|
|
|
|
|
<el-col :span="6">
|
|
|
|
|
<el-form-item label="商品分类">
|
|
|
|
|
<el-select
|
|
|
|
|
v-model="commodityForm.cvsGoodId"
|
|
|
|
|
placeholder="全部"
|
|
|
|
|
clearable
|
|
|
|
|
>
|
|
|
|
|
<el-option v-for="item in cvsGoodList" :key="item.id" :label="item.name" :value="item.id"/>
|
|
|
|
|
</el-select>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="6">
|
|
|
|
|
<el-form-item label="供应商" prop="supplierId">
|
|
|
|
|
<el-select
|
|
|
|
|
v-model="commodityForm.supplierId"
|
|
|
|
|
placeholder="全部"
|
|
|
|
|
clearable
|
|
|
|
|
>
|
|
|
|
|
<el-option v-for="item in supplierList" :key="item.id" :label="item.name" :value="item.id"/>
|
|
|
|
|
</el-select>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="8">
|
|
|
|
|
<el-form-item label="详细信息">
|
|
|
|
|
<el-input v-model="commodityForm.remark" placeholder="商品名称,拼音码,条形码等信息" ></el-input>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="4">
|
|
|
|
|
<el-button type="primary" @click="inquire()">查询</el-button>
|
|
|
|
|
</el-col>
|
|
|
|
|
</el-row>
|
|
|
|
|
<el-form ref="tankForm" :model="commodityForm" label-width="20px" :inline="true">
|
|
|
|
|
<el-form-item label="">
|
|
|
|
|
<el-select
|
|
|
|
|
v-model="commodityForm.cvsGoodId"
|
|
|
|
|
placeholder="请选择品类名称"
|
|
|
|
|
clearable
|
|
|
|
|
>
|
|
|
|
|
<el-option v-for="item in cvsGoodList" :key="item.id" :label="item.name" :value="item.id"/>
|
|
|
|
|
</el-select>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="" prop="supplierId">
|
|
|
|
|
<el-select
|
|
|
|
|
v-model="commodityForm.supplierId"
|
|
|
|
|
placeholder="请选择供应商名称"
|
|
|
|
|
clearable
|
|
|
|
|
>
|
|
|
|
|
<el-option v-for="item in supplierList" :key="item.id" :label="item.name" :value="item.id"/>
|
|
|
|
|
</el-select>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="">
|
|
|
|
|
<el-input v-model="commodityForm.remark" placeholder="请输入商品名称,拼音码,条形码等信息"></el-input>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item style="float: right;margin-right: 0px">
|
|
|
|
|
<el-button type="primary" icon="el-icon-search" @click="inquire()">搜索</el-button>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-form>
|
|
|
|
|
</el-header>
|
|
|
|
|
<el-main>
|
|
|
|
@ -235,8 +239,8 @@
|
|
|
|
|
</el-table-column>
|
|
|
|
|
|
|
|
|
|
<el-table-column label="商品名称" align="center" prop="name"/>
|
|
|
|
|
<el-table-column label="商品编码" align="center" prop="goodsNo"/>
|
|
|
|
|
<el-table-column label="分类名称" prop="cvsGoodId" align="center">
|
|
|
|
|
<!-- <el-table-column label="商品编码" align="center" prop="goodsNo"/>-->
|
|
|
|
|
<el-table-column label="品类名称" prop="cvsGoodId" align="center">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<span>{{ getName(cvsGoodList, scope.row.cvsGoodId) }}</span>
|
|
|
|
|
</template>
|
|
|
|
@ -247,15 +251,20 @@
|
|
|
|
|
<span>{{ getName(supplierList, scope.row.supplierId) }}</span>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column label="单位" align="center" prop="unit"/>
|
|
|
|
|
<el-table-column label="商品规格" align="center" prop="goodsSpecs">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<div>{{scope.row.goodsSpecs || '-'}}</div>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column label="单位" align="center" prop="unit"/>
|
|
|
|
|
<el-table-column label="当前库存" align="center" prop="stock"/>
|
|
|
|
|
</el-table>
|
|
|
|
|
|
|
|
|
|
</el-main>
|
|
|
|
|
</el-container>
|
|
|
|
|
<div slot="footer" class="dialog-footer">
|
|
|
|
|
<el-button type="primary" @click="addCommodity">确 定</el-button>
|
|
|
|
|
<div slot="footer" class="dialog-footer" style="text-align: center">
|
|
|
|
|
<el-button @click="cancel">取 消</el-button>
|
|
|
|
|
<el-button type="primary" @click="addCommodity">确 定</el-button>
|
|
|
|
|
</div>
|
|
|
|
|
</el-dialog>
|
|
|
|
|
|
|
|
|
@ -266,25 +275,24 @@
|
|
|
|
|
import {getAuditPremApi} from "@/api/oilConfig/staff";
|
|
|
|
|
import {BigNumber} from "bignumber.js";
|
|
|
|
|
import {listLJGoods} from "@/api/convenienceStore/ljgoods";
|
|
|
|
|
import {getName,parseTime} from "../../../utils/fuint";
|
|
|
|
|
import {selectParentById, selectTree} from "@/api/convenienceStore/goods";
|
|
|
|
|
import {parseTime} from "../../../utils/fuint";
|
|
|
|
|
import {selectTree} from "@/api/convenienceStore/goods";
|
|
|
|
|
import {listSupplier} from "@/api/convenienceStore/supplier";
|
|
|
|
|
import {
|
|
|
|
|
getInventoryDetailsPageApi,
|
|
|
|
|
auditInventoryApi,
|
|
|
|
|
batchProcessingApi,
|
|
|
|
|
delDetailsApi,
|
|
|
|
|
editInventoryApi,
|
|
|
|
|
addInventoryApi,
|
|
|
|
|
batchProcessingApi,
|
|
|
|
|
auditInventoryApi,
|
|
|
|
|
storageInventoryApi,
|
|
|
|
|
abolitionInventoryApi,
|
|
|
|
|
exportExcelApi, getSalesByMtInventoryApi
|
|
|
|
|
exportExcelApi,
|
|
|
|
|
getInventoryDetailsPageApi,
|
|
|
|
|
getSalesByMtInventoryApi,
|
|
|
|
|
storageInventoryApi
|
|
|
|
|
} from "@/api/convenienceStore/inventory";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
export default {
|
|
|
|
|
name: "details",
|
|
|
|
|
props:[
|
|
|
|
|
props: [
|
|
|
|
|
'PinventoryId',
|
|
|
|
|
'PorderNumber',
|
|
|
|
|
'PorderDate',
|
|
|
|
@ -295,7 +303,7 @@ export default {
|
|
|
|
|
return {
|
|
|
|
|
detailsList: [],
|
|
|
|
|
commodityList: [],
|
|
|
|
|
commodityForm:{
|
|
|
|
|
commodityForm: {
|
|
|
|
|
cvsGoodId: "",
|
|
|
|
|
cvsGood: "",
|
|
|
|
|
supplierId: "",
|
|
|
|
@ -304,44 +312,43 @@ export default {
|
|
|
|
|
remark: "",
|
|
|
|
|
page: 1,
|
|
|
|
|
pageSize: 10,
|
|
|
|
|
isRecovery:0,
|
|
|
|
|
isRecovery: 0,
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
inventoryForm: {
|
|
|
|
|
inventoryId:this.$props.PinventoryId,
|
|
|
|
|
id:this.$props.PinventoryId,
|
|
|
|
|
inventoryId: this.$props.PinventoryId,
|
|
|
|
|
id: this.$props.PinventoryId,
|
|
|
|
|
orderNumber: this.$props.PorderNumber,
|
|
|
|
|
approvalStatus: this.$props.PapprovalStatus,
|
|
|
|
|
orderDate: this.$props.PorderDate,
|
|
|
|
|
creataByName: this.$props.PcreataByName,
|
|
|
|
|
roductQuantity:0, // 商品数量
|
|
|
|
|
inventoryQuantity: 0 ,// 盘点数量
|
|
|
|
|
damageQuantity: 0 ,// 货损数量
|
|
|
|
|
roductQuantity: 0, // 商品数量
|
|
|
|
|
inventoryQuantity: 0,// 盘点数量
|
|
|
|
|
damageQuantity: 0,// 货损数量
|
|
|
|
|
inventoryDiscrepancy: 0,// 库存差异
|
|
|
|
|
profitLossAmount: 0// 盈亏总额
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
inventoryId : this.$props.PinventoryId,
|
|
|
|
|
|
|
|
|
|
inventoryId: this.$props.PinventoryId,
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 商品分类列表
|
|
|
|
|
cvsGoodList:[],
|
|
|
|
|
cvsGoodList: [],
|
|
|
|
|
// 供应商列表
|
|
|
|
|
supplierList:[],
|
|
|
|
|
supplierList: [],
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
state:this.$props.PapprovalStatus,
|
|
|
|
|
state: this.$props.PapprovalStatus,
|
|
|
|
|
|
|
|
|
|
saveFlag:false,
|
|
|
|
|
auditFlag:true,
|
|
|
|
|
voidFlag:true,
|
|
|
|
|
storageFlag:true,
|
|
|
|
|
multipleSelection:[], // 表格
|
|
|
|
|
saveFlag: false,
|
|
|
|
|
auditFlag: true,
|
|
|
|
|
voidFlag: true,
|
|
|
|
|
storageFlag: true,
|
|
|
|
|
multipleSelection: [], // 表格
|
|
|
|
|
|
|
|
|
|
// 弹出框标题
|
|
|
|
|
title:'选择商品',
|
|
|
|
|
title: '添加盘点商品',
|
|
|
|
|
// 显示搜索条件
|
|
|
|
|
showSearch: true,
|
|
|
|
|
disableInput: false, // 默认不禁用
|
|
|
|
@ -349,13 +356,13 @@ export default {
|
|
|
|
|
open: false,
|
|
|
|
|
// 总条数
|
|
|
|
|
total: 0,
|
|
|
|
|
|
|
|
|
|
numberInput: false,
|
|
|
|
|
// 查询参数
|
|
|
|
|
queryParams: {
|
|
|
|
|
// supplierId: '',
|
|
|
|
|
inventoryId: this.$props.PinventoryId,
|
|
|
|
|
page:null,
|
|
|
|
|
pageSize:null
|
|
|
|
|
page: null,
|
|
|
|
|
pageSize: null
|
|
|
|
|
},
|
|
|
|
|
// 遮罩层
|
|
|
|
|
loading: false,
|
|
|
|
@ -364,7 +371,7 @@ export default {
|
|
|
|
|
// 表单校验
|
|
|
|
|
rules: {
|
|
|
|
|
supplierName: [
|
|
|
|
|
{ required: true, message: "供应商名称不能为空", trigger: "blur" },
|
|
|
|
|
{required: true, message: "供应商名称不能为空", trigger: "blur"},
|
|
|
|
|
],
|
|
|
|
|
},
|
|
|
|
|
}
|
|
|
|
@ -383,23 +390,23 @@ export default {
|
|
|
|
|
// this.inventoryForm.approvalStatus = this.$props.PapprovalStatus
|
|
|
|
|
this.state = this.$props.PapprovalStatus
|
|
|
|
|
|
|
|
|
|
if ( this.state == null) {
|
|
|
|
|
if (this.state == null) {
|
|
|
|
|
this.state = 'await'
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (this.state=='await') {
|
|
|
|
|
if (this.state == 'await') {
|
|
|
|
|
this.numberInput = false
|
|
|
|
|
}else {
|
|
|
|
|
} else {
|
|
|
|
|
this.numberInput = true
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
console.log("this.inventoryForm",this.inventoryForm)
|
|
|
|
|
console.log("this.inventoryForm", this.inventoryForm)
|
|
|
|
|
if (this.inventoryForm.orderNumber == null) {
|
|
|
|
|
this.refresh();
|
|
|
|
|
}
|
|
|
|
|
if (this.inventoryForm.orderDate == null) {
|
|
|
|
|
this.inventoryForm.orderDate =new Date()
|
|
|
|
|
this.inventoryForm.orderDate = new Date()
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
this.getDetailsList();
|
|
|
|
@ -407,10 +414,14 @@ export default {
|
|
|
|
|
this.JudgmentButton();
|
|
|
|
|
},
|
|
|
|
|
methods: {
|
|
|
|
|
// 返回页面
|
|
|
|
|
cancelPurchase() {
|
|
|
|
|
this.$router.back()
|
|
|
|
|
},
|
|
|
|
|
parseTime,
|
|
|
|
|
getDetailsList() {
|
|
|
|
|
let this_ = this
|
|
|
|
|
getInventoryDetailsPageApi(this.queryParams).then(res=>{
|
|
|
|
|
getInventoryDetailsPageApi(this.queryParams).then(res => {
|
|
|
|
|
this_.detailsList = res.data.records;
|
|
|
|
|
this.total = res.data.total;
|
|
|
|
|
this.inventoryForm.productQuantity = res.data.total;
|
|
|
|
@ -419,7 +430,7 @@ export default {
|
|
|
|
|
},
|
|
|
|
|
getCommodityList() {
|
|
|
|
|
let this_ = this
|
|
|
|
|
listLJGoods(this_.commodityForm).then(res=>{
|
|
|
|
|
listLJGoods(this_.commodityForm).then(res => {
|
|
|
|
|
this_.commodityList = res.data.records;
|
|
|
|
|
this_.sumMethod(res.data.records);
|
|
|
|
|
// this.total = response.data.total;
|
|
|
|
@ -435,30 +446,27 @@ export default {
|
|
|
|
|
commodityDel(data) {
|
|
|
|
|
|
|
|
|
|
this.$confirm('确定删除?', '提示', {
|
|
|
|
|
confirmButtonText: '确定',
|
|
|
|
|
cancelButtonText: '取消',
|
|
|
|
|
type: 'warning'
|
|
|
|
|
}).then(() => {
|
|
|
|
|
if (data.id != null) {
|
|
|
|
|
delDetailsApi(data).then(res=>{
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
const index = this.detailsList.indexOf(data); // 查找要删除的对象的索引
|
|
|
|
|
if (index !== -1) {
|
|
|
|
|
this.detailsList.splice(index, 1); // 使用splice方法删除对象
|
|
|
|
|
}
|
|
|
|
|
this.inventoryForm.productQuantity--;
|
|
|
|
|
this.sumMethod(this.detailsList);
|
|
|
|
|
confirmButtonText: '确定',
|
|
|
|
|
cancelButtonText: '取消',
|
|
|
|
|
type: 'warning'
|
|
|
|
|
}).then(() => {
|
|
|
|
|
if (data.id != null) {
|
|
|
|
|
delDetailsApi(data).then(res => {
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
const index = this.detailsList.indexOf(data); // 查找要删除的对象的索引
|
|
|
|
|
if (index !== -1) {
|
|
|
|
|
this.detailsList.splice(index, 1); // 使用splice方法删除对象
|
|
|
|
|
}
|
|
|
|
|
this.inventoryForm.productQuantity--;
|
|
|
|
|
this.sumMethod(this.detailsList);
|
|
|
|
|
|
|
|
|
|
}).catch(() => {
|
|
|
|
|
this.$message({
|
|
|
|
|
type: 'info',
|
|
|
|
|
message: '已取消删除'
|
|
|
|
|
});
|
|
|
|
|
}).catch(() => {
|
|
|
|
|
this.$message({
|
|
|
|
|
type: 'info',
|
|
|
|
|
message: '已取消删除'
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
@ -468,7 +476,7 @@ export default {
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
// 改变数字时
|
|
|
|
|
change(data,flag) {
|
|
|
|
|
change(data, flag) {
|
|
|
|
|
let profitLossAmount = new BigNumber(data.profitLossAmount);
|
|
|
|
|
let inventoryDiscrepancy = new BigNumber(data.inventoryDiscrepancy);
|
|
|
|
|
let inventoryQuantity = new BigNumber(data.inventoryQuantity); //正常
|
|
|
|
@ -476,10 +484,10 @@ export default {
|
|
|
|
|
let purchasePrice = new BigNumber(data.purchasePrice);
|
|
|
|
|
let stock = new BigNumber(data.stock);
|
|
|
|
|
// 计算库存差异
|
|
|
|
|
console.log("inventoryQuantity",inventoryQuantity)
|
|
|
|
|
console.log("damageQuantity",damageQuantity)
|
|
|
|
|
console.log("stock",stock)
|
|
|
|
|
let addStocke = inventoryQuantity.minus(damageQuantity) // 正常减货损
|
|
|
|
|
console.log("inventoryQuantity", inventoryQuantity)
|
|
|
|
|
console.log("damageQuantity", damageQuantity)
|
|
|
|
|
console.log("stock", stock)
|
|
|
|
|
let addStocke = inventoryQuantity.minus(damageQuantity) // 正常减货损
|
|
|
|
|
// let addStocke = inventoryQuantity.plus(damageQuantity)
|
|
|
|
|
inventoryDiscrepancy = addStocke.minus(stock) //
|
|
|
|
|
// 计算盈亏金额
|
|
|
|
@ -490,8 +498,8 @@ export default {
|
|
|
|
|
|
|
|
|
|
// 计算盈亏
|
|
|
|
|
// 库存差异
|
|
|
|
|
let a = inventoryQuantity.minus(stock)
|
|
|
|
|
let b= a.minus(purchasePrice)
|
|
|
|
|
let a = inventoryQuantity.minus(stock)
|
|
|
|
|
let b = a.minus(purchasePrice)
|
|
|
|
|
// 盈亏金额
|
|
|
|
|
data.inventoryDiscrepancy = a.toNumber();
|
|
|
|
|
data.profitLossAmount = b.toNumber();
|
|
|
|
@ -508,42 +516,42 @@ export default {
|
|
|
|
|
// this_.inventoryForm.productQuantity = 0
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
this_.inventoryForm.productQuantity = data.length,
|
|
|
|
|
this_.inventoryForm.inventoryQuantity = new BigNumber(0),
|
|
|
|
|
this_.inventoryForm.damageQuantity = new BigNumber(0),
|
|
|
|
|
this_.inventoryForm.inventoryDiscrepancy = new BigNumber(0),
|
|
|
|
|
this_.inventoryForm.profitLossAmount = new BigNumber(0),
|
|
|
|
|
this_.inventoryForm.productQuantity = data.length,
|
|
|
|
|
this_.inventoryForm.inventoryQuantity = new BigNumber(0),
|
|
|
|
|
this_.inventoryForm.damageQuantity = new BigNumber(0),
|
|
|
|
|
this_.inventoryForm.inventoryDiscrepancy = new BigNumber(0),
|
|
|
|
|
this_.inventoryForm.profitLossAmount = new BigNumber(0),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
data.forEach(da => {
|
|
|
|
|
if (da.inventoryQuantity != null) {
|
|
|
|
|
data.forEach(da => {
|
|
|
|
|
if (da.inventoryQuantity != null) {
|
|
|
|
|
|
|
|
|
|
this_.inventoryForm.inventoryQuantity= this_.inventoryForm.inventoryQuantity.plus(da.inventoryQuantity)
|
|
|
|
|
}
|
|
|
|
|
if (da.inventoryDiscrepancy != null) {
|
|
|
|
|
this_.inventoryForm.inventoryDiscrepancy = this_.inventoryForm.inventoryDiscrepancy.plus(da.inventoryDiscrepancy)
|
|
|
|
|
}
|
|
|
|
|
if (da.profitLossAmount != null) {
|
|
|
|
|
this_.inventoryForm.profitLossAmount = this_.inventoryForm.profitLossAmount.plus(da.profitLossAmount)
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
this_.inventoryForm.inventoryQuantity = this_.inventoryForm.inventoryQuantity.plus(da.inventoryQuantity)
|
|
|
|
|
}
|
|
|
|
|
if (da.inventoryDiscrepancy != null) {
|
|
|
|
|
this_.inventoryForm.inventoryDiscrepancy = this_.inventoryForm.inventoryDiscrepancy.plus(da.inventoryDiscrepancy)
|
|
|
|
|
}
|
|
|
|
|
if (da.profitLossAmount != null) {
|
|
|
|
|
this_.inventoryForm.profitLossAmount = this_.inventoryForm.profitLossAmount.plus(da.profitLossAmount)
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
async addCommodity () {
|
|
|
|
|
async addCommodity() {
|
|
|
|
|
let this_ = this
|
|
|
|
|
let sum = 0;
|
|
|
|
|
|
|
|
|
|
for (const mul of this.multipleSelection) {
|
|
|
|
|
let flag = true;
|
|
|
|
|
this_.detailsList.forEach(det=>{
|
|
|
|
|
this_.detailsList.forEach(det => {
|
|
|
|
|
if (mul.id == det.goodsId) {
|
|
|
|
|
flag = false
|
|
|
|
|
sum++
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
if(flag) {
|
|
|
|
|
if (flag) {
|
|
|
|
|
let getPurchaseByTankIdData
|
|
|
|
|
await getSalesByMtInventoryApi({goodsId:mul.id}).then(res=>{
|
|
|
|
|
await getSalesByMtInventoryApi({goodsId: mul.id}).then(res => {
|
|
|
|
|
getPurchaseByTankIdData = res.data
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
@ -552,25 +560,25 @@ export default {
|
|
|
|
|
goodsId: mul.id,
|
|
|
|
|
commodityName: mul.name,
|
|
|
|
|
cvsGoodId: mul.cvsGoodId,
|
|
|
|
|
unit:mul.unit,
|
|
|
|
|
stock:mul.stock,
|
|
|
|
|
unit: mul.unit,
|
|
|
|
|
stock: mul.stock,
|
|
|
|
|
purchasePrice: mul.buyingPrice,
|
|
|
|
|
goodsNo:mul.goodsNo,
|
|
|
|
|
inventoryQuantity:1,
|
|
|
|
|
damageQuantity:0,
|
|
|
|
|
profitLossAmount:0, // 盈亏金额
|
|
|
|
|
inventoryDiscrepancy:0, // 库存差异
|
|
|
|
|
purchase:getPurchaseByTankIdData.purchase,
|
|
|
|
|
goodsSales:getPurchaseByTankIdData.goodsSales,
|
|
|
|
|
inventorySales:getPurchaseByTankIdData.inventorySales,
|
|
|
|
|
exchangeSales:getPurchaseByTankIdData.exchangeSales,
|
|
|
|
|
goodsNo: mul.goodsNo,
|
|
|
|
|
inventoryQuantity: 1,
|
|
|
|
|
damageQuantity: 0,
|
|
|
|
|
profitLossAmount: 0, // 盈亏金额
|
|
|
|
|
inventoryDiscrepancy: 0, // 库存差异
|
|
|
|
|
purchase: getPurchaseByTankIdData.purchase,
|
|
|
|
|
goodsSales: getPurchaseByTankIdData.goodsSales,
|
|
|
|
|
inventorySales: getPurchaseByTankIdData.inventorySales,
|
|
|
|
|
exchangeSales: getPurchaseByTankIdData.exchangeSales,
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
this_.detailsList.push(now)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if(sum>0) {
|
|
|
|
|
this.$modal.msgError("同一货损单不能有两件相同的商品,您选择了"+sum+"件相同的商品,已为您剔除");
|
|
|
|
|
if (sum > 0) {
|
|
|
|
|
this.$modal.msgError("同一货损单不能有两件相同的商品,您选择了" + sum + "件相同的商品,已为您剔除");
|
|
|
|
|
}
|
|
|
|
|
this_.open = false
|
|
|
|
|
|
|
|
|
@ -586,7 +594,7 @@ export default {
|
|
|
|
|
page: 1,
|
|
|
|
|
pageSize: 1000,
|
|
|
|
|
total: 0,
|
|
|
|
|
isRecovery:0,
|
|
|
|
|
isRecovery: 0,
|
|
|
|
|
}
|
|
|
|
|
this.commodityList = []
|
|
|
|
|
|
|
|
|
@ -595,7 +603,7 @@ export default {
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
// 查询搜索列表信息
|
|
|
|
|
getQueryList(){
|
|
|
|
|
getQueryList() {
|
|
|
|
|
selectTree().then(response => {
|
|
|
|
|
this.cvsGoodList = response.data.records
|
|
|
|
|
});
|
|
|
|
@ -616,43 +624,42 @@ export default {
|
|
|
|
|
let min = 100; // 最小的四位数是 1000
|
|
|
|
|
let max = 999; // 最大的四位数是 9999
|
|
|
|
|
let randomFourDigitNumber = Math.floor(Math.random() * (max - min + 1)) + min;
|
|
|
|
|
this.inventoryForm.orderNumber = timestamp+randomFourDigitNumber.toString();
|
|
|
|
|
this.inventoryForm.orderNumber = timestamp + randomFourDigitNumber.toString();
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 判断按钮是否可用
|
|
|
|
|
async JudgmentButton(){
|
|
|
|
|
async JudgmentButton() {
|
|
|
|
|
let judgmentPermissions1 = await this.judgmentPermissions("盘点商品审核");
|
|
|
|
|
if (judgmentPermissions1 > 0){
|
|
|
|
|
this.auditFlag=false,
|
|
|
|
|
this.voidFlag=false
|
|
|
|
|
if (judgmentPermissions1 > 0) {
|
|
|
|
|
this.auditFlag = false,
|
|
|
|
|
this.voidFlag = false
|
|
|
|
|
}
|
|
|
|
|
let judgmentPermissions2 = await this.judgmentPermissions("盘点商品入库");
|
|
|
|
|
if (judgmentPermissions2 > 0){
|
|
|
|
|
if (judgmentPermissions2 > 0) {
|
|
|
|
|
this.storageFlag = false
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
let judgmentPermissions3 = await this.judgmentPermissions("盘点商品废止");
|
|
|
|
|
if (judgmentPermissions3 > 0){
|
|
|
|
|
this.voidFlag=false
|
|
|
|
|
}else {
|
|
|
|
|
this.voidFlag=true
|
|
|
|
|
if (judgmentPermissions3 > 0) {
|
|
|
|
|
this.voidFlag = false
|
|
|
|
|
} else {
|
|
|
|
|
this.voidFlag = true
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
// 判断权限
|
|
|
|
|
async judgmentPermissions(data) {
|
|
|
|
|
let fil ={
|
|
|
|
|
auditPrem:data
|
|
|
|
|
let fil = {
|
|
|
|
|
auditPrem: data
|
|
|
|
|
}
|
|
|
|
|
return await getAuditPremApi(fil).then(res => {
|
|
|
|
|
return res.data
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
async save(flag){
|
|
|
|
|
async save(flag) {
|
|
|
|
|
let this_ = this
|
|
|
|
|
|
|
|
|
|
// 保存时修改退货单
|
|
|
|
@ -666,18 +673,18 @@ export default {
|
|
|
|
|
// roductQuantity:0, // 商品数量
|
|
|
|
|
// inventoryQuantity: 0 // 盘点数量
|
|
|
|
|
// },
|
|
|
|
|
if(this_.detailsList.length<=0) {
|
|
|
|
|
if (this_.detailsList.length <= 0) {
|
|
|
|
|
this.$modal.msgError("盘点单不能为空");
|
|
|
|
|
return -1;
|
|
|
|
|
}
|
|
|
|
|
await editInventoryApi(this.inventoryForm).then(res=>{
|
|
|
|
|
await editInventoryApi(this.inventoryForm).then(res => {
|
|
|
|
|
// 批量保存订单
|
|
|
|
|
batchProcessingApi(this_.detailsList).then(res=>{
|
|
|
|
|
batchProcessingApi(this_.detailsList).then(res => {
|
|
|
|
|
this.$modal.msgSuccess("保存成功");
|
|
|
|
|
if (flag != -1) {
|
|
|
|
|
this.goToAbout();
|
|
|
|
|
}
|
|
|
|
|
}).catch(res=>{
|
|
|
|
|
}).catch(res => {
|
|
|
|
|
this.$modal.msgError("保存失败");
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
@ -685,20 +692,20 @@ export default {
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
// 保存并审核
|
|
|
|
|
async audit(){
|
|
|
|
|
async audit() {
|
|
|
|
|
// 保存
|
|
|
|
|
let number = await this.save(-1);
|
|
|
|
|
if (number != -1) {
|
|
|
|
|
// 审核
|
|
|
|
|
let fil ={
|
|
|
|
|
let fil = {
|
|
|
|
|
id: this.inventoryId
|
|
|
|
|
}
|
|
|
|
|
console.log(" id: this.inventoryId",fil)
|
|
|
|
|
console.log(" id: this.inventoryId", fil)
|
|
|
|
|
await auditInventoryApi(fil).then(res => {
|
|
|
|
|
if (res.data) {
|
|
|
|
|
this.state = 'ysh'
|
|
|
|
|
this.$modal.msgWarning("审核成功");
|
|
|
|
|
}else {
|
|
|
|
|
} else {
|
|
|
|
|
this.$modal.msgWarning("暂无审核权限");
|
|
|
|
|
}
|
|
|
|
|
this.goToAbout()
|
|
|
|
@ -716,7 +723,7 @@ export default {
|
|
|
|
|
type: 'warning'
|
|
|
|
|
}).then(() => {
|
|
|
|
|
// 审核
|
|
|
|
|
let fil ={
|
|
|
|
|
let fil = {
|
|
|
|
|
id: this.inventoryId
|
|
|
|
|
}
|
|
|
|
|
storageInventoryApi(fil).then(res => {
|
|
|
|
@ -733,7 +740,7 @@ export default {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 作废
|
|
|
|
|
abolition(){
|
|
|
|
|
abolition() {
|
|
|
|
|
if (this.inventoryId < 0) {
|
|
|
|
|
this.$modal.msgWarning("数据未保存,不可废弃");
|
|
|
|
|
return;
|
|
|
|
@ -743,7 +750,7 @@ export default {
|
|
|
|
|
cancelButtonText: '取消',
|
|
|
|
|
type: 'warning'
|
|
|
|
|
}).then(() => {
|
|
|
|
|
let fil ={
|
|
|
|
|
let fil = {
|
|
|
|
|
id: this.inventoryId
|
|
|
|
|
}
|
|
|
|
|
abolitioninventoryApi(fil).then(res => {
|
|
|
|
@ -765,16 +772,16 @@ export default {
|
|
|
|
|
|
|
|
|
|
async exportExcel() {
|
|
|
|
|
|
|
|
|
|
let fil ={
|
|
|
|
|
let fil = {
|
|
|
|
|
inventoryId: this.inventoryId
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
exportExcelApi(fil).then(res=>{
|
|
|
|
|
console.log("res",res)
|
|
|
|
|
exportExcelApi(fil).then(res => {
|
|
|
|
|
console.log("res", res)
|
|
|
|
|
// this.downloadFile(res);
|
|
|
|
|
const blob = new Blob([res], { type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' });
|
|
|
|
|
const blob = new Blob([res], {type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'});
|
|
|
|
|
|
|
|
|
|
this.$download.saveAs(blob,this.inventoryForm.orderNumber+'.xlsx')
|
|
|
|
|
this.$download.saveAs(blob, this.inventoryForm.orderNumber + '.xlsx')
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
}
|
|
|
|
@ -782,19 +789,18 @@ export default {
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<style scoped lang="scss">
|
|
|
|
|
.app-container{
|
|
|
|
|
.app-container {
|
|
|
|
|
width: 100%;
|
|
|
|
|
height: 100%;
|
|
|
|
|
background: #f6f8f9;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* .underlined-text {
|
|
|
|
|
/* padding-bottom: 10px; /* 通过增加下边距来调整文本与下划线的间距 */
|
|
|
|
|
/* text-decoration: underline; 添加下划线 */
|
|
|
|
|
/* border-bottom: 1px solid; */
|
|
|
|
|
/* padding-bottom: 3px; */
|
|
|
|
|
/* text-decoration: underline; 添加下划线 */
|
|
|
|
|
/* border-bottom: 1px solid; */
|
|
|
|
|
/* padding-bottom: 3px; */
|
|
|
|
|
/* } */
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -817,8 +823,9 @@ export default {
|
|
|
|
|
/* text-decoration: underline; */
|
|
|
|
|
/* vertical-align: middle; */
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.box {
|
|
|
|
|
height: 100%;
|
|
|
|
|
height: 80%;
|
|
|
|
|
width: 212px;
|
|
|
|
|
margin-right: 10px;
|
|
|
|
|
background: #FFFFFF;
|
|
|
|
|