Compare commits
No commits in common. "5af67b93fb0c6685ff5f506e4ecd5b6689ec50d4" and "3d33912effa5a332a5c48afd5eeedf5abe2aae6d" have entirely different histories.
5af67b93fb
...
3d33912eff
@ -34,15 +34,6 @@ 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,20 +2,44 @@
|
|||||||
<div class="app-container">
|
<div class="app-container">
|
||||||
|
|
||||||
<!-- 搜索工作栏 -->
|
<!-- 搜索工作栏 -->
|
||||||
<search-bar :formConfigs="formConfig" ref="searchBarForm" @headBtnClick="buttonClick" />
|
<search-bar
|
||||||
|
:formConfigs="formConfig"
|
||||||
|
ref="searchBarForm"
|
||||||
|
@headBtnClick="buttonClick"
|
||||||
|
/>
|
||||||
<!-- 列表 -->
|
<!-- 列表 -->
|
||||||
<base-table :page="queryParams.pageNo" :limit="queryParams.pageSize" :table-props="tableProps" :table-data="list"
|
<base-table
|
||||||
:max-height="tableH" @selection-change="selectChange">
|
:page="queryParams.pageNo"
|
||||||
<method-btn v-if="tableBtn.length" slot="handleBtn" :width="120" label="操作" :method-list="tableBtn"
|
:limit="queryParams.pageSize"
|
||||||
@clickBtn="handleClick" />
|
:table-props="tableProps"
|
||||||
|
: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 :page.sync="queryParams.pageNo" :limit.sync="queryParams.pageSize" :total="total"
|
<pagination
|
||||||
@pagination="getList" />
|
:page.sync="queryParams.pageNo"
|
||||||
|
:limit.sync="queryParams.pageSize"
|
||||||
|
:total="total"
|
||||||
|
@pagination="getList"
|
||||||
|
/>
|
||||||
<!-- 新增 -->
|
<!-- 新增 -->
|
||||||
<base-dialog :dialogTitle="addOrEditTitle" :dialogVisible="centervisible" @cancel="handleCancel"
|
<base-dialog
|
||||||
@confirm="handleConfirm" :before-close="handleCancel">
|
:dialogTitle="addOrEditTitle"
|
||||||
<energy-quantity-manual-add ref="energyQuantityManualAdd" :energyTypeList="energyTypeList"
|
:dialogVisible="centervisible"
|
||||||
@successSubmit="successSubmit" />
|
@cancel="handleCancel"
|
||||||
|
@confirm="handleConfirm"
|
||||||
|
:before-close="handleCancel"
|
||||||
|
>
|
||||||
|
<energy-quantity-manual-add ref="energyQuantityManualAdd" :energyTypeList="energyTypeList" @successSubmit="successSubmit" />
|
||||||
</base-dialog>
|
</base-dialog>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@ -44,7 +68,7 @@ const tableProps = [
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'tableName',
|
prop: 'tableName',
|
||||||
label: '能源表名',
|
label: '水/气表名',
|
||||||
filter: publicFormatter('table_name'),
|
filter: publicFormatter('table_name'),
|
||||||
minWidth: 110
|
minWidth: 110
|
||||||
},
|
},
|
||||||
@ -118,25 +142,25 @@ export default {
|
|||||||
// 班次基础信息列表
|
// 班次基础信息列表
|
||||||
list: [],
|
list: [],
|
||||||
tableBtn: [
|
tableBtn: [
|
||||||
this.$auth.hasPermi('base:energy-quantity-manual:create')
|
this.$auth.hasPermi('base:energy-quantity-manual:create')
|
||||||
? {
|
? {
|
||||||
type: 'meterReading',
|
type: 'meterReading',
|
||||||
btnName: '抄表'
|
btnName: '抄表'
|
||||||
}
|
}
|
||||||
: undefined,
|
: undefined,
|
||||||
this.$auth.hasPermi('base:energy-quantity-manual:update')
|
this.$auth.hasPermi('base:energy-quantity-manual:update')
|
||||||
? {
|
? {
|
||||||
type: 'edit',
|
type: 'edit',
|
||||||
btnName: '编辑'
|
btnName: '编辑'
|
||||||
}
|
}
|
||||||
: undefined,
|
: undefined,
|
||||||
this.$auth.hasPermi('base:energy-quantity-manual:delete')
|
this.$auth.hasPermi('base:energy-quantity-manual:delete')
|
||||||
? {
|
? {
|
||||||
type: 'delete',
|
type: 'delete',
|
||||||
btnName: '删除'
|
btnName: '删除'
|
||||||
}
|
}
|
||||||
: undefined
|
: undefined
|
||||||
].filter((v) => v),
|
].filter((v)=>v),
|
||||||
// 查询参数
|
// 查询参数
|
||||||
queryParams: {
|
queryParams: {
|
||||||
pageNo: 1,
|
pageNo: 1,
|
||||||
@ -185,10 +209,10 @@ export default {
|
|||||||
break
|
break
|
||||||
default:
|
default:
|
||||||
this.$modal.confirm('是否确认导出').then(() => {
|
this.$modal.confirm('是否确认导出').then(() => {
|
||||||
return energyQuantityManualExport({ ...this.queryParams });
|
return energyQuantityManualExport({...this.queryParams});
|
||||||
}).then(response => {
|
}).then(response => {
|
||||||
this.$download.excel(response, '能源报表.xls');
|
this.$download.excel(response, '能源报表.xls');
|
||||||
}).catch(() => { })
|
}).catch(() => {})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
/** 查询列表 */
|
/** 查询列表 */
|
||||||
@ -257,13 +281,13 @@ export default {
|
|||||||
/** 删除按钮操作 */
|
/** 删除按钮操作 */
|
||||||
handleDelete(row) {
|
handleDelete(row) {
|
||||||
console.log(row.id)
|
console.log(row.id)
|
||||||
this.$modal.confirm('是否确认删除能源类型为"' + row.energyType + '"的数据项?').then(function () {
|
this.$modal.confirm('是否确认删除能源类型为"' + row.energyType + '"的数据项?').then(function() {
|
||||||
return energyQuantityManualDelete({ id: row.id });
|
return energyQuantityManualDelete({id: row.id});
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
this.queryParams.pageNo = 1;
|
this.queryParams.pageNo = 1;
|
||||||
this.getList();
|
this.getList();
|
||||||
this.$modal.msgSuccess("删除成功");
|
this.$modal.msgSuccess("删除成功");
|
||||||
}).catch(() => { });
|
}).catch(() => {});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -16,7 +16,10 @@
|
|||||||
<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 v-for="item in getDictDatas(DICT_TYPE.ENERGY_UNIT)" :key="item.value" :label="item.label"
|
<el-option
|
||||||
|
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>
|
||||||
@ -25,9 +28,9 @@
|
|||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="计价方式" prop="pricingMethod">
|
<el-form-item label="计价方式" prop="pricingMethod">
|
||||||
<el-select v-model="form.pricingMethod" placeholder="请选择" style="width: 100%;">
|
<el-select v-model="form.pricingMethod" placeholder="请选择" style="width: 100%;">
|
||||||
<el-option label="时间段" :value='0'></el-option>
|
<el-option label="时间段" :value= '0' ></el-option>
|
||||||
<el-option label="使用量" :value='1'></el-option>
|
<el-option label="使用量" :value= '1' ></el-option>
|
||||||
<el-option label="固定价位" :value='2'></el-option>
|
<el-option label="固定价位" :value= '2' ></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
@ -35,33 +38,56 @@
|
|||||||
<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"
|
<el-input-number v-model="form.singlePrice" :precision="2" :min="0" :max="999999999" style="width: 100%;"></el-input-number>
|
||||||
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">
|
||||||
<el-form-item label="计量维度" prop="dim">
|
<el-form-item label="计量维度" prop="dim">
|
||||||
<el-select v-model="form.dim" placeholder="请选择" style="width: 100%;">
|
<el-select v-model="form.dim" placeholder="请选择" style="width: 100%;">
|
||||||
<el-option label="月" :value='4'></el-option>
|
<el-option label="月" :value= '4' ></el-option>
|
||||||
<el-option label="年" :value='5'></el-option>
|
<el-option label="年" :value= '5' ></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</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 :key='timeKye' :table-props="tableProps1" :table-data="tableData1"
|
<base-table
|
||||||
:add-button-show="addButtonShow" @emitButtonClick="emitButtonClick1" @emitFun="inputChange1">
|
:key='timeKye'
|
||||||
<method-btn v-if="tableBtn.length" slot="handleBtn" :width="80" label="操作" :method-list="tableBtn"
|
:table-props="tableProps1"
|
||||||
@clickBtn="handleClick1" />
|
:table-data="tableData1"
|
||||||
|
: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 :key='usedKye' :table-props="tableProps2" :table-data="tableData2"
|
<base-table
|
||||||
:add-button-show="addButtonShow" @emitButtonClick="emitButtonClick2" @emitFun="inputChange2">
|
:key='usedKye'
|
||||||
<method-btn v-if="tableBtn.length" slot="handleBtn" :width="80" label="操作" :method-list="tableBtn"
|
:table-props="tableProps2"
|
||||||
@clickBtn="handleClick2" />
|
:table-data="tableData2"
|
||||||
|
: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>
|
||||||
@ -156,15 +182,15 @@ export default {
|
|||||||
if (id) {
|
if (id) {
|
||||||
this.isEdit = true
|
this.isEdit = true
|
||||||
this.form.id = id
|
this.form.id = id
|
||||||
getEnergyType(id).then((res) => {
|
getEnergyType( id ).then((res) => {
|
||||||
if (res.code === 0) {
|
if (res.code === 0) {
|
||||||
this.form.name = res.data.name
|
this.form.name = res.data.name
|
||||||
this.form.code = res.data.code
|
this.form.code = res.data.code
|
||||||
this.form.unit = res.data.unit
|
this.form.unit = res.data.unit
|
||||||
this.form.pricingMethod = res.data.pricingMethod
|
this.form.pricingMethod = res.data.pricingMethod
|
||||||
this.form.leaderName = res.data.leaderName
|
this.form.leaderName = res.data.leaderName
|
||||||
this.form.push = res.data.push ? true : false
|
this.form.push = res.data.push ? true : false
|
||||||
switch (this.form.pricingMethod) {
|
switch(this.form.pricingMethod) {
|
||||||
case 0:
|
case 0:
|
||||||
this.tableData1 = res.data.segPriceList || []
|
this.tableData1 = res.data.segPriceList || []
|
||||||
break;
|
break;
|
||||||
@ -172,7 +198,6 @@ export default {
|
|||||||
this.tableData2 = res.data.usedPriceList || []
|
this.tableData2 = res.data.usedPriceList || []
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
this.form.singlePrice = res.data.singlePrice || 0
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
@ -209,7 +234,7 @@ export default {
|
|||||||
emitButtonClick1() {
|
emitButtonClick1() {
|
||||||
let n = this.tableData1.length
|
let n = this.tableData1.length
|
||||||
let obj = {}
|
let obj = {}
|
||||||
obj.startTime = n === 0 ? '' : this.tableData1[n - 1].endTime
|
obj.startTime = n === 0 ? '' : this.tableData1[n-1].endTime
|
||||||
obj.endTime = ''
|
obj.endTime = ''
|
||||||
obj.price = 0
|
obj.price = 0
|
||||||
this.tableData1.push(obj)
|
this.tableData1.push(obj)
|
||||||
@ -217,7 +242,7 @@ export default {
|
|||||||
emitButtonClick2() {
|
emitButtonClick2() {
|
||||||
let n = this.tableData2.length
|
let n = this.tableData2.length
|
||||||
let obj = {}
|
let obj = {}
|
||||||
obj.startUsed = n === 0 ? 0 : this.tableData2[n - 1].endUsed
|
obj.startUsed = n === 0 ? 0 : this.tableData2[n-1].endUsed
|
||||||
obj.endUsed = 0
|
obj.endUsed = 0
|
||||||
obj.price = 0
|
obj.price = 0
|
||||||
this.tableData2.push(obj)
|
this.tableData2.push(obj)
|
||||||
@ -234,7 +259,7 @@ export default {
|
|||||||
submitForm() {
|
submitForm() {
|
||||||
this.$refs['form'].validate((valid) => {
|
this.$refs['form'].validate((valid) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
switch (this.form.pricingMethod) {
|
switch(this.form.pricingMethod) {
|
||||||
case 0:// 时间段
|
case 0:// 时间段
|
||||||
if (this.tableData1.length === 0) {
|
if (this.tableData1.length === 0) {
|
||||||
this.$modal.msgError('时间段表格数据不能为空')
|
this.$modal.msgError('时间段表格数据不能为空')
|
||||||
@ -264,7 +289,7 @@ export default {
|
|||||||
default:// 固定单价
|
default:// 固定单价
|
||||||
if (!this.form.singlePrice) {
|
if (!this.form.singlePrice) {
|
||||||
this.$modal.msgError('单价有误请检查,请检查')
|
this.$modal.msgError('单价有误请检查,请检查')
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
console.log(this.form)
|
console.log(this.form)
|
||||||
@ -277,11 +302,11 @@ export default {
|
|||||||
unit: this.form.unit,
|
unit: this.form.unit,
|
||||||
pricingMethod: this.form.pricingMethod,
|
pricingMethod: this.form.pricingMethod,
|
||||||
description: this.form.description,
|
description: this.form.description,
|
||||||
dim: this.form.pricingMethod === 1 ? this.form.dim : '',
|
dim: this.form.pricingMethod === 1 ? this.form.dim: '',
|
||||||
singlePrice: this.form.pricingMethod === 2 ? this.form.singlePrice : '',
|
singlePrice: this.form.pricingMethod === 2 ? this.form.singlePrice : '',
|
||||||
segPriceList: this.form.pricingMethod === 0 ? this.tableData1 : [],
|
segPriceList: this.form.pricingMethod === 0 ? this.tableData1: [],
|
||||||
usedPriceList: this.form.pricingMethod === 1 ? this.tableData2 : [],
|
usedPriceList: this.form.pricingMethod === 1 ? this.tableData2: [],
|
||||||
push: this.form.push ? 1 : 0
|
push:this.form.push ? 1 : 0
|
||||||
}).then((res) => {
|
}).then((res) => {
|
||||||
if (res.code === 0) {
|
if (res.code === 0) {
|
||||||
this.$modal.msgSuccess("操作成功");
|
this.$modal.msgSuccess("操作成功");
|
||||||
@ -295,11 +320,11 @@ export default {
|
|||||||
unit: this.form.unit,
|
unit: this.form.unit,
|
||||||
pricingMethod: this.form.pricingMethod,
|
pricingMethod: this.form.pricingMethod,
|
||||||
description: this.form.description,
|
description: this.form.description,
|
||||||
dim: this.form.pricingMethod === 1 ? this.form.dim : '',
|
dim: this.form.pricingMethod === 1 ? this.form.dim: '',
|
||||||
singlePrice: this.form.pricingMethod === 2 ? this.form.singlePrice : '',
|
singlePrice: this.form.pricingMethod === 2 ? this.form.singlePrice : '',
|
||||||
segPriceList: this.form.pricingMethod === 0 ? this.tableData1 : [],
|
segPriceList: this.form.pricingMethod === 0 ? this.tableData1: [],
|
||||||
usedPriceList: this.form.pricingMethod === 1 ? this.tableData2 : [],
|
usedPriceList: this.form.pricingMethod === 1 ? this.tableData2: [],
|
||||||
push: this.form.push ? 1 : 0
|
push:this.form.push ? 1 : 0
|
||||||
}).then((res) => {
|
}).then((res) => {
|
||||||
if (res.code === 0) {
|
if (res.code === 0) {
|
||||||
this.$modal.msgSuccess("操作成功");
|
this.$modal.msgSuccess("操作成功");
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<el-drawer title="查看详情" :visible.sync="visible" size="70%" :show-close='false'>
|
<el-drawer title="查看详情" :visible.sync="visible" size="70%">
|
||||||
<div class="box">
|
<div class="box">
|
||||||
<el-row class="topBox">
|
<el-row class="topBox">
|
||||||
<el-col :span="6">
|
<el-col :span="6">
|
||||||
|
@ -5,10 +5,13 @@
|
|||||||
<el-form-item label="工单名称" prop="name" v-if='!isBind'>
|
<el-form-item label="工单名称" prop="name" v-if='!isBind'>
|
||||||
<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
|
<el-select v-model="form.workOrderId" placeholder="请选择" style="width: 100%;" filterable @change="getWorkOrderMsg">
|
||||||
@change="getWorkOrderMsg">
|
<el-option
|
||||||
<el-option v-for="item in workOrderList" :key="item.id" :label="item.name" :value="item.id">
|
v-for="item in workOrderList"
|
||||||
|
:key="item.id"
|
||||||
|
:label="item.name"
|
||||||
|
:value="item.id">
|
||||||
</el-option>
|
</el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@ -20,8 +23,12 @@
|
|||||||
</el-col>
|
</el-col>
|
||||||
<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 v-for="item in productList" :key="item.id" :label="item.name" :value="item.id">
|
<el-option
|
||||||
|
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>
|
||||||
@ -35,28 +42,36 @@
|
|||||||
<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 v-model="planStartTime" type="datetime" value-format="yyyy-MM-dd HH:mm:ss"
|
<el-date-picker
|
||||||
style="width: 100%;" placeholder="选择日期" :disabled="isBind">
|
v-model="planStartTime"
|
||||||
|
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 v-model="planFinishTime" type="datetime" value-format="yyyy-MM-dd HH:mm:ss"
|
<el-date-picker
|
||||||
style="width: 100%;" placeholder="选择日期" :disabled="isBind">
|
v-model="planFinishTime"
|
||||||
|
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"
|
<el-input-number v-model="form.planAssignQuantity" :min="0" :max="9999999999999" :disabled="isBind" style="width: 100%;"></el-input-number>
|
||||||
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"
|
<el-input-number v-model="form.planQuantity" :min="0" :max="9999999999999" :disabled="isBind" style="width: 100%;"></el-input-number>
|
||||||
style="width: 100%;"></el-input-number>
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
@ -64,15 +79,18 @@
|
|||||||
<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 v-for="item in processFlowList" :key="item.id" :label="item.name" :value="item.id">
|
<el-option
|
||||||
|
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"
|
<el-select v-model="form.materialMethod" placeholder="请选择" style="width: 100%;" :disabled="isBind" @change='selectMethod'>
|
||||||
@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>
|
||||||
@ -81,7 +99,10 @@
|
|||||||
<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 v-for="item in getDictDatas(DICT_TYPE.ORDER_PRIORITY)" :key="item.value" :label="item.label"
|
<el-option
|
||||||
|
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>
|
||||||
@ -90,7 +111,11 @@
|
|||||||
<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 v-for="item in workOrderTypeList" :key="item.id" :label="item.name" :value="item.id">
|
<el-option
|
||||||
|
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>
|
||||||
@ -98,39 +123,45 @@
|
|||||||
</el-row>
|
</el-row>
|
||||||
<el-row :gutter="20">
|
<el-row :gutter="20">
|
||||||
<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 v-for="item in productLineList" :key="item.id" :label="item.name" :value="item.id">
|
<el-option
|
||||||
</el-option>
|
v-for="item in productLineList"
|
||||||
</el-select>
|
:key="item.id"
|
||||||
</el-form-item>
|
:label="item.name"
|
||||||
</el-col>
|
:value="item.id">
|
||||||
<el-col :span='6'>
|
</el-option>
|
||||||
<el-form-item label="负责车间" prop="roomNameDict">
|
</el-select>
|
||||||
<el-select v-model="form.roomNameDict" placeholder="请选择" style="width: 100%;" :disabled="isBind">
|
</el-form-item>
|
||||||
<el-option v-for="item in getDictDatas(DICT_TYPE.WORK_SHOP)" :key="item.value" :label="item.label"
|
</el-col>
|
||||||
:value="item.value">
|
<el-col :span='6'>
|
||||||
</el-option>
|
<el-form-item label="负责车间" prop="roomNameDict">
|
||||||
</el-select>
|
<el-select v-model="form.roomNameDict" placeholder="请选择" style="width: 100%;" :disabled="isBind">
|
||||||
</el-form-item>
|
<el-option
|
||||||
</el-col>
|
v-for="item in getDictDatas(DICT_TYPE.WORK_SHOP)"
|
||||||
<el-col :span='6'>
|
:key="item.value"
|
||||||
<el-form-item label="负责人" prop="workers">
|
:label="item.label"
|
||||||
<el-input v-model="form.workers" :disabled="isBind"></el-input>
|
:value="item.value">
|
||||||
</el-form-item>
|
</el-option>
|
||||||
</el-col>
|
</el-select>
|
||||||
<el-col :span='6'>
|
</el-form-item>
|
||||||
<el-form-item label="计划分配订单量" prop="planAssignmentQuantity">
|
</el-col>
|
||||||
<el-input-number v-model="form.planAssignmentQuantity" :min="0" :max="9999999999999"
|
<el-col :span='6'>
|
||||||
style="width: 100%;"></el-input-number>
|
<el-form-item label="负责人" prop="workers">
|
||||||
</el-form-item>
|
<el-input v-model="form.workers" :disabled="isBind"></el-input>
|
||||||
</el-col>
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span='6'>
|
||||||
|
<el-form-item label="计划分配订单量" prop="planAssignmentQuantity">
|
||||||
|
<el-input-number v-model="form.planAssignmentQuantity" :min="0" :max="9999999999999" style="width: 100%;"></el-input-number>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
</el-form>
|
</el-form>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import { getProductAll } from '@/api/base/product'
|
import { getProductAll } from '@/api/base/product'
|
||||||
import { getProcessFlowList, getWorkOrderCode, orderIssue, getFreeWOlist, getWorkOrderById } from '@/api/base/orderManage'
|
import { getProcessFlowList, getWorkOrderCode, orderIssue, workOrderList, 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 {
|
||||||
@ -171,8 +202,8 @@ export default {
|
|||||||
processFlowList: [],
|
processFlowList: [],
|
||||||
productLineList: [],
|
productLineList: [],
|
||||||
workOrderTypeList: [
|
workOrderTypeList: [
|
||||||
{ id: 1, name: '普通' },
|
{id: 1,name:'普通'},
|
||||||
{ id: 2, name: '特殊' }
|
{id: 2, name:'特殊'}
|
||||||
],
|
],
|
||||||
planStartTime: '',
|
planStartTime: '',
|
||||||
planFinishTime: '',
|
planFinishTime: '',
|
||||||
@ -192,7 +223,7 @@ export default {
|
|||||||
this.form.planProductId = data.planProductId
|
this.form.planProductId = data.planProductId
|
||||||
// this.form.processFlowId = data.processFlowId
|
// this.form.processFlowId = data.processFlowId
|
||||||
// this.form.materialMethod = data.materialMethod
|
// this.form.materialMethod = data.materialMethod
|
||||||
} else {//绑定
|
}else{//绑定
|
||||||
this.isBind = true
|
this.isBind = true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -213,7 +244,7 @@ export default {
|
|||||||
this.processFlowList = res.data || []
|
this.processFlowList = res.data || []
|
||||||
})
|
})
|
||||||
// 工单list
|
// 工单list
|
||||||
getFreeWOlist({
|
workOrderList({
|
||||||
status: 1
|
status: 1
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
this.workOrderList = res.data || []
|
this.workOrderList = res.data || []
|
||||||
@ -221,10 +252,10 @@ export default {
|
|||||||
},
|
},
|
||||||
// 物料变动
|
// 物料变动
|
||||||
selectMethod(val) {
|
selectMethod(val) {
|
||||||
if (val === 2 && !this.form.processFlowId) {
|
if (val === 2 && !this.form.processFlowId ) {
|
||||||
this.form.materialMethod = 1
|
this.form.materialMethod = 1
|
||||||
this.$modal.msgError("请先选择关联工艺");
|
this.$modal.msgError("请先选择关联工艺");
|
||||||
} else if (val === 1) {
|
}else if (val === 1) {
|
||||||
this.form.processFlowId = ''
|
this.form.processFlowId = ''
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -242,32 +273,32 @@ export default {
|
|||||||
workOrderId: this.form.workOrderId,
|
workOrderId: this.form.workOrderId,
|
||||||
orderId: this.form.orderId,
|
orderId: this.form.orderId,
|
||||||
planAssignmentQuantity: this.form.planAssignmentQuantity
|
planAssignmentQuantity: this.form.planAssignmentQuantity
|
||||||
}).then((res) => {
|
}).then((res) => {
|
||||||
if (res.code === 0) {
|
if (res.code === 0) {
|
||||||
this.$modal.msgSuccess("操作成功")
|
this.$modal.msgSuccess("操作成功")
|
||||||
this.$emit('addWorkOrderSubmit')
|
this.$emit('addWorkOrderSubmit')
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
} else {// 新增工单
|
}else{// 新增工单
|
||||||
this.$refs['addWorkOrder'].validate((valid) => {
|
this.$refs['addWorkOrder'].validate((valid) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
// 新增工单
|
// 新增工单
|
||||||
let _this = this
|
let _this = this
|
||||||
_this.form.planStartTime = _this.planStartTime ? new Date(_this.planStartTime).valueOf() : ''
|
_this.form.planStartTime = _this.planStartTime ? new Date(_this.planStartTime).valueOf() : ''
|
||||||
_this.form.planFinishTime = _this.planFinishTime ? new Date(_this.planFinishTime).valueOf() : ''
|
_this.form.planFinishTime = _this.planFinishTime ? new Date(_this.planFinishTime).valueOf() : ''
|
||||||
orderIssue({ ..._this.form }).then(res => {
|
orderIssue({ ..._this.form }).then(res => {
|
||||||
if (res.code === 0) {
|
if (res.code === 0) {
|
||||||
_this.$modal.msgSuccess("操作成功")
|
_this.$modal.msgSuccess("操作成功")
|
||||||
let name = this.form.name
|
let name = this.form.name
|
||||||
_this.$emit('addWorkOrderSubmit')
|
_this.$emit('addWorkOrderSubmit')
|
||||||
// // 询问是否添加预使用主原料
|
// // 询问是否添加预使用主原料
|
||||||
// _this.$modal.confirm('是否添加预使用主原料信息?').then(function() {
|
// _this.$modal.confirm('是否添加预使用主原料信息?').then(function() {
|
||||||
// _this.$router.push({
|
// _this.$router.push({
|
||||||
// path: '/core/core-work-order?workOrderName='+encodeURI(name)
|
// path: '/core/core-work-order?workOrderName='+encodeURI(name)
|
||||||
// })
|
// })
|
||||||
// })
|
// })
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
@ -288,7 +319,7 @@ export default {
|
|||||||
// 绑定工单,选择工单时获取工单信息
|
// 绑定工单,选择工单时获取工单信息
|
||||||
getWorkOrderMsg() {
|
getWorkOrderMsg() {
|
||||||
if (this.form.workOrderId) {
|
if (this.form.workOrderId) {
|
||||||
getWorkOrderById({ id: this.form.workOrderId }).then(res => {
|
getWorkOrderById({id:this.form.workOrderId}).then(res => {
|
||||||
if (res.code === 0) {
|
if (res.code === 0) {
|
||||||
this.form.code = res.data.code
|
this.form.code = res.data.code
|
||||||
this.form.planProductId = res.data.planProductId
|
this.form.planProductId = res.data.planProductId
|
||||||
@ -314,7 +345,7 @@ export default {
|
|||||||
getSpecifications(val) {
|
getSpecifications(val) {
|
||||||
for (let i of this.productList) {
|
for (let i of this.productList) {
|
||||||
if (i.id === val) {
|
if (i.id === val) {
|
||||||
this.form.specifications = i.specifications
|
this.form.specifications = i.specifications
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user