Commit abe7a162 authored by chenzj's avatar chenzj

领料申请页面修改

parent 9287be0d
import request from '@/utils/request'
// 查询领料申请列表
// 查询领料申请列表
export function listMaterialRequest(query) {
return request({
url: '/pro/materialRequest/list',
......@@ -9,6 +9,16 @@ export function listMaterialRequest(query) {
})
}
// 查询领料申请列表头
export function listMaterialRequests(query) {
return request({
url: '/pro/materialRequest/lists',
method: 'get',
params: query
})
}
// 查询领料申请详细
export function getMaterialRequest(materialRequestId) {
return request({
......@@ -53,9 +63,9 @@ export function delMaterialRequest(materialRequestId) {
}
// 确认补货按钮
export function confirmMaterialRequest(materialRequestId) {
export function confirmMaterialRequest(applyNo) {
return request({
url: '/pro/materialRequest/confirm/' + materialRequestId,
url: '/pro/materialRequest/confirm/' + applyNo,
method: 'get'
})
}
\ No newline at end of file
......@@ -3,12 +3,13 @@ import request from '@/utils/request'
// 查询过程检验单列表
export function listIpqc(query) {
return request({
url: '/mes/qc/ipqc/list',
url: '/mes/qc/ipqc/lists',
method: 'get',
params: query
})
}
// 查询过程检验单详细
export function getIpqc(ipqcId) {
return request({
......
This diff is collapsed.
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="100px">
<el-form-item label="产品编号" prop="sapItemCode">
<el-input v-model="queryParams.sapItemCode" placeholder="请输入产品编号" clearable @keyup.enter.native="handleQuery" />
</el-form-item>
<el-form-item label="产品名称" prop="itemName">
<el-input v-model="queryParams.itemName" placeholder="请输入产品名称" clearable @keyup.enter.native="handleQuery" />
</el-form-item>
<el-form-item label="编排单号" prop="arrangeCode">
<el-input v-model="queryParams.arrangeCode" placeholder="请输入编排单号" clearable @keyup.enter.native="handleQuery" />
</el-form-item>
<el-form-item label="领用数量" prop="applyNum">
<el-input v-model="queryParams.applyNum" placeholder="请输入领用数量" clearable @keyup.enter.native="handleQuery" />
</el-form-item>
<el-form-item label="生产工单" prop="workorderCode">
<el-input v-model="queryParams.workorderCode" placeholder="请输入生产工单" clearable
@keyup.enter.native="handleQuery" />
</el-form-item>
<el-form-item label="创建人" prop="createBy">
<el-input v-model="queryParams.createBy" placeholder="请输入创建人" clearable @keyup.enter.native="handleQuery" />
</el-form-item>
......@@ -102,21 +90,24 @@
</el-col> -->
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<requestItems ref="requestitemsref" key="requestitemsref" :applyNos="applyNos" ></requestItems>
<el-table v-loading="loading" :data="materialRequestList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="产品编号" align="center" prop="sapItemCode" width="150" />
<el-table-column label="产品名称" align="center" prop="itemName" width="100" />
<el-table-column label="生产工单" align="center" prop="workorderCode" width="150" />
<el-table-column label="申请单号" width="150" align="center" prop="applyNo" :show-overflow-tooltip="true">
<template slot-scope="scope">
<el-button size="mini" type="text" @click="showCombDetail(scope.row.applyNo)" >{{
scope.row.applyNo }}
</el-button>
</template>
</el-table-column>
<el-table-column label="工作单元" align="center" prop="workunitName" width="100" />
<el-table-column label="申请单号" align="center" prop="applyNo" width="150" />
<el-table-column label="领料类型" align="center" prop="applyType">
<template slot-scope="scope">
<dict-tag :options="dict.type.pro_requisition_type" :value="scope.row.applyType" />
</template>
</el-table-column>
<el-table-column label="编排单号" align="center" prop="arrangeCode" width="150" />
<el-table-column label="领用数量" align="center" prop="applyNum" />
<el-table-column label="创建人" align="center" prop="createBy" />
<el-table-column label="领料方式" align="center" prop="materialType">
<template slot-scope="scope">
......@@ -133,7 +124,6 @@
<dict-tag :options="dict.type.sys_yes_no" :value="scope.row.confirm" />
</template>
</el-table-column>
<el-table-column label="已发放数量" align="center" prop="grantNum" />
<el-table-column label="创建时间" align="center" prop="createTime" width="180">
<!-- <template slot-scope="scope">
<span>{{ parseTime(scope.row.CreateTime, '{y}-{m}-{d}') }}</span>
......@@ -349,6 +339,8 @@
<el-button @click="cancels" v-if="optType != 'view'">取 消</el-button>
</div>
</el-dialog>
<div style="overflow: hidden;width: 0;height: 0;">
<div id="productOrderDetail">
<div v-for="(item, index) in printTable" :key="'printTable' + index">
......@@ -360,7 +352,7 @@
</template>
<script>
import {confirmMaterialRequest, listMaterialRequest, getMaterialRequest, delMaterialRequest, addMaterialRequest, updateMaterialRequest, materialRequestPrintInfo } from "@/api/mes/pro/request";
import {listMaterialRequests,confirmMaterialRequest, listMaterialRequest, getMaterialRequest, delMaterialRequest, addMaterialRequest, updateMaterialRequest, materialRequestPrintInfo } from "@/api/mes/pro/request";
import { genCode } from "@/api/system/autocode/rule";
import BrandSelect from "./components/taskSelect.vue";
import arangeSelect from "./components/arangeSelect.vue";
......@@ -372,10 +364,11 @@ import print from 'vue-print-nb';
import WorkstationSelect from "@/components/workstationSelect/simpletableSingle.vue";
import ItemSelect from "@/components/itemSelect/single.vue";
import { listWorkunit} from "@/api/mes/md/workunit";
import requestItems from "@/components/request/requestItem.vue";
export default {
directives: { print },
name: "MaterialRequest",
components: { printTable, BrandSelect,WorkstationSelect,ItemSelect, arangeSelect, codeSelect ,requestIndex ,workorderSelect},
components: { printTable, BrandSelect,WorkstationSelect,ItemSelect, arangeSelect, codeSelect ,requestIndex ,workorderSelect,requestItems},
dicts: ['pro_requisition_type', 'pro_material_from', 'sys_yes_no'],
data() {
return {
......@@ -383,14 +376,23 @@ export default {
loading: true,
// 选中数组
ids: [],
applyno: [],
// 非单个禁用
single: true,
combOpen: false,
// 非多个禁用
multiple: true,
// 显示搜索条件
showSearch: true,
// 总条数
total: 0,
applyNos: null,
combinationCodes: [],
// 领料申请表格数据
materialRequestList: [],
......@@ -510,6 +512,11 @@ export default {
this.printloading = false;
})
},
showCombDetail(applyNo) {
this.$refs.requestitemsref.showFlag = true;
this.applyNos= applyNo;
},
handleBrandSelect() {
this.$refs.brSelect.showFlag = true;
},
......@@ -548,6 +555,7 @@ export default {
handleWorkstationSelect() {
console.log(workstationSelect);
this.$refs.workstationSelect.showFlag = true;
},
onWorkstationSelect(row, type) {
......@@ -583,7 +591,7 @@ export default {
this.queryParams.params["beginPurchaseDate"] = this.daterangePurchaseDate[0];
this.queryParams.params["endPurchaseDate"] = this.daterangePurchaseDate[1];
}
listMaterialRequest(this.queryParams).then(response => {
listMaterialRequests(this.queryParams).then(response => {
this.materialRequestList = response.rows;
this.total = response.total;
this.loading = false;
......@@ -657,6 +665,7 @@ export default {
// 多选框选中数据
handleSelectionChange(selection) {
this.ids = selection.map(item => item.materialRequestId)
this.applyno = selection.map(item => item.applyNo)
this.single = selection.length !== 1
this.multiple = !selection.length
},
......@@ -683,8 +692,8 @@ export default {
/** 确认补货按钮 */
confirmUpdate(row) {
this.reset();
const materialRequestId = row.materialRequestId || this.ids
confirmMaterialRequest(materialRequestId).then(response => {
const applyNo = row.applyNo || this.applyno;
confirmMaterialRequest(applyNo).then(response => {
if(response.code===500){
this.$modal.confirm(msg);
}
......@@ -695,14 +704,9 @@ export default {
},
// 查询明细按钮操作
handleView(row) {
this.reset();
const materialRequestId = row.materialRequestId || this.ids;
getMaterialRequest(materialRequestId).then(response => {
this.form = response.data;
this.open = true;
this.title = "查看领料申请";
this.optType = "view";
});
const applyNo = row.applyNo || this.applyNo;
this.$refs.requestitemsref.showFlag = true;
this.applyNos= applyNo;
},
/** 提交按钮 */
submitForm() {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment