|
|
|
@ -338,6 +338,11 @@
|
|
|
|
|
placeholder="请选择计划交货日期">
|
|
|
|
|
</el-date-picker>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="前置生产工单" prop="preOrderCode">
|
|
|
|
|
<el-input v-model="form.preOrderCode" placeholder="请点击右侧检索生产工单" :disabled="productOrderDisabled" readonly>
|
|
|
|
|
<el-button slot="append" icon="el-icon-search" @click="handleProductOrderAdd"></el-button>
|
|
|
|
|
</el-input>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="计划开始时间" prop="planBeginTime">
|
|
|
|
|
<el-date-picker clearable
|
|
|
|
|
v-model="form.planBeginTime"
|
|
|
|
@ -416,6 +421,11 @@
|
|
|
|
|
placeholder="请选择计划交货日期">
|
|
|
|
|
</el-date-picker>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="前置生产工单" prop="preOrderCode">
|
|
|
|
|
<el-input v-model="form.preOrderCode" placeholder="请点击右侧检索生产工单" :disabled="productOrderDisabled" readonly>
|
|
|
|
|
<el-button slot="append" icon="el-icon-search" @click="handleProductOrderAdd"></el-button>
|
|
|
|
|
</el-input>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="计划开始时间" prop="planBeginTime">
|
|
|
|
|
<el-date-picker clearable
|
|
|
|
|
v-model="form.planBeginTime"
|
|
|
|
@ -460,6 +470,15 @@
|
|
|
|
|
</div>
|
|
|
|
|
</el-dialog>
|
|
|
|
|
|
|
|
|
|
<!-- 添加生产工单信息对话框 -->
|
|
|
|
|
<el-dialog title="选择生产工单信息" :visible.sync="productOrderOpen" width="1000px" append-to-body>
|
|
|
|
|
<add-product-order @selection="handleSelection" ref="productOrderRef"></add-product-order>
|
|
|
|
|
<div slot="footer" class="dialog-footer">
|
|
|
|
|
<el-button type="primary" @click="submitProductOrderForm">确 定</el-button>
|
|
|
|
|
<el-button @click="productOrderOpen = false">取 消</el-button>
|
|
|
|
|
</div>
|
|
|
|
|
</el-dialog>
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
@ -476,14 +495,17 @@ import addSaleOrder from '@//views/mes/productOrder/addSaleOrder.vue';
|
|
|
|
|
import {getMaterialVisionList} from "@//api/mes/materialBom";
|
|
|
|
|
import {findRouteList} from "@//api/mes/baseRoute";
|
|
|
|
|
import addBom from '@//views/mes/materialBom/addBom.vue';
|
|
|
|
|
import add_ProductOrder from '@//views/mes/productOrder/addProductOrder.vue';
|
|
|
|
|
import router from "@//router";
|
|
|
|
|
import {parseTime} from "@/utils/ruoyi";
|
|
|
|
|
|
|
|
|
|
export default {
|
|
|
|
|
name: "ProductOrder",
|
|
|
|
|
dicts: ['active_flag', 'plan_status', 'dispatch_type', 'mes_sale_type'],
|
|
|
|
|
components: {
|
|
|
|
|
'add-SaleOrder': addSaleOrder,
|
|
|
|
|
'add-bom': addBom
|
|
|
|
|
'add-bom': addBom,
|
|
|
|
|
'add-product-order': add_ProductOrder,
|
|
|
|
|
},
|
|
|
|
|
data() {
|
|
|
|
|
return {
|
|
|
|
@ -513,6 +535,8 @@ export default {
|
|
|
|
|
noOrderOpen: false,
|
|
|
|
|
// 是否显示物料弹出层
|
|
|
|
|
materialOpen: false,
|
|
|
|
|
// 是否显示生产弹出层
|
|
|
|
|
productOrderOpen: false,
|
|
|
|
|
// 查询参数
|
|
|
|
|
queryParams: {
|
|
|
|
|
pageNum: 1,
|
|
|
|
@ -630,9 +654,9 @@ export default {
|
|
|
|
|
materialBomList: [],
|
|
|
|
|
//工艺路线选项
|
|
|
|
|
routeList: [],
|
|
|
|
|
|
|
|
|
|
saleOrderDisabled: true,
|
|
|
|
|
materialDisabled: true,
|
|
|
|
|
productOrderDisabled: true,
|
|
|
|
|
//销售类型
|
|
|
|
|
MES_SALE_TYPE: {
|
|
|
|
|
MES_SALE_TYPE_EXTERNAL: '1',//外部销售
|
|
|
|
@ -783,6 +807,19 @@ export default {
|
|
|
|
|
this.saleOrderOpen = false;
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
/** 提交生产工单信息按钮 */
|
|
|
|
|
submitProductOrderForm() {
|
|
|
|
|
let selectedRow = this.$refs.productOrderRef.selectedRow;
|
|
|
|
|
this.form.preOrderId = selectedRow.saleOrderId;
|
|
|
|
|
this.form.preOrderCode = selectedRow.orderCode;
|
|
|
|
|
if (selectedRow.planBeginTime != null && this.form.planBeginTime == null){
|
|
|
|
|
const date = new Date(selectedRow.planBeginTime);
|
|
|
|
|
date.setDate(date.getDate() + 1)
|
|
|
|
|
this.form.planBeginTime = parseTime(date, '{y}-{m}-{d} {h}:{i}:{s}');
|
|
|
|
|
}
|
|
|
|
|
this.productOrderOpen = false;
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
changeSaleType(value) {
|
|
|
|
|
this.form.saleOrderId = null;
|
|
|
|
|
this.form.saleorderCode = null;
|
|
|
|
@ -837,6 +874,11 @@ export default {
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
/** 新增按钮操作 */
|
|
|
|
|
handleProductOrderAdd() {
|
|
|
|
|
this.productOrderOpen = true;
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
/** 无订单新增按钮操作 */
|
|
|
|
|
handleNoOrderAdd() {
|
|
|
|
|
this.materialDisabled = false;
|
|
|
|
|