提交
This commit is contained in:
@@ -4,30 +4,55 @@
|
|||||||
<el-row :gutter="40">
|
<el-row :gutter="40">
|
||||||
<el-col :span="5">
|
<el-col :span="5">
|
||||||
<el-form-item label="借用时间" prop="borrowTime">
|
<el-form-item label="借用时间" prop="borrowTime">
|
||||||
<el-date-picker v-model="borrowTime" type="daterange" range-separator="至" start-placeholder="开始日期"
|
<el-date-picker
|
||||||
end-placeholder="结束日期" clearable placeholder="请选择借用时间" format="YYYY/MM/DD"
|
v-model="borrowTime"
|
||||||
value-format="YYYY-MM-DD">
|
type="daterange"
|
||||||
|
range-separator="至"
|
||||||
|
start-placeholder="开始日期"
|
||||||
|
end-placeholder="结束日期"
|
||||||
|
clearable
|
||||||
|
placeholder="请选择借用时间"
|
||||||
|
format="YYYY/MM/DD"
|
||||||
|
value-format="YYYY-MM-DD"
|
||||||
|
>
|
||||||
</el-date-picker>
|
</el-date-picker>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="5">
|
<el-col :span="5">
|
||||||
<el-form-item label="项目号" prop="xmNo">
|
<el-form-item label="项目号" prop="xmNo">
|
||||||
<el-input v-model="queryParams.xmNo" placeholder="请输入项目号" clearable @keyup.enter="handleQuery" />
|
<el-input
|
||||||
|
v-model="queryParams.xmNo"
|
||||||
|
placeholder="请输入项目号"
|
||||||
|
clearable
|
||||||
|
@keyup.enter="handleQuery"
|
||||||
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="5">
|
<el-col :span="5">
|
||||||
<el-form-item label="订单编号" prop="sapNo">
|
<el-form-item label="订单编号" prop="sapNo">
|
||||||
<el-input v-model="queryParams.sapNo" placeholder="请输入订单编号" clearable @keyup.enter="handleQuery" />
|
<el-input
|
||||||
|
v-model="queryParams.sapNo"
|
||||||
|
placeholder="请输入订单编号"
|
||||||
|
clearable
|
||||||
|
@keyup.enter="handleQuery"
|
||||||
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="5">
|
<el-col :span="5">
|
||||||
<el-form-item label="单据号" prop="billNo">
|
<el-form-item label="单据号" prop="billNo">
|
||||||
<el-input v-model="queryParams.billNo" placeholder="请输入单据号" clearable @keyup.enter="handleQuery" />
|
<el-input
|
||||||
|
v-model="queryParams.billNo"
|
||||||
|
placeholder="请输入单据号"
|
||||||
|
clearable
|
||||||
|
@keyup.enter="handleQuery"
|
||||||
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="4">
|
<el-col :span="4">
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
|
<el-button type="primary" icon="Search" @click="handleQuery"
|
||||||
|
>搜索</el-button
|
||||||
|
>
|
||||||
<el-button icon="Refresh" @click="resetQuery">重置</el-button>
|
<el-button icon="Refresh" @click="resetQuery">重置</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
@@ -36,89 +61,204 @@
|
|||||||
|
|
||||||
<el-row :gutter="10" class="mb8">
|
<el-row :gutter="10" class="mb8">
|
||||||
<el-col :span="1.5">
|
<el-col :span="1.5">
|
||||||
<el-button type="primary" plain icon="Plus" @click="handleAdd"
|
<el-button
|
||||||
v-hasPermi="['wisdom:borrow:add']">新增借料</el-button>
|
type="primary"
|
||||||
|
plain
|
||||||
|
icon="Plus"
|
||||||
|
@click="handleAdd"
|
||||||
|
v-hasPermi="['wisdom:borrow:add']"
|
||||||
|
>新增借料</el-button
|
||||||
|
>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
|
||||||
|
|
||||||
<el-col :span="1.5">
|
<el-col :span="1.5">
|
||||||
<el-button type="success" plain icon="Printer" @click="handlePrint" v-print="printViewInfo"
|
<el-button
|
||||||
v-hasPermi="['wisdom:borrow:print']">打印单据</el-button>
|
type="success"
|
||||||
|
plain
|
||||||
|
icon="Printer"
|
||||||
|
@click="handlePrint"
|
||||||
|
v-print="printViewInfo"
|
||||||
|
v-hasPermi="['wisdom:borrow:print']"
|
||||||
|
>打印单据</el-button
|
||||||
|
>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
|
||||||
<right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>
|
<right-toolbar
|
||||||
|
v-model:showSearch="showSearch"
|
||||||
|
@queryTable="getList"
|
||||||
|
></right-toolbar>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
|
||||||
<el-table v-loading="loading" :data="outboundList" @selection-change="printSelectionChange" border
|
<el-table
|
||||||
|
v-loading="loading"
|
||||||
|
:data="outboundList"
|
||||||
|
@selection-change="printSelectionChange"
|
||||||
|
border
|
||||||
ref="infoTableRef"
|
ref="infoTableRef"
|
||||||
highlight-current-row
|
highlight-current-row
|
||||||
@row-click="(row) => tableInfoRowClick(row, infoTableRef)"
|
@row-click="(row) => tableInfoRowClick(row, infoTableRef)"
|
||||||
show-overflow-tooltip>
|
show-overflow-tooltip
|
||||||
|
>
|
||||||
<el-table-column type="selection" width="55" align="center" />
|
<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="billNo" width="180" />
|
<el-table-column
|
||||||
|
label="单据号"
|
||||||
|
align="center"
|
||||||
|
prop="billNo"
|
||||||
|
width="180"
|
||||||
|
/>
|
||||||
<el-table-column label="状态" align="center">
|
<el-table-column label="状态" align="center">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<dict-tag :options="dictTagData()" :value="scope.row.isBorrowed" />
|
<dict-tag :options="dictTagData()" :value="scope.row.isBorrowed" />
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="订单编号" align="center" prop="sapNo" width="150" />
|
<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="xmNo" width="150" />
|
||||||
<el-table-column label="项目描述" align="center" prop="xmMs" width="150" />
|
<el-table-column
|
||||||
<el-table-column label="(借用方)项目号" align="center" prop="xmNoCk" width="150" />
|
label="项目描述"
|
||||||
<el-table-column label="(借用方)项目描述" align="center" prop="xmMsCk" width="150" />
|
align="center"
|
||||||
|
prop="xmMs"
|
||||||
|
width="150"
|
||||||
|
/>
|
||||||
|
<el-table-column
|
||||||
|
label="(借用方)项目号"
|
||||||
|
align="center"
|
||||||
|
prop="xmNoCk"
|
||||||
|
width="150"
|
||||||
|
/>
|
||||||
|
<el-table-column
|
||||||
|
label="(借用方)项目描述"
|
||||||
|
align="center"
|
||||||
|
prop="xmMsCk"
|
||||||
|
width="150"
|
||||||
|
/>
|
||||||
<el-table-column label="物料号" align="center" prop="wlNo" width="100" />
|
<el-table-column label="物料号" align="center" prop="wlNo" width="100" />
|
||||||
<el-table-column label="物料描述" align="center" prop="wlMs" width="150" />
|
<el-table-column
|
||||||
<el-table-column label="供应商编码" align="center" prop="gysNo" width="150" />
|
label="物料描述"
|
||||||
<el-table-column label="供应商名称" align="center" prop="gysMc" width="150" />
|
align="center"
|
||||||
|
prop="wlMs"
|
||||||
|
width="150"
|
||||||
|
/>
|
||||||
|
<el-table-column
|
||||||
|
label="供应商编码"
|
||||||
|
align="center"
|
||||||
|
prop="gysNo"
|
||||||
|
width="150"
|
||||||
|
/>
|
||||||
|
<el-table-column
|
||||||
|
label="供应商名称"
|
||||||
|
align="center"
|
||||||
|
prop="gysMc"
|
||||||
|
width="150"
|
||||||
|
/>
|
||||||
<el-table-column label="合同单价" align="center" prop="htDj" />
|
<el-table-column label="合同单价" align="center" prop="htDj" />
|
||||||
|
|
||||||
<el-table-column label="计量单位" align="center" prop="dw" />
|
<el-table-column label="计量单位" align="center" prop="dw" />
|
||||||
<el-table-column label="借用数量" align="center" prop="realQty" width="120" />
|
<el-table-column
|
||||||
<el-table-column label="所属大库" align="center" prop="parentWarehouseName" width="150" />
|
label="借用数量"
|
||||||
<el-table-column label="所属小库" align="center" prop="warehouseName" width="150" />
|
align="center"
|
||||||
|
prop="realQty"
|
||||||
|
width="120"
|
||||||
|
/>
|
||||||
|
<el-table-column
|
||||||
|
label="所属大库"
|
||||||
|
align="center"
|
||||||
|
prop="parentWarehouseName"
|
||||||
|
width="150"
|
||||||
|
/>
|
||||||
|
<el-table-column
|
||||||
|
label="所属小库"
|
||||||
|
align="center"
|
||||||
|
prop="warehouseName"
|
||||||
|
width="150"
|
||||||
|
/>
|
||||||
<el-table-column label="库位码" align="center" prop="pcode" width="120" />
|
<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="trayCode" />
|
||||||
<el-table-column label="身份码" align="center" prop="entityId" width="150" />
|
<el-table-column
|
||||||
<el-table-column label="出库类型" align="center" prop="operationTypeName" />
|
label="身份码"
|
||||||
|
align="center"
|
||||||
|
prop="entityId"
|
||||||
|
width="150"
|
||||||
|
/>
|
||||||
|
<el-table-column
|
||||||
|
label="出库类型"
|
||||||
|
align="center"
|
||||||
|
prop="operationTypeName"
|
||||||
|
/>
|
||||||
<el-table-column label="借用时间" align="center" width="100">
|
<el-table-column label="借用时间" align="center" width="100">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<span>{{ parseTime(scope.row.borrowTime, '{y}-{m}-{d}') }}</span>
|
<span>{{ parseTime(scope.row.borrowTime, "{y}-{m}-{d}") }}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="理货员" align="center" prop="operatorName" />
|
<el-table-column label="理货员" align="center" prop="operatorName" />
|
||||||
<el-table-column label="备注" align="center" prop="remark" width="150" />
|
<el-table-column label="备注" align="center" prop="remark" width="150" />
|
||||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
<el-table-column
|
||||||
|
label="操作"
|
||||||
|
align="center"
|
||||||
|
class-name="small-padding fixed-width"
|
||||||
|
>
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-button v-show="scope.row.isBorrowed == 1" link type="primary" icon="Edit"
|
<el-button
|
||||||
@click="handleReturn(scope.row)">还料</el-button>
|
v-show="scope.row.isBorrowed == 1"
|
||||||
|
link
|
||||||
|
type="primary"
|
||||||
|
icon="Edit"
|
||||||
|
@click="handleReturn(scope.row)"
|
||||||
|
>还料</el-button
|
||||||
|
>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
|
|
||||||
<pagination v-show="total > 0" :total="total" v-model:page="queryParams.pageNum"
|
<pagination
|
||||||
v-model:limit="queryParams.pageSize" @pagination="getList" />
|
v-show="total > 0"
|
||||||
|
:total="total"
|
||||||
|
v-model:page="queryParams.pageNum"
|
||||||
|
v-model:limit="queryParams.pageSize"
|
||||||
|
@pagination="getList"
|
||||||
|
/>
|
||||||
<!-- 打印 -->
|
<!-- 打印 -->
|
||||||
<div id="printMe" class="printMeBox" v-show="showContent">
|
<div id="printMe" class="printMeBox" v-show="showContent">
|
||||||
<printBill :billAllObj="printList" />
|
<printBill :billAllObj="printList" />
|
||||||
</div>
|
</div>
|
||||||
<!-- 添加或修改库存单据主对话框 -->
|
<!-- 添加或修改库存单据主对话框 -->
|
||||||
<el-dialog :title="title" v-model="open" width="70%" :z-index="4" :close-on-click-modal="false" :draggable="true">
|
<el-dialog
|
||||||
|
:title="title"
|
||||||
|
v-model="open"
|
||||||
|
width="70%"
|
||||||
|
:z-index="4"
|
||||||
|
:close-on-click-modal="false"
|
||||||
|
:draggable="true"
|
||||||
|
>
|
||||||
<el-form ref="stockRef" :model="storeData" :rules="rules">
|
<el-form ref="stockRef" :model="storeData" :rules="rules">
|
||||||
<el-row :gutter="20">
|
<el-row :gutter="20">
|
||||||
<el-col :span="6">
|
<el-col :span="6">
|
||||||
<el-form-item label="项目号">
|
<el-form-item label="项目号">
|
||||||
<el-input v-model="outQueryParams.xmNo" placeholder="请输入项目号" />
|
<el-input
|
||||||
|
v-model="outQueryParams.xmNo"
|
||||||
|
placeholder="请输入项目号"
|
||||||
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="6">
|
<el-col :span="6">
|
||||||
<el-form-item label="订单号">
|
<el-form-item label="订单号">
|
||||||
<el-input v-model="outQueryParams.sapNo" placeholder="请输入订单号" />
|
<el-input
|
||||||
|
v-model="outQueryParams.sapNo"
|
||||||
|
placeholder="请输入订单号"
|
||||||
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="6">
|
<el-col :span="6">
|
||||||
<el-form-item label="物料号">
|
<el-form-item label="物料号">
|
||||||
<el-input v-model="outQueryParams.wlNo" placeholder="请输入物料号" />
|
<el-input
|
||||||
|
v-model="outQueryParams.wlNo"
|
||||||
|
placeholder="请输入物料号"
|
||||||
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="6">
|
<el-col :span="6">
|
||||||
@@ -128,31 +268,62 @@
|
|||||||
<el-row :gutter="20">
|
<el-row :gutter="20">
|
||||||
<el-col :span="6">
|
<el-col :span="6">
|
||||||
<el-form-item label="出库类型" prop="ckType">
|
<el-form-item label="出库类型" prop="ckType">
|
||||||
<el-select v-model="storeData.ckType" placeholder="请选择出库类型" disabled>
|
<el-select
|
||||||
<el-option v-for="dict in storeTypeList" :key="dict.id" :label="dict.typeName" :value="dict.typeCode" />
|
v-model="storeData.ckType"
|
||||||
|
placeholder="请选择出库类型"
|
||||||
|
disabled
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="dict in storeTypeList"
|
||||||
|
:key="dict.id"
|
||||||
|
:label="dict.typeName"
|
||||||
|
:value="dict.typeCode"
|
||||||
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="6">
|
<el-col :span="6">
|
||||||
<el-form-item label="施工队" prop="teamCode">
|
<el-form-item label="施工队" prop="teamCode">
|
||||||
<el-select v-model="storeData.teamCode" placeholder="请选择施工队" clearable>
|
<el-select
|
||||||
<el-option v-for="dict in wzTypeList" :key="dict.id" :label="dict.teamName" :value="dict.teamCode" />
|
v-model="storeData.teamCode"
|
||||||
|
placeholder="请选择施工队"
|
||||||
|
clearable
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="dict in wzTypeList"
|
||||||
|
:key="dict.id"
|
||||||
|
:label="dict.teamName"
|
||||||
|
:value="dict.teamCode"
|
||||||
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
|
||||||
<el-col :span="6">
|
<el-col :span="6">
|
||||||
<el-form-item label="理货员" prop="operator">
|
<el-form-item label="理货员" prop="operator">
|
||||||
<el-select v-model="storeData.operator" placeholder="请选择理货员" clearable>
|
<el-select
|
||||||
<el-option v-for="dict in personList" :key="dict.userId" :label="dict.userName"
|
v-model="storeData.operator"
|
||||||
:value="dict.userId" />
|
placeholder="请选择理货员"
|
||||||
|
clearable
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="dict in personList"
|
||||||
|
:key="dict.userId"
|
||||||
|
:label="dict.userName"
|
||||||
|
:value="dict.userId"
|
||||||
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="6">
|
<el-col :span="6">
|
||||||
<el-form-item label="借用时间" prop="borrowTime">
|
<el-form-item label="借用时间" prop="borrowTime">
|
||||||
<el-date-picker clearable v-model="storeData.borrowTime" type="date" value-format="YYYY-MM-DD"
|
<el-date-picker
|
||||||
placeholder="请选择借用时间">
|
clearable
|
||||||
|
v-model="storeData.borrowTime"
|
||||||
|
type="date"
|
||||||
|
value-format="YYYY-MM-DD"
|
||||||
|
placeholder="请选择借用时间"
|
||||||
|
>
|
||||||
</el-date-picker>
|
</el-date-picker>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
@@ -160,8 +331,13 @@
|
|||||||
<el-row :gutter="20">
|
<el-row :gutter="20">
|
||||||
<el-col :span="6">
|
<el-col :span="6">
|
||||||
<el-form-item label="归还时间">
|
<el-form-item label="归还时间">
|
||||||
<el-date-picker clearable v-model="storeData.returnTime" type="date" value-format="YYYY-MM-DD"
|
<el-date-picker
|
||||||
placeholder="请选择归还时间">
|
clearable
|
||||||
|
v-model="storeData.returnTime"
|
||||||
|
type="date"
|
||||||
|
value-format="YYYY-MM-DD"
|
||||||
|
placeholder="请选择归还时间"
|
||||||
|
>
|
||||||
</el-date-picker>
|
</el-date-picker>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
@@ -172,35 +348,100 @@
|
|||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="项目名称">
|
<el-form-item label="项目名称">
|
||||||
<el-input v-model="storeData.xmMsCk" placeholder="请输入项目名称" />
|
<el-input
|
||||||
|
v-model="storeData.xmMsCk"
|
||||||
|
placeholder="请输入项目名称"
|
||||||
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
</el-form>
|
</el-form>
|
||||||
<el-table :data="planList" height="400" show-overflow-tooltip style="width: 100%"
|
<el-table
|
||||||
@selection-change="handleSelectionChange">
|
:data="planList"
|
||||||
|
height="400"
|
||||||
|
show-overflow-tooltip
|
||||||
|
style="width: 100%"
|
||||||
|
@selection-change="handleSelectionChange"
|
||||||
|
border
|
||||||
|
>
|
||||||
<el-table-column type="selection" width="55" align="center" />
|
<el-table-column type="selection" width="55" align="center" />
|
||||||
<el-table-column label="物料号" align="center" prop="wlNo" width="100" />
|
<el-table-column label="序号" align="center" type="index" width="70" />
|
||||||
<el-table-column label="订单号" align="center" prop="sapNo" width="100" />
|
<el-table-column
|
||||||
<el-table-column label="物料描述" align="center" prop="wlMs" width="300" />
|
label="物料号"
|
||||||
<el-table-column label="出库数量" align="center" prop="realQty" width="120">
|
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="300"
|
||||||
|
/>
|
||||||
|
<el-table-column
|
||||||
|
label="出库数量"
|
||||||
|
align="center"
|
||||||
|
prop="realQty"
|
||||||
|
width="120"
|
||||||
|
>
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-input v-model="scope.row.realQty" placeholder="请输入出库数量" />
|
<el-input
|
||||||
|
v-model="scope.row.realQty"
|
||||||
|
placeholder="请输入出库数量"
|
||||||
|
/>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="单价" align="center" prop="htDj" />
|
<el-table-column label="单价" align="center" prop="htDj" />
|
||||||
<el-table-column label="单位" align="center" prop="dw" />
|
<el-table-column label="单位" align="center" prop="dw" />
|
||||||
<el-table-column label="库位" align="center" prop="pcode" width="150"></el-table-column>
|
<el-table-column
|
||||||
<el-table-column label="容器码" align="center" prop="trayCode"></el-table-column>
|
label="库位"
|
||||||
|
align="center"
|
||||||
|
prop="pcode"
|
||||||
|
width="150"
|
||||||
|
></el-table-column>
|
||||||
|
<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"
|
||||||
|
prop="entityId"
|
||||||
|
width="200"
|
||||||
|
></el-table-column>
|
||||||
|
|
||||||
<el-table-column label="项目号" align="center" prop="xmNo" width="150" />
|
<el-table-column
|
||||||
<el-table-column label="项目名称" align="center" prop="xmMs" width="250" />
|
label="项目号"
|
||||||
<el-table-column label="供应商" align="center" prop="gysMc" width="200" />
|
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" width="200">
|
<el-table-column label="备注" align="center" width="200">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-input v-model="scope.row.remark" placeholder="请输入备注"></el-input>
|
<el-input
|
||||||
|
v-model="scope.row.remark"
|
||||||
|
placeholder="请输入备注"
|
||||||
|
></el-input>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
@@ -215,8 +456,13 @@
|
|||||||
<el-dialog title="还料" v-model="returnOpen" append-to-body width="40%">
|
<el-dialog title="还料" v-model="returnOpen" append-to-body width="40%">
|
||||||
<el-form ref="returnRef" :model="returnData" label-width="100px">
|
<el-form ref="returnRef" :model="returnData" label-width="100px">
|
||||||
<el-form-item label="还料时间">
|
<el-form-item label="还料时间">
|
||||||
<el-date-picker style="width: 100%" v-model="returnData.returnTime" value-format="YYYY-MM-DD HH:mm:ss"
|
<el-date-picker
|
||||||
format="YYYY-MM-DD HH:mm:ss" type="date" />
|
style="width: 100%"
|
||||||
|
v-model="returnData.returnTime"
|
||||||
|
value-format="YYYY-MM-DD HH:mm:ss"
|
||||||
|
format="YYYY-MM-DD HH:mm:ss"
|
||||||
|
type="date"
|
||||||
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
<template #footer>
|
<template #footer>
|
||||||
@@ -229,27 +475,25 @@
|
|||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup name="outbound">
|
<script setup name="Borrow">
|
||||||
import { returnBill, listStockByXm } from "@/api/wisdom/borrow"; //列表
|
import { returnBill, listStockByXm } from "@/api/wisdom/borrow"; //列表
|
||||||
import { warehouseAll } from "@/api/information/warehouseinfo";
|
import { warehouseAll } from "@/api/information/warehouseinfo";
|
||||||
import { listOuttype } from "@/api/information/outtype"; //出库类型
|
import { listOuttype } from "@/api/information/outtype"; //出库类型
|
||||||
import { listConstruction } from "@/api/information/construction"; //施工队
|
import { listConstruction } from "@/api/information/construction"; //施工队
|
||||||
import { personListDict } from "@/api/system/user"; //理货员
|
import { personListDict } from "@/api/system/user"; //理货员
|
||||||
import { getKwAllList } from "@/api/information/pcdedetail"; //库位下拉数据
|
import { getKwAllList } from "@/api/information/pcdedetail"; //库位下拉数据
|
||||||
import printBill from '@/components/printBill/bill.vue'
|
import printBill from "@/components/printBill/bill.vue";
|
||||||
import { ref } from "vue";
|
import { ref } from "vue";
|
||||||
import { listStock } from "@/api/wisdom/record"
|
import { listStock } from "@/api/wisdom/record";
|
||||||
import { addOutbound } from "@/api/wisdom/outbound"
|
import { addOutbound } from "@/api/wisdom/outbound";
|
||||||
|
|
||||||
const { proxy } = getCurrentInstance();
|
const { proxy } = getCurrentInstance();
|
||||||
|
|
||||||
|
|
||||||
const showSearch = ref(true);
|
const showSearch = ref(true);
|
||||||
|
|
||||||
|
|
||||||
const data = reactive({
|
const data = reactive({
|
||||||
storeData: {
|
storeData: {
|
||||||
ckType: "JLCK"
|
ckType: "JLCK",
|
||||||
}, //借料数据
|
}, //借料数据
|
||||||
queryParams: {
|
queryParams: {
|
||||||
pageNum: 1,
|
pageNum: 1,
|
||||||
@@ -259,7 +503,7 @@ const data = reactive({
|
|||||||
xmNo: "",
|
xmNo: "",
|
||||||
sapNo: "",
|
sapNo: "",
|
||||||
billNo: "",
|
billNo: "",
|
||||||
ids: []
|
ids: [],
|
||||||
},
|
},
|
||||||
outQueryParams: {
|
outQueryParams: {
|
||||||
xmNo: "",
|
xmNo: "",
|
||||||
@@ -270,14 +514,22 @@ const data = reactive({
|
|||||||
isChuku: 0,
|
isChuku: 0,
|
||||||
},
|
},
|
||||||
rules: {
|
rules: {
|
||||||
ckType: [{ required: true, message: "出库类型不能为空", trigger: "change" }],
|
ckType: [
|
||||||
teamCode: [{ required: true, message: "施工队不能为空", trigger: "change" }],
|
{ required: true, message: "出库类型不能为空", trigger: "change" },
|
||||||
borrowTime: [{ required: true, message: "借用时间不能为空", trigger: "change" }],
|
],
|
||||||
operator: [{ required: true, message: "理货员不能为空", trigger: "change" }]
|
teamCode: [
|
||||||
|
{ required: true, message: "施工队不能为空", trigger: "change" },
|
||||||
|
],
|
||||||
|
borrowTime: [
|
||||||
|
{ required: true, message: "借用时间不能为空", trigger: "change" },
|
||||||
|
],
|
||||||
|
operator: [
|
||||||
|
{ required: true, message: "理货员不能为空", trigger: "change" },
|
||||||
|
],
|
||||||
},
|
},
|
||||||
printViewInfo: {
|
printViewInfo: {
|
||||||
id: "printMe", //打印区域的唯一的id属性
|
id: "printMe", //打印区域的唯一的id属性
|
||||||
popTitle: '入库信息打印',
|
popTitle: "入库信息打印",
|
||||||
beforeOpenCallback() {
|
beforeOpenCallback() {
|
||||||
showContent.value = false;
|
showContent.value = false;
|
||||||
}, // 开始打印之前的callback
|
}, // 开始打印之前的callback
|
||||||
@@ -285,23 +537,24 @@ const data = reactive({
|
|||||||
closeCallback() {}, // 关闭打印的callback(无法区分确认or取消)
|
closeCallback() {}, // 关闭打印的callback(无法区分确认or取消)
|
||||||
clickMounted() {},
|
clickMounted() {},
|
||||||
|
|
||||||
standard: '',
|
standard: "",
|
||||||
extarCss: ''
|
extarCss: "",
|
||||||
}
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
const { queryParams, storeData, rules, printViewInfo, outQueryParams } = toRefs(data);
|
const { queryParams, storeData, rules, printViewInfo, outQueryParams } =
|
||||||
|
toRefs(data);
|
||||||
|
|
||||||
const statusList = ref([
|
const statusList = ref([
|
||||||
{ value: 1, label: '未还料', elTagType: "danger", elTagClass: null },
|
{ value: 1, label: "未还料", elTagType: "danger", elTagClass: null },
|
||||||
{ value: 2, label: '已还料', elTagType: "primary", elTagClass: null }
|
{ value: 2, label: "已还料", elTagType: "primary", elTagClass: null },
|
||||||
])
|
]);
|
||||||
const dictTagData = () => {
|
const dictTagData = () => {
|
||||||
return statusList.value.map(item => ({
|
return statusList.value.map((item) => ({
|
||||||
...item,
|
...item,
|
||||||
value: String(item.value)
|
value: String(item.value),
|
||||||
}));
|
}));
|
||||||
}
|
};
|
||||||
|
|
||||||
/** 查询库存单据主列表 */
|
/** 查询库存单据主列表 */
|
||||||
const outboundList = ref([]);
|
const outboundList = ref([]);
|
||||||
@@ -310,7 +563,7 @@ const loading = ref(true);
|
|||||||
const total = ref(0);
|
const total = ref(0);
|
||||||
function getList() {
|
function getList() {
|
||||||
loading.value = true;
|
loading.value = true;
|
||||||
listStock({ ...queryParams.value, bizType: '2' }).then(response => {
|
listStock({ ...queryParams.value, bizType: "2" }).then((response) => {
|
||||||
outboundList.value = response.rows;
|
outboundList.value = response.rows;
|
||||||
total.value = response.total;
|
total.value = response.total;
|
||||||
loading.value = false;
|
loading.value = false;
|
||||||
@@ -319,14 +572,14 @@ function getList() {
|
|||||||
getList();
|
getList();
|
||||||
|
|
||||||
/** 搜索按钮操作 */
|
/** 搜索按钮操作 */
|
||||||
const borrowTime = ref([])
|
const borrowTime = ref([]);
|
||||||
function handleQuery() {
|
function handleQuery() {
|
||||||
if (borrowTime.value && borrowTime.value.length > 0) {
|
if (borrowTime.value && borrowTime.value.length > 0) {
|
||||||
queryParams.value.startDate = borrowTime.value[0]
|
queryParams.value.startDate = borrowTime.value[0];
|
||||||
queryParams.value.endDate = borrowTime.value[1]
|
queryParams.value.endDate = borrowTime.value[1];
|
||||||
} else {
|
} else {
|
||||||
queryParams.value.startDate = ""
|
queryParams.value.startDate = "";
|
||||||
queryParams.value.endDate = ""
|
queryParams.value.endDate = "";
|
||||||
}
|
}
|
||||||
queryParams.value.pageNum = 1;
|
queryParams.value.pageNum = 1;
|
||||||
getList();
|
getList();
|
||||||
@@ -335,36 +588,36 @@ function handleQuery() {
|
|||||||
/** 重置按钮操作 */
|
/** 重置按钮操作 */
|
||||||
function resetQuery() {
|
function resetQuery() {
|
||||||
proxy.resetForm("queryRef");
|
proxy.resetForm("queryRef");
|
||||||
borrowTime.value = []
|
borrowTime.value = [];
|
||||||
handleQuery();
|
handleQuery();
|
||||||
}
|
}
|
||||||
|
|
||||||
//获取出库类型下拉数据
|
//获取出库类型下拉数据
|
||||||
const storeTypeList = ref([]); //出库类型下拉数据
|
const storeTypeList = ref([]); //出库类型下拉数据
|
||||||
const getOutTypeList = () => {
|
const getOutTypeList = () => {
|
||||||
listOuttype({ pageNum: 1, pageSize: 50 }).then(response => {
|
listOuttype({ pageNum: 1, pageSize: 50 }).then((response) => {
|
||||||
storeTypeList.value = response.rows
|
storeTypeList.value = response.rows;
|
||||||
})
|
});
|
||||||
}
|
};
|
||||||
getOutTypeList()
|
getOutTypeList();
|
||||||
|
|
||||||
// 获取施工队下拉数据
|
// 获取施工队下拉数据
|
||||||
const wzTypeList = ref([]); //施工队下拉数据
|
const wzTypeList = ref([]); //施工队下拉数据
|
||||||
const getConstructionList = () => {
|
const getConstructionList = () => {
|
||||||
listConstruction({ pageNum: 1, pageSize: 50 }).then(response => {
|
listConstruction({ pageNum: 1, pageSize: 50 }).then((response) => {
|
||||||
wzTypeList.value = response.rows
|
wzTypeList.value = response.rows;
|
||||||
})
|
});
|
||||||
}
|
};
|
||||||
getConstructionList()
|
getConstructionList();
|
||||||
|
|
||||||
// 获取理货员下拉数据
|
// 获取理货员下拉数据
|
||||||
const personList = ref([]); //理货员下拉数据
|
const personList = ref([]); //理货员下拉数据
|
||||||
const getPersonList = () => {
|
const getPersonList = () => {
|
||||||
personListDict().then(response => {
|
personListDict().then((response) => {
|
||||||
personList.value = response.data
|
personList.value = response.data;
|
||||||
})
|
});
|
||||||
}
|
};
|
||||||
getPersonList()
|
getPersonList();
|
||||||
|
|
||||||
/** 新增按钮操作 */
|
/** 新增按钮操作 */
|
||||||
const open = ref(false);
|
const open = ref(false);
|
||||||
@@ -378,42 +631,48 @@ function handleAdd() {
|
|||||||
//查询库存中数据 搜索
|
//查询库存中数据 搜索
|
||||||
const planList = ref([]); //从供应计划中添加列表
|
const planList = ref([]); //从供应计划中添加列表
|
||||||
function searchPlan() {
|
function searchPlan() {
|
||||||
if (!outQueryParams.value.xmNo && !outQueryParams.value.wlNo && !outQueryParams.value.sapNo) {
|
if (
|
||||||
|
!outQueryParams.value.xmNo &&
|
||||||
|
!outQueryParams.value.wlNo &&
|
||||||
|
!outQueryParams.value.sapNo
|
||||||
|
) {
|
||||||
proxy.$modal.msgWarning("查询条件不能为空");
|
proxy.$modal.msgWarning("查询条件不能为空");
|
||||||
return
|
return;
|
||||||
}
|
}
|
||||||
listStockByXm(outQueryParams.value).then(response => {
|
listStockByXm(outQueryParams.value).then((response) => {
|
||||||
response.rows.forEach(e => {
|
response.rows.forEach((e) => {
|
||||||
e.remark = e.remark
|
e.remark = e.remark;
|
||||||
});
|
});
|
||||||
if (response.rows.length == 0) {
|
if (response.rows.length == 0) {
|
||||||
proxy.$modal.msgWarning("库存无数据");
|
proxy.$modal.msgWarning("库存无数据");
|
||||||
planList.value = []
|
planList.value = [];
|
||||||
} else {
|
} else {
|
||||||
planList.value = response.rows
|
planList.value = response.rows;
|
||||||
}
|
}
|
||||||
})
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
//出库 多选框选中数据
|
//出库 多选框选中数据
|
||||||
const ids = ref([]);
|
const ids = ref([]);
|
||||||
function handleSelectionChange(selection) {
|
function handleSelectionChange(selection) {
|
||||||
ids.value = selection.map(info => info.id)
|
ids.value = selection.map((info) => info.id);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 借料出库 提交按钮 */
|
/** 借料出库 提交按钮 */
|
||||||
function submitForm() {
|
function submitForm() {
|
||||||
proxy.$refs["stockRef"].validate(valid => {
|
proxy.$refs["stockRef"].validate((valid) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
if (ids.value.length == 0) {
|
if (ids.value.length == 0) {
|
||||||
proxy.$modal.msgError("请勾选数据");
|
proxy.$modal.msgError("请勾选数据");
|
||||||
return
|
return;
|
||||||
}
|
}
|
||||||
let dataList = planList.value.filter(x => ids.value.includes(x.id)).map(info => ({
|
let dataList = planList.value
|
||||||
|
.filter((x) => ids.value.includes(x.id))
|
||||||
|
.map((info) => ({
|
||||||
id: info.id,
|
id: info.id,
|
||||||
realQty: info.realQty,
|
realQty: info.realQty,
|
||||||
remark: info.remark
|
remark: info.remark,
|
||||||
}))
|
}));
|
||||||
let submitData = {
|
let submitData = {
|
||||||
rkBill: {
|
rkBill: {
|
||||||
borrowTime: storeData.value.borrowTime, //借用时间
|
borrowTime: storeData.value.borrowTime, //借用时间
|
||||||
@@ -422,12 +681,12 @@ function submitForm() {
|
|||||||
operator: storeData.value.operator, //理货员
|
operator: storeData.value.operator, //理货员
|
||||||
xmNoCk: storeData.value.xmNoCk ? storeData.value.xmNoCk : "", //原本要出的项目号-借用方项目
|
xmNoCk: storeData.value.xmNoCk ? storeData.value.xmNoCk : "", //原本要出的项目号-借用方项目
|
||||||
xmMsCk: storeData.value.xmMsCk ? storeData.value.xmMsCk : "", //原本要出的项目描述-借用方项目号
|
xmMsCk: storeData.value.xmMsCk ? storeData.value.xmMsCk : "", //原本要出的项目描述-借用方项目号
|
||||||
bizType: '2',
|
bizType: "2",
|
||||||
operationType:'JLCK'
|
operationType: "JLCK",
|
||||||
},
|
},
|
||||||
rkInfoList: dataList,
|
rkInfoList: dataList,
|
||||||
}
|
};
|
||||||
addOutbound(submitData).then(response => {
|
addOutbound(submitData).then((response) => {
|
||||||
proxy.$modal.msgSuccess("操作成功");
|
proxy.$modal.msgSuccess("操作成功");
|
||||||
open.value = false;
|
open.value = false;
|
||||||
getList();
|
getList();
|
||||||
@@ -444,26 +703,26 @@ function cancel() {
|
|||||||
|
|
||||||
// 表单重置
|
// 表单重置
|
||||||
function reset() {
|
function reset() {
|
||||||
planList.value = []
|
planList.value = [];
|
||||||
storeData.value = {
|
storeData.value = {
|
||||||
ckType: "JLCK"
|
ckType: "JLCK",
|
||||||
}
|
};
|
||||||
proxy.resetForm("stockRef");
|
proxy.resetForm("stockRef");
|
||||||
}
|
}
|
||||||
|
|
||||||
//打印单据 多选框选中数据
|
//打印单据 多选框选中数据
|
||||||
const printList = ref([]) //要打印的数据列表
|
const printList = ref([]); //要打印的数据列表
|
||||||
function printSelectionChange(selection) {
|
function printSelectionChange(selection) {
|
||||||
printList.value = selection
|
printList.value = selection;
|
||||||
}
|
}
|
||||||
|
|
||||||
//打印单据
|
//打印单据
|
||||||
const dateStr = ref("") //打印单据生成的日期
|
const dateStr = ref(""); //打印单据生成的日期
|
||||||
const showContent = ref(false); // 控制打印内容是否显示
|
const showContent = ref(false); // 控制打印内容是否显示
|
||||||
function handlePrint() {
|
function handlePrint() {
|
||||||
if (printList.value.length == 0) {
|
if (printList.value.length == 0) {
|
||||||
proxy.$modal.msgError("请勾选数据");
|
proxy.$modal.msgError("请勾选数据");
|
||||||
return
|
return;
|
||||||
}
|
}
|
||||||
const date = new Date();
|
const date = new Date();
|
||||||
const year = date.getFullYear();
|
const year = date.getFullYear();
|
||||||
@@ -472,33 +731,34 @@ function handlePrint() {
|
|||||||
const hour = date.getHours();
|
const hour = date.getHours();
|
||||||
const minute = date.getMinutes();
|
const minute = date.getMinutes();
|
||||||
const second = date.getSeconds();
|
const second = date.getSeconds();
|
||||||
dateStr.value = year + "-" + month + "-" + day + " " + hour + ":" + minute + ":" + second
|
dateStr.value =
|
||||||
showContent.value = true
|
year + "-" + month + "-" + day + " " + hour + ":" + minute + ":" + second;
|
||||||
|
showContent.value = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
const returnId = ref([])
|
const returnId = ref([]);
|
||||||
const returnData = ref({})
|
const returnData = ref({});
|
||||||
const returnOpen = ref(false)
|
const returnOpen = ref(false);
|
||||||
//打开还料弹框
|
//打开还料弹框
|
||||||
function handleReturn(row) {
|
function handleReturn(row) {
|
||||||
returnId.value[0] = row.id
|
returnId.value[0] = row.id;
|
||||||
returnData.value.returnTime = ''
|
returnData.value.returnTime = "";
|
||||||
returnOpen.value = true
|
returnOpen.value = true;
|
||||||
}
|
}
|
||||||
//还料保存
|
//还料保存
|
||||||
function returnForm() {
|
function returnForm() {
|
||||||
if (!returnData.value.returnTime) {
|
if (!returnData.value.returnTime) {
|
||||||
proxy.$modal.msgError("请选择还料时间");
|
proxy.$modal.msgError("请选择还料时间");
|
||||||
return
|
return;
|
||||||
}
|
}
|
||||||
let ids = JSON.parse(JSON.stringify(returnId.value))
|
let ids = JSON.parse(JSON.stringify(returnId.value));
|
||||||
let items = ids.map(item => {
|
let items = ids.map((item) => {
|
||||||
return {
|
return {
|
||||||
recordId: item,
|
recordId: item,
|
||||||
returnTime: returnData.value.returnTime
|
returnTime: returnData.value.returnTime,
|
||||||
}
|
};
|
||||||
});
|
});
|
||||||
returnBill({items}).then(response => {
|
returnBill({ items }).then((response) => {
|
||||||
proxy.$modal.msgSuccess("操作成功");
|
proxy.$modal.msgSuccess("操作成功");
|
||||||
returnOpen.value = false;
|
returnOpen.value = false;
|
||||||
getList();
|
getList();
|
||||||
@@ -506,25 +766,28 @@ function returnForm() {
|
|||||||
}
|
}
|
||||||
//取消还料弹框
|
//取消还料弹框
|
||||||
function cancelReturn() {
|
function cancelReturn() {
|
||||||
returnOpen.value = false
|
returnOpen.value = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/** 导出按钮操作 */
|
/** 导出按钮操作 */
|
||||||
function handleExport() {
|
function handleExport() {
|
||||||
proxy.download('wisdom/stock/export', {
|
proxy.download(
|
||||||
...queryParams.value
|
"wisdom/stock/export",
|
||||||
}, `stock_${new Date().getTime()}.xlsx`)
|
{
|
||||||
|
...queryParams.value,
|
||||||
|
},
|
||||||
|
`stock_${new Date().getTime()}.xlsx`
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
const warehouseData = ref([]) //仓库下拉列表
|
const warehouseData = ref([]); //仓库下拉列表
|
||||||
function warehouseFun() {
|
function warehouseFun() {
|
||||||
//所属仓库下拉数据
|
//所属仓库下拉数据
|
||||||
warehouseAll().then(response => {
|
warehouseAll().then((response) => {
|
||||||
warehouseData.value = response.data
|
warehouseData.value = response.data;
|
||||||
})
|
});
|
||||||
}
|
}
|
||||||
warehouseFun()
|
warehouseFun();
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
|
|||||||
@@ -35,6 +35,7 @@
|
|||||||
</el-row>
|
</el-row>
|
||||||
</el-form>
|
</el-form>
|
||||||
<el-table v-loading="loading" :data="recordList" ref="infoTableRef" highlight-current-row @row-click="(row) => tableInfoRowClick(row, infoTableRef)" border show-overflow-tooltip>
|
<el-table v-loading="loading" :data="recordList" ref="infoTableRef" highlight-current-row @row-click="(row) => tableInfoRowClick(row, infoTableRef)" border show-overflow-tooltip>
|
||||||
|
<el-table-column label="序号" align="center" type="index" width="70" />
|
||||||
<el-table-column label="物料描述" align="center" prop="wlMs" />
|
<el-table-column label="物料描述" align="center" prop="wlMs" />
|
||||||
<el-table-column label="供应商" align="center" prop="gysMc" />
|
<el-table-column label="供应商" align="center" prop="gysMc" />
|
||||||
<el-table-column label="项目编号" align="center" prop="xmNo" />
|
<el-table-column label="项目编号" align="center" prop="xmNo" />
|
||||||
|
|||||||
@@ -563,6 +563,20 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
<div class="addOutBoundBox">
|
||||||
|
<div style="display: flex;align-items: center;">
|
||||||
|
<div class="addOutBound" @click="addOutBoundData">
|
||||||
|
<el-icon style="margin-right: 10px;" size="20"><FolderAdd /></el-icon>
|
||||||
|
添加至出库
|
||||||
|
</div>
|
||||||
|
<div @click="viewOutBoundData" style="color: #000;text-decoration: underline;margin-left: 5px;">[已添加{{ outBoundData.length }}条库存]</div>
|
||||||
|
<div @click="viewOutBoundData" style="color: red;text-decoration: underline;font-weight: bold;">[凭证重复出库或项目已关闭,请点击查看!]</div>
|
||||||
|
</div>
|
||||||
|
<div v-show="outBoundData.length > 0 && planList.length === outBoundData.length" @click="deleteOutBoundData" style="display: flex;align-items: center;color: var(--el-color-primary);">
|
||||||
|
<el-icon><delete /></el-icon>
|
||||||
|
<span>删除</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<!-- <el-row :gutter="20">
|
<!-- <el-row :gutter="20">
|
||||||
<el-col :span="6">
|
<el-col :span="6">
|
||||||
<el-form-item label="项目号" >
|
<el-form-item label="项目号" >
|
||||||
@@ -578,6 +592,7 @@
|
|||||||
</el-form>
|
</el-form>
|
||||||
<el-table
|
<el-table
|
||||||
:data="planList"
|
:data="planList"
|
||||||
|
ref="addTableRef"
|
||||||
height="400"
|
height="400"
|
||||||
border
|
border
|
||||||
show-overflow-tooltip
|
show-overflow-tooltip
|
||||||
@@ -937,6 +952,7 @@ import { getToken } from "@/utils/auth";
|
|||||||
import bill from "@/components/storageBill/bill.vue";
|
import bill from "@/components/storageBill/bill.vue";
|
||||||
import printBill from "@/components/printBill/bill.vue";
|
import printBill from "@/components/printBill/bill.vue";
|
||||||
import { ref } from "vue";
|
import { ref } from "vue";
|
||||||
|
import { pl } from "element-plus/es/locales.mjs";
|
||||||
|
|
||||||
const headers = ref({
|
const headers = ref({
|
||||||
Authorization: "Bearer " + getToken(),
|
Authorization: "Bearer " + getToken(),
|
||||||
@@ -1124,6 +1140,7 @@ const outQueryParams = ref({
|
|||||||
});
|
});
|
||||||
//查询库存中数据 搜索
|
//查询库存中数据 搜索
|
||||||
const planList = ref([]);
|
const planList = ref([]);
|
||||||
|
const addTableRef = ref(null);
|
||||||
function searchPlan() {
|
function searchPlan() {
|
||||||
if (outQueryParams.value.cangku.length > 0) {
|
if (outQueryParams.value.cangku.length > 0) {
|
||||||
outQueryParams.value.cangku = outQueryParams.value.cangku[1];
|
outQueryParams.value.cangku = outQueryParams.value.cangku[1];
|
||||||
@@ -1144,15 +1161,64 @@ function handleSelectionChange(selection) {
|
|||||||
checkOutList.value = selection;
|
checkOutList.value = selection;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 点击添加至出库
|
||||||
|
const outBoundData = ref([]);
|
||||||
|
function addOutBoundData() {
|
||||||
|
if (checkOutList.value.length == 0) {
|
||||||
|
proxy.$modal.msgError("请勾选数据");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
let data = outBoundData.value.concat(checkOutList.value);
|
||||||
|
const map = new Map();
|
||||||
|
// 遍历数组,Map的键为id值,值为数组元素,自动覆盖重复键
|
||||||
|
data.forEach(item => map.set(item.id, item));
|
||||||
|
// 把Map的值转为数组(保留最后一次出现的重复项)
|
||||||
|
outBoundData.value = Array.from(map.values());
|
||||||
|
}
|
||||||
|
|
||||||
|
// 查看所有的出库数据
|
||||||
|
const viewOutBoundData = () => {
|
||||||
|
planList.value = JSON.parse(JSON.stringify(outBoundData.value));
|
||||||
|
console.log(addTableRef.value)
|
||||||
|
// nextTick(() => {
|
||||||
|
// planList.value.forEach(item => {
|
||||||
|
// addTableRef.value.toggleRowSelection(item, true)
|
||||||
|
// })
|
||||||
|
// })
|
||||||
|
// checkOutList.value = planList.value
|
||||||
|
}
|
||||||
|
|
||||||
|
// 删除选中的出库数据
|
||||||
|
const deleteOutBoundData = () => {
|
||||||
|
if (checkOutList.value.length == 0) {
|
||||||
|
proxy.$modal.msgError("请勾选数据");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
proxy.$modal.confirm("确认删除选中的出库数据吗?").then(() => {
|
||||||
|
const ids = checkOutList.value.map(item => item.id);
|
||||||
|
console.log(ids)
|
||||||
|
planList.value = planList.value.filter(item => {
|
||||||
|
// 无id的元素默认保留(如果想删除无id的,可改为 item?.id && !arr2Ids.has(item.id))
|
||||||
|
return !ids.includes(item?.id);
|
||||||
|
});
|
||||||
|
outBoundData.value = planList.value
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
/** 新增按钮操作 */
|
/** 新增按钮操作 */
|
||||||
function handleAdd() {
|
function handleAdd() {
|
||||||
reset();
|
reset();
|
||||||
open.value = true;
|
open.value = true;
|
||||||
|
outBoundData.value = [];
|
||||||
title.value = "添加出库单据";
|
title.value = "添加出库单据";
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 提交按钮 */
|
/** 提交按钮 */
|
||||||
function submitForm() {
|
function submitForm() {
|
||||||
|
if (outBoundData.value.length !== checkOutList.value) {
|
||||||
|
proxy.$modal.msgError("请查看勾选数据");
|
||||||
|
return;
|
||||||
|
}
|
||||||
proxy.$refs["stockRef"].validate((valid) => {
|
proxy.$refs["stockRef"].validate((valid) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
if (checkOutList.value.length == 0) {
|
if (checkOutList.value.length == 0) {
|
||||||
@@ -1555,33 +1621,24 @@ function submitDispatch() {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
<style scoped>
|
<style scoped lang="scss">
|
||||||
.printMeBox {
|
.printMeBox {
|
||||||
div {
|
div {
|
||||||
line-height: 30px;
|
line-height: 30px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.titleBox {
|
.addOutBoundBox{
|
||||||
text-align: center;
|
|
||||||
margin-bottom: 20px;
|
|
||||||
}
|
|
||||||
.topBox {
|
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-wrap: wrap;
|
align-items: center;
|
||||||
}
|
justify-content: space-between;
|
||||||
.topEveryBox {
|
margin-bottom: 10px;
|
||||||
width: 50%;
|
cursor: pointer;
|
||||||
}
|
.addOutBound {
|
||||||
.tableBox {
|
|
||||||
margin-top: 10px;
|
|
||||||
}
|
|
||||||
.oneLineBox {
|
|
||||||
display: flex;
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
color: var(--el-text-color-regular);
|
||||||
|
font-weight: bold;
|
||||||
}
|
}
|
||||||
.everyBox {
|
|
||||||
width: 25%;
|
|
||||||
}
|
|
||||||
.bottomBox {
|
|
||||||
margin-top: 10px;
|
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -76,6 +76,7 @@
|
|||||||
|
|
||||||
<el-table v-loading="loading" :data="outboundList" ref="infoTableRef" highlight-current-row @row-click="(row) => tableInfoRowClick(row, infoTableRef)" @selection-change="printSelectionChange" border show-overflow-tooltip>
|
<el-table v-loading="loading" :data="outboundList" ref="infoTableRef" highlight-current-row @row-click="(row) => tableInfoRowClick(row, infoTableRef)" @selection-change="printSelectionChange" border show-overflow-tooltip>
|
||||||
<el-table-column type="selection" width="55" align="center" />
|
<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="billNo" width="180"/>
|
<el-table-column label="单据号" align="center" prop="billNo" width="180"/>
|
||||||
<el-table-column label="订单编号" align="center" prop="sapNo" width="150"/>
|
<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="xmNo" width="150"/>
|
||||||
|
|||||||
Reference in New Issue
Block a user