前端bug修改

master
zhaoxiaolin 11 months ago
parent 2e4b125df1
commit c3a18829cc

@ -0,0 +1,140 @@
<template>
<el-dialog title="生产订单号选择"
v-if="showFlag"
:visible.sync="showFlag"
:modal= false
width="1000px"
>
<el-row :gutter="20">
<el-col :span="24" :xs="24">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="105px" align="left">
<el-form-item label="订单号">
<el-input
v-model="queryParams.orderNo"
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="handleBomSelectionChange" ref="myTable" >
<el-table-column width="50" align="center" type="selection"/>
<el-table-column label="订单号" align="left" prop="orderNo" width="120"/>
<el-table-column label="订单状态" align="left" prop="status" width="90"/>
<el-table-column label="工单号" align="left" prop="workorderCode" width="130"/>
<el-table-column label="产品编码" align="left" prop="materialCode" width="180" />
<el-table-column label="产品名称" align="left" prop="materialName" width="180"/>
<el-table-column label="排产数量" align="left" prop="quality" width="100" />
<el-table-column label="单位" align="left" prop="unit" :show-overflow-tooltip="true" />
<el-table-column label="生产日期" align="left" prop="incomeTime" :show-overflow-tooltip="true" >
<template slot-scope="scope">
<span>{{ parseTime(scope.row.incomeTime, '{y}-{m}-{d}') }}</span>
</template>
</el-table-column>
</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="submitLLOrderForm"> </el-button>
<el-button @click="showFlag=false"> </el-button>
</div>
</el-dialog>
</template>
<script>
import { getProductWorkOrder } from "@/api/quality/income";
export default {
name: "itemSelectWorkOrder",
data() {
return {
showFlag:false,
//
selectedRows: {},
//
single: true,
//
multiple: true,
//
showSearch: true,
//
total: 0,
// BOM
itemList: null,
//
bomCode: undefined,
defaultProps: {
id: "id",
label: "label"
},
//
queryParams: {
pageNum: 1,
pageSize: 10,
workorderCode: ''
},
selectionRow:{}
};
},
created() {
this.getList();
},
methods: {
/** 查询表格列表*/
getList() {
this.loading = true;
getProductWorkOrder(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) {
if(selection.length>1){
this.$modal.msgSuccess("只能选一个");
}
this.selectionRow = selection[0]
},
submitLLOrderForm() {
this.$emit('onSelected', this.selectionRow);
this.showFlag = false;
}
}
};
</script>
Loading…
Cancel
Save