完成
This commit is contained in:
@@ -1,5 +1,14 @@
|
||||
import request from '@/utils/request'
|
||||
// 还料入库保存
|
||||
import request from "@/utils/request";
|
||||
|
||||
// 还料
|
||||
export function returnBill(data) {
|
||||
return request({
|
||||
url: "/wisdom/bill/borrow/return",
|
||||
method: "post",
|
||||
data: data,
|
||||
});
|
||||
}
|
||||
|
||||
export function returnSubmit(data) {
|
||||
return request({
|
||||
url: '/wisdom/stock/refund',
|
||||
|
||||
@@ -9,7 +9,7 @@ export function listRecord(query) {
|
||||
})
|
||||
}
|
||||
|
||||
// 查询移库记录列表
|
||||
// 撤销移库
|
||||
export function delMove(id) {
|
||||
return request({
|
||||
url: '/inventory/move/rollback/' + id,
|
||||
|
||||
@@ -1,26 +1,19 @@
|
||||
import request from '@/utils/request'
|
||||
import request from "@/utils/request";
|
||||
|
||||
// 查询列表
|
||||
export function listStock(data) {
|
||||
return request({
|
||||
// url: '/wisdom/stock/page',
|
||||
// url: '/wisdom/stock/pageStatistics',
|
||||
// url: '/wisdom/stock/pageList',
|
||||
url: '/wisdom/record/list',
|
||||
method: 'get',
|
||||
params: data
|
||||
})
|
||||
url: "/wisdom/record/list",
|
||||
method: "get",
|
||||
params: data,
|
||||
});
|
||||
}
|
||||
export function listSearch(data) {
|
||||
|
||||
// 查询统计
|
||||
export function getTotal(data) {
|
||||
return request({
|
||||
// url: '/wisdom/stock/page',
|
||||
url: '/wisdom/stock/pageStatistics',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
export function getSumInfoI(data) {
|
||||
return request({
|
||||
url: '/stat/statistics',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
url: "/wisdom/record/statistic",
|
||||
method: "post",
|
||||
data: data,
|
||||
});
|
||||
}
|
||||
|
||||
@@ -18,6 +18,15 @@ export function editStock(data) {
|
||||
})
|
||||
}
|
||||
|
||||
// 统计
|
||||
export function getTotal(data) {
|
||||
return request({
|
||||
url: '/wisdom/stock/statistic',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
|
||||
export function printTag(data){
|
||||
|
||||
20
src/assets/styles/common.css
Normal file
20
src/assets/styles/common.css
Normal file
@@ -0,0 +1,20 @@
|
||||
:root {
|
||||
--mineTable-notFinish-bg-color: #c7ffa5;
|
||||
--mineTable-click-bg-color: #d2f0ff;
|
||||
}
|
||||
|
||||
:deep(.el-table .success-row) {
|
||||
background-color: var(--mineTable-notFinish-bg-color) !important;
|
||||
}
|
||||
|
||||
:deep(.el-table__body tr.current-row>td.el-table__cell) {
|
||||
background-color: var(--mineTable-click-bg-color) !important;
|
||||
}
|
||||
|
||||
/* :deep(.el-table__body tr.hover-row>td.el-table__cell){
|
||||
background-color: unset !important;
|
||||
}
|
||||
|
||||
.el-table {
|
||||
--el-table-row-hover-bg-color: transparent;
|
||||
} */
|
||||
@@ -2,6 +2,8 @@ import { createApp } from 'vue'
|
||||
|
||||
import Cookies from 'js-cookie'
|
||||
|
||||
import '@/assets/styles/common.css'
|
||||
|
||||
import ElementPlus from 'element-plus'
|
||||
import 'element-plus/dist/index.css'
|
||||
import 'element-plus/theme-chalk/dark/css-vars.css'
|
||||
|
||||
@@ -50,7 +50,7 @@
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-table v-loading="loading" :data="billList" :row-class-name="tableBillRowClassName" @row-dblclick="billClick"
|
||||
<el-table v-loading="loading" ref="billTableRef" :data="billList" highlight-current-row @row-click="tableBillRowClick" :row-class-name="tableBillRowClassName" @row-dblclick="billClick"
|
||||
@current-change="uploadSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="单据号" align="center" prop="billNo" width="180" />
|
||||
@@ -1126,6 +1126,12 @@ const delData = (row) => {
|
||||
});
|
||||
}
|
||||
|
||||
// 单击单据
|
||||
const billTableRef = ref(null);
|
||||
const tableBillRowClick = (row, event, column) => {
|
||||
billTableRef.value.setCurrentRow(row)
|
||||
}
|
||||
|
||||
//双击单据,查询明细
|
||||
const billDoubleClickObj = ref({});
|
||||
const detailLoading = ref(false); //加载列表详情
|
||||
@@ -1705,16 +1711,6 @@ function isAudit() {
|
||||
isAudit();
|
||||
</script>
|
||||
<style scoped lang="scss">
|
||||
:deep(.el-table .success-row) {
|
||||
background-color: #f8fdf5 !important;
|
||||
}
|
||||
|
||||
.el-table {
|
||||
/* 核心:把 hover 背景色设为和默认行背景色一致 */
|
||||
// --el-table-row-hover-bg-color: transparent;
|
||||
/* 或设为和表格背景色相同(比如白色),更通用 */
|
||||
/* --el-table-row-hover-bg-color: #ffffff; */
|
||||
}
|
||||
|
||||
.printMeBox {
|
||||
div {
|
||||
|
||||
@@ -83,7 +83,7 @@
|
||||
<span>{{ parseTime(scope.row.borrowTime, '{y}-{m}-{d}') }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="理货员" align="center" prop="operator" />
|
||||
<el-table-column label="理货员" align="center" prop="operatorName" />
|
||||
<el-table-column label="备注" align="center" prop="remark" width="150" />
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template #default="scope">
|
||||
@@ -208,18 +208,12 @@
|
||||
</div>
|
||||
</template>
|
||||
</el-dialog>
|
||||
<!-- //还料弹框 -->
|
||||
<!-- 还料弹框 -->
|
||||
<el-dialog title="还料" v-model="returnOpen" append-to-body width="40%">
|
||||
<el-form ref="returnRef" :model="returnData" label-width="100px">
|
||||
<el-form-item label="所属仓库" prop="warehouseCode">
|
||||
<el-cascader :options="warehouseData" style="width: 100%;" v-model="returnData.warehouseCode"
|
||||
@change="pcodeList" :props="{ children: 'children', label: 'warehouseName', value: 'warehouseCode' }"
|
||||
clearable />
|
||||
</el-form-item>
|
||||
<el-form-item label="库位">
|
||||
<el-select v-model="returnData.pcode" clearable :filterable="true" placeholder="请选择库位">
|
||||
<el-option v-for="item in kwOptions" :key="item.id" :label="item.pcode" :value="item.pcode" />
|
||||
</el-select>
|
||||
<el-form-item label="还料时间">
|
||||
<el-date-picker style="width: 100%" v-model="returnData.returnTime" value-format="YYYY-MM-DD HH:mm:ss"
|
||||
format="YYYY-MM-DD HH:mm:ss" type="datetime" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<template #footer>
|
||||
@@ -233,7 +227,7 @@
|
||||
</template>
|
||||
|
||||
<script setup name="outbound">
|
||||
import { returnSubmit ,listStockByXm} from "@/api/wisdom/borrow"; //列表
|
||||
import { returnBill ,listStockByXm} from "@/api/wisdom/borrow"; //列表
|
||||
import { warehouseAll } from "@/api/information/warehouseinfo";
|
||||
import { listOuttype } from "@/api/information/outtype"; //出库类型
|
||||
import { listConstruction } from "@/api/information/construction"; //施工队
|
||||
@@ -248,7 +242,7 @@ const { proxy } = getCurrentInstance();
|
||||
|
||||
const outboundList = ref([]);
|
||||
const open = ref(false);
|
||||
const returnOpen = ref(false)
|
||||
|
||||
const loading = ref(true);
|
||||
const showSearch = ref(true);
|
||||
const ids = ref([]);
|
||||
@@ -273,11 +267,6 @@ const data = reactive({
|
||||
storeData: {
|
||||
ckType: "JLCK"
|
||||
}, //借料数据
|
||||
returnData: {
|
||||
originalId: null,
|
||||
pcode: "",
|
||||
rkType: "RK029" //入库类型:借料归还入库
|
||||
}, //还料数据
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
@@ -319,7 +308,7 @@ const data = reactive({
|
||||
}
|
||||
});
|
||||
|
||||
const { queryParams, storeData, rules, form, printViewInfo, outQueryParams, returnData } = toRefs(data);
|
||||
const { queryParams, storeData, rules, form, printViewInfo, outQueryParams } = toRefs(data);
|
||||
|
||||
const statusList = ref([
|
||||
{ value: 1, label: '未还料', elTagType: "danger", elTagClass: null },
|
||||
@@ -342,6 +331,7 @@ function getList() {
|
||||
loading.value = false;
|
||||
});
|
||||
}
|
||||
getList();
|
||||
|
||||
// 取消按钮
|
||||
function cancel() {
|
||||
@@ -485,29 +475,39 @@ function submitForm() {
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
const returnId = ref([])
|
||||
const returnData = ref({})
|
||||
const returnOpen = ref(false)
|
||||
//打开还料弹框
|
||||
function handleReturn(row) {
|
||||
returnData.value.pcode = row.pcode
|
||||
returnData.value.warehouseCode = [row.parentWarehouseCode, row.warehouseCode]
|
||||
returnData.value.originalId = row.id
|
||||
console.log(returnData.value)
|
||||
returnId.value[0] = row.id
|
||||
returnData.value.returnTime = ''
|
||||
returnOpen.value = true
|
||||
}
|
||||
//取消还料弹框
|
||||
function cancelReturn() {
|
||||
returnOpen.value = false
|
||||
}
|
||||
//还料保存
|
||||
function returnForm() {
|
||||
let obj = JSON.parse(JSON.stringify(returnData.value))
|
||||
obj.warehouseCode = returnData.value.warehouseCode[1]
|
||||
returnSubmit(obj).then(response => {
|
||||
if (!returnData.value.returnTime) {
|
||||
proxy.$modal.msgError("请选择还料时间");
|
||||
return
|
||||
}
|
||||
let ids = JSON.parse(JSON.stringify(returnId.value))
|
||||
let items = ids.map(item => {
|
||||
return {
|
||||
recordId: item,
|
||||
returnTime: returnData.value.returnTime
|
||||
}
|
||||
});
|
||||
returnBill({items}).then(response => {
|
||||
proxy.$modal.msgSuccess("操作成功");
|
||||
returnOpen.value = false;
|
||||
getList();
|
||||
});
|
||||
}
|
||||
// //库位字典
|
||||
//取消还料弹框
|
||||
function cancelReturn() {
|
||||
returnOpen.value = false
|
||||
}
|
||||
|
||||
|
||||
/** 导出按钮操作 */
|
||||
@@ -534,7 +534,7 @@ function pcodeList(value) {
|
||||
})
|
||||
}
|
||||
|
||||
getList();
|
||||
|
||||
|
||||
</script>
|
||||
<style scoped lang="scss">
|
||||
|
||||
@@ -1543,9 +1543,6 @@ function submitDispatch() {
|
||||
}
|
||||
</script>
|
||||
<style scoped>
|
||||
:deep(.el-table .success-row) {
|
||||
background-color: #fffbf6 !important;
|
||||
}
|
||||
.printMeBox {
|
||||
div {
|
||||
line-height: 30px;
|
||||
|
||||
@@ -1,14 +1,6 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-form :model="queryParams" ref="queryRef" v-show="showSearch" >
|
||||
<!-- <el-form-item label="所属仓库" prop="cangku">-->
|
||||
<!-- <el-input-->
|
||||
<!-- v-model="queryParams.cangku"-->
|
||||
<!-- placeholder="请输入所属仓库"-->
|
||||
<!-- clearable-->
|
||||
<!-- @keyup.enter="handleQuery"-->
|
||||
<!-- />-->
|
||||
<!-- </el-form-item>-->
|
||||
<el-row :gutter="40">
|
||||
<el-col :span="5">
|
||||
<el-form-item label="还料时间" prop="returnTime">
|
||||
@@ -84,7 +76,6 @@
|
||||
|
||||
<el-table v-loading="loading" :data="outboundList" @selection-change="printSelectionChange" 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"/>
|
||||
@@ -108,7 +99,7 @@
|
||||
<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="operationTypeName" width="150"/>
|
||||
<!-- <el-table-column label="物资类型" align="center" prop="wlTypeName" />-->
|
||||
<el-table-column label="借料时间" align="center" width="100">
|
||||
<template #default="scope">
|
||||
@@ -121,12 +112,7 @@
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- <el-table-column label="理货员" align="center" prop="ckLihuoY" />
|
||||
<el-table-column label="备注" align="center" prop="ckRemark" width="200"/>
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template #default="scope">
|
||||
<el-button v-show="scope.row.isBorrowed==1" link type="primary" icon="Edit" @click="handleReturn(scope.row)" v-hasPermi="['wisdom:stock:add']">还料</el-button>
|
||||
</template>
|
||||
</el-table-column> -->
|
||||
<el-table-column label="备注" align="center" prop="ckRemark" width="200"/> -->
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
@@ -226,122 +212,58 @@
|
||||
</template>
|
||||
|
||||
<script setup name="outbound">
|
||||
import { listOutbound} from "@/api/wisdom/return"; //列表
|
||||
import {listOuttype} from "@/api/information/outtype"; //出库类型
|
||||
import {listConstruction} from "@/api/information/construction"; //施工队
|
||||
// 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'
|
||||
|
||||
import { listStock } from "@/api/wisdom/record";
|
||||
|
||||
const { proxy } = getCurrentInstance();
|
||||
|
||||
const outboundList = ref([]);
|
||||
const open = ref(false);
|
||||
const returnOpen = 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 storeTypeList = ref([]); //出库类型下拉数据
|
||||
const wzTypeList = ref([]); //施工队下拉数据
|
||||
|
||||
const personList = ref([]); //理货员下拉数据
|
||||
const orderNum = ref("") //搜索条件:订单号
|
||||
const showContent = ref(false); // 控制打印内容是否显示
|
||||
const dateStr = ref("") //打印单据生成的日期
|
||||
const printList = ref([]) //要打印的数据列表
|
||||
const kwOptions = ref([]); //库位下拉
|
||||
const returnTime = ref([]);
|
||||
const data = reactive({
|
||||
form: {},
|
||||
storeData:{
|
||||
ckType:"JLCK"
|
||||
}, //借料数据
|
||||
returnData:{
|
||||
originalId:null,
|
||||
pcode:"",
|
||||
rkType:"RK029" //入库类型:借料归还入库
|
||||
}, //还料数据
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
// isChuku:0, //入库,固定传0
|
||||
// rkType:"RK029", //入库类型:还料入库
|
||||
returnTime:"", //还料时间
|
||||
isBorrowed: "2",
|
||||
xmNo:"",
|
||||
sapNo:"",
|
||||
billNo:"",
|
||||
ids: []
|
||||
},
|
||||
outQueryParams:{
|
||||
xmNo:"",
|
||||
wlNo:"",
|
||||
sapNo:"",
|
||||
pageNum:1,
|
||||
pageSize:50,
|
||||
isChuku:0,
|
||||
},
|
||||
rules: {
|
||||
ckType: [{ required: true, message: "出库类型不能为空", trigger: "change" }],
|
||||
teamCode: [{ required: true, message: "施工队不能为空", trigger: "change" }],
|
||||
borrowTime: [{ required: true, message: "借用时间不能为空", trigger: "change" }],
|
||||
ckLihuoY: [{ required: true, message: "理货员不能为空", trigger: "change" }]
|
||||
},
|
||||
printViewInfo: {
|
||||
id: "printMe", //打印区域的唯一的id属性
|
||||
popTitle: '入库信息打印', // 页眉文字 (不设置时显示undifined)(页眉页脚可以在打印页面的更多设置的选项中取消勾选)
|
||||
|
||||
|
||||
beforeOpenCallback () {
|
||||
showContent.value = false;
|
||||
}, // 开始打印之前的callback
|
||||
openCallback () { }, // 调用打印时的callback
|
||||
closeCallback () { }, // 关闭打印的callback(无法区分确认or取消)
|
||||
clickMounted () { },
|
||||
|
||||
pageOrientation: 'portrait', // 打印方向,portrait-纵向,landscape-横向
|
||||
standard: '',
|
||||
extarCss: ''
|
||||
}
|
||||
});
|
||||
|
||||
const { queryParams, storeData, rules,form,printViewInfo,outQueryParams,returnData } = toRefs(data);
|
||||
const { queryParams, printViewInfo } = toRefs(data);
|
||||
|
||||
|
||||
|
||||
/** 查询库存单据主列表 */
|
||||
function getList() {
|
||||
loading.value = true;
|
||||
listOutbound(queryParams.value).then(response => {
|
||||
listStock(queryParams.value).then(response => {
|
||||
outboundList.value = response.rows;
|
||||
total.value = response.total;
|
||||
loading.value = false;
|
||||
});
|
||||
}
|
||||
|
||||
// 取消按钮
|
||||
function cancel() {
|
||||
open.value = false;
|
||||
reset();
|
||||
}
|
||||
|
||||
// 表单重置
|
||||
function reset() {
|
||||
planList.value = []
|
||||
storeData.value = {
|
||||
ckType:"JLCK"
|
||||
}
|
||||
orderNum.value = ""
|
||||
proxy.resetForm("stockRef");
|
||||
}
|
||||
|
||||
/** 搜索按钮操作 */
|
||||
function handleQuery() {
|
||||
@@ -363,10 +285,6 @@
|
||||
handleQuery();
|
||||
}
|
||||
|
||||
//出库 多选框选中数据
|
||||
function handleSelectionChange(selection) {
|
||||
ids.value = selection.map(info=>info.id)
|
||||
}
|
||||
//打印单据 多选框选中数据
|
||||
function printSelectionChange(selection){
|
||||
printList.value = selection
|
||||
@@ -389,156 +307,8 @@
|
||||
dateStr.value = year+"-"+month+"-"+day+" "+hour+":"+minute+":"+second
|
||||
showContent.value = true
|
||||
}
|
||||
/** 新增按钮操作 */
|
||||
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
|
||||
})
|
||||
|
||||
|
||||
}
|
||||
//查询库存中数据 搜索
|
||||
function searchPlan(){
|
||||
// if(!orderNum.value){
|
||||
// proxy.$modal.msgWarning("请输入项目编号或者订单号");
|
||||
// return
|
||||
// }
|
||||
//查库存
|
||||
// let params = {
|
||||
// pageNum:1,
|
||||
// pageSize:50,
|
||||
// isChuku:0,
|
||||
// // xmNo:orderNum.value
|
||||
// keyword:orderNum.value
|
||||
// }
|
||||
if(!outQueryParams.value.xmNo && !outQueryParams.value.wlNo && !outQueryParams.value.sapNo){
|
||||
proxy.$modal.msgWarning("查询条件不能为空");
|
||||
return
|
||||
}
|
||||
listOutbound(outQueryParams.value).then(response=>{
|
||||
|
||||
// let planData = response.rows
|
||||
if(response.rows.length==0){
|
||||
proxy.$modal.msgWarning("库存无数据");
|
||||
planList.value = []
|
||||
}else{
|
||||
planList.value = response.rows
|
||||
}
|
||||
// console.log(planData)
|
||||
|
||||
// planLoading.value = false
|
||||
})
|
||||
|
||||
|
||||
}
|
||||
|
||||
// function selectKw(row){
|
||||
// console.log(row)
|
||||
// }
|
||||
/** 修改按钮操作 */
|
||||
// function handleUpdate(row) {
|
||||
// reset();
|
||||
// const _id = row.id || ids.value
|
||||
// getStock(_id).then(response => {
|
||||
// form.value = response.data;
|
||||
// open.value = true;
|
||||
// title.value = "修改库存单据主";
|
||||
// });
|
||||
// }
|
||||
|
||||
/** 借料出库 提交按钮 */
|
||||
function submitForm() {
|
||||
|
||||
// console.log(submitData);return
|
||||
// // /pc/wisdom/stock/add
|
||||
// console.log(planList);return
|
||||
proxy.$refs["stockRef"].validate(valid => {
|
||||
|
||||
if (valid) {
|
||||
// if(planList.value.filter(x=>x.realQty=="").length>0){
|
||||
// proxy.$modal.msgError("入库数量不能为空");
|
||||
// return
|
||||
// }
|
||||
// console.log(ids.value)
|
||||
if(ids.value.length==0){
|
||||
proxy.$modal.msgError("请勾选数据");
|
||||
return
|
||||
}
|
||||
let dataList = planList.value.filter(x=>ids.value.includes(x.id)).map(info=>({
|
||||
id:info.id,
|
||||
ckRemark:info.ckRemark
|
||||
}))
|
||||
// console.log(3333)
|
||||
// return
|
||||
let submitData = {
|
||||
borrowTime:storeData.value.borrowTime, //借用时间
|
||||
returnTime:storeData.value.returnTime, // 归还时间
|
||||
teamCode:storeData.value.teamCode, //施工队
|
||||
ckType:storeData.value.ckType, //出库类型
|
||||
ckLihuoY:storeData.value.ckLihuoY, //理货员
|
||||
xmNoCk:storeData.value.xmNoCk?storeData.value.xmNoCk:"", //原本要出的项目号
|
||||
xmMsCk:storeData.value.xmMsCk?storeData.value.xmMsCk:"", //原本要出的项目描述
|
||||
// rkList:planList.value
|
||||
ckList:dataList
|
||||
}
|
||||
// console.log(submitData)
|
||||
// return
|
||||
addOutbound(submitData).then(response => {
|
||||
proxy.$modal.msgSuccess("操作成功");
|
||||
open.value = false;
|
||||
getList();
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
//打开还料弹框
|
||||
function handleReturn(row){
|
||||
console.log(row)
|
||||
returnData.value.pcode = row.pcode
|
||||
returnData.value.originalId = row.id
|
||||
returnOpen.value = true
|
||||
}
|
||||
//取消还料弹框
|
||||
function cancelReturn(){
|
||||
returnOpen.value = false
|
||||
}
|
||||
//还料保存
|
||||
function returnForm(){
|
||||
returnSubmit(returnData.value).then(response => {
|
||||
proxy.$modal.msgSuccess("操作成功");
|
||||
returnOpen.value = false;
|
||||
getList();
|
||||
});
|
||||
}
|
||||
//库位字典
|
||||
function pcodeList(){
|
||||
getKwList().then(response=>{
|
||||
kwOptions.value = response.data
|
||||
})
|
||||
}
|
||||
/** 删除按钮操作 */
|
||||
// function handleDelete(row) {
|
||||
// const _ids = row.id || ids.value;
|
||||
// proxy.$modal.confirm('是否确认删除库存单据主编号为"' + _ids + '"的数据项?').then(function() {
|
||||
// return delStock(_ids);
|
||||
// }).then(() => {
|
||||
// getList();
|
||||
// proxy.$modal.msgSuccess("删除成功");
|
||||
// }).catch(() => {});
|
||||
// }
|
||||
|
||||
/** 导出按钮操作 */
|
||||
function handleExport() {
|
||||
@@ -548,8 +318,6 @@ function pcodeList(){
|
||||
}
|
||||
|
||||
getList();
|
||||
//库位下拉数据
|
||||
pcodeList()
|
||||
</script>
|
||||
<style scoped lang="scss">
|
||||
.el-table .warning-row {
|
||||
|
||||
@@ -319,10 +319,8 @@
|
||||
</template>
|
||||
|
||||
<script setup name="Stock">
|
||||
import {
|
||||
moveRecord,
|
||||
} from "@/api/wisdom/bill";
|
||||
import { listStock, editStock, printTag } from "@/api/wisdom/stock";
|
||||
import { moveRecord } from "@/api/wisdom/bill";
|
||||
import { listStock, getTotal, editStock, printTag } from "@/api/wisdom/stock";
|
||||
import { warehousingDict } from "@/api/information/warehousingtype"; //入库类型
|
||||
import { materialtypeDict } from "@/api/information/materialtype"; //物资类型
|
||||
import { warehouseAll } from "@/api/information/warehouseinfo"; //所属仓库
|
||||
@@ -334,10 +332,10 @@ import { parseTime } from '@/utils/manage'
|
||||
const { proxy } = getCurrentInstance();
|
||||
|
||||
|
||||
const loading = ref(true);
|
||||
|
||||
const showSearch = ref(true);
|
||||
|
||||
const total = ref(0);
|
||||
|
||||
|
||||
const warehouseCode = ref(''); //所属仓库下拉数据
|
||||
const printList = ref([]) //要打印的数据列表
|
||||
@@ -347,9 +345,7 @@ const optionTime = ref([]) //入库时间
|
||||
const dialogImageUrl = ref('')
|
||||
const dialogVisible = ref(false)
|
||||
|
||||
const totalMoney = ref(null)
|
||||
const pcodeCount = ref(null)
|
||||
const sumQty = ref(null)
|
||||
|
||||
|
||||
const printNum = ref(1) //打印机编号
|
||||
const printNumList = ref([
|
||||
@@ -397,6 +393,8 @@ const { queryParams, rules } = toRefs(data);
|
||||
|
||||
/** 查询库存单据主列表 */
|
||||
const stockList = ref([]);
|
||||
const total = ref(0);
|
||||
const loading = ref(true);
|
||||
function getList() {
|
||||
loading.value = true;
|
||||
listStock(queryParams.value).then(response => {
|
||||
@@ -405,15 +403,24 @@ function getList() {
|
||||
loading.value = false;
|
||||
});
|
||||
}
|
||||
getList();
|
||||
|
||||
// 获取总计
|
||||
const totalMoney = ref(null)
|
||||
const pcodeCount = ref(null)
|
||||
const sumQty = ref(null)
|
||||
function getSumInfo() {
|
||||
//统计信息
|
||||
//getSumInfoI(queryParams.value).then(response => {
|
||||
// totalMoney.value = response.sumMoney
|
||||
//pcodeCount.value = response.pcdeCount
|
||||
//sumQty.value = response.sumQty
|
||||
//});
|
||||
let rkInfo = JSON.parse(JSON.stringify(queryParams.value))
|
||||
delete rkInfo.pageNum
|
||||
delete rkInfo.pageSize
|
||||
getTotal({rkInfo: rkInfo}).then(response => {
|
||||
totalMoney.value = response.sumMoney
|
||||
pcodeCount.value = response.pcdeCount
|
||||
sumQty.value = response.sumQty
|
||||
});
|
||||
}
|
||||
getSumInfo()
|
||||
|
||||
//所属仓库字典
|
||||
const warehouseOptions = ref([]);
|
||||
@@ -422,22 +429,25 @@ function warehouseFun() {
|
||||
warehouseOptions.value = response.data
|
||||
})
|
||||
}
|
||||
warehouseFun()
|
||||
|
||||
//物资类型典
|
||||
//物资类型
|
||||
const wzTypeList = ref([]);
|
||||
function materialFun() {
|
||||
materialtypeDict().then(response => {
|
||||
wzTypeList.value = response.data
|
||||
})
|
||||
}
|
||||
materialFun()
|
||||
|
||||
//理货员典
|
||||
//理货员
|
||||
const personList = ref([]);
|
||||
function lhyList() {
|
||||
personListDict().then(response => {
|
||||
personList.value = response.data
|
||||
})
|
||||
}
|
||||
lhyList()
|
||||
|
||||
//入库类型典
|
||||
const storeTypeList = ref([]);
|
||||
@@ -446,6 +456,7 @@ function rklxList() {
|
||||
storeTypeList.value = response.data
|
||||
})
|
||||
}
|
||||
rklxList()
|
||||
|
||||
// 仓库下拉改变事件
|
||||
function onChangeToCangku (val){
|
||||
@@ -499,49 +510,6 @@ function handleExport() {
|
||||
}, `库存记录_${parseTime(new Date().getTime(), '{y}年{m}月{d}日 {h}_{i}_{s}')}.xlsx`)
|
||||
}
|
||||
|
||||
//打印标签
|
||||
function handlePrintTag() {
|
||||
if (printList.value.length == 0) {
|
||||
proxy.$modal.msgError("请勾选数据");
|
||||
return
|
||||
}
|
||||
if (!printNum.value) {
|
||||
proxy.$modal.msgError("请选择打印机编号");
|
||||
return
|
||||
}
|
||||
for (let i = 0; i < printList.value.length; i++) {
|
||||
printList.value[i].printer = printNum.value
|
||||
}
|
||||
|
||||
printTag(printList.value).then(response => {
|
||||
if (response.code == 200) {
|
||||
proxy.$modal.msgSuccess("打印指令已发送");
|
||||
} else {
|
||||
proxy.$modal.msgError("操作失败");
|
||||
}
|
||||
})
|
||||
}
|
||||
function getSummaries(param) {
|
||||
const { columns, data } = param;
|
||||
// console.log(columns)
|
||||
const sums = [];
|
||||
columns.forEach((column, index) => {
|
||||
if (index === 1) { // 第一列不进行合计操作,通常是序列号或选择框等非数值列。
|
||||
sums[index] = '总计'; // 这里可以设置为其他文字或空字符串。
|
||||
return;
|
||||
} else if (index === 2) { // 第二列是金额列,进行求和操作。
|
||||
sums[index] = '总金额:' + totalMoney.value;
|
||||
// }else if(index === 2){
|
||||
// sums[index] = totalMoney.value
|
||||
} else if (index === 3) {
|
||||
sums[index] = '共存于:' + pcodeCount.value + '个库位'
|
||||
} else if (index === 4) {
|
||||
sums[index] = '总数:' + sumQty.value
|
||||
}
|
||||
})
|
||||
return sums
|
||||
}
|
||||
|
||||
// 移库弹框
|
||||
const openMove = ref(false); //移库
|
||||
const checkStockList = ref([]); //移库数据
|
||||
@@ -635,18 +603,53 @@ function editForm() {
|
||||
})
|
||||
}
|
||||
|
||||
//统计信息
|
||||
getSumInfo()
|
||||
//数据列表
|
||||
getList();
|
||||
//所属仓库
|
||||
warehouseFun()
|
||||
//物资类型
|
||||
materialFun()
|
||||
//理货员下拉数据
|
||||
lhyList()
|
||||
//入库类型下拉数据
|
||||
rklxList()
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//打印标签
|
||||
function handlePrintTag() {
|
||||
if (printList.value.length == 0) {
|
||||
proxy.$modal.msgError("请勾选数据");
|
||||
return
|
||||
}
|
||||
if (!printNum.value) {
|
||||
proxy.$modal.msgError("请选择打印机编号");
|
||||
return
|
||||
}
|
||||
for (let i = 0; i < printList.value.length; i++) {
|
||||
printList.value[i].printer = printNum.value
|
||||
}
|
||||
|
||||
printTag(printList.value).then(response => {
|
||||
if (response.code == 200) {
|
||||
proxy.$modal.msgSuccess("打印指令已发送");
|
||||
} else {
|
||||
proxy.$modal.msgError("操作失败");
|
||||
}
|
||||
})
|
||||
}
|
||||
function getSummaries(param) {
|
||||
const { columns, data } = param;
|
||||
// console.log(columns)
|
||||
const sums = [];
|
||||
columns.forEach((column, index) => {
|
||||
if (index === 1) { // 第一列不进行合计操作,通常是序列号或选择框等非数值列。
|
||||
sums[index] = '总计'; // 这里可以设置为其他文字或空字符串。
|
||||
return;
|
||||
} else if (index === 2) { // 第二列是金额列,进行求和操作。
|
||||
sums[index] = '总金额:' + totalMoney.value;
|
||||
// }else if(index === 2){
|
||||
// sums[index] = totalMoney.value
|
||||
} else if (index === 3) {
|
||||
sums[index] = '共存于:' + pcodeCount.value + '个库位'
|
||||
} else if (index === 4) {
|
||||
sums[index] = '总数:' + sumQty.value
|
||||
}
|
||||
})
|
||||
return sums
|
||||
}
|
||||
</script>
|
||||
<style scoped>
|
||||
.searchBtn {
|
||||
|
||||
Reference in New Issue
Block a user