1129 lines
39 KiB
Vue
1129 lines
39 KiB
Vue
|
|
<template>
|
|||
|
|
<div class="app-container">
|
|||
|
|
<el-splitter>
|
|||
|
|
<el-splitter-panel size="40%">
|
|||
|
|
<el-form :model="queryParams" ref="queryRef" v-show="showSearch" label-width="80">
|
|||
|
|
<el-row >
|
|||
|
|
<el-col :span="12">
|
|||
|
|
<el-form-item label="出库时间" prop="ckTime">
|
|||
|
|
<el-date-picker
|
|||
|
|
v-model="ckTime"
|
|||
|
|
type="datetimerange"
|
|||
|
|
start-placeholder="开始时间"
|
|||
|
|
end-placeholder="结束时间"
|
|||
|
|
format="YYYY/MM/DD HH:mm:ss"
|
|||
|
|
value-format="YYYY-MM-DD HH:mm:ss"
|
|||
|
|
/>
|
|||
|
|
</el-form-item>
|
|||
|
|
</el-col>
|
|||
|
|
<el-col :span="10">
|
|||
|
|
<el-form-item label="单据号" prop="billNoCk">
|
|||
|
|
<el-input
|
|||
|
|
v-model="queryParams.billNoCk"
|
|||
|
|
placeholder="请输入单据号"
|
|||
|
|
clearable
|
|||
|
|
@keyup.enter="handleQuery"
|
|||
|
|
/>
|
|||
|
|
</el-form-item>
|
|||
|
|
</el-col>
|
|||
|
|
|
|||
|
|
</el-row>
|
|||
|
|
<el-row :gutter="10" class="mb8">
|
|||
|
|
<el-col :span="12">
|
|||
|
|
<el-form-item label="出库类型" prop="ckType">
|
|||
|
|
<el-select v-model="queryParams.ckType" placeholder="请选择出库类型" clearable >
|
|||
|
|
<el-option v-for="dict in storeTypeList" :key="dict.id" :label="dict.typeName" :value="dict.typeCode" />
|
|||
|
|
</el-select>
|
|||
|
|
</el-form-item>
|
|||
|
|
</el-col>
|
|||
|
|
<el-col :span="12">
|
|||
|
|
<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-row :gutter="10" class="mb8">
|
|||
|
|
<el-col :span="1.5">
|
|||
|
|
<el-button
|
|||
|
|
type="primary"
|
|||
|
|
plain
|
|||
|
|
icon="Plus"
|
|||
|
|
@click="handleAdd"
|
|||
|
|
v-hasPermi="['wisdom:stock:add']"
|
|||
|
|
>新增出库</el-button>
|
|||
|
|
</el-col>
|
|||
|
|
<el-col :span="1.5">
|
|||
|
|
<el-button
|
|||
|
|
type="warning"
|
|||
|
|
plain
|
|||
|
|
icon="Download"
|
|||
|
|
@click="handleExport"
|
|||
|
|
v-hasPermi="['wisdom:stock:export']"
|
|||
|
|
>导出</el-button>
|
|||
|
|
</el-col>
|
|||
|
|
</el-row>
|
|||
|
|
<!-- <el-row>
|
|||
|
|
<el-col :span="4">
|
|||
|
|
<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-form>
|
|||
|
|
|
|||
|
|
<el-table v-loading="loading" :data="billList" @row-dblclick="billClick" >
|
|||
|
|
|
|||
|
|
<el-table-column label="单据号" align="center" prop="billNoCk" width="180"/>
|
|||
|
|
<el-table-column label="是否派送" align="center" prop="isDelivery" >
|
|||
|
|
<template #default="scope">
|
|||
|
|
<span v-if="scope.row.isDelivery == '0' || !scope.row.isDelivery">否</span>
|
|||
|
|
<span v-else-if="scope.row.isDelivery === '1'">是</span>
|
|||
|
|
<span v-else-if="scope.row.isDelivery === '2'">配送中</span>
|
|||
|
|
<span v-else-if="scope.row.isDelivery === '3'">配送完成</span>
|
|||
|
|
|
|||
|
|
</template>
|
|||
|
|
</el-table-column>
|
|||
|
|
<el-table-column label="出库类型" align="center" prop="ckTypeName" width="160" />
|
|||
|
|
<el-table-column label="出库时间" align="center" width="180">
|
|||
|
|
<template #default="scope">
|
|||
|
|
<span>{{ parseTime(scope.row.lyTime, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
|
|||
|
|
</template>
|
|||
|
|
</el-table-column>
|
|||
|
|
<el-table-column label="理货员" align="center" prop="ckLihuoY" />
|
|||
|
|
<el-table-column label="施工队" align="center" prop="teamName" width="160" />
|
|||
|
|
<el-table-column label="操作" align="center" width="180" >
|
|||
|
|
<template #default="scope">
|
|||
|
|
<el-button link type="primary" @click="picDetailFun(scope.row.billNoCk)">图片</el-button>
|
|||
|
|
<el-button link type="primary" @click="billClick(scope.row, 'bill')">出库单</el-button>
|
|||
|
|
<el-button link type="primary" @click="editData(scope.row)">修改</el-button>
|
|||
|
|
</template>
|
|||
|
|
</el-table-column>
|
|||
|
|
</el-table>
|
|||
|
|
|
|||
|
|
<pagination
|
|||
|
|
v-show="total>0"
|
|||
|
|
:total="total"
|
|||
|
|
v-model:page="queryParams.pageNum"
|
|||
|
|
v-model:limit="queryParams.pageSize"
|
|||
|
|
@pagination="getList"
|
|||
|
|
/>
|
|||
|
|
</el-splitter-panel>
|
|||
|
|
<el-splitter-panel :min="200">
|
|||
|
|
<el-row v-show="outboundList.length>0" class="mb8">
|
|||
|
|
<el-col :span="3">
|
|||
|
|
<el-button
|
|||
|
|
type="success"
|
|||
|
|
plain
|
|||
|
|
icon="Printer"
|
|||
|
|
@click="handlePrint"
|
|||
|
|
v-print="printViewInfo"
|
|||
|
|
v-hasPermi="['wisdom:outbound:print']"
|
|||
|
|
>打印单据</el-button>
|
|||
|
|
</el-col>
|
|||
|
|
<el-col :span="5">
|
|||
|
|
<el-button
|
|||
|
|
type="primary"
|
|||
|
|
plain
|
|||
|
|
icon="Plus"
|
|||
|
|
@click="handleDispatch"
|
|||
|
|
|
|||
|
|
|
|||
|
|
>生成调度任务</el-button>
|
|||
|
|
</el-col>
|
|||
|
|
</el-row>
|
|||
|
|
<!-- @selection-change="printSelectionChange" -->
|
|||
|
|
<el-table v-loading="detailLoading" show-overflow-tooltip border :data="outboundList" @selection-change="dispatchSelectionChange">
|
|||
|
|
<el-table-column type="selection" width="55" align="center" />
|
|||
|
|
<el-table-column label="序号" align="center" type="index" width="70" />
|
|||
|
|
|
|||
|
|
<el-table-column label="订单编号" align="center" prop="sapNo" width="150"/>
|
|||
|
|
<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"/>
|
|||
|
|
<el-table-column label="合同单价" align="center" prop="htDj" width="120" />
|
|||
|
|
<el-table-column label="计量单位" align="center" prop="dw" />
|
|||
|
|
<el-table-column label="实际出库数量" align="center" prop="realQty" width="120"/>
|
|||
|
|
<el-table-column label="所属仓库" align="center" prop="cangkuName" width="150"/>
|
|||
|
|
<el-table-column label="库位码" align="center" prop="pcode" width="120"/>
|
|||
|
|
<el-table-column label="托盘码" align="center" prop="trayCode" />
|
|||
|
|
<el-table-column label="身份码" align="center" prop="entityId" width="200"/>
|
|||
|
|
<el-table-column label="出库类型" align="center" prop="ckTypeName" />
|
|||
|
|
<el-table-column label="物资类型" align="center" prop="wlTypeName" />
|
|||
|
|
<el-table-column label="出库时间" align="center" width="100">
|
|||
|
|
<template #default="scope">
|
|||
|
|
<span>{{ parseTime(scope.row.lyTime, '{y}-{m}-{d}') }}</span>
|
|||
|
|
</template>
|
|||
|
|
</el-table-column>
|
|||
|
|
<!-- <el-table-column label="库龄" align="center" prop="stockAge" /> -->
|
|||
|
|
<el-table-column label="理货员" align="center" prop="ckLihuoY" />
|
|||
|
|
<el-table-column label="现场图片" align="center" v-if="isExamine==1">
|
|||
|
|
<template #default="scope">
|
|||
|
|
<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)"/>
|
|||
|
|
</template>
|
|||
|
|
</el-table-column>
|
|||
|
|
<!-- <el-table-column label="是否已出库" align="center" prop="isChuku" /> -->
|
|||
|
|
<el-table-column label="备注" align="center" prop="ckRemark" 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">
|
|||
|
|
<template #default="scope">
|
|||
|
|
<el-button link type="primary" icon="Edit" @click="handleUpdate(scope.row)" v-hasPermi="['wisdom:outbound:edit']">修改</el-button>
|
|||
|
|
<el-button
|
|||
|
|
link
|
|||
|
|
type="primary"
|
|||
|
|
icon="Delete"
|
|||
|
|
@click="handleStockDelete(scope.row)"
|
|||
|
|
v-hasPermi="['wisdom:outbound:delete']"
|
|||
|
|
>撤销</el-button>
|
|||
|
|
</template>
|
|||
|
|
</el-table-column>
|
|||
|
|
</el-table>
|
|||
|
|
</el-splitter-panel>
|
|||
|
|
</el-splitter>
|
|||
|
|
|
|||
|
|
<!-- 打印 -->
|
|||
|
|
<div id="printMe" class="printMeBox" v-show="showContent">
|
|||
|
|
<printBill :billAllObj="outboundList" billStatus="ck" />
|
|||
|
|
</div>
|
|||
|
|
<!-- 添加或修改库存单据主对话框 -->
|
|||
|
|
<!-- append-to-body -->
|
|||
|
|
<el-dialog :title="title" v-model="open" width="75%" :close-on-click-modal="false" :z-index="4" :draggable="true">
|
|||
|
|
<el-form ref="stockRef" :model="storeData" :rules="rules" >
|
|||
|
|
<el-row :gutter="20">
|
|||
|
|
<!-- <el-col :span="12">
|
|||
|
|
<el-form-item label="关键字" >
|
|||
|
|
<el-input v-model="orderNum" placeholder="请输入项目编号或者订单号" />
|
|||
|
|
</el-form-item>
|
|||
|
|
</el-col> -->
|
|||
|
|
<el-col :span="6">
|
|||
|
|
<el-form-item label="项目号" >
|
|||
|
|
<el-input v-model="outQueryParams.xmNo" placeholder="请输入项目号" />
|
|||
|
|
</el-form-item>
|
|||
|
|
</el-col>
|
|||
|
|
<el-col :span="6">
|
|||
|
|
<el-form-item label="订单号" >
|
|||
|
|
<el-input v-model="outQueryParams.sapNo" placeholder="请输入订单号" />
|
|||
|
|
</el-form-item>
|
|||
|
|
</el-col>
|
|||
|
|
<el-col :span="6">
|
|||
|
|
<el-form-item label="物料号" >
|
|||
|
|
<el-input v-model="outQueryParams.wlNo" placeholder="请输入物料号" />
|
|||
|
|
</el-form-item>
|
|||
|
|
</el-col>
|
|||
|
|
<el-col :span="6">
|
|||
|
|
<el-form-item label="物料描述" >
|
|||
|
|
<el-input v-model="outQueryParams.wlMs" placeholder="请输入物料描述" />
|
|||
|
|
</el-form-item>
|
|||
|
|
</el-col>
|
|||
|
|
|
|||
|
|
</el-row>
|
|||
|
|
<el-row :gutter="20">
|
|||
|
|
<el-col :span="6">
|
|||
|
|
<el-form-item label="项目描述" >
|
|||
|
|
<el-input v-model="outQueryParams.xmMs" placeholder="项目描述" />
|
|||
|
|
</el-form-item>
|
|||
|
|
</el-col>
|
|||
|
|
<el-col :span="6">
|
|||
|
|
<el-form-item label="库位" >
|
|||
|
|
<el-input v-model="outQueryParams.pcode" placeholder="库位" />
|
|||
|
|
</el-form-item>
|
|||
|
|
</el-col>
|
|||
|
|
<el-col :span="6">
|
|||
|
|
<el-form-item label="物资类型" >
|
|||
|
|
<el-select v-model="outQueryParams.wlType" placeholder="请选择物资类型" clearable >
|
|||
|
|
<el-option v-for="dict in wzlxList" :key="dict.id" :label="dict.typeName" :value="dict.typeCode" />
|
|||
|
|
</el-select>
|
|||
|
|
</el-form-item>
|
|||
|
|
</el-col>
|
|||
|
|
<el-col :span="6">
|
|||
|
|
<el-form-item label="所属仓库" >
|
|||
|
|
<!-- <el-select v-model="outQueryParams.cangku" placeholder="请选择仓库" clearable >
|
|||
|
|
<el-option v-for="dict in warehouseList" :key="dict.id" :label="dict.warehouseName" :value="dict.warehouseCode" />
|
|||
|
|
</el-select> -->
|
|||
|
|
<el-cascader style="width: 100%" :options="warehouseList" v-model="outQueryParams.cangku" :props="{children: 'children', label: 'warehouseName', value: 'warehouseCode'}" />
|
|||
|
|
</el-form-item>
|
|||
|
|
</el-col>
|
|||
|
|
</el-row>
|
|||
|
|
<el-row :gutter="20">
|
|||
|
|
<el-col :span="6">
|
|||
|
|
<el-form-item label="供应商" >
|
|||
|
|
<el-input v-model="outQueryParams.gysMc" placeholder="供应商" />
|
|||
|
|
</el-form-item>
|
|||
|
|
</el-col>
|
|||
|
|
<el-col :span="6">
|
|||
|
|
<el-form-item label="备注" >
|
|||
|
|
<el-input v-model="outQueryParams.remark" placeholder="备注" />
|
|||
|
|
</el-form-item>
|
|||
|
|
</el-col>
|
|||
|
|
<el-col :span="4">
|
|||
|
|
<el-button type="primary" @click="searchPlan" >查询</el-button>
|
|||
|
|
</el-col>
|
|||
|
|
</el-row>
|
|||
|
|
<el-row :gutter="20">
|
|||
|
|
<el-col :span="6">
|
|||
|
|
<el-form-item label="出库类型" prop="ckType">
|
|||
|
|
<el-select v-model="storeData.ckType" placeholder="请选择出库类型" clearable >
|
|||
|
|
<el-option v-for="dict in storeTypeList" :key="dict.id" :label="dict.typeName" :value="dict.typeCode" />
|
|||
|
|
</el-select>
|
|||
|
|
</el-form-item>
|
|||
|
|
</el-col>
|
|||
|
|
<el-col :span="6">
|
|||
|
|
<el-form-item label="施工队" prop="teamCode">
|
|||
|
|
<el-select v-model="storeData.teamCode" placeholder="请选择施工队" clearable filterable>
|
|||
|
|
<el-option v-for="dict in wzTypeList" :key="dict.id" :label="dict.teamName" :value="dict.teamCode" />
|
|||
|
|
</el-select>
|
|||
|
|
</el-form-item>
|
|||
|
|
</el-col>
|
|||
|
|
|
|||
|
|
<el-col :span="6">
|
|||
|
|
<el-form-item label="理货员" prop="ckLihuoY">
|
|||
|
|
<el-select v-model="storeData.ckLihuoY" placeholder="请选择理货员" clearable >
|
|||
|
|
<el-option v-for="dict in personList" :key="dict.userId" :label="dict.userName" :value="dict.userName" />
|
|||
|
|
</el-select>
|
|||
|
|
</el-form-item>
|
|||
|
|
</el-col>
|
|||
|
|
<el-col :span="6">
|
|||
|
|
<el-form-item label="是否配送" prop="isDelivery">
|
|||
|
|
<el-select v-model="storeData.isDelivery" placeholder="请选择是否配送" clearable >
|
|||
|
|
<el-option :key="1" label="是" value="1" />
|
|||
|
|
<el-option :key="0" label="否" value="0" />
|
|||
|
|
</el-select>
|
|||
|
|
</el-form-item>
|
|||
|
|
</el-col>
|
|||
|
|
<!-- <el-col :span="6">
|
|||
|
|
<el-form-item label="领用时间" prop="lyTime">
|
|||
|
|
<el-date-picker clearable
|
|||
|
|
v-model="storeData.lyTime"
|
|||
|
|
type="datetime"
|
|||
|
|
value-format="YYYY-MM-DD HH:mm:ss"
|
|||
|
|
placeholder="请选择领用时间">
|
|||
|
|
</el-date-picker>
|
|||
|
|
</el-form-item>
|
|||
|
|
</el-col> -->
|
|||
|
|
</el-row>
|
|||
|
|
<el-row :gutter="20">
|
|||
|
|
<el-col :span="6">
|
|||
|
|
<el-form-item label="项目号" >
|
|||
|
|
<el-input v-model="storeData.xmNoCk" placeholder="请输入项目号" />
|
|||
|
|
</el-form-item>
|
|||
|
|
</el-col>
|
|||
|
|
<el-col :span="18">
|
|||
|
|
<el-form-item label="项目描述" >
|
|||
|
|
<el-input v-model="storeData.xmMsCk" placeholder="请输入项目描述" />
|
|||
|
|
</el-form-item>
|
|||
|
|
</el-col>
|
|||
|
|
</el-row>
|
|||
|
|
</el-form>
|
|||
|
|
<!-- @selection-change="handleSelectionChange" -->
|
|||
|
|
<el-table :data="planList" height="400" border show-overflow-tooltip style="width: 100%" @selection-change="handleSelectionChange">
|
|||
|
|
<el-table-column type="selection" width="55" align="center" />
|
|||
|
|
<el-table-column label="序号" type="index" align="center" width="70" />
|
|||
|
|
<el-table-column label="物料号" align="center" prop="wlNo" width="100"/>
|
|||
|
|
<el-table-column label="订单号" align="center" prop="sapNo" width="100" />
|
|||
|
|
<el-table-column label="物料描述" align="center" prop="wlMs" width="200"/>
|
|||
|
|
<el-table-column label="出库数量" align="center" prop="realQty" width="100">
|
|||
|
|
<template #default="scope">
|
|||
|
|
<el-input v-model="scope.row.realQty" placeholder="请输入出库数量" />
|
|||
|
|
</template>
|
|||
|
|
</el-table-column>
|
|||
|
|
<el-table-column label="单价" align="center" prop="htDj" />
|
|||
|
|
<el-table-column label="单位" align="center" prop="dw" />
|
|||
|
|
<el-table-column label="库位" align="center" prop="pcode" width="150"></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="gysMc" width="200"/>
|
|||
|
|
<el-table-column label="容器码" align="center" prop="trayCode"></el-table-column>
|
|||
|
|
<el-table-column label="身份码" align="center" prop="entityId" width="200"></el-table-column>
|
|||
|
|
<el-table-column label="备注" align="center" width="200">
|
|||
|
|
<template #default="scope">
|
|||
|
|
<el-input v-model="scope.row.ckRemark" placeholder="请输入备注"></el-input>
|
|||
|
|
</template>
|
|||
|
|
</el-table-column>
|
|||
|
|
<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" width="150" v-if="isExamine==1">
|
|||
|
|
<template #default="scope">
|
|||
|
|
<el-upload
|
|||
|
|
class="upload-demo"
|
|||
|
|
:action="actionUrl"
|
|||
|
|
:multiple="false"
|
|||
|
|
:headers="headers"
|
|||
|
|
:on-preview="handlePreview"
|
|||
|
|
:on-remove=" function (response) {
|
|||
|
|
return handleRemove(response, scope.row.id) }"
|
|||
|
|
:on-success="function (response) {
|
|||
|
|
return handleAvatarSuccess(response, scope.row.id) }"
|
|||
|
|
>
|
|||
|
|
<el-button type="primary" size="small" v-show="!scope.row.photoUrl">选择图片</el-button>
|
|||
|
|
</el-upload>
|
|||
|
|
</template>
|
|||
|
|
</el-table-column>
|
|||
|
|
</el-table>
|
|||
|
|
<!-- 审批模块 暂时注释-->
|
|||
|
|
<div class="examine" v-show="isExamine==1">
|
|||
|
|
<el-row :gutter="20">
|
|||
|
|
<el-col :span="8">
|
|||
|
|
<el-form-item label="审批人" >
|
|||
|
|
<el-select
|
|||
|
|
v-model="storeData.approverId"
|
|||
|
|
clearable
|
|||
|
|
filterable
|
|||
|
|
placeholder="请选择审批人"
|
|||
|
|
>
|
|||
|
|
<el-option v-for="dict in personList" :key="dict.userId" :label="dict.userName" :value="dict.userId" />
|
|||
|
|
</el-select>
|
|||
|
|
</el-form-item>
|
|||
|
|
</el-col>
|
|||
|
|
|
|||
|
|
</el-row>
|
|||
|
|
</div>
|
|||
|
|
<template #footer>
|
|||
|
|
<div class="dialog-footer">
|
|||
|
|
<el-button type="primary" @click="submitForm">出 库</el-button>
|
|||
|
|
<el-button @click="cancel">取 消</el-button>
|
|||
|
|
</div>
|
|||
|
|
</template>
|
|||
|
|
</el-dialog>
|
|||
|
|
|
|||
|
|
<!-- 修改主单据,入库时间等字段 -->
|
|||
|
|
<el-dialog title="修改" v-model="openBill" append-to-body width="40%" >
|
|||
|
|
<el-form :model="billData" :rules="rules" ref="editRef" label-width="100px">
|
|||
|
|
<el-form-item label="出库类型" prop="ckType">
|
|||
|
|
<el-select v-model="billData.ckType" placeholder="请选择出库类型" clearable >
|
|||
|
|
<el-option v-for="dict in storeTypeList" :key="dict.id" :label="dict.typeName" :value="dict.typeCode" />
|
|||
|
|
</el-select>
|
|||
|
|
</el-form-item>
|
|||
|
|
<el-form-item label="施工队" prop="teamCode">
|
|||
|
|
<el-select v-model="billData.teamCode" placeholder="请选择施工队" clearable >
|
|||
|
|
<el-option v-for="dict in wzTypeList" :key="dict.id" :label="dict.teamName" :value="dict.teamCode" />
|
|||
|
|
</el-select>
|
|||
|
|
</el-form-item>
|
|||
|
|
<el-form-item label="理货员" prop="ckLihuoY">
|
|||
|
|
<el-select v-model="billData.ckLihuoY" placeholder="请选择理货员" clearable >
|
|||
|
|
<el-option v-for="dict in personList" :key="dict.userId" :label="dict.userName" :value="dict.userName" />
|
|||
|
|
</el-select>
|
|||
|
|
</el-form-item>
|
|||
|
|
<el-form-item label="是否配送" prop="isDelivery">
|
|||
|
|
<el-select v-model="billData.isDelivery" placeholder="请选择是否配送" clearable >
|
|||
|
|
<el-option :key="1" label="是" value="1" />
|
|||
|
|
<el-option :key="0" label="否" value="0" />
|
|||
|
|
</el-select>
|
|||
|
|
</el-form-item>
|
|||
|
|
</el-form>
|
|||
|
|
<template #footer>
|
|||
|
|
<div class="dialog-footer">
|
|||
|
|
<el-button type="primary" @click="editForm">确 定</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="dialogPicDetailVisible">
|
|||
|
|
<el-image style="width: 100px; height: 100px;margin-right: 20px;" :src="url" v-for="url in picList" :key="url" :preview-src-list="picList"/>
|
|||
|
|
</el-dialog>
|
|||
|
|
|
|||
|
|
<el-dialog title="出库单" v-model="dialogBill" append-to-body width="80%" :close-on-click-modal="false">
|
|||
|
|
<bill :billAllObj="billAllObj" billStatus="ck" />
|
|||
|
|
<template #footer>
|
|||
|
|
<div class="dialog-footer">
|
|||
|
|
<el-button @click="dialogBill=false">关 闭</el-button>
|
|||
|
|
</div>
|
|||
|
|
</template>
|
|||
|
|
</el-dialog>
|
|||
|
|
<el-dialog title="调度任务" v-model="dispatchOpen" width="30%" :close-on-click-modal="false" >
|
|||
|
|
<el-form >
|
|||
|
|
<el-row >
|
|||
|
|
<el-col >
|
|||
|
|
<el-form-item label="调度模式" >
|
|||
|
|
<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">
|
|||
|
|
<el-button type="primary" @click="submitDispatch">确 定</el-button>
|
|||
|
|
</div>
|
|||
|
|
</template>
|
|||
|
|
</el-dialog>
|
|||
|
|
|
|||
|
|
|
|||
|
|
<!-- 修改主单据,入库时间等字段 -->
|
|||
|
|
<el-dialog title="修改" v-model="outInfoDialog" append-to-body width="40%" >
|
|||
|
|
<el-form :model="outInfoData" :rules="outInfoRules" ref="outInfoRef" label-width="100px">
|
|||
|
|
<el-form-item label="出库数量" prop="realQty">
|
|||
|
|
<el-input v-model="outInfoData.realQty" placeholder="请输入出库数量" />
|
|||
|
|
</el-form-item>
|
|||
|
|
<el-form-item label="备注" prop="ckRemark">
|
|||
|
|
<el-input v-model="outInfoData.ckRemark" placeholder="请输入备注" />
|
|||
|
|
</el-form-item>
|
|||
|
|
</el-form>
|
|||
|
|
<template #footer>
|
|||
|
|
<div class="dialog-footer">
|
|||
|
|
<el-button type="primary" @click="outInfoForm">确 定</el-button>
|
|||
|
|
</div>
|
|||
|
|
</template>
|
|||
|
|
</el-dialog>
|
|||
|
|
</div>
|
|||
|
|
</template>
|
|||
|
|
|
|||
|
|
<script setup name="outbound">
|
|||
|
|
import { listOutbound,addOutbound,listBill,picDetail,generateDispatch,editOutbound} from "@/api/wisdom/outbound"; //列表
|
|||
|
|
import {listOuttype} from "@/api/information/outtype"; //出库类型
|
|||
|
|
import {listConstruction} from "@/api/information/construction"; //施工队
|
|||
|
|
// import {warehouseDict} from "@/api/information/warehouseinfo"; //所属仓库
|
|||
|
|
import {warehouseAll} from "@/api/information/warehouseinfo"; //所属仓库
|
|||
|
|
import {materialtypeDict} from "@/api/information/materialtype"; //物资类型
|
|||
|
|
import {personListDict} from "@/api/system/user"; //理货员
|
|||
|
|
// import {getKwList} from "@/api/information/pcdedetail"; //库位下拉数据
|
|||
|
|
// import { Plus } from '@element-plus/icons-vue'
|
|||
|
|
import { getAudit, ckDelStock, updateStock} from "@/api/wisdom/stock";
|
|||
|
|
import { getToken } from "@/utils/auth";
|
|||
|
|
import bill from '@/components/storageBill/bill.vue'
|
|||
|
|
import printBill from '@/components/printBill/bill.vue'
|
|||
|
|
import { ref } from "vue";
|
|||
|
|
|
|||
|
|
|
|||
|
|
const headers = ref({
|
|||
|
|
Authorization: "Bearer " + getToken()
|
|||
|
|
});
|
|||
|
|
const { proxy } = getCurrentInstance();
|
|||
|
|
const billList = ref([]);
|
|||
|
|
const outboundList = ref([]);
|
|||
|
|
|
|||
|
|
const detailLoading = ref(false);
|
|||
|
|
const open = ref(false);
|
|||
|
|
const loading = ref(true);
|
|||
|
|
const dispatchOpen = ref(false);
|
|||
|
|
const showSearch = ref(true);
|
|||
|
|
const ids = ref([]);
|
|||
|
|
const single = ref(true);
|
|||
|
|
const multiple = ref(true);
|
|||
|
|
const total = ref(0);
|
|||
|
|
const title = ref("");
|
|||
|
|
const planLoading = ref(true);
|
|||
|
|
const planList = ref([]); //从供应计划中添加列表
|
|||
|
|
|
|||
|
|
const storeTypeList = ref([]); //出库类型下拉数据
|
|||
|
|
const wzTypeList = ref([]); //施工队下拉数据
|
|||
|
|
const wzlxList = ref([]) //物资类型下拉数据
|
|||
|
|
const warehouseList = ref([]) //所属仓库下拉数据
|
|||
|
|
const personList = ref([]); //理货员下拉数据
|
|||
|
|
const orderNum = ref("") //搜索条件:订单号
|
|||
|
|
const showContent = ref(false); // 控制打印内容是否显示
|
|||
|
|
const dateStr = ref("") //打印单据生成的日期
|
|||
|
|
const printList = ref([]) //要打印的数据列表
|
|||
|
|
const dispatchList = ref([]) //要生成调度任务的数据列表
|
|||
|
|
|
|||
|
|
const isExamine = ref(0) //是否需要开启审核 1开启;0不开启
|
|||
|
|
const actionUrl = import.meta.env.VITE_APP_BASE_API+"/wisdom/signature/upload"
|
|||
|
|
const dialogImageUrl = ref('')
|
|||
|
|
const dialogVisible = ref(false)
|
|||
|
|
const srcList = ref([])
|
|||
|
|
const ckTime = ref([])
|
|||
|
|
const dialogPicDetailVisible = ref(false)
|
|||
|
|
const picList = ref([])
|
|||
|
|
const resource = ref("") //调度模式 1仅立库;2立库+AGV
|
|||
|
|
|
|||
|
|
const data = reactive({
|
|||
|
|
form: {},
|
|||
|
|
storeData:{}, //出库数据
|
|||
|
|
queryParams: {
|
|||
|
|
pageNum: 1,
|
|||
|
|
pageSize: 10,
|
|||
|
|
// isChuku:1, //出库,固定传1
|
|||
|
|
// rkTime:"", //出库时间
|
|||
|
|
isChukuList:[1,3],
|
|||
|
|
statDate:null,
|
|||
|
|
endDate:null,
|
|||
|
|
xmNo:"",
|
|||
|
|
sapNo:"",
|
|||
|
|
billNoCk:"",
|
|||
|
|
ids: [],
|
|||
|
|
xmMs:"",
|
|||
|
|
wlNo:"",
|
|||
|
|
gysNo:"",
|
|||
|
|
pcode:"",
|
|||
|
|
ckType:"",
|
|||
|
|
gysMc:"",
|
|||
|
|
wlMs:"",
|
|||
|
|
wlType:"",
|
|||
|
|
cangku:""
|
|||
|
|
},
|
|||
|
|
outQueryParams:{
|
|||
|
|
xmNo:"",
|
|||
|
|
wlNo:"",
|
|||
|
|
sapNo:"",
|
|||
|
|
wlMs:"",
|
|||
|
|
xmMs:"",
|
|||
|
|
pcode:"",
|
|||
|
|
wlType:"",
|
|||
|
|
cangku:"",
|
|||
|
|
gysMc:"",
|
|||
|
|
pageNum:1,
|
|||
|
|
pageSize:50,
|
|||
|
|
isChuku:0,
|
|||
|
|
remark:""
|
|||
|
|
},
|
|||
|
|
detailQueryParams:{
|
|||
|
|
pageNum: 1,
|
|||
|
|
pageSize: 1000,
|
|||
|
|
// isChuku:1,
|
|||
|
|
isChukuList:[1,3],
|
|||
|
|
billNoCk:null
|
|||
|
|
},
|
|||
|
|
rules: {
|
|||
|
|
ckType: [{ required: true, message: "出库类型不能为空", trigger: "change" }],
|
|||
|
|
teamCode: [{ required: true, message: "施工队不能为空", trigger: "change" }],
|
|||
|
|
// lyTime: [{ required: true, message: "领用时间不能为空", trigger: "change" }],
|
|||
|
|
ckLihuoY: [{ required: true, message: "理货员不能为空", trigger: "change" }],
|
|||
|
|
isDelivery: [{ required: true, message: "是否需要配送", trigger: "change" }],
|
|||
|
|
},
|
|||
|
|
printViewInfo: {
|
|||
|
|
id: "printMe", //打印区域的唯一的id属性
|
|||
|
|
popTitle: '入库信息打印', // 页眉文字 (不设置时显示undifined)(页眉页脚可以在打印页面的更多设置的选项中取消勾选)
|
|||
|
|
|
|||
|
|
|
|||
|
|
beforeOpenCallback () {
|
|||
|
|
showContent.value = false;
|
|||
|
|
}, // 开始打印之前的callback
|
|||
|
|
openCallback () { }, // 调用打印时的callback
|
|||
|
|
closeCallback () { }, // 关闭打印的callback(无法区分确认or取消)
|
|||
|
|
clickMounted () { },
|
|||
|
|
|
|||
|
|
standard: '',
|
|||
|
|
extarCss: ''
|
|||
|
|
}
|
|||
|
|
});
|
|||
|
|
|
|||
|
|
const { queryParams, storeData, rules,form,printViewInfo,outQueryParams,detailQueryParams } = toRefs(data);
|
|||
|
|
//双击主单据
|
|||
|
|
function billClick(row, type){
|
|||
|
|
if (type !== 'bill') {
|
|||
|
|
detailLoading.value = true;
|
|||
|
|
}
|
|||
|
|
if(row.billNoCk){
|
|||
|
|
detailQueryParams.value.billNoCk = row.billNoCk
|
|||
|
|
getDetailList(type)
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
const getDetailList = (type) => {
|
|||
|
|
listOutbound(detailQueryParams.value).then(response => {
|
|||
|
|
if (type == 'bill') {
|
|||
|
|
billAllObj.value = response.rows
|
|||
|
|
dialogBill.value = true
|
|||
|
|
return;
|
|||
|
|
}
|
|||
|
|
outboundList.value = response.rows;
|
|||
|
|
// detailTotal.value = response.total;
|
|||
|
|
detailLoading.value = false;
|
|||
|
|
});
|
|||
|
|
};
|
|||
|
|
function picDetailFun(billNoCk){
|
|||
|
|
picDetail({billNo:billNoCk,photoType:1}).then(response => {
|
|||
|
|
if(response.data.length>0){
|
|||
|
|
dialogPicDetailVisible.value = true
|
|||
|
|
picList.value = response.data
|
|||
|
|
|
|||
|
|
}else{
|
|||
|
|
proxy.$modal.msgWarning("暂无图片");
|
|||
|
|
}
|
|||
|
|
// console.log(1111)
|
|||
|
|
// console.log(response)
|
|||
|
|
});
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
function preview(url){
|
|||
|
|
srcList.value = [url]
|
|||
|
|
}
|
|||
|
|
//预览图片
|
|||
|
|
function handlePreview(uploadFile){
|
|||
|
|
// console.log(222222)
|
|||
|
|
// console.log(res)
|
|||
|
|
dialogImageUrl.value = uploadFile.response.url
|
|||
|
|
dialogVisible.value = true
|
|||
|
|
}
|
|||
|
|
//删除图片
|
|||
|
|
function handleRemove(res,id){
|
|||
|
|
for(let i=0;i<planList.value.length;i++){
|
|||
|
|
if(planList.value[i].id ==id){
|
|||
|
|
planList.value[i].photoUrl = ""
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
// console.log(33333333)
|
|||
|
|
// console.log(planList.value)
|
|||
|
|
// console.log(res)
|
|||
|
|
// console.log(id)
|
|||
|
|
// console.log(pcode)
|
|||
|
|
}
|
|||
|
|
// 图片上传成功回调
|
|||
|
|
function handleAvatarSuccess(res,id){
|
|||
|
|
// console.log(222222)
|
|||
|
|
// console.log(id)
|
|||
|
|
// console.log(pcode)
|
|||
|
|
for(let i=0;i<planList.value.length;i++){
|
|||
|
|
if(planList.value[i].id ==id){
|
|||
|
|
planList.value[i].photoUrl = res.url
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
// console.log(222222)
|
|||
|
|
// console.log(res)
|
|||
|
|
// console.log(row)
|
|||
|
|
}
|
|||
|
|
/** 查询单据主数据 */
|
|||
|
|
function getList() {
|
|||
|
|
loading.value = true;
|
|||
|
|
listBill(queryParams.value).then(response => {
|
|||
|
|
billList.value = response.rows;
|
|||
|
|
total.value = response.total;
|
|||
|
|
loading.value = false;
|
|||
|
|
});
|
|||
|
|
// listOutbound(queryParams.value).then(response => {
|
|||
|
|
// outboundList.value = response.rows;
|
|||
|
|
// total.value = response.total;
|
|||
|
|
// loading.value = false;
|
|||
|
|
// });
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
// 取消按钮
|
|||
|
|
function cancel() {
|
|||
|
|
open.value = false;
|
|||
|
|
reset();
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
// 表单重置
|
|||
|
|
function reset() {
|
|||
|
|
planList.value = []
|
|||
|
|
storeData.value = {}
|
|||
|
|
orderNum.value = ""
|
|||
|
|
proxy.resetForm("stockRef");
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
/** 搜索按钮操作 */
|
|||
|
|
function handleQuery() {
|
|||
|
|
if(ckTime.value && ckTime.value.length>0){
|
|||
|
|
queryParams.value.statDate = ckTime.value[0]
|
|||
|
|
queryParams.value.endDate = ckTime.value[1]
|
|||
|
|
}else{
|
|||
|
|
queryParams.value.statDate = ""
|
|||
|
|
queryParams.value.endDate = ""
|
|||
|
|
}
|
|||
|
|
queryParams.value.pageNum = 1;
|
|||
|
|
getList();
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
/** 重置按钮操作 */
|
|||
|
|
function resetQuery() {
|
|||
|
|
proxy.resetForm("queryRef");
|
|||
|
|
ckTime.value = []
|
|||
|
|
handleQuery();
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
//出库 多选框选中数据
|
|||
|
|
function handleSelectionChange(selection) {
|
|||
|
|
ids.value = selection.map(info=>info.id)
|
|||
|
|
}
|
|||
|
|
//打印单据 多选框选中数据
|
|||
|
|
// function printSelectionChange(selection){
|
|||
|
|
// // console.log(selection)
|
|||
|
|
// printList.value = selection
|
|||
|
|
// queryParams.value.ids = selection.map(item => item.id)
|
|||
|
|
// // console.log(queryParams.value.ids)
|
|||
|
|
// }
|
|||
|
|
//生成调度 多选
|
|||
|
|
function dispatchSelectionChange(selection){
|
|||
|
|
// console.log(selection)
|
|||
|
|
dispatchList.value = selection
|
|||
|
|
// console.log(dispatchList.value)
|
|||
|
|
// queryParams.value.ids = selection.map(item => item.id)
|
|||
|
|
// console.log(queryParams.value.ids)
|
|||
|
|
}
|
|||
|
|
//打印单据
|
|||
|
|
function handlePrint(){
|
|||
|
|
// if(printList.value.length==0){
|
|||
|
|
// proxy.$modal.msgError("请勾选数据");
|
|||
|
|
// return
|
|||
|
|
// }
|
|||
|
|
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();
|
|||
|
|
dateStr.value = year+"-"+month+"-"+day+" "+hour+":"+minute+":"+second
|
|||
|
|
showContent.value = true
|
|||
|
|
}
|
|||
|
|
//点击 生成调度任务 按钮
|
|||
|
|
function handleDispatch(){
|
|||
|
|
|
|||
|
|
if(dispatchList.value.length==0){
|
|||
|
|
proxy.$modal.msgError("请勾选数据");
|
|||
|
|
return
|
|||
|
|
}
|
|||
|
|
dispatchOpen.value = true
|
|||
|
|
|
|||
|
|
}
|
|||
|
|
// 提交调度任务
|
|||
|
|
function submitDispatch(){
|
|||
|
|
// console.log(resource.value)
|
|||
|
|
if(!resource.value){
|
|||
|
|
proxy.$modal.msgWarning("请选择调度模式");
|
|||
|
|
return
|
|||
|
|
}
|
|||
|
|
//调用生成调度任务接口
|
|||
|
|
const data = dispatchList.value.map(item=>({
|
|||
|
|
sourceName:item.pcode,
|
|||
|
|
targetName:'V01-230101',
|
|||
|
|
taskTypeName:'下架',
|
|||
|
|
taskType:1,
|
|||
|
|
mid:item.wlNo,
|
|||
|
|
num:1,
|
|||
|
|
dispatchMode:resource.value
|
|||
|
|
}))
|
|||
|
|
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);
|
|||
|
|
}
|
|||
|
|
})
|
|||
|
|
|
|||
|
|
}
|
|||
|
|
/** 新增按钮操作 */
|
|||
|
|
function handleAdd() {
|
|||
|
|
reset();
|
|||
|
|
open.value = true;
|
|||
|
|
title.value = "添加出库单据";
|
|||
|
|
//获取出库类型下拉数据
|
|||
|
|
// listOuttype({pageNum:1,pageSize:50}).then(response=>{
|
|||
|
|
// storeTypeList.value = response.rows
|
|||
|
|
// })
|
|||
|
|
//获取施工队下拉数据
|
|||
|
|
// listConstruction({pageNum:1,pageSize:50}).then(response=>{
|
|||
|
|
// wzTypeList.value = response.rows
|
|||
|
|
// })
|
|||
|
|
|
|||
|
|
//理货员下拉数据
|
|||
|
|
// personListDict().then(response=>{
|
|||
|
|
// personList.value = response.data
|
|||
|
|
// })
|
|||
|
|
//物资类型下拉数据
|
|||
|
|
materialtypeDict().then(response=>{
|
|||
|
|
wzlxList.value = response.data
|
|||
|
|
})
|
|||
|
|
//所属仓库下拉数据
|
|||
|
|
// warehouseDict().then(response=>{
|
|||
|
|
// warehouseList.value = response.data
|
|||
|
|
// })
|
|||
|
|
warehouseAll().then(response=>{
|
|||
|
|
warehouseList.value = response.data
|
|||
|
|
})
|
|||
|
|
|
|||
|
|
}
|
|||
|
|
//物资类型下拉数据
|
|||
|
|
function wzTypeFun(){
|
|||
|
|
materialtypeDict().then(response=>{
|
|||
|
|
wzlxList.value = response.data
|
|||
|
|
})
|
|||
|
|
}
|
|||
|
|
//所属仓库下拉数据
|
|||
|
|
function cangkuFun(){
|
|||
|
|
// warehouseDict().then(response=>{
|
|||
|
|
// warehouseList.value = response.data
|
|||
|
|
// })
|
|||
|
|
warehouseAll().then(response=>{
|
|||
|
|
warehouseList.value = response.data
|
|||
|
|
})
|
|||
|
|
}
|
|||
|
|
function ckTypeFun(){
|
|||
|
|
listOuttype({pageNum:1,pageSize:500}).then(response=>{
|
|||
|
|
storeTypeList.value = response.rows
|
|||
|
|
})
|
|||
|
|
}
|
|||
|
|
function listConstructionFun(){
|
|||
|
|
listConstruction({pageNum:1,pageSize:500}).then(response=>{
|
|||
|
|
wzTypeList.value = response.rows
|
|||
|
|
})
|
|||
|
|
}
|
|||
|
|
function personListDictFun(){
|
|||
|
|
personListDict().then(response=>{
|
|||
|
|
personList.value = response.data
|
|||
|
|
})
|
|||
|
|
}
|
|||
|
|
//查询库存中数据 搜索
|
|||
|
|
function searchPlan(){
|
|||
|
|
// if(!orderNum.value){
|
|||
|
|
// proxy.$modal.msgWarning("请输入项目编号或者订单号");
|
|||
|
|
// return
|
|||
|
|
// }
|
|||
|
|
//查库存
|
|||
|
|
// let params = {
|
|||
|
|
// pageNum:1,
|
|||
|
|
// pageSize:50,
|
|||
|
|
// isChuku:0,
|
|||
|
|
// // xmNo:orderNum.value
|
|||
|
|
// keyword:orderNum.value
|
|||
|
|
// }
|
|||
|
|
// if(!outQueryParams.value.xmNo && !outQueryParams.value.wlNo && !outQueryParams.value.sapNo && !outQueryParams.value.wlMs){
|
|||
|
|
// proxy.$modal.msgWarning("查询条件不能为空");
|
|||
|
|
// return
|
|||
|
|
// }
|
|||
|
|
if(outQueryParams.value.cangku.length>0){
|
|||
|
|
outQueryParams.value.cangku = outQueryParams.value.cangku[1]
|
|||
|
|
}
|
|||
|
|
listOutbound(outQueryParams.value).then(response=>{
|
|||
|
|
response.rows.forEach(item=>{
|
|||
|
|
item.ckRemark = item.remark
|
|||
|
|
})
|
|||
|
|
// let planData = response.rows
|
|||
|
|
if(response.rows.length==0){
|
|||
|
|
proxy.$modal.msgWarning("库存无数据");
|
|||
|
|
planList.value = []
|
|||
|
|
}else{
|
|||
|
|
planList.value = response.rows
|
|||
|
|
}
|
|||
|
|
// console.log(planData)
|
|||
|
|
|
|||
|
|
// planLoading.value = false
|
|||
|
|
})
|
|||
|
|
|
|||
|
|
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
|
|||
|
|
/** 提交按钮 */
|
|||
|
|
function submitForm() {
|
|||
|
|
|
|||
|
|
// console.log(submitData);return
|
|||
|
|
// // /pc/wisdom/stock/add
|
|||
|
|
proxy.$refs["stockRef"].validate(valid => {
|
|||
|
|
|
|||
|
|
if (valid) {
|
|||
|
|
// if(planList.value.filter(x=>x.realQty=="").length>0){
|
|||
|
|
// proxy.$modal.msgError("入库数量不能为空");
|
|||
|
|
// return
|
|||
|
|
// }
|
|||
|
|
// console.log(ids.value)
|
|||
|
|
if(ids.value.length==0){
|
|||
|
|
proxy.$modal.msgError("请勾选数据");
|
|||
|
|
return
|
|||
|
|
}
|
|||
|
|
if(isExamine.value==1 && !storeData.value.approverId){
|
|||
|
|
proxy.$modal.msgError("审批人不能为空");
|
|||
|
|
return
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
let dataList = planList.value.filter(x=>ids.value.includes(x.id)).map(info=>({
|
|||
|
|
id:info.id,
|
|||
|
|
realQty:info.realQty,
|
|||
|
|
photoUrl:isExamine.value==1?info.photoUrl:"",
|
|||
|
|
ckRemark:info.ckRemark
|
|||
|
|
}))
|
|||
|
|
if(isExamine.value==1 && dataList.filter(x=>!x.photoUrl).length>0){
|
|||
|
|
proxy.$modal.msgError("现场图片不能为空");
|
|||
|
|
return
|
|||
|
|
}
|
|||
|
|
// console.log(3333)
|
|||
|
|
// return
|
|||
|
|
let submitData = {
|
|||
|
|
// lyTime:storeData.value.lyTime, //领用时间
|
|||
|
|
teamCode:storeData.value.teamCode, //施工队
|
|||
|
|
ckType:storeData.value.ckType, //出库类型
|
|||
|
|
ckLihuoY:storeData.value.ckLihuoY, //理货员
|
|||
|
|
xmNoCk:storeData.value.xmNoCk?storeData.value.xmNoCk:"", //原本要出的项目号
|
|||
|
|
xmMsCk:storeData.value.xmMsCk?storeData.value.xmMsCk:"", //原本要出的项目描述
|
|||
|
|
approverId:storeData.value.approverId, //审批人
|
|||
|
|
isDelivery:storeData.value.isDelivery,
|
|||
|
|
// rkList:planList.value
|
|||
|
|
ckList:dataList
|
|||
|
|
}
|
|||
|
|
// console.log(submitData)
|
|||
|
|
// return
|
|||
|
|
addOutbound(submitData).then(response => {
|
|||
|
|
proxy.$modal.msgSuccess("操作成功");
|
|||
|
|
open.value = false;
|
|||
|
|
getList();
|
|||
|
|
});
|
|||
|
|
}
|
|||
|
|
});
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
/** 删除按钮操作 */
|
|||
|
|
// function handleDelete(row) {
|
|||
|
|
// const _ids = row.id || ids.value;
|
|||
|
|
// proxy.$modal.confirm('是否确认删除库存单据主编号为"' + _ids + '"的数据项?').then(function() {
|
|||
|
|
// return delStock(_ids);
|
|||
|
|
// }).then(() => {
|
|||
|
|
// getList();
|
|||
|
|
// proxy.$modal.msgSuccess("删除成功");
|
|||
|
|
// }).catch(() => {});
|
|||
|
|
// }
|
|||
|
|
|
|||
|
|
/** 导出按钮操作 */
|
|||
|
|
function handleExport() {
|
|||
|
|
proxy.download('wisdom/stock/export', {
|
|||
|
|
...queryParams.value
|
|||
|
|
}, `stock_${new Date().getTime()}.xlsx`)
|
|||
|
|
}
|
|||
|
|
//判断是否需要开启审核功能
|
|||
|
|
function isAudit(){
|
|||
|
|
// {configKey:"stock.audit.enabled"}
|
|||
|
|
getAudit().then(response=>{
|
|||
|
|
// console.log(2222222)
|
|||
|
|
// console.log(response.msg)
|
|||
|
|
isExamine.value = response.msg
|
|||
|
|
})
|
|||
|
|
}
|
|||
|
|
isAudit()
|
|||
|
|
getList();
|
|||
|
|
ckTypeFun()
|
|||
|
|
listConstructionFun()
|
|||
|
|
personListDictFun()
|
|||
|
|
wzTypeFun()
|
|||
|
|
cangkuFun()
|
|||
|
|
|
|||
|
|
|
|||
|
|
const dialogBill = ref(false)
|
|||
|
|
const billAllObj = ref([])
|
|||
|
|
|
|||
|
|
const openBill = ref(false)
|
|||
|
|
const billData = ref({
|
|||
|
|
ckType:"",
|
|||
|
|
teamCode:"",
|
|||
|
|
ckLihuoY:"",
|
|||
|
|
isDelivery:""
|
|||
|
|
})
|
|||
|
|
const editData = (row) => {
|
|||
|
|
billData.value = row
|
|||
|
|
openBill.value = true
|
|||
|
|
}
|
|||
|
|
const editRef = ref(null)
|
|||
|
|
//修改主单据 确定按钮
|
|||
|
|
function editForm(){
|
|||
|
|
editRef.value.validate(valid => {
|
|||
|
|
if (valid) {
|
|||
|
|
// console.log(billData.value)
|
|||
|
|
// return
|
|||
|
|
editOutbound(billData.value).then(response => {
|
|||
|
|
proxy.$modal.msgSuccess("操作成功");
|
|||
|
|
openBill.value = false;
|
|||
|
|
getList();
|
|||
|
|
});
|
|||
|
|
}
|
|||
|
|
});
|
|||
|
|
}
|
|||
|
|
// 右侧修改
|
|||
|
|
const outInfoDialog = ref(false)
|
|||
|
|
const outInfoData = ref({
|
|||
|
|
realQty:"",
|
|||
|
|
ckRemark:""
|
|||
|
|
})
|
|||
|
|
const outInfoRules = ref({
|
|||
|
|
realQty: [
|
|||
|
|
{ required: true, message: '请输入出库数量', trigger: 'blur' }
|
|||
|
|
],
|
|||
|
|
ckRemark: [
|
|||
|
|
{ required: true, message: '请输入备注', trigger: 'blur' }
|
|||
|
|
]
|
|||
|
|
})
|
|||
|
|
const outInfoRef = ref(null)
|
|||
|
|
function handleUpdate(row) {
|
|||
|
|
console.log(row)
|
|||
|
|
outInfoData.value = row
|
|||
|
|
outInfoDialog.value = true
|
|||
|
|
}
|
|||
|
|
const outInfoForm = () => {
|
|||
|
|
outInfoRef.value.validate(valid => {
|
|||
|
|
if (valid) {
|
|||
|
|
updateStock(outInfoData.value).then(response => {
|
|||
|
|
proxy.$modal.msgSuccess("操作成功");
|
|||
|
|
outInfoDialog.value = false;
|
|||
|
|
getDetailList()
|
|||
|
|
});
|
|||
|
|
}
|
|||
|
|
});
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
// 撤销入库
|
|||
|
|
const handleStockDelete = (row) => {
|
|||
|
|
// dialogDelStock.value = true
|
|||
|
|
proxy.$modal.confirm('确定撤销吗?').then(function() {
|
|||
|
|
if(row.isChuku==0){
|
|||
|
|
let data = {
|
|||
|
|
id:row.id,
|
|||
|
|
realQty:row.realQty,
|
|||
|
|
gysJhId:row.gysJhId
|
|||
|
|
}
|
|||
|
|
return wisdomDelStock(data);
|
|||
|
|
}else if(row.isChuku==1){
|
|||
|
|
return ckDelStock(row.id)
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
}).then(() => {
|
|||
|
|
getDetailList()
|
|||
|
|
// getList();
|
|||
|
|
proxy.$modal.msgSuccess("操作成功");
|
|||
|
|
}).catch(() => {});
|
|||
|
|
}
|
|||
|
|
</script>
|
|||
|
|
<style>
|
|||
|
|
.el-table .warning-row {
|
|||
|
|
--el-table-tr-bg-color: var(--el-color-warning-light-9);
|
|||
|
|
}
|
|||
|
|
.el-table .success-row {
|
|||
|
|
--el-table-tr-bg-color: var(--el-color-success-light-9);
|
|||
|
|
}
|
|||
|
|
.printMeBox{
|
|||
|
|
div{
|
|||
|
|
line-height: 30px;
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
.titleBox{
|
|||
|
|
text-align: center;
|
|||
|
|
margin-bottom: 20px;
|
|||
|
|
}
|
|||
|
|
.topBox{
|
|||
|
|
display: flex;
|
|||
|
|
flex-wrap: wrap;
|
|||
|
|
}
|
|||
|
|
.topEveryBox{
|
|||
|
|
width: 50%;
|
|||
|
|
}
|
|||
|
|
.tableBox{
|
|||
|
|
margin-top: 10px;
|
|||
|
|
}
|
|||
|
|
.oneLineBox{
|
|||
|
|
display: flex;
|
|||
|
|
}
|
|||
|
|
.everyBox{
|
|||
|
|
width: 25%;
|
|||
|
|
}
|
|||
|
|
.bottomBox{
|
|||
|
|
margin-top: 10px;
|
|||
|
|
}
|
|||
|
|
</style>
|