Merge remote-tracking branch 'origin/master'

yangwl
chj 1 year ago
commit 562f93b043

@ -280,6 +280,17 @@
</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-row>
</el-form>
@ -451,6 +462,9 @@ export default {
printable: 'printFrom',
ignore: ['no-print'],
workCenter: "暂无数据",
SAPNo: null,
manufacture: null,
auditor: null,
printDate: null,
factory: null,
productDate: null,
@ -610,6 +624,7 @@ export default {
//
this.printDialogVisible = true;
this.printData.printDate = moment(new Date()).format('YYYY.MM.DD');
this.printData.manufacture = this.$store.state.user.name;
this.newWorkerLoading = true // true
this.refreshNewWorkerTable = false // refreshProTablefalse
getWorkOrders(this.selectWork.workorderCode).then(response => {
@ -1108,5 +1123,8 @@ export default {
}
.my-print-table {
}
.my-print-foot {
margin-top: 20px;
}
</style>

@ -8,7 +8,7 @@
>
<el-row :gutter="20">
<!--分类数据-->
<el-col :span="4" :xs="24">
<!-- <el-col :span="4" :xs="24">
<div class="head-container">
<el-tree
:data="treeData"
@ -20,7 +20,7 @@
@node-click="handleNodeClick"
/>
</div>
</el-col>
</el-col> -->
<!--BOM数据-->
<el-col :span="20" :xs="24">
@ -84,27 +84,27 @@ export default {
// components: { Treeselect },
data() {
return {
treeData: [{
id: '1',
label: 'BOM物料类别',
children: [{
id: 'equ_type_lg',
label: '料罐'
}, {
id: 'equ_type_cxj',
label: '成型机'
}, {
id: 'equ_type_hf',
label: '烘房'
}, {
id: 'equ_type_spj',
label: '收坯机'
}, {
id: 'equ_type_bzx',
label: '包装线'
}
]
}],
// treeData: [{
// id: '1',
// label: 'BOM',
// children: [{
// id: 'equ_type_lg',
// label: ''
// }, {
// id: 'equ_type_cxj',
// label: ''
// }, {
// id: 'equ_type_hf',
// label: ''
// }, {
// id: 'equ_type_spj',
// label: ''
// }, {
// id: 'equ_type_bzx',
// label: '线'
// }
// ]
// }],
showFlag:false,
//
selectedItemId: undefined,

@ -104,12 +104,18 @@
<el-row>
<el-col :span="12">
<el-form-item label="辅助设备" prop="device">
<el-input v-model="form.device" placeholder="请输入辅助设备" />
<el-input v-model="form.device" placeholder="请选择辅助设备" >
<el-button slot="append" @click="handleSelectEquipment" icon="el-icon-search"></el-button>
</el-input>
<ItemSelect ref="itemSelect" @onSelected="onItemSelectedEquipment" > </ItemSelect>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="BOM材料" prop="material">
<el-input v-model="form.material" placeholder="请输入辅助材料" />
<el-input v-model="form.material" placeholder="请选择BOM材料" >
<el-button slot="append" @click="handleSelectBom" icon="el-icon-search"></el-button>
</el-input>
<ItemSelectBom ref="itemSelectBom" @onSelected="onItemSelectedBom" ></ItemSelectBom>
</el-form-item>
</el-col>
</el-row>
@ -157,16 +163,16 @@
<el-button @click="cancel"> </el-button>
</div>
</el-dialog>
<ItemSelect ref="itemSelect" @onSelected="onItemSelected" > </ItemSelect>
</div>
</template>
<script>
import { listProcesscontent, getProcesscontent, delProcesscontent, addProcesscontent, updateProcesscontent } from "@/api/technology/recipecontent";
import ItemSelect from "@/components/itemSelect/index.vue";
import ItemSelect from "./single.vue";
import ItemSelectBom from "./singleBom.vue";
export default {
name: "Processcontent",
components: { ItemSelect },
components: {ItemSelect,ItemSelectBom},
data() {
return {
//
@ -301,6 +307,44 @@ export default {
}
});
},
onItemSelectedEquipment(obj){
if(obj != undefined && obj != null){
console.log('返回',obj);
if(this.form.device == null){
//obj = obj.slice(1);
console.log("if获取的",obj);
console.log("if获取的device",this.form.device);
this.form.device = obj;
}else{
console.log("else获取的",obj);
console.log("else获取的device",this.form.device);
this.form.device = this.form.device +","+obj;
}
}
},
onItemSelectedBom(obj){
if(obj != undefined && obj != null){
console.log('返回',obj);
if(this.form.material == null){
//obj = obj.slice(1);
console.log("if获取的",obj);
console.log("if获取的material",this.form.material);
this.form.material = obj;
}else{
console.log("else获取的",obj);
console.log("else获取的material",this.form.material);
this.form.material = this.form.material +","+obj;
}
}
},
//
handleSelectEquipment(){
this.$refs.itemSelect.showFlag = true;
},
//
handleSelectBom(){
this.$refs.itemSelectBom.showFlag = true;
},
/** 删除按钮操作 */
handleDelete(row) {
const contentIds = row.contentId || this.ids;

@ -0,0 +1,301 @@
<template>
<el-dialog title="设备选择"
v-if="showFlag"
:visible.sync="showFlag"
:modal= false
width="1100px"
center
>
<el-row :gutter="20">
<!--分类数据-->
<el-col :span="4" :xs="24">
<div class="head-container">
<el-tree
:data="treeData"
node-key="id"
:expand-on-click-node="false"
:filter-node-method="filterNode"
ref="tree"
default-expand-all
@node-click="handleNodeClick"
/>
</div>
</el-col>
<!--设备数据-->
<el-col :span="20" :xs="24">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item label="设备编码" prop="itemCode">
<el-input
v-model="queryParams.itemCode"
placeholder="请输入设备编码"
clearable
style="width: 240px"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="设备名称" prop="itemName">
<el-input
v-model="queryParams.itemName"
placeholder="请输入设备名称"
clearable
style="width: 240px"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery"></el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery"></el-button>
</el-form-item>
</el-form>
<el-table v-loading="loading" :data="itemList" @selection-change="handleEquipmentSelectionChange" ref="myTable">
<el-table-column width="50" align="center" type="selection">
<!-- <template v-slot="scope">
<el-radio v-model="selectedItemId" :label="scope.row.itemId" @change="handleRowChange(scope.row)">{{""}}</el-radio>
</template> -->
</el-table-column>
<!-- 序号 -->
<el-table-column type="index" width="90" align="center" :index="indexMethod" label="序号"></el-table-column>
<el-table-column label="设备编码" align="center" key="itemCode" prop="equipmentCode" v-if="columns[0].visible" >
</el-table-column>
<el-table-column label="设备类型编码" align="center" key="itemTypeCode" prop="equipmentTypeCode" v-if="columns[2].visible" >
</el-table-column>
<el-table-column label="设备名称" align="left" key="itemName" prop="equipmentName" v-if="columns[1].visible" :show-overflow-tooltip="true" />
</el-table>
<pagination
v-show="total > 0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
</el-col>
</el-row>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitEquipmentForm"> </el-button>
<el-button @click="showFlag=false"> </el-button>
</div>
</el-dialog>
</template>
<script>
import { listProcess, getProcess, delProcess, addProcess, updateProcess ,listEquipment,getEquipment} from "@/api/technology/process";
import { treeselect } from "@/api/wms/equipment";
// import Treeselect from "@riophae/vue-treeselect";
// import "@riophae/vue-treeselect/dist/vue-treeselect.css";
export default {
name: "MdItemSingle",
// components: { Treeselect },
data() {
return {
treeData: [{
id: '1',
label: '设备类别',
children: [{
id: 'equ_type_lg',
label: '料罐'
}, {
id: 'equ_type_cxj',
label: '成型机'
}, {
id: 'equ_type_hf',
label: '烘房'
}, {
id: 'equ_type_spj',
label: '收坯机'
}, {
id: 'equ_type_bzx',
label: '包装线'
}
]
}],
showFlag:false,
//
selectedItemId: undefined,
selectedRows: undefined,
//
single: true,
//
multiple: true,
//
showSearch: true,
//
total:0,
//
itemList: null,
//
itemTypeOptions: undefined,
//
equipmentTypeCode: undefined,
defaultProps: {
id: "id",
label: "label"
},
//
queryParams: {
pageNum: 1,
pageSize: 10,
itemName: undefined,
equipmentTypeCode: undefined,
itemTypeId: 0,
itemCodeGet: '',
},
//
columns: [
{ key: 0, label: `设备编码`, visible: true },
{ key: 1, label: `设备名称`, visible: true },
{ key: 2, label: `设备类型`, visible: true },
]
};
},
created() {
this.getList();
// this.getTreeselect();
},
methods: {
//
reset() {
this.form = {
itemId: null,
itemCode: this.processId,
itemType: null,
};
this.resetForm("form");
},
handleEquipmentSelectionChange (val) {
this.itemList = val
},
//
indexMethod(index){
return index+1 ;
},
//
/** 查询设备编码列表*/
getList() {
this.loading = true;
listEquipment(this.queryParams).then(response => {
this.itemList = response.rows;
this.total = response.total;
this.loading = false;
}
);
},
/** 查询分类下拉树结构 */
// getTreeselect() {
// treeselect().then(response => {
// this.itemTypeOptions = response.rows;
// console.log(response.rows);
// num = response.total;
// for (let id of response.rows) {
// if(id == 'equ_type_lg'){
// lable = '';
// }else if(id == 'equ_type_hf'){
// lable = '';
// }else if(id == 'equ_type_cpj'){
// lable = '';
// }else if(id == 'equ_type_bzx'){
// lable = '线';
// }else if(id == 'equ_type_cxj'){
// lable = '';
// }
// }
// });
// },
//
filterNode(value, data) {
console.log(value, data);
if (!value) return true;
return data.label.indexOf(value) !== -1;
},
//
handleNodeClick(data) {
this.queryParams.equipmentTypeCode = data.id;
console.log(this.equipmentTypeCode);
this.handleQuery();
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm");
this.handleQuery();
},
// handleCurrent(row){
// if(row){
// this.selectedRows = row;
// }
// },
// handleRowDbClick(row){
// if(row){
// this.selectedRows = row;
// this.$emit('onSelected',this.selectedRows);
// this.showFlag = false;
// }
// },
//
handleEquipmentSelectionChange(selection) {
this.ids = selection.map(item => item.equipmentCode);
this.single = selection.length!==1;
this.multiple = !selection.length;
console.log("多选框",this.ids);
},
//
// handleRowChange(row) {
// debugger;
// if(row){
// this.selectedRows = row;
// }
// },
//
// confirmSelect(){
// if(this.selectedItemId ==null || this.selectedItemId==0){
// this.$notify({
// title:'',
// type:'warning',
// message: '!'
// });
// return;
// }
// this.$emit('onSelected',this.selectedRows);
// this.showFlag = false;
// }
//
submitEquipmentForm() {
const data = this.ids;
console.log("数据",data);
const equipmentCode = data.toString();
console.log("拆分数据",equipmentCode);
console.log("原来的数据",this.queryParams.itemCodeGet);
if(this.queryParams.itemCodeGet == ""){
this.queryParams.itemCodeGet = equipmentCode;
}else{
this.queryParams.itemCodeGet = this.queryParams.itemCodeGet + ','+ equipmentCode;
}
this.selectedRows = this.queryParams.itemCodeGet;
this.$emit('onSelected', this.selectedRows);
this.showFlag = false;
this.queryParams.itemCodeGet = "";
},
}
};
</script>

@ -0,0 +1,247 @@
<template>
<el-dialog title="BOM物料选择"
v-if="showFlag"
:visible.sync="showFlag"
:modal= false
width="1100px"
center
>
<el-row :gutter="20">
<!--BOM数据-->
<el-col :span="24" :xs="24">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="110px">
<el-form-item label="BOM物料编码" prop="itemCode" style="width:350px">
<el-input
v-model="queryParams.itemCode"
placeholder="请输入BOM物料编码"
clearable
style="width: 240px"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="BOM物料名称" prop="itemName" style="width:350px">
<el-input
v-model="queryParams.itemName"
placeholder="请输入BOM物料名称"
clearable
style="width: 240px"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery"></el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery"></el-button>
</el-form-item>
</el-form>
<el-table v-loading="loading" :data="itemList" @selection-change="handleBomSelectionChange" ref="myTable">
<el-table-column width="50" align="center" type="selection">
<!-- <template v-slot="scope">
<el-radio v-model="selectedItemId" :label="scope.row.itemId" @change="handleRowChange(scope.row)">{{""}}</el-radio>
</template> -->
</el-table-column>
<!-- 序号 -->
<el-table-column type="index" width="90" align="center" :index="indexMethod" label="序号"></el-table-column>
<el-table-column label="BOM物料编码" align="center" key="itemCode" prop="materialCode" v-if="columns[0].visible" >
</el-table-column>
<el-table-column label="BOM物料名称" align="left" key="itemName" prop="materialDesc" v-if="columns[1].visible" :show-overflow-tooltip="true" />
</el-table>
<pagination
v-show="total>0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
</el-col>
</el-row>
<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 {listBom} from "@/api/technology/process";
export default {
name: "ItemSingleBom",
// components: { Treeselect },
data() {
return {
showFlag:false,
//
selectedItemId: undefined,
selectedRows: undefined,
//
single: true,
//
multiple: true,
//
showSearch: true,
//
total: 0,
//
itemList: null,
//
itemTypeOptions: undefined,
//
materialCode: undefined,
defaultProps: {
id: "id",
label: "label"
},
//
queryParams: {
pageNum: 1,
pageSize: 10,
itemName: undefined,
materialCode: undefined,
itemTypeId: 0,
itemCodeGet: '',
},
//
columns: [
{ key: 0, label: `BOM物料编码`, visible: true },
{ key: 1, label: `BOM物料名称`, visible: true }
]
};
},
created() {
this.getList();
// this.getTreeselect();
},
methods: {
handleEquipmentSelectionChange (val) {
this.itemList = val
},
//
indexMethod(index){
return index+1 ;
},
//
/** 查询设备编码列表*/
getList() {
this.loading = true;
listBom(this.queryParams).then(response => {
this.itemList = response.rows;
this.total = response.total;
this.loading = false;
}
);
},
/** 查询分类下拉树结构 */
// getTreeselect() {
// treeselect().then(response => {
// this.itemTypeOptions = response.rows;
// console.log(response.rows);
// num = response.total;
// for (let id of response.rows) {
// if(id == 'equ_type_lg'){
// lable = '';
// }else if(id == 'equ_type_hf'){
// lable = '';
// }else if(id == 'equ_type_cpj'){
// lable = '';
// }else if(id == 'equ_type_bzx'){
// lable = '线';
// }else if(id == 'equ_type_cxj'){
// lable = '';
// }
// }
// });
// },
//
filterNode(value, data) {
console.log(value, data);
if (!value) return true;
return data.label.indexOf(value) !== -1;
},
//
handleNodeClick(data) {
this.queryParams.materialCode = data.id;
console.log(this.materialCode);
this.handleQuery();
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm");
this.handleQuery();
},
// handleCurrent(row){
// if(row){
// this.selectedRows = row;
// }
// },
// handleRowDbClick(row){
// if(row){
// this.selectedRows = row;
// this.$emit('onSelected',this.selectedRows);
// this.showFlag = false;
// }
// },
//
handleBomSelectionChange(selection) {
this.ids = selection.map(item => item.materialCode);
this.single = selection.length!==1;
this.multiple = !selection.length;
console.log("多选框",this.ids);
},
//
// handleRowChange(row) {
// debugger;
// if(row){
// this.selectedRows = row;
// }
// },
//
// confirmSelect(){
// if(this.selectedItemId ==null || this.selectedItemId==0){
// this.$notify({
// title:'',
// type:'warning',
// message: '!'
// });
// return;
// }
// this.$emit('onSelected',this.selectedRows);
// this.showFlag = false;
// }
//
submitBomForm() {
const data = this.ids;
console.log("数据",data);
const equipmentCode = data.toString();
console.log("拆分数据",materialCode);
console.log("原来的数据",this.queryParams.itemCodeGet);
if(this.queryParams.itemCodeGet == ""){
this.queryParams.itemCodeGet = materialCode;
}else{
this.queryParams.itemCodeGet = this.queryParams.itemCodeGet + ','+ materialCode;
}
this.selectedRows = this.queryParams.itemCodeGet;
this.$emit('onSelected', this.selectedRows);
this.showFlag = false;
this.queryParams.itemCodeGet = "";
},
}
};
</script>
Loading…
Cancel
Save