厂务订单里改个工单接口 #248
@ -34,6 +34,15 @@ export function workOrderList(query) {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 条件获得工单列表
|
||||||
|
export function getFreeWOlist(query) {
|
||||||
|
return request({
|
||||||
|
url: '/base/core-work-order/getFreeWOlist',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
// 获得订单分页
|
// 获得订单分页
|
||||||
export function getOrderPage(query) {
|
export function getOrderPage(query) {
|
||||||
return request({
|
return request({
|
||||||
|
@ -2,44 +2,20 @@
|
|||||||
<div class="app-container">
|
<div class="app-container">
|
||||||
|
|
||||||
<!-- 搜索工作栏 -->
|
<!-- 搜索工作栏 -->
|
||||||
<search-bar
|
<search-bar :formConfigs="formConfig" ref="searchBarForm" @headBtnClick="buttonClick" />
|
||||||
:formConfigs="formConfig"
|
|
||||||
ref="searchBarForm"
|
|
||||||
@headBtnClick="buttonClick"
|
|
||||||
/>
|
|
||||||
<!-- 列表 -->
|
<!-- 列表 -->
|
||||||
<base-table
|
<base-table :page="queryParams.pageNo" :limit="queryParams.pageSize" :table-props="tableProps" :table-data="list"
|
||||||
:page="queryParams.pageNo"
|
:max-height="tableH" @selection-change="selectChange">
|
||||||
:limit="queryParams.pageSize"
|
<method-btn v-if="tableBtn.length" slot="handleBtn" :width="120" label="操作" :method-list="tableBtn"
|
||||||
:table-props="tableProps"
|
@clickBtn="handleClick" />
|
||||||
:table-data="list"
|
|
||||||
:max-height="tableH"
|
|
||||||
@selection-change="selectChange"
|
|
||||||
>
|
|
||||||
<method-btn
|
|
||||||
v-if="tableBtn.length"
|
|
||||||
slot="handleBtn"
|
|
||||||
:width="120"
|
|
||||||
label="操作"
|
|
||||||
:method-list="tableBtn"
|
|
||||||
@clickBtn="handleClick"
|
|
||||||
/>
|
|
||||||
</base-table>
|
</base-table>
|
||||||
<pagination
|
<pagination :page.sync="queryParams.pageNo" :limit.sync="queryParams.pageSize" :total="total"
|
||||||
:page.sync="queryParams.pageNo"
|
@pagination="getList" />
|
||||||
:limit.sync="queryParams.pageSize"
|
|
||||||
:total="total"
|
|
||||||
@pagination="getList"
|
|
||||||
/>
|
|
||||||
<!-- 新增 -->
|
<!-- 新增 -->
|
||||||
<base-dialog
|
<base-dialog :dialogTitle="addOrEditTitle" :dialogVisible="centervisible" @cancel="handleCancel"
|
||||||
:dialogTitle="addOrEditTitle"
|
@confirm="handleConfirm" :before-close="handleCancel">
|
||||||
:dialogVisible="centervisible"
|
<energy-quantity-manual-add ref="energyQuantityManualAdd" :energyTypeList="energyTypeList"
|
||||||
@cancel="handleCancel"
|
@successSubmit="successSubmit" />
|
||||||
@confirm="handleConfirm"
|
|
||||||
:before-close="handleCancel"
|
|
||||||
>
|
|
||||||
<energy-quantity-manual-add ref="energyQuantityManualAdd" :energyTypeList="energyTypeList" @successSubmit="successSubmit" />
|
|
||||||
</base-dialog>
|
</base-dialog>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@ -68,7 +44,7 @@ const tableProps = [
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'tableName',
|
prop: 'tableName',
|
||||||
label: '水/气表名',
|
label: '能源表名',
|
||||||
filter: publicFormatter('table_name'),
|
filter: publicFormatter('table_name'),
|
||||||
minWidth: 110
|
minWidth: 110
|
||||||
},
|
},
|
||||||
|
@ -16,10 +16,7 @@
|
|||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="单位" prop="unit">
|
<el-form-item label="单位" prop="unit">
|
||||||
<el-select v-model="form.unit" placeholder="请选择" style="width: 100%;">
|
<el-select v-model="form.unit" placeholder="请选择" style="width: 100%;">
|
||||||
<el-option
|
<el-option v-for="item in getDictDatas(DICT_TYPE.ENERGY_UNIT)" :key="item.value" :label="item.label"
|
||||||
v-for="item in getDictDatas(DICT_TYPE.ENERGY_UNIT)"
|
|
||||||
:key="item.value"
|
|
||||||
:label="item.label"
|
|
||||||
:value="item.value">
|
:value="item.value">
|
||||||
</el-option>
|
</el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
@ -38,7 +35,8 @@
|
|||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="12" v-show="form.pricingMethod === 2">
|
<el-col :span="12" v-show="form.pricingMethod === 2">
|
||||||
<el-form-item label="单价(元)" prop="pricingMethod">
|
<el-form-item label="单价(元)" prop="pricingMethod">
|
||||||
<el-input-number v-model="form.singlePrice" :precision="2" :min="0" :max="999999999" style="width: 100%;"></el-input-number>
|
<el-input-number v-model="form.singlePrice" :precision="2" :min="0" :max="999999999"
|
||||||
|
style="width: 100%;"></el-input-number>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12" v-show="form.pricingMethod === 1">
|
<el-col :span="12" v-show="form.pricingMethod === 1">
|
||||||
@ -51,43 +49,19 @@
|
|||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="24" v-show="form.pricingMethod === 0">
|
<el-col :span="24" v-show="form.pricingMethod === 0">
|
||||||
<el-form-item label="时间段" prop="pricingMethod">
|
<el-form-item label="时间段" prop="pricingMethod">
|
||||||
<base-table
|
<base-table :key='timeKye' :table-props="tableProps1" :table-data="tableData1"
|
||||||
:key='timeKye'
|
:add-button-show="addButtonShow" @emitButtonClick="emitButtonClick1" @emitFun="inputChange1">
|
||||||
:table-props="tableProps1"
|
<method-btn v-if="tableBtn.length" slot="handleBtn" :width="80" label="操作" :method-list="tableBtn"
|
||||||
:table-data="tableData1"
|
@clickBtn="handleClick1" />
|
||||||
:add-button-show="addButtonShow"
|
|
||||||
@emitButtonClick="emitButtonClick1"
|
|
||||||
@emitFun="inputChange1"
|
|
||||||
>
|
|
||||||
<method-btn
|
|
||||||
v-if="tableBtn.length"
|
|
||||||
slot="handleBtn"
|
|
||||||
:width="80"
|
|
||||||
label="操作"
|
|
||||||
:method-list="tableBtn"
|
|
||||||
@clickBtn="handleClick1"
|
|
||||||
/>
|
|
||||||
</base-table>
|
</base-table>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="24" v-show="form.pricingMethod === 1">
|
<el-col :span="24" v-show="form.pricingMethod === 1">
|
||||||
<el-form-item label="使用量" prop="pricingMethod">
|
<el-form-item label="使用量" prop="pricingMethod">
|
||||||
<base-table
|
<base-table :key='usedKye' :table-props="tableProps2" :table-data="tableData2"
|
||||||
:key='usedKye'
|
:add-button-show="addButtonShow" @emitButtonClick="emitButtonClick2" @emitFun="inputChange2">
|
||||||
:table-props="tableProps2"
|
<method-btn v-if="tableBtn.length" slot="handleBtn" :width="80" label="操作" :method-list="tableBtn"
|
||||||
:table-data="tableData2"
|
@clickBtn="handleClick2" />
|
||||||
:add-button-show="addButtonShow"
|
|
||||||
@emitButtonClick="emitButtonClick2"
|
|
||||||
@emitFun="inputChange2"
|
|
||||||
>
|
|
||||||
<method-btn
|
|
||||||
v-if="tableBtn.length"
|
|
||||||
slot="handleBtn"
|
|
||||||
:width="80"
|
|
||||||
label="操作"
|
|
||||||
:method-list="tableBtn"
|
|
||||||
@clickBtn="handleClick2"
|
|
||||||
/>
|
|
||||||
</base-table>
|
</base-table>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
@ -198,6 +172,7 @@ export default {
|
|||||||
this.tableData2 = res.data.usedPriceList || []
|
this.tableData2 = res.data.usedPriceList || []
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
this.form.singlePrice = res.data.singlePrice || 0
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<el-drawer title="查看详情" :visible.sync="visible" size="70%">
|
<el-drawer title="查看详情" :visible.sync="visible" size="70%" :show-close='false'>
|
||||||
<div class="box">
|
<div class="box">
|
||||||
<el-row class="topBox">
|
<el-row class="topBox">
|
||||||
<el-col :span="6">
|
<el-col :span="6">
|
||||||
|
@ -6,12 +6,9 @@
|
|||||||
<el-input v-model="form.name"></el-input>
|
<el-input v-model="form.name"></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="工单名称" prop="workOrderId" v-if='isBind'>
|
<el-form-item label="工单名称" prop="workOrderId" v-if='isBind'>
|
||||||
<el-select v-model="form.workOrderId" placeholder="请选择" style="width: 100%;" filterable @change="getWorkOrderMsg">
|
<el-select v-model="form.workOrderId" placeholder="请选择" style="width: 100%;" filterable
|
||||||
<el-option
|
@change="getWorkOrderMsg">
|
||||||
v-for="item in workOrderList"
|
<el-option v-for="item in workOrderList" :key="item.id" :label="item.name" :value="item.id">
|
||||||
:key="item.id"
|
|
||||||
:label="item.name"
|
|
||||||
:value="item.id">
|
|
||||||
</el-option>
|
</el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@ -24,11 +21,7 @@
|
|||||||
<el-col :span='6'>
|
<el-col :span='6'>
|
||||||
<el-form-item label="产品名称" prop="planProductId">
|
<el-form-item label="产品名称" prop="planProductId">
|
||||||
<el-select v-model="form.planProductId" placeholder="请选择" disabled style="width: 100%;">
|
<el-select v-model="form.planProductId" placeholder="请选择" disabled style="width: 100%;">
|
||||||
<el-option
|
<el-option v-for="item in productList" :key="item.id" :label="item.name" :value="item.id">
|
||||||
v-for="item in productList"
|
|
||||||
:key="item.id"
|
|
||||||
:label="item.name"
|
|
||||||
:value="item.id">
|
|
||||||
</el-option>
|
</el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@ -42,36 +35,28 @@
|
|||||||
<el-row :gutter="20">
|
<el-row :gutter="20">
|
||||||
<el-col :span='6'>
|
<el-col :span='6'>
|
||||||
<el-form-item label="计划开始时间">
|
<el-form-item label="计划开始时间">
|
||||||
<el-date-picker
|
<el-date-picker v-model="planStartTime" type="datetime" value-format="yyyy-MM-dd HH:mm:ss"
|
||||||
v-model="planStartTime"
|
style="width: 100%;" placeholder="选择日期" :disabled="isBind">
|
||||||
type="datetime"
|
|
||||||
value-format="yyyy-MM-dd HH:mm:ss"
|
|
||||||
style="width: 100%;"
|
|
||||||
placeholder="选择日期"
|
|
||||||
:disabled="isBind">
|
|
||||||
</el-date-picker>
|
</el-date-picker>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span='6'>
|
<el-col :span='6'>
|
||||||
<el-form-item label="计划完成时间">
|
<el-form-item label="计划完成时间">
|
||||||
<el-date-picker
|
<el-date-picker v-model="planFinishTime" type="datetime" value-format="yyyy-MM-dd HH:mm:ss"
|
||||||
v-model="planFinishTime"
|
style="width: 100%;" placeholder="选择日期" :disabled="isBind">
|
||||||
type="datetime"
|
|
||||||
value-format="yyyy-MM-dd HH:mm:ss"
|
|
||||||
style="width: 100%;"
|
|
||||||
placeholder="选择日期"
|
|
||||||
:disabled="isBind">
|
|
||||||
</el-date-picker>
|
</el-date-picker>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span='6'>
|
<el-col :span='6'>
|
||||||
<el-form-item label="计划投入数量" prop="planAssignQuantity">
|
<el-form-item label="计划投入数量" prop="planAssignQuantity">
|
||||||
<el-input-number v-model="form.planAssignQuantity" :min="0" :max="9999999999999" :disabled="isBind" style="width: 100%;"></el-input-number>
|
<el-input-number v-model="form.planAssignQuantity" :min="0" :max="9999999999999" :disabled="isBind"
|
||||||
|
style="width: 100%;"></el-input-number>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span='6'>
|
<el-col :span='6'>
|
||||||
<el-form-item label="计划生产数量" prop="planQuantity">
|
<el-form-item label="计划生产数量" prop="planQuantity">
|
||||||
<el-input-number v-model="form.planQuantity" :min="0" :max="9999999999999" :disabled="isBind" style="width: 100%;"></el-input-number>
|
<el-input-number v-model="form.planQuantity" :min="0" :max="9999999999999" :disabled="isBind"
|
||||||
|
style="width: 100%;"></el-input-number>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
@ -79,18 +64,15 @@
|
|||||||
<el-col :span='6'>
|
<el-col :span='6'>
|
||||||
<el-form-item label="关联工艺" prop="processFlowId">
|
<el-form-item label="关联工艺" prop="processFlowId">
|
||||||
<el-select v-model="form.processFlowId" placeholder="请选择" :disabled="isBind" style="width: 100%;">
|
<el-select v-model="form.processFlowId" placeholder="请选择" :disabled="isBind" style="width: 100%;">
|
||||||
<el-option
|
<el-option v-for="item in processFlowList" :key="item.id" :label="item.name" :value="item.id">
|
||||||
v-for="item in processFlowList"
|
|
||||||
:key="item.id"
|
|
||||||
:label="item.name"
|
|
||||||
:value="item.id">
|
|
||||||
</el-option>
|
</el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span='6'>
|
<el-col :span='6'>
|
||||||
<el-form-item label="物料计算方式" prop="materialMethod">
|
<el-form-item label="物料计算方式" prop="materialMethod">
|
||||||
<el-select v-model="form.materialMethod" placeholder="请选择" style="width: 100%;" :disabled="isBind" @change='selectMethod'>
|
<el-select v-model="form.materialMethod" placeholder="请选择" style="width: 100%;" :disabled="isBind"
|
||||||
|
@change='selectMethod'>
|
||||||
<el-option label="产品基础BOM" :value="1"></el-option>
|
<el-option label="产品基础BOM" :value="1"></el-option>
|
||||||
<el-option label="工艺扩展BOM" :value="2"></el-option>
|
<el-option label="工艺扩展BOM" :value="2"></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
@ -99,10 +81,7 @@
|
|||||||
<el-col :span='6'>
|
<el-col :span='6'>
|
||||||
<el-form-item label="优先级" prop="priority">
|
<el-form-item label="优先级" prop="priority">
|
||||||
<el-select v-model="form.priority" placeholder="请选择" style="width: 100%;" :disabled="isBind">
|
<el-select v-model="form.priority" placeholder="请选择" style="width: 100%;" :disabled="isBind">
|
||||||
<el-option
|
<el-option v-for="item in getDictDatas(DICT_TYPE.ORDER_PRIORITY)" :key="item.value" :label="item.label"
|
||||||
v-for="item in getDictDatas(DICT_TYPE.ORDER_PRIORITY)"
|
|
||||||
:key="item.value"
|
|
||||||
:label="item.label"
|
|
||||||
:value="item.value">
|
:value="item.value">
|
||||||
</el-option>
|
</el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
@ -111,11 +90,7 @@
|
|||||||
<el-col :span='6'>
|
<el-col :span='6'>
|
||||||
<el-form-item label="工单类型" prop="type">
|
<el-form-item label="工单类型" prop="type">
|
||||||
<el-select v-model="form.type" placeholder="请选择" style="width: 100%;" :disabled="isBind">
|
<el-select v-model="form.type" placeholder="请选择" style="width: 100%;" :disabled="isBind">
|
||||||
<el-option
|
<el-option v-for="item in workOrderTypeList" :key="item.id" :label="item.name" :value="item.id">
|
||||||
v-for="item in workOrderTypeList"
|
|
||||||
:key="item.id"
|
|
||||||
:label="item.name"
|
|
||||||
:value="item.id">
|
|
||||||
</el-option>
|
</el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@ -125,11 +100,7 @@
|
|||||||
<el-col :span='6'>
|
<el-col :span='6'>
|
||||||
<el-form-item label="关联产线" prop="productLineId">
|
<el-form-item label="关联产线" prop="productLineId">
|
||||||
<el-select v-model="form.productLineId" placeholder="请选择" multiple style="width: 100%;" :disabled="isBind">
|
<el-select v-model="form.productLineId" placeholder="请选择" multiple style="width: 100%;" :disabled="isBind">
|
||||||
<el-option
|
<el-option v-for="item in productLineList" :key="item.id" :label="item.name" :value="item.id">
|
||||||
v-for="item in productLineList"
|
|
||||||
:key="item.id"
|
|
||||||
:label="item.name"
|
|
||||||
:value="item.id">
|
|
||||||
</el-option>
|
</el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@ -137,10 +108,7 @@
|
|||||||
<el-col :span='6'>
|
<el-col :span='6'>
|
||||||
<el-form-item label="负责车间" prop="roomNameDict">
|
<el-form-item label="负责车间" prop="roomNameDict">
|
||||||
<el-select v-model="form.roomNameDict" placeholder="请选择" style="width: 100%;" :disabled="isBind">
|
<el-select v-model="form.roomNameDict" placeholder="请选择" style="width: 100%;" :disabled="isBind">
|
||||||
<el-option
|
<el-option v-for="item in getDictDatas(DICT_TYPE.WORK_SHOP)" :key="item.value" :label="item.label"
|
||||||
v-for="item in getDictDatas(DICT_TYPE.WORK_SHOP)"
|
|
||||||
:key="item.value"
|
|
||||||
:label="item.label"
|
|
||||||
:value="item.value">
|
:value="item.value">
|
||||||
</el-option>
|
</el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
@ -153,7 +121,8 @@
|
|||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span='6'>
|
<el-col :span='6'>
|
||||||
<el-form-item label="计划分配订单量" prop="planAssignmentQuantity">
|
<el-form-item label="计划分配订单量" prop="planAssignmentQuantity">
|
||||||
<el-input-number v-model="form.planAssignmentQuantity" :min="0" :max="9999999999999" style="width: 100%;"></el-input-number>
|
<el-input-number v-model="form.planAssignmentQuantity" :min="0" :max="9999999999999"
|
||||||
|
style="width: 100%;"></el-input-number>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
@ -161,7 +130,7 @@
|
|||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import { getProductAll } from '@/api/base/product'
|
import { getProductAll } from '@/api/base/product'
|
||||||
import { getProcessFlowList, getWorkOrderCode, orderIssue, workOrderList, getWorkOrderById } from '@/api/base/orderManage'
|
import { getProcessFlowList, getWorkOrderCode, orderIssue, getFreeWOlist, getWorkOrderById } from '@/api/base/orderManage'
|
||||||
import { getLineAll } from '@/api/base/productionLine'
|
import { getLineAll } from '@/api/base/productionLine'
|
||||||
import moment from 'moment'
|
import moment from 'moment'
|
||||||
export default {
|
export default {
|
||||||
@ -244,7 +213,7 @@ export default {
|
|||||||
this.processFlowList = res.data || []
|
this.processFlowList = res.data || []
|
||||||
})
|
})
|
||||||
// 工单list
|
// 工单list
|
||||||
workOrderList({
|
getFreeWOlist({
|
||||||
status: 1
|
status: 1
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
this.workOrderList = res.data || []
|
this.workOrderList = res.data || []
|
||||||
|
Loading…
Reference in New Issue
Block a user