LAPTOP-R6EHHS26\86155 8 months ago
commit 19cb511f5e

@ -286,3 +286,19 @@ export function getNewPrepareData(workorderCode) {
});
}
// 删除报工报表
export function deleteBomRowNow(id) {
return request({
url: '/mes/reportWork/deleteBomRowNow/' + id,
method: 'delete'
});
}
//
export function getWarehouseList(query) {
return request({
url: '/mes/reportWork/getWarehouseList',
method: 'get',
params: query
});
}

@ -79,6 +79,14 @@ export function subSplitOrder(data) {
})
}
// 提交拆分
export function checkRepeatBatchCodes(data) {
return request({
url: '/plan/order/checkRepeatBatchCodes',
method: 'post',
data: data
})
}
// 获取换算值
export function getConvert() {
@ -145,3 +153,11 @@ export function syncSAP() {
method: 'post'
});
}
//下发生产工单
export function deleteOrder(orderIds) {
return request({
url: '/plan/order/deleteOrder/' + orderIds,
method: 'post'
});
}

@ -42,3 +42,11 @@ export function delMaterial(id) {
method: 'delete'
});
}
export function getUserList(query) {
return request({
url: '/quality/material/userList',
method: 'get',
params: query
});
}

@ -0,0 +1,44 @@
import request from '@/utils/request'
// 查询市场反馈信息列表
export function listQcFeedback(query) {
return request({
url: '/quality/qcFeedback/list',
method: 'get',
params: query
});
}
// 查询市场反馈信息详细
export function getQcFeedback(recordId) {
return request({
url: '/quality/qcFeedback/' + recordId,
method: 'get'
});
}
// 新增市场反馈信息
export function addQcFeedback(data) {
return request({
url: '/quality/qcFeedback',
method: 'post',
data: data
});
}
// 修改市场反馈信息
export function updateQcFeedback(data) {
return request({
url: '/quality/qcFeedback',
method: 'put',
data: data
});
}
// 删除市场反馈信息
export function delQcFeedback(recordId) {
return request({
url: '/quality/qcFeedback/' + recordId,
method: 'delete'
});
}

@ -60,3 +60,27 @@ export function getRightList(query) {
params: query
});
}
export function getSelectedUsers(query) {
return request({
url: '/quality/material/getSelectedUsers',
method: 'get',
params: query
});
}
export function addUserBind(data) {
return request({
url: '/quality/material/addUserBind',
method: 'post',
data: data
});
}
export function deleteByMaterialCode(data) {
return request({
url: '/quality/material/deleteByMaterialCode',
method: 'delete',
data: data
});
}

@ -68,6 +68,14 @@ export function getEquipmentTypeList() {
});
}
// 查询字典中的设备类型
export function getEquipmentTypeDeptList() {
return request({
url: '/wms/equipment/getEquipmentTypeDeptList',
method: 'get'
});
}
// 查询设备备件
export function getSparePartsList() {
return request({

Binary file not shown.

After

Width:  |  Height:  |  Size: 374 KiB

@ -1,10 +1,10 @@
<template xmlns:fontSize="http://www.w3.org/1999/xhtml">
<div>
<div id="cards">
<div style="height: 35vh;margin-right: 0.6vw;margin-bottom: 12px;" class="card-item" v-for="(card, i) in dataProp.data1" :key="card.title">
<div id="cards" style="height: 20vh">
<div style="height: 20vh;margin-right: 0.6vw;margin-bottom: 12px;" class="card-item" v-for="(card, i) in dataProp.data1" :key="card.title">
<div class="card-header">
<div class="card-header-left">{{ card.title }}</div>
<div class="card-header-right">{{ card.i }}</div>
<!-- <div class="card-header-right">{{ card.i }}</div>-->
</div>
<div class="card-box">
</div>
@ -46,11 +46,11 @@
</div>
<div id="cardss">
<div style="height: 35vh;margin-right: 0.6vw;margin-bottom: 12px;" class="card-item" v-for="(card, i) in dataProp.data2" :key="card.title">
<div id="cardss" style="height: 20vh">
<div style="height: 20vh;margin-right: 0.6vw;margin-bottom: 12px;" class="card-item" v-for="(card, i) in dataProp.data2" :key="card.title">
<div class="card-header">
<div class="card-header-left">{{ card.title }}</div>
<div class="card-header-right">{{ (i + 9) }}</div>
<!-- <div class="card-header-right">{{ (i + 9) }}</div>-->
</div>
<div class="card-box">
</div>
@ -91,6 +91,51 @@
</div>
</div>
<div id="cardsss" style="height: 20vh">
<div style="height: 20vh;margin-right: 0.6vw;margin-bottom: 12px;" class="card-item" v-for="(card, i) in dataProp.data3" :key="card.title">
<div class="card-header">
<div class="card-header-left">{{ card.title }}</div>
<!-- <div class="card-header-right">{{ (i + 9) }}</div>-->
</div>
<div class="card-box">
</div>
<div class="card-footer">
<div class="card-footer-item">
<div class="footer-title">烘房模式</div>
<div class="footer-detail">
<span :style="{ fontSize: '25px', fontWeight: 'bold', color: getTextColor(card.model), textAlign: 'right' }">
{{ getTagModel(card.model) }}
</span>
</div>
</div>
<div class="card-footer-item">
<div class="footer-title">门前数量</div>
<div class="footer-detail">
<span :style="{ fontSize: '25px', fontWeight: 'bold', color: getTextColor(card.dollyNumber), textAlign: 'right' }">
{{ getTagText(card.dollyNumber) }}
</span>
</div>
</div>
</div>
<div class="card-footer">
<div class="card-footer-item">
<div class="footer-title">烘房温度</div>
<div class="footer-detail">
<span style="font-size: 25px;font-weight: bold; color: #ea6027; textAlign: 'right'">{{ card.temperature }}</span>
</div>
</div>
<div class="card-footer-item">
<div class="footer-title">保持时长</div>
<div class="footer-detail">
<span style="font-size: 25px;font-weight: bold; color: #26fcd8; textAlign: 'right'">{{ card.waitmin }}</span>min
</div>
</div>
</div>
</div>
</div>
</div>
</template>
@ -105,6 +150,7 @@ export default {
return {
cards: [],
cardss: [],
cardsss: [],
}
},
methods: {
@ -144,6 +190,9 @@ export default {
this.cardss = new Array(8).fill(0).map((foo, i) => ({
title: '烘房' + (i + 9),
}));
this.cardsss = new Array(8).fill(0).map((foo, i) => ({
title: '烘房' + (i + 9),
}));
},
@ -158,10 +207,10 @@ export default {
</script>
<style lang="less">
#cards ,#cardss {
#cards ,#cardss , #cardsss{
display: flex;
justify-content: space-between;
height: 35vh;
margin-bottom: 12px;
.card-item {

@ -1,9 +1,9 @@
<template>
<div class="fullscreen-carousel">
<el-carousel :interval="3000" indicator-position="outside" @change="handleScroll">
<el-carousel-item v-for="(item,k) in 2" :key="item" >
<el-carousel-item v-for="(item,k) in 1" :key="item" >
<h3 v-if="k===0"><cards :dataProp="cards" /></h3>
<h3 v-if="k===1"><cards2 :dataProp="cardss"/></h3>
<!-- <h3 v-if="k===1"><cards2 :dataProp="cardss"/></h3>-->
</el-carousel-item>
</el-carousel>
</div>
@ -25,7 +25,7 @@ export default {
//
name: 'carousel',
components: {
cards2,
// cards2,
cards
},
props: {
@ -40,7 +40,6 @@ export default {
data1:[],
data2:[],
},
cardss: [],
}
},
@ -55,7 +54,7 @@ export default {
this.cards.data2 = new Array(8).fill(0).map((foo, i) => ({
i:(i+9),
}));
this.cardss = new Array(5).fill(0).map((foo, i) => ({
this.cards.data3 = new Array(5).fill(0).map((foo, i) => ({
i: (i === 0 ? 17 : i === 1 ? 18 : i === 2 ? 61 : i === 3 ? 62 : 63),
}));
// console.log(this.cards.data1)
@ -93,6 +92,22 @@ export default {
return card;
}
});
this.cards.data3 = this.cards.data3.map((card) => {
const matchingIndex = response.data.dryingroomList.find((index) => index.i === card.i);
if (matchingIndex) {
return {
...card,
title: '烘房' + matchingIndex.i,
model: matchingIndex.status,
dollyNumber:matchingIndex.dollyNumber,
waitmin:matchingIndex.waitmin,
temperature:matchingIndex.temperature
};
} else {
return card;
}
});
this.cardss = this.cardss.map((card) => {

@ -196,7 +196,7 @@
<el-table-column label="排产数量" align="center" prop="quantity" width="100"/>
<el-table-column label="单位" align="center" prop="unit" />
<el-table-column label="累计报工数量" align="center" prop="quantityFeedback" width="100"/>
<el-table-column label="用人数" align="center" prop="useMan" width="100"/>
<!--<el-table-column label="用人数" align="center" prop="useMan" width="100"/>-->
<el-table-column label="累计工时" align="center" prop="workTime" />
<el-table-column label="生产时间" align="center" prop="productDate" width="100"/>
<el-table-column label="SAP报工状态" align="center" prop="uploadStatus" width="150">
@ -468,16 +468,19 @@
:label="item.title"
:name="item.libId"
>
<el-table v-loading="loading" :data="item.libList" ref="myPOrderTable" @selection-change="pReportSelection"
<el-table v-loading="loading" :data="item.libList" ref="myPOrderTable"
@select="pReportSelection"
@select-all="allReportSelection"
:summary-method="getSummaries"
show-summary
:ref = "tableIndex+index"
>
<el-table-column width="50" align="center" type="selection"/>
<el-table-column width="60" align="center" type="selection"/>
<el-table-column label="id" align="center" prop="id" v-if="false"/>
<el-table-column label="工单编码" width="150" align="left" prop="workorderCode" :show-overflow-tooltip="true" />
<el-table-column label="订单编码" width="150" align="left" prop="workorderCodeSap" :show-overflow-tooltip="true"
<el-table-column label="工单编码" width="130" align="left" prop="workorderCode" :show-overflow-tooltip="true" />
<el-table-column label="订单编码" width="110" align="left" prop="workorderCodeSap" :show-overflow-tooltip="true"
:formatter="orderCodeFormate"/>
<el-table-column label="报工单号" width="150" align="left" prop="reportCode" :show-overflow-tooltip="true" />
<el-table-column label="报工单号" width="110" align="left" prop="reportCode" :show-overflow-tooltip="true" />
<el-table-column label="批次" width="250" align="left" prop="batch" :show-overflow-tooltip="true" />
<el-table-column label="单位" align="center" prop="unit"/>
<el-table-column label="报工数量" width="100" align="left" prop="quantityFeedback" :show-overflow-tooltip="true" >
@ -497,6 +500,13 @@
</el-table-column>
<el-table-column label="创建时间" align="center" prop="createTime" width="150"/>
</el-table>
<div class="demo-input-suffix">
<p>备注</p>
<el-input type="textarea" @blur ="addRemarksblur(item.libList,item.remark,index)" v-model="item.remark"
placeholder="请输入内容(300个字内)" maxlength=300/>
</el-input>
</div>
</el-tab-pane>
</el-tabs>
<div slot="footer" class="dialog-footer">
@ -514,35 +524,64 @@
:label="item.title"
:name="item.libId"
>
<!--<el-button size="mini" type="primary" @click="addConsumeTableRow(item.libList)"></el-button>-->
<el-table v-loading="loading" :data="item.libList" ref="mypConsumeTable" @selection-change="pConsumeSelection">
<el-table v-loading="loading" :data="item.libList" ref="mypConsumeTable"
@select="pConsumeSelection"
@select-all="allConsumeSelection"
>
<el-table-column width="50" align="center" type="selection"/>
<el-table-column label="recordId" align="center" prop="recordId" v-if="false"/>
<el-table-column label="parentOrder" align="center" prop="parentOrder" v-if="false"/>
<el-table-column label="工单编码" width="140" align="left" prop="workorderCode" :show-overflow-tooltip="true" />
<el-table-column label="订单编码" width="150" align="left" prop="workorderCodeSap" :show-overflow-tooltip="true"
<el-table-column label="订单编码" width="130" align="left" prop="workorderCodeSap" :show-overflow-tooltip="true"
:formatter="orderCodeFormate"/>
<el-table-column label="物料编码" width="180" align="left" prop="materialCode" :show-overflow-tooltip="true" />
<el-table-column label="物料编码" width="130" align="left" prop="materialCode" :show-overflow-tooltip="true"
:formatter="productCodeFormate"
/>
<el-table-column label="物料名称" width="280" align="left" prop="materialName" :show-overflow-tooltip="true" />
<el-table-column label="实际用量" width="120" align="left" prop="quantity" :show-overflow-tooltip="true" >
<el-table-column label="BOM组件用量" width="150" align="left" prop="planQuantity"/>
<el-table-column label="实际用量" width="150" align="left" prop="quantity" :show-overflow-tooltip="true" >
<template slot-scope="scope">
<el-input type="number" size="small" v-model="scope.row.quantity" @change="handleEdit(scope.$index,scope.row)"></el-input>
</template>
</el-table-column>
<el-table-column label="单位" width="50" align="center" prop="unit"/>
<el-table-column label="反冲标识" align="center" prop="recoil"/>
<el-table-column label="仓库" width="150" align="center" prop="warehouseCode">
<template slot-scope="scope">
<el-select v-model="scope.row.warehouseCode" placeholder="请选择仓库" width="50%"
@change="handleEdit(scope.$index,scope.row)"
v-if="scope.row.workorderCodeSap == null||scope.row.attr1"
clearable
>
<el-option
v-for="work in cwarehouseList"
:key="work.warehouseCode"
:label="work.warehouseName"
:value="work.warehouseCode"
></el-option>
</el-select>
</template>
</el-table-column>
<el-table-column label="创建时间" align="center" prop="createTime" width="150"/>
<!--
<el-table-column fixed="right" label="操作" width="90">
<template slot-scope="scope">
<el-button @click.native.prevent="deleteBomRow(scope.$index, item.libList)"
size="small" type="danger" plain>
size="small" type="danger" plain
v-if="scope.row.workorderCodeSap == null||scope.row.attr1"
>
移除</el-button>
</template>
</el-table-column>-->
</el-table-column>
</el-table>
<div class="button-container">
<el-button size="mini" type="primary" @click="addConsumeTableRow(item.libList,index)"></el-button>
</div>
</el-tab-pane>
<!--工单产品bom参考-->
<!--工单产品bom参考
<el-tab-pane label="BOM组成参照" name="pBom">
<el-table v-loading="loading" :data="pBomTableList" ref="pBomTable"
row-key="materialCode"
@ -562,7 +601,7 @@
<el-table-column label="成本核算标识相关" align="center" prop="sanka" width="100"/>
</el-table>
</el-tab-pane>
-->
</el-tabs>
<div slot="footer" class="dialog-footer">
@ -649,10 +688,10 @@
@onSelected="onSelectEquip"
></ItemSelectEquip>
<!--最新领料单选择弹窗-->
<ItemSelectNewPrepare
<ItemSelectMaterial
ref="itemSelectNewPrepare"
@onSelected="onSelectNewPrepare"
></ItemSelectNewPrepare>
></ItemSelectMaterial>
<!--母工单---->
<!-- 打印预览弹出层 -->
<el-dialog
@ -685,29 +724,26 @@
<el-table v-if="refreshNewWorkerTable" v-loading="newWorkerLoading" class="my-print-table"
:data="printData.workTable" border style="width: 100%">
<el-table-column type="index" label="序号" width="50"></el-table-column>
<el-table-column prop="workorderCodeSap" label="订单号" width="100" :formatter="orderCodeFormate"/>
<el-table-column prop="workorderCode" label="生产工单号" width="130"></el-table-column>
<el-table-column prop="productCode" label="物料编码" width="120" :formatter="productCodeFormate"/>
<el-table-column prop="productName" label="物料名称" width="180"></el-table-column>
<el-table-column prop="unit" label="单位" width="50"></el-table-column>
<el-table-column prop="workorderCodeSap" label="订单号" width="130" :formatter="orderCodeFormate"/>
<!--<el-table-column prop="workorderCode" label="生产工单号" width="150"></el-table-column>-->
<el-table-column prop="productCode" label="物料编码" width="150" :formatter="productCodeFormate"/>
<el-table-column prop="productName" label="物料名称" width="300"></el-table-column>
<el-table-column prop="unit" label="单位" width="70"></el-table-column>
<el-table-column prop="version" label="版本"></el-table-column>
<el-table-column prop="quantity" label="报工数量"></el-table-column>
<el-table-column prop="batch" label="批次" width="240"></el-table-column>
<el-table-column prop="quantityFeedback" label="批次数量" width="100"></el-table-column>
<el-table-column prop="voucher" label="凭证"></el-table-column>
<!--<el-table-column prop="quantity" label="报工数量"></el-table-column>-->
<el-table-column prop="batch" label="批次" width="300"></el-table-column>
<el-table-column prop="quantityFeedback" label="批次数量" width="90"></el-table-column>
<!--<el-table-column prop="voucher" label="凭证"></el-table-column>-->
</el-table>
<br/>
<!-- 底部
<el-row class="my-print-foot">
<el-col :offset="1" :span="3">SAP-No:{{ printData.SAPNo }}</el-col>
<el-col :offset="1" :span="3">Z-PM-F-030-A.1</el-col>
</el-row>
<el-row class="my-print-foot">
<el-col :offset="1" :span="3">制单人:{{ printData.manufacture }}</el-col>
<el-col :offset="1" :span="3">审核人{{ printData.auditor }}</el-col>
<el-col :offset="1" :span="6">车间负责人:</el-col>
<el-col :offset="1" :span="6">车间交货人:</el-col>
<el-col :offset="1" :span="6">仓库验收人:</el-col>
</el-row>
-->
</el-form>
@ -720,9 +756,9 @@
</template>
<script>
import { listReportWork, getReportWork, delReportWork, addReportWork, getWorkcenterList,
import { listReportWork, getReportWork, delReportWork, addReportWork, getWorkcenterList,getWarehouseList,
updateReportWork,reportSap,getBatchList,reportSapCancel,
getAllLevelReportList,
getAllLevelReportList,deleteBomRowNow,
getReportSAPList,submitReportPS,submitReportPSSAP,getCKList,
getPutInOrderList
} from "@/api/mes/reportWork";
@ -730,14 +766,14 @@ import { getConsumeList,submitConsumePS,submitReportInfo,getBomList,getAllLevelC
import ReportWorkConsume from "./reportWorkConsume.vue";
import ItemSelectUser from "./selectUser.vue";
import ItemSelectWorkOrder from "./selectWorkOrder.vue";
import ItemSelectNewPrepare from "./selectNewPrepare.vue";
import ItemSelectMaterial from "./selectMaterial.vue";
import ItemSelectEquip from "./selectEquip.vue";
import moment from 'moment';
import { getlistCK } from '@/api/wms/outorder'
export default {
name: "ReportWork",
dicts: ['report_type','report_sap_status'],
components: {ReportWorkConsume,ItemSelectUser,ItemSelectWorkOrder,ItemSelectEquip,ItemSelectNewPrepare},
components: {ReportWorkConsume,ItemSelectUser,ItemSelectWorkOrder,ItemSelectEquip,ItemSelectMaterial},
data() {
return {
optType: undefined,
@ -897,23 +933,34 @@ export default {
],workCenter: [
{ required: true, message: "工作中心不能为空", trigger: "blur" }
],
}
},
consumeList : [],
cwarehouseList:[],
tableIndex: 'tableIndex'
};
},
created() {
this.getDate();
this.getWorkcenterList();
this.getWarehouseList();
},
methods: {
getWorkcenterList(){
getWorkcenterList().then(data => {
this.options1 = data;
});
},
//
getWarehouseList(){
getWarehouseList({}).then(data => {
this.cwarehouseList = data;
});
},
//
productCodeFormate(row, column, cellValue){
if(cellValue !=null){
return cellValue.slice(7,18); //
}
},
//
orderCodeFormate(row, column, cellValue){
@ -1057,6 +1104,7 @@ export default {
this.pConsumeRows = [];
this.sConsumeRows = [];
this.consumeRows = [];
this.consumeList = [];
},
/** 搜索按钮操作 */
handleQuery() {
@ -1189,6 +1237,7 @@ export default {
_this.$modal.msgSuccess("报工成功");
}
_this.loading = false;
_this.getList();
});
}).then(() => {
@ -1208,6 +1257,7 @@ export default {
_this.$modal.msgSuccess("报工撤销成功");
}
_this.loading = false;
_this.getList();
});
}).then(() => {
@ -1244,9 +1294,45 @@ export default {
console.log('row:',index, row);
},
//
pReportSelection(selection) {
this.pReportRows = this.pReportRows.concat(selection)
pReportSelection(selection,row) {
const allRows = this.pReportRows.concat(selection)
this.pReportRows = allRows.reduce((acc, cur) => {
const hasDuplicate = acc.some(item => item.batch === cur.batch
&& item.workorderCode === cur.workorderCode);
if (!hasDuplicate) {
acc.push(cur);
}
return acc;
}, []);
// selectedRows
if (selection.indexOf(row) === -1) {
console.log('Row unchecked:', row);
console.log('过滤前:', this.pReportRows);
var newReportRows = [];
this.pReportRows.forEach(item=>{
if (item.workorderCode!=row.workorderCode
|| item.batch!=row.batch) {
newReportRows.push(item)
}
})
this.pReportRows = newReportRows;
console.log('过滤后:', this.pReportRows);
}
},
allReportSelection(selection){
const allRows = this.pReportRows.concat(selection)
this.pReportRows = allRows.reduce((acc, cur) => {
const hasDuplicate = acc.some(item => item.batch === cur.batch
&& item.workorderCode === cur.workorderCode);
if (!hasDuplicate) {
acc.push(cur);
}
return acc;
}, []);
},
submitReport() {
this.reportRows = this.pReportRows;
if ( this.reportRows==0) {
@ -1304,30 +1390,70 @@ export default {
this.queryParams.workorderCode = sr.workorderCode;
//BOM
this.queryParams.parentOrder = '0';
getBomList(this.queryParams).then(response => {
this.pBomTableList = this.handleTree(response, 'materialCode', 'pMaterialCode')
});
//this.queryParams.parentOrder = '0';
//getBomList(this.queryParams).then(response => {
// this.pBomTableList = this.handleTree(response, 'materialCode', 'pMaterialCode')
//});
},
//
pConsumeSelection(selection) {
this.pConsumeRows = this.pConsumeRows.concat(selection)
// (zxl)
pConsumeSelection(selection, row) {
const allRows = this.pConsumeRows.concat(selection)
this.pConsumeRows = allRows.reduce((acc, cur) => {
const hasDuplicate = acc.some(item => item.materialCode === cur.materialCode
&& item.workorderCode === cur.workorderCode);
if (!hasDuplicate) {
acc.push(cur);
}
return acc;
}, []);
// selectedRows
if (selection.indexOf(row) === -1) {
console.log('Row unchecked:', row);
console.log('过滤前:', this.pConsumeRows);
var newPConsumeRows = [];
this.pConsumeRows.forEach(item=>{
if (item.workorderCode!=row.workorderCode
|| item.materialCode!=row.materialCode) {
newPConsumeRows.push(item)
}
})
this.pConsumeRows = newPConsumeRows;
console.log('过滤后:', this.pConsumeRows);
}
},
// all(zxl)
allConsumeSelection(selection, row) {
const allRows = this.pConsumeRows.concat(selection)
this.pConsumeRows = allRows.reduce((acc, cur) => {
const hasDuplicate = acc.some(item => item.materialCode === cur.materialCode
&& item.workorderCode === cur.workorderCode);
if (!hasDuplicate) {
acc.push(cur);
}
return acc;
}, []);
},
sConsumeSelection(selection) {
this.sConsumeRows = selection
this.sConsumeRows = selection;
},
submitConsume() {
this.loading = true;
this.consumeRows = this.pConsumeRows;
if ( this.consumeRows==0) {
this.$modal.msgError(`请选择数据`);
this.$modal.msgError(`请选择要修改的物料数据!`);
this.loading = false;
return false;
}
submitConsumePS(this.consumeRows).then(response => {
this.$modal.msgSuccess("报工信息修改成功");
this.openConsume = false;
this.reset();
this.getList();
this.loading = false;
});
},
/** 导出按钮操作 */
@ -1429,22 +1555,85 @@ export default {
},
//--
deleteBomRow(index, rows) {
this.$modal.confirm('是否确认删除?确认后,不需要点击下方确定,立马删除!').then(function() {
if(rows[index].recordId != null ){
return deleteBomRowNow(rows[index].recordId);
}
}).then(() => {
var newPConsumeRows = [];
this.pConsumeRows.forEach(item=>{
if (item.workorderCode!=rows[index].workorderCode
|| item.materialCode!=rows[index].materialCode) {
newPConsumeRows.push(item)
}
})
this.pConsumeRows = newPConsumeRows;
rows.splice(index, 1);
this.$modal.msgSuccess("删除成功");
}).catch(() => {});
},
//--
addConsumeTableRow(consumeList){
if(consumeList.length==0){
addConsumeTableRow(rows,index){
this.consumeList = rows;
if(rows.length==0){
this.$modal.msgError(`上位机尚未填写损耗,不允许提前新增`);
return
}
this.$refs.itemSelectNewPrepare.showFlag = true;
this.$refs.itemSelectNewPrepare.init(consumeList[0].workorderCode);
this.$refs.itemSelectNewPrepare.init(rows[0].workorderCode,this.selectRow[0].workorderCode,index);
},
//--
onSelectNewPrepare(obj) {
console.log(obj)
onSelectNewPrepare(obj,tableIndx) {
let sr = this.selectRow[0]
for(let i=0;i<obj.length;i++){
if(this.pConsumeRows.length !=0 ){
this.pConsumeRows.forEach(item=>{
if (item.materialCode==obj[i].component) {
this.$modal.msgError("选择物料重复,自动过滤!");
}else{
const row = {
workorderCode: obj[i].workorderCode,
materialCode: obj[i].component,
materialName: obj[i].componentName,
quantity: obj[i].quantity,
unit: obj[i].unit,
recoil:"X",
parentOrder:sr.workorderCode
};
this.consumeList.push(row);
}
})
}else{
const row = {
workorderCode: obj[i].workorderCode,
materialCode: obj[i].component,
materialName: obj[i].componentName,
quantity: obj[i].quantity,
unit: obj[i].unit,
recoil:"X",
parentOrder:sr.workorderCode
};
this.consumeList.push(row);
/**
//
this.$nextTick(() => {
let dynamicRef = 'tableIndex'+tableIndx;
console.log(dynamicRef)
this.$refs[dynamicRef].toggleRowSelection(row, true);
});
**/
}
}
},
//
addRemarksblur(table,remark,index){
table.forEach(item=>{
item.remark = remark;
})
}
}
};
@ -1462,4 +1651,18 @@ export default {
margin-left: 15px;
height: 38px;
}
.button-container {
text-align: right;
margin-top: 10px;
margin-right: 10px;
}
.my-print-table {
font-size: 20px;
}
.my-print-nav {
font-size: 19px;
}
.my-print-foot {
font-size: 19px;
}
</style>

@ -45,27 +45,18 @@
<el-table-column width="50" align="center" type="selection">
</el-table-column>
<!-- 序号 -->
<el-table-column label="物料编码" width="100" align="left" prop="component" :show-overflow-tooltip="true" />
<el-table-column label="物料编码" width="130" align="left" prop="component" :show-overflow-tooltip="true"
:formatter="productCodeFormate"
/>
<el-table-column label="物料名称" width="200" align="left" prop="componentName" :show-overflow-tooltip="true" />
<el-table-column label="物料组" width="80" align="left" prop="productGroup" :show-overflow-tooltip="true" />
<el-table-column label="物料组名称" width="100" align="left" prop="productGroupName" :show-overflow-tooltip="true" />
<el-table-column label="损耗数量" align="center" prop="quantity">
<el-table-column label="物料组" width="100" align="left" prop="productGroup" :show-overflow-tooltip="true" />
<el-table-column label="物料组名称" width="120" align="left" prop="productGroupName" :show-overflow-tooltip="true" />
<el-table-column label="实际用量" align="center" prop="quantity">
<template slot-scope="scope">
<el-input type="number" size="small" v-model="scope.row.quantity" @change="handleEdit(scope.$index,scope.row)"></el-input>
</template>
</el-table-column>
<el-table-column label="单位" align="center" prop="unit">
<template slot-scope="scope">
<el-select v-model="scope.row.unit" placeholder="请选择单位" width="50%" @change="handleEdit(scope.$index,scope.row)">
<el-option
v-for="dict in dict.type.unit"
:key="dict.value"
:label="dict.label"
:value="dict.value"
></el-option>
</el-select>
</template>
</el-table-column>
<el-table-column label="单位" width="100" align="center" prop="unit"></el-table-column>
</el-table>
<pagination
@ -111,17 +102,20 @@ export default {
id: "id",
label: "label"
},
workorderCode:'',
//
queryParams: {
pageNum: 1,
pageSize: 10,
productCode: '',
workorderCode:'',
component : '',
componentName : '',
productGroupName:''
productGroupName:'',
workorderCode:'',
parentOrder:''
},
selectionRows:[]
selectionRows:[],
tableIndex:''
};
},
created() {
@ -129,9 +123,17 @@ export default {
},
methods: {
init(productCode,workorderCode){
this.queryParams.productCode = productCode;
this.queryParams.workorderCode = workorderCode;
//
productCodeFormate(row, column, cellValue){
if(cellValue !=null){
return cellValue.slice(7,18); //
}
},
init(workorderCode,parentOrder,tableIndex){
this.workorderCode = workorderCode;
this.queryParams.workorderCode = this.workorderCode;
this.queryParams.parentOrder = parentOrder;
this.tableIndex = tableIndex;
this.getList();
},
/** 查询表格列表*/
@ -171,7 +173,12 @@ export default {
return false;
}
this.$emit('onSelected', this.$refs.myTable.selection);
//
this.selectionRows.forEach(obj => {
obj.workorderCode = this.workorderCode;
});
this.$emit('onSelected', this.selectionRows,this.tableIndex);
this.showFlag = false;
},
}

@ -109,7 +109,7 @@
<el-table-column label="子工序编码" align="center" prop="childprocessCode" />
<el-table-column label="子工序名称" align="center" prop="childprocessName" />
<el-table-column label="工序单价(元/pc" align="center" prop="attr1" />
<el-table-column label="标准用人" align="center" prop="attr2" />
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button

@ -73,7 +73,7 @@
</el-table-column>
<el-table-column label="物料描述" align="center" width="250" prop="productName" />
<el-table-column label="产线编码" align="center" prop="lineCode" />
<el-table-column label="产线名称" align="center" prop="equipmentName" />
<el-table-column label="产线名称" align="center" width="250" prop="equipmentName" />
<el-table-column label="操作者" width="110" align="center" prop="nickName" />
<el-table-column label="子工序名称" width="110" align="center" prop="childprocessName" />
<el-table-column label="工序单价" align="center" prop="attr1" />

@ -54,6 +54,16 @@
>
</el-date-picker>
</el-form-item>
<el-form-item label="订单状态" prop="delFlag">
<el-select v-model="queryParams.delFlag" placeholder="请选择订单是否有效" clearable>
<el-option
v-for="dict in dict.type.sys_notice_status"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</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>
@ -72,6 +82,17 @@
>SAP同步
</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="danger"
plain
icon="el-icon-s-release"
size="mini"
@click="handleDeleteOrder"
:disabled="nodelete"
v-hasPermi="['mes:pro:order:edit']"
>关闭订单</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="primary"
@ -153,12 +174,11 @@
<span>{{ parseTime(scope.row.createTime, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
</template>
</el-table-column>
<!--
<el-table-column width="120" label="更新时间" align="center" prop="updateTime">
<el-table-column label="订单状态" align="center" prop="delFlag">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.planComplete, '{y}-{m}-{d}') }}</span>
<dict-tag :options="dict.type.sys_notice_status" :value="scope.row.delFlag"/>
</template>
</el-table-column>-->
</el-table-column>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width " fixed="right">
<template slot-scope="scope">
<el-button
@ -167,7 +187,7 @@
icon="el-icon-plus"
@click="splitBtn(scope.row)"
v-hasPermi="['mes:pro:order:edit']"
v-if="scope.row.parentOrder == 0"
v-if="scope.row.parentOrder == 0 && scope.row.delFlag == 0"
>拆分
</el-button>
</template>
@ -545,11 +565,12 @@ import {
getProRoutes,getProSortNo,
getProShifts,
getWorkOrderList,
subSplitOrder,
subSplitOrder,checkRepeatBatchCodes,
listOrder,
addOrder,
updateOrder,
syncSAP, selectMaterielList,getAutoSplitList
syncSAP, selectMaterielList,getAutoSplitList,
deleteOrder
} from '@/api/plan/order'
import Treeselect from '@riophae/vue-treeselect'
import '@riophae/vue-treeselect/dist/vue-treeselect.css'
@ -558,7 +579,7 @@ import {getToken} from "@/utils/auth"
export default {
name: 'Order',
dicts: ['product_type', 'order_status','order_type'],
dicts: ['product_type', 'order_status','order_type','sys_notice_status'],
components: {
Treeselect
},
@ -614,6 +635,9 @@ export default {
splitData: [],
//线list
proline: [],
//
single: true,
nodelete: true,
//
splitnum: null,
//
@ -854,7 +878,6 @@ export default {
},
// -
handleFileSuccess(response, file, fileList) {
debugger
this.upload.open = false;
this.upload.isUploading = false;
this.$refs.upload.clearFiles();
@ -920,7 +943,8 @@ export default {
//
getProRoutes(row.prodCode).then(response => {
this.routes = response.data
this.splitForm.routeCode = response.data[0]
this.splitForm.routeCode = response.data[0].routeCode
this.changeRoute(this.splitForm.routeCode)
})
var ymd = moment(this.splitForm.productDate).format('YYYY-MM-DD')
@ -1146,6 +1170,33 @@ export default {
},
// -
batchBtn() {
this.loading = true;
let _this = this;
//
var repeatBatchCodes = "";
checkRepeatBatchCodes({formFields: this.formFields}).then(response => {
if(response != ""){
this.$modal.confirm('出现重复使用的批次号'+response+',是否继续进行拆分?').then(function () {
_this.batchBtnFunc();
}).then(() => {
_this.getList()
_this.loading = false;
}).catch(
function (e) {
if (e == 'cancel') {
_this.loading = false;
} else if(e == 'close') {
_this.loading = false;
}
})
}else{
_this.batchBtnFunc();
}
});
},
batchBtnFunc(){
this.loading = true;
//
if (this.splitForm.splitNum == null) {
@ -1243,14 +1294,17 @@ export default {
routeCode: this.splitForm.routeCode,
sortNo: this.splitForm.sortNo
}
this.loading = true;
subSplitOrder(data).then(response => {
if (response.code == 500) {
this.$modal.msgError(response.msg)
return
}
}else{
this.$modal.msgSuccess('提交成功')
}
this.queryParams.status = "o1"
this.loading = false;
this.getList()
})
@ -1274,6 +1328,7 @@ export default {
this.loading = false;
},
// --
cancel() {
this.dialogVisible = false;
@ -1382,7 +1437,8 @@ export default {
/**自动排产**/
//
handleAutoSplitSelection(selection) {
this.single = selection.length !== 1
this.nodelete = selection.length!==1||selection[0].delFlag==1
this.orderCodes = selection
},
//
@ -1400,6 +1456,34 @@ export default {
} else {
return false;
}
},
//
handleDeleteOrder(){
this.loading = true;
let _this = this;
const orderIds = this.orderCodes.map(item => item.id);
const orderCodes = this.orderCodes.map(item => item.orderCode);
this.$modal.confirm('是否确认关闭订单"' + orderCodes + '"').then(function () {
deleteOrder(orderIds).then(response => {
if(response.code == 200){
this.$modal.msgSuccess("操作成功");
}else{
this.$modal.msgError(response.mgs);
}
});
}).then(() => {
this.loading = false;
this.getList();
}).catch(
function (e) {
if (e == 'cancel') {
_this.loading = false;
} else if(e == 'close') {
_this.loading = false;
}
});
}
}

@ -873,6 +873,7 @@ export default {
},
// -
handleUpdateDown(row) {
var statusesArray = this.statuses;
for (var i = 0; i < statusesArray.length; i++) {
if (statusesArray[i] != 'w0') {//
@ -880,6 +881,7 @@ export default {
return
}
}
this.loading = true;
let _this = this;
const workorderIds = row.workorderCode || this.codes;

@ -89,6 +89,12 @@
@click="handleDelete(scope.row)"
v-hasPermi="['quality:checkType:remove']"
>删除</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-connection"
@click="handleBind(scope.row)"
>绑定</el-button>
</template>
</el-table-column>
</el-table>
@ -132,27 +138,61 @@
</el-form-item>
</el-col>
</el-row>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm"> </el-button>
<el-button @click="cancel"> </el-button>
</div>
</el-dialog>
<!-- 用户绑定 -->
<el-dialog :title="titleUserBind" :visible.sync="openUserBind" width="800px">
<el-table v-loading="userloading" :data="userList" ref="userBindTable" >
<el-table-column label="序号" align="center" type="index" width="50" />
<el-table-column label="员工编号" align="center" prop="userCode" />
<el-table-column label="姓名" align="center" prop="userName" />
<el-table-column fixed="right" label="操作" width="90">
<template slot-scope="scope">
<el-button
size="small"
type="danger"
plain
@click="deleteUser(scope.row)"
>
移除</el-button>
</template>
</el-table-column>
</el-table>
<div class="button-container">
<el-button size="mini" type="primary" @click="addUser()" >新增员工</el-button>
</div>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="handleClose" > </el-button>
</div>
</el-dialog>
<!--人员选择弹窗-->
<ItemSelectUser
ref="itemSelectUser"
@onSelected="onSelectUser"
></ItemSelectUser>
</div>
</template>
<script>
import { listCheckType, getCheckType, delCheckType, addCheckType, updateCheckType } from "@/api/quality/checkType";
import{ getSelectedUsers, addUserBind,deleteByMaterialCode} from "@/api/quality/userbind";
import ItemSelectUser from "./selectUser.vue";
export default {
name: "CheckType",
dicts: ["check_type"],
components: {
ItemSelectUser
},
data() {
return {
//
loading: true,
userloading: true,
//
ids: [],
//
@ -161,12 +201,16 @@ export default {
multiple: true,
//
showSearch: true,
openUserBind: false,
//
total: 0,
//
checkTypeList: [],
userList: [],
userRows: [],
//
title: "",
titleUserBind: "",
//
open: false,
//
@ -180,6 +224,15 @@ export default {
attr1: null,
factoryCode: null,
},
getUserParams: {
pageNum: 1,
pageSize: 10,
userCode: null,
userName: null,
materialCode: null,
materialName: null,
phonenumber: null,
},
//
form: {},
//
@ -293,7 +346,102 @@ export default {
this.download('quality/checkType/export', {
...this.queryParams
}, `checkType_${new Date().getTime()}.xlsx`)
},
/** 人员绑定按钮操作页面 */
handleBind(row){
//this.reset();
this.userloading = true;
let sr = row;
//
this.materialCode = sr.orderCode;
this.materialName = sr.checkName;
this.getUserParams.materialCode = sr.orderCode;
//
getSelectedUsers(this.getUserParams).then(response => {
this.userList = response.rows;
this.openUserBind = true;
this.titleUserBind = "人员绑定详情";
this.userloading = false;
});
},
getSelectUserList() {
this.userloading = true;
//this.getUserParams.materialCode = orderCode;
getSelectedUsers(this.getUserParams).then(response => {
this.userList = response.rows;
this.userloading = false;
});
},
userSelection(selection) {
const allRows = this.userRows.concat(selection)
this.userRows = allRows.reduce((acc, cur) => {
const hasDuplicate = acc.some(item => item.materialCode === cur.materialCode);
if (!hasDuplicate) {
acc.push(cur);
}
return acc;
}, []);
},
//
handleClose() {
this.openUserBind = false;
},
//
addUser() {
this.$refs.itemSelectUser.showFlag = true;
},
//
onSelectUser(obj) {
let data = {
materialCode: this.materialCode,
materialName: this.materialName,
userCodes: [],
userNames: [],
}
obj.forEach((item, index) => {
data.userCodes.push(item.userCode);
data.userNames.push(item.userName);
});
addUserBind(data).then(response => {
if(response.code === 200) {
this.$modal.msgSuccess("人员绑定成功");
}else{
this.$modal.msgError(response.msg);
}
this.getSelectUserList();
});
},
deleteUser(row) {
const userCode = row.userCode;
const userName = row.userName;
const data = {
materialCode: this.materialCode,
userCode: userCode,
userName: userName,
}
this.$modal.confirm('是否确认删除用户名为"' + userName + '"的数据项?').then(function() {
return deleteByMaterialCode(data);
}).then(response => {
if(response.code === 200) {
this.$modal.msgSuccess("删除成功");
}else{
this.$modal.msgError(response.msg);
}
this.getSelectUserList();
}).catch(() => {});
},
}
};
</script>
<style scoped>
.button-container {
text-align: right;
margin-top: 10px;
margin-right: 10px;
}
</style>

@ -0,0 +1,182 @@
<template>
<el-dialog title="人员选择"
v-if="showFlag"
:visible.sync="showFlag"
:modal= false
width="1000px"
>
<el-row :gutter="20">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="80px" align="center">
<el-col :span="6" :xs="6">
<el-form-item label="员工工号">
<el-input
v-model="queryParams.userCode"
placeholder="员工工号"
clearable
style="width: 160px"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="员工部门">
<Treeselect
v-model="queryParams.deptId"
:options="deptOptions"
:show-count="true"
placeholder="请选择归属部门"
@keyup.enter.native="handleQuery"
>
<label slot="option-label" slot-scope="{ node, shouldShowCount, count, labelClassName, countClassName }"
:class="labelClassName"
:title="node.label"
>
{{ node.label }}
</label>
</Treeselect>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="员工姓名">
<el-input
v-model="queryParams.userName"
placeholder="员工姓名"
clearable
style="width: 160px"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
</el-col>
<el-col :span="6">
<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-col>
</el-form>
</el-row>
<el-table v-loading="loading" :data="itemList" @selection-change="handleBomSelectionChange" ref="myTable" >
<el-table-column width="50" align="center" type="selection">
</el-table-column>
<!-- 序号 -->
<el-table-column label="员工ID" align="left" key="userId" prop="userId" :show-overflow-tooltip="true" />
<el-table-column label="员工工号" align="left" key="userCode" prop="userCode" :show-overflow-tooltip="true" />
<el-table-column label="员工姓名" align="left" key="userName" prop="userName" :show-overflow-tooltip="true" />
<el-table-column label="员工部门" align="left" key="deptName" prop="deptName" :show-overflow-tooltip="true" />
<el-table-column label="手机号" align="left" key="phonenumber" prop="phonenumber" :show-overflow-tooltip="true" />
</el-table>
<pagination
v-show="total>0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitBomForm"> </el-button>
<el-button @click="showFlag=false"> </el-button>
</div>
</el-dialog>
</template>
<script>
import { getUserList } from "@/api/quality/material";
import { deptTreeSelect } from "@/api/system/user";
import Treeselect from "@riophae/vue-treeselect";
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
export default {
name: "itemSelectUser",
components: { Treeselect },
data() {
return {
showFlag:false,
//
selectedRows: {},
//
single: true,
//
multiple: true,
//
showSearch: true,
//
total: 0,
// BOM
itemList: null,
deptOptions: undefined,
//
bomCode: undefined,
defaultProps: {
id: "id",
label: "label"
},
//
queryParams: {
pageNum: 1,
pageSize: 10,
userCode: '',
userName: '',
deptId: null,
deptName: '',
}
};
},
created() {
this.getList();
this.getDeptTree();
},
methods: {
/** 查询表格列表*/
getList() {
this.loading = true;
getUserList(this.queryParams).then(response => {
this.itemList = response.rows;
this.total = response.total;
this.loading = false;
}
);
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm");
this.handleQuery();
},
//
handleBomSelectionChange(selection) {
this.selectedRows = selection;
},
/** 查询部门下拉树结构 */
getDeptTree() {
deptTreeSelect().then(response => {
this.deptOptions = response.data;
});
},
submitBomForm() {
this.$emit('onSelected', this.selectedRows);
this.showFlag = false;
}
}
};
</script>
<style scoped>
.labelClassName {
width: 100%;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
</style>

@ -75,26 +75,27 @@
@pagination="getList"
/>
<!-- 添加或修改人员物料绑定对话框 -->
<!-- 添加或修改人员线体绑定对话框 -->
<el-dialog :title="title" :visible.sync="open" width="960px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
<el-form-item label="用户编码" prop="userCodes">
<el-input v-model="form.userCodes" disabled placeholder="请输入用户编码" />
<el-form-item label="用户编码" prop="handleCode">
<el-input v-model="handleCode" disabled placeholder="请输入用户编码" />
</el-form-item>
</el-form>
<el-tabs type="border-card" v-if="form.userCodes != null">
<el-tab-pane label="关联物料">
<UserBind v-if="form.userCodes != null"
:optType="optType"
<el-tab-pane label="关联线体">
<UserBind ref="userBind"
v-if="form.userCodes != null"
:userCodes="form.userCodes"
:userNames="form.userNames"
:handleCode="handleCode"
>
</UserBind>
</el-tab-pane>
</el-tabs>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm"> </el-button>
<el-button @click="cancel"> </el-button>
<!-- <el-button @click="cancel"> </el-button> -->
</div>
</el-dialog>
</div>
@ -113,15 +114,17 @@ export default {
loading: true,
//
ids: [],
names: [],
//
single: true,
//
multiple: true,
//
showSearch: true,
handleCode: '',
//
total: 0,
//
// 线
materialList: [],
//
title: "",
@ -158,7 +161,7 @@ export default {
this.getList();
},
methods: {
/** 查询人员物料绑定列表 */
/** 查询人员线体绑定列表 */
getList() {
this.loading = true;
listMaterial(this.queryParams).then(response => {
@ -209,33 +212,46 @@ export default {
},
//
handleSelectionChange(selection) {
this.ids = selection.map(item => item.userCode)
this.single = selection.length!==1
this.multiple = !selection.length
this.ids = selection.map(item => item.userCode);
this.names = selection.map(item => item.userName);
this.single = selection.length!==1;
this.multiple = !selection.length;
},
/** 新增按钮操作 */
handleAdd() {
this.reset();
this.open = true;
this.title = "添加人员物料绑定";
this.title = "添加人员线体绑定";
},
/** 绑定按钮操作 */
handleUpdate(row) {
this.reset();
const userCodes = row.userCode || this.ids;
const userNames = row.userName;
let userCodes = [];
let userNames = [];
if(row.userCode) {
userCodes[0] = row.userCode;
}else{
userCodes = this.ids;
}
if(row.userName) {
userNames[0] = row.userName
}else{
userNames = this.names;
}
this.handleCode = userCodes.toString().then(()=>{
this.form.userCodes = userCodes;
this.form.userNames = userNames;
this.open = true;
this.title = "修改人员物料绑定";
this.optType = "edit";
// getMaterial(userCode).then(response => {
this.title = "修改人员线体绑定";
});
// });
},
/** 提交按钮 */
submitForm() {
this.open = false;
this.$refs.userBind.liftList = [];
this.$refs.userBind.rightList = [];
this.getList();
/* this.$refs["form"].validate(valid => {
if (valid) {
@ -258,7 +274,7 @@ export default {
/** 删除按钮操作 */
handleDelete(row) {
const ids = row.userCode || this.ids;
this.$modal.confirm('是否确认删除人员物料绑定编号为"' + ids + '"的数据项?').then(function() {
this.$modal.confirm('是否确认删除人员线体绑定编号为"' + ids + '"的数据项?').then(function() {
return delMaterial(ids);
}).then(() => {
this.getList();

@ -1,5 +1,5 @@
<template>
<div>
<div v-loading.lock="loading">
<div class="query">
<el-input
style="width: 351px; margin-bottom: 10px"
@ -108,7 +108,7 @@
import { getListProduct,getRightList ,addProduct} from "@/api/quality/userbind";
export default {
name: "Routeprodproduct",
name: "userBind",
data() {
return {
@ -136,8 +136,8 @@ export default {
queryParams: {
pageNum: 1,
pageSize: 10,
userCode: this.userCodes,
userName: this.userNames,
userCodes: null,
userNames: null,
itemId: null,
itemCode: null,
materialName: null,
@ -155,7 +155,7 @@ export default {
//--------------------->
leftList: [],
rightList: [],
titles: ["未关联产品", "已关联产品"],
titles: ["未关联线体", "已关联线体"],
//
Ltotal: "",
LPageNum: "1",
@ -165,8 +165,8 @@ export default {
leftLength: null,
leftQueryParams: {
materialName: null,
userCodes: this.userCodes,
userNames: this.userNames,
userCodes: null,
userNames: null,
pageNum: 1,
pageSize: 20,
},
@ -179,22 +179,39 @@ export default {
RNextPage: null,
rightQueryParams: {
materialName: null,
userCodes: this.userCodes,
userNames: this.userNames,
userCodes: null,
userNames: null,
pageNum: 1,
pageSize: 20,
},
};
},
props: {
userCodes: undefined,
userNames: undefined,
optType: undefined,
userCodes: {
type: [Array],
required: true
},
userNames: {
type: [Array],
required: true
},
handleCode: {
type: [String],
required: true
}
},
created() {
this.getList();
this.getRightListFun();
},
watch: {
handleCode(newVal,oldVal) {
if(newVal !== oldVal) {
this.getList();
this.getRightListFun();
}
}
},
methods: {
// // 穿
// filterMethod(keyword, row) {
@ -209,6 +226,7 @@ export default {
/** 查询未分配产品列表 */
getList() {
this.loading = true;
this.leftQueryParams.userCodes = this.userCodes;
getListProduct(this.leftQueryParams).then((response) => {
this.LPages = Math.ceil(response.total / this.LPageSize);
this.leftList = response.rows;
@ -236,6 +254,7 @@ export default {
/** 查询已分配产品列表 -------------------------------*/
getRightListFun() {
this.loading = true;
this.rightQueryParams.userCodes = this.userCodes;
getRightList(this.rightQueryParams).then((response) => {
this.RPages = Math.ceil(response.total / this.RPageSize);
@ -273,8 +292,8 @@ export default {
reset() {
this.form = {
recordId: null,
userCode: this.userCodes,
userName: this.userNames,
userCode: null,
userName: null,
itemId: null,
itemCode: null,
materialName: null,
@ -293,7 +312,9 @@ export default {
/** 提交按钮 */
handleChange(value, direction, movedKeys) {
if (this.queryParams.userCode != null) {
this.queryParams.userCodes = this.userCodes;
this.queryParams.userNames = this.userNames;
if (this.queryParams.userCodes !== null) {
this.queryParams.selectedValues = value;
addProduct(this.queryParams).then((response) => {
this.$modal.msgSuccess("关联成功");

@ -201,7 +201,6 @@ export default {
},
watch: {
belongGoalId(newVal,oldVal) {
console.log(newVal);
if(newVal !== oldVal) {
this.getList();
this.getRightListFun();

@ -160,20 +160,6 @@
<!-- 添加或修改检验方案维护对话框 -->
<el-dialog :title="title" :visible.sync="open" width="800px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="100px">
<el-row>
<el-col :span="8">
<el-form-item label="目标类型" prop="goalType">
<el-select v-model="form.goalType" placeholder="请选择检验类型" clearable style="width:100%">
<el-option
v-for="dict in dict.type.qc_goal_type"
:key="dict.value"
:label="dict.label"
:value="dict.value"
></el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="8" v-if="form.goalType=='yyyy'">
<el-form-item label="年份" prop="goalYm">
@ -321,7 +307,7 @@ export default {
showSearch: true,
//
total: 0,
//
//
qcGoalList: [],
checkTypeList: [],
checkTypes: [],
@ -446,7 +432,7 @@ export default {
handleAdd() {
this.reset();
this.open = true;
this.title = "添加检验方案维护";
this.title = "添加质量目标";
//
this.form.goalType="yyyy"
},
@ -457,7 +443,7 @@ export default {
getQcGoal(id).then(response => {
this.form = response.data;
this.open = true;
this.title = "修改检验方案维护";
this.title = "修改质量目标";
this.handleCheckTypeList(this.form.typeCode);
});
},
@ -511,9 +497,9 @@ export default {
},
/** 导出按钮操作 */
handleExport() {
this.download('quality/qcProjectType/export', {
this.download('quality/qcGoal/export', {
...this.queryParams
}, `qcProjectType_${new Date().getTime()}.xlsx`)
}, `qcGoal_${new Date().getTime()}.xlsx`)
},
/** 加载时获取 */
getCheckTypeList() {

@ -430,9 +430,10 @@ export default {
checkType:[
{ required: true, message: "检验类型不能为空", trigger: "blur" }
],
/**
incomeBatchNo: [
{ required: true, message: "来料批次号不能为空", trigger: "blur" }
],
],**/
orderNo: [
{ required: true, message: "订单号不能为空", trigger: "blur" }
],
@ -454,9 +455,11 @@ export default {
checkManName: [
{ required: true, message: "检测人不能为空", trigger: "blur" }
],
/**
checkLoc: [
{ required: true, message: "检测地点不能为空", trigger: "blur" }
],
**/
}
};
},

@ -296,7 +296,7 @@
<el-button @click="cancel"> </el-button>
</div>
</el-dialog>
<!--订单选择弹窗-->
<!--物料选择弹窗-->
<ItemSelectMaterial
ref="itemSelectMaterial"
@onSelected="onSelectMaterial"
@ -599,11 +599,11 @@ export default {
});
},
/**工单选择弹出框**/
/**物料选择弹出框**/
handleSelectMaterial() {
this.$refs.itemSelectMaterial.showFlag = true;
},
//
//
onSelectMaterial(obj) {
console.log(obj);
this.form.materialName = obj.name;

@ -63,7 +63,7 @@
<el-form-item label="设备类别" prop="equipmentCategory">
<el-select
v-model="queryParams.equipmentCategory"
placeholder="设备类别(组线/设备)"
placeholder="设备类别(大类)"
style="width: 200px"
clearable
>
@ -223,7 +223,7 @@
<el-table-column
align="center"
prop="equipmentCategory"
label="设备类别(组线/设备)"
label="设备类别(大类)"
width="150"
>
<template slot-scope="scope">
@ -460,14 +460,17 @@
<el-select
v-model="form.equipmentTypeCode"
placeholder="请选择设备类型"
@change="$forceUpdate()"
@blur="filterEquipmentTypeDept"
clearable
filterable
style="width: 195px"
@keyup.enter.native="handleQuery"
>
<el-option
v-for="dict in dict.type.equ_type"
:key="dict.value"
:label="dict.label"
:value="dict.value"
v-for="item in equipmentTypeDept"
:key="item.equipmentTypeCode"
:label="item.equipmentTypeName"
:value="item.equipmentTypeCode"
></el-option>
</el-select>
</el-form-item>
@ -590,6 +593,16 @@
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="10" class="mb8">
<el-col :span="24">
<el-form-item label="备注" prop="remark">
<el-input
v-model="form.remark"
placeholder="请输入备注"
/>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="10" class="mb8">
<el-col :span="24">
<el-form-item label="设备二维码" prop="qrFileList">
@ -822,46 +835,11 @@
</div>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button v-if="this.repairRecordSteps > 0" @click="stepLast"
>上一步</el-button
>
<el-button
v-if="
this.repairRecordSteps < 4 && this.form.equipmentCategory == '1'
"
@click="stepNext"
>下一步</el-button
>
<el-button
v-if="
this.repairRecordSteps < 3 && this.form.equipmentCategory == '0'
"
@click="stepNext"
>下一步</el-button
>
<el-button
v-if="
this.repairRecordSteps < 3 && this.form.equipmentCategory == null
"
disabled
>下一步</el-button
>
<el-button
v-if="
this.repairRecordSteps == 4 && this.form.equipmentCategory == '1'
"
type="primary"
@click="submitForm"
> </el-button
>
<el-button
v-if="
this.repairRecordSteps == 3 && this.form.equipmentCategory == '0'
"
type="primary"
@click="submitForm"
> </el-button
>
<el-button v-if="this.repairRecordSteps > 0" @click="stepLast"></el-button>
<el-button v-if="this.repairRecordSteps < 4 && this.form.equipmentCategory == '1'" @click="stepNext"></el-button>
<el-button v-if="this.repairRecordSteps < 3 && this.form.equipmentCategory != '1' " @click="stepNext"></el-button>
<el-button v-if="this.repairRecordSteps == 4 && this.form.equipmentCategory == '1' " type="primary" @click="submitForm"> </el-button>
<el-button v-if="this.repairRecordSteps == 3 && this.form.equipmentCategory != '1'" type="primary" @click="submitForm"> </el-button>
<el-button @click="cancel"> </el-button>
</div>
</el-dialog>
@ -1134,6 +1112,7 @@ import {
getRightSparePartsList,
changeEquipmentStatus,
getEquipmentListByCategory,
getEquipmentTypeDeptList,
} from "@/api/wms/equipment";
import { getWorkCenterList, listFactory } from "@/api/wms/factory";
import { listTeamMembers } from "@/api/wms/team";
@ -1235,6 +1214,7 @@ export default {
qrFileList: [],
barCodeFileList: [],
equipmentTypeOption: [],
equipmentTypeDept: [],
equipmentHeadOption: [],
workCenter: [],
options1: [],
@ -1364,6 +1344,7 @@ export default {
this.getEquipmentType();
this.getEquipmentHead();
this.sparePartsList();
this.selectEquipmentTypeDept();
},
methods: {
//
@ -1382,6 +1363,17 @@ export default {
this.equipmentHeadOption = response.rows;
});
},
/** 查询设备分类字典里面维护的 */
selectEquipmentTypeDept() {
getEquipmentTypeDeptList().then((response) => {
this.equipmentTypeDept = response.rows;
});
},
filterEquipmentTypeDept(even) {
if (even.target.value) {
this.form.equipmentTypeCode = even.target.value;
}
},
/** 查询设备分类 */
getEquipmentType() {
getEquipmentTypeList().then((response) => {
@ -1524,9 +1516,13 @@ export default {
/** 新增按钮操作 */
handleAdd() {
this.reset();
//
this.selectEquipmentTypeDept();
//
getWorkCenterList().then((response) => {
this.options1 = response.data;
});
this.repairRecordSteps = 0;
this.rightList = [];
this.auxiliaryEquipmentLeftList = [];

@ -144,6 +144,7 @@
<el-input v-model="scope.row.qty" @change="handleQtyChange(scope.row, $event)"></el-input>
</template>
</el-table-column>
<el-table-column label="反冲标识" align="center" prop="userDefined3" />
<el-table-column label="包装线" align="center" prop="stationNo" width="180">
<template slot-scope="scope">
<el-select v-model="scope.row.productionLineCode" placeholder="请选择包装线" @change="change1(scope.row)" clearable

Loading…
Cancel
Save