|
|
|
@ -87,7 +87,7 @@
|
|
|
|
|
<el-table v-loading="loading" :data="orderInfoList" @selection-change="handleSelectionChange">
|
|
|
|
|
<el-table-column type="selection" width="55" align="center" />
|
|
|
|
|
<el-table-column label="主键标识" align="center" prop="objId" v-if="columns[0].visible"/>
|
|
|
|
|
<el-table-column label="工单编号" align="center" prop="orderCode" v-if="columns[1].visible"/>
|
|
|
|
|
<el-table-column label="工单编号" align="center" prop="orderCode" v-if="columns[1].visible" fixed/>
|
|
|
|
|
<el-table-column label="销售订单编号" align="center" prop="saleOrderCode" v-if="columns[2].visible"/>
|
|
|
|
|
<el-table-column label="销售订单行号" align="center" prop="saleOrderLineNumber" v-if="columns[3].visible"/>
|
|
|
|
|
<el-table-column label="物料编码" align="center" prop="materialCode" v-if="columns[4].visible"/>
|
|
|
|
@ -105,6 +105,11 @@
|
|
|
|
|
<dict-tag :options="dict.type.order_status" :value="scope.row.orderStatus"/>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column label="是否已下达计划" align="center" prop="isRelease" v-if="columns[20].visible">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<dict-tag :options="dict.type.is_release" :value="scope.row.isRelease"/>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column label="开始日期" align="center" prop="beginDate" width="180" v-if="columns[11].visible">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<span>{{ parseTime(scope.row.beginDate, '{y}-{m}-{d}') }}</span>
|
|
|
|
@ -143,17 +148,23 @@
|
|
|
|
|
<el-button
|
|
|
|
|
size="mini"
|
|
|
|
|
type="text"
|
|
|
|
|
icon="el-icon-edit"
|
|
|
|
|
@click="handleUpdate(scope.row)"
|
|
|
|
|
v-hasPermi="['base:orderInfo:edit']"
|
|
|
|
|
>修改</el-button>
|
|
|
|
|
icon="el-icon-bottom"
|
|
|
|
|
@click="handleReleasePlan(scope.row)"
|
|
|
|
|
>下达计划</el-button>
|
|
|
|
|
<el-button
|
|
|
|
|
size="mini"
|
|
|
|
|
type="text"
|
|
|
|
|
icon="el-icon-delete"
|
|
|
|
|
@click="handleDelete(scope.row)"
|
|
|
|
|
v-hasPermi="['base:orderInfo:remove']"
|
|
|
|
|
>删除</el-button>
|
|
|
|
|
icon="el-icon-edit"
|
|
|
|
|
@click="handleUpdate(scope.row)"
|
|
|
|
|
v-hasPermi="['base:orderInfo:edit']"
|
|
|
|
|
>修改工单</el-button>
|
|
|
|
|
<!-- <el-button-->
|
|
|
|
|
<!-- size="mini"-->
|
|
|
|
|
<!-- type="text"-->
|
|
|
|
|
<!-- icon="el-icon-delete"-->
|
|
|
|
|
<!-- @click="handleDelete(scope.row)"-->
|
|
|
|
|
<!-- v-hasPermi="['base:orderInfo:remove']"-->
|
|
|
|
|
<!-- >删除</el-button>-->
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
</el-table>
|
|
|
|
@ -259,11 +270,18 @@
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<script>
|
|
|
|
|
import { listOrderInfo, getOrderInfo, delOrderInfo, addOrderInfo, updateOrderInfo } from "@/api/base/orderInfo";
|
|
|
|
|
import {
|
|
|
|
|
listOrderInfo,
|
|
|
|
|
getOrderInfo,
|
|
|
|
|
delOrderInfo,
|
|
|
|
|
addOrderInfo,
|
|
|
|
|
updateOrderInfo,
|
|
|
|
|
releaseOrderPlan
|
|
|
|
|
} from '@/api/base/orderInfo'
|
|
|
|
|
|
|
|
|
|
export default {
|
|
|
|
|
name: "OrderInfo",
|
|
|
|
|
dicts: ['order_status', 'order_type', 'is_flag'],
|
|
|
|
|
dicts: ['order_status', 'order_type', 'is_flag', 'is_release'],
|
|
|
|
|
data() {
|
|
|
|
|
return {
|
|
|
|
|
// 遮罩层
|
|
|
|
@ -302,6 +320,7 @@ export default {
|
|
|
|
|
endDate: null,
|
|
|
|
|
factoryCode: null,
|
|
|
|
|
isFlag: null,
|
|
|
|
|
isRelease: null,
|
|
|
|
|
createdBy: null,
|
|
|
|
|
createdTime: null,
|
|
|
|
|
updatedBy: null,
|
|
|
|
@ -334,6 +353,7 @@ export default {
|
|
|
|
|
{ key: 17, label: `更新人`, visible: false },
|
|
|
|
|
{ key: 18, label: `更新时间`, visible: false },
|
|
|
|
|
{ key: 19, label: `完成日期`, visible: true },
|
|
|
|
|
{ key: 20, label: `是否已下达计划`, visible: true },
|
|
|
|
|
]
|
|
|
|
|
};
|
|
|
|
|
},
|
|
|
|
@ -373,6 +393,7 @@ export default {
|
|
|
|
|
endDate: null,
|
|
|
|
|
factoryCode: null,
|
|
|
|
|
isFlag: 0,
|
|
|
|
|
isRelease: null,
|
|
|
|
|
createdBy: null,
|
|
|
|
|
createdTime: null,
|
|
|
|
|
updatedBy: null,
|
|
|
|
@ -413,6 +434,22 @@ export default {
|
|
|
|
|
this.title = "修改工单信息";
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
/** 下达计划 */
|
|
|
|
|
handleReleasePlan(row){
|
|
|
|
|
if (row.isRelease === 0){
|
|
|
|
|
this.$modal.msgWarning("该工单已下达计划!");
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
this.$modal.confirm('是否下达工单编号为:"' + row.orderCode + '"的工单计划?').then(function() {
|
|
|
|
|
return releaseOrderPlan(row);
|
|
|
|
|
}).then(() => {
|
|
|
|
|
this.getList();
|
|
|
|
|
this.$modal.msgSuccess("下达工单计划成功");
|
|
|
|
|
}).catch((e) => {
|
|
|
|
|
console.log("下达计划错误信息:",e);
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
/** 提交按钮 */
|
|
|
|
|
submitForm() {
|
|
|
|
|
this.$refs["form"].validate(valid => {
|
|
|
|
|