Merge remote-tracking branch 'origin/master'

yangwl
Yangwl 3 months ago
commit a3ac4f10c1

@ -0,0 +1,12 @@
import request from '@/utils/request'
// 查询成品生记录列表
export function selectProductProductionRecords(query) {
return request({
url: '/wms/put/selectProductProductionRecords',
method: 'get',
params: query
});
}

@ -464,7 +464,7 @@ export default {
this.number = this.number.toFixed(2);
if (this.queryParams.monitorHierarchy == "" && this.queryParams.publicShareType == ""){
this.queryParams.type = 0;
this.queryParams.energyType = 2;
this.queryParams.energyType = 3;
this.queryParams.relationId = 1;
previewPolyline(this.queryParams).then((res) => {
this.number = res.data.sumEnergyValue;

@ -129,6 +129,7 @@
style="height: 44px"
:key="index"
v-for="(n, index) in orderdetail"
@click="getorderdetail(n.workorderCodeSap)"
>
<td style="width: 8%">{{ n.workorderCodeSap }}</td>
<!-- <td style="width: 8%;">{{ n.orderNo }}</td> -->
@ -407,11 +408,12 @@ export default {
optionDatalist5: [],
optionDatalist6: [],
colorlist: ["#005aff", "#f8b551"],
datetime: null,
datetime: 0,
time1: null,
getlist: [],
repairlist: [],
orderdetail: [],
gudingworkorderCodeSap:'',
packaginglinerepairlist: [],
packaginglinestabilizelist: [],
packaginglineinfo: [],
@ -505,9 +507,61 @@ export default {
const _this = this;
_this.initChart1();
_this.piedata = [];
// getProductionLineInfo({
// equCode: _this.selectxtclasses,
// factoryCode: "ds_" + _this.selectxt,
// }).then((response) => {
// if (response) {
// _this.workOrder = response.data.workOrder;
// _this.taskNum = response.data.taskNum;
// _this.taskSampleNum = response.data.taskSampleNum;
// if (response.data.piedata.checkList) {
// response.data.piedata.checkList.forEach((item) => {
// let a = {};
// let b = {};
// if (item.checkResult == "") {
// a.name = item.checkResult;
// a.value = item.quality;
// _this.piedata[0] = a;
// }
// if (item.checkResult == "") {
// b.name = item.checkResult;
// b.value = item.quality;
// _this.piedata[1] = b;
// }
// });
// _this.initChart2();
// } else {
// _this.initChart3();
// }
// }
// });
getPorOrderList({
equCode: _this.selectxtclasses,
factoryCode: "ds_" + _this.selectxt,
}).then((response) => {
if (response) {
_this.orderdetail = response.data;
if(_this.datetime == 0){
_this.gudingworkorderCodeSap = _this.orderdetail[0].workorderCodeSap;
_this.getorderdetail(_this.gudingworkorderCodeSap);
}
_this.datetime+=1;
if (_this.orderdetail.length == 0) {
_this.orderdetail = this.ceshitable;
}
}
});
},
//
getorderdetail(item) {
const _this = this;
getProductionLineInfo({
equCode: _this.selectxtclasses,
factoryCode: "ds_" + _this.selectxt,
workorderCodeSap: item,
}).then((response) => {
if (response) {
_this.workOrder = response.data.workOrder;
@ -528,20 +582,9 @@ export default {
_this.piedata[1] = b;
}
});
_this.initChart2();
//_this.initChart2();
} else {
_this.initChart3();
}
}
});
getPorOrderList({
equCode: _this.selectxtclasses,
factoryCode: "ds_" + _this.selectxt,
}).then((response) => {
if (response) {
_this.orderdetail = response.data;
if (_this.orderdetail.length == 0) {
_this.orderdetail = this.ceshitable;
//_this.initChart3();
}
}
});

@ -0,0 +1,320 @@
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item label="生产工单" prop="workOrder">
<el-input
v-model="queryParams.productOrder"
placeholder="请输入工单"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="批次" prop="batchCode">
<el-input
v-model="queryParams.batchCode"
placeholder="请输入批次"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="产线名称" prop="lineName">
<el-input
v-model="queryParams.lineName"
placeholder="请输入产线名称"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="产线编码" prop="lineCode">
<el-input
v-model="queryParams.lineCode"
placeholder="请输入产线编码"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="产品名称" prop="productName">
<el-input
v-model="queryParams.productName"
placeholder="请输入产品名称"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="产品编码" prop="productCode">
<el-input
v-model="queryParams.productCode"
placeholder="请输入产品编码"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="数量" prop="quantity">
<el-input
v-model="queryParams.quantity"
placeholder="请输入数量"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="托盘号" prop="sn">
<el-input
v-model="queryParams.sn"
placeholder="请输入托盘号"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="日期" prop="productDate">
<el-date-picker
v-model="queryParams.productDate"
type="date"
placeholder="请选择日期"
clearable
@change="handleDateChange"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery"></el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery"></el-button>
</el-form-item>
</el-form>
<!-- <el-row :gutter="10" class="mb8">-->
<!-- <el-col :span="1.5">-->
<!-- <el-button-->
<!-- type="warning"-->
<!-- plain-->
<!-- icon="el-icon-download"-->
<!-- size="mini"-->
<!-- @click="handleExport"-->
<!-- v-hasPermi="['wms:put:export']"-->
<!-- >导出</el-button>-->
<!-- </el-col>-->
<!-- <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>-->
<!-- </el-row>-->
<el-table v-loading="loading" :data="putList" @selection-change="handleSelectionChange" style="width: 100%">
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="ID" align="center" prop="id" v-if="false"/>
<!-- <el-table-column label="工厂编码" align="center" prop="factoryCode" />-->
<el-table-column label="工单号" align="center" prop="productOrder" width="200px"/>
<el-table-column label="批次" align="center" prop="batchCode" width="200px"/>
<el-table-column label="产品名称" align="center" prop="productName" width="200px"/>
<el-table-column label="产品编码" align="center" prop="productCode">
<template slot-scope="scope">
<span>{{ formatProductCode(scope.row.productCode) }}</span>
</template>
</el-table-column>
<el-table-column label="产线编码" align="center" prop="lineCode" width="200px" />
<el-table-column label="产线名称" align="center" prop="lineName" width="200px" />
<el-table-column label="数量" align="center" prop="quantity" />
<el-table-column label="托盘号" align="center" prop="sn" width="200px"/>
<el-table-column label="记录日期" align="center" prop="productDate" width="180">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.productDate, '{y}-{m}-{d}') }}</span>
</template>
</el-table-column>
<el-table-column label="操作人" align="center" prop="createBy" width="200px"/>
<el-table-column label="记录时间" align="center" prop="createTime" width="180">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.createTime, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
</template>
</el-table-column>
</el-table>
<pagination
v-show="total>0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
</div>
</template>
<script>
import { selectProductProductionRecords} from "@/api/wms/wmsProductProductionRecords";
export default {
name: "Put",
data() {
return {
//
loading: true,
//
ids: [],
//
single: true,
//
multiple: true,
//
showSearch: true,
//
total: 0,
//
putList: [],
//
title: "",
//
open: false,
//
queryParams: {
pageNum: 1,
pageSize: 10,
workOrder: null,
batchCode:null,
factoryCode: null,
productOrder: null,
whCode: null,
waCode: null,
wlCode: null,
lineName: null,
lineCode: null,
productName: null,
productCode: null,
productSort: null,
specification: null,
unitOfMeasure: null,
quantity: null,
putQuantity: null,
status: null,
sapStatus: null,
sn: null,
productDate: null,
sapMessage: null,
putDate: null,
attr1: null,
attr2: null,
attr3: null,
attr4: null,
attr5: null,
attr6: null,
attr7: null,
attr8: null,
attr9: null,
attr10: null,
},
//
form: {},
//
rules: {
workOrder: [
{ required: true, message: "报工单号不能为空", trigger: "blur" }
],
}
};
},
created() {
this.getList();
},
methods: {
/** 查询成品生产入库列表 */
getList() {
this.loading = true;
selectProductProductionRecords(this.queryParams).then(response => {
this.putList = response.rows;
this.total = response.total;
this.loading = false;
});
},
//
cancel() {
this.open = false;
this.reset();
},
//
reset() {
this.form = {
id: null,
workOrder: null,
batchCode:null,
factoryCode: null,
productOrder: null,
whCode: null,
waCode: null,
wlCode: null,
lineCode: null,
lineName: null,
productName: null,
productCode: null,
productSort: null,
specification: null,
unitOfMeasure: null,
quantity: null,
putQuantity: null,
status: null,
sapStatus: null,
sn: null,
productDate: null,
sapMessage: null,
putDate: null,
attr1: null,
attr2: null,
attr3: null,
attr4: null,
attr5: null,
attr6: null,
attr7: null,
attr8: null,
attr9: null,
attr10: null,
createBy: null,
createTime: null,
updateBy: null,
updateTime: null
};
this.resetForm("form");
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm");
this.handleQuery();
},
//
handleSelectionChange(selection) {
this.ids = selection.map(item => item.id)
this.single = selection.length!==1
this.multiple = !selection.length
},
formatProductCode(code) {
// 7
if (!code) return code; // null undefined
return code.replace(/^0{1,7}/, ''); // 170
},
handleDateChange(date) {
// YYYY-MM-DD
if (date) {
const formattedDate = this.formatDate(date);
this.queryParams.productDate = formattedDate; // productDate
console.log("Selected date:", this.queryParams.productDate); //
} else {
this.queryParams.productDate = null; // null
}
},
formatDate(date) {
// YYYY-MM-DD
const year = date.getFullYear();
const month = String(date.getMonth() + 1).padStart(2, '0'); // 0
const day = String(date.getDate()).padStart(2, '0');
return `${year}-${month}-${day}`;
},
/** 导出按钮操作 */
handleExport() {
this.download('wms/put/export', {
...this.queryParams
}, `put_${new Date().getTime()}.xlsx`)
}
}
};
</script>
Loading…
Cancel
Save