领料出库

This commit is contained in:
jjLv 2024-11-14 08:49:14 +08:00
parent e193a6cfe4
commit 882b72ad1b
5 changed files with 311 additions and 117 deletions

View File

@ -71,10 +71,20 @@ export function applyRemove(ids) {
}
// 领料申请-发布
export function applySend(ids) {
export function applySend(data) {
return request({
url: '/material/lease_apply_info/' + ids,
method: 'delete',
url: '/material/lease_apply_info/publish',
method: 'post',
data: data,
})
}
// 领料申请-批量发布
export function applySendAll(data) {
return request({
url: '/material/lease_apply_info/publishBatch',
method: 'post',
data: data,
})
}

127
src/api/lease/out.js Normal file
View File

@ -0,0 +1,127 @@
import request from '@/utils/request'
//领料出库-列表
export function getListLeaseOut(query) {
return request({
url: '/material/lease_out_details/list',
method: 'get',
params: query,
})
}
// 领料出库-新增
export function addApplyInfo(data) {
return request({
url: '/material/lease_apply_info',
method: 'post',
data: data,
})
}
// 领料出库-编辑
export function updateApplyInfo(data) {
return request({
url: '/material/lease_apply_info',
method: 'put',
data: data,
})
}
// 领料出库-详情信息
export function getLeaseOutInfo(id) {
return request({
url: '/material/lease_apply_info/' + id,
method: 'get'
})
}
// 领料申请租赁单位下拉框
export function getListUnite(data) {
return request({
url: '/material/select/getUnitList',
method: 'post',
data: data,
})
}
// 领料申请租赁工程下拉框
export function getListProject(data) {
return request({
url: '/material/select/getProjectList',
method: 'post',
data: data,
})
}
// 领料申请获取协议单id
export function getAgreement(data) {
return request({
url: '/material/select/getAgreementInfoById',
method: 'post',
data: data,
})
}
// 领料出库-删除
export function applyRemove(ids) {
return request({
url: '/material/lease_apply_info/' + ids,
method: 'delete',
})
}
// 领料出库-发布
export function applySend(ids) {
return request({
url: '/material/lease_apply_info/' + ids,
method: 'delete',
})
}
//新购到货-二级列表详情
export function getPurchaseCheckInfo(query) {
return request({
url: '/material/purchase_check_info/getInfo',
method: 'get',
params: query,
})
}
// 新购到货-新增
export function addPurchaseCheckInfo(data) {
return request({
url: '/material/purchase_check_info',
method: 'post',
data: data,
})
}
// 新购到货-编辑
export function updatePurchaseCheckInfo(data) {
return request({
url: '/material/purchase_check_info',
method: 'put',
data: data,
})
}
// 新购到货--删除
export function purchaseCheckInfoRemove(ids) {
return request({
url: '/material/purchase_check_info/' + ids,
method: 'delete',
})
}
// 上传报告附件
export function uploadPurchaseFile(data) {
return request({
url: '/material/bm_file_info',
method: 'post',
data: data
})
}

View File

@ -325,10 +325,11 @@ export default {
this.taskId = this.editTaskId;
this.id = this.editId;
this.getTaskInfo();
this.equipmentType();
} else {
this.projectInfoList();
this.equipmentType();
}
this.projectInfoList();
this.equipmentType();
},
methods: {
uniteChange(val) {
@ -345,9 +346,19 @@ export default {
},
/** 租赁单位和工程-下拉选 */
projectInfoList() {
getListUnite({ id: null }).then((response) => {
this.uniteList = response.data;
});
if (!this.isEdit) {
getListUnite({ id: null }).then((response) => {
this.uniteList = response.data;
});
} else {
getListUnite({ id: null }).then((response) => {
this.uniteList = response.data;
});
console.log("maForm", this.maForm.leaseUnitId);
getListProject({ unitId: this.maForm.leaseUnitId }).then((response) => {
this.projectList = response.data;
});
}
// getListProject({ id: null }).then((response) => {
// this.projectList = response.data;
// });
@ -432,14 +443,15 @@ export default {
}
},
//---
getTaskInfo() {
async getTaskInfo() {
// this.loading = true;
getApplyInfo(this.id).then((response) => {
await getApplyInfo(this.id).then((response) => {
this.maForm = response.data.leaseApplyInfo;
console.log("this.maForm", this.maForm);
this.equipmentList = response.data.leaseApplyDetailsList;
// this.loading = false;
});
await this.projectInfoList();
},
//
handleSelectionChange(selection) {

View File

@ -55,13 +55,11 @@
icon="el-icon-search"
size="mini"
@click="handleQuery"
>搜索
</el-button
>
>搜索
</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery"
>重置
</el-button
>
>重置
</el-button>
</el-form-item>
</el-form>
@ -73,9 +71,8 @@
icon="el-icon-plus"
size="mini"
@click="handleAdd"
>领料申请
</el-button
>
>领料申请
</el-button>
</el-col>
<el-col :span="1.5">
<el-button
@ -84,9 +81,8 @@
icon="el-icon-plus"
size="mini"
@click="handleSendAll"
>发布
</el-button
>
>发布
</el-button>
</el-col>
<el-col :span="1.5">
<el-button
@ -95,9 +91,8 @@
icon="el-icon-download"
size="mini"
@click="handleExport"
>导出
</el-button
>
>导出
</el-button>
</el-col>
<right-toolbar
:showSearch.sync="showSearch"
@ -112,8 +107,13 @@
@selection-change="handleSelectionChange"
border
>
<el-table-column type="selection" width="55" align="center"/>
<el-table-column width="60" align="center" label="序号" type="index"/>
<el-table-column
type="selection"
width="55"
align="center"
:selectable="selectable"
/>
<el-table-column width="60" align="center" label="序号" type="index" />
<el-table-column
align="center"
width="160"
@ -212,9 +212,8 @@
style="margin-bottom: 10px"
type="normal"
@click="handleView(scope.row)"
>查看
</el-button
>
>查看
</el-button>
<el-button
size="mini"
style="margin-bottom: 10px"
@ -222,9 +221,8 @@
@click="handleUpdate(scope.row)"
v-if="scope.row.status != '2'"
v-hasPermi="['purchase:info:edit']"
>编辑
</el-button
>
>编辑
</el-button>
<el-button
size="mini"
@ -233,17 +231,14 @@
@click="handleSend(scope.row)"
v-if="scope.row.status == '0'"
v-hasPermi="['purchase:person:notice']"
>发布
</el-button
>
>发布
</el-button>
<el-button size="mini" type="warning" @click="handleLld(scope.row)"
>领料单
</el-button
>
>领料单
</el-button>
<el-button size="mini" type="warning" @click="handlePrint(scope.row)"
>出库检验单
</el-button
>
>出库检验单
</el-button>
<el-button
size="mini"
@ -251,9 +246,8 @@
@click="handleDeletePurchase(scope.row)"
v-if="scope.row.status == '0'"
v-hasPermi="['purchase:info:remove']"
>删除
</el-button
>
>删除
</el-button>
</template>
</el-table-column>
</el-table>
@ -327,7 +321,7 @@
border
>
<!-- <el-table-column type="selection" width="55" align="center" />-->
<el-table-column label="序号" align="center" type="index" row="2"/>
<el-table-column label="序号" align="center" type="index" row="2" />
<el-table-column
label="物资名称"
align="center"
@ -338,7 +332,7 @@
align="center"
prop="specificationType"
/>
<el-table-column label="单位" align="center" prop="unitName"/>
<el-table-column label="单位" align="center" prop="unitName" />
<el-table-column label="配送信息" align="center">
<el-table-column
label="到货数量"
@ -363,7 +357,7 @@
/>
</el-table-column>
</el-table-column>
<el-table-column label="备注" align="center" prop="unitName"/>
<el-table-column label="备注" align="center" prop="unitName" />
<!-- <el-table-column-->
<!-- label="合格证及技术资料"-->
@ -408,34 +402,78 @@
</div>
</el-dialog>
<!-- 领料单弹窗 -->
<el-dialog :visible.sync="open" width="800px" append-to-body>
<div style="height: 500px; overflow-y: scroll; padding: 0 20px">
<vue-easy-print tableShow ref="remarksPrintRef" class="print">
<div class="title" style="text-align: center;font-weight: 600;font-size: 16px;">领料单</div>
<div class="info" style="margin-top: 10px; display: flex; flex-wrap: wrap">
<div class="item" style="width: 50%;flex-shrink: 0;margin-bottom: 5px;font-size: 14px;">
<div
class="title"
style="text-align: center; font-weight: 600; font-size: 16px"
>
领料单
</div>
<div
class="info"
style="margin-top: 10px; display: flex; flex-wrap: wrap"
>
<div
class="item"
style="
width: 50%;
flex-shrink: 0;
margin-bottom: 5px;
font-size: 14px;
"
>
<span>领料单位</span>
{{ leaseApplyData.leaseUnit }}
</div>
<div class="item" style="width: 50%;flex-shrink: 0;margin-bottom: 5px;font-size: 14px;">
<div
class="item"
style="
width: 50%;
flex-shrink: 0;
margin-bottom: 5px;
font-size: 14px;
"
>
<span>工程名称</span>
{{ leaseApplyData.leaseProject }}
</div>
<div class="item" style="width: 50%;flex-shrink: 0;margin-bottom: 5px;font-size: 14px;">
<div
class="item"
style="
width: 50%;
flex-shrink: 0;
margin-bottom: 5px;
font-size: 14px;
"
>
<span>时间</span>
{{ leaseApplyData.createTime }}
</div>
<div class="item" style="width: 50%;flex-shrink: 0;margin-bottom: 5px;font-size: 14px;">
<div
class="item"
style="
width: 50%;
flex-shrink: 0;
margin-bottom: 5px;
font-size: 14px;
"
>
<span>编号</span>
{{ leaseApplyData.code }}
</div>
</div>
<el-table :data="leaseApplyDetails" class="table" border style="margin-top: 20px; padding: 1px">
<el-table-column label="序号" align="center" type="index"/>
<el-table-column label="类型名称" align="center" prop="typeName"/>
<!-- <el-table-column type="expand">
<el-table
:data="leaseApplyDetails"
class="table"
border
style="margin-top: 20px; padding: 1px"
>
<el-table-column label="序号" align="center" type="index" />
<el-table-column label="类型名称" align="center" prop="typeName" />
<!-- <el-table-column type="expand">
<template slot-scope="scope">
<div class="nested-table-container">
<el-table :data="scope.row.maTypeDetails" style="width: 100%">
@ -464,41 +502,37 @@
</div>
</template>
</el-table-column>-->
<el-table-column label="规格型号" align="center" prop="typeName" />
<el-table-column label="计量单位" align="center" prop="unitName" />
<el-table-column label="预领数量" align="center" prop="preNum" />
<el-table-column label="备注" align="center" prop="remark" />
<el-table-column
label="规格型号"
label="出库方式"
align="center"
prop="typeName"
/>
<el-table-column
label="计量单位"
align="center"
prop="unitName"
/>
<el-table-column
label="预领数量"
align="center"
prop="preNum"
/>
<el-table-column
label="备注"
align="center"
prop="remark"
/>
<el-table-column label="出库方式" align="center" prop="manageTypeName">
prop="manageTypeName"
>
<template slot-scope="scope">
<dict-tag :options="dict.type.ma_type_manage_type" :value="scope.row.manageType"/>
<dict-tag
:options="dict.type.ma_type_manage_type"
:value="scope.row.manageType"
/>
</template>
</el-table-column>
<!-- <el-table-column-->
<!-- label="出库方式"-->
<!-- align="center"-->
<!-- prop="manageTypeName"-->
<!-- />-->
<!-- <el-table-column-->
<!-- label="出库方式"-->
<!-- align="center"-->
<!-- prop="manageTypeName"-->
<!-- />-->
</el-table>
<div class="fillIn" style="margin-top: 30px;display: flex;justify-content: space-between;">
<div
class="fillIn"
style="
margin-top: 30px;
display: flex;
justify-content: space-between;
"
>
<div class="item" style="width: 25%">
<span>审核</span>
</div>
@ -519,7 +553,6 @@
<el-button @click="open = false"> </el-button>
</div>
</el-dialog>
</div>
</template>
@ -532,13 +565,15 @@ import {
queryStatusDataApi,
getApplyInfo,
applyRemove,
applySend,
applySendAll,
} from "@/api/lease/apply";
import vueEasyPrint from 'vue-easy-print'
import vueEasyPrint from "vue-easy-print";
export default {
name: "Home",
dicts: ["lease_apply_status","ma_type_manage_type"],
dicts: ["lease_apply_status", "ma_type_manage_type"],
// components: { vueEasyPrint },
data() {
return {
@ -590,7 +625,7 @@ export default {
//
rules: {
remark: [
{required: true, message: "通知内容不能为空", trigger: "blur"},
{ required: true, message: "通知内容不能为空", trigger: "blur" },
],
},
openPrint: false,
@ -604,6 +639,7 @@ export default {
leaseApplyDetails: [],
//
leaseApplyData: {},
sendTemp: [],
};
},
created() {
@ -624,11 +660,23 @@ export default {
//
handleSelectionChange(selection) {
this.sendTemp = [];
this.ids = selection.map((item) => item.id);
selection.forEach((item) => {
this.sendTemp.push({ id: item.id, taskId: item.taskId });
});
this.single = selection.length != 1;
this.multiple = !selection.length;
},
//
selectable(row) {
if (row.status == "1") {
return false;
} else {
return true;
}
},
getList() {
this.loading = true;
const params = {
@ -690,7 +738,7 @@ export default {
//
getPrintTable(taskId) {
getAcceptanceForm({taskId: taskId}).then((response) => {
getAcceptanceForm({ taskId: taskId }).then((response) => {
this.printData = response.data;
this.printTableData = response.data.checkDetailsList;
@ -715,13 +763,13 @@ export default {
//
async handleLld(row) {
this.open = true
var ids = row.id
const res = await getApplyInfo(ids)
console.log(res)
this.leaseApplyDetails = res.data.leaseApplyDetailsList
this.leaseApplyData = res.data.leaseApplyInfo
console.log(this.leaseApplyData)
this.open = true;
var ids = row.id;
const res = await getApplyInfo(ids);
console.log(res);
this.leaseApplyDetails = res.data.leaseApplyDetailsList;
this.leaseApplyData = res.data.leaseApplyInfo;
console.log(this.leaseApplyData);
},
//
@ -744,27 +792,25 @@ export default {
this.getList();
this.$modal.msgSuccess("删除成功");
})
.catch(() => {
});
.catch(() => {});
},
/** 导出按钮操作 */
handleExport() {
this.download(
"/material/lease_apply_info/export",
{...this.queryParams},
{ ...this.queryParams },
`领料申请_${new Date().getTime()}.xlsx`
);
},
//
handleSend(row) {
let ids = [];
ids.push(row.id);
const param = { id: row.id, taskId: row.taskId };
this.$modal
.confirm("是否确认发布所选择的数据项?")
.then(function () {
return applySend(ids);
return applySend(param);
})
.then(() => {
this.getList();
@ -781,16 +827,12 @@ export default {
});
return;
} else {
this.$modal
.confirm("是否确认发布所选择的数据项?")
.then(function () {
return applySend(this.ids);
})
.then(() => {
this.getList();
applySendAll(this.sendTemp).then((response) => {
if (response.code == 200) {
this.$modal.msgSuccess("发布成功");
})
.catch(() => {});
}
this.getList();
});
}
},
},

View File

@ -159,6 +159,7 @@
append-to-body
title="编码绑定"
:visible.sync="bindCodeVisible"
@close="closeCancel"
>
<el-form
size="small"
@ -166,7 +167,6 @@
ref="queryFormBindRef"
:model="queryBindForm"
:rules="queryBindFormRules"
@close="closeCancel"
>
<el-form-item label="前缀" prop="codePrefix">
<el-input
@ -419,7 +419,10 @@ export default {
},
methods: {
//
closeCancel() {},
closeCancel() {
this.bindCodeVisible = false;
this.resetForm("queryFormBindRef");
},
codeBind(row) {
this.bindCodeVisible = true;
this.waitBindNum = row.unitName;