|
|
|
|
@ -5,168 +5,42 @@ |
|
|
|
|
:title="outDialogTiltle" |
|
|
|
|
:visible.sync="outDialogVisible" |
|
|
|
|
:append-to-body="true" |
|
|
|
|
width="70%" |
|
|
|
|
@close="handleCloseDetail" |
|
|
|
|
fullscreen |
|
|
|
|
> |
|
|
|
|
<!-- 基本信息 --> |
|
|
|
|
<el-form |
|
|
|
|
:model="sizeForm" |
|
|
|
|
ref="dynamicValidateForm" |
|
|
|
|
label-width="100px" |
|
|
|
|
class="demo-dynamic" |
|
|
|
|
> |
|
|
|
|
<div class="form-title">基本信息</div> |
|
|
|
|
<el-row> |
|
|
|
|
<el-col :span="12"> |
|
|
|
|
<el-form-item label="仓库名称"> |
|
|
|
|
<el-input |
|
|
|
|
v-model="sizeForm.waNmae" |
|
|
|
|
:disabled="outDialogType != 'add' || type == '一级库'" |
|
|
|
|
></el-input> |
|
|
|
|
</el-form-item> |
|
|
|
|
</el-col> |
|
|
|
|
<el-col :span="12"> |
|
|
|
|
<el-form-item label="出库单号"> |
|
|
|
|
<el-input v-model="sizeForm.code" disabled></el-input> |
|
|
|
|
</el-form-item> |
|
|
|
|
</el-col> |
|
|
|
|
<el-col :span="12"> |
|
|
|
|
<el-form-item label="出库申请时间"> |
|
|
|
|
<el-date-picker |
|
|
|
|
v-model="sizeForm.inDate" |
|
|
|
|
type="date" |
|
|
|
|
placeholder="选择日期" |
|
|
|
|
style="width: 100%" |
|
|
|
|
disabled |
|
|
|
|
> |
|
|
|
|
</el-date-picker> |
|
|
|
|
</el-form-item> |
|
|
|
|
</el-col> |
|
|
|
|
<el-col :span="12"> |
|
|
|
|
<el-form-item label="事由"> |
|
|
|
|
<el-input |
|
|
|
|
v-model="sizeForm.argument" |
|
|
|
|
:disabled="outDialogType != 'add'" |
|
|
|
|
></el-input> |
|
|
|
|
</el-form-item> |
|
|
|
|
</el-col> |
|
|
|
|
<el-col :span="12"> |
|
|
|
|
<el-form-item label="物资类型"> |
|
|
|
|
<el-select |
|
|
|
|
v-model="sizeForm.type" |
|
|
|
|
placeholder="请选择" |
|
|
|
|
style="width: 100%" |
|
|
|
|
:disabled="outDialogType != 'add'" |
|
|
|
|
> |
|
|
|
|
<el-option label="办公室物资" value="1"></el-option> |
|
|
|
|
<el-option label="其他物资" value="2"></el-option> |
|
|
|
|
</el-select> |
|
|
|
|
</el-form-item> |
|
|
|
|
</el-col> |
|
|
|
|
<el-col :span="12"> |
|
|
|
|
<el-form-item label="领用人"> |
|
|
|
|
<el-input |
|
|
|
|
v-model="sizeForm.submitName" |
|
|
|
|
:disabled="outDialogType != 'add'" |
|
|
|
|
></el-input> |
|
|
|
|
</el-form-item> |
|
|
|
|
</el-col> |
|
|
|
|
<el-col :span="12"> |
|
|
|
|
<el-form-item label="填报人"> |
|
|
|
|
<el-input |
|
|
|
|
v-model="sizeForm.submitName" |
|
|
|
|
:disabled="outDialogType != 'add'" |
|
|
|
|
></el-input> |
|
|
|
|
</el-form-item> |
|
|
|
|
</el-col> |
|
|
|
|
<el-col :span="12"> |
|
|
|
|
<el-form-item label="审批人"> |
|
|
|
|
<el-input v-model="sizeForm.applyNmae" disabled></el-input> |
|
|
|
|
</el-form-item> |
|
|
|
|
</el-col> |
|
|
|
|
<el-col :span="12"> |
|
|
|
|
<el-form-item label="二级入库确认"> |
|
|
|
|
<el-input v-model="sizeForm.applyNmae" disabled></el-input> |
|
|
|
|
</el-form-item> |
|
|
|
|
</el-col> |
|
|
|
|
<el-col :span="12"> |
|
|
|
|
<el-form-item label="选项"> |
|
|
|
|
<el-radio-group |
|
|
|
|
v-model="sizeForm.radio" |
|
|
|
|
@change="radioChange()" |
|
|
|
|
:disabled="outDialogType != 'add'" |
|
|
|
|
> |
|
|
|
|
<el-radio :label="1" :disabled="sizeForm.type == 2">批量选择</el-radio> |
|
|
|
|
<el-radio :label="2">单项选择</el-radio> |
|
|
|
|
</el-radio-group> |
|
|
|
|
</el-form-item> |
|
|
|
|
</el-col> |
|
|
|
|
</el-row> |
|
|
|
|
<!-- <div class="form-title">2025年04月05日出库信息:</div> --> |
|
|
|
|
<el-button |
|
|
|
|
type="primary" |
|
|
|
|
size="mini" |
|
|
|
|
style="margin-bottom: 18px" |
|
|
|
|
@click="inTableAdd()" |
|
|
|
|
>新增</el-button |
|
|
|
|
<div class="dialog-content"> |
|
|
|
|
<!-- 基本信息 --> |
|
|
|
|
<el-form |
|
|
|
|
:model="sizeForm" |
|
|
|
|
ref="dynamicValidateForm" |
|
|
|
|
label-width="100px" |
|
|
|
|
class="demo-dynamic" |
|
|
|
|
> |
|
|
|
|
<el-table :data="sizeForm.inTableData" border style="width: 100%"> |
|
|
|
|
<el-table-column prop="str1" label="编码" width="100"> </el-table-column> |
|
|
|
|
<el-table-column prop="str2" label="名称" width="140"> |
|
|
|
|
<template slot-scope="scope"> |
|
|
|
|
<el-select |
|
|
|
|
v-model="scope.row.str2" |
|
|
|
|
placeholder="请选择" |
|
|
|
|
style="width: 100%" |
|
|
|
|
size="mini" |
|
|
|
|
@change="changeName(scope.$index)" |
|
|
|
|
> |
|
|
|
|
<el-option label="名称一" value="1"></el-option> |
|
|
|
|
<el-option label="名称二" value="2"></el-option> |
|
|
|
|
</el-select> |
|
|
|
|
</template> |
|
|
|
|
</el-table-column> |
|
|
|
|
<el-table-column prop="str3" label="规格" width="100"> </el-table-column> |
|
|
|
|
<el-table-column prop="str4" label="类别" width="100"> </el-table-column> |
|
|
|
|
<el-table-column prop="str5" label="单位" width="100"> </el-table-column> |
|
|
|
|
<el-table-column prop="str6" label="申请数量" width="100"> </el-table-column> |
|
|
|
|
<el-table-column prop="str9" label="已出库" width="100"> </el-table-column> |
|
|
|
|
<el-table-column prop="str7" label="出库数量" width="140"> |
|
|
|
|
<template slot-scope="scope"> |
|
|
|
|
<el-input-number |
|
|
|
|
size="mini" |
|
|
|
|
v-model="scope.row.str7" |
|
|
|
|
:min="1" |
|
|
|
|
style="width: 100%" |
|
|
|
|
:disabled="outDialogType != 'add'" |
|
|
|
|
v-if="scope.row.str7" |
|
|
|
|
@change="numberChange($event)" |
|
|
|
|
></el-input-number> |
|
|
|
|
</template> |
|
|
|
|
</el-table-column> |
|
|
|
|
<el-table-column prop="str8" label="单价" width="100"> </el-table-column> |
|
|
|
|
|
|
|
|
|
<!-- <el-table-column prop="status" label="出库情况"> |
|
|
|
|
<template slot-scope="scope"> |
|
|
|
|
<el-button |
|
|
|
|
type="text" |
|
|
|
|
@click="putIn(scope.row)" |
|
|
|
|
v-if="scope.row.status == 1" |
|
|
|
|
>出库</el-button |
|
|
|
|
> |
|
|
|
|
<span v-if="scope.row.status == 0">已出库</span> |
|
|
|
|
</template> |
|
|
|
|
</el-table-column> --> |
|
|
|
|
</el-table> |
|
|
|
|
<div class="form-title">出库账目表格:</div> |
|
|
|
|
<el-table :data="sizeForm.inAccountsTableData" border style="width: 100%"> |
|
|
|
|
<el-table-column prop="date" label="当前库存" width="100"> |
|
|
|
|
<el-table-column prop="str1" label="编码" width="100"> </el-table-column> |
|
|
|
|
<el-table-column prop="str2" label="名称" width="100"> |
|
|
|
|
<template slot-scope="scope"> |
|
|
|
|
<div class="form-title">基本信息</div> |
|
|
|
|
<el-row> |
|
|
|
|
<el-col :span="12"> |
|
|
|
|
<el-form-item label="出库申请时间"> |
|
|
|
|
<el-date-picker |
|
|
|
|
v-model="sizeForm.outDate" |
|
|
|
|
type="date" |
|
|
|
|
placeholder="选择日期" |
|
|
|
|
style="width: 100%" |
|
|
|
|
disabled |
|
|
|
|
> |
|
|
|
|
</el-date-picker> |
|
|
|
|
</el-form-item> |
|
|
|
|
</el-col> |
|
|
|
|
<el-col :span="12"> |
|
|
|
|
<el-form-item label="事由"> |
|
|
|
|
<el-input |
|
|
|
|
v-model="sizeForm.argument" |
|
|
|
|
:disabled="outDialogType != 'add'" |
|
|
|
|
></el-input> |
|
|
|
|
</el-form-item> |
|
|
|
|
</el-col> |
|
|
|
|
<el-col :span="12"> |
|
|
|
|
<el-form-item label="物资类型"> |
|
|
|
|
<el-select |
|
|
|
|
v-if="sizeForm.radio == 2" |
|
|
|
|
v-model="sizeForm.type" |
|
|
|
|
placeholder="请选择" |
|
|
|
|
style="width: 100%" |
|
|
|
|
@ -175,54 +49,162 @@ |
|
|
|
|
<el-option label="办公室物资" value="1"></el-option> |
|
|
|
|
<el-option label="其他物资" value="2"></el-option> |
|
|
|
|
</el-select> |
|
|
|
|
<span v-else>{{ scope.row.str2 }}</span> |
|
|
|
|
</el-form-item> |
|
|
|
|
</el-col> |
|
|
|
|
<el-col :span="12"> |
|
|
|
|
<el-form-item label="部门"> |
|
|
|
|
<el-select |
|
|
|
|
v-model="sizeForm.departmentId" |
|
|
|
|
placeholder="请选择部门" |
|
|
|
|
style="width: 100%" |
|
|
|
|
:disabled="outDialogType != 'add'" |
|
|
|
|
@change="deptChange" |
|
|
|
|
clearable |
|
|
|
|
filterable |
|
|
|
|
> |
|
|
|
|
<el-option |
|
|
|
|
v-for="item in departmentOptions" |
|
|
|
|
:key="item.departmentId" |
|
|
|
|
:label="item.department" |
|
|
|
|
:value="item.departmentId" |
|
|
|
|
></el-option> |
|
|
|
|
</el-select> |
|
|
|
|
</el-form-item> |
|
|
|
|
</el-col> |
|
|
|
|
<el-col :span="12"> |
|
|
|
|
<el-form-item label="领用人"> |
|
|
|
|
<!-- userOptions --> |
|
|
|
|
<el-select |
|
|
|
|
v-model="sizeForm.lingyongren" |
|
|
|
|
placeholder="请选择物资名称" |
|
|
|
|
style="width: 100%" |
|
|
|
|
v-if="outDialogType != 'details'" |
|
|
|
|
:disabled="sizeForm.departmentId == ''" |
|
|
|
|
value-key="id" |
|
|
|
|
clearable |
|
|
|
|
filterable |
|
|
|
|
> |
|
|
|
|
<el-option |
|
|
|
|
v-for="item in userOptions" |
|
|
|
|
:key="item.materialId" |
|
|
|
|
:label="item.materialName" |
|
|
|
|
:value="item" |
|
|
|
|
> |
|
|
|
|
</el-option> |
|
|
|
|
</el-select> |
|
|
|
|
</el-form-item> |
|
|
|
|
</el-col> |
|
|
|
|
<el-col :span="12"> |
|
|
|
|
<el-form-item label="填报人"> |
|
|
|
|
<el-input |
|
|
|
|
v-model="sizeForm.submitName" |
|
|
|
|
:disabled="outDialogType != 'add'" |
|
|
|
|
></el-input> |
|
|
|
|
</el-form-item> |
|
|
|
|
</el-col> |
|
|
|
|
</el-row> |
|
|
|
|
<el-button |
|
|
|
|
type="primary" |
|
|
|
|
size="mini" |
|
|
|
|
style="margin-bottom: 18px" |
|
|
|
|
@click="inTableAdd()" |
|
|
|
|
>新增</el-button |
|
|
|
|
> |
|
|
|
|
<el-table :data="sizeForm.inTableData" border style="width: 100%"> |
|
|
|
|
<el-table-column prop="materialCode" label="物资编码" width="100"> |
|
|
|
|
</el-table-column> |
|
|
|
|
<el-table-column prop="str2" label="物资名称" width="140"> |
|
|
|
|
<template slot-scope="scope"> |
|
|
|
|
<el-select |
|
|
|
|
v-model="scope.row.materialitem" |
|
|
|
|
placeholder="请选择物资名称" |
|
|
|
|
style="width: 100%" |
|
|
|
|
@change=" |
|
|
|
|
handleMaterialChange(scope.row.materialitem, scope.$index) |
|
|
|
|
" |
|
|
|
|
v-if="outDialogType != 'details'" |
|
|
|
|
value-key="id" |
|
|
|
|
> |
|
|
|
|
<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="str3" label="规格" width="100"> </el-table-column> |
|
|
|
|
<el-table-column prop="str4" label="类别" width="100"> </el-table-column> |
|
|
|
|
<el-table-column prop="str5" label="单位" width="100"> </el-table-column> |
|
|
|
|
<el-table-column prop="str6" label="数量" width="100"> </el-table-column> |
|
|
|
|
<el-table-column prop="str7" label="单价" width="100"> </el-table-column> |
|
|
|
|
</el-table-column> |
|
|
|
|
<el-table-column prop="date" label="出库信息" width="100"> |
|
|
|
|
<el-table-column prop="str8" label="数量" width="100"> </el-table-column> |
|
|
|
|
<el-table-column prop="str9" label="单价" width="100"> </el-table-column> |
|
|
|
|
</el-table-column> |
|
|
|
|
<el-table-column prop="date" label="出库后库存"> |
|
|
|
|
<el-table-column prop="str10" label="数量" width="100"> </el-table-column> |
|
|
|
|
<el-table-column prop="str11" label="单价" width="100"> </el-table-column> |
|
|
|
|
</el-table-column> |
|
|
|
|
</el-table> |
|
|
|
|
</el-form> |
|
|
|
|
<el-table-column prop="model" 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="str6" label="申请数量"> </el-table-column> |
|
|
|
|
<el-table-column prop="str9" label="已出库"> </el-table-column> |
|
|
|
|
<el-table-column prop="str7" label="出库数量"> |
|
|
|
|
<template slot-scope="scope"> |
|
|
|
|
<el-input-number |
|
|
|
|
size="mini" |
|
|
|
|
v-model="scope.row.str7" |
|
|
|
|
:min="1" |
|
|
|
|
style="width: 100%" |
|
|
|
|
:disabled="outDialogType != 'add'" |
|
|
|
|
v-if="scope.row.str7" |
|
|
|
|
@change="numberChange($event)" |
|
|
|
|
></el-input-number> |
|
|
|
|
</template> |
|
|
|
|
</el-table-column> |
|
|
|
|
<el-table-column prop="unitPrice" label="单价"> </el-table-column> |
|
|
|
|
</el-table> |
|
|
|
|
<div class="form-title">出库账目表格:</div> |
|
|
|
|
<el-table |
|
|
|
|
:data="sizeForm.inAccountsTableData" |
|
|
|
|
border |
|
|
|
|
style="width: 100%" |
|
|
|
|
> |
|
|
|
|
<el-table-column prop="date" label="当前库存"> |
|
|
|
|
<el-table-column prop="str1" label="编码"> </el-table-column> |
|
|
|
|
<el-table-column prop="str2" label="名称"> |
|
|
|
|
<template slot-scope="scope"> |
|
|
|
|
<el-select |
|
|
|
|
v-model="sizeForm.type" |
|
|
|
|
placeholder="请选择" |
|
|
|
|
style="width: 100%" |
|
|
|
|
:disabled="outDialogType != 'add'" |
|
|
|
|
> |
|
|
|
|
<el-option label="办公室物资" value="1"></el-option> |
|
|
|
|
<el-option label="其他物资" value="2"></el-option> |
|
|
|
|
</el-select> |
|
|
|
|
</template> |
|
|
|
|
</el-table-column> |
|
|
|
|
<el-table-column prop="str3" label="规格"> </el-table-column> |
|
|
|
|
<el-table-column prop="str4" label="类别"> </el-table-column> |
|
|
|
|
<el-table-column prop="str5" label="单位"> </el-table-column> |
|
|
|
|
<el-table-column prop="str6" label="数量"> </el-table-column> |
|
|
|
|
<el-table-column prop="str7" label="单价"> </el-table-column> |
|
|
|
|
</el-table-column> |
|
|
|
|
<el-table-column prop="date" label="出库信息"> |
|
|
|
|
<el-table-column prop="str8" label="数量"> </el-table-column> |
|
|
|
|
<el-table-column prop="str9" label="单价"> </el-table-column> |
|
|
|
|
</el-table-column> |
|
|
|
|
<el-table-column prop="date" label="出库后库存"> |
|
|
|
|
<el-table-column prop="str10" label="数量"> </el-table-column> |
|
|
|
|
<el-table-column prop="str11" label="单价"> </el-table-column> |
|
|
|
|
</el-table-column> |
|
|
|
|
</el-table> |
|
|
|
|
</el-form> |
|
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
<span slot="footer" class="dialog-footer"> |
|
|
|
|
<el-button @click="handleCloseDetail()">取 消</el-button> |
|
|
|
|
<!-- <el-button type="primary" @click="save()">保 存</el-button> --> |
|
|
|
|
<el-button type="primary" @click="sumbit()">确 定</el-button> |
|
|
|
|
</span> |
|
|
|
|
</el-dialog> |
|
|
|
|
<!-- 批量出库 选择 --> |
|
|
|
|
<el-dialog |
|
|
|
|
:close-on-click-modal="false" |
|
|
|
|
title="选择数据来源" |
|
|
|
|
:visible.sync="inBatchDialogVisible" |
|
|
|
|
:append-to-body="true" |
|
|
|
|
width="40%" |
|
|
|
|
@close="handleBatchClose" |
|
|
|
|
> |
|
|
|
|
<el-select v-model="batchType" placeholder="请选择数据来源" style="width: 100%"> |
|
|
|
|
<el-option label="2025年1季度" value="1"></el-option> |
|
|
|
|
<el-option label="2025年2季度" value="2"></el-option> |
|
|
|
|
<el-option label="2025年3季度" value="3"></el-option> |
|
|
|
|
<el-option label="2025年4季度" value="4"></el-option> |
|
|
|
|
</el-select> |
|
|
|
|
<span slot="footer" class="dialog-footer"> |
|
|
|
|
<el-button @click="handleBatchClose()">取 消</el-button> |
|
|
|
|
<el-button type="primary" @click="batchSumbit()">确 定</el-button> |
|
|
|
|
</span> |
|
|
|
|
</el-dialog> |
|
|
|
|
</div> |
|
|
|
|
</template> |
|
|
|
|
<script> |
|
|
|
|
import { getDetailedItems, getMaterialList } from "@/api/firstOrder/outbound"; |
|
|
|
|
import { getUserList } from "@/api/secondOrder/outbound"; |
|
|
|
|
export default { |
|
|
|
|
props: { |
|
|
|
|
repairVisible: { |
|
|
|
|
@ -253,10 +235,14 @@ export default { |
|
|
|
|
argument: "", //事由 |
|
|
|
|
inAccountsTableData: [], //总计 |
|
|
|
|
inTableData: [], |
|
|
|
|
departmentId: "", //部门id |
|
|
|
|
}, |
|
|
|
|
inTableData: [], |
|
|
|
|
inBatchDialogVisible: false, //选择采购单的数据 |
|
|
|
|
batchType: "", //批量选择类型 |
|
|
|
|
materials: [], //物资列表 |
|
|
|
|
userOptions: [], //领用人列表 |
|
|
|
|
departmentOptions: [], //部门列表 |
|
|
|
|
}; |
|
|
|
|
}, |
|
|
|
|
mounted() { |
|
|
|
|
@ -266,44 +252,55 @@ export default { |
|
|
|
|
} else { |
|
|
|
|
this.inInit(); |
|
|
|
|
} |
|
|
|
|
this.getMaterialList(); |
|
|
|
|
this.getDetailedItems(); |
|
|
|
|
}, |
|
|
|
|
methods: { |
|
|
|
|
//获取单条选择的物资名称列表 |
|
|
|
|
async getMaterialList() { |
|
|
|
|
this.loading = true; |
|
|
|
|
try { |
|
|
|
|
const res = await getMaterialList(); |
|
|
|
|
this.materials = res.data.result; |
|
|
|
|
} catch (error) { |
|
|
|
|
this.$message.error("获取数据来源失败,请重试"); |
|
|
|
|
} finally { |
|
|
|
|
this.loading = false; |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
// 选中物资获取数据 |
|
|
|
|
handleMaterialChange(row, index) { |
|
|
|
|
this.sizeForm.inTableData[index].materialId = row.materialId; |
|
|
|
|
this.sizeForm.inTableData[index].model = row.model; |
|
|
|
|
this.sizeForm.inTableData[index].materialCode = row.materialCode; |
|
|
|
|
this.sizeForm.inTableData[index].materialName = row.materialName; |
|
|
|
|
this.sizeForm.inTableData[index].type = row.type; |
|
|
|
|
this.sizeForm.inTableData[index].unit = row.unit; |
|
|
|
|
}, |
|
|
|
|
// 获取领用人列表 |
|
|
|
|
getUserList(value) { |
|
|
|
|
getUserList({ departmentId: value }).then((res) => { |
|
|
|
|
this.userOptions = res.data.result; |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
// 获取部门列表 |
|
|
|
|
getDetailedItems() { |
|
|
|
|
getDetailedItems().then((res) => { |
|
|
|
|
this.departmentOptions = res.data.result; |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
// 选中部门之后 获取领用人列表 |
|
|
|
|
deptChange(value) { |
|
|
|
|
this.getUserList(value); |
|
|
|
|
}, |
|
|
|
|
handleCloseDetail() { |
|
|
|
|
this.outDialogVisible = false; |
|
|
|
|
this.$emit("handleCloseDetail"); |
|
|
|
|
}, |
|
|
|
|
inInit() { |
|
|
|
|
const randomNum = Math.floor(Math.random() * 100000000) + 1; |
|
|
|
|
this.sizeForm.code = String(randomNum).padStart(8, "0"); //入库单号 |
|
|
|
|
this.sizeForm.applyNmae = "审批人一"; |
|
|
|
|
this.sizeForm.submitName = "填报人一"; |
|
|
|
|
this.sizeForm.radio = 1; |
|
|
|
|
this.sizeForm.waNmae = "仓库一"; |
|
|
|
|
this.sizeForm.argument = "入库"; |
|
|
|
|
this.sizeForm.type = "1"; |
|
|
|
|
this.sizeForm.inDate = new Date(); //入库时间 |
|
|
|
|
this.sizeForm.inTableData.push({ |
|
|
|
|
str1: "000001", |
|
|
|
|
str2: "物品1", |
|
|
|
|
str3: "规格1", |
|
|
|
|
str4: "类别1", |
|
|
|
|
str5: "单位1", |
|
|
|
|
str6: "11", |
|
|
|
|
str7: "4", |
|
|
|
|
str8: "3", |
|
|
|
|
str9: "33", |
|
|
|
|
name: "审批人", |
|
|
|
|
status: "1", // |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
inInit() {}, |
|
|
|
|
|
|
|
|
|
addInit() { |
|
|
|
|
// 生成入库单号 |
|
|
|
|
const randomNum = Math.floor(Math.random() * 100000000) + 1; |
|
|
|
|
this.sizeForm.code = String(randomNum).padStart(8, "0"); //入库单号 |
|
|
|
|
this.sizeForm.inDate = new Date(); //入库时间 |
|
|
|
|
if (this.type == "一级库") { |
|
|
|
|
this.sizeForm.waNmae = "一级库"; |
|
|
|
|
} |
|
|
|
|
this.sizeForm.outDate = new Date(); //入库时间 |
|
|
|
|
}, |
|
|
|
|
handleCloseDetail() { |
|
|
|
|
this.inDialogVisible = false; |
|
|
|
|
@ -311,66 +308,7 @@ export default { |
|
|
|
|
}, |
|
|
|
|
// 添加入库数据 |
|
|
|
|
inTableAdd() { |
|
|
|
|
this.sizeForm.inTableData.push({ |
|
|
|
|
str1: "", |
|
|
|
|
str2: "", |
|
|
|
|
str3: "", |
|
|
|
|
str4: "", |
|
|
|
|
str5: "", |
|
|
|
|
str6: "", |
|
|
|
|
str7: 0, |
|
|
|
|
name: "", |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
// 点击入库 |
|
|
|
|
putIn(row) { |
|
|
|
|
row.status = 0; |
|
|
|
|
// 更改总表的数据 |
|
|
|
|
this.sizeForm.inAccountsTableData.push({ |
|
|
|
|
str1: "000001", |
|
|
|
|
str2: "物品1", |
|
|
|
|
str3: "规格1", |
|
|
|
|
str4: "类别1", |
|
|
|
|
str5: "单位1", |
|
|
|
|
str6: "12", |
|
|
|
|
str7: "3", |
|
|
|
|
str8: row.str7, |
|
|
|
|
str9: "3", |
|
|
|
|
str10: row.str7 + 12, |
|
|
|
|
str11: "3", |
|
|
|
|
str12: "审批人1", |
|
|
|
|
str13: "2025-04-05", |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
// 采购单选择弹框关闭 |
|
|
|
|
handleBatchClose() { |
|
|
|
|
this.inBatchDialogVisible = false; |
|
|
|
|
}, |
|
|
|
|
// 采购单选择确定 |
|
|
|
|
batchSumbit() { |
|
|
|
|
this.sizeForm.inTableData.push({ |
|
|
|
|
str1: "000001", |
|
|
|
|
str2: "物品1", |
|
|
|
|
str3: "规格1", |
|
|
|
|
str4: "类别1", |
|
|
|
|
str5: "单位1", |
|
|
|
|
str6: "11", |
|
|
|
|
str7: "4", |
|
|
|
|
str8: "3", |
|
|
|
|
str9: "部门一", |
|
|
|
|
name: "审批人", |
|
|
|
|
status: "1", // |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
this.inBatchDialogVisible = false; |
|
|
|
|
}, |
|
|
|
|
// 保存 暂存 |
|
|
|
|
save() { |
|
|
|
|
this.$message({ |
|
|
|
|
type: "success", |
|
|
|
|
message: "保存成功", |
|
|
|
|
}); |
|
|
|
|
this.handleCloseDetail(); |
|
|
|
|
this.sizeForm.inTableData.push({}); |
|
|
|
|
}, |
|
|
|
|
// 提交 |
|
|
|
|
sumbit() { |
|
|
|
|
@ -380,39 +318,6 @@ export default { |
|
|
|
|
}); |
|
|
|
|
this.handleCloseDetail(); |
|
|
|
|
}, |
|
|
|
|
// 选项选择 |
|
|
|
|
radioChange(val) { |
|
|
|
|
this.sizeForm.inTableData = []; |
|
|
|
|
if (this.sizeForm.radio == 1) { |
|
|
|
|
this.inBatchDialogVisible = true; |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
// |
|
|
|
|
|
|
|
|
|
changeName(index) { |
|
|
|
|
console.log(9999, index); |
|
|
|
|
this.sizeForm.inTableData.forEach((item, i) => { |
|
|
|
|
if (i == index) { |
|
|
|
|
item.str1 = "000001"; |
|
|
|
|
item.str2 = "物品1"; |
|
|
|
|
item.str3 = "规格1"; |
|
|
|
|
item.str4 = "类别1"; |
|
|
|
|
item.str5 = "单位1"; |
|
|
|
|
item.str6 = "11"; |
|
|
|
|
item.str7 = 4; |
|
|
|
|
item.str8 = "3"; |
|
|
|
|
item.str9 = "部门一"; |
|
|
|
|
item.name = "审批人"; |
|
|
|
|
item.status = "1"; |
|
|
|
|
this.$set(item, "str7", 4); |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
console.log(888888, this.sizeForm.inTableData); |
|
|
|
|
}, |
|
|
|
|
numberChange() { |
|
|
|
|
this.$forceUpdate(); //解决点击计数器失效问题 |
|
|
|
|
console.log(77777, this.sizeForm.inTableData); |
|
|
|
|
}, |
|
|
|
|
}, |
|
|
|
|
}; |
|
|
|
|
</script> |
|
|
|
|
@ -420,4 +325,16 @@ export default { |
|
|
|
|
.form-title { |
|
|
|
|
margin: 20px 0; |
|
|
|
|
} |
|
|
|
|
::v-deep.el-dialog__footer { |
|
|
|
|
position: fixed !important; |
|
|
|
|
bottom: 0 !important; |
|
|
|
|
right: 0 !important; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
::v-deep.dialog-content { |
|
|
|
|
max-height: calc(100vh - 200px); /* 减去标题栏和底部按钮的高度 */ |
|
|
|
|
overflow-y: auto; |
|
|
|
|
padding-right: 10px; /* 预留滚动条空间 */ |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
</style> |
|
|
|
|
|