优化
This commit is contained in:
@@ -1,24 +0,0 @@
|
|||||||
import request from '@/utils/request'
|
|
||||||
// 查询列表数据
|
|
||||||
export function listInrevoke(data) {
|
|
||||||
return request({
|
|
||||||
url: '/wisdom/stock/list',
|
|
||||||
method: 'post',
|
|
||||||
data: data
|
|
||||||
})
|
|
||||||
}
|
|
||||||
export function delStore(data) {
|
|
||||||
return request({
|
|
||||||
url: '/wisdom/stock/deleteByIds',
|
|
||||||
method: 'post',
|
|
||||||
data: data
|
|
||||||
})
|
|
||||||
}
|
|
||||||
export function storeFun(data) {
|
|
||||||
return request({
|
|
||||||
url: '/wisdom/stock/revertByIds',
|
|
||||||
method: 'post',
|
|
||||||
data: data
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -1,23 +0,0 @@
|
|||||||
import request from '@/utils/request'
|
|
||||||
// 查询列表数据
|
|
||||||
export function listOutrevoke(data) {
|
|
||||||
return request({
|
|
||||||
url: '/wisdom/stock/list',
|
|
||||||
method: 'post',
|
|
||||||
data: data
|
|
||||||
})
|
|
||||||
}
|
|
||||||
export function delStore(data) {
|
|
||||||
return request({
|
|
||||||
url: '/wisdom/stock/deleteByIds',
|
|
||||||
method: 'post',
|
|
||||||
data: data
|
|
||||||
})
|
|
||||||
}
|
|
||||||
export function storeFun(data) {
|
|
||||||
return request({
|
|
||||||
url: '/wisdom/stock/revertByIds',
|
|
||||||
method: 'post',
|
|
||||||
data: data
|
|
||||||
})
|
|
||||||
}
|
|
||||||
@@ -1,573 +0,0 @@
|
|||||||
<template>
|
|
||||||
<div class="app-container">
|
|
||||||
<el-form :model="queryParams" ref="queryRef" :inline="true" v-show="showSearch" label-width="68px">
|
|
||||||
<!-- <el-form-item label="县局" prop="xj">
|
|
||||||
<el-input
|
|
||||||
v-model="queryParams.xj"
|
|
||||||
placeholder="请输入县局"
|
|
||||||
clearable
|
|
||||||
@keyup.enter="handleQuery"
|
|
||||||
/>
|
|
||||||
</el-form-item> -->
|
|
||||||
<el-form-item label="项目号" prop="xmNo">
|
|
||||||
<el-input
|
|
||||||
v-model="queryParams.xmNo"
|
|
||||||
placeholder="请输入项目号"
|
|
||||||
clearable
|
|
||||||
@keyup.enter="handleQuery"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="项目描述" prop="xmMs">
|
|
||||||
<el-input
|
|
||||||
v-model="queryParams.xmMs"
|
|
||||||
placeholder="请输入项目描述"
|
|
||||||
clearable
|
|
||||||
@keyup.enter="handleQuery"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="物料号" prop="wlNo">
|
|
||||||
<el-input
|
|
||||||
v-model="queryParams.wlNo"
|
|
||||||
placeholder="请输入物料号"
|
|
||||||
clearable
|
|
||||||
@keyup.enter="handleQuery"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="物料描述" prop="wlMs">
|
|
||||||
<el-input
|
|
||||||
v-model="queryParams.wlMs"
|
|
||||||
placeholder="请输入物料描述"
|
|
||||||
clearable
|
|
||||||
@keyup.enter="handleQuery"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
|
||||||
<!-- <el-form-item label="供应商编码" prop="gysNo">
|
|
||||||
<el-input
|
|
||||||
v-model="queryParams.gysNo"
|
|
||||||
placeholder="请输入供应商编码"
|
|
||||||
clearable
|
|
||||||
@keyup.enter="handleQuery"
|
|
||||||
/>
|
|
||||||
</el-form-item> -->
|
|
||||||
<el-form-item label="供应商名称" prop="gysMc">
|
|
||||||
<el-input
|
|
||||||
v-model="queryParams.gysMc"
|
|
||||||
placeholder="请输入供应商名称"
|
|
||||||
clearable
|
|
||||||
@keyup.enter="handleQuery"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
|
||||||
<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-form>
|
|
||||||
|
|
||||||
<el-row :gutter="10" class="mb8">
|
|
||||||
<el-col :span="1.5">
|
|
||||||
<el-button
|
|
||||||
type="primary"
|
|
||||||
plain
|
|
||||||
icon="Plus"
|
|
||||||
@click="handleAdd"
|
|
||||||
v-hasPermi="['query:jh:add']"
|
|
||||||
>新增</el-button>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="1.5">
|
|
||||||
<el-button
|
|
||||||
type="success"
|
|
||||||
plain
|
|
||||||
icon="Edit"
|
|
||||||
:disabled="single"
|
|
||||||
@click="handleUpdate"
|
|
||||||
v-hasPermi="['query:jh:edit']"
|
|
||||||
>修改</el-button>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="1.5">
|
|
||||||
<el-button
|
|
||||||
type="danger"
|
|
||||||
plain
|
|
||||||
icon="Delete"
|
|
||||||
:disabled="multiple"
|
|
||||||
@click="handleDelete"
|
|
||||||
v-hasPermi="['query:jh:remove']"
|
|
||||||
>删除</el-button>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="1.5">
|
|
||||||
<el-button
|
|
||||||
type="primary"
|
|
||||||
plain
|
|
||||||
icon="Upload"
|
|
||||||
@click="handleImport"
|
|
||||||
v-hasPermi="['query:jh:import']"
|
|
||||||
>导入供应计划</el-button>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="1.5">
|
|
||||||
<el-button type="warning" plain icon="Download" @click="handleExport" v-hasPermi="['query:jh:export']">导出供应计划</el-button>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="1.5">
|
|
||||||
<el-button
|
|
||||||
type="primary"
|
|
||||||
plain
|
|
||||||
icon="Upload"
|
|
||||||
@click="handlePrint"
|
|
||||||
v-print="printViewInfo"
|
|
||||||
>打印</el-button>
|
|
||||||
</el-col>
|
|
||||||
<right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>
|
|
||||||
</el-row>
|
|
||||||
<!-- @selection-change="handleSelectionChange" -->
|
|
||||||
<el-table v-loading="loading" :data="jhList" @selection-change="handleSelectionChange">
|
|
||||||
<el-table-column type="selection" width="55" align="center" />
|
|
||||||
|
|
||||||
<!-- <el-table-column label="县局" align="center" prop="xj" /> -->
|
|
||||||
<el-table-column label="项目号" align="center" prop="xmNo" />
|
|
||||||
<el-table-column label="项目描述" align="center" prop="xmMs" />
|
|
||||||
<el-table-column label="物料号" align="center" prop="wlNo" />
|
|
||||||
<el-table-column label="物料描述" align="center" prop="wlMs" />
|
|
||||||
<el-table-column label="供应商编码" align="center" prop="gysNo" />
|
|
||||||
<el-table-column label="供应商名称" align="center" prop="gysMc" />
|
|
||||||
<el-table-column label="计划交货金额" align="center" prop="jhAmt" />
|
|
||||||
<el-table-column label="合同单价" align="center" prop="htDj" />
|
|
||||||
<el-table-column label="SAP订单编号" align="center" prop="sapNo" />
|
|
||||||
<el-table-column label="行号" align="center" prop="xh" />
|
|
||||||
<el-table-column label="计划交货数量" align="center" prop="jhQty" />
|
|
||||||
<el-table-column label="合同数量" align="center" prop="htQty" />
|
|
||||||
<el-table-column label="计量单位" align="center" prop="dw" />
|
|
||||||
<!-- <el-table-column label="备注" align="center" prop="remark" />
|
|
||||||
<el-table-column label="是否删除" align="center" prop="isDelete" /> -->
|
|
||||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
|
||||||
<template #default="scope">
|
|
||||||
<el-button link type="primary" icon="Edit" @click="handleUpdate(scope.row)" v-hasPermi="['query:jh:edit']">修改</el-button>
|
|
||||||
<el-button link type="primary" icon="Delete" @click="handleDelete(scope.row)" v-hasPermi="['query:jh:remove']">删除</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"
|
|
||||||
/>
|
|
||||||
<!-- 打印 -->
|
|
||||||
<div id="printMe" class="printMeBox" v-show="showContent">
|
|
||||||
<div class="titleBox">
|
|
||||||
<div>项目编号:{{ printList.length>0 ? printList[0].xmNo:"" }}</div>
|
|
||||||
<div>项目描述:{{ printList.length>0 ? printList[0].xmMs:"" }}</div>
|
|
||||||
<!-- <img :src="qrcodeDataURL" alt="二维码" /> -->
|
|
||||||
|
|
||||||
</div>
|
|
||||||
<el-col :span="24" class="card-box">
|
|
||||||
<!-- <el-collapse > -->
|
|
||||||
|
|
||||||
|
|
||||||
<div class="el-table el-table--enable-row-hover el-table--medium">
|
|
||||||
<table cellspacing="0" style="width: 100%;">
|
|
||||||
<thead>
|
|
||||||
<tr>
|
|
||||||
<th class="el-table__cell is-leaf"><div class="cell">订单号</div></th>
|
|
||||||
<th class="el-table__cell is-leaf"><div class="cell">二维码</div></th>
|
|
||||||
<th class="el-table__cell is-leaf"><div class="cell">供应商名称</div></th>
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
<tbody>
|
|
||||||
<tr v-for="item in printList" :key="item.id">
|
|
||||||
<td class="el-table__cell is-leaf"><div class="cell">{{ item.sapNo }}</div></td>
|
|
||||||
<td class="el-table__cell is-leaf"><div class="cell" ><qrcode-vue :value="item.sapNo" :size="60" level="H"></qrcode-vue></div></td>
|
|
||||||
<td class="el-table__cell is-leaf"><div class="cell" >{{ item.gysMc }}</div></td>
|
|
||||||
</tr>
|
|
||||||
<!-- <tr>
|
|
||||||
<td class="el-table__cell is-leaf"><div class="cell">已用库位</div></td>
|
|
||||||
<td class="el-table__cell is-leaf"><div class="cell" >89</div></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="el-table__cell is-leaf"><div class="cell">可用库位</div></td>
|
|
||||||
<td class="el-table__cell is-leaf"><div class="cell" >20</div></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="el-table__cell is-leaf"><div class="cell">当前空闲率</div></td>
|
|
||||||
<td class="el-table__cell is-leaf"><div class="cell" >20%</div></td>
|
|
||||||
</tr> -->
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
</div>
|
|
||||||
<!-- </el-collapse> -->
|
|
||||||
</el-col>
|
|
||||||
</div>
|
|
||||||
<!-- 添加或修改供应计划对话框 -->
|
|
||||||
<el-dialog :title="title" v-model="open" width="500px" append-to-body>
|
|
||||||
<el-form ref="jhRef" :model="form" :rules="rules" label-width="80px">
|
|
||||||
<el-form-item label="县局" prop="xj">
|
|
||||||
<el-input v-model="form.xj" placeholder="请输入县局" />
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="项目号" prop="xmNo">
|
|
||||||
<el-input v-model="form.xmNo" placeholder="请输入项目号" />
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="项目描述" prop="xmMs">
|
|
||||||
<el-input v-model="form.xmMs" placeholder="请输入项目描述" />
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="物料号" prop="wlNo">
|
|
||||||
<el-input v-model="form.wlNo" placeholder="请输入物料号" />
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="物料描述" prop="wlMs">
|
|
||||||
<el-input v-model="form.wlMs" placeholder="请输入物料描述" />
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="供应商编码" prop="gysNo">
|
|
||||||
<el-input v-model="form.gysNo" placeholder="请输入供应商编码" />
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="供应商名称" prop="gysMc">
|
|
||||||
<el-input v-model="form.gysMc" placeholder="请输入供应商名称" />
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="计划交货金额" prop="jhAmt">
|
|
||||||
<el-input v-model="form.jhAmt" placeholder="请输入计划交货金额" />
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="合同单价" prop="htDj">
|
|
||||||
<el-input v-model="form.htDj" placeholder="请输入合同单价" />
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="SAP订单编号" prop="sapNo">
|
|
||||||
<el-input v-model="form.sapNo" placeholder="请输入SAP订单编号" />
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="行号" prop="xh">
|
|
||||||
<el-input v-model="form.xh" placeholder="请输入行号" />
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="计划交货数量" prop="jhQty">
|
|
||||||
<el-input v-model="form.jhQty" placeholder="请输入计划交货数量" />
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="合同数量" prop="htQty">
|
|
||||||
<el-input v-model="form.htQty" placeholder="请输入合同数量" />
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="计量单位" prop="dw">
|
|
||||||
<el-input v-model="form.dw" placeholder="请输入计量单位" />
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="备注" prop="remark">
|
|
||||||
<el-input v-model="form.remark" placeholder="请输入备注" />
|
|
||||||
</el-form-item>
|
|
||||||
<!-- <el-form-item label="是否删除" prop="isDelete">
|
|
||||||
<el-input v-model="form.isDelete" placeholder="请输入是否删除" />
|
|
||||||
</el-form-item> -->
|
|
||||||
</el-form>
|
|
||||||
<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="upload.title" v-model="upload.open" width="400px" append-to-body>
|
|
||||||
<el-upload ref="uploadRef" :limit="1" accept=".xlsx, .xls" :headers="upload.headers" :action="upload.url" :disabled="upload.isUploading" :on-progress="handleFileUploadProgress" :on-success="handleFileSuccess" :auto-upload="false" drag>
|
|
||||||
<el-icon class="el-icon--upload"><upload-filled /></el-icon>
|
|
||||||
<div class="el-upload__text">将文件拖到此处,或<em>点击上传</em></div>
|
|
||||||
<template #tip>
|
|
||||||
<div class="el-upload__tip text-center">
|
|
||||||
<!-- <div class="el-upload__tip">
|
|
||||||
<el-checkbox v-model="upload.updateSupport" />是否更新已经存在的用户数据
|
|
||||||
</div> -->
|
|
||||||
<span>仅允许导入xls、xlsx格式文件。</span>
|
|
||||||
<!-- <el-link type="primary" :underline="false" style="font-size: 12px; vertical-align: baseline" @click="importTemplate">下载模板</el-link> -->
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
</el-upload>
|
|
||||||
<template #footer>
|
|
||||||
<div class="dialog-footer">
|
|
||||||
<el-button type="primary" @click="submitFileForm">确 定</el-button>
|
|
||||||
<el-button @click="upload.open = false">取 消</el-button>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
</el-dialog>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script setup name="Jh">
|
|
||||||
// import { getToken } from "@/utils/auth";
|
|
||||||
// import { listJh, getJh, delJh, addJh, updateJh } from "@/api/query/jh";
|
|
||||||
// //生成二维码
|
|
||||||
// import QrcodeVue from 'qrcode.vue';
|
|
||||||
|
|
||||||
// const { proxy } = getCurrentInstance();
|
|
||||||
|
|
||||||
// const jhList = ref([]);
|
|
||||||
// const open = ref(false);
|
|
||||||
// const loading = ref(true);
|
|
||||||
// const showSearch = ref(true);
|
|
||||||
// const ids = ref([]);
|
|
||||||
// const single = ref(true);
|
|
||||||
// const multiple = ref(true);
|
|
||||||
// const total = ref(0);
|
|
||||||
// const title = ref("");
|
|
||||||
// const printList = ref([]);
|
|
||||||
// const showContent = ref(false); // 控制打印内容是否显示
|
|
||||||
// // const qrcodeDataURL = ref("")
|
|
||||||
// //文件上传--供应计划导入
|
|
||||||
// const upload = reactive({
|
|
||||||
// // 是否显示弹出层(用户导入)
|
|
||||||
// open: false,
|
|
||||||
// // 弹出层标题(用户导入)
|
|
||||||
// title: "",
|
|
||||||
// // 是否禁用上传
|
|
||||||
// isUploading: false,
|
|
||||||
// // 是否更新已经存在的用户数据
|
|
||||||
// updateSupport: 0,
|
|
||||||
// // 设置上传的请求头部
|
|
||||||
// headers: { Authorization: "Bearer " + getToken() },
|
|
||||||
// // 上传的地址
|
|
||||||
// url: import.meta.env.VITE_APP_BASE_API + "/query/jh/import"
|
|
||||||
// });
|
|
||||||
|
|
||||||
// const data = reactive({
|
|
||||||
// form: {},
|
|
||||||
// queryParams: {
|
|
||||||
// pageNum: 1,
|
|
||||||
// pageSize: 10,
|
|
||||||
// // xj: null,
|
|
||||||
// xmNo: null, //项目号
|
|
||||||
// xmMs: null, //项目描述
|
|
||||||
// wlNo: null, //物料号
|
|
||||||
// wlMs: null, //物料描述
|
|
||||||
// // gysNo: null,
|
|
||||||
// gysMc: null, //gysMc
|
|
||||||
// // jhAmt: null,
|
|
||||||
// // htDj: null,
|
|
||||||
// // sapNo: null,
|
|
||||||
// // xh: null,
|
|
||||||
// // jhQty: null,
|
|
||||||
// // htQty: null,
|
|
||||||
// // dw: null,
|
|
||||||
// // isDelete: null
|
|
||||||
// },
|
|
||||||
// rules: {
|
|
||||||
// },
|
|
||||||
// printViewInfo: {
|
|
||||||
// id: "printMe", //打印区域的唯一的id属性
|
|
||||||
// popTitle: '入库信息打印', // 页眉文字 (不设置时显示undifined)(页眉页脚可以在打印页面的更多设置的选项中取消勾选)
|
|
||||||
|
|
||||||
|
|
||||||
// beforeOpenCallback () {
|
|
||||||
// showContent.value = false;
|
|
||||||
// }, // 开始打印之前的callback
|
|
||||||
// openCallback () { }, // 调用打印时的callback
|
|
||||||
// closeCallback () { }, // 关闭打印的callback(无法区分确认or取消)
|
|
||||||
// clickMounted () { },
|
|
||||||
|
|
||||||
// standard: '',
|
|
||||||
// extarCss: ''
|
|
||||||
// },
|
|
||||||
// // printOption: {
|
|
||||||
// // id: 'printMe', // 打印元素的id 不需要携带#号
|
|
||||||
// // popTitle: '员工信息' // 页眉标题 默认浏览器标题 空字符串时显示undefined 使用html语言
|
|
||||||
// // },
|
|
||||||
// });
|
|
||||||
|
|
||||||
// const { queryParams, form, rules,printViewInfo } = toRefs(data);
|
|
||||||
|
|
||||||
// /** 查询供应计划列表 */
|
|
||||||
// function getList() {
|
|
||||||
// loading.value = true;
|
|
||||||
// listJh(queryParams.value).then(response => {
|
|
||||||
// jhList.value = response.rows;
|
|
||||||
// total.value = response.total;
|
|
||||||
// loading.value = false;
|
|
||||||
// });
|
|
||||||
// }
|
|
||||||
|
|
||||||
// // 取消按钮
|
|
||||||
// function cancel() {
|
|
||||||
// open.value = false;
|
|
||||||
// reset();
|
|
||||||
// }
|
|
||||||
|
|
||||||
// // 表单重置
|
|
||||||
// function reset() {
|
|
||||||
// form.value = {
|
|
||||||
// id: null,
|
|
||||||
// xj: null,
|
|
||||||
// xmNo: null,
|
|
||||||
// xmMs: null,
|
|
||||||
// wlNo: null,
|
|
||||||
// wlMs: null,
|
|
||||||
// gysNo: null,
|
|
||||||
// gysMc: null,
|
|
||||||
// jhAmt: null,
|
|
||||||
// htDj: null,
|
|
||||||
// sapNo: null,
|
|
||||||
// xh: null,
|
|
||||||
// jhQty: null,
|
|
||||||
// htQty: null,
|
|
||||||
// dw: null,
|
|
||||||
// remark: null,
|
|
||||||
// createBy: null,
|
|
||||||
// createTime: null,
|
|
||||||
// updateBy: null,
|
|
||||||
// updateTime: null,
|
|
||||||
// isDelete: null
|
|
||||||
// };
|
|
||||||
// proxy.resetForm("jhRef");
|
|
||||||
// }
|
|
||||||
|
|
||||||
// /** 搜索按钮操作 */
|
|
||||||
// function handleQuery() {
|
|
||||||
// queryParams.value.pageNum = 1;
|
|
||||||
// getList();
|
|
||||||
// }
|
|
||||||
|
|
||||||
// /** 重置按钮操作 */
|
|
||||||
// function resetQuery() {
|
|
||||||
// proxy.resetForm("queryRef");
|
|
||||||
// handleQuery();
|
|
||||||
// }
|
|
||||||
|
|
||||||
// // 多选框选中数据
|
|
||||||
// function handleSelectionChange(selection) {
|
|
||||||
// // qrcodeDataURL.value = "101293361"
|
|
||||||
// // console.log(selection)
|
|
||||||
// // let sapNo = "101293360"
|
|
||||||
// // let width = 200
|
|
||||||
// // let height = 200
|
|
||||||
// // let correctLevel = 'M'
|
|
||||||
// // QRCode.toDataURL({
|
|
||||||
// // sapNo,
|
|
||||||
// // width,
|
|
||||||
// // height,
|
|
||||||
// // correctLevel
|
|
||||||
// // }).then((url) => {
|
|
||||||
// // qrcodeDataURL.value = url
|
|
||||||
// // }).catch((error) => {
|
|
||||||
// // console.error(error)
|
|
||||||
// // })
|
|
||||||
// // printList.value = selection.map(item=>({
|
|
||||||
// // sapNo:item.sapNo,
|
|
||||||
// // gysMc:item.gysMc,
|
|
||||||
// // id:item.id
|
|
||||||
// // }))
|
|
||||||
|
|
||||||
// ids.value = selection.map(item => item.id);
|
|
||||||
// single.value = selection.length != 1;
|
|
||||||
// multiple.value = !selection.length;
|
|
||||||
// printList.value = selection
|
|
||||||
// // let printListData =
|
|
||||||
// // for(let i=0;i<selection.length;i++){
|
|
||||||
// // let sapNo = selection[i].sapNo
|
|
||||||
// // let width = 200
|
|
||||||
// // let height = 200
|
|
||||||
// // let correctLevel = 'M'
|
|
||||||
// // QRCode.toDataURL({
|
|
||||||
// // sapNo,
|
|
||||||
// // width,
|
|
||||||
// // height,
|
|
||||||
// // correctLevel
|
|
||||||
// // }).then((url) => {
|
|
||||||
// // this.qrcodeDataURL = url
|
|
||||||
// // }).catch((error) => {
|
|
||||||
// // console.error(error)
|
|
||||||
// // })
|
|
||||||
// // }
|
|
||||||
// }
|
|
||||||
|
|
||||||
// /** 新增按钮操作 */
|
|
||||||
// function handleAdd() {
|
|
||||||
// reset();
|
|
||||||
// open.value = true;
|
|
||||||
// title.value = "添加供应计划";
|
|
||||||
// }
|
|
||||||
|
|
||||||
// /** 修改按钮操作 */
|
|
||||||
// function handleUpdate(row) {
|
|
||||||
// reset();
|
|
||||||
// const _id = row.id || ids.value
|
|
||||||
// getJh(_id).then(response => {
|
|
||||||
// form.value = response.data;
|
|
||||||
// open.value = true;
|
|
||||||
// title.value = "修改供应计划";
|
|
||||||
// });
|
|
||||||
// }
|
|
||||||
|
|
||||||
// /** 提交按钮 */
|
|
||||||
// function submitForm() {
|
|
||||||
// proxy.$refs["jhRef"].validate(valid => {
|
|
||||||
// if (valid) {
|
|
||||||
// if (form.value.id != null) {
|
|
||||||
// updateJh(form.value).then(response => {
|
|
||||||
// proxy.$modal.msgSuccess("修改成功");
|
|
||||||
// open.value = false;
|
|
||||||
// getList();
|
|
||||||
// });
|
|
||||||
// } else {
|
|
||||||
// addJh(form.value).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 delJh(_ids);
|
|
||||||
// }).then(() => {
|
|
||||||
// getList();
|
|
||||||
// proxy.$modal.msgSuccess("删除成功");
|
|
||||||
// }).catch(() => {});
|
|
||||||
// }
|
|
||||||
|
|
||||||
// /** 导出按钮操作 */
|
|
||||||
// function handleExport() {
|
|
||||||
// proxy.download('query/jh/export', {
|
|
||||||
// ...queryParams.value
|
|
||||||
// }, `jh_${new Date().getTime()}.xlsx`)
|
|
||||||
// }
|
|
||||||
// function handleImport() {
|
|
||||||
// upload.title = "供应计划导入";
|
|
||||||
// upload.open = true;
|
|
||||||
// };
|
|
||||||
// /**文件上传中处理 */
|
|
||||||
// const handleFileUploadProgress = (event, file, fileList) => {
|
|
||||||
// upload.isUploading = true;
|
|
||||||
// };
|
|
||||||
|
|
||||||
// /** 文件上传成功处理 */
|
|
||||||
// const handleFileSuccess = (response, file, fileList) => {
|
|
||||||
// upload.open = false;
|
|
||||||
// upload.isUploading = false;
|
|
||||||
// proxy.$refs["uploadRef"].handleRemove(file);
|
|
||||||
// proxy.$alert("<div style='overflow: auto;overflow-x: hidden;max-height: 70vh;padding: 10px 20px 0;'>" + response.msg + "</div>", "导入结果", { dangerouslyUseHTMLString: true });
|
|
||||||
// getList();
|
|
||||||
// };
|
|
||||||
|
|
||||||
// /** 提交上传文件 */
|
|
||||||
// function submitFileForm() {
|
|
||||||
// proxy.$refs["uploadRef"].submit();
|
|
||||||
// };
|
|
||||||
// // 打印
|
|
||||||
// function handlePrint(){
|
|
||||||
// showContent.value = true;
|
|
||||||
// // setTimeout(() => {
|
|
||||||
// // showContent.value = false;
|
|
||||||
// // }, 300)
|
|
||||||
// // Print.print('printMe');
|
|
||||||
// // showContent.value = false;
|
|
||||||
// }
|
|
||||||
// getList();
|
|
||||||
</script>
|
|
||||||
<style scoped lang="scss">
|
|
||||||
|
|
||||||
.app-container{
|
|
||||||
.printMeBox{
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.titleBox{
|
|
||||||
margin-bottom: 20px;
|
|
||||||
}
|
|
||||||
@media print {
|
|
||||||
@page {
|
|
||||||
size: auto;
|
|
||||||
margin: 10mm;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
@@ -1226,6 +1226,10 @@ const stockList = ref([]); //明细列表
|
|||||||
//查询明细列表数据方法
|
//查询明细列表数据方法
|
||||||
function detailList(type) {
|
function detailList(type) {
|
||||||
listStock(billDoubleClickObj.value.billNo).then((response) => {
|
listStock(billDoubleClickObj.value.billNo).then((response) => {
|
||||||
|
if (response.data.length == 0) {
|
||||||
|
proxy.$modal.msgError("该条入库单暂无明细");
|
||||||
|
return;
|
||||||
|
}
|
||||||
if (type == "bill") {
|
if (type == "bill") {
|
||||||
billAllObj.value = response.data;
|
billAllObj.value = response.data;
|
||||||
dialogBill.value = true;
|
dialogBill.value = true;
|
||||||
|
|||||||
@@ -1,651 +0,0 @@
|
|||||||
<template>
|
|
||||||
<div class="app-container">
|
|
||||||
<el-form :model="queryParams" ref="queryRef" v-show="showSearch" label-width="90">
|
|
||||||
<el-row >
|
|
||||||
<el-col :span="7">
|
|
||||||
<el-form-item label="入库时间" prop="rkTime">
|
|
||||||
<!-- <el-date-picker
|
|
||||||
v-model="rkTime"
|
|
||||||
type="daterange"
|
|
||||||
start-placeholder="开始时间"
|
|
||||||
end-placeholder="结束时间"
|
|
||||||
format="YYYY-MM-DD"
|
|
||||||
/> -->
|
|
||||||
<el-date-picker
|
|
||||||
v-model="rkTime"
|
|
||||||
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="4">
|
|
||||||
<el-form-item label="项目号" prop="xmNo">
|
|
||||||
<el-input
|
|
||||||
v-model="queryParams.xmNo"
|
|
||||||
placeholder="请输入项目号"
|
|
||||||
clearable
|
|
||||||
@keyup.enter="handleQuery"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="4">
|
|
||||||
<el-form-item label="订单编号" prop="sapNo">
|
|
||||||
<el-input
|
|
||||||
v-model="queryParams.sapNo"
|
|
||||||
placeholder="请输入订单编号"
|
|
||||||
clearable
|
|
||||||
@keyup.enter="handleQuery"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="4">
|
|
||||||
<el-form-item label="单据号" prop="billNo">
|
|
||||||
<el-input
|
|
||||||
v-model="queryParams.billNo"
|
|
||||||
placeholder="请输入单据号"
|
|
||||||
clearable
|
|
||||||
@keyup.enter="handleQuery"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<!-- <el-col :span="4">
|
|
||||||
<el-form-item label="库存状态" prop="isChuku">
|
|
||||||
<el-select placeholder="请选择" clearable disabled>
|
|
||||||
<el-option v-for="dict in storeStatusList" :key="dict.id" :label="dict.statusName" :value="dict.id" />
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col> -->
|
|
||||||
|
|
||||||
<el-col :span="4">
|
|
||||||
<el-form-item label="物资类型" prop="wlType">
|
|
||||||
<el-select v-model="queryParams.wlType" placeholder="请选择物资类型" clearable >
|
|
||||||
<el-option v-for="dict in wzTypeList" :key="dict.id" :label="dict.typeName" :value="dict.typeCode" />
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
<el-row >
|
|
||||||
<el-col :span="7">
|
|
||||||
<el-form-item label="项目描述" prop="xmMs">
|
|
||||||
<el-input
|
|
||||||
v-model="queryParams.xmMs"
|
|
||||||
placeholder="请输入项目描述"
|
|
||||||
clearable
|
|
||||||
@keyup.enter="handleQuery"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="4">
|
|
||||||
<el-form-item label="物料号" prop="wlNo">
|
|
||||||
<el-input
|
|
||||||
v-model="queryParams.wlNo"
|
|
||||||
placeholder="请输入物料号"
|
|
||||||
clearable
|
|
||||||
@keyup.enter="handleQuery"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="4">
|
|
||||||
<el-form-item label="供应商编码" prop="gysNo">
|
|
||||||
<el-input
|
|
||||||
v-model="queryParams.gysNo"
|
|
||||||
placeholder="请输入供应商编码"
|
|
||||||
clearable
|
|
||||||
@keyup.enter="handleQuery"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="4">
|
|
||||||
<el-form-item label="库位码" prop="pcode">
|
|
||||||
<el-input
|
|
||||||
v-model="queryParams.pcode"
|
|
||||||
placeholder="请输入库位码"
|
|
||||||
clearable
|
|
||||||
@keyup.enter="handleQuery"
|
|
||||||
/>
|
|
||||||
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="4">
|
|
||||||
<el-form-item label="入库类型" prop="rkType">
|
|
||||||
<el-select v-model="queryParams.rkType" 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-row>
|
|
||||||
<el-row>
|
|
||||||
<el-col :span="7">
|
|
||||||
<el-form-item label="供应商名称" prop="gysMc">
|
|
||||||
<el-input
|
|
||||||
v-model="queryParams.gysMc"
|
|
||||||
placeholder="请输入供应商名称"
|
|
||||||
clearable
|
|
||||||
@keyup.enter="handleQuery"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<!-- <el-col :span="4">
|
|
||||||
<el-form-item label="所属仓库" prop="cangku">
|
|
||||||
<el-select v-model="queryParams.cangku" placeholder="请选择仓库" clearable >
|
|
||||||
<el-option v-for="dict in warehouseList" :key="dict.id" :label="dict.warehouseName" :value="dict.warehouseCode" />
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col> -->
|
|
||||||
<el-col :span="4">
|
|
||||||
<el-form-item label="物料描述" prop="wlMs">
|
|
||||||
<el-input
|
|
||||||
v-model="queryParams.wlMs"
|
|
||||||
placeholder="物料描述"
|
|
||||||
clearable
|
|
||||||
@keyup.enter="handleQuery"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<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-row :gutter="10" class="mb8">
|
|
||||||
<el-col :span="1.5">
|
|
||||||
<el-button
|
|
||||||
type="danger"
|
|
||||||
plain
|
|
||||||
icon="Delete"
|
|
||||||
@click="handleDel"
|
|
||||||
>删除</el-button>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="1.5">
|
|
||||||
<el-button
|
|
||||||
type="primary"
|
|
||||||
plain
|
|
||||||
icon="Plus"
|
|
||||||
@click="handleStore"
|
|
||||||
>一键入库</el-button>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
|
|
||||||
<el-table v-loading="loading" :data="stockList" @selection-change="selectionChange" border show-overflow-tooltip>
|
|
||||||
<el-table-column type="selection" width="55" align="center" />
|
|
||||||
<!-- <el-table-column label="主键ID" align="center" prop="id" />-->
|
|
||||||
<el-table-column label="单据号" align="center" prop="billNo" width="180"/>
|
|
||||||
<el-table-column label="库存状态" align="center" width="100">
|
|
||||||
<!-- scope.row.isChuku==0?"已入库":(scope.row.isChuku==1?"已出库":"审批中") -->
|
|
||||||
<template #default="scope">
|
|
||||||
<span>{{ isChukuFun(scope.row.isChuku) }}</span>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="项目号" align="center" prop="xmNo" width="150"/>
|
|
||||||
<el-table-column label="项目描述" align="center" prop="xmMs" width="150"/>
|
|
||||||
<el-table-column label="物料号" align="center" prop="wlNo" width="100"/>
|
|
||||||
<el-table-column label="物料描述" 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="jhAmt" width="120"/>
|
|
||||||
<el-table-column label="合同单价" align="center" prop="htDj" />
|
|
||||||
<el-table-column label="订单编号" align="center" prop="sapNo" width="150"/>
|
|
||||||
<!-- <el-table-column label="行号" align="center" prop="xh" /> -->
|
|
||||||
<el-table-column label="计划交货数量" align="center" prop="jhQty" width="120"/>
|
|
||||||
<!-- <el-table-column label="合同数量" align="center" prop="htQty" /> -->
|
|
||||||
<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="pcode" width="120"/>
|
|
||||||
<el-table-column label="托盘码" align="center" prop="trayCode" />
|
|
||||||
<el-table-column label="身份码" align="center" prop="entityId" width="150"/>
|
|
||||||
<el-table-column label="入库类型" align="center" prop="rkTypeName" width="150"/>
|
|
||||||
<el-table-column label="物资类型" align="center" prop="wlTypeName" />
|
|
||||||
<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="rkTime" width="100">
|
|
||||||
<template #default="scope">
|
|
||||||
<span>{{ parseTime(scope.row.rkTime, '{y}-{m}-{d}') }}</span>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="库龄" align="center" prop="stockAge" />
|
|
||||||
<el-table-column label="理货员" align="center" prop="lihuoYName" />
|
|
||||||
<!-- <el-table-column label="审核状态" align="center" prop="lihuoY" >
|
|
||||||
<template #default="scope">
|
|
||||||
<span>{{ scope.row.auditResult==0?"已入库":"已出库" }}</span>
|
|
||||||
</template>
|
|
||||||
</el-table-column> -->
|
|
||||||
<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="remark" width="150"/>
|
|
||||||
<!-- <el-table-column label="操作" align="center" fixed="right" class-name="small-padding fixed-width" width="130">
|
|
||||||
<template #default="scope">
|
|
||||||
<el-button link type="primary" icon="Edit" @click="handleUpdate(scope.row)">一键入库</el-button>
|
|
||||||
<el-button
|
|
||||||
link
|
|
||||||
type="primary"
|
|
||||||
icon="Delete"
|
|
||||||
@click="handleStockDelete(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-dialog v-model="dialogVisible">
|
|
||||||
<img w-full :src="dialogImageUrl" alt="Preview Image" />
|
|
||||||
</el-dialog>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script setup name="inrevoke">
|
|
||||||
// wisdomDelStock
|
|
||||||
import { listInrevoke,delStore,storeFun} from "@/api/wisdom/inrevoke";
|
|
||||||
import { getAudit} from "@/api/wisdom/stock";
|
|
||||||
import {warehousingDict} from "@/api/information/warehousingtype"; //入库类型
|
|
||||||
import {materialtypeDict} from "@/api/information/materialtype"; //物资类型
|
|
||||||
import {warehouseDict} from "@/api/information/warehouseinfo"; //所属仓库
|
|
||||||
import {personListDict} from "@/api/system/user"; //理货员
|
|
||||||
import {getKwList} from "@/api/information/pcdedetail"; //库位下拉数据
|
|
||||||
import { Plus } from '@element-plus/icons-vue'
|
|
||||||
|
|
||||||
|
|
||||||
const { proxy } = getCurrentInstance();
|
|
||||||
|
|
||||||
const stockList = ref([]);
|
|
||||||
const open = ref(false);
|
|
||||||
const openSwitch = ref(false); //移库
|
|
||||||
const loading = ref(true);
|
|
||||||
const showSearch = ref(true);
|
|
||||||
const idEdit = ref(0);
|
|
||||||
const single = ref(true);
|
|
||||||
const multiple = ref(true);
|
|
||||||
const total = ref(0);
|
|
||||||
const title = ref("");
|
|
||||||
const planLoading = ref(true);
|
|
||||||
const planList = ref([]); //从供应计划中添加列表
|
|
||||||
const checkPlanList = ref([]); //已选中的要入库的数据
|
|
||||||
const storeTypeList = ref([]); //入库类型下拉数据
|
|
||||||
const wzTypeList = ref([]); //物资类型下拉数据
|
|
||||||
const warehouseList = ref([]); //所属仓库下拉数据
|
|
||||||
const personList = ref([]); //理货员下拉数据
|
|
||||||
const orderNum = ref("") //搜索条件:订单号
|
|
||||||
const kwOptions = ref([]); //库位下拉
|
|
||||||
const showContent = ref(false); // 控制打印内容是否显示
|
|
||||||
const dateStr = ref("") //打印单据生成的日期
|
|
||||||
const printList = ref([]) //要打印的数据列表
|
|
||||||
const storeStatusList = ref([
|
|
||||||
{id:0,statusName:"已入库"},
|
|
||||||
{id:1,statusName:"已出库"}
|
|
||||||
])
|
|
||||||
const moveReason = ref("") //移库原因
|
|
||||||
const rkTime = 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 autoFill = ref(false) //是否自动填充备注
|
|
||||||
const kzms = ref("")
|
|
||||||
const ids = ref([])
|
|
||||||
|
|
||||||
const data = reactive({
|
|
||||||
form: {},
|
|
||||||
storeData:{}, //入库数据
|
|
||||||
switchData:[], //移库数据
|
|
||||||
queryParams: {
|
|
||||||
pageNum: 1,
|
|
||||||
pageSize: 10,
|
|
||||||
isChuku:4,
|
|
||||||
billNo:null,
|
|
||||||
// rkTime: [],
|
|
||||||
startTime:null,
|
|
||||||
endTime:null,
|
|
||||||
xmNo: null,
|
|
||||||
sapNo: null,
|
|
||||||
xmMs:"",
|
|
||||||
wlNo:"",
|
|
||||||
gysNo:"",
|
|
||||||
pcode:"",
|
|
||||||
rkType:"",
|
|
||||||
gysMc:"",
|
|
||||||
wlType:"", //物资类型
|
|
||||||
cangku:"",
|
|
||||||
wlMs:"",
|
|
||||||
ids:[]
|
|
||||||
},
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
});
|
|
||||||
|
|
||||||
const { queryParams, storeData,form,switchData} = toRefs(data);
|
|
||||||
function isChukuFun(isChuku){
|
|
||||||
// scope.row.isChuku==0?"已入库":(scope.row.isChuku==1?"已出库":"审批中")
|
|
||||||
|
|
||||||
if(isChuku == 0){
|
|
||||||
return "已入库"
|
|
||||||
} else if(isChuku == 1){
|
|
||||||
return "已出库"
|
|
||||||
}else if(isChuku == 3){
|
|
||||||
return "借料出库"
|
|
||||||
}else if(isChuku == 2){
|
|
||||||
return "审批中"
|
|
||||||
}else if(isChuku == 4){
|
|
||||||
return "入库撤销"
|
|
||||||
}else if(isChuku == 5){
|
|
||||||
return "出库撤销"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function preview(url){
|
|
||||||
srcList.value = [url]
|
|
||||||
}
|
|
||||||
//多选
|
|
||||||
function selectionChange(selection){
|
|
||||||
ids.value = selection.map(item => item.id)
|
|
||||||
}
|
|
||||||
//删除
|
|
||||||
function handleDel(){
|
|
||||||
if(ids.value.length==0){
|
|
||||||
proxy.$modal.msgError("请勾选数据");
|
|
||||||
return
|
|
||||||
}
|
|
||||||
// console.log(ids.value)
|
|
||||||
// return
|
|
||||||
delStore(ids.value).then(response=>{
|
|
||||||
getList();
|
|
||||||
proxy.$modal.msgSuccess("操作成功");
|
|
||||||
})
|
|
||||||
// console.log(ids.value)
|
|
||||||
}
|
|
||||||
//一键入库
|
|
||||||
function handleStore(){
|
|
||||||
if(ids.value.length==0){
|
|
||||||
proxy.$modal.msgError("请勾选数据");
|
|
||||||
return
|
|
||||||
}
|
|
||||||
storeFun(ids.value).then(response=>{
|
|
||||||
getList();
|
|
||||||
proxy.$modal.msgSuccess("操作成功");
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
//预览图片
|
|
||||||
function handlePreview(uploadFile){
|
|
||||||
// console.log(222222)
|
|
||||||
// console.log(res)
|
|
||||||
dialogImageUrl.value = uploadFile.response.url
|
|
||||||
dialogVisible.value = true
|
|
||||||
}
|
|
||||||
function tableRowClassName({row, rowIndex}) {
|
|
||||||
// console.log(row)
|
|
||||||
// 根据每行的数据,判断isError来增加class属性
|
|
||||||
if (row.isAdd) {
|
|
||||||
return 'warning-row'
|
|
||||||
}
|
|
||||||
// else {
|
|
||||||
// return 'success-row'
|
|
||||||
// }
|
|
||||||
return '';
|
|
||||||
}
|
|
||||||
/** 查询库存单据主列表 */
|
|
||||||
function getList() {
|
|
||||||
loading.value = true;
|
|
||||||
listInrevoke(queryParams.value).then(response => {
|
|
||||||
stockList.value = response.rows;
|
|
||||||
total.value = response.total;
|
|
||||||
loading.value = false;
|
|
||||||
});
|
|
||||||
}
|
|
||||||
//判断是否需要开启审核功能
|
|
||||||
function isAudit(){
|
|
||||||
// {configKey:"stock.audit.enabled"}
|
|
||||||
getAudit().then(response=>{
|
|
||||||
// console.log(2222222)
|
|
||||||
// console.log(response.msg)
|
|
||||||
isExamine.value = response.msg
|
|
||||||
})
|
|
||||||
}
|
|
||||||
//库位字典
|
|
||||||
function pcodeList(){
|
|
||||||
getKwList().then(response=>{
|
|
||||||
kwOptions.value = response.data
|
|
||||||
})
|
|
||||||
}
|
|
||||||
//所属仓库
|
|
||||||
function warehouseFun(){
|
|
||||||
//所属仓库下拉数据
|
|
||||||
warehouseDict().then(response=>{
|
|
||||||
warehouseList.value = response.data
|
|
||||||
})
|
|
||||||
}
|
|
||||||
//物资类型
|
|
||||||
function materialFun(){
|
|
||||||
//获取物资类型下拉数据
|
|
||||||
materialtypeDict().then(response=>{
|
|
||||||
wzTypeList.value = response.data
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// 表单重置
|
|
||||||
function reset() {
|
|
||||||
planList.value = []
|
|
||||||
storeData.value = {}
|
|
||||||
proxy.resetForm("stockRef");
|
|
||||||
}
|
|
||||||
|
|
||||||
/** 搜索按钮操作 */
|
|
||||||
function handleQuery() {
|
|
||||||
|
|
||||||
if(rkTime.value && rkTime.value.length>0){
|
|
||||||
queryParams.value.startTime = rkTime.value[0]
|
|
||||||
queryParams.value.endTime = rkTime.value[1]
|
|
||||||
}else{
|
|
||||||
queryParams.value.startTime = ""
|
|
||||||
queryParams.value.endTime = ""
|
|
||||||
}
|
|
||||||
queryParams.value.pageNum = 1;
|
|
||||||
if(printList.value.length>0){
|
|
||||||
queryParams.value.ids = printList.value.map( item => item.id )
|
|
||||||
}
|
|
||||||
// console.log(queryParams.value)
|
|
||||||
getList();
|
|
||||||
}
|
|
||||||
|
|
||||||
/** 重置按钮操作 */
|
|
||||||
function resetQuery() {
|
|
||||||
proxy.resetForm("queryRef");
|
|
||||||
rkTime.value = []
|
|
||||||
// queryParams.value.startTime = ""
|
|
||||||
// queryParams.value.endTime = ""
|
|
||||||
handleQuery();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/** 新增按钮操作 */
|
|
||||||
function handleAdd() {
|
|
||||||
reset();
|
|
||||||
open.value = true;
|
|
||||||
title.value = "添加库存单据";
|
|
||||||
//获取入库类型下拉数据
|
|
||||||
warehousingDict().then(response=>{
|
|
||||||
storeTypeList.value = response.data
|
|
||||||
})
|
|
||||||
//理货员下拉数据
|
|
||||||
personListDict().then(response=>{
|
|
||||||
personList.value = response.data
|
|
||||||
})
|
|
||||||
}
|
|
||||||
function lhyList(){
|
|
||||||
//理货员下拉数据
|
|
||||||
personListDict().then(response=>{
|
|
||||||
personList.value = response.data
|
|
||||||
})
|
|
||||||
}
|
|
||||||
function rklxList(){
|
|
||||||
//获取入库类型下拉数据
|
|
||||||
warehousingDict().then(response=>{
|
|
||||||
storeTypeList.value = response.data
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// function selectKw(row){
|
|
||||||
// console.log(row)
|
|
||||||
// }
|
|
||||||
/** 修改按钮操作 */
|
|
||||||
function handleUpdate(row) {
|
|
||||||
reset();
|
|
||||||
idEdit.value = row.id
|
|
||||||
getStock(row.id).then(response => {
|
|
||||||
let dataInfo = response.data
|
|
||||||
dataInfo.isnew = true
|
|
||||||
storeData.value.rkType = dataInfo.rkType
|
|
||||||
storeData.value.wlType = dataInfo.wlType
|
|
||||||
storeData.value.cangku = dataInfo.cangku
|
|
||||||
storeData.value.lihuoY = parseInt(dataInfo.lihuoY)
|
|
||||||
planList.value = [dataInfo]
|
|
||||||
// form.value = response.data;
|
|
||||||
open.value = true;
|
|
||||||
title.value = "修改库存单据";
|
|
||||||
});
|
|
||||||
}
|
|
||||||
function closeDialog(){
|
|
||||||
idEdit.value = 0
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// 撤销入库
|
|
||||||
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(() => {
|
|
||||||
getList();
|
|
||||||
proxy.$modal.msgSuccess("操作成功");
|
|
||||||
}).catch(() => {});
|
|
||||||
}
|
|
||||||
|
|
||||||
const dialogDelStock = ref(false)
|
|
||||||
const delStockFormRef = ref(null)
|
|
||||||
const delStockForm = ref({
|
|
||||||
billNo:''
|
|
||||||
})
|
|
||||||
const delStockRules = ref({
|
|
||||||
billNo: [{ required: true, message: '请输入单据号', trigger: ['blur'] }],
|
|
||||||
})
|
|
||||||
const submitDelStock = () => {
|
|
||||||
proxy.$refs["delStockFormRef"].validate(valid => {
|
|
||||||
if (valid){
|
|
||||||
wisdomDelStock(delStockForm.value.billNo).then(response=>{
|
|
||||||
if(response.code==200){
|
|
||||||
proxy.$modal.msgSuccess("操作成功");
|
|
||||||
//数据列表
|
|
||||||
getList();
|
|
||||||
dialogDelStock.value = false
|
|
||||||
}else{
|
|
||||||
proxy.$modal.msgError("操作失败");
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
|
||||||
const cancelDelStock = () => {
|
|
||||||
dialogDelStock.value = false
|
|
||||||
}
|
|
||||||
/** 导出按钮操作 */
|
|
||||||
function handleExport() {
|
|
||||||
proxy.download('wisdom/stock/export', {
|
|
||||||
...queryParams.value
|
|
||||||
}, `stock_${new Date().getTime()}.xlsx`)
|
|
||||||
}
|
|
||||||
|
|
||||||
//数据列表
|
|
||||||
getList();
|
|
||||||
//库位下拉数据
|
|
||||||
pcodeList()
|
|
||||||
//所属仓库
|
|
||||||
warehouseFun()
|
|
||||||
//物资类型
|
|
||||||
materialFun()
|
|
||||||
//是否开启审核
|
|
||||||
isAudit()
|
|
||||||
//入库类型下拉数据
|
|
||||||
rklxList()
|
|
||||||
//理货员下拉数据
|
|
||||||
lhyList()
|
|
||||||
</script>
|
|
||||||
<style scoped>
|
|
||||||
.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);
|
|
||||||
}
|
|
||||||
.titleBox{
|
|
||||||
text-align: center;
|
|
||||||
}
|
|
||||||
.topBox{
|
|
||||||
margin-bottom: 10px;
|
|
||||||
display: flex;
|
|
||||||
}
|
|
||||||
.bottomBox{
|
|
||||||
margin-top: 20px;
|
|
||||||
}
|
|
||||||
.oneLineBox{
|
|
||||||
display: flex;
|
|
||||||
}
|
|
||||||
.everyBox{
|
|
||||||
width: 30%;
|
|
||||||
}
|
|
||||||
.examine{
|
|
||||||
margin-top: 20px;
|
|
||||||
height: 100px;
|
|
||||||
background-color: #ededed;
|
|
||||||
padding: 20px 0 0 20px;
|
|
||||||
border-radius: 10px;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
|
|
||||||
@@ -1273,6 +1273,10 @@ const billAllObj = ref([]); // 单据数据
|
|||||||
const outboundList = ref([]);
|
const outboundList = ref([]);
|
||||||
const getDetailList = (type) => {
|
const getDetailList = (type) => {
|
||||||
listOutStock(billDoubleClickObj.value.billNo).then((response) => {
|
listOutStock(billDoubleClickObj.value.billNo).then((response) => {
|
||||||
|
if (response.data.length == 0) {
|
||||||
|
proxy.$modal.msgError("该条入库单暂无明细");
|
||||||
|
return;
|
||||||
|
}
|
||||||
if (type == "bill") {
|
if (type == "bill") {
|
||||||
billAllObj.value = response.data;
|
billAllObj.value = response.data;
|
||||||
dialogBill.value = true;
|
dialogBill.value = true;
|
||||||
|
|||||||
@@ -1,531 +0,0 @@
|
|||||||
<template>
|
|
||||||
<div class="app-container">
|
|
||||||
<el-form :model="queryParams" ref="queryRef" v-show="showSearch" label-width="90">
|
|
||||||
<el-row >
|
|
||||||
<el-col :span="7">
|
|
||||||
<el-form-item label="出库时间" prop="rkTime">
|
|
||||||
<!-- <el-date-picker clearable
|
|
||||||
v-model="queryParams.rkTime"
|
|
||||||
type="date"
|
|
||||||
style="width: 100%;"
|
|
||||||
value-format="YYYY-MM-DD"
|
|
||||||
placeholder="请选择出库时间">
|
|
||||||
</el-date-picker> -->
|
|
||||||
<el-date-picker
|
|
||||||
v-model="rkTime"
|
|
||||||
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="4">
|
|
||||||
<el-form-item label="项目号" prop="xmNo">
|
|
||||||
<el-input
|
|
||||||
v-model="queryParams.xmNo"
|
|
||||||
placeholder="请输入项目号"
|
|
||||||
clearable
|
|
||||||
@keyup.enter="handleQuery"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="4">
|
|
||||||
<el-form-item label="订单编号" prop="sapNo">
|
|
||||||
<el-input
|
|
||||||
v-model="queryParams.sapNo"
|
|
||||||
placeholder="请输入订单编号"
|
|
||||||
clearable
|
|
||||||
@keyup.enter="handleQuery"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="4">
|
|
||||||
<el-form-item label="单据号" prop="billNo">
|
|
||||||
<el-input
|
|
||||||
v-model="queryParams.billNo"
|
|
||||||
placeholder="请输入单据号"
|
|
||||||
clearable
|
|
||||||
@keyup.enter="handleQuery"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="4">
|
|
||||||
<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="4">
|
|
||||||
<el-form-item label="所属仓库" prop="cangku">
|
|
||||||
<el-select v-model="queryParams.cangku" placeholder="请选择仓库" clearable >
|
|
||||||
<el-option v-for="dict in warehouseList" :key="dict.id" :label="dict.warehouseName" :value="dict.warehouseCode" />
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col> -->
|
|
||||||
</el-row>
|
|
||||||
<el-row >
|
|
||||||
<el-col :span="7">
|
|
||||||
<el-form-item label="项目描述" prop="xmMs">
|
|
||||||
<el-input
|
|
||||||
v-model="queryParams.xmMs"
|
|
||||||
placeholder="请输入项目描述"
|
|
||||||
clearable
|
|
||||||
@keyup.enter="handleQuery"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="4">
|
|
||||||
<el-form-item label="物料号" prop="wlNo">
|
|
||||||
<el-input
|
|
||||||
v-model="queryParams.wlNo"
|
|
||||||
placeholder="请输入物料号"
|
|
||||||
clearable
|
|
||||||
@keyup.enter="handleQuery"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="4">
|
|
||||||
<el-form-item label="物资类型" prop="wlType">
|
|
||||||
<el-select v-model="queryParams.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="4">
|
|
||||||
<el-form-item label="供应商编码" prop="gysNo">
|
|
||||||
<el-input
|
|
||||||
v-model="queryParams.gysNo"
|
|
||||||
placeholder="请输入供应商编码"
|
|
||||||
clearable
|
|
||||||
@keyup.enter="handleQuery"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col> -->
|
|
||||||
<el-col :span="4">
|
|
||||||
<el-form-item label="库位码" prop="pcode">
|
|
||||||
<el-input
|
|
||||||
v-model="queryParams.pcode"
|
|
||||||
placeholder="请输入库位码"
|
|
||||||
clearable
|
|
||||||
@keyup.enter="handleQuery"
|
|
||||||
/>
|
|
||||||
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="4">
|
|
||||||
<el-form-item label="物料描述" prop="wlMs">
|
|
||||||
<el-input
|
|
||||||
v-model="queryParams.wlMs"
|
|
||||||
placeholder="请输入物料描述"
|
|
||||||
clearable
|
|
||||||
@keyup.enter="handleQuery"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
<el-row>
|
|
||||||
<el-col :span="7">
|
|
||||||
<el-form-item label="供应商名称" prop="gysMc">
|
|
||||||
<el-input
|
|
||||||
v-model="queryParams.gysMc"
|
|
||||||
placeholder="请输入供应商名称"
|
|
||||||
clearable
|
|
||||||
@keyup.enter="handleQuery"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
|
|
||||||
|
|
||||||
<!-- <el-col :span="4">
|
|
||||||
<el-form-item label="所属仓库" prop="cangku">
|
|
||||||
<el-select v-model="queryParams.cangku" placeholder="请选择仓库" clearable >
|
|
||||||
<el-option v-for="dict in warehouseList" :key="dict.id" :label="dict.warehouseName" :value="dict.warehouseCode" />
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col> -->
|
|
||||||
<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-row :gutter="10" class="mb8">
|
|
||||||
<el-col :span="1.5">
|
|
||||||
<el-button
|
|
||||||
type="danger"
|
|
||||||
plain
|
|
||||||
icon="Delete"
|
|
||||||
@click="handleDel"
|
|
||||||
>删除</el-button>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="1.5">
|
|
||||||
<el-button
|
|
||||||
type="primary"
|
|
||||||
plain
|
|
||||||
icon="Plus"
|
|
||||||
@click="handleStore"
|
|
||||||
>一键出库</el-button>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
|
|
||||||
|
|
||||||
<el-table v-loading="loading" :data="outboundList" @selection-change="selectionChange" border show-overflow-tooltip>
|
|
||||||
<el-table-column type="selection" width="55" align="center" />
|
|
||||||
<!-- <el-table-column label="主键ID" align="center" prop="id" />-->
|
|
||||||
<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="xmNo" width="150"/>
|
|
||||||
<el-table-column label="项目描述" align="center" prop="xmMs" width="150"/>
|
|
||||||
<el-table-column label="物料号" align="center" prop="wlNo" width="100"/>
|
|
||||||
<el-table-column label="物料描述" 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="jhAmt" width="120"/>
|
|
||||||
<el-table-column label="合同单价" align="center" prop="htDj" />
|
|
||||||
|
|
||||||
<!-- <el-table-column label="行号" align="center" prop="xh" /> -->
|
|
||||||
<el-table-column label="计划交货数量" align="center" prop="jhQty" width="120"/>
|
|
||||||
<!-- <el-table-column label="合同数量" align="center" prop="htQty" /> -->
|
|
||||||
<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="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="trayCode" />
|
|
||||||
<el-table-column label="身份码" align="center" prop="entityId" width="150"/>
|
|
||||||
<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="ckRemark" width="150"/>
|
|
||||||
<!-- <el-table-column label="操作" align="center" fixed="right" class-name="small-padding fixed-width" width="130">
|
|
||||||
<template #default="scope">
|
|
||||||
<el-button link type="primary" icon="Edit" @click="handleUpdate(scope.row)">出库</el-button>
|
|
||||||
<el-button
|
|
||||||
link
|
|
||||||
type="primary"
|
|
||||||
icon="Delete"
|
|
||||||
@click="handleStockDelete(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-dialog v-model="dialogVisible">
|
|
||||||
<img w-full :src="dialogImageUrl" alt="Preview Image" />
|
|
||||||
</el-dialog>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script setup name="outrevoke">
|
|
||||||
import { listOutrevoke,delStore,storeFun} from "@/api/wisdom/outrevoke";
|
|
||||||
import {listOuttype} from "@/api/information/outtype"; //出库类型
|
|
||||||
import {listConstruction} from "@/api/information/construction"; //施工队
|
|
||||||
import {warehouseDict} 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} from "@/api/wisdom/stock";
|
|
||||||
import { getToken } from "@/utils/auth";
|
|
||||||
|
|
||||||
|
|
||||||
const headers = ref({
|
|
||||||
Authorization: "Bearer " + getToken()
|
|
||||||
});
|
|
||||||
const { proxy } = getCurrentInstance();
|
|
||||||
|
|
||||||
const outboundList = ref([]);
|
|
||||||
const open = ref(false);
|
|
||||||
const loading = ref(true);
|
|
||||||
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 rkTime = 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 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 data = reactive({
|
|
||||||
form: {},
|
|
||||||
storeData:{}, //出库数据
|
|
||||||
queryParams: {
|
|
||||||
pageNum: 1,
|
|
||||||
pageSize: 10,
|
|
||||||
isChuku:5,
|
|
||||||
// rkTime:"", //出库时间
|
|
||||||
lyStartTime:null,
|
|
||||||
lyEndTime:null,
|
|
||||||
xmNo:"",
|
|
||||||
sapNo:"",
|
|
||||||
billNo:"",
|
|
||||||
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,
|
|
||||||
},
|
|
||||||
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" }]
|
|
||||||
},
|
|
||||||
|
|
||||||
});
|
|
||||||
|
|
||||||
const { queryParams, storeData, rules,form,outQueryParams } = toRefs(data);
|
|
||||||
|
|
||||||
//多选
|
|
||||||
function selectionChange(selection){
|
|
||||||
ids.value = selection.map(item => item.id)
|
|
||||||
}
|
|
||||||
//删除
|
|
||||||
function handleDel(){
|
|
||||||
if(ids.value.length==0){
|
|
||||||
proxy.$modal.msgError("请勾选数据");
|
|
||||||
return
|
|
||||||
}
|
|
||||||
// console.log(ids.value)
|
|
||||||
// return
|
|
||||||
delStore(ids.value).then(response=>{
|
|
||||||
getList();
|
|
||||||
proxy.$modal.msgSuccess("操作成功");
|
|
||||||
})
|
|
||||||
// console.log(ids.value)
|
|
||||||
}
|
|
||||||
//一键入库
|
|
||||||
function handleStore(){
|
|
||||||
if(ids.value.length==0){
|
|
||||||
proxy.$modal.msgError("请勾选数据");
|
|
||||||
return
|
|
||||||
}
|
|
||||||
storeFun(ids.value).then(response=>{
|
|
||||||
getList();
|
|
||||||
proxy.$modal.msgSuccess("操作成功");
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
function preview(url){
|
|
||||||
srcList.value = [url]
|
|
||||||
}
|
|
||||||
//预览图片
|
|
||||||
function handlePreview(uploadFile){
|
|
||||||
// console.log(222222)
|
|
||||||
// console.log(res)
|
|
||||||
dialogImageUrl.value = uploadFile.response.url
|
|
||||||
dialogVisible.value = true
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/** 查询库存单据主列表 */
|
|
||||||
function getList() {
|
|
||||||
loading.value = true;
|
|
||||||
listOutrevoke(queryParams.value).then(response => {
|
|
||||||
outboundList.value = response.rows;
|
|
||||||
total.value = response.total;
|
|
||||||
loading.value = false;
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// 表单重置
|
|
||||||
function reset() {
|
|
||||||
planList.value = []
|
|
||||||
storeData.value = {}
|
|
||||||
orderNum.value = ""
|
|
||||||
proxy.resetForm("stockRef");
|
|
||||||
}
|
|
||||||
|
|
||||||
/** 搜索按钮操作 */
|
|
||||||
function handleQuery() {
|
|
||||||
if(rkTime.value && rkTime.value.length>0){
|
|
||||||
queryParams.value.lyStartTime = rkTime.value[0]
|
|
||||||
queryParams.value.lyEndTime = rkTime.value[1]
|
|
||||||
}else{
|
|
||||||
queryParams.value.lyStartTime = ""
|
|
||||||
queryParams.value.lyEndTime = ""
|
|
||||||
}
|
|
||||||
queryParams.value.pageNum = 1;
|
|
||||||
getList();
|
|
||||||
}
|
|
||||||
|
|
||||||
/** 重置按钮操作 */
|
|
||||||
function resetQuery() {
|
|
||||||
proxy.resetForm("queryRef");
|
|
||||||
rkTime.value = []
|
|
||||||
handleQuery();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/** 新增按钮操作 */
|
|
||||||
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
|
|
||||||
})
|
|
||||||
|
|
||||||
}
|
|
||||||
//物资类型下拉数据
|
|
||||||
function wzTypeFun(){
|
|
||||||
materialtypeDict().then(response=>{
|
|
||||||
wzlxList.value = response.data
|
|
||||||
})
|
|
||||||
}
|
|
||||||
//所属仓库下拉数据
|
|
||||||
function cangkuFun(){
|
|
||||||
warehouseDict().then(response=>{
|
|
||||||
warehouseList.value = response.data
|
|
||||||
})
|
|
||||||
}
|
|
||||||
function ckTypeFun(){
|
|
||||||
listOuttype({pageNum:1,pageSize:50}).then(response=>{
|
|
||||||
storeTypeList.value = response.rows
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//判断是否需要开启审核功能
|
|
||||||
function isAudit(){
|
|
||||||
// {configKey:"stock.audit.enabled"}
|
|
||||||
getAudit().then(response=>{
|
|
||||||
// console.log(2222222)
|
|
||||||
// console.log(response.msg)
|
|
||||||
isExamine.value = response.msg
|
|
||||||
})
|
|
||||||
}
|
|
||||||
isAudit()
|
|
||||||
getList();
|
|
||||||
ckTypeFun()
|
|
||||||
wzTypeFun()
|
|
||||||
cangkuFun()
|
|
||||||
</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);
|
|
||||||
}
|
|
||||||
.titleBox{
|
|
||||||
text-align: center;
|
|
||||||
margin-bottom: 20px;
|
|
||||||
}
|
|
||||||
.topBox{
|
|
||||||
display: flex;
|
|
||||||
}
|
|
||||||
.topEveryBox{
|
|
||||||
width: 30%;
|
|
||||||
}
|
|
||||||
.tableBox{
|
|
||||||
margin-top: 10px;
|
|
||||||
}
|
|
||||||
.oneLineBox{
|
|
||||||
display: flex;
|
|
||||||
}
|
|
||||||
.everyBox{
|
|
||||||
width: 25%;
|
|
||||||
}
|
|
||||||
.bottomBox{
|
|
||||||
margin-top: 10px;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
|
|
||||||
Reference in New Issue
Block a user