|
|
@ -70,7 +70,8 @@
|
|
|
|
size="mini"
|
|
|
|
size="mini"
|
|
|
|
@click="handleAdd"
|
|
|
|
@click="handleAdd"
|
|
|
|
v-hasPermi="['mes:productOrder:add']"
|
|
|
|
v-hasPermi="['mes:productOrder:add']"
|
|
|
|
>销售订单新增</el-button>
|
|
|
|
>销售订单新增
|
|
|
|
|
|
|
|
</el-button>
|
|
|
|
</el-col>
|
|
|
|
</el-col>
|
|
|
|
<el-col :span="1.5">
|
|
|
|
<el-col :span="1.5">
|
|
|
|
<el-button
|
|
|
|
<el-button
|
|
|
@ -80,7 +81,8 @@
|
|
|
|
size="mini"
|
|
|
|
size="mini"
|
|
|
|
@click="handleNoOrderAdd"
|
|
|
|
@click="handleNoOrderAdd"
|
|
|
|
v-hasPermi="['mes:productOrder:add']"
|
|
|
|
v-hasPermi="['mes:productOrder:add']"
|
|
|
|
>无订单新增</el-button>
|
|
|
|
>无订单新增
|
|
|
|
|
|
|
|
</el-button>
|
|
|
|
</el-col>
|
|
|
|
</el-col>
|
|
|
|
<el-col :span="1.5">
|
|
|
|
<el-col :span="1.5">
|
|
|
|
<el-button
|
|
|
|
<el-button
|
|
|
@ -91,7 +93,8 @@
|
|
|
|
:disabled="single"
|
|
|
|
:disabled="single"
|
|
|
|
@click="handleUpdate"
|
|
|
|
@click="handleUpdate"
|
|
|
|
v-hasPermi="['mes:productOrder:edit']"
|
|
|
|
v-hasPermi="['mes:productOrder:edit']"
|
|
|
|
>修改</el-button>
|
|
|
|
>修改
|
|
|
|
|
|
|
|
</el-button>
|
|
|
|
</el-col>
|
|
|
|
</el-col>
|
|
|
|
<el-col :span="1.5">
|
|
|
|
<el-col :span="1.5">
|
|
|
|
<el-button
|
|
|
|
<el-button
|
|
|
@ -102,7 +105,8 @@
|
|
|
|
:disabled="multiple"
|
|
|
|
:disabled="multiple"
|
|
|
|
@click="handleDelete"
|
|
|
|
@click="handleDelete"
|
|
|
|
v-hasPermi="['mes:productOrder:remove']"
|
|
|
|
v-hasPermi="['mes:productOrder:remove']"
|
|
|
|
>删除</el-button>
|
|
|
|
>删除
|
|
|
|
|
|
|
|
</el-button>
|
|
|
|
</el-col>
|
|
|
|
</el-col>
|
|
|
|
<el-col :span="1.5">
|
|
|
|
<el-col :span="1.5">
|
|
|
|
<el-button
|
|
|
|
<el-button
|
|
|
@ -112,7 +116,8 @@
|
|
|
|
size="mini"
|
|
|
|
size="mini"
|
|
|
|
@click="handleExport"
|
|
|
|
@click="handleExport"
|
|
|
|
v-hasPermi="['mes:productOrder:export']"
|
|
|
|
v-hasPermi="['mes:productOrder:export']"
|
|
|
|
>导出</el-button>
|
|
|
|
>导出
|
|
|
|
|
|
|
|
</el-button>
|
|
|
|
</el-col>
|
|
|
|
</el-col>
|
|
|
|
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList" :columns="columns"></right-toolbar>
|
|
|
|
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList" :columns="columns"></right-toolbar>
|
|
|
|
</el-row>
|
|
|
|
</el-row>
|
|
|
@ -190,21 +195,43 @@
|
|
|
|
<span>{{ parseTime(scope.row.updateTime, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
|
|
|
|
<span>{{ parseTime(scope.row.updateTime, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
|
|
|
|
</template>
|
|
|
|
</template>
|
|
|
|
</el-table-column>
|
|
|
|
</el-table-column>
|
|
|
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
|
|
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="220">
|
|
|
|
<template slot-scope="scope">
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
|
|
|
<!-- <el-button-->
|
|
|
|
|
|
|
|
<!-- size="mini"-->
|
|
|
|
|
|
|
|
<!-- type="text"-->
|
|
|
|
|
|
|
|
<!-- icon="el-icon-edit"-->
|
|
|
|
|
|
|
|
<!-- @click="handleUpdate(scope.row)"-->
|
|
|
|
|
|
|
|
<!-- v-hasPermi="['mes:productOrder:edit']"-->
|
|
|
|
|
|
|
|
<!-- >修改</el-button>-->
|
|
|
|
<el-button
|
|
|
|
<el-button
|
|
|
|
size="mini"
|
|
|
|
size="mini"
|
|
|
|
type="text"
|
|
|
|
type="text"
|
|
|
|
icon="el-icon-edit"
|
|
|
|
icon="el-icon-lock"
|
|
|
|
@click="handleUpdate(scope.row)"
|
|
|
|
@click="handleLockInventory(scope.row)"
|
|
|
|
v-hasPermi="['mes:productOrder:edit']"
|
|
|
|
>锁库存
|
|
|
|
>修改</el-button>
|
|
|
|
</el-button>
|
|
|
|
<el-button
|
|
|
|
<el-button
|
|
|
|
size="mini"
|
|
|
|
size="mini"
|
|
|
|
type="text"
|
|
|
|
type="text"
|
|
|
|
icon="el-icon-edit"
|
|
|
|
icon="el-icon-success"
|
|
|
|
@click="handleLockInventory(scope.row)"
|
|
|
|
@click="handlePublish(scope.row)"
|
|
|
|
>锁库存</el-button>
|
|
|
|
>发布
|
|
|
|
|
|
|
|
</el-button>
|
|
|
|
|
|
|
|
<el-button
|
|
|
|
|
|
|
|
size="mini"
|
|
|
|
|
|
|
|
type="text"
|
|
|
|
|
|
|
|
icon="el-icon-d-arrow-left"
|
|
|
|
|
|
|
|
@click="handleRecall(scope.row)"
|
|
|
|
|
|
|
|
>撤回
|
|
|
|
|
|
|
|
</el-button>
|
|
|
|
|
|
|
|
<el-button
|
|
|
|
|
|
|
|
size="mini"
|
|
|
|
|
|
|
|
type="text"
|
|
|
|
|
|
|
|
icon="el-icon-right"
|
|
|
|
|
|
|
|
@click="handleDispatch(scope.row)"
|
|
|
|
|
|
|
|
>生产派工
|
|
|
|
|
|
|
|
</el-button>
|
|
|
|
<!-- <el-button-->
|
|
|
|
<!-- <el-button-->
|
|
|
|
<!-- size="mini"-->
|
|
|
|
<!-- size="mini"-->
|
|
|
|
<!-- type="text"-->
|
|
|
|
<!-- type="text"-->
|
|
|
@ -260,15 +287,6 @@
|
|
|
|
></el-option>
|
|
|
|
></el-option>
|
|
|
|
</el-select>
|
|
|
|
</el-select>
|
|
|
|
</el-form-item>
|
|
|
|
</el-form-item>
|
|
|
|
<!-- <el-form-item label="派工类型" prop="dispatchType">-->
|
|
|
|
|
|
|
|
<!-- <el-radio-group v-model="form.dispatchType">-->
|
|
|
|
|
|
|
|
<!-- <el-radio-->
|
|
|
|
|
|
|
|
<!-- v-for="dict in dict.type.dispatch_type"-->
|
|
|
|
|
|
|
|
<!-- :key="dict.value"-->
|
|
|
|
|
|
|
|
<!-- :label="dict.value"-->
|
|
|
|
|
|
|
|
<!-- >{{dict.label}}</el-radio>-->
|
|
|
|
|
|
|
|
<!-- </el-radio-group>-->
|
|
|
|
|
|
|
|
<!-- </el-form-item>-->
|
|
|
|
|
|
|
|
<el-form-item label="工艺路线" prop="dispatchId">
|
|
|
|
<el-form-item label="工艺路线" prop="dispatchId">
|
|
|
|
<el-select v-model="form.dispatchId" filterable placeholder="请选择工艺路线" clearable>
|
|
|
|
<el-select v-model="form.dispatchId" filterable placeholder="请选择工艺路线" clearable>
|
|
|
|
<el-option
|
|
|
|
<el-option
|
|
|
@ -285,12 +303,6 @@
|
|
|
|
<el-form-item label="计划数量" prop="planAmount">
|
|
|
|
<el-form-item label="计划数量" prop="planAmount">
|
|
|
|
<el-input-number v-model="form.planAmount" placeholder="请输入计划数量"/>
|
|
|
|
<el-input-number v-model="form.planAmount" placeholder="请输入计划数量"/>
|
|
|
|
</el-form-item>
|
|
|
|
</el-form-item>
|
|
|
|
<!-- <el-form-item label="已派工数量" prop="dispatchAmount">-->
|
|
|
|
|
|
|
|
<!-- <el-input-number v-model="form.dispatchAmount" placeholder="请输入已派工数量" />-->
|
|
|
|
|
|
|
|
<!-- </el-form-item>-->
|
|
|
|
|
|
|
|
<!-- <el-form-item label="完成数量" prop="completeAmount">-->
|
|
|
|
|
|
|
|
<!-- <el-input-number v-model="form.completeAmount" placeholder="请输入完成数量" />-->
|
|
|
|
|
|
|
|
<!-- </el-form-item>-->
|
|
|
|
|
|
|
|
<el-form-item label="计划交货日期" prop="planDeliveryDate">
|
|
|
|
<el-form-item label="计划交货日期" prop="planDeliveryDate">
|
|
|
|
<el-date-picker clearable
|
|
|
|
<el-date-picker clearable
|
|
|
|
v-model="form.planDeliveryDate"
|
|
|
|
v-model="form.planDeliveryDate"
|
|
|
@ -315,25 +327,80 @@
|
|
|
|
placeholder="请选择计划结束时间">
|
|
|
|
placeholder="请选择计划结束时间">
|
|
|
|
</el-date-picker>
|
|
|
|
</el-date-picker>
|
|
|
|
</el-form-item>
|
|
|
|
</el-form-item>
|
|
|
|
<!-- <el-form-item label="工单状态" prop="orderStatus">-->
|
|
|
|
<el-form-item label="备注" prop="remark">
|
|
|
|
<!-- <el-select v-model="form.orderStatus" placeholder="请选择工单状态">-->
|
|
|
|
<el-input v-model="form.remark" type="textarea" placeholder="请输入内容"/>
|
|
|
|
<!-- <el-option-->
|
|
|
|
</el-form-item>
|
|
|
|
<!-- v-for="dict in dict.type.plan_status"-->
|
|
|
|
</el-form>
|
|
|
|
<!-- :key="dict.value"-->
|
|
|
|
<div slot="footer" class="dialog-footer">
|
|
|
|
<!-- :label="dict.label"-->
|
|
|
|
<el-button type="primary" @click="submitForm">确 定</el-button>
|
|
|
|
<!-- :value="dict.value"-->
|
|
|
|
<el-button @click="cancel">取 消</el-button>
|
|
|
|
<!-- ></el-option>-->
|
|
|
|
</div>
|
|
|
|
<!-- </el-select>-->
|
|
|
|
</el-dialog>
|
|
|
|
<!-- </el-form-item>-->
|
|
|
|
|
|
|
|
<!-- <el-form-item label="库存锁定标识" prop="stockLockFlag">-->
|
|
|
|
<!-- 无销售订单添加生产工单对话框 -->
|
|
|
|
<!-- <el-radio-group v-model="form.stockLockFlag">-->
|
|
|
|
<el-dialog :title="title" :visible.sync="noOrderOpen" width="500px" append-to-body>
|
|
|
|
<!-- <el-radio-->
|
|
|
|
<el-form ref="form" :model="form" :rules="rules" label-width="110px">
|
|
|
|
<!-- v-for="dict in dict.type.active_flag"-->
|
|
|
|
<el-form-item label="工单编号" prop="orderCode">
|
|
|
|
<!-- :key="dict.value"-->
|
|
|
|
<el-input v-model="form.orderCode" :disabled="true"/>
|
|
|
|
<!-- :label="dict.value"-->
|
|
|
|
</el-form-item>
|
|
|
|
<!-- >{{dict.label}}</el-radio>-->
|
|
|
|
<!-- <el-form-item label="项目编号" prop="projectNo">-->
|
|
|
|
<!-- </el-radio-group>-->
|
|
|
|
<!-- <el-input v-model="form.projectNo" placeholder="请输入项目编号"/>-->
|
|
|
|
<!-- </el-form-item>-->
|
|
|
|
<!-- </el-form-item>-->
|
|
|
|
|
|
|
|
<el-form-item label="物料名称" prop="materialName">
|
|
|
|
|
|
|
|
<el-input v-model="form.materialName" placeholder="请点击右侧检索物料" readonly>
|
|
|
|
|
|
|
|
<el-button slot="append" icon="el-icon-search" @click="handleMaterialAdd"></el-button>
|
|
|
|
|
|
|
|
</el-input>
|
|
|
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
|
|
<el-form-item label="物料BOM" prop="materialBomId">
|
|
|
|
|
|
|
|
<el-select v-model="form.materialBomId" placeholder="请选择物料BOM">
|
|
|
|
|
|
|
|
<el-option
|
|
|
|
|
|
|
|
v-for="item in materialBomList"
|
|
|
|
|
|
|
|
:key="item.materialBomId"
|
|
|
|
|
|
|
|
:label="item.materialNameDesc"
|
|
|
|
|
|
|
|
:value="item.materialBomId"
|
|
|
|
|
|
|
|
></el-option>
|
|
|
|
|
|
|
|
</el-select>
|
|
|
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
|
|
<el-form-item label="工艺路线" prop="dispatchId">
|
|
|
|
|
|
|
|
<el-select v-model="form.dispatchId" filterable placeholder="请选择工艺路线" clearable>
|
|
|
|
|
|
|
|
<el-option
|
|
|
|
|
|
|
|
v-for="item in routeList"
|
|
|
|
|
|
|
|
:key="item.routeId"
|
|
|
|
|
|
|
|
:label="item.routeName"
|
|
|
|
|
|
|
|
:value="item.routeId"
|
|
|
|
|
|
|
|
></el-option>
|
|
|
|
|
|
|
|
</el-select>
|
|
|
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
|
|
<el-form-item label="销售数量" prop="saleAmount">
|
|
|
|
|
|
|
|
<el-input-number v-model="form.saleAmount" placeholder="请输入销售数量"/>
|
|
|
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
|
|
<el-form-item label="计划数量" prop="planAmount">
|
|
|
|
|
|
|
|
<el-input-number v-model="form.planAmount" placeholder="请输入计划数量"/>
|
|
|
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
|
|
<el-form-item label="计划交货日期" prop="planDeliveryDate">
|
|
|
|
|
|
|
|
<el-date-picker clearable
|
|
|
|
|
|
|
|
v-model="form.planDeliveryDate"
|
|
|
|
|
|
|
|
type="datetime"
|
|
|
|
|
|
|
|
value-format="yyyy-MM-dd HH:mm:ss"
|
|
|
|
|
|
|
|
placeholder="请选择计划交货日期">
|
|
|
|
|
|
|
|
</el-date-picker>
|
|
|
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
|
|
<el-form-item label="计划开始时间" prop="planBeginTime">
|
|
|
|
|
|
|
|
<el-date-picker clearable
|
|
|
|
|
|
|
|
v-model="form.planBeginTime"
|
|
|
|
|
|
|
|
type="datetime"
|
|
|
|
|
|
|
|
value-format="yyyy-MM-dd HH:mm:ss"
|
|
|
|
|
|
|
|
placeholder="请选择计划开始时间">
|
|
|
|
|
|
|
|
</el-date-picker>
|
|
|
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
|
|
<el-form-item label="计划结束时间" prop="planEndTime">
|
|
|
|
|
|
|
|
<el-date-picker clearable
|
|
|
|
|
|
|
|
v-model="form.planEndTime"
|
|
|
|
|
|
|
|
type="datetime"
|
|
|
|
|
|
|
|
value-format="yyyy-MM-dd HH:mm:ss"
|
|
|
|
|
|
|
|
placeholder="请选择计划结束时间">
|
|
|
|
|
|
|
|
</el-date-picker>
|
|
|
|
|
|
|
|
</el-form-item>
|
|
|
|
<el-form-item label="备注" prop="remark">
|
|
|
|
<el-form-item label="备注" prop="remark">
|
|
|
|
<el-input v-model="form.remark" type="textarea" placeholder="请输入内容"/>
|
|
|
|
<el-input v-model="form.remark" type="textarea" placeholder="请输入内容"/>
|
|
|
|
</el-form-item>
|
|
|
|
</el-form-item>
|
|
|
@ -353,6 +420,15 @@
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</el-dialog>
|
|
|
|
</el-dialog>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<!-- 添加物料信息对话框 -->
|
|
|
|
|
|
|
|
<el-dialog title="选择物料信息" :visible.sync="materialOpen" append-to-body>
|
|
|
|
|
|
|
|
<add-bom @selection="handleSelection" ref="materialRef"></add-bom>
|
|
|
|
|
|
|
|
<div slot="footer" class="dialog-footer">
|
|
|
|
|
|
|
|
<el-button type="primary" @click="submitMaterialForm">确 定</el-button>
|
|
|
|
|
|
|
|
<el-button @click="materialOpen = false">取 消</el-button>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</el-dialog>
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
|
@ -363,16 +439,19 @@ import {
|
|
|
|
delProductOrder,
|
|
|
|
delProductOrder,
|
|
|
|
addProductOrder,
|
|
|
|
addProductOrder,
|
|
|
|
updateProductOrder,
|
|
|
|
updateProductOrder,
|
|
|
|
getOrderCode, productOrderLockInventory
|
|
|
|
getOrderCode, productOrderLockInventory, productOrderPublish, productOrderRecall
|
|
|
|
} from "@/api/mes/productOrder";
|
|
|
|
} from "@/api/mes/productOrder";
|
|
|
|
import addSaleOrder from '@//views/mes/productOrder/addSaleOrder.vue';
|
|
|
|
import addSaleOrder from '@//views/mes/productOrder/addSaleOrder.vue';
|
|
|
|
import {getMaterialVisionList} from "@//api/mes/materialBom";
|
|
|
|
import {getMaterialVisionList} from "@//api/mes/materialBom";
|
|
|
|
import {findRouteList} from "@//api/mes/baseRoute";
|
|
|
|
import {findRouteList} from "@//api/mes/baseRoute";
|
|
|
|
|
|
|
|
import addBom from '@//views/mes/materialBom/addBom.vue';
|
|
|
|
|
|
|
|
|
|
|
|
export default {
|
|
|
|
export default {
|
|
|
|
name: "ProductOrder",
|
|
|
|
name: "ProductOrder",
|
|
|
|
dicts: ['active_flag', 'plan_status', 'dispatch_type'],
|
|
|
|
dicts: ['active_flag', 'plan_status', 'dispatch_type'],
|
|
|
|
components: {
|
|
|
|
components: {
|
|
|
|
'add-SaleOrder': addSaleOrder
|
|
|
|
'add-SaleOrder': addSaleOrder,
|
|
|
|
|
|
|
|
'add-bom': addBom
|
|
|
|
},
|
|
|
|
},
|
|
|
|
data() {
|
|
|
|
data() {
|
|
|
|
return {
|
|
|
|
return {
|
|
|
@ -398,6 +477,8 @@ export default {
|
|
|
|
saleOrderOpen: false,
|
|
|
|
saleOrderOpen: false,
|
|
|
|
// 是否显示无订单添加弹出层
|
|
|
|
// 是否显示无订单添加弹出层
|
|
|
|
noOrderOpen: false,
|
|
|
|
noOrderOpen: false,
|
|
|
|
|
|
|
|
// 是否显示物料弹出层
|
|
|
|
|
|
|
|
materialOpen: false,
|
|
|
|
// 查询参数
|
|
|
|
// 查询参数
|
|
|
|
queryParams: {
|
|
|
|
queryParams: {
|
|
|
|
pageNum: 1,
|
|
|
|
pageNum: 1,
|
|
|
@ -453,10 +534,17 @@ export default {
|
|
|
|
dispatchId: [
|
|
|
|
dispatchId: [
|
|
|
|
{required: true, message: "派工ID不能为空", trigger: "blur"}
|
|
|
|
{required: true, message: "派工ID不能为空", trigger: "blur"}
|
|
|
|
],
|
|
|
|
],
|
|
|
|
|
|
|
|
saleAmount: [
|
|
|
|
|
|
|
|
{required: true, message: "销售数量不能为空", trigger: "blur"},
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
validator: (rule, value, callback) => callback(Number.isInteger(Number(value)) && Number(value) >= 1 ? undefined : new Error("销售数量需要是大于等于1的整数")),
|
|
|
|
|
|
|
|
trigger: "blur"
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
],
|
|
|
|
planAmount: [
|
|
|
|
planAmount: [
|
|
|
|
{required: true, message: "计划数量不能为空", trigger: "blur"},
|
|
|
|
{required: true, message: "计划数量不能为空", trigger: "blur"},
|
|
|
|
{
|
|
|
|
{
|
|
|
|
validator: (rule, value, callback) => callback(Number(value) >= 1 ? undefined : new Error("计划数量需要大于等于1")),
|
|
|
|
validator: (rule, value, callback) => callback(Number.isInteger(Number(value)) && Number(value) >= 1 ? undefined : new Error("计划数量需要是大于等于1的整数")),
|
|
|
|
trigger: "blur"
|
|
|
|
trigger: "blur"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
],
|
|
|
|
],
|
|
|
@ -515,6 +603,7 @@ export default {
|
|
|
|
// 取消按钮
|
|
|
|
// 取消按钮
|
|
|
|
cancel() {
|
|
|
|
cancel() {
|
|
|
|
this.open = false;
|
|
|
|
this.open = false;
|
|
|
|
|
|
|
|
this.noOrderOpen = false;
|
|
|
|
this.reset();
|
|
|
|
this.reset();
|
|
|
|
},
|
|
|
|
},
|
|
|
|
// 表单重置
|
|
|
|
// 表单重置
|
|
|
@ -578,6 +667,22 @@ export default {
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
/** 提交物料信息按钮 */
|
|
|
|
/** 提交物料信息按钮 */
|
|
|
|
|
|
|
|
submitMaterialForm() {
|
|
|
|
|
|
|
|
let selectedRow = this.$refs.materialRef.selectedRow;
|
|
|
|
|
|
|
|
this.form.materialId = selectedRow.materialId;
|
|
|
|
|
|
|
|
this.form.materialName = selectedRow.materialName;
|
|
|
|
|
|
|
|
getMaterialVisionList(this.form.materialId).then(response => {
|
|
|
|
|
|
|
|
this.materialBomList = response.data
|
|
|
|
|
|
|
|
if (this.materialBomList.length !== 0){
|
|
|
|
|
|
|
|
this.form.materialBomId = this.materialBomList[0].materialBomId
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
this.form.materialBomId = null;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
this.materialOpen = false;
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** 提交销售订单信息按钮 */
|
|
|
|
submitSaleOrderForm() {
|
|
|
|
submitSaleOrderForm() {
|
|
|
|
let selectedRow = this.$refs.saleOrderRef.selectedRow;
|
|
|
|
let selectedRow = this.$refs.saleOrderRef.selectedRow;
|
|
|
|
this.form.saleOrderId = selectedRow.saleOrderId;
|
|
|
|
this.form.saleOrderId = selectedRow.saleOrderId;
|
|
|
@ -593,7 +698,11 @@ export default {
|
|
|
|
this.form.saleOrderFlag = '1';
|
|
|
|
this.form.saleOrderFlag = '1';
|
|
|
|
getMaterialVisionList(this.form.materialId).then(response => {
|
|
|
|
getMaterialVisionList(this.form.materialId).then(response => {
|
|
|
|
this.materialBomList = response.data
|
|
|
|
this.materialBomList = response.data
|
|
|
|
|
|
|
|
if (this.materialBomList.length !== 0){
|
|
|
|
this.form.materialBomId = this.materialBomList[0].materialBomId
|
|
|
|
this.form.materialBomId = this.materialBomList[0].materialBomId
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
this.form.materialBomId = null;
|
|
|
|
|
|
|
|
}
|
|
|
|
})
|
|
|
|
})
|
|
|
|
this.saleOrderOpen = false;
|
|
|
|
this.saleOrderOpen = false;
|
|
|
|
},
|
|
|
|
},
|
|
|
@ -607,10 +716,20 @@ export default {
|
|
|
|
this.open = true;
|
|
|
|
this.open = true;
|
|
|
|
this.title = "添加生产工单";
|
|
|
|
this.title = "添加生产工单";
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** 新增按钮操作 */
|
|
|
|
|
|
|
|
handleMaterialAdd() {
|
|
|
|
|
|
|
|
this.materialOpen = true;
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
/** 无订单新增按钮操作 */
|
|
|
|
/** 无订单新增按钮操作 */
|
|
|
|
handleNoOrderAdd() {
|
|
|
|
handleNoOrderAdd() {
|
|
|
|
this.reset();
|
|
|
|
this.reset();
|
|
|
|
|
|
|
|
getOrderCode().then(response => {
|
|
|
|
|
|
|
|
this.form.orderCode = response.msg;
|
|
|
|
|
|
|
|
})
|
|
|
|
this.noOrderOpen = true;
|
|
|
|
this.noOrderOpen = true;
|
|
|
|
|
|
|
|
this.form.saleOrderFlag = '0';
|
|
|
|
this.title = "添加生产工单";
|
|
|
|
this.title = "添加生产工单";
|
|
|
|
},
|
|
|
|
},
|
|
|
|
/** 修改按钮操作 */
|
|
|
|
/** 修改按钮操作 */
|
|
|
@ -623,6 +742,7 @@ export default {
|
|
|
|
this.title = "修改生产工单";
|
|
|
|
this.title = "修改生产工单";
|
|
|
|
});
|
|
|
|
});
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
/** 锁库存 */
|
|
|
|
/** 锁库存 */
|
|
|
|
handleLockInventory(row) {
|
|
|
|
handleLockInventory(row) {
|
|
|
|
this.form.productOrderId = row.productOrderId;
|
|
|
|
this.form.productOrderId = row.productOrderId;
|
|
|
@ -632,6 +752,31 @@ export default {
|
|
|
|
this.getList();
|
|
|
|
this.getList();
|
|
|
|
});
|
|
|
|
});
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** 发布 */
|
|
|
|
|
|
|
|
handlePublish(row) {
|
|
|
|
|
|
|
|
this.form.productOrderId = row.productOrderId;
|
|
|
|
|
|
|
|
this.form.orderStatus = row.orderStatus;
|
|
|
|
|
|
|
|
productOrderPublish(this.form).then(response => {
|
|
|
|
|
|
|
|
this.$modal.msgSuccess("发布成功");
|
|
|
|
|
|
|
|
this.getList();
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** 撤回 */
|
|
|
|
|
|
|
|
handleRecall(row) {
|
|
|
|
|
|
|
|
this.form.productOrderId = row.productOrderId;
|
|
|
|
|
|
|
|
productOrderRecall(this.form).then(response => {
|
|
|
|
|
|
|
|
this.$modal.msgSuccess("撤回成功");
|
|
|
|
|
|
|
|
this.getList();
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** 生产派工 */
|
|
|
|
|
|
|
|
handleDispatch(row) {
|
|
|
|
|
|
|
|
this.form.productOrderId = row.productOrderId;
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
/** 提交按钮 */
|
|
|
|
/** 提交按钮 */
|
|
|
|
submitForm() {
|
|
|
|
submitForm() {
|
|
|
|
this.$refs["form"].validate(valid => {
|
|
|
|
this.$refs["form"].validate(valid => {
|
|
|
@ -640,12 +785,14 @@ export default {
|
|
|
|
updateProductOrder(this.form).then(response => {
|
|
|
|
updateProductOrder(this.form).then(response => {
|
|
|
|
this.$modal.msgSuccess("修改成功");
|
|
|
|
this.$modal.msgSuccess("修改成功");
|
|
|
|
this.open = false;
|
|
|
|
this.open = false;
|
|
|
|
|
|
|
|
this.noOrderOpen = false;
|
|
|
|
this.getList();
|
|
|
|
this.getList();
|
|
|
|
});
|
|
|
|
});
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
addProductOrder(this.form).then(response => {
|
|
|
|
addProductOrder(this.form).then(response => {
|
|
|
|
this.$modal.msgSuccess("新增成功");
|
|
|
|
this.$modal.msgSuccess("新增成功");
|
|
|
|
this.open = false;
|
|
|
|
this.open = false;
|
|
|
|
|
|
|
|
this.noOrderOpen = false;
|
|
|
|
this.getList();
|
|
|
|
this.getList();
|
|
|
|
});
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -660,7 +807,8 @@ export default {
|
|
|
|
}).then(() => {
|
|
|
|
}).then(() => {
|
|
|
|
this.getList();
|
|
|
|
this.getList();
|
|
|
|
this.$modal.msgSuccess("删除成功");
|
|
|
|
this.$modal.msgSuccess("删除成功");
|
|
|
|
}).catch(() => {});
|
|
|
|
}).catch(() => {
|
|
|
|
|
|
|
|
});
|
|
|
|
},
|
|
|
|
},
|
|
|
|
/** 导出按钮操作 */
|
|
|
|
/** 导出按钮操作 */
|
|
|
|
handleExport() {
|
|
|
|
handleExport() {
|
|
|
|