2026-01-20 16:56:01 +08:00
|
|
|
|
<template>
|
2026-01-21 17:40:42 +08:00
|
|
|
|
<div class="app-container">
|
2026-01-20 16:56:01 +08:00
|
|
|
|
<el-splitter>
|
|
|
|
|
|
<el-splitter-panel size="40%">
|
2026-01-21 17:40:42 +08:00
|
|
|
|
<el-form
|
|
|
|
|
|
:model="queryParams"
|
|
|
|
|
|
ref="queryRef"
|
|
|
|
|
|
v-show="showSearch"
|
|
|
|
|
|
label-width="90"
|
|
|
|
|
|
>
|
|
|
|
|
|
<el-row>
|
|
|
|
|
|
<el-col :span="12">
|
|
|
|
|
|
<el-form-item label="入库时间" prop="operationTime">
|
|
|
|
|
|
<el-date-picker
|
|
|
|
|
|
v-model="operationTime"
|
|
|
|
|
|
type="datetimerange"
|
|
|
|
|
|
start-placeholder="开始时间"
|
|
|
|
|
|
end-placeholder="结束时间"
|
|
|
|
|
|
format="YYYY/MM/DD HH:mm:ss"
|
|
|
|
|
|
value-format="YYYY-MM-DD HH:mm:ss"
|
|
|
|
|
|
@keyup.enter="handleQuery"
|
|
|
|
|
|
/>
|
|
|
|
|
|
</el-form-item>
|
2026-01-20 16:56:01 +08:00
|
|
|
|
</el-col>
|
2026-01-21 17:40:42 +08:00
|
|
|
|
<el-col :span="10">
|
|
|
|
|
|
<el-form-item label="单据号" prop="billNo">
|
|
|
|
|
|
<el-input
|
|
|
|
|
|
v-model="queryParams.billNo"
|
|
|
|
|
|
placeholder="请输入单据号"
|
|
|
|
|
|
clearable
|
|
|
|
|
|
@keyup.enter="handleQuery"
|
|
|
|
|
|
/>
|
|
|
|
|
|
</el-form-item>
|
2026-01-20 16:56:01 +08:00
|
|
|
|
</el-col>
|
2026-01-21 17:40:42 +08:00
|
|
|
|
</el-row>
|
|
|
|
|
|
<el-row>
|
|
|
|
|
|
<el-col :span="12">
|
|
|
|
|
|
<el-form-item label="入库类型" prop="operationType">
|
|
|
|
|
|
<el-select
|
|
|
|
|
|
v-model="queryParams.operationType"
|
|
|
|
|
|
placeholder="请选择入库类型"
|
|
|
|
|
|
clearable
|
|
|
|
|
|
@keyup.enter="handleQuery"
|
|
|
|
|
|
>
|
|
|
|
|
|
<el-option
|
|
|
|
|
|
v-for="dict in storeTypeList"
|
|
|
|
|
|
:key="dict.id"
|
|
|
|
|
|
:label="dict.typeName"
|
|
|
|
|
|
:value="dict.typeCode"
|
|
|
|
|
|
/>
|
|
|
|
|
|
</el-select>
|
|
|
|
|
|
</el-form-item>
|
2026-01-20 16:56:01 +08:00
|
|
|
|
</el-col>
|
2026-01-21 17:40:42 +08:00
|
|
|
|
<el-col :span="10">
|
|
|
|
|
|
<el-form-item label="库存状态" prop="execStatus">
|
|
|
|
|
|
<el-select
|
|
|
|
|
|
v-model="queryParams.execStatus"
|
|
|
|
|
|
placeholder="请选择库存状态"
|
|
|
|
|
|
clearable
|
|
|
|
|
|
@keyup.enter="handleQuery"
|
|
|
|
|
|
>
|
|
|
|
|
|
<el-option
|
|
|
|
|
|
v-for="dict in execStatusMenu"
|
|
|
|
|
|
:key="dict.value"
|
|
|
|
|
|
:label="dict.label"
|
|
|
|
|
|
:value="dict.value"
|
|
|
|
|
|
/>
|
|
|
|
|
|
</el-select>
|
2026-01-20 16:56:01 +08:00
|
|
|
|
</el-form-item>
|
|
|
|
|
|
</el-col>
|
2026-01-21 17:40:42 +08:00
|
|
|
|
</el-row>
|
|
|
|
|
|
</el-form>
|
|
|
|
|
|
<el-row class="mb8">
|
|
|
|
|
|
<el-col :span="4">
|
|
|
|
|
|
<el-button
|
|
|
|
|
|
type="primary"
|
|
|
|
|
|
plain
|
|
|
|
|
|
@click="handleAdd(false)"
|
|
|
|
|
|
v-hasPermi="['wisdom:bill:add']"
|
|
|
|
|
|
>新增入库</el-button
|
|
|
|
|
|
>
|
|
|
|
|
|
</el-col>
|
|
|
|
|
|
<el-col :span="4">
|
|
|
|
|
|
<el-button
|
|
|
|
|
|
type="warning"
|
|
|
|
|
|
plain
|
|
|
|
|
|
@click="handleExport"
|
|
|
|
|
|
v-hasPermi="['wisdom:bill:export']"
|
|
|
|
|
|
>导出</el-button
|
|
|
|
|
|
>
|
|
|
|
|
|
</el-col>
|
|
|
|
|
|
<el-col :span="4">
|
|
|
|
|
|
<el-button type="primary" plain @click="rkUpload"
|
|
|
|
|
|
>图片上传</el-button
|
|
|
|
|
|
>
|
|
|
|
|
|
</el-col>
|
|
|
|
|
|
|
|
|
|
|
|
<el-col :span="8">
|
|
|
|
|
|
<el-form-item>
|
|
|
|
|
|
<el-button type="primary" icon="Search" @click="handleQuery"
|
|
|
|
|
|
>搜索</el-button
|
|
|
|
|
|
>
|
|
|
|
|
|
<el-button icon="Refresh" @click="resetQuery">重置</el-button>
|
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
</el-col>
|
|
|
|
|
|
</el-row>
|
|
|
|
|
|
<el-table
|
|
|
|
|
|
v-loading="loading"
|
|
|
|
|
|
:data="billList"
|
|
|
|
|
|
:row-class-name="tableBillRowClassName"
|
|
|
|
|
|
@row-dblclick="billClick"
|
|
|
|
|
|
@current-change="uploadSelectionChange"
|
|
|
|
|
|
>
|
2026-01-21 07:53:24 +08:00
|
|
|
|
<el-table-column type="selection" width="55" align="center" />
|
2026-01-21 17:40:42 +08:00
|
|
|
|
<el-table-column
|
|
|
|
|
|
label="单据号"
|
|
|
|
|
|
align="center"
|
|
|
|
|
|
prop="billNo"
|
|
|
|
|
|
width="180"
|
|
|
|
|
|
/>
|
|
|
|
|
|
<el-table-column label="库存状态" align="center">
|
2026-01-21 08:39:06 +08:00
|
|
|
|
<template #default="scope">
|
2026-01-21 17:40:42 +08:00
|
|
|
|
<span>{{ scope.row.execStatus == 1 ? "已入库" : "预入库" }}</span>
|
2026-01-21 08:39:06 +08:00
|
|
|
|
</template>
|
|
|
|
|
|
</el-table-column>
|
2026-01-21 17:40:42 +08:00
|
|
|
|
<el-table-column label="操作类型" align="center">
|
2026-01-20 16:56:01 +08:00
|
|
|
|
<template #default="scope">
|
2026-01-21 07:53:24 +08:00
|
|
|
|
<dict-tag :options="dictTagData()" :value="scope.row.bizType" />
|
2026-01-20 16:56:01 +08:00
|
|
|
|
</template>
|
|
|
|
|
|
</el-table-column>
|
2026-01-21 17:40:42 +08:00
|
|
|
|
<el-table-column
|
|
|
|
|
|
label="理货员"
|
|
|
|
|
|
align="center"
|
|
|
|
|
|
prop="operatorName"
|
|
|
|
|
|
width="100"
|
|
|
|
|
|
/>
|
|
|
|
|
|
<el-table-column
|
|
|
|
|
|
label="入库类型"
|
|
|
|
|
|
align="center"
|
|
|
|
|
|
prop="operationTypeName"
|
|
|
|
|
|
width="120"
|
|
|
|
|
|
/>
|
|
|
|
|
|
<el-table-column
|
|
|
|
|
|
label="物资类型"
|
|
|
|
|
|
align="center"
|
|
|
|
|
|
prop="wlTypeName"
|
|
|
|
|
|
width="100"
|
|
|
|
|
|
/>
|
|
|
|
|
|
<el-table-column
|
|
|
|
|
|
label="入库时间"
|
|
|
|
|
|
align="center"
|
|
|
|
|
|
prop="operationTime"
|
|
|
|
|
|
width="170"
|
|
|
|
|
|
>
|
2026-01-20 16:56:01 +08:00
|
|
|
|
<template #default="scope">
|
2026-01-21 17:40:42 +08:00
|
|
|
|
<span>{{
|
|
|
|
|
|
parseTime(scope.row.operationTime, "{y}-{m}-{d} {h}:{i}:{s}")
|
|
|
|
|
|
}}</span>
|
2026-01-20 16:56:01 +08:00
|
|
|
|
</template>
|
|
|
|
|
|
</el-table-column>
|
2026-01-21 17:40:42 +08:00
|
|
|
|
<el-table-column
|
|
|
|
|
|
label="操作"
|
|
|
|
|
|
align="center"
|
|
|
|
|
|
fixed="right"
|
|
|
|
|
|
width="220"
|
|
|
|
|
|
>
|
2026-01-20 16:56:01 +08:00
|
|
|
|
<template #default="scope">
|
2026-01-21 17:40:42 +08:00
|
|
|
|
<el-button
|
|
|
|
|
|
link
|
|
|
|
|
|
type="primary"
|
|
|
|
|
|
@click="picDetailFun(scope.row.billNo, 0, 1)"
|
|
|
|
|
|
>入库图片</el-button
|
|
|
|
|
|
>
|
|
|
|
|
|
<el-button
|
|
|
|
|
|
link
|
|
|
|
|
|
type="primary"
|
|
|
|
|
|
@click="billClick(scope.row, 'bill', 'rk')"
|
|
|
|
|
|
>入库单</el-button
|
|
|
|
|
|
>
|
|
|
|
|
|
<el-button link type="primary" @click="editData(scope.row)"
|
|
|
|
|
|
>修改</el-button
|
|
|
|
|
|
>
|
2026-01-20 16:56:01 +08:00
|
|
|
|
</template>
|
|
|
|
|
|
</el-table-column>
|
|
|
|
|
|
</el-table>
|
2026-01-21 17:40:42 +08:00
|
|
|
|
<pagination
|
|
|
|
|
|
v-show="total > 0"
|
2026-01-20 16:56:01 +08:00
|
|
|
|
:total="total"
|
|
|
|
|
|
v-model:page="queryParams.pageNum"
|
|
|
|
|
|
v-model:limit="queryParams.pageSize"
|
|
|
|
|
|
@pagination="getList"
|
|
|
|
|
|
/>
|
|
|
|
|
|
<!-- <el-pagination background layout="prev, pager, next" :total="total" v-model:page="queryParams.pageNum" @pagination="getList"/> -->
|
|
|
|
|
|
</el-splitter-panel>
|
|
|
|
|
|
<el-splitter-panel :min="200">
|
2026-01-21 17:40:42 +08:00
|
|
|
|
<el-row :gutter="10" class="mb8" v-show="stockList.length > 0">
|
|
|
|
|
|
<el-col :span="1.5">
|
|
|
|
|
|
<el-button
|
|
|
|
|
|
type="success"
|
|
|
|
|
|
plain
|
|
|
|
|
|
icon="Printer"
|
|
|
|
|
|
@click="handlePrint"
|
|
|
|
|
|
v-print="printViewInfo"
|
|
|
|
|
|
v-hasPermi="['wisdom:bill:print']"
|
|
|
|
|
|
>打印单据</el-button
|
|
|
|
|
|
>
|
|
|
|
|
|
</el-col>
|
|
|
|
|
|
<el-col :span="1.5">
|
|
|
|
|
|
<el-button
|
|
|
|
|
|
type="primary"
|
|
|
|
|
|
plain
|
|
|
|
|
|
icon="Printer"
|
|
|
|
|
|
@click="handlePrintTag"
|
|
|
|
|
|
>打印标签</el-button
|
|
|
|
|
|
>
|
|
|
|
|
|
</el-col>
|
|
|
|
|
|
<el-col :span="4">
|
|
|
|
|
|
<el-form-item label="打印机编号" prop="printNum">
|
|
|
|
|
|
<el-select v-model="printNum" clearable>
|
|
|
|
|
|
<el-option
|
|
|
|
|
|
v-for="dict in printNumList"
|
|
|
|
|
|
:key="dict.id"
|
|
|
|
|
|
:label="dict.statusName"
|
|
|
|
|
|
:value="dict.id"
|
|
|
|
|
|
/>
|
|
|
|
|
|
</el-select>
|
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
</el-col>
|
|
|
|
|
|
<!-- <el-col :span="1.5">
|
2026-01-20 16:56:01 +08:00
|
|
|
|
<el-button
|
|
|
|
|
|
type="danger"
|
|
|
|
|
|
plain
|
|
|
|
|
|
icon="Switch"
|
2026-01-21 17:40:42 +08:00
|
|
|
|
@click="handleMove"
|
2026-01-21 07:53:24 +08:00
|
|
|
|
v-hasPermi="['wisdom:bill:move']"
|
2026-01-20 16:56:01 +08:00
|
|
|
|
>移库</el-button>
|
2026-01-21 17:40:42 +08:00
|
|
|
|
</el-col> -->
|
|
|
|
|
|
<el-col :span="1.5">
|
|
|
|
|
|
<el-button type="primary" plain icon="Plus" @click="addOne()"
|
|
|
|
|
|
>添加单条物料</el-button
|
|
|
|
|
|
>
|
|
|
|
|
|
</el-col>
|
|
|
|
|
|
<el-col :span="5">
|
|
|
|
|
|
<el-button type="primary" plain icon="Plus" @click="handleDispatch"
|
|
|
|
|
|
>生成调度任务</el-button
|
|
|
|
|
|
>
|
|
|
|
|
|
</el-col>
|
|
|
|
|
|
</el-row>
|
|
|
|
|
|
<el-table
|
|
|
|
|
|
v-loading="detailLoading"
|
|
|
|
|
|
show-overflow-tooltip
|
|
|
|
|
|
border
|
|
|
|
|
|
:data="stockList"
|
|
|
|
|
|
@selection-change="printSelectionChange"
|
|
|
|
|
|
>
|
2026-01-20 16:56:01 +08:00
|
|
|
|
<el-table-column type="selection" width="55" align="center" />
|
2026-01-21 17:40:42 +08:00
|
|
|
|
<el-table-column
|
|
|
|
|
|
label="序号"
|
|
|
|
|
|
align="center"
|
|
|
|
|
|
type="index"
|
|
|
|
|
|
width="70"
|
|
|
|
|
|
/>
|
|
|
|
|
|
<el-table-column label="库存状态" align="center">
|
2026-01-20 16:56:01 +08:00
|
|
|
|
<template #default="scope">
|
2026-01-21 17:40:42 +08:00
|
|
|
|
<span>{{ scope.row.execStatus == 1 ? "已入库" : "预入库" }}</span>
|
2026-01-20 16:56:01 +08:00
|
|
|
|
</template>
|
2026-01-21 17:40:42 +08:00
|
|
|
|
</el-table-column>
|
|
|
|
|
|
<el-table-column
|
|
|
|
|
|
label="项目号"
|
|
|
|
|
|
align="center"
|
|
|
|
|
|
prop="xmNo"
|
|
|
|
|
|
width="150"
|
|
|
|
|
|
/>
|
|
|
|
|
|
<el-table-column
|
|
|
|
|
|
label="项目描述"
|
|
|
|
|
|
align="center"
|
|
|
|
|
|
prop="xmMs"
|
|
|
|
|
|
width="250"
|
|
|
|
|
|
/>
|
|
|
|
|
|
<el-table-column
|
|
|
|
|
|
label="物料号"
|
|
|
|
|
|
align="center"
|
|
|
|
|
|
prop="wlNo"
|
|
|
|
|
|
width="100"
|
|
|
|
|
|
/>
|
|
|
|
|
|
<el-table-column
|
|
|
|
|
|
label="物料描述"
|
|
|
|
|
|
align="center"
|
|
|
|
|
|
prop="wlMs"
|
|
|
|
|
|
width="250"
|
|
|
|
|
|
/>
|
|
|
|
|
|
<el-table-column
|
|
|
|
|
|
label="供应商名称"
|
|
|
|
|
|
align="center"
|
|
|
|
|
|
prop="gysMc"
|
|
|
|
|
|
width="200"
|
|
|
|
|
|
/>
|
2026-01-20 16:56:01 +08:00
|
|
|
|
<el-table-column label="合同单价" align="center" prop="htDj" />
|
2026-01-21 17:40:42 +08:00
|
|
|
|
<el-table-column
|
|
|
|
|
|
label="订单编号"
|
|
|
|
|
|
align="center"
|
|
|
|
|
|
prop="sapNo"
|
|
|
|
|
|
width="150"
|
|
|
|
|
|
/>
|
2026-01-20 16:56:01 +08:00
|
|
|
|
<el-table-column label="计量单位" align="center" prop="dw" />
|
2026-01-21 17:40:42 +08:00
|
|
|
|
<el-table-column
|
|
|
|
|
|
label="实际入库数量"
|
|
|
|
|
|
align="center"
|
|
|
|
|
|
prop="realQty"
|
|
|
|
|
|
width="120"
|
|
|
|
|
|
/>
|
|
|
|
|
|
<el-table-column label="是否移库" align="center" prop="isMove">
|
2026-01-20 16:56:01 +08:00
|
|
|
|
<template #default="scope">
|
2026-01-21 17:40:42 +08:00
|
|
|
|
<span>{{ isMoveFun(scope.row.hasMoved) }}</span>
|
2026-01-20 16:56:01 +08:00
|
|
|
|
</template>
|
|
|
|
|
|
</el-table-column>
|
2026-01-21 17:40:42 +08:00
|
|
|
|
<el-table-column
|
|
|
|
|
|
label="库位码"
|
|
|
|
|
|
align="center"
|
|
|
|
|
|
prop="pcode"
|
|
|
|
|
|
width="120"
|
|
|
|
|
|
/>
|
2026-01-20 16:56:01 +08:00
|
|
|
|
<el-table-column label="托盘码" align="center" prop="trayCode" />
|
2026-01-21 17:40:42 +08:00
|
|
|
|
<el-table-column
|
|
|
|
|
|
label="身份码"
|
|
|
|
|
|
align="center"
|
|
|
|
|
|
prop="entityId"
|
|
|
|
|
|
width="200"
|
|
|
|
|
|
/>
|
|
|
|
|
|
<el-table-column
|
|
|
|
|
|
label="所属大仓"
|
|
|
|
|
|
align="center"
|
|
|
|
|
|
prop="parentWarehouseName"
|
|
|
|
|
|
width="150"
|
|
|
|
|
|
/>
|
|
|
|
|
|
<el-table-column
|
|
|
|
|
|
label="所属小仓"
|
|
|
|
|
|
align="center"
|
|
|
|
|
|
prop="warehouseName"
|
|
|
|
|
|
width="150"
|
|
|
|
|
|
/>
|
2026-01-20 16:56:01 +08:00
|
|
|
|
<el-table-column label="库龄" align="center" prop="stockAge" />
|
2026-01-21 17:40:42 +08:00
|
|
|
|
<el-table-column
|
|
|
|
|
|
label="现场图片"
|
|
|
|
|
|
align="center"
|
|
|
|
|
|
v-if="isExamine == 1"
|
|
|
|
|
|
>
|
2026-01-20 16:56:01 +08:00
|
|
|
|
<template #default="scope">
|
2026-01-21 17:40:42 +08:00
|
|
|
|
<el-image
|
|
|
|
|
|
:src="scope.row.scenePhotoUrl"
|
|
|
|
|
|
style="width: 50px; height: 50px"
|
|
|
|
|
|
:zoom-rate="1.2"
|
|
|
|
|
|
:max-scale="7"
|
|
|
|
|
|
:min-scale="0.2"
|
|
|
|
|
|
:preview-src-list="srcList"
|
|
|
|
|
|
show-progress
|
|
|
|
|
|
:initial-index="4"
|
|
|
|
|
|
:preview-teleported="true"
|
|
|
|
|
|
@click="preview(scope.row.scenePhotoUrl)"
|
|
|
|
|
|
/>
|
2026-01-20 16:56:01 +08:00
|
|
|
|
</template>
|
|
|
|
|
|
</el-table-column>
|
2026-01-21 17:40:42 +08:00
|
|
|
|
<el-table-column
|
|
|
|
|
|
label="备注"
|
|
|
|
|
|
align="center"
|
|
|
|
|
|
prop="remark"
|
|
|
|
|
|
width="200"
|
|
|
|
|
|
/>
|
|
|
|
|
|
<el-table-column
|
|
|
|
|
|
label="一次封样号"
|
|
|
|
|
|
align="center"
|
|
|
|
|
|
prop="fycde1"
|
|
|
|
|
|
width="150"
|
|
|
|
|
|
/>
|
|
|
|
|
|
<el-table-column
|
|
|
|
|
|
label="二次封样号"
|
|
|
|
|
|
align="center"
|
|
|
|
|
|
prop="fycde2"
|
|
|
|
|
|
width="150"
|
|
|
|
|
|
/>
|
|
|
|
|
|
<el-table-column
|
|
|
|
|
|
label="操作"
|
|
|
|
|
|
align="center"
|
|
|
|
|
|
class-name="small-padding fixed-width"
|
|
|
|
|
|
width="150"
|
|
|
|
|
|
>
|
2026-01-20 16:56:01 +08:00
|
|
|
|
<template #default="scope">
|
2026-01-21 17:40:42 +08:00
|
|
|
|
<el-button
|
|
|
|
|
|
link
|
|
|
|
|
|
type="primary"
|
|
|
|
|
|
icon="Edit"
|
|
|
|
|
|
@click="handleUpdate(scope.row)"
|
|
|
|
|
|
v-hasPermi="['wisdom:bill:edit']"
|
|
|
|
|
|
>修改</el-button
|
|
|
|
|
|
>
|
|
|
|
|
|
<el-button
|
|
|
|
|
|
link
|
|
|
|
|
|
type="primary"
|
|
|
|
|
|
icon="Delete"
|
|
|
|
|
|
v-show="scope.row.execStatus == 1"
|
|
|
|
|
|
@click="handleStockDelete(scope.row)"
|
|
|
|
|
|
v-hasPermi="['wisdom:bill:delete']"
|
|
|
|
|
|
>撤销</el-button
|
|
|
|
|
|
>
|
2026-01-20 16:56:01 +08:00
|
|
|
|
</template>
|
|
|
|
|
|
</el-table-column>
|
|
|
|
|
|
</el-table>
|
|
|
|
|
|
</el-splitter-panel>
|
|
|
|
|
|
</el-splitter>
|
|
|
|
|
|
|
|
|
|
|
|
<!-- 打印 -->
|
2026-01-21 17:40:42 +08:00
|
|
|
|
<div id="printMe" class="printMeBox" v-if="showContent">
|
|
|
|
|
|
<printBill :billAllObj="stockList" />
|
2026-01-20 16:56:01 +08:00
|
|
|
|
</div>
|
|
|
|
|
|
<!-- 修改主单据,入库时间等字段 -->
|
2026-01-21 17:40:42 +08:00
|
|
|
|
<el-dialog
|
|
|
|
|
|
title="修改"
|
|
|
|
|
|
v-model="openBill"
|
|
|
|
|
|
@close="closeDialog"
|
|
|
|
|
|
append-to-body
|
|
|
|
|
|
width="40%"
|
|
|
|
|
|
>
|
|
|
|
|
|
<el-form :model="billData" :rules="rules" label-width="100px">
|
2026-01-20 16:56:01 +08:00
|
|
|
|
<el-row :gutter="20">
|
|
|
|
|
|
<el-col :span="12">
|
2026-01-21 17:40:42 +08:00
|
|
|
|
<el-form-item label="入库类型" prop="operationType">
|
|
|
|
|
|
<el-select
|
|
|
|
|
|
v-model="billData.operationType"
|
|
|
|
|
|
placeholder="请选择入库类型"
|
|
|
|
|
|
clearable
|
|
|
|
|
|
>
|
|
|
|
|
|
<el-option
|
|
|
|
|
|
v-for="dict in storeTypeList"
|
|
|
|
|
|
:key="dict.id"
|
|
|
|
|
|
:label="dict.typeName"
|
|
|
|
|
|
:value="dict.typeCode"
|
|
|
|
|
|
/>
|
2026-01-20 16:56:01 +08:00
|
|
|
|
</el-select>
|
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
</el-col>
|
|
|
|
|
|
<el-col :span="12">
|
2026-01-21 17:40:42 +08:00
|
|
|
|
<el-form-item label="物资类型" prop="wlType">
|
|
|
|
|
|
<el-select
|
|
|
|
|
|
v-model="billData.wlType"
|
|
|
|
|
|
placeholder="请选择物资类型"
|
|
|
|
|
|
clearable
|
|
|
|
|
|
>
|
|
|
|
|
|
<el-option
|
|
|
|
|
|
v-for="dict in wzTypeList"
|
|
|
|
|
|
:key="dict.id"
|
|
|
|
|
|
:label="dict.typeName"
|
|
|
|
|
|
:value="dict.typeCode"
|
|
|
|
|
|
/>
|
2026-01-20 16:56:01 +08:00
|
|
|
|
</el-select>
|
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
</el-col>
|
|
|
|
|
|
</el-row>
|
|
|
|
|
|
<el-row :gutter="20">
|
2026-01-21 17:40:42 +08:00
|
|
|
|
<el-col :span="12">
|
|
|
|
|
|
<el-form-item label="理货员" prop="operator">
|
|
|
|
|
|
<el-select
|
|
|
|
|
|
v-model="billData.operator"
|
|
|
|
|
|
placeholder="请选择理货员"
|
|
|
|
|
|
clearable
|
|
|
|
|
|
>
|
|
|
|
|
|
<el-option
|
|
|
|
|
|
v-for="dict in personList"
|
|
|
|
|
|
:key="dict.userId"
|
|
|
|
|
|
:label="dict.userName"
|
|
|
|
|
|
:value="dict.userId"
|
|
|
|
|
|
/>
|
|
|
|
|
|
</el-select>
|
2026-01-20 16:56:01 +08:00
|
|
|
|
</el-form-item>
|
2026-01-21 17:40:42 +08:00
|
|
|
|
</el-col>
|
2026-01-20 16:56:01 +08:00
|
|
|
|
<el-col :span="12">
|
2026-01-21 17:40:42 +08:00
|
|
|
|
<el-form-item label="入库时间" prop="operationTime">
|
2026-01-20 16:56:01 +08:00
|
|
|
|
<el-date-picker
|
2026-01-21 17:40:42 +08:00
|
|
|
|
style="width: 100%"
|
|
|
|
|
|
v-model="billData.operationTime"
|
|
|
|
|
|
value-format="YYYY-MM-DD HH:mm:ss"
|
|
|
|
|
|
format="YYYY-MM-DD HH:mm:ss"
|
2026-01-20 16:56:01 +08:00
|
|
|
|
type="datetime"
|
|
|
|
|
|
/>
|
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
</el-col>
|
|
|
|
|
|
</el-row>
|
2026-01-21 17:40:42 +08:00
|
|
|
|
<el-row :gutter="20">
|
|
|
|
|
|
<el-col :span="12">
|
|
|
|
|
|
<el-form-item label="库存状态" prop="execStatus">
|
|
|
|
|
|
<el-select
|
|
|
|
|
|
v-model="billData.execStatus"
|
|
|
|
|
|
placeholder="请选择库存状态"
|
|
|
|
|
|
clearable
|
|
|
|
|
|
>
|
|
|
|
|
|
<el-option
|
|
|
|
|
|
v-for="dict in execStatusMenu"
|
|
|
|
|
|
:key="dict.value"
|
|
|
|
|
|
:label="dict.label"
|
|
|
|
|
|
:value="dict.value"
|
|
|
|
|
|
/>
|
|
|
|
|
|
</el-select>
|
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
</el-col>
|
|
|
|
|
|
</el-row>
|
2026-01-20 16:56:01 +08:00
|
|
|
|
</el-form>
|
|
|
|
|
|
<template #footer>
|
|
|
|
|
|
<div class="dialog-footer">
|
2026-01-21 17:40:42 +08:00
|
|
|
|
<el-button type="primary" @click="editForm">确 定</el-button>
|
2026-01-20 16:56:01 +08:00
|
|
|
|
</div>
|
|
|
|
|
|
</template>
|
|
|
|
|
|
</el-dialog>
|
|
|
|
|
|
<!-- 添加或修改库存单据主对话框 -->
|
2026-01-21 17:40:42 +08:00
|
|
|
|
<el-dialog
|
|
|
|
|
|
:title="title"
|
|
|
|
|
|
v-model="open"
|
|
|
|
|
|
@close="closeDialog"
|
|
|
|
|
|
width="75%"
|
|
|
|
|
|
:draggable="true"
|
|
|
|
|
|
:z-index="4"
|
|
|
|
|
|
:close-on-click-modal="false"
|
|
|
|
|
|
>
|
|
|
|
|
|
<el-form ref="stockRef" :model="storeData" :rules="rules">
|
|
|
|
|
|
<el-row :gutter="20" v-if="idEdit == 0">
|
2026-01-20 16:56:01 +08:00
|
|
|
|
<el-col :span="12">
|
2026-01-21 17:40:42 +08:00
|
|
|
|
<el-form-item label="采购订单号">
|
|
|
|
|
|
<el-input
|
|
|
|
|
|
v-model="orderNum"
|
|
|
|
|
|
placeholder="请输入订单号"
|
|
|
|
|
|
:disabled="idEdit != 0"
|
|
|
|
|
|
@keydown.enter="searchPlan"
|
|
|
|
|
|
/>
|
2026-01-20 16:56:01 +08:00
|
|
|
|
</el-form-item>
|
|
|
|
|
|
</el-col>
|
|
|
|
|
|
<el-col :span="12">
|
2026-01-21 17:40:42 +08:00
|
|
|
|
<el-button
|
|
|
|
|
|
type="primary"
|
|
|
|
|
|
@click="searchPlan"
|
|
|
|
|
|
:disabled="idEdit != 0"
|
|
|
|
|
|
>从供应计划中添加</el-button
|
|
|
|
|
|
>
|
2026-01-20 16:56:01 +08:00
|
|
|
|
</el-col>
|
|
|
|
|
|
</el-row>
|
2026-01-21 17:40:42 +08:00
|
|
|
|
<el-row :gutter="20" v-if="idEdit == 0">
|
2026-01-20 16:56:01 +08:00
|
|
|
|
<el-col :span="6">
|
2026-01-21 07:53:24 +08:00
|
|
|
|
<el-form-item label="入库类型" prop="operationType">
|
2026-01-21 17:40:42 +08:00
|
|
|
|
<el-select
|
|
|
|
|
|
v-model="storeData.operationType"
|
|
|
|
|
|
placeholder="请选择入库类型"
|
|
|
|
|
|
clearable
|
|
|
|
|
|
>
|
|
|
|
|
|
<el-option
|
|
|
|
|
|
v-for="dict in storeTypeList"
|
|
|
|
|
|
:key="dict.id"
|
|
|
|
|
|
:label="dict.typeName"
|
|
|
|
|
|
:value="dict.typeCode"
|
|
|
|
|
|
/>
|
2026-01-20 16:56:01 +08:00
|
|
|
|
</el-select>
|
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
</el-col>
|
|
|
|
|
|
<el-col :span="6">
|
|
|
|
|
|
<el-form-item label="物资类型" prop="wlType">
|
2026-01-21 17:40:42 +08:00
|
|
|
|
<el-select
|
|
|
|
|
|
v-model="storeData.wlType"
|
|
|
|
|
|
placeholder="请选择物资类型"
|
|
|
|
|
|
clearable
|
|
|
|
|
|
>
|
|
|
|
|
|
<el-option
|
|
|
|
|
|
v-for="dict in wzTypeList"
|
|
|
|
|
|
:key="dict.id"
|
|
|
|
|
|
:label="dict.typeName"
|
|
|
|
|
|
:value="dict.typeCode"
|
|
|
|
|
|
/>
|
2026-01-20 16:56:01 +08:00
|
|
|
|
</el-select>
|
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
</el-col>
|
|
|
|
|
|
<el-col :span="6">
|
|
|
|
|
|
<el-form-item label="所属仓库" prop="warehouseCode">
|
2026-01-21 17:40:42 +08:00
|
|
|
|
<el-cascader
|
|
|
|
|
|
:options="warehouseList"
|
|
|
|
|
|
@change="pcodeList"
|
|
|
|
|
|
v-model="storeData.warehouseCode"
|
|
|
|
|
|
:props="{
|
|
|
|
|
|
children: 'children',
|
|
|
|
|
|
label: 'warehouseName',
|
|
|
|
|
|
value: 'warehouseCode',
|
|
|
|
|
|
}"
|
|
|
|
|
|
/>
|
2026-01-20 16:56:01 +08:00
|
|
|
|
</el-form-item>
|
|
|
|
|
|
</el-col>
|
|
|
|
|
|
<el-col :span="6">
|
2026-01-21 17:40:42 +08:00
|
|
|
|
<el-form-item label="理货员" prop="operator">
|
|
|
|
|
|
<el-select
|
|
|
|
|
|
v-model="storeData.operator"
|
|
|
|
|
|
placeholder="请选择理货员"
|
|
|
|
|
|
clearable
|
|
|
|
|
|
>
|
|
|
|
|
|
<el-option
|
|
|
|
|
|
v-for="dict in personList"
|
|
|
|
|
|
:key="dict.userId"
|
|
|
|
|
|
:label="dict.userName"
|
|
|
|
|
|
:value="dict.userId"
|
|
|
|
|
|
/>
|
2026-01-20 16:56:01 +08:00
|
|
|
|
</el-select>
|
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
</el-col>
|
|
|
|
|
|
</el-row>
|
2026-01-21 17:40:42 +08:00
|
|
|
|
<el-row :gutter="20" v-if="idEdit == 0">
|
2026-01-20 16:56:01 +08:00
|
|
|
|
<el-col :span="6">
|
2026-01-21 17:40:42 +08:00
|
|
|
|
<el-form-item label="入库时间" prop="operationTime">
|
2026-01-20 16:56:01 +08:00
|
|
|
|
<!-- type="date" -->
|
|
|
|
|
|
<el-date-picker
|
2026-01-21 17:40:42 +08:00
|
|
|
|
v-model="storeData.operationTime"
|
2026-01-21 07:53:24 +08:00
|
|
|
|
value-format="YYYY-MM-DD HH:mm:ss"
|
|
|
|
|
|
format="YYYY-MM-DD HH:mm:ss"
|
2026-01-20 16:56:01 +08:00
|
|
|
|
type="datetime"
|
|
|
|
|
|
placeholder="请选择入库时间"
|
2026-01-21 17:40:42 +08:00
|
|
|
|
style="width: 100%"
|
2026-01-20 16:56:01 +08:00
|
|
|
|
/>
|
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
</el-col>
|
2026-01-21 07:53:24 +08:00
|
|
|
|
<el-col :span="6">
|
|
|
|
|
|
<el-form-item label="是否预入库" prop="execStatus">
|
2026-01-21 17:40:42 +08:00
|
|
|
|
<el-select
|
|
|
|
|
|
v-model="storeData.execStatus"
|
|
|
|
|
|
placeholder="请选择"
|
|
|
|
|
|
clearable
|
|
|
|
|
|
>
|
|
|
|
|
|
<el-option
|
|
|
|
|
|
v-for="dict in execStatusList"
|
|
|
|
|
|
:key="dict.id"
|
|
|
|
|
|
:label="dict.name"
|
|
|
|
|
|
:value="dict.id"
|
|
|
|
|
|
/>
|
2026-01-21 07:53:24 +08:00
|
|
|
|
</el-select>
|
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
</el-col>
|
|
|
|
|
|
<el-col :span="6">
|
2026-01-21 17:40:42 +08:00
|
|
|
|
<el-form-item label="扩展描述">
|
|
|
|
|
|
<el-input
|
|
|
|
|
|
v-model="kzms"
|
|
|
|
|
|
placeholder="请输入扩展描述"
|
|
|
|
|
|
:disabled="idEdit != 0"
|
|
|
|
|
|
/>
|
2026-01-20 16:56:01 +08:00
|
|
|
|
</el-form-item>
|
|
|
|
|
|
</el-col>
|
|
|
|
|
|
<el-col :span="4">
|
2026-01-21 17:40:42 +08:00
|
|
|
|
<el-checkbox
|
|
|
|
|
|
v-model="autoFill"
|
|
|
|
|
|
label="自动填充"
|
|
|
|
|
|
size="large"
|
|
|
|
|
|
@change="autoFillFun"
|
|
|
|
|
|
:disabled="idEdit != 0"
|
|
|
|
|
|
/>
|
2026-01-20 16:56:01 +08:00
|
|
|
|
</el-col>
|
|
|
|
|
|
<el-col :span="2">
|
2026-01-21 17:40:42 +08:00
|
|
|
|
<el-button
|
|
|
|
|
|
type="primary"
|
|
|
|
|
|
@click="addLineFun"
|
|
|
|
|
|
:disabled="idEdit != 0"
|
|
|
|
|
|
>添加</el-button
|
|
|
|
|
|
>
|
2026-01-20 16:56:01 +08:00
|
|
|
|
</el-col>
|
|
|
|
|
|
</el-row>
|
2026-01-21 17:40:42 +08:00
|
|
|
|
<el-table
|
|
|
|
|
|
:data="planList"
|
|
|
|
|
|
height="400"
|
|
|
|
|
|
style="width: 100%"
|
|
|
|
|
|
show-overflow-tooltip
|
|
|
|
|
|
:row-class-name="tableRowClassName"
|
|
|
|
|
|
@selection-change="handleSelectionChange"
|
|
|
|
|
|
>
|
2026-01-20 16:56:01 +08:00
|
|
|
|
<el-table-column type="selection" width="30" align="center" />
|
2026-01-21 17:40:42 +08:00
|
|
|
|
<el-table-column
|
|
|
|
|
|
label="序号"
|
|
|
|
|
|
align="center"
|
|
|
|
|
|
type="index"
|
|
|
|
|
|
width="50"
|
|
|
|
|
|
/>
|
|
|
|
|
|
<el-table-column
|
|
|
|
|
|
label="状态"
|
|
|
|
|
|
align="center"
|
|
|
|
|
|
prop="status"
|
|
|
|
|
|
width="100"
|
|
|
|
|
|
>
|
2026-01-20 16:56:01 +08:00
|
|
|
|
<template #default="scoped">
|
2026-01-21 17:40:42 +08:00
|
|
|
|
<el-tag
|
|
|
|
|
|
:type="
|
|
|
|
|
|
scoped.row.status == 1
|
|
|
|
|
|
? 'success'
|
|
|
|
|
|
: scoped.row.status == 0
|
|
|
|
|
|
? 'danger'
|
|
|
|
|
|
: 'warning'
|
|
|
|
|
|
"
|
|
|
|
|
|
>{{
|
|
|
|
|
|
statusList.filter(
|
|
|
|
|
|
(item) => item.value == scoped.row.status
|
|
|
|
|
|
)[0].label
|
|
|
|
|
|
}}</el-tag
|
|
|
|
|
|
>
|
2026-01-20 16:56:01 +08:00
|
|
|
|
</template>
|
|
|
|
|
|
</el-table-column>
|
2026-01-21 17:40:42 +08:00
|
|
|
|
<el-table-column width="40" align="center">
|
|
|
|
|
|
<template #default="scope">
|
|
|
|
|
|
<el-icon :size="22" @click="delLineFun(scope.$index)"
|
|
|
|
|
|
><RemoveFilled
|
|
|
|
|
|
/></el-icon>
|
2026-01-20 16:56:01 +08:00
|
|
|
|
</template>
|
|
|
|
|
|
</el-table-column>
|
2026-01-21 17:40:42 +08:00
|
|
|
|
<el-table-column
|
|
|
|
|
|
label="物料号"
|
|
|
|
|
|
align="center"
|
|
|
|
|
|
prop="wlNo"
|
|
|
|
|
|
width="150"
|
|
|
|
|
|
>
|
|
|
|
|
|
<template #default="scope">
|
|
|
|
|
|
<el-input
|
|
|
|
|
|
v-if="scope.row.isnew"
|
|
|
|
|
|
v-model="scope.row.wlNo"
|
|
|
|
|
|
placeholder="请输入物料号"
|
|
|
|
|
|
@change="searchInfo(scope.row.wlNo, scope.$index)"
|
|
|
|
|
|
></el-input>
|
2026-01-20 16:56:01 +08:00
|
|
|
|
</template>
|
|
|
|
|
|
</el-table-column>
|
2026-01-21 17:40:42 +08:00
|
|
|
|
<el-table-column
|
|
|
|
|
|
label="物料描述"
|
|
|
|
|
|
align="center"
|
|
|
|
|
|
prop="wlMs"
|
|
|
|
|
|
width="200"
|
|
|
|
|
|
>
|
|
|
|
|
|
<template #default="scope">
|
|
|
|
|
|
<el-input
|
|
|
|
|
|
v-if="scope.row.isnew"
|
|
|
|
|
|
v-model="scope.row.wlMs"
|
|
|
|
|
|
placeholder="请输入物料描述"
|
|
|
|
|
|
></el-input>
|
2026-01-20 16:56:01 +08:00
|
|
|
|
</template>
|
|
|
|
|
|
</el-table-column>
|
|
|
|
|
|
<el-table-column label="单价" align="center" prop="htDj" width="80">
|
2026-01-21 17:40:42 +08:00
|
|
|
|
<template #default="scope">
|
|
|
|
|
|
<el-input
|
|
|
|
|
|
v-if="scope.row.isnew"
|
|
|
|
|
|
v-model="scope.row.htDj"
|
|
|
|
|
|
></el-input>
|
2026-01-20 16:56:01 +08:00
|
|
|
|
</template>
|
|
|
|
|
|
</el-table-column>
|
|
|
|
|
|
<el-table-column label="单位" align="center" prop="dw" width="80">
|
2026-01-21 17:40:42 +08:00
|
|
|
|
<template #default="scope">
|
|
|
|
|
|
<el-input
|
|
|
|
|
|
v-if="scope.row.isnew"
|
|
|
|
|
|
v-model="scope.row.dw"
|
|
|
|
|
|
></el-input>
|
2026-01-20 16:56:01 +08:00
|
|
|
|
</template>
|
|
|
|
|
|
</el-table-column>
|
2026-01-21 17:40:42 +08:00
|
|
|
|
<el-table-column label="库位" align="center" width="150">
|
|
|
|
|
|
<template #default="scope">
|
2026-01-20 16:56:01 +08:00
|
|
|
|
<el-select
|
|
|
|
|
|
v-model="scope.row.pcode"
|
2026-01-21 17:40:42 +08:00
|
|
|
|
:disabled="idEdit != 0"
|
2026-01-20 16:56:01 +08:00
|
|
|
|
clearable
|
|
|
|
|
|
filterable
|
|
|
|
|
|
placeholder="请选择库位"
|
|
|
|
|
|
>
|
|
|
|
|
|
<el-option
|
|
|
|
|
|
v-for="item in kwOptions"
|
|
|
|
|
|
:key="item.id"
|
|
|
|
|
|
:label="item.pcode"
|
|
|
|
|
|
:value="item.pcode"
|
|
|
|
|
|
/>
|
|
|
|
|
|
</el-select>
|
|
|
|
|
|
</template>
|
|
|
|
|
|
</el-table-column>
|
2026-01-21 17:40:42 +08:00
|
|
|
|
<el-table-column label="入库数量" align="center" width="150">
|
2026-01-20 16:56:01 +08:00
|
|
|
|
<template #default="scope">
|
|
|
|
|
|
<el-input v-model="scope.row.realQty" placeholder="入库数量">
|
|
|
|
|
|
<template #append>
|
2026-01-21 17:40:42 +08:00
|
|
|
|
<el-button :icon="Plus" @click="addNum(scope.row)" />
|
2026-01-20 16:56:01 +08:00
|
|
|
|
</template>
|
|
|
|
|
|
</el-input>
|
|
|
|
|
|
</template>
|
|
|
|
|
|
</el-table-column>
|
2026-01-21 17:40:42 +08:00
|
|
|
|
<el-table-column label="备注" align="center" width="200">
|
2026-01-20 16:56:01 +08:00
|
|
|
|
<template #default="scope">
|
2026-01-21 17:40:42 +08:00
|
|
|
|
<el-input
|
|
|
|
|
|
v-model="scope.row.remark"
|
|
|
|
|
|
placeholder="请输入备注"
|
|
|
|
|
|
></el-input>
|
2026-01-20 16:56:01 +08:00
|
|
|
|
</template>
|
|
|
|
|
|
</el-table-column>
|
2026-01-21 17:40:42 +08:00
|
|
|
|
<el-table-column label="容器码" align="center" width="150">
|
2026-01-20 16:56:01 +08:00
|
|
|
|
<template #default="scope">
|
2026-01-21 17:40:42 +08:00
|
|
|
|
<el-input
|
|
|
|
|
|
v-model="scope.row.trayCode"
|
|
|
|
|
|
placeholder="请输入容器码"
|
|
|
|
|
|
></el-input>
|
2026-01-20 16:56:01 +08:00
|
|
|
|
</template>
|
|
|
|
|
|
</el-table-column>
|
2026-01-21 17:40:42 +08:00
|
|
|
|
<el-table-column label="身份码" align="center" width="200">
|
2026-01-20 16:56:01 +08:00
|
|
|
|
<template #default="scope">
|
2026-01-21 17:40:42 +08:00
|
|
|
|
<el-input
|
|
|
|
|
|
v-model="scope.row.entityId"
|
|
|
|
|
|
placeholder="请输入身份码"
|
|
|
|
|
|
></el-input>
|
2026-01-20 16:56:01 +08:00
|
|
|
|
</template>
|
|
|
|
|
|
</el-table-column>
|
2026-01-21 17:40:42 +08:00
|
|
|
|
<el-table-column
|
|
|
|
|
|
label="采购订单号"
|
|
|
|
|
|
align="center"
|
|
|
|
|
|
prop="sapNo"
|
|
|
|
|
|
width="130"
|
|
|
|
|
|
>
|
|
|
|
|
|
<template #default="scope">
|
|
|
|
|
|
<el-input
|
|
|
|
|
|
v-if="scope.row.isnew"
|
|
|
|
|
|
v-model="scope.row.sapNo"
|
|
|
|
|
|
placeholder="请输入订单号"
|
|
|
|
|
|
></el-input>
|
2026-01-20 16:56:01 +08:00
|
|
|
|
</template>
|
|
|
|
|
|
</el-table-column>
|
2026-01-21 17:40:42 +08:00
|
|
|
|
<el-table-column
|
|
|
|
|
|
label="项目定义号"
|
|
|
|
|
|
align="center"
|
|
|
|
|
|
prop="xmNo"
|
|
|
|
|
|
width="150"
|
|
|
|
|
|
>
|
|
|
|
|
|
<template #default="scope">
|
|
|
|
|
|
<el-input
|
|
|
|
|
|
v-if="scope.row.isnew"
|
|
|
|
|
|
v-model="scope.row.xmNo"
|
|
|
|
|
|
placeholder="项目定义号"
|
|
|
|
|
|
></el-input>
|
2026-01-20 16:56:01 +08:00
|
|
|
|
</template>
|
|
|
|
|
|
</el-table-column>
|
2026-01-21 17:40:42 +08:00
|
|
|
|
<el-table-column
|
|
|
|
|
|
label="项目名称"
|
|
|
|
|
|
align="center"
|
|
|
|
|
|
prop="xmMs"
|
|
|
|
|
|
width="300"
|
|
|
|
|
|
>
|
|
|
|
|
|
<template #default="scope">
|
|
|
|
|
|
<el-input
|
|
|
|
|
|
v-if="scope.row.isnew"
|
|
|
|
|
|
v-model="scope.row.xmMs"
|
|
|
|
|
|
placeholder="项目名称"
|
|
|
|
|
|
></el-input>
|
2026-01-20 16:56:01 +08:00
|
|
|
|
</template>
|
|
|
|
|
|
</el-table-column>
|
2026-01-21 17:40:42 +08:00
|
|
|
|
<el-table-column
|
|
|
|
|
|
label="供应商"
|
|
|
|
|
|
align="center"
|
|
|
|
|
|
prop="gysMc"
|
|
|
|
|
|
width="200"
|
|
|
|
|
|
>
|
|
|
|
|
|
<template #default="scope">
|
|
|
|
|
|
<el-input
|
|
|
|
|
|
v-if="scope.row.isnew"
|
|
|
|
|
|
v-model="scope.row.gysMc"
|
|
|
|
|
|
placeholder="供应商"
|
|
|
|
|
|
></el-input>
|
2026-01-20 16:56:01 +08:00
|
|
|
|
</template>
|
|
|
|
|
|
</el-table-column>
|
2026-01-21 17:40:42 +08:00
|
|
|
|
<el-table-column label="一次封样号" align="center" width="200">
|
2026-01-20 16:56:01 +08:00
|
|
|
|
<template #default="scope">
|
2026-01-21 17:40:42 +08:00
|
|
|
|
<el-input
|
|
|
|
|
|
v-model="scope.row.fycde1"
|
|
|
|
|
|
placeholder="请输入一次封样号"
|
|
|
|
|
|
></el-input>
|
2026-01-20 16:56:01 +08:00
|
|
|
|
</template>
|
|
|
|
|
|
</el-table-column>
|
2026-01-21 17:40:42 +08:00
|
|
|
|
<el-table-column label="二次封样号" align="center" width="200">
|
2026-01-20 16:56:01 +08:00
|
|
|
|
<template #default="scope">
|
2026-01-21 17:40:42 +08:00
|
|
|
|
<el-input
|
|
|
|
|
|
v-model="scope.row.fycde2"
|
|
|
|
|
|
placeholder="请输入二次封样号"
|
|
|
|
|
|
></el-input>
|
2026-01-20 16:56:01 +08:00
|
|
|
|
</template>
|
|
|
|
|
|
</el-table-column>
|
2026-01-21 17:40:42 +08:00
|
|
|
|
|
|
|
|
|
|
<el-table-column
|
|
|
|
|
|
label="上传"
|
|
|
|
|
|
align="center"
|
|
|
|
|
|
width="150"
|
|
|
|
|
|
v-if="isExamine == 1"
|
|
|
|
|
|
>
|
2026-01-20 16:56:01 +08:00
|
|
|
|
<template #default="scope">
|
|
|
|
|
|
<el-upload
|
|
|
|
|
|
class="upload-demo"
|
|
|
|
|
|
:action="actionUrl"
|
|
|
|
|
|
:multiple="false"
|
|
|
|
|
|
:headers="headers"
|
|
|
|
|
|
:on-preview="handlePreview"
|
2026-01-21 17:40:42 +08:00
|
|
|
|
:on-remove="
|
|
|
|
|
|
function (response) {
|
|
|
|
|
|
return handleRemove(
|
|
|
|
|
|
response,
|
|
|
|
|
|
scope.row.id,
|
|
|
|
|
|
scope.row.pcode
|
|
|
|
|
|
);
|
|
|
|
|
|
}
|
|
|
|
|
|
"
|
|
|
|
|
|
:on-success="
|
|
|
|
|
|
function (response) {
|
|
|
|
|
|
return handleAvatarSuccess(
|
|
|
|
|
|
response,
|
|
|
|
|
|
scope.row.id,
|
|
|
|
|
|
scope.row.pcode
|
|
|
|
|
|
);
|
|
|
|
|
|
}
|
|
|
|
|
|
"
|
2026-01-20 16:56:01 +08:00
|
|
|
|
>
|
2026-01-21 17:40:42 +08:00
|
|
|
|
<el-button
|
|
|
|
|
|
type="primary"
|
|
|
|
|
|
size="small"
|
|
|
|
|
|
v-show="!scope.row.photoUrl && scope.row.pcode"
|
|
|
|
|
|
>选择图片</el-button
|
|
|
|
|
|
>
|
2026-01-20 16:56:01 +08:00
|
|
|
|
</el-upload>
|
|
|
|
|
|
</template>
|
|
|
|
|
|
</el-table-column>
|
|
|
|
|
|
</el-table>
|
|
|
|
|
|
<!-- 审批模块 暂时注释-->
|
2026-01-21 17:40:42 +08:00
|
|
|
|
<div class="examine" v-show="isExamine == 1">
|
2026-01-20 16:56:01 +08:00
|
|
|
|
<el-row :gutter="20">
|
|
|
|
|
|
<el-col :span="8">
|
2026-01-21 17:40:42 +08:00
|
|
|
|
<el-form-item label="审批人">
|
2026-01-20 16:56:01 +08:00
|
|
|
|
<el-select
|
|
|
|
|
|
v-model="storeData.approverId"
|
|
|
|
|
|
clearable
|
|
|
|
|
|
filterable
|
|
|
|
|
|
placeholder="请选择审批人"
|
|
|
|
|
|
>
|
2026-01-21 17:40:42 +08:00
|
|
|
|
<el-option
|
|
|
|
|
|
v-for="dict in personList"
|
|
|
|
|
|
:key="dict.userId"
|
|
|
|
|
|
:label="dict.userName"
|
|
|
|
|
|
:value="dict.userId"
|
|
|
|
|
|
/>
|
2026-01-20 16:56:01 +08:00
|
|
|
|
</el-select>
|
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
</el-col>
|
|
|
|
|
|
</el-row>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</el-form>
|
|
|
|
|
|
<template #footer>
|
|
|
|
|
|
<div class="dialog-footer">
|
2026-01-21 17:40:42 +08:00
|
|
|
|
<el-button type="primary" @click="submitForm">确 定</el-button>
|
2026-01-20 16:56:01 +08:00
|
|
|
|
<el-button @click="cancel">取 消</el-button>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</template>
|
|
|
|
|
|
</el-dialog>
|
2026-01-21 17:40:42 +08:00
|
|
|
|
<!-- 移库 -->
|
|
|
|
|
|
<el-dialog title="移库" v-model="openMove" append-to-body width="60%">
|
|
|
|
|
|
<el-form :model="checkStockList" :rules="rules">
|
2026-01-20 16:56:01 +08:00
|
|
|
|
<el-row :gutter="10">
|
|
|
|
|
|
<el-col :span="6">
|
2026-01-21 17:40:42 +08:00
|
|
|
|
<el-form-item label="物料号">
|
|
|
|
|
|
<el-input v-model="checkStockList[0].wlNo" disabled />
|
2026-01-20 16:56:01 +08:00
|
|
|
|
</el-form-item>
|
|
|
|
|
|
</el-col>
|
|
|
|
|
|
<el-col :span="6">
|
2026-01-21 17:40:42 +08:00
|
|
|
|
<el-form-item label="项目号">
|
|
|
|
|
|
<el-input v-model="checkStockList[0].xmNo" disabled />
|
2026-01-20 16:56:01 +08:00
|
|
|
|
</el-form-item>
|
|
|
|
|
|
</el-col>
|
|
|
|
|
|
<el-col :span="6">
|
2026-01-21 17:40:42 +08:00
|
|
|
|
<el-form-item label="订单号">
|
|
|
|
|
|
<el-input v-model="checkStockList[0].sapNo" disabled />
|
2026-01-20 16:56:01 +08:00
|
|
|
|
</el-form-item>
|
|
|
|
|
|
</el-col>
|
|
|
|
|
|
<el-col :span="6">
|
2026-01-21 17:40:42 +08:00
|
|
|
|
<el-form-item label="项目描述">
|
|
|
|
|
|
<el-input v-model="checkStockList[0].xmMs" disabled />
|
2026-01-20 16:56:01 +08:00
|
|
|
|
</el-form-item>
|
|
|
|
|
|
</el-col>
|
|
|
|
|
|
</el-row>
|
2026-01-21 17:40:42 +08:00
|
|
|
|
<el-row>
|
2026-01-20 16:56:01 +08:00
|
|
|
|
<el-col :span="12">
|
2026-01-21 17:40:42 +08:00
|
|
|
|
<el-form-item label="移库原因">
|
2026-01-20 16:56:01 +08:00
|
|
|
|
<el-input v-model="moveReason" type="textarea" />
|
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
</el-col>
|
|
|
|
|
|
</el-row>
|
2026-01-21 17:40:42 +08:00
|
|
|
|
<el-table :data="checkStockList" height="400" style="width: 100%">
|
|
|
|
|
|
<el-table-column label="数量" align="center">
|
2026-01-20 16:56:01 +08:00
|
|
|
|
<template #default="scope">
|
|
|
|
|
|
<el-input v-model="scope.row.realQty" placeholder="数量">
|
|
|
|
|
|
</el-input>
|
|
|
|
|
|
</template>
|
|
|
|
|
|
</el-table-column>
|
2026-01-21 17:40:42 +08:00
|
|
|
|
<el-table-column label="存放位置" align="center">
|
|
|
|
|
|
<template #default="scope">
|
2026-01-20 16:56:01 +08:00
|
|
|
|
<el-select
|
|
|
|
|
|
v-model="scope.row.toPcode"
|
|
|
|
|
|
clearable
|
|
|
|
|
|
filterable
|
|
|
|
|
|
placeholder="请选择库位"
|
|
|
|
|
|
>
|
|
|
|
|
|
<el-option
|
|
|
|
|
|
v-for="item in kwOptions"
|
|
|
|
|
|
:key="item.id"
|
|
|
|
|
|
:label="item.pcode"
|
|
|
|
|
|
:value="item.pcode"
|
|
|
|
|
|
/>
|
|
|
|
|
|
</el-select>
|
|
|
|
|
|
</template>
|
|
|
|
|
|
</el-table-column>
|
2026-01-21 17:40:42 +08:00
|
|
|
|
<el-table-column label="容器码" align="center">
|
2026-01-20 16:56:01 +08:00
|
|
|
|
<template #default="scope">
|
2026-01-21 17:40:42 +08:00
|
|
|
|
<el-input
|
|
|
|
|
|
v-model="scope.row.toTrayCode"
|
|
|
|
|
|
placeholder="请输入容器码"
|
|
|
|
|
|
></el-input>
|
2026-01-20 16:56:01 +08:00
|
|
|
|
</template>
|
|
|
|
|
|
</el-table-column>
|
2026-01-21 17:40:42 +08:00
|
|
|
|
<el-table-column label="仓库" align="center">
|
|
|
|
|
|
<template #default="scope">
|
|
|
|
|
|
<el-cascader
|
|
|
|
|
|
:options="warehouseList"
|
2026-01-20 16:56:01 +08:00
|
|
|
|
v-model="scope.row.toCangku"
|
2026-01-21 17:40:42 +08:00
|
|
|
|
@change="pcodeList"
|
|
|
|
|
|
:props="{
|
|
|
|
|
|
children: 'children',
|
|
|
|
|
|
label: 'warehouseName',
|
|
|
|
|
|
value: 'warehouseCode',
|
|
|
|
|
|
}"
|
|
|
|
|
|
/>
|
2026-01-20 16:56:01 +08:00
|
|
|
|
</template>
|
|
|
|
|
|
</el-table-column>
|
|
|
|
|
|
</el-table>
|
|
|
|
|
|
</el-form>
|
|
|
|
|
|
<template #footer>
|
|
|
|
|
|
<div class="dialog-footer">
|
2026-01-21 17:40:42 +08:00
|
|
|
|
<el-button type="primary" @click="submitMoveForm">确 定</el-button>
|
2026-01-20 16:56:01 +08:00
|
|
|
|
<el-button @click="cancelMove">取 消</el-button>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</template>
|
|
|
|
|
|
</el-dialog>
|
|
|
|
|
|
<!-- 图片预览 -->
|
|
|
|
|
|
<el-dialog v-model="dialogVisible">
|
|
|
|
|
|
<img w-full :src="dialogImageUrl" alt="Preview Image" />
|
|
|
|
|
|
</el-dialog>
|
|
|
|
|
|
<!-- 上传图片 -->
|
|
|
|
|
|
<el-dialog title="图片上传" v-model="dialogPicVisible">
|
|
|
|
|
|
<el-upload
|
|
|
|
|
|
v-model:file-list="fileList"
|
|
|
|
|
|
:multiple="true"
|
|
|
|
|
|
list-type="picture-card"
|
|
|
|
|
|
:on-change="handleChange"
|
|
|
|
|
|
:auto-upload="false"
|
|
|
|
|
|
:on-preview="handlePictureCardPreview"
|
|
|
|
|
|
:on-remove="handleScRemove"
|
|
|
|
|
|
>
|
|
|
|
|
|
<el-icon><Plus /></el-icon>
|
|
|
|
|
|
</el-upload>
|
|
|
|
|
|
<template #footer>
|
|
|
|
|
|
<div class="dialog-footer">
|
2026-01-21 17:40:42 +08:00
|
|
|
|
<el-button type="primary" @click="submitUpload">上 传</el-button>
|
|
|
|
|
|
<el-button @click="dialogPicVisible = false">取 消</el-button>
|
2026-01-20 16:56:01 +08:00
|
|
|
|
</div>
|
|
|
|
|
|
</template>
|
|
|
|
|
|
</el-dialog>
|
|
|
|
|
|
<el-dialog title="图片详情" v-model="dialogPicDetailVisible">
|
|
|
|
|
|
<!-- <div v-for="url in picList" :key="url" > -->
|
2026-01-21 17:40:42 +08:00
|
|
|
|
<!-- <span class="demonstration">{{ fit }}</span> -->
|
|
|
|
|
|
<div class="picBox">
|
|
|
|
|
|
<div v-for="obj in picList" :key="obj.id" class="everyPicBox">
|
|
|
|
|
|
<el-icon class="closeBox" :size="23" @click="delPic(obj.id)"
|
|
|
|
|
|
><CircleCloseFilled
|
|
|
|
|
|
/></el-icon>
|
|
|
|
|
|
<el-image
|
|
|
|
|
|
style="width: 100px; height: 100px; margin-right: 20px"
|
|
|
|
|
|
:src="obj.url"
|
|
|
|
|
|
:preview-src-list="urlList"
|
|
|
|
|
|
/>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
2026-01-20 16:56:01 +08:00
|
|
|
|
<!-- </div> -->
|
|
|
|
|
|
</el-dialog>
|
|
|
|
|
|
|
2026-01-21 17:40:42 +08:00
|
|
|
|
<el-dialog
|
|
|
|
|
|
title="入库单"
|
|
|
|
|
|
v-model="dialogBill"
|
|
|
|
|
|
append-to-body
|
|
|
|
|
|
width="80%"
|
|
|
|
|
|
:close-on-click-modal="false"
|
|
|
|
|
|
>
|
|
|
|
|
|
<bill :billAllObj="billAllObj" billStatus="rk" />
|
2026-01-20 16:56:01 +08:00
|
|
|
|
<template #footer>
|
|
|
|
|
|
<div class="dialog-footer">
|
2026-01-21 17:40:42 +08:00
|
|
|
|
<el-button @click="dialogBill = false">关 闭</el-button>
|
2026-01-20 16:56:01 +08:00
|
|
|
|
</div>
|
|
|
|
|
|
</template>
|
|
|
|
|
|
</el-dialog>
|
2026-01-21 17:40:42 +08:00
|
|
|
|
<el-dialog
|
|
|
|
|
|
title="调度任务"
|
|
|
|
|
|
v-model="dispatchOpen"
|
|
|
|
|
|
width="30%"
|
|
|
|
|
|
:close-on-click-modal="false"
|
|
|
|
|
|
>
|
|
|
|
|
|
<el-form>
|
|
|
|
|
|
<el-row>
|
|
|
|
|
|
<el-col>
|
|
|
|
|
|
<el-form-item label="调度模式">
|
2026-01-20 16:56:01 +08:00
|
|
|
|
<el-radio-group v-model="resource">
|
|
|
|
|
|
<el-radio value="1">仅立库</el-radio>
|
|
|
|
|
|
<el-radio value="2">立库+AGV</el-radio>
|
|
|
|
|
|
</el-radio-group>
|
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
</el-col>
|
|
|
|
|
|
</el-row>
|
|
|
|
|
|
</el-form>
|
|
|
|
|
|
<template #footer>
|
|
|
|
|
|
<div class="dialog-footer">
|
2026-01-21 17:40:42 +08:00
|
|
|
|
<el-button type="primary" @click="submitDispatch">确 定</el-button>
|
2026-01-20 16:56:01 +08:00
|
|
|
|
</div>
|
|
|
|
|
|
</template>
|
|
|
|
|
|
</el-dialog>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</template>
|
|
|
|
|
|
|
2026-01-21 07:53:24 +08:00
|
|
|
|
<script setup name="Bill">
|
2026-01-20 16:56:01 +08:00
|
|
|
|
// wisdomDelStock
|
2026-01-21 17:40:42 +08:00
|
|
|
|
import {
|
|
|
|
|
|
listBill,
|
|
|
|
|
|
addBill,
|
|
|
|
|
|
updateBill,
|
|
|
|
|
|
listStock,
|
|
|
|
|
|
appendBill,
|
|
|
|
|
|
moveRecord,
|
|
|
|
|
|
updateRecord,
|
|
|
|
|
|
backoutRecord,
|
|
|
|
|
|
} from "@/api/wisdom/bill";
|
|
|
|
|
|
import {
|
|
|
|
|
|
uploadContract,
|
|
|
|
|
|
getStock,
|
|
|
|
|
|
delStock,
|
|
|
|
|
|
addStock,
|
|
|
|
|
|
updateStock,
|
|
|
|
|
|
getPlan,
|
|
|
|
|
|
moveHouse,
|
|
|
|
|
|
getAudit,
|
|
|
|
|
|
wisdomDelStock,
|
|
|
|
|
|
ckDelStock,
|
|
|
|
|
|
wlSearch,
|
|
|
|
|
|
picDetail,
|
|
|
|
|
|
printTag,
|
|
|
|
|
|
delPicF,
|
|
|
|
|
|
editBill,
|
|
|
|
|
|
addOneStock,
|
|
|
|
|
|
getEditInfo,
|
|
|
|
|
|
} from "@/api/wisdom/stock";
|
|
|
|
|
|
import { generateDispatch } from "@/api/wisdom/outbound";
|
2026-01-20 16:56:01 +08:00
|
|
|
|
import { getToken } from "@/utils/auth";
|
2026-01-21 17:40:42 +08:00
|
|
|
|
import { warehousingDict } from "@/api/information/warehousingtype"; //入库类型
|
|
|
|
|
|
import { materialtypeDict } from "@/api/information/materialtype"; //物资类型
|
|
|
|
|
|
import { warehouseAll } from "@/api/information/warehouseinfo"; //所属仓库
|
|
|
|
|
|
import { personListDict } from "@/api/system/user"; //理货员
|
|
|
|
|
|
import { getKwAllList } from "@/api/information/pcdedetail"; //库位下拉数据
|
|
|
|
|
|
import { Plus } from "@element-plus/icons-vue";
|
|
|
|
|
|
import bill from "@/components/storageBill/bill.vue";
|
|
|
|
|
|
import printBill from "@/components/printBill/bill.vue";
|
2026-01-20 16:56:01 +08:00
|
|
|
|
import { ref } from "vue";
|
|
|
|
|
|
|
|
|
|
|
|
const headers = ref({
|
2026-01-21 17:40:42 +08:00
|
|
|
|
Authorization: "Bearer " + getToken(),
|
2026-01-20 16:56:01 +08:00
|
|
|
|
});
|
|
|
|
|
|
const { proxy } = getCurrentInstance();
|
|
|
|
|
|
|
|
|
|
|
|
const open = ref(false);
|
2026-01-21 17:40:42 +08:00
|
|
|
|
|
2026-01-20 16:56:01 +08:00
|
|
|
|
const showSearch = ref(true);
|
|
|
|
|
|
const idEdit = ref(0);
|
|
|
|
|
|
const title = ref("");
|
|
|
|
|
|
const planLoading = ref(true);
|
|
|
|
|
|
const planList = ref([]); //从供应计划中添加列表
|
2026-01-21 07:53:24 +08:00
|
|
|
|
|
2026-01-21 17:40:42 +08:00
|
|
|
|
const orderNum = ref(""); //搜索条件:订单号
|
|
|
|
|
|
const kwOptions = ref([]); //库位下拉
|
2026-01-20 16:56:01 +08:00
|
|
|
|
const showContent = ref(false); // 控制打印内容是否显示
|
2026-01-21 17:40:42 +08:00
|
|
|
|
const dateStr = ref(""); //打印单据生成的日期
|
2026-01-20 16:56:01 +08:00
|
|
|
|
const storeStatusList = ref([
|
2026-01-21 17:40:42 +08:00
|
|
|
|
{ id: 0, statusName: "已入库" },
|
|
|
|
|
|
{ id: 1, statusName: "已出库" },
|
|
|
|
|
|
]);
|
2026-01-20 16:56:01 +08:00
|
|
|
|
const printNumList = ref([
|
2026-01-21 17:40:42 +08:00
|
|
|
|
{ id: 1, statusName: "1" },
|
|
|
|
|
|
{ id: 2, statusName: "2" },
|
|
|
|
|
|
{ id: 3, statusName: "3" },
|
|
|
|
|
|
{ id: 4, statusName: "4" },
|
|
|
|
|
|
]);
|
|
|
|
|
|
const printNum = ref(0); //打印机编号
|
|
|
|
|
|
const moveReason = ref(""); //移库原因
|
|
|
|
|
|
const operationTime = ref([]);
|
|
|
|
|
|
const actionUrl =
|
|
|
|
|
|
import.meta.env.VITE_APP_BASE_API + "/wisdom/signature/upload";
|
2026-01-20 16:56:01 +08:00
|
|
|
|
// const actionUrla = import.meta.env.VITE_APP_BASE_API+"/photo/upload/batch"
|
2026-01-21 17:40:42 +08:00
|
|
|
|
const dialogImageUrl = ref("");
|
|
|
|
|
|
const dialogVisible = ref(false);
|
|
|
|
|
|
const srcList = ref([]);
|
|
|
|
|
|
const autoFill = ref(false); //是否自动填充备注
|
|
|
|
|
|
const kzms = ref("");
|
|
|
|
|
|
|
2026-01-20 16:56:01 +08:00
|
|
|
|
const billObj = ref({
|
2026-01-21 17:40:42 +08:00
|
|
|
|
billNo: "",
|
|
|
|
|
|
type: null,
|
|
|
|
|
|
});
|
2026-01-20 16:56:01 +08:00
|
|
|
|
const uploadParams = ref({
|
2026-01-21 17:40:42 +08:00
|
|
|
|
photoType: null,
|
|
|
|
|
|
billNo: "",
|
|
|
|
|
|
typeName: "",
|
|
|
|
|
|
gysMc: "",
|
|
|
|
|
|
xmMs: "",
|
|
|
|
|
|
});
|
|
|
|
|
|
const picList = ref([]);
|
|
|
|
|
|
const urlList = ref([]);
|
2026-01-20 16:56:01 +08:00
|
|
|
|
// const fileList = ref([])
|
2026-01-21 17:40:42 +08:00
|
|
|
|
const dialogPicVisible = ref(false);
|
|
|
|
|
|
const dialogPicDetailVisible = ref(false);
|
|
|
|
|
|
const isSingle = ref(false);
|
|
|
|
|
|
const resource = ref(""); //调度模式 1仅立库;2立库+AGV
|
|
|
|
|
|
const dispatchOpen = ref(false); //调度任务弹窗
|
2026-01-20 16:56:01 +08:00
|
|
|
|
|
|
|
|
|
|
const data = reactive({
|
2026-01-21 17:40:42 +08:00
|
|
|
|
fileList: [],
|
2026-01-20 16:56:01 +08:00
|
|
|
|
form: {},
|
2026-01-21 17:40:42 +08:00
|
|
|
|
storeData: {
|
|
|
|
|
|
operationTime: "",
|
|
|
|
|
|
}, //入库数据
|
|
|
|
|
|
|
2026-01-20 16:56:01 +08:00
|
|
|
|
queryParams: {
|
2026-01-21 17:40:42 +08:00
|
|
|
|
keyword: "",
|
2026-01-20 16:56:01 +08:00
|
|
|
|
pageNum: 1,
|
|
|
|
|
|
pageSize: 10,
|
2026-01-21 17:40:42 +08:00
|
|
|
|
startDate: null,
|
|
|
|
|
|
endDate: null,
|
|
|
|
|
|
operationType: "",
|
|
|
|
|
|
wlType: "", //物资类型
|
2026-01-20 16:56:01 +08:00
|
|
|
|
},
|
2026-01-21 17:40:42 +08:00
|
|
|
|
detailQueryParams: {
|
2026-01-20 16:56:01 +08:00
|
|
|
|
pageNum: 1,
|
|
|
|
|
|
pageSize: 1000,
|
2026-01-21 17:40:42 +08:00
|
|
|
|
billNo: null,
|
|
|
|
|
|
billNoCk: null,
|
2026-01-20 16:56:01 +08:00
|
|
|
|
},
|
|
|
|
|
|
rules: {
|
2026-01-21 17:40:42 +08:00
|
|
|
|
operationType: [
|
|
|
|
|
|
{ required: true, message: "入库类型不能为空", trigger: "change" },
|
|
|
|
|
|
],
|
|
|
|
|
|
wlType: [
|
|
|
|
|
|
{ required: true, message: "物资类型不能为空", trigger: "change" },
|
|
|
|
|
|
],
|
|
|
|
|
|
warehouseCode: [
|
|
|
|
|
|
{
|
|
|
|
|
|
required: true,
|
|
|
|
|
|
type: "array",
|
|
|
|
|
|
message: "所属仓库不能为空",
|
|
|
|
|
|
trigger: "change",
|
|
|
|
|
|
},
|
|
|
|
|
|
],
|
|
|
|
|
|
operator: [
|
|
|
|
|
|
{ required: true, message: "理货员不能为空", trigger: "change" },
|
|
|
|
|
|
],
|
|
|
|
|
|
execStatus: [
|
|
|
|
|
|
{ required: true, message: "是否预入库不能为空", trigger: "change" },
|
|
|
|
|
|
],
|
|
|
|
|
|
operationTime: [
|
|
|
|
|
|
{ required: true, message: "入库时间不能为空", trigger: "change" },
|
|
|
|
|
|
],
|
2026-01-20 16:56:01 +08:00
|
|
|
|
},
|
2026-01-21 17:40:42 +08:00
|
|
|
|
switchRules: {
|
|
|
|
|
|
toCangku: [
|
|
|
|
|
|
{ required: true, message: "目标仓库不能为空", trigger: "change" },
|
|
|
|
|
|
],
|
|
|
|
|
|
toPcode: [
|
|
|
|
|
|
{ required: true, message: "目标存放位置不能为空", trigger: "change" },
|
|
|
|
|
|
],
|
2026-01-20 16:56:01 +08:00
|
|
|
|
},
|
|
|
|
|
|
printViewInfo: {
|
|
|
|
|
|
id: "printMe", //打印区域的唯一的id属性
|
2026-01-21 17:40:42 +08:00
|
|
|
|
popTitle: "入库信息打印", // 页眉文字 (不设置时显示undifined)(页眉页脚可以在打印页面的更多设置的选项中取消勾选)
|
|
|
|
|
|
beforeOpenCallback() {
|
2026-01-20 16:56:01 +08:00
|
|
|
|
showContent.value = false;
|
2026-01-21 17:40:42 +08:00
|
|
|
|
}, // 开始打印之前的callback
|
|
|
|
|
|
openCallback() {}, // 调用打印时的callback
|
|
|
|
|
|
closeCallback() {}, // 关闭打印的callback(无法区分确认or取消)
|
|
|
|
|
|
clickMounted() {},
|
2026-01-20 16:56:01 +08:00
|
|
|
|
|
2026-01-21 17:40:42 +08:00
|
|
|
|
standard: "",
|
|
|
|
|
|
extarCss: "",
|
2026-01-20 16:56:01 +08:00
|
|
|
|
},
|
|
|
|
|
|
});
|
|
|
|
|
|
|
2026-01-21 17:40:42 +08:00
|
|
|
|
const {
|
|
|
|
|
|
fileList,
|
|
|
|
|
|
queryParams,
|
|
|
|
|
|
detailQueryParams,
|
|
|
|
|
|
storeData,
|
|
|
|
|
|
rules,
|
|
|
|
|
|
form,
|
|
|
|
|
|
printViewInfo,
|
|
|
|
|
|
switchRules,
|
|
|
|
|
|
} = toRefs(data);
|
|
|
|
|
|
|
|
|
|
|
|
const warehouseList = ref([]); //所属仓库下拉数据
|
2026-01-21 08:51:14 +08:00
|
|
|
|
// 新增库存状态
|
|
|
|
|
|
const execStatusMenu = ref([
|
2026-01-21 17:40:42 +08:00
|
|
|
|
{ value: "0", label: "预入库" },
|
|
|
|
|
|
{ value: "1", label: "已入库" },
|
|
|
|
|
|
]);
|
2026-01-21 07:53:24 +08:00
|
|
|
|
//所属仓库
|
2026-01-21 17:40:42 +08:00
|
|
|
|
function warehouseFun() {
|
2026-01-21 07:53:24 +08:00
|
|
|
|
//所属仓库下拉数据
|
2026-01-21 17:40:42 +08:00
|
|
|
|
warehouseAll().then((response) => {
|
|
|
|
|
|
warehouseList.value = response.data;
|
|
|
|
|
|
});
|
2026-01-21 07:53:24 +08:00
|
|
|
|
}
|
|
|
|
|
|
//所属仓库
|
2026-01-21 17:40:42 +08:00
|
|
|
|
warehouseFun();
|
|
|
|
|
|
|
|
|
|
|
|
//库位字典
|
|
|
|
|
|
function pcodeList(value) {
|
|
|
|
|
|
getKwAllList(value[1]).then((response) => {
|
|
|
|
|
|
kwOptions.value = response.data;
|
|
|
|
|
|
});
|
|
|
|
|
|
}
|
2026-01-21 07:53:24 +08:00
|
|
|
|
|
2026-01-21 17:40:42 +08:00
|
|
|
|
const wzTypeList = ref([]); //物资类型下拉数据
|
2026-01-21 07:53:24 +08:00
|
|
|
|
//物资类型
|
2026-01-21 17:40:42 +08:00
|
|
|
|
function materialFun() {
|
2026-01-21 07:53:24 +08:00
|
|
|
|
//获取物资类型下拉数据
|
2026-01-21 17:40:42 +08:00
|
|
|
|
materialtypeDict().then((response) => {
|
|
|
|
|
|
wzTypeList.value = response.data;
|
|
|
|
|
|
});
|
2026-01-21 07:53:24 +08:00
|
|
|
|
}
|
|
|
|
|
|
//物资类型
|
2026-01-21 17:40:42 +08:00
|
|
|
|
materialFun();
|
2026-01-21 07:53:24 +08:00
|
|
|
|
|
2026-01-21 17:40:42 +08:00
|
|
|
|
const storeTypeList = ref([]); //入库类型下拉数据
|
|
|
|
|
|
function rklxList() {
|
2026-01-21 07:53:24 +08:00
|
|
|
|
//获取入库类型下拉数据
|
2026-01-21 17:40:42 +08:00
|
|
|
|
warehousingDict().then((response) => {
|
|
|
|
|
|
storeTypeList.value = response.data;
|
|
|
|
|
|
});
|
2026-01-21 07:53:24 +08:00
|
|
|
|
}
|
|
|
|
|
|
//入库类型下拉数据
|
2026-01-21 17:40:42 +08:00
|
|
|
|
rklxList();
|
2026-01-21 07:53:24 +08:00
|
|
|
|
|
2026-01-21 17:40:42 +08:00
|
|
|
|
const personList = ref([]); //理货员下拉数据
|
|
|
|
|
|
function lhyList() {
|
2026-01-21 07:53:24 +08:00
|
|
|
|
//理货员下拉数据
|
2026-01-21 17:40:42 +08:00
|
|
|
|
personListDict().then((response) => {
|
|
|
|
|
|
personList.value = response.data;
|
|
|
|
|
|
});
|
2026-01-21 07:53:24 +08:00
|
|
|
|
}
|
|
|
|
|
|
//理货员下拉数据
|
2026-01-21 17:40:42 +08:00
|
|
|
|
lhyList();
|
2026-01-21 07:53:24 +08:00
|
|
|
|
|
|
|
|
|
|
// 是否预入库
|
|
|
|
|
|
const execStatusList = ref([
|
2026-01-21 17:40:42 +08:00
|
|
|
|
{ id: 0, name: "是" },
|
|
|
|
|
|
{ id: 1, name: "否" },
|
|
|
|
|
|
]);
|
2026-01-21 07:53:24 +08:00
|
|
|
|
|
|
|
|
|
|
const loading = ref(true);
|
2026-01-21 17:40:42 +08:00
|
|
|
|
const billList = ref([{ execStatus: 0 }]); //单据列表
|
|
|
|
|
|
const total = ref(0); //单据
|
2026-01-21 07:53:24 +08:00
|
|
|
|
/** 查询库存单据主列表 */
|
|
|
|
|
|
function getList() {
|
|
|
|
|
|
loading.value = true;
|
2026-01-21 17:40:42 +08:00
|
|
|
|
listBill(queryParams.value).then((response) => {
|
2026-01-21 07:53:24 +08:00
|
|
|
|
billList.value = response.rows;
|
|
|
|
|
|
total.value = response.total;
|
|
|
|
|
|
loading.value = false;
|
|
|
|
|
|
});
|
|
|
|
|
|
}
|
|
|
|
|
|
//数据列表
|
|
|
|
|
|
getList();
|
|
|
|
|
|
|
2026-01-21 17:40:42 +08:00
|
|
|
|
/** 新增按钮操作 */
|
|
|
|
|
|
function handleAdd(single) {
|
|
|
|
|
|
isSingle.value = single;
|
|
|
|
|
|
reset();
|
|
|
|
|
|
open.value = true;
|
|
|
|
|
|
title.value = "添加库存单据";
|
2026-01-21 07:53:24 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
2026-01-21 17:40:42 +08:00
|
|
|
|
// 新增入库弹窗--删除某一条数据
|
|
|
|
|
|
function delLineFun(index) {
|
|
|
|
|
|
proxy.$modal
|
|
|
|
|
|
.confirm("确定删除吗?")
|
|
|
|
|
|
.then(function () {
|
|
|
|
|
|
return planList.value.splice(index, 1);
|
|
|
|
|
|
})
|
|
|
|
|
|
.then(() => {})
|
|
|
|
|
|
.catch(() => {});
|
2026-01-21 07:53:24 +08:00
|
|
|
|
}
|
2026-01-21 17:40:42 +08:00
|
|
|
|
// 新增入库的列表状态
|
|
|
|
|
|
const statusList = ref([
|
|
|
|
|
|
{ value: 0, label: "未到货" },
|
|
|
|
|
|
{ value: 1, label: "已入库" },
|
|
|
|
|
|
{ value: 2, label: "部分入库" },
|
|
|
|
|
|
]);
|
|
|
|
|
|
const checkPlanList = ref([]); //已选中的要入库的数据
|
|
|
|
|
|
//新增入库 多选框选中数据
|
|
|
|
|
|
function handleSelectionChange(selection) {
|
|
|
|
|
|
checkPlanList.value = selection;
|
2026-01-20 16:56:01 +08:00
|
|
|
|
}
|
2026-01-21 17:40:42 +08:00
|
|
|
|
|
|
|
|
|
|
//从供应计划中添加 搜索
|
|
|
|
|
|
function searchPlan() {
|
|
|
|
|
|
if (!orderNum.value) {
|
|
|
|
|
|
proxy.$modal.msgWarning("采购订单号不能为空");
|
|
|
|
|
|
return;
|
2026-01-20 16:56:01 +08:00
|
|
|
|
}
|
2026-01-21 17:40:42 +08:00
|
|
|
|
//查供应计划
|
|
|
|
|
|
getPlan(orderNum.value).then((response) => {
|
|
|
|
|
|
let planData = response.data;
|
|
|
|
|
|
if (planData.length > 0) {
|
|
|
|
|
|
for (let i = 0; i < planData.length; i++) {
|
|
|
|
|
|
planData[i].realQty = planData[i].jhQty;
|
|
|
|
|
|
planData[i].gysJhId = planData[i].id;
|
|
|
|
|
|
if (autoFill.value && kzms.value != "") {
|
|
|
|
|
|
planData[i].remark = kzms.value;
|
|
|
|
|
|
}
|
|
|
|
|
|
planData[i].isnew = false;
|
|
|
|
|
|
}
|
|
|
|
|
|
if (planData.some((item) => item.status == "1")) {
|
|
|
|
|
|
proxy.$modal.msgWarning(response.msg);
|
|
|
|
|
|
}
|
|
|
|
|
|
} else {
|
|
|
|
|
|
proxy.$modal.msgWarning("暂无数据");
|
|
|
|
|
|
return;
|
2026-01-20 16:56:01 +08:00
|
|
|
|
}
|
2026-01-21 17:40:42 +08:00
|
|
|
|
planList.value = planData;
|
|
|
|
|
|
});
|
2026-01-20 16:56:01 +08:00
|
|
|
|
}
|
2026-01-21 17:40:42 +08:00
|
|
|
|
|
|
|
|
|
|
//供应计划中没有,手动添加的数据
|
|
|
|
|
|
function addLineFun() {
|
|
|
|
|
|
let remarkFill = "";
|
|
|
|
|
|
if (autoFill.value && kzms.value) {
|
|
|
|
|
|
remarkFill = kzms.value;
|
2026-01-20 16:56:01 +08:00
|
|
|
|
}
|
2026-01-21 17:40:42 +08:00
|
|
|
|
const info = {
|
|
|
|
|
|
dw: "",
|
|
|
|
|
|
entityId: "", //身份码
|
|
|
|
|
|
gysMc: "",
|
|
|
|
|
|
gysNo: "",
|
|
|
|
|
|
wlNo: "",
|
|
|
|
|
|
wlMs: "",
|
|
|
|
|
|
htDj: "", //单价
|
|
|
|
|
|
pcode: "",
|
|
|
|
|
|
trayCode: "",
|
|
|
|
|
|
realQty: "",
|
|
|
|
|
|
sapNo: "",
|
|
|
|
|
|
xmNo: "",
|
|
|
|
|
|
xmMs: "",
|
|
|
|
|
|
gysMc: "",
|
|
|
|
|
|
remark: remarkFill,
|
|
|
|
|
|
status: 0,
|
|
|
|
|
|
fycde1: "",
|
|
|
|
|
|
fycde2: "",
|
|
|
|
|
|
gysJhId: null,
|
|
|
|
|
|
isnew: true,
|
|
|
|
|
|
};
|
|
|
|
|
|
planList.value.push(info);
|
2026-01-20 16:56:01 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
2026-01-21 17:40:42 +08:00
|
|
|
|
//添加数量
|
|
|
|
|
|
function addNum(row) {
|
|
|
|
|
|
let addRow = {};
|
|
|
|
|
|
Object.assign(addRow, row);
|
|
|
|
|
|
addRow.pcode = "";
|
|
|
|
|
|
addRow.realQty = "";
|
|
|
|
|
|
addRow.entityId = "";
|
|
|
|
|
|
addRow.trayCode = "";
|
|
|
|
|
|
addRow.remark = autoFill.value && kzms.value != "" ? kzms.value : "";
|
|
|
|
|
|
addRow.photoUrl = "";
|
|
|
|
|
|
addRow.fycde1 = "";
|
|
|
|
|
|
addRow.fycde2 = "";
|
|
|
|
|
|
addRow.isAdd = true;
|
|
|
|
|
|
planList.value.push(addRow);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/** 确定入库按钮 */
|
|
|
|
|
|
function submitForm() {
|
|
|
|
|
|
proxy.$refs["stockRef"].validate((valid) => {
|
|
|
|
|
|
if (valid) {
|
|
|
|
|
|
if (checkPlanList.value.length == 0) {
|
|
|
|
|
|
proxy.$modal.msgError("请勾选数据");
|
|
|
|
|
|
return;
|
|
|
|
|
|
}
|
|
|
|
|
|
if (checkPlanList.value.filter((x) => !x.realQty).length > 0) {
|
|
|
|
|
|
proxy.$modal.msgError("入库数量不能为空");
|
|
|
|
|
|
return;
|
|
|
|
|
|
}
|
|
|
|
|
|
if (
|
|
|
|
|
|
isExamine.value == 1 &&
|
|
|
|
|
|
checkPlanList.value.filter((x) => !x.photoUrl).length > 0
|
|
|
|
|
|
) {
|
|
|
|
|
|
proxy.$modal.msgError("现场图片不能为空");
|
|
|
|
|
|
return;
|
|
|
|
|
|
}
|
|
|
|
|
|
let iscfwz = false; //库位是否为空
|
|
|
|
|
|
let bigData = checkPlanList.value;
|
|
|
|
|
|
for (let i = 0; i < bigData.length; i++) {
|
|
|
|
|
|
//库位
|
|
|
|
|
|
if (!bigData[i].pcode) {
|
|
|
|
|
|
iscfwz = true;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
//发现场入库类型可以不用选库位
|
|
|
|
|
|
if (storeData.value.operationType != "RK025" && iscfwz) {
|
|
|
|
|
|
proxy.$modal.msgError("请选择库位");
|
|
|
|
|
|
return;
|
|
|
|
|
|
}
|
|
|
|
|
|
// if(isExamine.value==1 && !storeData.value.approverId){
|
|
|
|
|
|
// proxy.$modal.msgError("审批人不能为空");
|
|
|
|
|
|
// return
|
|
|
|
|
|
// }
|
|
|
|
|
|
checkPlanList.value.forEach((item) => {
|
|
|
|
|
|
item.bizType = 0;
|
|
|
|
|
|
});
|
|
|
|
|
|
if (idEdit.value != 0) {
|
|
|
|
|
|
//修改
|
|
|
|
|
|
let arr = JSON.parse(JSON.stringify(checkPlanList.value[0]));
|
|
|
|
|
|
updateRecord(arr).then((response) => {
|
|
|
|
|
|
proxy.$modal.msgSuccess("修改成功");
|
|
|
|
|
|
open.value = false;
|
|
|
|
|
|
detailList();
|
|
|
|
|
|
});
|
|
|
|
|
|
} else {
|
|
|
|
|
|
//新增
|
|
|
|
|
|
console.log(storeData.value);
|
|
|
|
|
|
let submitData = {
|
|
|
|
|
|
rkBill: {
|
|
|
|
|
|
cangku:
|
|
|
|
|
|
storeData.value.warehouseCode[
|
|
|
|
|
|
storeData.value.warehouseCode.length - 1
|
|
|
|
|
|
], //所属仓库
|
|
|
|
|
|
operator: storeData.value.operator, //理货员
|
|
|
|
|
|
operationType: storeData.value.operationType, //入库类型
|
|
|
|
|
|
wlType: storeData.value.wlType, //物资类型
|
|
|
|
|
|
approverId: storeData.value.approverId, //审批人
|
|
|
|
|
|
operationTime: storeData.value.operationTime, //入库时间
|
|
|
|
|
|
execStatus: storeData.value.execStatus, //是否预入库
|
|
|
|
|
|
id: idEdit.value,
|
|
|
|
|
|
bizType: 0,
|
|
|
|
|
|
billNo:
|
|
|
|
|
|
storeData.value.billNo && isSingle.value
|
|
|
|
|
|
? storeData.value.billNo
|
|
|
|
|
|
: null,
|
|
|
|
|
|
},
|
|
|
|
|
|
rkInfoList: checkPlanList.value,
|
|
|
|
|
|
};
|
|
|
|
|
|
console.log(submitData);
|
|
|
|
|
|
if (isSingle.value) {
|
|
|
|
|
|
//单条添加
|
|
|
|
|
|
appendBill(submitData).then((response) => {
|
|
|
|
|
|
proxy.$modal.msgSuccess("新增成功");
|
|
|
|
|
|
open.value = false;
|
|
|
|
|
|
detailList();
|
|
|
|
|
|
});
|
|
|
|
|
|
} else {
|
|
|
|
|
|
//多条添加
|
|
|
|
|
|
addBill(submitData).then((response) => {
|
|
|
|
|
|
proxy.$modal.msgSuccess("新增成功");
|
|
|
|
|
|
open.value = false;
|
|
|
|
|
|
getList();
|
|
|
|
|
|
});
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
2026-01-20 16:56:01 +08:00
|
|
|
|
}
|
|
|
|
|
|
});
|
|
|
|
|
|
}
|
2026-01-21 17:40:42 +08:00
|
|
|
|
|
|
|
|
|
|
/** 搜索按钮操作 */
|
|
|
|
|
|
function handleQuery() {
|
|
|
|
|
|
if (operationTime.value && operationTime.value.length > 0) {
|
|
|
|
|
|
queryParams.value.startDate = operationTime.value[0];
|
|
|
|
|
|
queryParams.value.endDate = operationTime.value[1];
|
|
|
|
|
|
} else {
|
|
|
|
|
|
queryParams.value.startDate = "";
|
|
|
|
|
|
queryParams.value.endDate = "";
|
2026-01-20 16:56:01 +08:00
|
|
|
|
}
|
2026-01-21 17:40:42 +08:00
|
|
|
|
queryParams.value.pageNum = 1;
|
|
|
|
|
|
stockList.value = [];
|
|
|
|
|
|
getList();
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/** 重置按钮操作 */
|
|
|
|
|
|
function resetQuery() {
|
|
|
|
|
|
proxy.resetForm("queryRef");
|
|
|
|
|
|
operationTime.value = [];
|
|
|
|
|
|
handleQuery();
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// 显示预出库的状态
|
|
|
|
|
|
const tableBillRowClassName = ({ row, rowIndex }) => {
|
|
|
|
|
|
if (row.execStatus == 0) {
|
|
|
|
|
|
return "success-row";
|
|
|
|
|
|
}
|
|
|
|
|
|
return "";
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
// 左侧显示库存状态
|
|
|
|
|
|
const bizTypeList = ref([
|
|
|
|
|
|
{ value: 0, label: "已入库", elTagType: "success", elTagClass: null },
|
|
|
|
|
|
{ value: 1, label: "已出库", elTagType: "warning", elTagClass: null },
|
|
|
|
|
|
{ value: 2, label: "借料出库", elTagType: "danger", elTagClass: null },
|
|
|
|
|
|
{ value: 3, label: "还料入库", elTagType: "primary", elTagClass: null },
|
|
|
|
|
|
]);
|
|
|
|
|
|
const dictTagData = () => {
|
|
|
|
|
|
return bizTypeList.value.map((item) => ({
|
|
|
|
|
|
...item,
|
|
|
|
|
|
value: String(item.value),
|
|
|
|
|
|
}));
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
//修改主单据
|
|
|
|
|
|
const openBill = ref(false);
|
|
|
|
|
|
const billData = ref({});
|
|
|
|
|
|
function editData(row) {
|
|
|
|
|
|
let obj = JSON.parse(JSON.stringify(row));
|
|
|
|
|
|
billData.value.wlType = obj.wlType;
|
|
|
|
|
|
billData.value.operationType = obj.operationType;
|
|
|
|
|
|
billData.value.operator = obj.operator;
|
|
|
|
|
|
billData.value.operationTime = obj.operationTime;
|
|
|
|
|
|
billData.value.id = obj.id;
|
|
|
|
|
|
billData.value.billNo = obj.billNo;
|
|
|
|
|
|
billData.value.execStatus = obj.execStatus;
|
|
|
|
|
|
openBill.value = true;
|
|
|
|
|
|
}
|
|
|
|
|
|
//修改主单据、保存
|
|
|
|
|
|
function editForm() {
|
|
|
|
|
|
updateBill(billData.value).then((response) => {
|
|
|
|
|
|
proxy.$modal.msgSuccess(response.msg);
|
|
|
|
|
|
openBill.value = false;
|
|
|
|
|
|
getList();
|
2026-01-20 16:56:01 +08:00
|
|
|
|
});
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
//双击单据,查询明细
|
2026-01-21 17:40:42 +08:00
|
|
|
|
const billDoubleClickObj = ref({});
|
|
|
|
|
|
const detailLoading = ref(false); //加载列表详情
|
|
|
|
|
|
function billClick(row, type, status) {
|
|
|
|
|
|
if (type != "bill") {
|
2026-01-20 16:56:01 +08:00
|
|
|
|
detailLoading.value = true;
|
|
|
|
|
|
}
|
2026-01-21 17:40:42 +08:00
|
|
|
|
billDoubleClickObj.value = row;
|
|
|
|
|
|
detailList(type);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
const checkStockList = ref([]); //移库、调度 多选框选中数据
|
|
|
|
|
|
//移库 多选框选中数据 生成调度任务多选
|
|
|
|
|
|
function printSelectionChange(selection) {
|
|
|
|
|
|
checkStockList.value = JSON.parse(JSON.stringify(selection));
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// 移库弹框
|
|
|
|
|
|
const openMove = ref(false); //移库
|
|
|
|
|
|
//移库弹框
|
|
|
|
|
|
function handleMove() {
|
|
|
|
|
|
moveReason.value = "";
|
|
|
|
|
|
if (checkStockList.value.length != 1) {
|
|
|
|
|
|
proxy.$modal.msgError("请勾选一条数据");
|
|
|
|
|
|
return;
|
|
|
|
|
|
}
|
|
|
|
|
|
checkStockList.value[0].toCangku = [
|
|
|
|
|
|
checkStockList.value[0].parentWarehouseCode,
|
|
|
|
|
|
checkStockList.value[0].cangku,
|
|
|
|
|
|
];
|
|
|
|
|
|
checkStockList.value[0].toPcode = checkStockList.value[0].pcode;
|
|
|
|
|
|
checkStockList.value[0].toTrayCode = checkStockList.value[0].trayCode;
|
|
|
|
|
|
checkStockList.value[0].num = checkStockList.value[0].realQty;
|
|
|
|
|
|
openMove.value = true;
|
|
|
|
|
|
pcodeList([
|
|
|
|
|
|
checkStockList.value[0].parentWarehouseCode,
|
|
|
|
|
|
checkStockList.value[0].cangku,
|
|
|
|
|
|
]);
|
2026-01-20 16:56:01 +08:00
|
|
|
|
}
|
2026-01-21 17:40:42 +08:00
|
|
|
|
//移库提交
|
|
|
|
|
|
function submitMoveForm() {
|
|
|
|
|
|
if (checkStockList.value.filter((item) => item.realQty == 0).length > 0) {
|
|
|
|
|
|
proxy.$modal.msgError("数量不能为空");
|
|
|
|
|
|
return;
|
|
|
|
|
|
}
|
|
|
|
|
|
if (checkStockList.value.filter((item) => !item.toPcode).length > 0) {
|
|
|
|
|
|
proxy.$modal.msgError("存放位置不能为空");
|
|
|
|
|
|
return;
|
|
|
|
|
|
}
|
|
|
|
|
|
if (checkStockList.value.filter((item) => !item.toCangku).length > 0) {
|
|
|
|
|
|
proxy.$modal.msgError("仓库不能为空");
|
|
|
|
|
|
return;
|
|
|
|
|
|
}
|
|
|
|
|
|
if (checkStockList.value[0].pcode == checkStockList.value[0].toPcode) {
|
|
|
|
|
|
proxy.$modal.msgError(
|
|
|
|
|
|
"不允许选择原来的库位【" + checkStockList.value[0].pcode + "】"
|
|
|
|
|
|
);
|
|
|
|
|
|
return;
|
|
|
|
|
|
}
|
|
|
|
|
|
if (checkStockList.value[0].realQty < checkStockList.value[0].num) {
|
|
|
|
|
|
proxy.$modal.msgError("移库数量不正确");
|
|
|
|
|
|
return;
|
|
|
|
|
|
}
|
|
|
|
|
|
let arr = JSON.parse(JSON.stringify(checkStockList.value));
|
|
|
|
|
|
arr[0].toCangku = arr[0].toCangku[1];
|
|
|
|
|
|
let submitData = {
|
|
|
|
|
|
fromRkId: checkStockList.value[0].id,
|
|
|
|
|
|
moveReason: moveReason.value,
|
|
|
|
|
|
targets: arr,
|
|
|
|
|
|
};
|
|
|
|
|
|
moveRecord(submitData).then((response) => {
|
|
|
|
|
|
if (response.code == 200) {
|
|
|
|
|
|
proxy.$modal.msgSuccess("操作成功");
|
|
|
|
|
|
//数据列表
|
|
|
|
|
|
detailList();
|
|
|
|
|
|
openMove.value = false;
|
|
|
|
|
|
} else {
|
|
|
|
|
|
proxy.$modal.msgError("操作失败");
|
|
|
|
|
|
}
|
|
|
|
|
|
});
|
|
|
|
|
|
}
|
|
|
|
|
|
function cancelMove() {
|
|
|
|
|
|
openMove.value = false;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
function isMoveFun(isMove) {
|
|
|
|
|
|
if (isMove == 0) {
|
|
|
|
|
|
return "否";
|
|
|
|
|
|
} else if (isMove == 1) {
|
|
|
|
|
|
return "是";
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// 查看入库单
|
|
|
|
|
|
const dialogBill = ref(false);
|
|
|
|
|
|
const billAllObj = ref([]);
|
|
|
|
|
|
const stockList = ref([]); //明细列表
|
2026-01-20 16:56:01 +08:00
|
|
|
|
//查询明细列表数据方法
|
2026-01-21 17:40:42 +08:00
|
|
|
|
function detailList(type) {
|
|
|
|
|
|
listStock(billDoubleClickObj.value.billNo).then((response) => {
|
|
|
|
|
|
if (type == "bill") {
|
|
|
|
|
|
billAllObj.value = response.data;
|
|
|
|
|
|
dialogBill.value = true;
|
|
|
|
|
|
return;
|
|
|
|
|
|
}
|
2026-01-21 07:53:24 +08:00
|
|
|
|
stockList.value = response.data;
|
2026-01-20 16:56:01 +08:00
|
|
|
|
detailLoading.value = false;
|
|
|
|
|
|
});
|
|
|
|
|
|
}
|
2026-01-21 17:40:42 +08:00
|
|
|
|
|
|
|
|
|
|
// 单条添加物料
|
|
|
|
|
|
function addOne() {
|
|
|
|
|
|
handleAdd(true);
|
|
|
|
|
|
if (stockList.value.length > 0) {
|
|
|
|
|
|
storeData.value.operationType = stockList.value[0].operationType;
|
|
|
|
|
|
storeData.value.wlType = billDoubleClickObj.value.wlType;
|
|
|
|
|
|
storeData.value.operator = stockList.value[0].operator;
|
|
|
|
|
|
storeData.value.warehouseCode = [
|
|
|
|
|
|
stockList.value[0].parentWarehouseCode,
|
|
|
|
|
|
stockList.value[0].cangku,
|
|
|
|
|
|
];
|
|
|
|
|
|
pcodeList(storeData.value.warehouseCode);
|
|
|
|
|
|
storeData.value.operationTime = stockList.value[0].operationTime;
|
|
|
|
|
|
storeData.value.billNo = stockList.value[0].billNo;
|
2026-01-20 16:56:01 +08:00
|
|
|
|
}
|
|
|
|
|
|
}
|
2026-01-21 17:40:42 +08:00
|
|
|
|
|
|
|
|
|
|
//根据物料号查询物料信息
|
|
|
|
|
|
function searchInfo(wlNo, index) {
|
|
|
|
|
|
wlSearch(wlNo).then((res) => {
|
|
|
|
|
|
if (res.rows.length > 0) {
|
|
|
|
|
|
let info = res.rows[0];
|
|
|
|
|
|
planList.value[index].wlMs = info.desMat;
|
|
|
|
|
|
planList.value[index].dw = info.unt;
|
|
|
|
|
|
planList.value[index].htDj = info.uprc;
|
|
|
|
|
|
} else {
|
|
|
|
|
|
proxy.$modal.msgWarning("暂无物料信息");
|
|
|
|
|
|
return;
|
2026-01-20 16:56:01 +08:00
|
|
|
|
}
|
2026-01-21 17:40:42 +08:00
|
|
|
|
});
|
2026-01-20 16:56:01 +08:00
|
|
|
|
}
|
2026-01-21 17:40:42 +08:00
|
|
|
|
|
|
|
|
|
|
/** 修改按钮操作 */
|
|
|
|
|
|
function handleUpdate(row) {
|
|
|
|
|
|
reset();
|
|
|
|
|
|
idEdit.value = row.id;
|
|
|
|
|
|
row.isnew = true;
|
|
|
|
|
|
planList.value = [row];
|
|
|
|
|
|
open.value = true;
|
|
|
|
|
|
title.value = "修改库存单据";
|
2026-01-20 16:56:01 +08:00
|
|
|
|
}
|
2026-01-21 17:40:42 +08:00
|
|
|
|
// 取消按钮
|
|
|
|
|
|
function cancel() {
|
|
|
|
|
|
open.value = false;
|
|
|
|
|
|
reset();
|
2026-01-20 16:56:01 +08:00
|
|
|
|
}
|
2026-01-21 17:40:42 +08:00
|
|
|
|
// 右侧修改的表单重置
|
|
|
|
|
|
function reset() {
|
|
|
|
|
|
planList.value = [];
|
|
|
|
|
|
storeData.value = {};
|
|
|
|
|
|
proxy.resetForm("stockRef");
|
2026-01-20 16:56:01 +08:00
|
|
|
|
}
|
2026-01-21 17:40:42 +08:00
|
|
|
|
function closeDialog() {
|
|
|
|
|
|
idEdit.value = 0;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// 撤销入库
|
|
|
|
|
|
const handleStockDelete = (row) => {
|
|
|
|
|
|
proxy.$modal
|
|
|
|
|
|
.confirm("确定撤销吗?")
|
|
|
|
|
|
.then(function () {
|
|
|
|
|
|
return backoutRecord({ ids: [row.id] });
|
|
|
|
|
|
})
|
|
|
|
|
|
.then(() => {
|
|
|
|
|
|
detailList();
|
|
|
|
|
|
proxy.$modal.msgSuccess("操作成功");
|
|
|
|
|
|
})
|
|
|
|
|
|
.catch(() => {});
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// **************************************************************************
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2026-01-20 16:56:01 +08:00
|
|
|
|
|
2026-01-21 17:40:42 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function handleDispatch() {
|
|
|
|
|
|
if (checkStockList.value.length == 0) {
|
|
|
|
|
|
proxy.$modal.msgError("请勾选数据");
|
|
|
|
|
|
return;
|
|
|
|
|
|
}
|
|
|
|
|
|
dispatchOpen.value = true;
|
2026-01-20 16:56:01 +08:00
|
|
|
|
}
|
2026-01-21 17:40:42 +08:00
|
|
|
|
// 提交调度任务
|
|
|
|
|
|
function submitDispatch() {
|
|
|
|
|
|
// console.log(resource.value)
|
|
|
|
|
|
if (!resource.value) {
|
|
|
|
|
|
proxy.$modal.msgWarning("请选择调度模式");
|
|
|
|
|
|
return;
|
2026-01-20 16:56:01 +08:00
|
|
|
|
}
|
2026-01-21 17:40:42 +08:00
|
|
|
|
let data;
|
|
|
|
|
|
if (billStatus.value == "rk") {
|
|
|
|
|
|
data = checkStockList.value.map((item) => ({
|
|
|
|
|
|
sourceName: "V01-010101",
|
|
|
|
|
|
targetName: item.pcode,
|
|
|
|
|
|
taskTypeName: "上架",
|
|
|
|
|
|
taskType: 0,
|
|
|
|
|
|
mid: item.wlNo,
|
|
|
|
|
|
num: 1,
|
|
|
|
|
|
dispatchMode: resource.value,
|
|
|
|
|
|
}));
|
|
|
|
|
|
} else if (billStatus.value == "ck") {
|
|
|
|
|
|
data = checkStockList.value.map((item) => ({
|
|
|
|
|
|
sourceName: item.pcode,
|
|
|
|
|
|
targetName: "V01-010101",
|
|
|
|
|
|
taskTypeName: "下架",
|
|
|
|
|
|
taskType: 1,
|
|
|
|
|
|
mid: item.wlNo,
|
|
|
|
|
|
num: 1,
|
|
|
|
|
|
dispatchMode: resource.value,
|
|
|
|
|
|
}));
|
2026-01-20 16:56:01 +08:00
|
|
|
|
}
|
2026-01-21 17:40:42 +08:00
|
|
|
|
//调用生成调度任务接口
|
|
|
|
|
|
generateDispatch(data).then((response) => {
|
|
|
|
|
|
// console.log(11111)
|
|
|
|
|
|
// console.log(response)
|
|
|
|
|
|
if (response.code == 200) {
|
|
|
|
|
|
proxy.$modal.msgSuccess("生成调度任务成功");
|
|
|
|
|
|
dispatchOpen.value = false;
|
|
|
|
|
|
} else {
|
|
|
|
|
|
proxy.$modal.msgError(response.msg);
|
|
|
|
|
|
}
|
|
|
|
|
|
});
|
2026-01-20 16:56:01 +08:00
|
|
|
|
}
|
2026-01-21 17:40:42 +08:00
|
|
|
|
const handleChange = (file, fileLists) => {
|
|
|
|
|
|
fileList.value = fileLists.map((f) => f.raw); // 提取原始文件对象
|
|
|
|
|
|
};
|
|
|
|
|
|
function submitUpload() {
|
|
|
|
|
|
const formData = new FormData();
|
|
|
|
|
|
fileList.value.forEach((file) => {
|
|
|
|
|
|
formData.append("files", file.raw); // 后端需支持多文件字段
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
formData.append("photoType", uploadParams.value.photoType);
|
|
|
|
|
|
formData.append("billNo", uploadParams.value.billNo);
|
|
|
|
|
|
formData.append("documentType", uploadParams.value.typeName);
|
|
|
|
|
|
if (uploadParams.value.photoType == 1) {
|
|
|
|
|
|
formData.append("xmMs", uploadParams.value.xmMs);
|
|
|
|
|
|
} else {
|
|
|
|
|
|
formData.append("gysMc", uploadParams.value.gysMc);
|
|
|
|
|
|
}
|
|
|
|
|
|
uploadContract(formData).then((response) => {
|
|
|
|
|
|
if (response.code == 200) {
|
|
|
|
|
|
uploadParams.value = {};
|
|
|
|
|
|
fileList.value = [];
|
|
|
|
|
|
dialogPicVisible.value = false;
|
|
|
|
|
|
}
|
|
|
|
|
|
});
|
|
|
|
|
|
}
|
|
|
|
|
|
//查看图片详情
|
|
|
|
|
|
function picDetailFun(billId, type, isOpen) {
|
|
|
|
|
|
if (isOpen == 1) {
|
|
|
|
|
|
billObj.value.billNo = billId;
|
|
|
|
|
|
billObj.value.type = type;
|
|
|
|
|
|
}
|
|
|
|
|
|
picDetail({ billNo: billId, photoType: type }).then((response) => {
|
|
|
|
|
|
if (response.data.length > 0) {
|
|
|
|
|
|
if (isOpen == 1) {
|
|
|
|
|
|
dialogPicDetailVisible.value = true;
|
|
|
|
|
|
}
|
|
|
|
|
|
picList.value = response.data;
|
|
|
|
|
|
urlList.value = response.data.map((item) => {
|
|
|
|
|
|
return item.url;
|
|
|
|
|
|
});
|
|
|
|
|
|
} else {
|
|
|
|
|
|
picList.value = [];
|
|
|
|
|
|
urlList.value = [];
|
|
|
|
|
|
proxy.$modal.msgWarning("暂无图片");
|
2026-01-20 16:56:01 +08:00
|
|
|
|
}
|
2026-01-21 17:40:42 +08:00
|
|
|
|
this.$forceUpdate();
|
|
|
|
|
|
});
|
2026-01-20 16:56:01 +08:00
|
|
|
|
}
|
2026-01-21 17:40:42 +08:00
|
|
|
|
|
|
|
|
|
|
function preview(url) {
|
|
|
|
|
|
srcList.value = [url];
|
2026-01-20 16:56:01 +08:00
|
|
|
|
}
|
|
|
|
|
|
//勾选自动填充备注
|
2026-01-21 17:40:42 +08:00
|
|
|
|
function autoFillFun() {
|
|
|
|
|
|
if (autoFill.value && !kzms.value) {
|
|
|
|
|
|
autoFill.value = false;
|
2026-01-20 16:56:01 +08:00
|
|
|
|
proxy.$modal.msgWarning("扩展描述不能为空");
|
2026-01-21 17:40:42 +08:00
|
|
|
|
return;
|
2026-01-20 16:56:01 +08:00
|
|
|
|
}
|
2026-01-21 17:40:42 +08:00
|
|
|
|
if (autoFill.value && kzms.value && planList.value.length > 0) {
|
|
|
|
|
|
for (let i = 0; i < planList.value.length; i++) {
|
|
|
|
|
|
planList.value[i].remark = kzms.value;
|
2026-01-20 16:56:01 +08:00
|
|
|
|
}
|
2026-01-21 17:40:42 +08:00
|
|
|
|
} else if (!autoFill.value) {
|
|
|
|
|
|
for (let i = 0; i < planList.value.length; i++) {
|
|
|
|
|
|
planList.value[i].remark = "";
|
2026-01-20 16:56:01 +08:00
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
// console.log(autoFill.value)
|
|
|
|
|
|
}
|
|
|
|
|
|
// 上传成功回调
|
2026-01-21 17:40:42 +08:00
|
|
|
|
function handleAvatarSuccess(res, id, pcode) {
|
2026-01-20 16:56:01 +08:00
|
|
|
|
// console.log(222222)
|
|
|
|
|
|
// console.log(id)
|
|
|
|
|
|
// console.log(pcode)
|
2026-01-21 17:40:42 +08:00
|
|
|
|
for (let i = 0; i < planList.value.length; i++) {
|
|
|
|
|
|
if (planList.value[i].id == id && planList.value[i].pcode == pcode) {
|
|
|
|
|
|
planList.value[i].photoUrl = res.url;
|
2026-01-20 16:56:01 +08:00
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
// console.log(222222)
|
|
|
|
|
|
// console.log(res)
|
|
|
|
|
|
// console.log(row)
|
|
|
|
|
|
}
|
|
|
|
|
|
//删除图片
|
2026-01-21 17:40:42 +08:00
|
|
|
|
function handleRemove(res, id, pcode) {
|
|
|
|
|
|
for (let i = 0; i < planList.value.length; i++) {
|
|
|
|
|
|
if (planList.value[i].id == id && planList.value[i].pcode == pcode) {
|
|
|
|
|
|
planList.value[i].photoUrl = "";
|
2026-01-20 16:56:01 +08:00
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
// console.log(33333333)
|
|
|
|
|
|
// console.log(planList.value)
|
|
|
|
|
|
// console.log(res)
|
|
|
|
|
|
// console.log(id)
|
|
|
|
|
|
// console.log(pcode)
|
|
|
|
|
|
}
|
2026-01-21 17:40:42 +08:00
|
|
|
|
function delPic(picId) {
|
|
|
|
|
|
proxy.$modal
|
|
|
|
|
|
.confirm("确定删除吗?")
|
|
|
|
|
|
.then(function () {
|
2026-01-20 16:56:01 +08:00
|
|
|
|
return delPicF(picId);
|
2026-01-21 17:40:42 +08:00
|
|
|
|
})
|
|
|
|
|
|
.then(() => {
|
|
|
|
|
|
picDetailFun(billObj.value.billNo, billObj.value.type, 2);
|
|
|
|
|
|
// getList();
|
|
|
|
|
|
proxy.$modal.msgSuccess("操作成功");
|
|
|
|
|
|
})
|
|
|
|
|
|
.catch(() => {});
|
2026-01-20 16:56:01 +08:00
|
|
|
|
}
|
|
|
|
|
|
//预览图片
|
2026-01-21 17:40:42 +08:00
|
|
|
|
function handlePreview(uploadFile) {
|
2026-01-20 16:56:01 +08:00
|
|
|
|
// console.log(222222)
|
|
|
|
|
|
// console.log(res)
|
2026-01-21 17:40:42 +08:00
|
|
|
|
dialogImageUrl.value = uploadFile.response.url;
|
|
|
|
|
|
dialogVisible.value = true;
|
2026-01-20 16:56:01 +08:00
|
|
|
|
}
|
2026-01-21 17:40:42 +08:00
|
|
|
|
function tableRowClassName({ row, rowIndex }) {
|
2026-01-20 16:56:01 +08:00
|
|
|
|
// console.log(row)
|
2026-01-21 17:40:42 +08:00
|
|
|
|
// 根据每行的数据,判断isError来增加class属性
|
|
|
|
|
|
if (row.isAdd) {
|
|
|
|
|
|
return "warning-row";
|
2026-01-20 16:56:01 +08:00
|
|
|
|
}
|
2026-01-21 17:40:42 +08:00
|
|
|
|
// else {
|
|
|
|
|
|
// return 'success-row'
|
|
|
|
|
|
// }
|
|
|
|
|
|
return "";
|
2026-01-20 16:56:01 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
//上传、修改 单选 选中数据
|
2026-01-21 17:40:42 +08:00
|
|
|
|
function uploadSelectionChange(selection) {
|
|
|
|
|
|
if (selection) {
|
|
|
|
|
|
uploadParams.value.photoType = selection.isChuku;
|
|
|
|
|
|
uploadParams.value.billNo = selection.billNo;
|
|
|
|
|
|
uploadParams.value.typeName = selection.rkTypeName;
|
|
|
|
|
|
|
|
|
|
|
|
if (selection.isChuku == "3" || selection.isChuku == "1") {
|
|
|
|
|
|
uploadParams.value.photoType = 1;
|
|
|
|
|
|
uploadParams.value.billNo = selection.billNoCk;
|
|
|
|
|
|
uploadParams.value.typeName = selection.ckTypeName;
|
2026-01-20 16:56:01 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
2026-01-21 17:40:42 +08:00
|
|
|
|
uploadParams.value.gysMc = selection.gysMc;
|
|
|
|
|
|
uploadParams.value.xmMs = selection.xmMs;
|
|
|
|
|
|
}
|
2026-01-20 16:56:01 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
//入库上传图片按钮
|
2026-01-21 17:40:42 +08:00
|
|
|
|
function rkUpload() {
|
|
|
|
|
|
if (!uploadParams.value.billNo) {
|
2026-01-20 16:56:01 +08:00
|
|
|
|
proxy.$modal.msgWarning("请选择单据");
|
2026-01-21 17:40:42 +08:00
|
|
|
|
return;
|
2026-01-20 16:56:01 +08:00
|
|
|
|
}
|
2026-01-21 17:40:42 +08:00
|
|
|
|
dialogPicVisible.value = true;
|
2026-01-20 16:56:01 +08:00
|
|
|
|
}
|
2026-01-21 17:40:42 +08:00
|
|
|
|
function handlePictureCardPreview(info) {
|
|
|
|
|
|
dialogVisible.value = true;
|
|
|
|
|
|
dialogImageUrl.value = info.url;
|
2026-01-20 16:56:01 +08:00
|
|
|
|
// console.log(info)
|
|
|
|
|
|
}
|
2026-01-21 07:53:24 +08:00
|
|
|
|
|
2026-01-21 17:40:42 +08:00
|
|
|
|
const dialogDelStock = ref(false);
|
|
|
|
|
|
const delStockFormRef = ref(null);
|
2026-01-20 16:56:01 +08:00
|
|
|
|
const delStockForm = ref({
|
2026-01-21 17:40:42 +08:00
|
|
|
|
billNo: "",
|
|
|
|
|
|
});
|
2026-01-20 16:56:01 +08:00
|
|
|
|
const delStockRules = ref({
|
2026-01-21 17:40:42 +08:00
|
|
|
|
billNo: [{ required: true, message: "请输入单据号", trigger: ["blur"] }],
|
|
|
|
|
|
});
|
2026-01-20 16:56:01 +08:00
|
|
|
|
const submitDelStock = () => {
|
2026-01-21 17:40:42 +08:00
|
|
|
|
proxy.$refs["delStockFormRef"].validate((valid) => {
|
|
|
|
|
|
if (valid) {
|
|
|
|
|
|
wisdomDelStock(delStockForm.value.billNo).then((response) => {
|
|
|
|
|
|
if (response.code == 200) {
|
2026-01-20 16:56:01 +08:00
|
|
|
|
proxy.$modal.msgSuccess("操作成功");
|
|
|
|
|
|
//数据列表
|
|
|
|
|
|
getList();
|
2026-01-21 17:40:42 +08:00
|
|
|
|
dialogDelStock.value = false;
|
|
|
|
|
|
} else {
|
2026-01-20 16:56:01 +08:00
|
|
|
|
proxy.$modal.msgError("操作失败");
|
|
|
|
|
|
}
|
2026-01-21 17:40:42 +08:00
|
|
|
|
});
|
2026-01-20 16:56:01 +08:00
|
|
|
|
}
|
2026-01-21 17:40:42 +08:00
|
|
|
|
});
|
|
|
|
|
|
};
|
2026-01-20 16:56:01 +08:00
|
|
|
|
/** 导出按钮操作 */
|
|
|
|
|
|
function handleExport() {
|
2026-01-21 17:40:42 +08:00
|
|
|
|
proxy.download(
|
|
|
|
|
|
"wisdom/stock/export",
|
|
|
|
|
|
{
|
|
|
|
|
|
...queryParams.value,
|
|
|
|
|
|
},
|
|
|
|
|
|
`stock_${new Date().getTime()}.xlsx`
|
|
|
|
|
|
);
|
2026-01-20 16:56:01 +08:00
|
|
|
|
}
|
|
|
|
|
|
//打印单据
|
2026-01-21 17:40:42 +08:00
|
|
|
|
function handlePrint() {
|
2026-01-20 16:56:01 +08:00
|
|
|
|
const date = new Date();
|
|
|
|
|
|
const year = date.getFullYear();
|
|
|
|
|
|
const month = date.getMonth() + 1; // 月份从0开始,需要加1
|
|
|
|
|
|
const day = date.getDate();
|
|
|
|
|
|
const hour = date.getHours();
|
|
|
|
|
|
const minute = date.getMinutes();
|
|
|
|
|
|
const second = date.getSeconds();
|
2026-01-21 17:40:42 +08:00
|
|
|
|
dateStr.value =
|
|
|
|
|
|
year + "-" + month + "-" + day + " " + hour + ":" + minute + ":" + second;
|
|
|
|
|
|
showContent.value = true;
|
2026-01-20 16:56:01 +08:00
|
|
|
|
}
|
|
|
|
|
|
//打印标签
|
2026-01-21 17:40:42 +08:00
|
|
|
|
function handlePrintTag() {
|
|
|
|
|
|
if (checkStockList.value.length == 0) {
|
2026-01-20 16:56:01 +08:00
|
|
|
|
proxy.$modal.msgError("请勾选数据");
|
2026-01-21 17:40:42 +08:00
|
|
|
|
return;
|
2026-01-20 16:56:01 +08:00
|
|
|
|
}
|
2026-01-21 17:40:42 +08:00
|
|
|
|
if (!printNum.value) {
|
2026-01-20 16:56:01 +08:00
|
|
|
|
proxy.$modal.msgError("请选择打印机编号");
|
2026-01-21 17:40:42 +08:00
|
|
|
|
return;
|
2026-01-20 16:56:01 +08:00
|
|
|
|
}
|
|
|
|
|
|
// let newArr = new Array();
|
2026-01-21 17:40:42 +08:00
|
|
|
|
for (let i = 0; i < checkStockList.value.length; i++) {
|
|
|
|
|
|
checkStockList.value[i].printer = printNum.value;
|
2026-01-20 16:56:01 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
2026-01-21 17:40:42 +08:00
|
|
|
|
printTag(checkStockList.value).then((response) => {
|
|
|
|
|
|
if (response.code == 200) {
|
2026-01-20 16:56:01 +08:00
|
|
|
|
proxy.$modal.msgSuccess("打印指令已发送");
|
2026-01-21 17:40:42 +08:00
|
|
|
|
} else {
|
2026-01-20 16:56:01 +08:00
|
|
|
|
proxy.$modal.msgError("操作失败");
|
|
|
|
|
|
}
|
2026-01-21 17:40:42 +08:00
|
|
|
|
});
|
2026-01-20 16:56:01 +08:00
|
|
|
|
}
|
2026-01-21 07:53:24 +08:00
|
|
|
|
|
2026-01-21 17:40:42 +08:00
|
|
|
|
const isExamine = ref(0); //是否需要开启审核 1开启;0不开启
|
2026-01-21 07:53:24 +08:00
|
|
|
|
//判断是否需要开启审核功能
|
2026-01-21 17:40:42 +08:00
|
|
|
|
function isAudit() {
|
2026-01-21 07:53:24 +08:00
|
|
|
|
// {configKey:"stock.audit.enabled"}
|
2026-01-21 17:40:42 +08:00
|
|
|
|
getAudit().then((response) => {
|
2026-01-21 07:53:24 +08:00
|
|
|
|
// console.log(2222222)
|
|
|
|
|
|
// console.log(response.msg)
|
2026-01-21 17:40:42 +08:00
|
|
|
|
isExamine.value = response.msg;
|
|
|
|
|
|
});
|
2026-01-21 07:53:24 +08:00
|
|
|
|
}
|
2026-01-20 16:56:01 +08:00
|
|
|
|
//是否开启审核
|
2026-01-21 17:40:42 +08:00
|
|
|
|
isAudit();
|
2026-01-20 16:56:01 +08:00
|
|
|
|
</script>
|
2026-01-21 07:53:24 +08:00
|
|
|
|
<style scoped lang="scss">
|
|
|
|
|
|
:deep(.el-table .success-row) {
|
2026-01-21 08:39:06 +08:00
|
|
|
|
background-color: #f8fdf5 !important;
|
2026-01-20 16:56:01 +08:00
|
|
|
|
}
|
2026-01-21 08:39:06 +08:00
|
|
|
|
.el-table {
|
|
|
|
|
|
/* 核心:把 hover 背景色设为和默认行背景色一致 */
|
2026-01-21 17:40:42 +08:00
|
|
|
|
// --el-table-row-hover-bg-color: transparent;
|
2026-01-21 08:39:06 +08:00
|
|
|
|
/* 或设为和表格背景色相同(比如白色),更通用 */
|
|
|
|
|
|
/* --el-table-row-hover-bg-color: #ffffff; */
|
2026-01-20 16:56:01 +08:00
|
|
|
|
}
|
2026-01-21 08:39:06 +08:00
|
|
|
|
|
2026-01-21 17:40:42 +08:00
|
|
|
|
.printMeBox {
|
|
|
|
|
|
div {
|
2026-01-20 16:56:01 +08:00
|
|
|
|
line-height: 30px;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
2026-01-21 17:40:42 +08:00
|
|
|
|
.topBox {
|
2026-01-20 16:56:01 +08:00
|
|
|
|
/* margin-bottom: 10px; */
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
flex-wrap: wrap;
|
|
|
|
|
|
}
|
2026-01-21 17:40:42 +08:00
|
|
|
|
.bottomBox {
|
2026-01-20 16:56:01 +08:00
|
|
|
|
margin-top: 20px;
|
|
|
|
|
|
}
|
2026-01-21 17:40:42 +08:00
|
|
|
|
.oneLineBox {
|
2026-01-20 16:56:01 +08:00
|
|
|
|
display: flex;
|
|
|
|
|
|
}
|
2026-01-21 17:40:42 +08:00
|
|
|
|
.everyBox {
|
2026-01-20 16:56:01 +08:00
|
|
|
|
/* width: 30%; */
|
|
|
|
|
|
width: 50%;
|
|
|
|
|
|
}
|
2026-01-21 17:40:42 +08:00
|
|
|
|
.examine {
|
2026-01-20 16:56:01 +08:00
|
|
|
|
margin-top: 20px;
|
|
|
|
|
|
height: 100px;
|
|
|
|
|
|
background-color: #ededed;
|
|
|
|
|
|
padding: 20px 0 0 20px;
|
|
|
|
|
|
border-radius: 10px;
|
|
|
|
|
|
}
|
|
|
|
|
|
/* .dialog_class{
|
|
|
|
|
|
pointer-events: none;
|
|
|
|
|
|
}
|
|
|
|
|
|
.el-dialog{
|
|
|
|
|
|
pointer-events: auto;
|
|
|
|
|
|
} */
|
2026-01-21 17:40:42 +08:00
|
|
|
|
/* /deep/ .el-overlay .el-modal-dialog {
|
2026-01-20 16:56:01 +08:00
|
|
|
|
z-index: 4;
|
|
|
|
|
|
} */
|
2026-01-21 17:40:42 +08:00
|
|
|
|
::v-deep .el-modal-dialog {
|
|
|
|
|
|
z-index: 1;
|
|
|
|
|
|
}
|
|
|
|
|
|
.picBox {
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
}
|
|
|
|
|
|
.everyPicBox {
|
|
|
|
|
|
position: relative;
|
|
|
|
|
|
}
|
|
|
|
|
|
.closeBox {
|
|
|
|
|
|
position: absolute;
|
|
|
|
|
|
right: 5px;
|
|
|
|
|
|
z-index: 1;
|
|
|
|
|
|
top: -15px;
|
|
|
|
|
|
}
|
2026-01-20 16:56:01 +08:00
|
|
|
|
</style>
|