Merge remote-tracking branch 'origin/master'

master
Yangwl 1 year ago
commit f460c1b2b5

@ -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() { export function getConvert() {
@ -145,3 +153,11 @@ export function syncSAP() {
method: 'post' method: 'post'
}); });
} }
//下发生产工单
export function deleteOrder(orderIds) {
return request({
url: '/plan/order/deleteOrder/' + orderIds,
method: 'post'
});
}

@ -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'
});
}

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

@ -196,7 +196,7 @@
<el-table-column label="排产数量" align="center" prop="quantity" width="100"/> <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="unit" />
<el-table-column label="累计报工数量" align="center" prop="quantityFeedback" width="100"/> <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="workTime" />
<el-table-column label="生产时间" align="center" prop="productDate" width="100"/> <el-table-column label="生产时间" align="center" prop="productDate" width="100"/>
<el-table-column label="SAP报工状态" align="center" prop="uploadStatus" width="150"> <el-table-column label="SAP报工状态" align="center" prop="uploadStatus" width="150">
@ -468,7 +468,9 @@
:label="item.title" :label="item.title"
:name="item.libId" :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" :summary-method="getSummaries"
show-summary show-summary
> >
@ -514,35 +516,64 @@
:label="item.title" :label="item.title"
:name="item.libId" :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 width="50" align="center" type="selection"/>
<el-table-column label="recordId" align="center" prop="recordId" v-if="false"/> <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="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"/> :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="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"> <template slot-scope="scope">
<el-input type="number" size="small" v-model="scope.row.quantity" @change="handleEdit(scope.$index,scope.row)"></el-input> <el-input type="number" size="small" v-model="scope.row.quantity" @change="handleEdit(scope.$index,scope.row)"></el-input>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="单位" width="50" align="center" prop="unit"/> <el-table-column label="单位" width="50" align="center" prop="unit"/>
<el-table-column label="反冲标识" align="center" prop="recoil"/> <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 label="创建时间" align="center" prop="createTime" width="150"/>
<!--
<el-table-column fixed="right" label="操作" width="90"> <el-table-column fixed="right" label="操作" width="90">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button @click.native.prevent="deleteBomRow(scope.$index, item.libList)" <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> 移除</el-button>
</template> </template>
</el-table-column>--> </el-table-column>
</el-table> </el-table>
<div class="button-container">
<el-button size="mini" type="primary" @click="addConsumeTableRow(item.libList)"></el-button>
</div>
</el-tab-pane> </el-tab-pane>
<!--工单产品bom参考--> <!--工单产品bom参考
<el-tab-pane label="BOM组成参照" name="pBom"> <el-tab-pane label="BOM组成参照" name="pBom">
<el-table v-loading="loading" :data="pBomTableList" ref="pBomTable" <el-table v-loading="loading" :data="pBomTableList" ref="pBomTable"
row-key="materialCode" row-key="materialCode"
@ -562,7 +593,7 @@
<el-table-column label="成本核算标识相关" align="center" prop="sanka" width="100"/> <el-table-column label="成本核算标识相关" align="center" prop="sanka" width="100"/>
</el-table> </el-table>
</el-tab-pane> </el-tab-pane>
-->
</el-tabs> </el-tabs>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
@ -649,10 +680,10 @@
@onSelected="onSelectEquip" @onSelected="onSelectEquip"
></ItemSelectEquip> ></ItemSelectEquip>
<!--最新领料单选择弹窗--> <!--最新领料单选择弹窗-->
<ItemSelectNewPrepare <ItemSelectMaterial
ref="itemSelectNewPrepare" ref="itemSelectNewPrepare"
@onSelected="onSelectNewPrepare" @onSelected="onSelectNewPrepare"
></ItemSelectNewPrepare> ></ItemSelectMaterial>
<!--母工单----> <!--母工单---->
<!-- 打印预览弹出层 --> <!-- 打印预览弹出层 -->
<el-dialog <el-dialog
@ -685,29 +716,26 @@
<el-table v-if="refreshNewWorkerTable" v-loading="newWorkerLoading" class="my-print-table" <el-table v-if="refreshNewWorkerTable" v-loading="newWorkerLoading" class="my-print-table"
:data="printData.workTable" border style="width: 100%"> :data="printData.workTable" border style="width: 100%">
<el-table-column type="index" label="序号" width="50"></el-table-column> <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="workorderCodeSap" label="订单号" width="130" :formatter="orderCodeFormate"/>
<el-table-column prop="workorderCode" label="生产工单号" width="130"></el-table-column> <!--<el-table-column prop="workorderCode" label="生产工单号" width="150"></el-table-column>-->
<el-table-column prop="productCode" label="物料编码" width="120" :formatter="productCodeFormate"/> <el-table-column prop="productCode" label="物料编码" width="150" :formatter="productCodeFormate"/>
<el-table-column prop="productName" label="物料名称" width="180"></el-table-column> <el-table-column prop="productName" label="物料名称" width="300"></el-table-column>
<el-table-column prop="unit" label="单位" width="50"></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="version" label="版本"></el-table-column>
<el-table-column prop="quantity" 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="batch" label="批次" width="300"></el-table-column>
<el-table-column prop="quantityFeedback" label="批次数量" width="100"></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-column prop="voucher" label="凭证"></el-table-column>-->
</el-table> </el-table>
<br/> <br/>
<!-- 底部
<el-row class="my-print-foot"> <el-row class="my-print-foot">
<el-col :offset="1" :span="3">SAP-No:{{ printData.SAPNo }}</el-col> <el-col :offset="1" :span="6">车间负责人:</el-col>
<el-col :offset="1" :span="3">Z-PM-F-030-A.1</el-col> <el-col :offset="1" :span="6">车间交货人:</el-col>
<el-col :offset="1" :span="6">仓库验收人:</el-col>
</el-row> </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-row>
-->
</el-form> </el-form>
@ -720,9 +748,9 @@
</template> </template>
<script> <script>
import { listReportWork, getReportWork, delReportWork, addReportWork, getWorkcenterList, import { listReportWork, getReportWork, delReportWork, addReportWork, getWorkcenterList,getWarehouseList,
updateReportWork,reportSap,getBatchList,reportSapCancel, updateReportWork,reportSap,getBatchList,reportSapCancel,
getAllLevelReportList, getAllLevelReportList,deleteBomRowNow,
getReportSAPList,submitReportPS,submitReportPSSAP,getCKList, getReportSAPList,submitReportPS,submitReportPSSAP,getCKList,
getPutInOrderList getPutInOrderList
} from "@/api/mes/reportWork"; } from "@/api/mes/reportWork";
@ -730,14 +758,14 @@ import { getConsumeList,submitConsumePS,submitReportInfo,getBomList,getAllLevelC
import ReportWorkConsume from "./reportWorkConsume.vue"; import ReportWorkConsume from "./reportWorkConsume.vue";
import ItemSelectUser from "./selectUser.vue"; import ItemSelectUser from "./selectUser.vue";
import ItemSelectWorkOrder from "./selectWorkOrder.vue"; import ItemSelectWorkOrder from "./selectWorkOrder.vue";
import ItemSelectNewPrepare from "./selectNewPrepare.vue"; import ItemSelectMaterial from "./selectMaterial.vue";
import ItemSelectEquip from "./selectEquip.vue"; import ItemSelectEquip from "./selectEquip.vue";
import moment from 'moment'; import moment from 'moment';
import { getlistCK } from '@/api/wms/outorder' import { getlistCK } from '@/api/wms/outorder'
export default { export default {
name: "ReportWork", name: "ReportWork",
dicts: ['report_type','report_sap_status'], dicts: ['report_type','report_sap_status'],
components: {ReportWorkConsume,ItemSelectUser,ItemSelectWorkOrder,ItemSelectEquip,ItemSelectNewPrepare}, components: {ReportWorkConsume,ItemSelectUser,ItemSelectWorkOrder,ItemSelectEquip,ItemSelectMaterial},
data() { data() {
return { return {
optType: undefined, optType: undefined,
@ -897,23 +925,33 @@ export default {
],workCenter: [ ],workCenter: [
{ required: true, message: "工作中心不能为空", trigger: "blur" } { required: true, message: "工作中心不能为空", trigger: "blur" }
], ],
} },
consumeList : [],
cwarehouseList:[]
}; };
}, },
created() { created() {
this.getDate(); this.getDate();
this.getWorkcenterList(); this.getWorkcenterList();
this.getWarehouseList();
}, },
methods: { methods: {
getWorkcenterList(){ getWorkcenterList(){
getWorkcenterList().then(data => { getWorkcenterList().then(data => {
this.options1 = data; this.options1 = data;
}); });
}, },
//
getWarehouseList(){
getWarehouseList({}).then(data => {
this.cwarehouseList = data;
});
},
// //
productCodeFormate(row, column, cellValue){ productCodeFormate(row, column, cellValue){
if(cellValue !=null){
return cellValue.slice(7,18); // return cellValue.slice(7,18); //
}
}, },
// //
orderCodeFormate(row, column, cellValue){ orderCodeFormate(row, column, cellValue){
@ -1057,6 +1095,7 @@ export default {
this.pConsumeRows = []; this.pConsumeRows = [];
this.sConsumeRows = []; this.sConsumeRows = [];
this.consumeRows = []; this.consumeRows = [];
this.consumeList = [];
}, },
/** 搜索按钮操作 */ /** 搜索按钮操作 */
handleQuery() { handleQuery() {
@ -1189,6 +1228,7 @@ export default {
_this.$modal.msgSuccess("报工成功"); _this.$modal.msgSuccess("报工成功");
} }
_this.loading = false; _this.loading = false;
_this.getList();
}); });
}).then(() => { }).then(() => {
@ -1208,6 +1248,7 @@ export default {
_this.$modal.msgSuccess("报工撤销成功"); _this.$modal.msgSuccess("报工撤销成功");
} }
_this.loading = false; _this.loading = false;
_this.getList();
}); });
}).then(() => { }).then(() => {
@ -1244,9 +1285,45 @@ export default {
console.log('row:',index, row); console.log('row:',index, row);
}, },
// //
pReportSelection(selection) { pReportSelection(selection,row) {
this.pReportRows = this.pReportRows.concat(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;
}, []);
// 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() { submitReport() {
this.reportRows = this.pReportRows; this.reportRows = this.pReportRows;
if ( this.reportRows==0) { if ( this.reportRows==0) {
@ -1304,30 +1381,70 @@ export default {
this.queryParams.workorderCode = sr.workorderCode; this.queryParams.workorderCode = sr.workorderCode;
//BOM //BOM
this.queryParams.parentOrder = '0'; //this.queryParams.parentOrder = '0';
getBomList(this.queryParams).then(response => { //getBomList(this.queryParams).then(response => {
this.pBomTableList = this.handleTree(response, 'materialCode', 'pMaterialCode') // this.pBomTableList = this.handleTree(response, 'materialCode', 'pMaterialCode')
}); //});
}, },
// // (zxl)
pConsumeSelection(selection) { pConsumeSelection(selection, row) {
this.pConsumeRows = this.pConsumeRows.concat(selection) 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) { sConsumeSelection(selection) {
this.sConsumeRows = selection this.sConsumeRows = selection;
}, },
submitConsume() { submitConsume() {
this.loading = true;
this.consumeRows = this.pConsumeRows; this.consumeRows = this.pConsumeRows;
if ( this.consumeRows==0) { if ( this.consumeRows==0) {
this.$modal.msgError(`请选择数据`); this.$modal.msgError(`请选择要修改的物料数据!`);
this.loading = false;
return false; return false;
} }
submitConsumePS(this.consumeRows).then(response => { submitConsumePS(this.consumeRows).then(response => {
this.$modal.msgSuccess("报工信息修改成功"); this.$modal.msgSuccess("报工信息修改成功");
this.openConsume = false; this.openConsume = false;
this.reset();
this.getList(); this.getList();
this.loading = false;
}); });
}, },
/** 导出按钮操作 */ /** 导出按钮操作 */
@ -1429,22 +1546,70 @@ export default {
}, },
//-- //--
deleteBomRow(index, rows) { 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); rows.splice(index, 1);
this.$modal.msgSuccess("删除成功");
}).catch(() => {});
}, },
//-- //--
addConsumeTableRow(consumeList){ addConsumeTableRow(rows){
this.consumeList = rows;
if(consumeList.length==0){ if(rows.length==0){
this.$modal.msgError(`上位机尚未填写损耗,不允许提前新增`); this.$modal.msgError(`上位机尚未填写损耗,不允许提前新增`);
return return
} }
this.$refs.itemSelectNewPrepare.showFlag = true; this.$refs.itemSelectNewPrepare.showFlag = true;
this.$refs.itemSelectNewPrepare.init(consumeList[0].workorderCode); this.$refs.itemSelectNewPrepare.init(rows[0].workorderCode,this.selectRow[0].workorderCode);
}, },
//-- //--
onSelectNewPrepare(obj) { onSelectNewPrepare(obj) {
console.log(obj) 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);
}
}
} }
} }
}; };
@ -1462,4 +1627,18 @@ export default {
margin-left: 15px; margin-left: 15px;
height: 38px; 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> </style>

@ -45,27 +45,18 @@
<el-table-column width="50" align="center" type="selection"> <el-table-column width="50" align="center" type="selection">
</el-table-column> </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="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="productGroup" :show-overflow-tooltip="true" />
<el-table-column label="物料组名称" width="100" align="left" prop="productGroupName" :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"> <el-table-column label="实际用量" align="center" prop="quantity">
<template slot-scope="scope"> <template slot-scope="scope">
<el-input type="number" size="small" v-model="scope.row.quantity" @change="handleEdit(scope.$index,scope.row)"></el-input> <el-input type="number" size="small" v-model="scope.row.quantity" @change="handleEdit(scope.$index,scope.row)"></el-input>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="单位" align="center" prop="unit"> <el-table-column label="单位" width="100" align="center" prop="unit"></el-table-column>
<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> </el-table>
<pagination <pagination
@ -111,15 +102,17 @@ export default {
id: "id", id: "id",
label: "label" label: "label"
}, },
workorderCode:'',
// //
queryParams: { queryParams: {
pageNum: 1, pageNum: 1,
pageSize: 10, pageSize: 10,
productCode: '', productCode: '',
workorderCode:'',
component : '', component : '',
componentName : '', componentName : '',
productGroupName:'' productGroupName:'',
workorderCode:'',
parentOrder:''
}, },
selectionRows:[] selectionRows:[]
}; };
@ -129,9 +122,16 @@ export default {
}, },
methods: { methods: {
init(productCode,workorderCode){ //
this.queryParams.productCode = productCode; productCodeFormate(row, column, cellValue){
this.queryParams.workorderCode = workorderCode; if(cellValue !=null){
return cellValue.slice(7,18); //
}
},
init(workorderCode,parentOrder){
this.workorderCode = workorderCode;
this.queryParams.workorderCode = this.workorderCode;
this.queryParams.parentOrder = parentOrder;
this.getList(); this.getList();
}, },
/** 查询表格列表*/ /** 查询表格列表*/
@ -171,7 +171,12 @@ export default {
return false; return false;
} }
this.$emit('onSelected', this.$refs.myTable.selection); //
this.selectionRows.forEach(obj => {
obj.workorderCode = this.workorderCode;
});
this.$emit('onSelected', this.selectionRows);
this.showFlag = false; this.showFlag = false;
}, },
} }

@ -54,6 +54,16 @@
> >
</el-date-picker> </el-date-picker>
</el-form-item> </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-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery"></el-button> <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-button icon="el-icon-refresh" size="mini" @click="resetQuery"></el-button>
@ -72,6 +82,17 @@
>SAP同步 >SAP同步
</el-button> </el-button>
</el-col> </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-col :span="1.5">
<el-button <el-button
type="primary" type="primary"
@ -153,12 +174,11 @@
<span>{{ parseTime(scope.row.createTime, '{y}-{m}-{d} {h}:{i}:{s}') }}</span> <span>{{ parseTime(scope.row.createTime, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
</template> </template>
</el-table-column> </el-table-column>
<!-- <el-table-column label="订单状态" align="center" prop="delFlag">
<el-table-column width="120" label="更新时间" align="center" prop="updateTime">
<template slot-scope="scope"> <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> </template>
</el-table-column>--> </el-table-column>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width " fixed="right"> <el-table-column label="操作" align="center" class-name="small-padding fixed-width " fixed="right">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button <el-button
@ -167,7 +187,7 @@
icon="el-icon-plus" icon="el-icon-plus"
@click="splitBtn(scope.row)" @click="splitBtn(scope.row)"
v-hasPermi="['mes:pro:order:edit']" v-hasPermi="['mes:pro:order:edit']"
v-if="scope.row.parentOrder == 0" v-if="scope.row.parentOrder == 0 && scope.row.delFlag == 0"
>拆分 >拆分
</el-button> </el-button>
</template> </template>
@ -545,11 +565,12 @@ import {
getProRoutes,getProSortNo, getProRoutes,getProSortNo,
getProShifts, getProShifts,
getWorkOrderList, getWorkOrderList,
subSplitOrder, subSplitOrder,checkRepeatBatchCodes,
listOrder, listOrder,
addOrder, addOrder,
updateOrder, updateOrder,
syncSAP, selectMaterielList,getAutoSplitList syncSAP, selectMaterielList,getAutoSplitList,
deleteOrder
} from '@/api/plan/order' } from '@/api/plan/order'
import Treeselect from '@riophae/vue-treeselect' import Treeselect from '@riophae/vue-treeselect'
import '@riophae/vue-treeselect/dist/vue-treeselect.css' import '@riophae/vue-treeselect/dist/vue-treeselect.css'
@ -558,7 +579,7 @@ import {getToken} from "@/utils/auth"
export default { export default {
name: 'Order', name: 'Order',
dicts: ['product_type', 'order_status','order_type'], dicts: ['product_type', 'order_status','order_type','sys_notice_status'],
components: { components: {
Treeselect Treeselect
}, },
@ -614,6 +635,9 @@ export default {
splitData: [], splitData: [],
//线list //线list
proline: [], proline: [],
//
single: true,
nodelete: true,
// //
splitnum: null, splitnum: null,
// //
@ -854,7 +878,6 @@ export default {
}, },
// - // -
handleFileSuccess(response, file, fileList) { handleFileSuccess(response, file, fileList) {
debugger
this.upload.open = false; this.upload.open = false;
this.upload.isUploading = false; this.upload.isUploading = false;
this.$refs.upload.clearFiles(); this.$refs.upload.clearFiles();
@ -920,7 +943,8 @@ export default {
// //
getProRoutes(row.prodCode).then(response => { getProRoutes(row.prodCode).then(response => {
this.routes = response.data 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') var ymd = moment(this.splitForm.productDate).format('YYYY-MM-DD')
@ -1146,6 +1170,33 @@ export default {
}, },
// - // -
batchBtn() { 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; this.loading = true;
// //
if (this.splitForm.splitNum == null) { if (this.splitForm.splitNum == null) {
@ -1243,14 +1294,17 @@ export default {
routeCode: this.splitForm.routeCode, routeCode: this.splitForm.routeCode,
sortNo: this.splitForm.sortNo sortNo: this.splitForm.sortNo
} }
this.loading = true;
subSplitOrder(data).then(response => { subSplitOrder(data).then(response => {
if (response.code == 500) { if (response.code == 500) {
this.$modal.msgError(response.msg) this.$modal.msgError(response.msg)
return return
} }else{
this.$modal.msgSuccess('提交成功') this.$modal.msgSuccess('提交成功')
}
this.queryParams.status = "o1" this.queryParams.status = "o1"
this.loading = false;
this.getList() this.getList()
}) })
@ -1274,6 +1328,7 @@ export default {
this.loading = false; this.loading = false;
}, },
// -- // --
cancel() { cancel() {
this.dialogVisible = false; this.dialogVisible = false;
@ -1382,7 +1437,8 @@ export default {
/**自动排产**/ /**自动排产**/
// //
handleAutoSplitSelection(selection) { handleAutoSplitSelection(selection) {
this.single = selection.length !== 1
this.nodelete = selection.length!==1||selection[0].delFlag==1
this.orderCodes = selection this.orderCodes = selection
}, },
// //
@ -1400,6 +1456,34 @@ export default {
} else { } else {
return false; 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) { handleUpdateDown(row) {
var statusesArray = this.statuses; var statusesArray = this.statuses;
for (var i = 0; i < statusesArray.length; i++) { for (var i = 0; i < statusesArray.length; i++) {
if (statusesArray[i] != 'w0') {// if (statusesArray[i] != 'w0') {//
@ -880,6 +881,7 @@ export default {
return return
} }
} }
this.loading = true; this.loading = true;
let _this = this; let _this = this;
const workorderIds = row.workorderCode || this.codes; const workorderIds = row.workorderCode || this.codes;

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

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

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

@ -160,20 +160,6 @@
<!-- 添加或修改检验方案维护对话框 --> <!-- 添加或修改检验方案维护对话框 -->
<el-dialog :title="title" :visible.sync="open" width="800px" append-to-body> <el-dialog :title="title" :visible.sync="open" width="800px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="100px"> <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-row>
<el-col :span="8" v-if="form.goalType=='yyyy'"> <el-col :span="8" v-if="form.goalType=='yyyy'">
<el-form-item label="年份" prop="goalYm"> <el-form-item label="年份" prop="goalYm">
@ -321,7 +307,7 @@ export default {
showSearch: true, showSearch: true,
// //
total: 0, total: 0,
// //
qcGoalList: [], qcGoalList: [],
checkTypeList: [], checkTypeList: [],
checkTypes: [], checkTypes: [],
@ -446,7 +432,7 @@ export default {
handleAdd() { handleAdd() {
this.reset(); this.reset();
this.open = true; this.open = true;
this.title = "添加检验方案维护"; this.title = "添加质量目标";
// //
this.form.goalType="yyyy" this.form.goalType="yyyy"
}, },
@ -457,7 +443,7 @@ export default {
getQcGoal(id).then(response => { getQcGoal(id).then(response => {
this.form = response.data; this.form = response.data;
this.open = true; this.open = true;
this.title = "修改检验方案维护"; this.title = "修改质量目标";
this.handleCheckTypeList(this.form.typeCode); this.handleCheckTypeList(this.form.typeCode);
}); });
}, },

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

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

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

Loading…
Cancel
Save