Commit b4e8a774 authored by tanjunxin's avatar tanjunxin

fix: 1.刀模版台账页面部分字段增加排序; 2.退料领料申请增加材料名称搜索条件及表格增加导出功能,增加单位字段及显示申请总数量; 3.退料领料申请数字号码查询条件更改为多个查询

parent e16f6486
......@@ -5,7 +5,8 @@ VUE_APP_TITLE = 宝绅-生产执行系统
ENV = 'development'
# 若依管理系统/开发环境
VUE_APP_BASE_API = 'http://192.168.3.181:8100'
# VUE_APP_BASE_API = 'http://192.168.3.181:8100'
VUE_APP_BASE_API = 'http://192.168.3.181:8101'
# 路由懒加载
VUE_CLI_BABEL_TRANSPILE_MODULES = true
......@@ -60,9 +60,10 @@
</el-form-item>
</el-form>
<el-table v-loading="loading" :data="protaskList" @selection-change="handleSelectionChange">
<el-table v-loading="loading" :data="protaskList" :summary-method="getSummaries" show-summary @selection-change="handleSelectionChange">
<el-table-column label="产品编码" align="center" prop="sapItemCode" />
<el-table-column label="产品名称" align="center" prop="itemName" />
<el-table-column label="单位" align="center" prop="unitOfMeasure" />
<el-table-column label="申请单号" align="center" prop="applyNo" />
<el-table-column label="生产工单" align="center" prop="workorderCode"/>
<el-table-column label="批次号" align="center" prop="batchNo" />
......@@ -103,9 +104,9 @@
</template>
</el-table-column>
</el-table>
<el-dialog :title="title" :visible.sync="open" width="900px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" :disabled="form.materialRequestId && optType != 'edit'"
label-width="100px">
......@@ -154,7 +155,7 @@
<el-input v-model="form.createBy" placeholder="请输入创始人" />
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col >
......@@ -172,7 +173,7 @@
<el-button @click="cancel" v-if="optType != 'view'">取 消</el-button>
</div>
</el-dialog>
<pagination
v-show="total>0"
:total="total"
......@@ -313,6 +314,27 @@
this.$emit('onSelected',this.selectedRow);
this.showFlag = false;
}
},
getSummaries(param){
const { columns, data } = param
console.log(data);
const sums = []
columns.forEach((column, index) => {
if (index === 1) {
sums[index] = '总数量'
} else if (column.label === '申请退料数量') {
sums[index] = data.reduce((prev, curr) => {
return prev + Number(curr.backNum);
}, 0);
} else if (column.label === '已退料数量') {
sums[index] = data.reduce((prev, curr) => {
return prev + Number(curr.returnNum);
}, 0);
} else {
sums[index] = ''
}
})
return sums
},
// 查询明细按钮操作
handleView(row) {
......@@ -326,7 +348,7 @@
this.optType = "view";
});
},
// 取消按钮
cancels() {
......@@ -376,7 +398,7 @@ this.form = {
this.resetForm("form");
},
//确定选中
confirmSelect(){
if(this.selectedTaskId ==null || this.selectedTaskId==0){
......
......@@ -25,9 +25,10 @@
</el-form-item>
</el-form>
<el-table v-loading="loading" :data="protaskList" @current-change="handleCurrent" @row-dblclick="handleRowDbClick">
<el-table v-loading="loading" :data="protaskList" :summary-method="getSummaries" show-summary @current-change="handleCurrent" @row-dblclick="handleRowDbClick">
<el-table-column label="产品编号" align="center" prop="sapItemCode" width="300" />
<el-table-column label="产品名称" align="center" prop="itemName" width="300" />
<el-table-column label="单位" align="center" prop="unitOfMeasure" width="120" />
<el-table-column label="生产工单" align="center" prop="workorderCode" width="200" />
<el-table-column label="申请单号" align="center" prop="applyNo" width="200" />
<el-table-column label="领用数量" align="center" prop="applyNum" width="200"/>
......@@ -232,7 +233,6 @@
},
// 表单参数
form: {},
};
},
created() {
......@@ -267,7 +267,23 @@
this.resetForm("queryForm");
this.handleQuery();
},
getSummaries(param){
const { columns, data } = param
console.log(data);
const sums = []
columns.forEach((column, index) => {
if (index === 1) {
sums[index] = '总数量'
} else if (column.label === '领用数量') {
sums[index] = data.reduce((prev, curr) => {
return prev + Number(curr.applyNum);
}, 0);
} else {
sums[index] = ''
}
})
return sums
},
handleCurrent(row){
if(row){
this.selectedRow = row;
......
<template>
<div class="app-container">
<el-form :model="queryParams" @submit.native.prevent 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 label="物料编码" prop="sapItemCodes">
<el-input v-model="queryParams.sapItemCodes" placeholder="请输入物料编码" type="textarea" :rows="2"
resize="none" 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 label="编排单号" prop="arrangeCodes">
<el-input v-model="queryParams.arrangeCodes" placeholder="请输入编排单号" type="textarea" :rows="2"
resize="none" 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" />
......@@ -20,8 +22,17 @@
<el-option v-for="dict in dict.type.sys_yes_no" :key="dict.value" :label="dict.label" :value="dict.value" />
</el-select>
</el-form-item>
<el-form-item label="申请单号" prop="applyNo">
<el-input v-model="queryParams.applyNo" placeholder="请输入申请单号" clearable @keyup.enter.native="handleQuery" />
<el-form-item label="申请单号" prop="applyNos">
<el-input v-model="queryParams.applyNos" placeholder="请输入申请单号" type="textarea" :rows="2"
resize="none" clearable @keyup.enter.native="handleQuery"/>
</el-form-item>
<el-form-item label="材料名称" prop="itemNames">
<el-input
v-model="queryParams.itemNames"
placeholder="请输入材料名称"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="创建时间">
<el-date-picker v-model="daterangePurchaseDate" value-format="yyyy-MM-dd" type="daterange" range-separator="-"
......@@ -57,7 +68,6 @@
v-hasPermi="['pro:materialRequest:edit']"
>确认申请</el-button>
</el-col>
<!-- <el-col :span="1.5">
<el-button
type="success"
......@@ -80,16 +90,17 @@
v-hasPermi="['pro:materialRequest:remove']"
>删除</el-button>
</el-col> -->
<!-- <el-col :span="1.5">
<el-col :span="1.5">
<el-button
type="warning"
plain
icon="el-icon-download"
size="mini"
:disabled="single"
@click="handleExport"
v-hasPermi="['pro:materialRequest:export']"
>导出</el-button>
</el-col> -->
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<requestItems ref="requestitemsref" key="requestitemsref" :applyNos="applyNos" ></requestItems>
......@@ -425,13 +436,13 @@ export default {
queryParams: {
pageNum: 1,
pageSize: 10,
applyNo: null,
applyNos: null,
itemId: null,
itemName: null,
taskId: null,
taskCode: null,
taskName: null,
arrangeCode: null,
arrangeCodes: null,
createTime: null,
applyNum: null,
attr1: null,
......@@ -444,13 +455,14 @@ export default {
workstationCode: null,
workstationName: null,
materialType: null,
sapItemCode: null,
sapItemCodes: null,
confirm: null,
windCase: null,
createBy: null,
grantNum: null,
startTime: null,
endTime: null,
itemNames: null
},
// 表单参数
form: {},
......@@ -610,7 +622,13 @@ export default {
this.queryParams.params["beginPurchaseDate"] = this.daterangePurchaseDate[0];
this.queryParams.params["endPurchaseDate"] = this.daterangePurchaseDate[1];
}
listMaterialRequests(this.queryParams).then(response => {
const params = {
...this.queryParams,
applyNos: this.queryParams.applyNos ? this.queryParams.applyNos.split(/[\n,;,、;。]/).filter(item => item) : null,
arrangeCodes: this.queryParams.arrangeCodes ? this.queryParams.arrangeCodes.split(/[\n,;,、;。]/).filter(item => item) : null,
sapItemCodes: this.queryParams.sapItemCodes ? this.queryParams.sapItemCodes.split(/[\n,;,、;。]/).filter(item => item) : null
}
listMaterialRequests(params).then(response => {
this.materialRequestList = response.rows;
this.total = response.total;
this.loading = false;
......@@ -779,9 +797,12 @@ export default {
},
/** 导出按钮操作 */
handleExport() {
this.download('pro/materialRequest/export', {
...this.queryParams
}, `materialRequest_${new Date().getTime()}.xlsx`)
const params = {
pageNum: 1,
pageSize: 999,
applyNo: this.applyno[0]
}
this.download('pro/materialRequest/export', params, `materialRequest_${new Date().getTime()}.xlsx`)
}
}
};
......
......@@ -9,18 +9,18 @@
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="申请单编码" prop="applyNo">
<el-input
v-model="queryParams.applyNo"
placeholder="请输入申请单编码"
clearable
@keyup.enter.native="handleQuery"
/>
<el-form-item label="申请单号" prop="applyNos">
<el-input v-model="queryParams.applyNos" placeholder="请输入申请单号" type="textarea" :rows="2"
resize="none" clearable @keyup.enter.native="handleQuery"/>
</el-form-item>
<el-form-item label="编排单号" prop="arrangeCode">
<el-form-item label="编排单号" prop="arrangeCodes">
<el-input v-model="queryParams.arrangeCodes" placeholder="请输入编排单号" type="textarea" :rows="2"
resize="none" clearable @keyup.enter.native="handleQuery"/>
</el-form-item>
<el-form-item label="材料名称" prop="itemNames">
<el-input
v-model="queryParams.arrangeCode"
placeholder="请输入编排单号"
v-model="queryParams.itemNames"
placeholder="请输入材料名称"
clearable
@keyup.enter.native="handleQuery"
/>
......@@ -73,21 +73,23 @@
@click="handleDelete"
v-hasPermi="['pro:materialReturn:remove']"
>删除</el-button>
</el-col>
</el-col> -->
<el-col :span="1.5">
<el-button
type="warning"
plain
icon="el-icon-download"
size="mini"
:disabled="single"
@click="handleExport"
v-hasPermi="['pro:materialReturn:export']"
>导出</el-button> -->
<!-- </el-col> -->
>导出</el-button>
</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="materialReturnList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="申请单号" align="center" prop="applyNo" :show-overflow-tooltip="true">
<template slot-scope="scope">
<el-button size="mini" type="text" @click="showCombDetail(scope.row.applyNo)" >{{
......@@ -225,6 +227,7 @@ export default {
loading: true,
// 选中数组
ids: [],
applyno: [],
// 非单个禁用
single: true,
// 非多个禁用
......@@ -247,13 +250,14 @@ export default {
queryParams: {
pageNum: 1,
pageSize: 10,
applyNo: null,
applyNos: null,
itemId: null,
taskId: null,
itemCode: null,
itemName: null,
itemNames: null,
createBy: null,
arrangeCode: null,
arrangeCodes: null,
createTime: null,
issueLineId: null,
workOrderId: null,
......@@ -287,7 +291,12 @@ export default {
this.queryParams.params["beginPurchaseDate"] = this.daterangePurchaseDate[0];
this.queryParams.params["endPurchaseDate"] = this.daterangePurchaseDate[1];
}
listMaterialReturns(this.queryParams).then(response => {
const params = {
...this.queryParams,
applyNos: this.queryParams.applyNos ? this.queryParams.applyNos.split(/[\n,;,、;。]/).filter(item => item) : null,
arrangeCodes: this.queryParams.arrangeCodes ? this.queryParams.arrangeCodes.split(/[\n,;,、;。]/).filter(item => item) : null
}
listMaterialReturns(params).then(response => {
this.materialReturnList = response.rows;
this.total = response.total;
this.loading = false;
......@@ -329,7 +338,7 @@ export default {
returnNum: null,
windCase: null
};
this.resetForm("form");
},
......@@ -352,6 +361,7 @@ export default {
// 多选框选中数据
handleSelectionChange(selection) {
this.ids = selection.map(item => item.materialReturnId)
this.applyno = selection.map(item => item.applyNo)
this.single = selection.length!==1
this.multiple = !selection.length
},
......@@ -410,9 +420,12 @@ export default {
},
/** 导出按钮操作 */
handleExport() {
this.download('pro/materialReturn/export', {
...this.queryParams
}, `materialReturn_${new Date().getTime()}.xlsx`)
const params = {
pageNum: 1,
pageSize: 999,
applyNo: this.applyno[0]
}
this.download('pro/materialReturn/export', params, `materialReturn_${new Date().getTime()}.xlsx`)
}
}
};
......
......@@ -126,7 +126,7 @@
<el-table v-loading="loading" :data="toolList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="物料编码" min-width="180" align="center" prop="sapItemCode" />
<el-table-column label="物料编码" min-width="180" align="center" sortable prop="sapItemCode" />
<el-table-column label="名称" min-width="180" align="center" prop="toolName">
<template slot-scope="scope">
<el-button
......@@ -137,11 +137,8 @@
>{{scope.row.toolName}}</el-button>
</template>
</el-table-column>
<el-table-column label="刀模SN" width="80" align="center" prop="toolCode" >
<el-table-column label="刀模SN" width="100" align="center" sortable prop="toolCode" >
</el-table-column>
<el-table-column label="品牌" width="80" align="center" prop="brand" :show-overflow-tooltip="true"/>
<el-table-column label="型号" width="80" align="center" prop="spec" :show-overflow-tooltip="true"/>
<!-- <el-table-column label="类型" width="80" align="center" prop="toolTypeName" /> -->
......@@ -157,8 +154,8 @@
<span>{{ parseTime(scope.row.nextMaintenDate, '{y}-{m}-{d}') }}</span>
</template>
</el-table-column>
<el-table-column label="位置" width="120" align="center" prop="location"/>
<el-table-column label="状态" align="center" prop="status">
<el-table-column label="位置" width="120" align="center" sortable prop="location"/>
<el-table-column label="状态" align="center" sortable prop="status">
<template slot-scope="scope">
<dict-tag :options="dict.type.mes_tool_status" :value="scope.row.status"/>
</template>
......
......@@ -37,7 +37,8 @@ module.exports = {
// detail: https://cli.vuejs.org/config/#devserver-proxy
[process.env.VUE_APP_BASE_API]: {
// target: `http://localhost:8080`,
target: `http://192.168.3.181:8100`,
// target: `http://192.168.3.181:8100`,
target: `http://192.168.3.181:8101`,
// target: `http://192.168.4.122:8080`,
changeOrigin: true,
pathRewrite: {
......
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