|
|
|
@ -1,30 +1,56 @@ |
|
|
|
<template> |
|
|
|
<template> |
|
|
|
<div> |
|
|
|
<div> |
|
|
|
<el-dialog :close-on-click-modal="false" :title="outDialogTiltle" :visible.sync="outDialogVisible" |
|
|
|
<el-dialog |
|
|
|
:append-to-body="true" @close="handleCloseDetail" fullscreen> |
|
|
|
:close-on-click-modal="false" |
|
|
|
|
|
|
|
:title="outDialogTiltle" |
|
|
|
|
|
|
|
:visible.sync="outDialogVisible" |
|
|
|
|
|
|
|
:append-to-body="true" |
|
|
|
|
|
|
|
@close="handleCloseDetail" |
|
|
|
|
|
|
|
fullscreen |
|
|
|
|
|
|
|
> |
|
|
|
<div class="dialog-content"> |
|
|
|
<div class="dialog-content"> |
|
|
|
<!-- 基本信息 --> |
|
|
|
<!-- 基本信息 --> |
|
|
|
<el-form :model="sizeForm" ref="dynamicValidateForm" label-width="100px" class="demo-dynamic" |
|
|
|
<el-form |
|
|
|
:rules="dynamicRules"> |
|
|
|
:model="sizeForm" |
|
|
|
|
|
|
|
ref="dynamicValidateForm" |
|
|
|
|
|
|
|
label-width="100px" |
|
|
|
|
|
|
|
class="demo-dynamic" |
|
|
|
|
|
|
|
:rules="dynamicRules" |
|
|
|
|
|
|
|
> |
|
|
|
<div class="form-title">基本信息</div> |
|
|
|
<div class="form-title">基本信息</div> |
|
|
|
<el-row> |
|
|
|
<el-row> |
|
|
|
<el-col :span="12"> |
|
|
|
<el-col :span="12"> |
|
|
|
<el-form-item label="出库申请时间"> |
|
|
|
<el-form-item label="出库申请时间"> |
|
|
|
<el-date-picker v-model="sizeForm.ldTwoOutStorage.outDate" type="date" placeholder="选择日期" |
|
|
|
<el-date-picker |
|
|
|
style="width: 100%" disabled> |
|
|
|
v-model="sizeForm.ldTwoOutStorage.outDate" |
|
|
|
|
|
|
|
type="date" |
|
|
|
|
|
|
|
placeholder="选择日期" |
|
|
|
|
|
|
|
style="width: 100%" |
|
|
|
|
|
|
|
disabled |
|
|
|
|
|
|
|
> |
|
|
|
</el-date-picker> |
|
|
|
</el-date-picker> |
|
|
|
</el-form-item> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
</el-col> |
|
|
|
<el-col :span="12"> |
|
|
|
<el-col :span="12"> |
|
|
|
<el-form-item label="事由" prop="ldTwoOutStorage.reason"> |
|
|
|
<el-form-item label="事由" prop="ldTwoOutStorage.reason"> |
|
|
|
<el-input v-model="sizeForm.ldTwoOutStorage.reason" :disabled="outDialogType != 'add'" |
|
|
|
<el-input |
|
|
|
placeholder="请输入"></el-input> |
|
|
|
v-model="sizeForm.ldTwoOutStorage.reason" |
|
|
|
|
|
|
|
:disabled="outDialogType != 'add'" |
|
|
|
|
|
|
|
placeholder="请输入" |
|
|
|
|
|
|
|
></el-input> |
|
|
|
</el-form-item> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
</el-col> |
|
|
|
<el-col :span="12"> |
|
|
|
<el-col :span="12"> |
|
|
|
<el-form-item label="物资类型" prop="ldTwoOutStorage.materialType"> |
|
|
|
<el-form-item |
|
|
|
<el-select v-model="sizeForm.ldTwoOutStorage.materialType" placeholder="请选择" style="width: 100%" |
|
|
|
label="物资类型" |
|
|
|
:disabled="outDialogType != 'add'"> |
|
|
|
prop="ldTwoOutStorage.materialType" |
|
|
|
|
|
|
|
> |
|
|
|
|
|
|
|
<el-select |
|
|
|
|
|
|
|
v-model="sizeForm.ldTwoOutStorage.materialType" |
|
|
|
|
|
|
|
placeholder="请选择" |
|
|
|
|
|
|
|
style="width: 100%" |
|
|
|
|
|
|
|
:disabled="outDialogType != 'add'" |
|
|
|
|
|
|
|
> |
|
|
|
<el-option label="办公室物资" value="1"></el-option> |
|
|
|
<el-option label="办公室物资" value="1"></el-option> |
|
|
|
<el-option label="其他物资" value="2"></el-option> |
|
|
|
<el-option label="其他物资" value="2"></el-option> |
|
|
|
</el-select> |
|
|
|
</el-select> |
|
|
|
@ -32,74 +58,119 @@ |
|
|
|
</el-col> |
|
|
|
</el-col> |
|
|
|
<el-col :span="12"> |
|
|
|
<el-col :span="12"> |
|
|
|
<el-form-item label="部门" prop="ldTwoOutStorage.departmentInfo"> |
|
|
|
<el-form-item label="部门" prop="ldTwoOutStorage.departmentInfo"> |
|
|
|
<el-select v-model="sizeForm.ldTwoOutStorage.departmentInfo" placeholder="请选择" style="width: 100%" |
|
|
|
<el-select |
|
|
|
:disabled="outDialogType != 'add'" @change="deptChange" clearable filterable value-key="departmentId"> |
|
|
|
v-model="sizeForm.ldTwoOutStorage.departmentInfo" |
|
|
|
<el-option v-for="item in departmentOptions" :key="item.departmentId" :label="item.department" |
|
|
|
placeholder="请选择" |
|
|
|
:value="item"></el-option> |
|
|
|
style="width: 100%" |
|
|
|
|
|
|
|
:disabled="outDialogType != 'add'" |
|
|
|
|
|
|
|
@change="deptChange" |
|
|
|
|
|
|
|
clearable |
|
|
|
|
|
|
|
filterable |
|
|
|
|
|
|
|
value-key="departmentId" |
|
|
|
|
|
|
|
> |
|
|
|
|
|
|
|
<el-option |
|
|
|
|
|
|
|
v-for="item in departmentOptions" |
|
|
|
|
|
|
|
:key="item.departmentId" |
|
|
|
|
|
|
|
:label="item.department" |
|
|
|
|
|
|
|
:value="item" |
|
|
|
|
|
|
|
></el-option> |
|
|
|
</el-select> |
|
|
|
</el-select> |
|
|
|
</el-form-item> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
</el-col> |
|
|
|
<el-col :span="12"> |
|
|
|
<el-col :span="12"> |
|
|
|
<el-form-item label="领用人" prop="ldTwoOutStorage.proposerInfo"> |
|
|
|
<el-form-item label="领用人" prop="ldTwoOutStorage.proposerInfo"> |
|
|
|
<el-select v-model="sizeForm.ldTwoOutStorage.proposerInfo" placeholder="请选择" style="width: 100%" |
|
|
|
<el-select |
|
|
|
:disabled="sizeForm.departmentId == '' || outDialogType == 'details' |
|
|
|
v-model="sizeForm.ldTwoOutStorage.proposerInfo" |
|
|
|
" clearable filterable value-key="userId" @change="proposerChange"> |
|
|
|
placeholder="请选择" |
|
|
|
<el-option v-for="item in userOptions" :key="item.userId" :label="item.name" :value="item"> |
|
|
|
style="width: 100%" |
|
|
|
|
|
|
|
:disabled=" |
|
|
|
|
|
|
|
sizeForm.departmentId == '' || outDialogType == 'details' |
|
|
|
|
|
|
|
" |
|
|
|
|
|
|
|
clearable |
|
|
|
|
|
|
|
filterable |
|
|
|
|
|
|
|
value-key="userId" |
|
|
|
|
|
|
|
@change="proposerChange" |
|
|
|
|
|
|
|
> |
|
|
|
|
|
|
|
<el-option |
|
|
|
|
|
|
|
v-for="item in userOptions" |
|
|
|
|
|
|
|
:key="item.userId" |
|
|
|
|
|
|
|
:label="item.name" |
|
|
|
|
|
|
|
:value="item" |
|
|
|
|
|
|
|
> |
|
|
|
</el-option> |
|
|
|
</el-option> |
|
|
|
</el-select> |
|
|
|
</el-select> |
|
|
|
</el-form-item> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
</el-col> |
|
|
|
<el-col :span="12" v-if="outDialogType == 'details'"> |
|
|
|
<el-col :span="12" v-if="outDialogType == 'details'"> |
|
|
|
<el-form-item label="填报人"> |
|
|
|
<el-form-item label="填报人"> |
|
|
|
<el-input v-model="sizeForm.ldTwoOutStorage.shipperName" :disabled="outDialogType != 'add'"></el-input> |
|
|
|
<el-input |
|
|
|
|
|
|
|
v-model="sizeForm.ldTwoOutStorage.shipperName" |
|
|
|
|
|
|
|
:disabled="outDialogType != 'add'" |
|
|
|
|
|
|
|
></el-input> |
|
|
|
</el-form-item> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
</el-col> |
|
|
|
</el-row> |
|
|
|
</el-row> |
|
|
|
<div class="form-title">{{ outDateInfo }} 出库信息:</div> |
|
|
|
<div class="form-title">{{ outDateInfo }} 出库信息:</div> |
|
|
|
<!-- <el-button |
|
|
|
|
|
|
|
|
|
|
|
<el-button |
|
|
|
type="primary" |
|
|
|
type="primary" |
|
|
|
size="mini" |
|
|
|
size="mini" |
|
|
|
style="margin-bottom: 18px" |
|
|
|
style="margin-bottom: 18px" |
|
|
|
@click="inTableAdd()" |
|
|
|
@click="categoryHandle" |
|
|
|
v-if="outDialogType != 'details'" |
|
|
|
v-if="outDialogType != 'details'" |
|
|
|
>新增</el-button |
|
|
|
>新增</el-button |
|
|
|
> --> |
|
|
|
> |
|
|
|
<el-button type="primary" size="mini" style="margin-bottom: 18px" @click="categoryHandle" |
|
|
|
<el-table |
|
|
|
v-if="outDialogType != 'details'">新增</el-button> |
|
|
|
:data="sizeForm.ldTwoOutStorageDetailList" |
|
|
|
<el-table :data="sizeForm.ldTwoOutStorageDetailList" border style="width: 100%"> |
|
|
|
border |
|
|
|
|
|
|
|
style="width: 100%" |
|
|
|
|
|
|
|
> |
|
|
|
<el-table-column prop="materialCode" label="物资编码"> |
|
|
|
<el-table-column prop="materialCode" label="物资编码"> |
|
|
|
</el-table-column> |
|
|
|
</el-table-column> |
|
|
|
<!-- <el-table-column prop="str2" label="物资名称"> |
|
|
|
|
|
|
|
<template slot-scope="scope"> |
|
|
|
<el-table-column |
|
|
|
<el-select v-model="scope.row.materialitem" placeholder="请选择物资名称" style="width: 100%" @change=" |
|
|
|
prop="materialName" |
|
|
|
handleMaterialChange(scope.row.materialitem, scope.$index) |
|
|
|
label="物资名称" |
|
|
|
" v-if="outDialogType != 'details'" value-key="id"> |
|
|
|
></el-table-column> |
|
|
|
<el-option v-for="item in materials" :key="item.materialId" :label="item.materialName" :value="item"> |
|
|
|
|
|
|
|
</el-option> |
|
|
|
|
|
|
|
</el-select> |
|
|
|
|
|
|
|
<span v-else> {{ scope.row.materialName }}</span> |
|
|
|
|
|
|
|
</template> |
|
|
|
|
|
|
|
</el-table-column> --> |
|
|
|
|
|
|
|
<el-table-column prop="materialName" label="物资名称"></el-table-column> |
|
|
|
|
|
|
|
<el-table-column prop="model" label="规格/型号"> </el-table-column> |
|
|
|
<el-table-column prop="model" label="规格/型号"> </el-table-column> |
|
|
|
<!-- <el-table-column prop="type" label="类别"> </el-table-column> --> |
|
|
|
|
|
|
|
<el-table-column prop="type" label="类别"> |
|
|
|
<el-table-column prop="type" label="类别"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
{{ scope.row.type === "NY" ? "耐用品" : (scope.row.type === "YH" ? "易耗品" : "") }} |
|
|
|
{{ |
|
|
|
|
|
|
|
scope.row.type === "NY" |
|
|
|
|
|
|
|
? "耐用品" |
|
|
|
|
|
|
|
: scope.row.type === "YH" |
|
|
|
|
|
|
|
? "易耗品" |
|
|
|
|
|
|
|
: "" |
|
|
|
|
|
|
|
}} |
|
|
|
</template> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column prop="unit" label="单位"> </el-table-column> |
|
|
|
<el-table-column prop="unit" label="单位"> </el-table-column> |
|
|
|
<el-table-column prop="num" label="数量"> |
|
|
|
<el-table-column prop="num" label="数量"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<el-input-number size="mini" v-model="scope.row.num" :min="1" style="width: 100%" |
|
|
|
<el-input-number |
|
|
|
|
|
|
|
size="mini" |
|
|
|
|
|
|
|
v-model="scope.row.num" |
|
|
|
|
|
|
|
:min="0" |
|
|
|
|
|
|
|
style="width: 100%" |
|
|
|
:disabled="outDialogType != 'add' || scope.row.type === 'NY'" |
|
|
|
:disabled="outDialogType != 'add' || scope.row.type === 'NY'" |
|
|
|
@change="(newValue) => handleQuantityChange(newValue, scope.$index)"></el-input-number> |
|
|
|
@change=" |
|
|
|
|
|
|
|
(newValue) => handleQuantityChange(newValue, scope.$index) |
|
|
|
|
|
|
|
" |
|
|
|
|
|
|
|
></el-input-number> |
|
|
|
</template> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column label="操作" style="text-align: center;" v-if="outDialogType != 'details'"> |
|
|
|
<el-table-column |
|
|
|
|
|
|
|
label="操作" |
|
|
|
|
|
|
|
width="100" |
|
|
|
|
|
|
|
v-if="outDialogType != 'details'" |
|
|
|
|
|
|
|
> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<div style="text-align: center;" :disabled="outDialogType == 'details'"> |
|
|
|
<div :disabled="outDialogType == 'details'"> |
|
|
|
<el-button type="text" size="mini" @click="handleDelete(scope.$index, scope.row)"> |
|
|
|
<el-button |
|
|
|
|
|
|
|
type="text" |
|
|
|
|
|
|
|
size="mini" |
|
|
|
|
|
|
|
@click="handleDelete(scope.$index, scope.row)" |
|
|
|
|
|
|
|
> |
|
|
|
删除 |
|
|
|
删除 |
|
|
|
</el-button> |
|
|
|
</el-button> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
@ -109,7 +180,12 @@ |
|
|
|
<div class="form-title" v-if="outDialogType != 'details'"> |
|
|
|
<div class="form-title" v-if="outDialogType != 'details'"> |
|
|
|
出库账目表格: |
|
|
|
出库账目表格: |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<el-table :data="sizeForm.inAccountsTableData" border style="width: 100%" v-if="outDialogType != 'details'"> |
|
|
|
<el-table |
|
|
|
|
|
|
|
:data="statisticsList" |
|
|
|
|
|
|
|
border |
|
|
|
|
|
|
|
style="width: 100%" |
|
|
|
|
|
|
|
v-if="outDialogType != 'details'" |
|
|
|
|
|
|
|
> |
|
|
|
<el-table-column prop="date" label="当前库存"> |
|
|
|
<el-table-column prop="date" label="当前库存"> |
|
|
|
<el-table-column prop="materialCode" label="编码"> |
|
|
|
<el-table-column prop="materialCode" label="编码"> |
|
|
|
</el-table-column> |
|
|
|
</el-table-column> |
|
|
|
@ -118,13 +194,29 @@ |
|
|
|
<el-table-column prop="model" label="规格"> </el-table-column> |
|
|
|
<el-table-column prop="model" label="规格"> </el-table-column> |
|
|
|
<el-table-column prop="type" label="类别"> </el-table-column> |
|
|
|
<el-table-column prop="type" label="类别"> </el-table-column> |
|
|
|
<el-table-column prop="unit" label="单位"> </el-table-column> |
|
|
|
<el-table-column prop="unit" label="单位"> </el-table-column> |
|
|
|
<el-table-column prop="oldNum" label="数量"> </el-table-column> |
|
|
|
<el-table-column prop="num" label="数量"> </el-table-column> |
|
|
|
</el-table-column> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column prop="date" label="出库信息"> |
|
|
|
<el-table-column prop="date" label="出库信息"> |
|
|
|
<el-table-column prop="num" label="数量"> </el-table-column> |
|
|
|
<el-table-column prop="theOutboundQuantity" label="数量"> </el-table-column> |
|
|
|
</el-table-column> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column prop="date" label="出库后库存"> |
|
|
|
<el-table-column prop="date" label="出库后库存"> |
|
|
|
<el-table-column prop="newNum" label="数量"> </el-table-column> |
|
|
|
<el-table-column prop="totalQuantity" label="数量"> </el-table-column> |
|
|
|
|
|
|
|
</el-table-column> |
|
|
|
|
|
|
|
<el-table-column prop="date" label="出库信息"> |
|
|
|
|
|
|
|
<el-table-column label="出库人"> |
|
|
|
|
|
|
|
<template slot-scope="scope"> |
|
|
|
|
|
|
|
{{ |
|
|
|
|
|
|
|
scope.row.userInfoVO |
|
|
|
|
|
|
|
? scope.row.userInfoVO.name |
|
|
|
|
|
|
|
: sizeForm.userInfoVO.name |
|
|
|
|
|
|
|
}} |
|
|
|
|
|
|
|
</template> |
|
|
|
|
|
|
|
</el-table-column> |
|
|
|
|
|
|
|
<el-table-column prop="outDateInfo" label="出库时间" width="150"> |
|
|
|
|
|
|
|
<template slot-scope="scope"> |
|
|
|
|
|
|
|
{{ outDateInfo }} |
|
|
|
|
|
|
|
</template> |
|
|
|
|
|
|
|
</el-table-column> |
|
|
|
</el-table-column> |
|
|
|
</el-table-column> |
|
|
|
</el-table> |
|
|
|
</el-table> |
|
|
|
</el-form> |
|
|
|
</el-form> |
|
|
|
@ -132,26 +224,39 @@ |
|
|
|
|
|
|
|
|
|
|
|
<span slot="footer" class="dialog-footer"> |
|
|
|
<span slot="footer" class="dialog-footer"> |
|
|
|
<el-button @click="handleCloseDetail()">取 消</el-button> |
|
|
|
<el-button @click="handleCloseDetail()">取 消</el-button> |
|
|
|
<el-button v-if="outDialogType != 'details'" type="primary" @click="sumbit()">确 定</el-button> |
|
|
|
<el-button |
|
|
|
|
|
|
|
v-if="outDialogType != 'details'" |
|
|
|
|
|
|
|
type="primary" |
|
|
|
|
|
|
|
@click="sumbit()" |
|
|
|
|
|
|
|
>确 定</el-button |
|
|
|
|
|
|
|
> |
|
|
|
</span> |
|
|
|
</span> |
|
|
|
</el-dialog> |
|
|
|
</el-dialog> |
|
|
|
<categoryDialog v-if="categoryVisible" :categoryVisible='categoryVisible' :selectionData="selectionData" |
|
|
|
<!-- 新增数据 --> |
|
|
|
:departmentId="sizeForm.ldTwoOutStorage.departmentId" :categoryDialogTitle="categoryDialogTitle" |
|
|
|
<categoryDialog |
|
|
|
@confirm="confirm" @handleCloseDetail="closeDialog"></categoryDialog> |
|
|
|
v-if="categoryVisible" |
|
|
|
|
|
|
|
:categoryVisible="categoryVisible" |
|
|
|
|
|
|
|
:selectionData="selectionData" |
|
|
|
|
|
|
|
:departmentId="sizeForm.ldTwoOutStorage.departmentId" |
|
|
|
|
|
|
|
:categoryDialogTitle="categoryDialogTitle" |
|
|
|
|
|
|
|
@confirm="confirm" |
|
|
|
|
|
|
|
@categoryClose="categoryClose" |
|
|
|
|
|
|
|
></categoryDialog> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</template> |
|
|
|
</template> |
|
|
|
<script> |
|
|
|
<script> |
|
|
|
import { getDetailedItems } from "@/api/firstOrder/outbound"; |
|
|
|
import { getDetailedItems } from "@/api/firstOrder/outbound"; |
|
|
|
import categoryDialog from './categoryDialog.vue' |
|
|
|
import categoryDialog from "./categoryDialog.vue"; |
|
|
|
import { |
|
|
|
import { |
|
|
|
getUserList, |
|
|
|
getUserList, |
|
|
|
getMaterialList, |
|
|
|
getMaterialList, |
|
|
|
submit, |
|
|
|
submit, |
|
|
|
getDetails, |
|
|
|
getDetails, |
|
|
|
|
|
|
|
getStatistics, |
|
|
|
} from "@/api/secondOrder/outbound"; |
|
|
|
} from "@/api/secondOrder/outbound"; |
|
|
|
export default { |
|
|
|
export default { |
|
|
|
components: { |
|
|
|
components: { |
|
|
|
categoryDialog |
|
|
|
categoryDialog, |
|
|
|
}, |
|
|
|
}, |
|
|
|
props: { |
|
|
|
props: { |
|
|
|
repairVisible: { |
|
|
|
repairVisible: { |
|
|
|
@ -200,9 +305,9 @@ export default { |
|
|
|
return { |
|
|
|
return { |
|
|
|
outDialogVisible: false, |
|
|
|
outDialogVisible: false, |
|
|
|
categoryVisible: false, |
|
|
|
categoryVisible: false, |
|
|
|
categoryDialogTitle: '出库', |
|
|
|
categoryDialogTitle: "出库", |
|
|
|
allSelectedList:[], |
|
|
|
allSelectedList: [], |
|
|
|
selectionData:[], |
|
|
|
selectionData: [], |
|
|
|
sizeForm: { |
|
|
|
sizeForm: { |
|
|
|
ldTwoOutStorage: { |
|
|
|
ldTwoOutStorage: { |
|
|
|
outDate: "", |
|
|
|
outDate: "", |
|
|
|
@ -215,7 +320,7 @@ export default { |
|
|
|
submitName: "", //填报人 |
|
|
|
submitName: "", //填报人 |
|
|
|
departmentInfo: null, |
|
|
|
departmentInfo: null, |
|
|
|
proposerInfo: null, |
|
|
|
proposerInfo: null, |
|
|
|
optionType: 'YH' |
|
|
|
optionType: "YH", |
|
|
|
}, |
|
|
|
}, |
|
|
|
ldTwoOutStorageDetailList: [], //出库单详情 |
|
|
|
ldTwoOutStorageDetailList: [], //出库单详情 |
|
|
|
inAccountsTableData: [], //库存汇总 |
|
|
|
inAccountsTableData: [], //库存汇总 |
|
|
|
@ -265,6 +370,7 @@ export default { |
|
|
|
userOptions: [], //领用人列表 |
|
|
|
userOptions: [], //领用人列表 |
|
|
|
departmentOptions: [], //部门列表 |
|
|
|
departmentOptions: [], //部门列表 |
|
|
|
dynamicRules: {}, // 动态校验规则 |
|
|
|
dynamicRules: {}, // 动态校验规则 |
|
|
|
|
|
|
|
statisticsList: [], //批量更改后的明细数据 |
|
|
|
}; |
|
|
|
}; |
|
|
|
}, |
|
|
|
}, |
|
|
|
mounted() { |
|
|
|
mounted() { |
|
|
|
@ -278,54 +384,67 @@ export default { |
|
|
|
this.getDetailedItems(); |
|
|
|
this.getDetailedItems(); |
|
|
|
}, |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
methods: { |
|
|
|
|
|
|
|
// 批量 更改明细表数据 |
|
|
|
|
|
|
|
getStatistics() { |
|
|
|
|
|
|
|
getStatistics(this.sizeForm.ldTwoOutStorageDetailList).then((res) => { |
|
|
|
|
|
|
|
this.statisticsList = res.data.result; |
|
|
|
|
|
|
|
this.statisticsList = this.statisticsList.map((stat) => { |
|
|
|
|
|
|
|
const detail = this.sizeForm.ldTwoOutStorageDetailList.find( |
|
|
|
|
|
|
|
(item) => item.materialCode === stat.materialCode |
|
|
|
|
|
|
|
); |
|
|
|
|
|
|
|
return { |
|
|
|
|
|
|
|
...stat, |
|
|
|
|
|
|
|
theOutboundQuantity: detail.num||0, //本次入库数量 |
|
|
|
|
|
|
|
unitPrice: detail.unitPrice, |
|
|
|
|
|
|
|
totalQuantity: stat.num - detail.num, |
|
|
|
|
|
|
|
}; |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
categoryHandle() { |
|
|
|
categoryHandle() { |
|
|
|
this.categoryVisible = true |
|
|
|
|
|
|
|
|
|
|
|
if((!this.sizeForm.ldTwoOutStorage.proposerInfo)||(!this.sizeForm.ldTwoOutStorage.departmentInfo)){ |
|
|
|
|
|
|
|
this.$message.error('请先选择部门和领用人'); |
|
|
|
|
|
|
|
return false |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
this.categoryVisible = true; |
|
|
|
}, |
|
|
|
}, |
|
|
|
confirm(allSelectedList) { |
|
|
|
confirm(allSelectedList) { |
|
|
|
console.log('allSelectedList-------',allSelectedList) |
|
|
|
console.log("allSelectedList-------", allSelectedList); |
|
|
|
// this.selectionData = allSelectedList |
|
|
|
// this.selectionData = allSelectedList |
|
|
|
allSelectedList.map(item =>{ |
|
|
|
allSelectedList.map((item) => { |
|
|
|
this.selectionData.push(item) |
|
|
|
this.selectionData.push(item); |
|
|
|
}) |
|
|
|
}); |
|
|
|
this.categoryVisible = false; |
|
|
|
this.categoryVisible = false; |
|
|
|
// 去重:过滤已存在的物资 |
|
|
|
// 去重:过滤已存在的物资 |
|
|
|
const newItems = allSelectedList.filter(newItem => |
|
|
|
const newItems = allSelectedList.filter( |
|
|
|
|
|
|
|
(newItem) => |
|
|
|
!this.sizeForm.ldTwoOutStorageDetailList.some( |
|
|
|
!this.sizeForm.ldTwoOutStorageDetailList.some( |
|
|
|
oldItem => oldItem.id === newItem.id |
|
|
|
(oldItem) => oldItem.id === newItem.id |
|
|
|
) |
|
|
|
) |
|
|
|
); |
|
|
|
); |
|
|
|
// 追加数据 |
|
|
|
// 追加数据 |
|
|
|
this.sizeForm.ldTwoOutStorageDetailList = [ |
|
|
|
this.sizeForm.ldTwoOutStorageDetailList = allSelectedList; |
|
|
|
...this.sizeForm.ldTwoOutStorageDetailList, |
|
|
|
console.log( |
|
|
|
...newItems |
|
|
|
"ldTwoOutStorageDetailList--------", |
|
|
|
]; |
|
|
|
this.sizeForm.ldTwoOutStorageDetailList |
|
|
|
console.log('ldTwoOutStorageDetailList--------',this.sizeForm.ldTwoOutStorageDetailList) |
|
|
|
); |
|
|
|
// 同步库存汇总表 |
|
|
|
// 同步库存汇总表 |
|
|
|
this.summaryTableData(); |
|
|
|
// this.summaryTableData(); |
|
|
|
}, |
|
|
|
this.getStatistics(); |
|
|
|
categoryHandle() { |
|
|
|
|
|
|
|
this.categoryVisible = true; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}, |
|
|
|
}, |
|
|
|
// 删除表格行数据 |
|
|
|
// 删除表格行数据 |
|
|
|
handleDelete(index, row) { |
|
|
|
handleDelete(index, row) { |
|
|
|
this.sizeForm.ldTwoOutStorageDetailList.splice(index, 1) |
|
|
|
this.sizeForm.ldTwoOutStorageDetailList.splice(index, 1); |
|
|
|
|
|
|
|
this.getStatistics() |
|
|
|
}, |
|
|
|
}, |
|
|
|
// 初始化 汇总库存 inAccountsTableData |
|
|
|
// 初始化 汇总库存 inAccountsTableData |
|
|
|
summaryTableData() { |
|
|
|
summaryTableData() { |
|
|
|
this.sizeForm.inAccountsTableData = JSON.parse(JSON.stringify(this.sizeForm.ldTwoOutStorageDetailList)) |
|
|
|
this.sizeForm.inAccountsTableData = JSON.parse( |
|
|
|
}, |
|
|
|
JSON.stringify(this.sizeForm.ldTwoOutStorageDetailList) |
|
|
|
// handleQuantityChange(newValue, index) { |
|
|
|
); |
|
|
|
// const currentRow = this.sizeForm.ldTwoOutStorageDetailList[index]; |
|
|
|
}, |
|
|
|
// console.log(currentRow,'c') |
|
|
|
|
|
|
|
// if (currentRow.materialCode != '') { |
|
|
|
|
|
|
|
// currentRow.oldNum = currentRow.materialitem.num |
|
|
|
|
|
|
|
// currentRow.num = currentRow.num |
|
|
|
|
|
|
|
// currentRow.newNum = currentRow.materialitem.num - currentRow.num |
|
|
|
|
|
|
|
// } |
|
|
|
|
|
|
|
// this.$set(this.sizeForm.inAccountsTableData, index, currentRow) |
|
|
|
|
|
|
|
// this.sizeForm.inAccountsTableData[index] = currentRow |
|
|
|
|
|
|
|
// }, |
|
|
|
|
|
|
|
handleQuantityChange(newValue, index) { |
|
|
|
handleQuantityChange(newValue, index) { |
|
|
|
const currentRow = this.sizeForm.ldTwoOutStorageDetailList[index]; |
|
|
|
const currentRow = this.sizeForm.ldTwoOutStorageDetailList[index]; |
|
|
|
if (!currentRow) return; |
|
|
|
if (!currentRow) return; |
|
|
|
@ -335,12 +454,13 @@ export default { |
|
|
|
this.$set(this.sizeForm.inAccountsTableData, index, { ...currentRow }); |
|
|
|
this.$set(this.sizeForm.inAccountsTableData, index, { ...currentRow }); |
|
|
|
return; |
|
|
|
return; |
|
|
|
} |
|
|
|
} |
|
|
|
const stockNum = currentRow.num // 原始库存数量 |
|
|
|
const stockNum = currentRow.num; // 原始库存数量 |
|
|
|
currentRow.oldNum = stockNum // 出库前库存 |
|
|
|
currentRow.oldNum = stockNum; // 出库前库存 |
|
|
|
currentRow.num = newValue // 出库数量 |
|
|
|
currentRow.num = newValue; // 出库数量 |
|
|
|
currentRow.newNum = stockNum - newValue // 出库后库存 |
|
|
|
currentRow.newNum = stockNum - newValue; // 出库后库存 |
|
|
|
this.$set(this.sizeForm.ldTwoOutStorageDetailList, index, currentRow) |
|
|
|
this.$set(this.sizeForm.ldTwoOutStorageDetailList, index, currentRow); |
|
|
|
this.$set(this.sizeForm.inAccountsTableData, index, { ...currentRow }) |
|
|
|
this.$set(this.sizeForm.inAccountsTableData, index, { ...currentRow }); |
|
|
|
|
|
|
|
this.getStatistics() |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
// 更新全局总计 |
|
|
|
// 更新全局总计 |
|
|
|
@ -364,8 +484,6 @@ export default { |
|
|
|
row.materialName; |
|
|
|
row.materialName; |
|
|
|
this.sizeForm.ldTwoOutStorageDetailList[index].type = row.type; |
|
|
|
this.sizeForm.ldTwoOutStorageDetailList[index].type = row.type; |
|
|
|
this.sizeForm.ldTwoOutStorageDetailList[index].unit = row.unit; |
|
|
|
this.sizeForm.ldTwoOutStorageDetailList[index].unit = row.unit; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}, |
|
|
|
}, |
|
|
|
// 获取领用人列表 |
|
|
|
// 获取领用人列表 |
|
|
|
getUserList(value) { |
|
|
|
getUserList(value) { |
|
|
|
@ -393,7 +511,7 @@ export default { |
|
|
|
this.sizeForm.ldTwoOutStorage.department = value.department; |
|
|
|
this.sizeForm.ldTwoOutStorage.department = value.department; |
|
|
|
this.getUserList(value.departmentId); |
|
|
|
this.getUserList(value.departmentId); |
|
|
|
this.getMaterialList(value.departmentId); |
|
|
|
this.getMaterialList(value.departmentId); |
|
|
|
this.sizeForm.ldTwoOutStorageDetailList = [] |
|
|
|
this.sizeForm.ldTwoOutStorageDetailList = []; |
|
|
|
}, |
|
|
|
}, |
|
|
|
// 领用人选中 |
|
|
|
// 领用人选中 |
|
|
|
proposerChange(value) { |
|
|
|
proposerChange(value) { |
|
|
|
@ -403,6 +521,7 @@ export default { |
|
|
|
}, |
|
|
|
}, |
|
|
|
handleCloseDetail() { |
|
|
|
handleCloseDetail() { |
|
|
|
this.outDialogVisible = false; |
|
|
|
this.outDialogVisible = false; |
|
|
|
|
|
|
|
<<<<<<< HEAD |
|
|
|
|
|
|
|
|
|
|
|
this.$emit("handleCloseDetail"); |
|
|
|
this.$emit("handleCloseDetail"); |
|
|
|
}, |
|
|
|
}, |
|
|
|
@ -410,6 +529,15 @@ export default { |
|
|
|
closeDialog() { |
|
|
|
closeDialog() { |
|
|
|
this.categoryVisible = false |
|
|
|
this.categoryVisible = false |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
======= |
|
|
|
|
|
|
|
this.$emit("handleCloseDetail"); |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
categoryClose() { |
|
|
|
|
|
|
|
this.categoryVisible = false; |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
>>>>>>> 94e2170923f61585374217a741bc58b7f0790b1e |
|
|
|
inInit() { |
|
|
|
inInit() { |
|
|
|
if (this.outDialogType != "add") { |
|
|
|
if (this.outDialogType != "add") { |
|
|
|
getDetails({ twoOutStorageId: this.rowData.id }).then((res) => { |
|
|
|
getDetails({ twoOutStorageId: this.rowData.id }).then((res) => { |
|
|
|
@ -439,7 +567,7 @@ export default { |
|
|
|
// 添加入库数据 ,点击新增 |
|
|
|
// 添加入库数据 ,点击新增 |
|
|
|
inTableAdd() { |
|
|
|
inTableAdd() { |
|
|
|
this.sizeForm.ldTwoOutStorageDetailList.push({}); |
|
|
|
this.sizeForm.ldTwoOutStorageDetailList.push({}); |
|
|
|
this.summaryTableData() |
|
|
|
this.summaryTableData(); |
|
|
|
}, |
|
|
|
}, |
|
|
|
// 提交 |
|
|
|
// 提交 |
|
|
|
sumbit() { |
|
|
|
sumbit() { |
|
|
|
|