2024-10-31 17:59:23 +08:00
|
|
|
<template>
|
|
|
|
<div class="app-container">
|
|
|
|
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
2024-11-15 18:02:03 +08:00
|
|
|
<el-form-item label="单据ID" prop="erpId">
|
2024-10-31 17:59:23 +08:00
|
|
|
<el-input
|
2024-11-15 18:02:03 +08:00
|
|
|
v-model="queryParams.erpId"
|
|
|
|
placeholder="请输入ERP单据ID"
|
2024-10-31 17:59:23 +08:00
|
|
|
clearable
|
|
|
|
@keyup.enter.native="handleQuery"
|
|
|
|
/>
|
|
|
|
</el-form-item>
|
2024-11-15 18:02:03 +08:00
|
|
|
<el-form-item label="单据编号" prop="erpBillNo">
|
2024-10-31 17:59:23 +08:00
|
|
|
<el-input
|
2024-11-15 18:02:03 +08:00
|
|
|
v-model="queryParams.erpBillNo"
|
|
|
|
placeholder="请输入ERP单据编号"
|
2024-10-31 17:59:23 +08:00
|
|
|
clearable
|
|
|
|
@keyup.enter.native="handleQuery"
|
|
|
|
/>
|
|
|
|
</el-form-item>
|
2024-11-15 18:02:03 +08:00
|
|
|
<el-form-item label="单据状态" prop="erpDocumentStatus">
|
|
|
|
<el-select v-model="queryParams.erpDocumentStatus" placeholder="请选择ERP单据状态" clearable @change="handleQuery">
|
|
|
|
<el-option
|
|
|
|
v-for="dict in dict.type.prod_order_erp_document_status"
|
|
|
|
:key="dict.value"
|
|
|
|
:label="dict.label"
|
|
|
|
:value="dict.value"
|
|
|
|
/>
|
|
|
|
</el-select>
|
2024-10-31 17:59:23 +08:00
|
|
|
</el-form-item>
|
2024-11-15 18:02:03 +08:00
|
|
|
<el-form-item label="是否返工" prop="erpIsRework">
|
|
|
|
<el-radio-group v-model="queryParams.erpIsRework">
|
|
|
|
<el-radio :label="null">全部</el-radio>
|
|
|
|
<el-radio :label="true">是</el-radio>
|
|
|
|
<el-radio :label="false">否</el-radio>
|
|
|
|
</el-radio-group>
|
2024-10-31 17:59:23 +08:00
|
|
|
</el-form-item>
|
2024-11-15 18:02:03 +08:00
|
|
|
<el-form-item label="业务状态" prop="erpStatus">
|
|
|
|
<el-select v-model="queryParams.erpStatus" placeholder="请选择ERP明细业务状态" clearable @change="handleQuery">
|
|
|
|
<el-option
|
|
|
|
v-for="dict in dict.type.prod_order_erp_status"
|
|
|
|
:key="dict.value"
|
|
|
|
:label="dict.label"
|
|
|
|
:value="dict.value"
|
|
|
|
/>
|
|
|
|
</el-select>
|
2024-10-31 17:59:23 +08:00
|
|
|
</el-form-item>
|
2024-11-15 18:02:03 +08:00
|
|
|
<!-- <el-form-item label="部门" prop="deptId">-->
|
|
|
|
<!-- <dept-tree-select v-model="queryParams.deptId" class="small-tree-select"/>-->
|
|
|
|
<!-- </el-form-item>-->
|
|
|
|
<el-form-item label="生产车间" prop="erpWorkShopId">
|
|
|
|
<dept-tree-select class="small-tree-select" @select="onSelectWorkShop"/>
|
2024-10-31 17:59:23 +08:00
|
|
|
</el-form-item>
|
|
|
|
<el-form-item>
|
|
|
|
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
|
|
|
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
|
|
|
</el-form-item>
|
|
|
|
</el-form>
|
|
|
|
|
|
|
|
<el-row :gutter="10" class="mb8">
|
|
|
|
<el-col :span="1.5">
|
|
|
|
<el-button
|
|
|
|
type="primary"
|
|
|
|
plain
|
|
|
|
icon="el-icon-plus"
|
|
|
|
size="mini"
|
|
|
|
@click="handleAdd"
|
|
|
|
v-has-permi="['yh:prodOrder:add']"
|
|
|
|
>新增</el-button>
|
|
|
|
</el-col>
|
|
|
|
<el-col :span="1.5">
|
|
|
|
<el-button
|
|
|
|
type="danger"
|
|
|
|
plain
|
|
|
|
icon="el-icon-delete"
|
|
|
|
size="mini"
|
|
|
|
:disabled="multiple"
|
|
|
|
@click="handleDelete"
|
|
|
|
v-has-permi="['yh:prodOrder:remove']"
|
|
|
|
>删除</el-button>
|
|
|
|
</el-col>
|
|
|
|
<el-col :span="1.5">
|
|
|
|
<el-button
|
|
|
|
type="warning"
|
|
|
|
plain
|
|
|
|
icon="el-icon-download"
|
|
|
|
size="mini"
|
|
|
|
@click="handleExport"
|
|
|
|
v-has-permi="['yh:prodOrder:export']"
|
|
|
|
>导出</el-button>
|
|
|
|
</el-col>
|
|
|
|
<el-col :span="1.5">
|
|
|
|
<el-button
|
|
|
|
type="info"
|
|
|
|
plain
|
|
|
|
icon="el-icon-refresh"
|
|
|
|
size="mini"
|
|
|
|
@click="handleSync"
|
|
|
|
v-has-permi="['yh:prodOrder:sync']"
|
|
|
|
>同步</el-button>
|
|
|
|
</el-col>
|
|
|
|
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList" :columns="columns"></right-toolbar>
|
|
|
|
</el-row>
|
|
|
|
|
|
|
|
<el-table v-loading="loading" :data="prodOrderList" @selection-change="handleSelectionChange" :default-sort="defaultSort" @sort-change="onSortChange">
|
|
|
|
<el-table-column type="selection" width="55" align="center" />
|
|
|
|
<template v-for="column of showColumns">
|
|
|
|
<el-table-column
|
|
|
|
:key="column.key"
|
|
|
|
:label="column.label"
|
|
|
|
:prop="column.key"
|
|
|
|
:align="column.align"
|
|
|
|
:min-width="column.minWidth"
|
|
|
|
:sort-orders="orderSorts"
|
|
|
|
:sortable="column.sortable"
|
|
|
|
:show-overflow-tooltip="column.overflow"
|
|
|
|
:width="column.width"
|
|
|
|
>
|
|
|
|
<template slot-scope="d">
|
|
|
|
<template v-if="column.key === 'id'">
|
|
|
|
{{d.row[column.key]}}
|
|
|
|
</template>
|
2024-11-15 18:02:03 +08:00
|
|
|
<template v-else-if="column.key === 'erpDocumentStatus'">
|
|
|
|
<dict-tag :options="dict.type.prod_order_erp_document_status" :value="d.row[column.key]"/>
|
|
|
|
</template>
|
|
|
|
<template v-else-if="column.key === 'erpStatus'">
|
|
|
|
<dict-tag :options="dict.type.prod_order_erp_status" :value="d.row[column.key]"/>
|
|
|
|
</template>
|
|
|
|
<template v-else-if="column.key === 'erpReqSrc'">
|
|
|
|
<dict-tag :options="dict.type.prod_order_erp_req_src" :value="d.row[column.key]"/>
|
|
|
|
</template>
|
|
|
|
<template v-else-if="column.key === 'erpIsRework'">
|
|
|
|
<boolean-tag :value="d.row.erpIsRework"/>
|
2024-10-31 17:59:23 +08:00
|
|
|
</template>
|
|
|
|
<template v-else>
|
|
|
|
{{d.row[column.key]}}
|
|
|
|
</template>
|
|
|
|
</template>
|
|
|
|
</el-table-column>
|
|
|
|
</template>
|
|
|
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
|
|
|
<template slot-scope="scope">
|
|
|
|
<el-button
|
|
|
|
size="mini"
|
|
|
|
type="text"
|
|
|
|
icon="el-icon-edit"
|
|
|
|
@click="handleUpdate(scope.row)"
|
|
|
|
v-has-permi="['yh:prodOrder:edit']"
|
|
|
|
>修改</el-button>
|
|
|
|
<el-button
|
|
|
|
size="mini"
|
|
|
|
type="text"
|
|
|
|
icon="el-icon-delete"
|
|
|
|
@click="handleDelete(scope.row)"
|
|
|
|
v-has-permi="['yh:prodOrder:remove']"
|
|
|
|
>删除</el-button>
|
|
|
|
</template>
|
|
|
|
</el-table-column>
|
|
|
|
</el-table>
|
|
|
|
|
|
|
|
<pagination
|
|
|
|
v-show="total>0"
|
|
|
|
:total="total"
|
|
|
|
:page.sync="queryParams.pageNum"
|
|
|
|
:limit.sync="queryParams.pageSize"
|
|
|
|
@pagination="getList"
|
|
|
|
/>
|
|
|
|
|
|
|
|
<!-- 添加或修改生产订单对话框 -->
|
|
|
|
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body :close-on-click-modal="false">
|
|
|
|
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
|
|
|
<el-row>
|
|
|
|
<form-col :span="span" label="单据编号" prop="billNo">
|
|
|
|
<el-input v-model="form.billNo" placeholder="请输入单据编号" />
|
|
|
|
</form-col>
|
|
|
|
<form-col :span="span" label="单据日期" prop="billDate">
|
|
|
|
<el-date-picker clearable
|
|
|
|
v-model="form.billDate"
|
|
|
|
type="date"
|
|
|
|
value-format="yyyy-MM-dd"
|
|
|
|
placeholder="请选择单据日期">
|
|
|
|
</el-date-picker>
|
|
|
|
</form-col>
|
|
|
|
<form-col :span="span" label="规格型号" prop="spec">
|
|
|
|
<el-input v-model="form.spec" placeholder="请输入规格型号" />
|
|
|
|
</form-col>
|
|
|
|
<form-col :span="span" label="生产车间ID" prop="deptId">
|
|
|
|
<el-input v-model="form.deptId" placeholder="请输入生产车间ID" />
|
|
|
|
</form-col>
|
|
|
|
<form-col :span="span" label="单位" prop="unit">
|
|
|
|
<el-input v-model="form.unit" placeholder="请输入单位" />
|
|
|
|
</form-col>
|
|
|
|
<form-col :span="span" label="数量" prop="num">
|
|
|
|
<el-input v-model="form.num" placeholder="请输入数量" />
|
|
|
|
</form-col>
|
|
|
|
<form-col :span="span" label="批号" prop="batchNo">
|
|
|
|
<el-input v-model="form.batchNo" placeholder="请输入批号" />
|
|
|
|
</form-col>
|
|
|
|
<form-col :span="span" label="备注" prop="remark">
|
|
|
|
<el-input v-model="form.remark" placeholder="请输入备注" />
|
|
|
|
</form-col>
|
|
|
|
<form-col :span="span" label="下达时间" prop="releaseTime">
|
|
|
|
<el-date-picker clearable
|
|
|
|
v-model="form.releaseTime"
|
|
|
|
type="date"
|
|
|
|
value-format="yyyy-MM-dd"
|
|
|
|
placeholder="请选择下达时间">
|
|
|
|
</el-date-picker>
|
|
|
|
</form-col>
|
|
|
|
<form-col :span="span" label="源单编号" prop="sourceNo">
|
|
|
|
<el-input v-model="form.sourceNo" placeholder="请输入源单编号" />
|
|
|
|
</form-col>
|
|
|
|
<form-col :span="span" label="需求单据" prop="demandBill">
|
|
|
|
<el-input v-model="form.demandBill" placeholder="请输入需求单据" />
|
|
|
|
</form-col>
|
|
|
|
<form-col :span="span" label="辅助属性(json)" prop="auxProp">
|
|
|
|
<el-input v-model="form.auxProp" placeholder="请输入辅助属性(json)" />
|
|
|
|
</form-col>
|
|
|
|
<form-col :span="span" label="计划跟踪号" prop="planTrackNo">
|
|
|
|
<el-input v-model="form.planTrackNo" placeholder="请输入计划跟踪号" />
|
|
|
|
</form-col>
|
|
|
|
<form-col :span="span" label="物料编码" prop="materialNo">
|
|
|
|
<el-input v-model="form.materialNo" placeholder="请输入物料编码" />
|
|
|
|
</form-col>
|
|
|
|
<form-col :span="span" label="合格品入库数量" prop="quaStore">
|
|
|
|
<el-input v-model="form.quaStore" placeholder="请输入合格品入库数量" />
|
|
|
|
</form-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>
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
import {
|
|
|
|
listProdOrder,
|
|
|
|
getProdOrder,
|
|
|
|
delProdOrder,
|
|
|
|
addProdOrder,
|
|
|
|
updateProdOrder,
|
|
|
|
syncProdOrder
|
|
|
|
} from "@/api/yh/prodOrder";
|
|
|
|
import { $showColumns } from '@/utils/mixins';
|
|
|
|
import FormCol from "@/components/FormCol/index.vue";
|
|
|
|
import DeptTreeSelect from "@/components/Business/Dept/DeptTreeSelect.vue";
|
2024-11-15 18:02:03 +08:00
|
|
|
import BooleanTag from "@/components/BooleanTag/index.vue";
|
2024-10-31 17:59:23 +08:00
|
|
|
|
|
|
|
// 默认排序字段
|
|
|
|
const defaultSort = {
|
|
|
|
prop: "createTime",
|
|
|
|
order: "descending"
|
|
|
|
}
|
|
|
|
|
|
|
|
export default {
|
|
|
|
name: "ProdOrder",
|
|
|
|
mixins: [$showColumns],
|
2024-11-15 18:02:03 +08:00
|
|
|
dicts: ['prod_order_erp_document_status', 'prod_order_erp_status', 'prod_order_erp_req_src'],
|
|
|
|
components: {BooleanTag, DeptTreeSelect, FormCol},
|
2024-10-31 17:59:23 +08:00
|
|
|
data() {
|
|
|
|
return {
|
|
|
|
span: 24,
|
|
|
|
// 字段列表
|
|
|
|
columns: [
|
|
|
|
{key: 'id', visible: false, label: '生产订单ID', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
|
|
|
|
{key: 'erpId', visible: true, label: '单据ID', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
|
2024-11-15 18:02:03 +08:00
|
|
|
{key: 'erpBillNo', visible: true, label: '单据编号', minWidth: null, sortable: true, overflow: false, align: 'center', width: "100"},
|
|
|
|
{key: 'erpDocumentStatus', visible: true, label: '单据状态', minWidth: null, sortable: true, overflow: false, align: 'center', width: "100"},
|
|
|
|
{key: 'erpCreateDate', visible: true, label: '创建日期', minWidth: null, sortable: false, overflow: false, align: 'center', width: "100"},
|
|
|
|
{key: 'erpModifyDate', visible: true, label: '修改日期', minWidth: null, sortable: false, overflow: false, align: 'center', width: "100"},
|
|
|
|
{key: 'erpDescription', visible: false, label: '主表备注', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
|
|
|
|
{key: 'erpDate', visible: true, label: '单据日期', minWidth: null, sortable: false, overflow: false, align: 'center', width: "100"},
|
|
|
|
{key: 'materialNumber', visible: true, label: '物料编码', minWidth: null, sortable: false, overflow: false, align: 'center', width: "100"},
|
|
|
|
{key: 'erpIsRework', visible: true, label: '是否返工', minWidth: null, sortable: true, overflow: false, align: 'center', width: "100"},
|
|
|
|
{key: 'erpRowId', visible: false, label: '行标识', minWidth: null, sortable: true, overflow: true, align: 'center', width: null},
|
|
|
|
{key: 'erpMemoItem', visible: true, label: '备注', minWidth: null, sortable: true, overflow: false, align: 'center', width: "100"},
|
|
|
|
{key: 'erpConveyDate', visible: true, label: '下达日期', minWidth: null, sortable: false, overflow: false, align: 'center', width: "100"},
|
|
|
|
{key: 'erpStatus', visible: true, label: '业务状态', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
|
|
|
|
{key: 'workShopName', visible: true, label: '生产车间', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
|
|
|
|
{key: 'erpReqSrc', visible: true, label: '需求来源', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
|
|
|
|
{key: 'erpQty', visible: true, label: '数量', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
|
|
|
|
{key: 'erpBaseUnitQty', visible: true, label: '基本单位数量', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
|
|
|
|
{key: 'erpUnitId', visible: true, label: '单位', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
|
|
|
|
{key: 'deptId', visible: false, label: '部门ID', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
|
2024-10-31 17:59:23 +08:00
|
|
|
],
|
|
|
|
// 排序方式
|
|
|
|
orderSorts: ['ascending', 'descending', null],
|
|
|
|
// 遮罩层
|
|
|
|
loading: true,
|
|
|
|
// 选中数组
|
|
|
|
ids: [],
|
|
|
|
// 非单个禁用
|
|
|
|
single: true,
|
|
|
|
// 非多个禁用
|
|
|
|
multiple: true,
|
|
|
|
// 显示搜索条件
|
|
|
|
showSearch: true,
|
|
|
|
// 总条数
|
|
|
|
total: 0,
|
|
|
|
// 生产订单表格数据
|
|
|
|
prodOrderList: [],
|
|
|
|
// 弹出层标题
|
|
|
|
title: "",
|
|
|
|
// 是否显示弹出层
|
|
|
|
open: false,
|
|
|
|
defaultSort,
|
|
|
|
// 查询参数
|
|
|
|
queryParams: {
|
|
|
|
pageNum: 1,
|
|
|
|
pageSize: 20,
|
|
|
|
orderByColumn: defaultSort.prop,
|
|
|
|
isAsc: defaultSort.order,
|
|
|
|
id: null,
|
|
|
|
billNo: null,
|
|
|
|
type: null,
|
|
|
|
status: null,
|
|
|
|
transferStatus: null,
|
|
|
|
pickStatus: null,
|
|
|
|
spec: null,
|
|
|
|
deptId: null,
|
|
|
|
unit: null,
|
|
|
|
bizStatus: null,
|
|
|
|
batchNo: null,
|
|
|
|
releaseTime: null,
|
|
|
|
sourceNo: null,
|
|
|
|
demandBill: null,
|
|
|
|
planTrackNo: null,
|
|
|
|
productType: null,
|
|
|
|
materialNo: null,
|
|
|
|
},
|
|
|
|
// 表单参数
|
|
|
|
form: {},
|
|
|
|
// 表单校验
|
|
|
|
rules: {
|
|
|
|
billNo: [
|
|
|
|
{ required: true, message: "单据编号不能为空", trigger: "blur" }
|
|
|
|
],
|
|
|
|
}
|
|
|
|
};
|
|
|
|
},
|
|
|
|
created() {
|
|
|
|
this.getList();
|
|
|
|
},
|
|
|
|
methods: {
|
2024-11-15 18:02:03 +08:00
|
|
|
onSelectWorkShop(dept) {
|
|
|
|
this.queryParams.erpWorkShopId = dept.erpId;
|
|
|
|
this.getList();
|
|
|
|
},
|
2024-10-31 17:59:23 +08:00
|
|
|
handleSync() {
|
|
|
|
syncProdOrder().then(res => {
|
|
|
|
if (res.code === 200) {
|
|
|
|
this.$message.success("同步成功");
|
|
|
|
}
|
|
|
|
})
|
|
|
|
},
|
|
|
|
/** 当排序按钮被点击时触发 **/
|
|
|
|
onSortChange(column) {
|
|
|
|
if (column.order == null) {
|
|
|
|
this.queryParams.orderByColumn = defaultSort.prop;
|
|
|
|
this.queryParams.isAsc = defaultSort.order;
|
|
|
|
} else {
|
|
|
|
this.queryParams.orderByColumn = column.prop;
|
|
|
|
this.queryParams.isAsc = column.order;
|
|
|
|
}
|
|
|
|
this.getList();
|
|
|
|
},
|
|
|
|
/** 查询生产订单列表 */
|
|
|
|
getList() {
|
|
|
|
this.loading = true;
|
|
|
|
listProdOrder(this.queryParams).then(response => {
|
|
|
|
this.prodOrderList = response.rows;
|
|
|
|
this.total = response.total;
|
|
|
|
this.loading = false;
|
|
|
|
});
|
|
|
|
},
|
|
|
|
// 取消按钮
|
|
|
|
cancel() {
|
|
|
|
this.open = false;
|
|
|
|
this.reset();
|
|
|
|
},
|
|
|
|
// 表单重置
|
|
|
|
reset() {
|
|
|
|
this.form = {
|
|
|
|
id: null,
|
|
|
|
billNo: null,
|
|
|
|
type: null,
|
|
|
|
billDate: null,
|
|
|
|
status: null,
|
|
|
|
transferStatus: null,
|
|
|
|
pickStatus: null,
|
|
|
|
spec: null,
|
|
|
|
deptId: null,
|
|
|
|
unit: null,
|
|
|
|
num: null,
|
|
|
|
bizStatus: null,
|
|
|
|
batchNo: null,
|
|
|
|
remark: null,
|
|
|
|
releaseTime: null,
|
|
|
|
sourceNo: null,
|
|
|
|
demandBill: null,
|
|
|
|
auxProp: null,
|
|
|
|
planTrackNo: null,
|
|
|
|
productType: null,
|
|
|
|
materialNo: null,
|
|
|
|
quaStore: null
|
|
|
|
};
|
|
|
|
this.resetForm("form");
|
|
|
|
},
|
|
|
|
/** 搜索按钮操作 */
|
|
|
|
handleQuery() {
|
|
|
|
this.queryParams.pageNum = 1;
|
|
|
|
this.getList();
|
|
|
|
},
|
|
|
|
/** 重置按钮操作 */
|
|
|
|
resetQuery() {
|
|
|
|
this.resetForm("queryForm");
|
|
|
|
this.handleQuery();
|
|
|
|
},
|
|
|
|
// 多选框选中数据
|
|
|
|
handleSelectionChange(selection) {
|
|
|
|
this.ids = selection.map(item => item.id)
|
|
|
|
this.single = selection.length!==1
|
|
|
|
this.multiple = !selection.length
|
|
|
|
},
|
|
|
|
/** 新增按钮操作 */
|
|
|
|
handleAdd() {
|
|
|
|
this.reset();
|
|
|
|
this.open = true;
|
|
|
|
this.title = "添加生产订单";
|
|
|
|
},
|
|
|
|
/** 修改按钮操作 */
|
|
|
|
handleUpdate(row) {
|
|
|
|
this.reset();
|
|
|
|
const id = row.id || this.ids
|
|
|
|
getProdOrder(id).then(response => {
|
|
|
|
this.form = response.data;
|
|
|
|
this.open = true;
|
|
|
|
this.title = "修改生产订单";
|
|
|
|
});
|
|
|
|
},
|
|
|
|
/** 提交按钮 */
|
|
|
|
submitForm() {
|
|
|
|
this.$refs["form"].validate(valid => {
|
|
|
|
if (valid) {
|
|
|
|
if (this.form.id != null) {
|
|
|
|
updateProdOrder(this.form).then(response => {
|
|
|
|
this.$modal.msgSuccess("修改成功");
|
|
|
|
this.open = false;
|
|
|
|
this.getList();
|
|
|
|
});
|
|
|
|
} else {
|
|
|
|
addProdOrder(this.form).then(response => {
|
|
|
|
this.$modal.msgSuccess("新增成功");
|
|
|
|
this.open = false;
|
|
|
|
this.getList();
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
},
|
|
|
|
/** 删除按钮操作 */
|
|
|
|
handleDelete(row) {
|
|
|
|
const ids = row.id || this.ids;
|
|
|
|
this.$modal.confirm('是否确认删除生产订单编号为"' + ids + '"的数据项?').then(function() {
|
|
|
|
return delProdOrder(ids);
|
|
|
|
}).then(() => {
|
|
|
|
this.getList();
|
|
|
|
this.$modal.msgSuccess("删除成功");
|
|
|
|
}).catch(() => {});
|
|
|
|
},
|
|
|
|
/** 导出按钮操作 */
|
|
|
|
handleExport() {
|
|
|
|
this.download('yh/prodOrder/export', {
|
|
|
|
...this.queryParams
|
|
|
|
}, `prodOrder_${new Date().getTime()}.xlsx`)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
};
|
|
|
|
</script>
|