2 changed files with 644 additions and 0 deletions
-
6src/api/orderIssure/soIssueNotify.js
-
638src/views/modules/orderIssure/soIssueNotify/searchOvertimeMaterialList.vue
@ -0,0 +1,638 @@ |
|||||
|
<template> |
||||
|
<div class="mod-config yzz"> |
||||
|
<el-form label-position="top" style="margin-top: 1px; margin-left: 0px;"> |
||||
|
<el-form :inline="true" label-position="top" style="margin-top: 0px"> |
||||
|
<el-form-item label="申请单号"> |
||||
|
<el-input v-model="searchData.notifyNo" style="width: 120px" /> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="申请账号"> |
||||
|
<el-input v-model="searchData.userName" style="width: 120px" /> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="物料编码"> |
||||
|
<el-input v-model="searchData.componentPartNo" style="width: 140px" /> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="物料名称"> |
||||
|
<el-input v-model="searchData.partDesc" style="width: 140px" /> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="申请单日期"> |
||||
|
<el-date-picker style="width: 130px" v-model="searchData.startDate" type="date" value-format="yyyy-MM-dd" |
||||
|
placeholder="选择日期" /> |
||||
|
</el-form-item> |
||||
|
<el-form-item style="margin-top: 23px;"> |
||||
|
<label style="margin-left: 0px;font-size: 19px">➞</label> |
||||
|
</el-form-item> |
||||
|
<el-form-item label=" "> |
||||
|
<el-date-picker style="width: 130px" v-model="searchData.endDate" type="date" value-format="yyyy-MM-dd" |
||||
|
placeholder="选择日期" /> |
||||
|
</el-form-item> |
||||
|
|
||||
|
<el-form-item label="领料单状态"> |
||||
|
<el-select v-model="searchData.status" style="width: 120px"> |
||||
|
<el-option label="全部" value="" /> |
||||
|
<el-option label="已下达" value="已下达" /> |
||||
|
<el-option label="已关闭" value="已关闭" /> |
||||
|
</el-select> |
||||
|
</el-form-item> |
||||
|
|
||||
|
<el-form-item label="确认状态"> |
||||
|
<el-select v-model="searchData.confirmStatus" style="width: 120px"> |
||||
|
<el-option label="全部" value="" /> |
||||
|
<el-option label="确认" value="确认" /> |
||||
|
<el-option label="未确认" value="未确认" /> |
||||
|
</el-select> |
||||
|
</el-form-item> |
||||
|
|
||||
|
<el-form-item label="配料状态"> |
||||
|
<el-select v-model="searchData.timeoutReason" style="width: 140px"> |
||||
|
<el-option label="全部" value="" /> |
||||
|
<el-option label="仓库缺料" value="仓库缺料" /> |
||||
|
<el-option label="正在配料" value="正在配料" /> |
||||
|
<el-option label="待检中" value="待检中" /> |
||||
|
</el-select> |
||||
|
</el-form-item> |
||||
|
|
||||
|
<el-form-item label="车间"> |
||||
|
<el-select v-model="searchData.workShopList" multiple style="width: 300px"> |
||||
|
<el-option v-for="i in workShopList" :key="i.workShopId" :label="i.workShopName" :value="i.workShopId" /> |
||||
|
</el-select> |
||||
|
</el-form-item> |
||||
|
|
||||
|
<el-form-item label=" "> |
||||
|
<el-button type="primary" @click="searchTable">查询</el-button> |
||||
|
<download-excel :fields="fields()" :data="exportData" type="xls" :name="exportName" :header="exportHeader" |
||||
|
:footer="exportFooter" :fetch="createExportData" :before-generate="startDownload" |
||||
|
:before-finish="finishDownload" worksheet="超时未配料清单" class="el-button el-button--primary el-button--medium"> |
||||
|
导出 |
||||
|
</download-excel> |
||||
|
<el-button type="primary" @click="openVolumeDialog">设置音量</el-button> |
||||
|
</el-form-item> |
||||
|
</el-form> |
||||
|
</el-form> |
||||
|
|
||||
|
<el-table :data="dataList" :height="height" border v-loading="dataListLoading" style="width: 100%;" |
||||
|
highlight-current-row ref="mainTable"> |
||||
|
<el-table-column header-align="center" align="center" width="170" label="操作"> |
||||
|
<template slot-scope="scope"> |
||||
|
<el-select |
||||
|
v-model="scope.row.timeoutReason" |
||||
|
placeholder="选择超时原因" |
||||
|
size="mini" |
||||
|
class="selectReason" |
||||
|
style="width: 150px" |
||||
|
@change="(val) => onTimeoutReasonChange(val, scope.row)" |
||||
|
> |
||||
|
<el-option |
||||
|
v-for="option in timeoutReasonOptions" |
||||
|
:key="option.value" |
||||
|
:label="option.label" |
||||
|
:value="option.value" |
||||
|
/> |
||||
|
</el-select> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column v-for="(item,index) in columnList1" :key="index" :sortable="item.columnSortable" |
||||
|
:prop="item.columnProp" :header-align="item.headerAlign" :show-overflow-tooltip="item.showOverflowTooltip" |
||||
|
:align="item.align" :fixed="item.fixed==''?false:item.fixed" :min-width="item.columnWidth" |
||||
|
:label="item.columnLabel"> |
||||
|
<template slot-scope="scope"> |
||||
|
<span v-if="!item.columnHidden"> {{ scope.row[item.columnProp] }}</span> |
||||
|
<span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" |
||||
|
style="width: 100px; height: 80px" /></span> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
|
||||
|
</el-table> |
||||
|
|
||||
|
<el-pagination @size-change="sizeChangeHandle" @current-change="currentChangeHandle" :current-page="pageIndex" |
||||
|
:page-sizes="[50, 100, 200, 500]" :page-size="pageSize" :total="totalPage" |
||||
|
layout="total, sizes, prev, pager, next, jumper"> |
||||
|
</el-pagination> |
||||
|
|
||||
|
<!-- 设置音量弹框 --> |
||||
|
<el-dialog title="设置音量" :visible.sync="volumeDialogVisible" width="400px" :close-on-click-modal="false"> |
||||
|
<el-form label-width="100px" label-position="top"> |
||||
|
<el-row :gutter="20"> |
||||
|
<el-col :span="24"> |
||||
|
<el-form-item label="音量"> |
||||
|
<el-select v-model="volume" placeholder="请选择音量" style="width: 100%"> |
||||
|
<el-option v-for="i in 10" :key="i" :label="i" :value="i"></el-option> |
||||
|
</el-select> |
||||
|
</el-form-item> |
||||
|
</el-col> |
||||
|
</el-row> |
||||
|
|
||||
|
</el-form> |
||||
|
<div slot="footer" class="dialog-footer"> |
||||
|
<el-button @click="closeVolumeDialog">取消</el-button> |
||||
|
<el-button type="primary" @click="confirmVolume">确认</el-button> |
||||
|
</div> |
||||
|
</el-dialog> |
||||
|
|
||||
|
</div> |
||||
|
</template> |
||||
|
|
||||
|
<script> |
||||
|
import { |
||||
|
searchOvertimeMaterialList, |
||||
|
changeSoundBoxVolume, |
||||
|
updateTimeoutReason, |
||||
|
getSoundBoxVolume, |
||||
|
} from '@/api/orderIssure/soIssueNotify.js' |
||||
|
import { getEamWorkShop } from '@/api/factory/site.js' |
||||
|
|
||||
|
export default { |
||||
|
data() { |
||||
|
return { |
||||
|
height: 400, |
||||
|
dataList: [], |
||||
|
dataListLoading: false, |
||||
|
workShopList: [], |
||||
|
searchData: { |
||||
|
site: this.$store.state.user.site, |
||||
|
notifyNo: '', |
||||
|
userName: '', |
||||
|
componentPartNo: '', |
||||
|
partDesc: '', |
||||
|
status: '已下达', // 默认:已下达 |
||||
|
confirmStatus: '未确认', // 未确认 |
||||
|
timeoutReason: '', // 配料状态:全部 |
||||
|
workShopList: [], |
||||
|
startDate: this.dayjs().subtract(7, 'day').format('YYYY-MM-DD'), // 默认:当前日期往前一周 |
||||
|
endDate: this.dayjs().format('YYYY-MM-DD'), |
||||
|
}, |
||||
|
pageIndex: 1, |
||||
|
pageSize: 100, |
||||
|
totalPage: 0, |
||||
|
exportData: [], |
||||
|
exportList: [], |
||||
|
exportName: '超时未配料清单' + this.dayjs().format('YYYYMMDDHHmmss'), |
||||
|
exportHeader: ['超时未配料清单'], |
||||
|
exportFooter: [], |
||||
|
volumeDialogVisible: false, |
||||
|
volume: 1, |
||||
|
timeoutReasonOptions: [ |
||||
|
{ label: '仓库缺料', value: '仓库缺料' }, |
||||
|
{ label: '正在配料', value: '正在配料' }, |
||||
|
{ label: '待检中', value: '待检中' }, |
||||
|
], |
||||
|
columnList1: [ |
||||
|
{ |
||||
|
userId: this.$store.state.user.name, |
||||
|
functionId: 701005, |
||||
|
serialNumber: '701005Table1NotifyNo', |
||||
|
tableId: '701005Table1', |
||||
|
tableName: '领料延误预警', |
||||
|
columnProp: 'timeoutReason', |
||||
|
headerAlign: 'center', |
||||
|
align: 'center', |
||||
|
columnLabel: '配料状态', |
||||
|
columnHidden: false, |
||||
|
columnImage: false, |
||||
|
columnSortable: false, |
||||
|
sortLv: 0, |
||||
|
status: true, |
||||
|
fixed: '', |
||||
|
columnWidth: 120, |
||||
|
}, |
||||
|
{ |
||||
|
userId: this.$store.state.user.name, |
||||
|
functionId: 701005, |
||||
|
serialNumber: '701005Table1NotifyNo', |
||||
|
tableId: '701005Table1', |
||||
|
tableName: '领料延误预警', |
||||
|
columnProp: 'notifyNo', |
||||
|
headerAlign: 'center', |
||||
|
align: 'center', |
||||
|
columnLabel: '申请单单号', |
||||
|
columnHidden: false, |
||||
|
columnImage: false, |
||||
|
columnSortable: false, |
||||
|
sortLv: 0, |
||||
|
status: true, |
||||
|
fixed: '', |
||||
|
columnWidth: 100, |
||||
|
}, |
||||
|
{ |
||||
|
userId: this.$store.state.user.name, |
||||
|
functionId: 701005, |
||||
|
serialNumber: '701005Table1NotifyNo', |
||||
|
tableId: '701005Table1', |
||||
|
tableName: '领料延误预警', |
||||
|
columnProp: 'workShopName', |
||||
|
headerAlign: 'center', |
||||
|
align: 'center', |
||||
|
columnLabel: '车间', |
||||
|
columnHidden: false, |
||||
|
columnImage: false, |
||||
|
columnSortable: false, |
||||
|
sortLv: 0, |
||||
|
status: true, |
||||
|
fixed: '', |
||||
|
columnWidth: 100, |
||||
|
}, |
||||
|
{ |
||||
|
userId: this.$store.state.user.name, |
||||
|
functionId: 701005, |
||||
|
serialNumber: '701005Table1NotifyNo', |
||||
|
tableId: '701005Table1', |
||||
|
tableName: '领料延误预警', |
||||
|
columnProp: 'notifyDate', |
||||
|
headerAlign: 'center', |
||||
|
align: 'center', |
||||
|
columnLabel: '申请日期', |
||||
|
columnHidden: false, |
||||
|
columnImage: false, |
||||
|
columnSortable: false, |
||||
|
sortLv: 0, |
||||
|
status: true, |
||||
|
fixed: '', |
||||
|
columnWidth: 120, |
||||
|
}, |
||||
|
{ |
||||
|
userId: this.$store.state.user.name, |
||||
|
functionId: 701005, |
||||
|
serialNumber: '701005Table1NotifyNo', |
||||
|
tableId: '701005Table1', |
||||
|
tableName: '领料延误预警', |
||||
|
columnProp: 'componentPartNo', |
||||
|
headerAlign: 'center', |
||||
|
align: 'center', |
||||
|
columnLabel: '材料编码', |
||||
|
columnHidden: false, |
||||
|
columnImage: false, |
||||
|
columnSortable: false, |
||||
|
sortLv: 0, |
||||
|
status: true, |
||||
|
fixed: '', |
||||
|
columnWidth: 130, |
||||
|
showOverflowTooltip: true, |
||||
|
}, |
||||
|
{ |
||||
|
userId: this.$store.state.user.name, |
||||
|
functionId: 701005, |
||||
|
serialNumber: '701005Table1NotifyNo', |
||||
|
tableId: '701005Table1', |
||||
|
tableName: '领料延误预警', |
||||
|
columnProp: 'partDesc', |
||||
|
headerAlign: 'center', |
||||
|
align: 'left', |
||||
|
columnLabel: '材料名称', |
||||
|
columnHidden: false, |
||||
|
columnImage: false, |
||||
|
columnSortable: false, |
||||
|
sortLv: 0, |
||||
|
status: true, |
||||
|
fixed: '', |
||||
|
columnWidth: 170, |
||||
|
showOverflowTooltip: true, |
||||
|
}, |
||||
|
{ |
||||
|
userId: this.$store.state.user.name, |
||||
|
functionId: 701005, |
||||
|
serialNumber: '701005Table1NotifyNo', |
||||
|
tableId: '701005Table1', |
||||
|
tableName: '领料延误预警', |
||||
|
columnProp: 'qtyToIssue', |
||||
|
headerAlign: 'center', |
||||
|
align: 'right', |
||||
|
columnLabel: '申请数量', |
||||
|
columnHidden: false, |
||||
|
columnImage: false, |
||||
|
columnSortable: false, |
||||
|
sortLv: 0, |
||||
|
status: true, |
||||
|
fixed: '', |
||||
|
columnWidth: 90, |
||||
|
}, |
||||
|
{ |
||||
|
userId: this.$store.state.user.name, |
||||
|
functionId: 701005, |
||||
|
serialNumber: '701005Table1NotifyNo', |
||||
|
tableId: '701005Table1', |
||||
|
tableName: '领料延误预警', |
||||
|
columnProp: 'qtyToIssueOriginal', |
||||
|
headerAlign: 'center', |
||||
|
align: 'right', |
||||
|
columnLabel: '已发数量', |
||||
|
columnHidden: false, |
||||
|
columnImage: false, |
||||
|
columnSortable: false, |
||||
|
sortLv: 0, |
||||
|
status: true, |
||||
|
fixed: '', |
||||
|
columnWidth: 90, |
||||
|
}, |
||||
|
{ |
||||
|
userId: this.$store.state.user.name, |
||||
|
functionId: 701005, |
||||
|
serialNumber: '701005Table1NotifyNo', |
||||
|
tableId: '701005Table1', |
||||
|
tableName: '领料延误预警', |
||||
|
columnProp: 'issueType', |
||||
|
headerAlign: 'center', |
||||
|
align: 'center', |
||||
|
columnLabel: '类型', |
||||
|
columnHidden: false, |
||||
|
columnImage: false, |
||||
|
columnSortable: false, |
||||
|
sortLv: 0, |
||||
|
status: true, |
||||
|
fixed: '', |
||||
|
columnWidth: 80, |
||||
|
}, |
||||
|
{ |
||||
|
userId: this.$store.state.user.name, |
||||
|
functionId: 701005, |
||||
|
serialNumber: '701005Table1NotifyNo', |
||||
|
tableId: '701005Table1', |
||||
|
tableName: '领料延误预警', |
||||
|
columnProp: 'opsItemNo', |
||||
|
headerAlign: 'center', |
||||
|
align: 'right', |
||||
|
columnLabel: '工序', |
||||
|
columnHidden: false, |
||||
|
columnImage: false, |
||||
|
columnSortable: false, |
||||
|
sortLv: 0, |
||||
|
status: true, |
||||
|
fixed: '', |
||||
|
columnWidth: 60, |
||||
|
}, |
||||
|
{ |
||||
|
userId: this.$store.state.user.name, |
||||
|
functionId: 701005, |
||||
|
serialNumber: '701005Table1NotifyNo', |
||||
|
tableId: '701005Table1', |
||||
|
tableName: '领料延误预警', |
||||
|
columnProp: 'locationNo', |
||||
|
headerAlign: 'center', |
||||
|
align: 'center', |
||||
|
columnLabel: '机台', |
||||
|
columnHidden: false, |
||||
|
columnImage: false, |
||||
|
columnSortable: false, |
||||
|
sortLv: 0, |
||||
|
status: true, |
||||
|
fixed: '', |
||||
|
columnWidth: 100, |
||||
|
}, |
||||
|
{ |
||||
|
userId: this.$store.state.user.name, |
||||
|
functionId: 701005, |
||||
|
serialNumber: '701005Table1NotifyNo', |
||||
|
tableId: '701005Table1', |
||||
|
tableName: '领料延误预警', |
||||
|
columnProp: 'needDate', |
||||
|
headerAlign: 'center', |
||||
|
align: 'center', |
||||
|
columnLabel: '需求时间', |
||||
|
columnHidden: false, |
||||
|
columnImage: false, |
||||
|
columnSortable: false, |
||||
|
sortLv: 0, |
||||
|
status: true, |
||||
|
fixed: '', |
||||
|
columnWidth: 140, |
||||
|
}, |
||||
|
{ |
||||
|
userId: this.$store.state.user.name, |
||||
|
functionId: 701005, |
||||
|
serialNumber: '701005Table1NotifyNo', |
||||
|
tableId: '701005Table1', |
||||
|
tableName: '领料延误预警', |
||||
|
columnProp: 'userDisplay', |
||||
|
headerAlign: 'center', |
||||
|
align: 'center', |
||||
|
columnLabel: '申请人', |
||||
|
columnHidden: false, |
||||
|
columnImage: false, |
||||
|
columnSortable: false, |
||||
|
sortLv: 0, |
||||
|
status: true, |
||||
|
fixed: '', |
||||
|
columnWidth: 90, |
||||
|
}, |
||||
|
|
||||
|
{ |
||||
|
userId: this.$store.state.user.name, |
||||
|
functionId: 701005, |
||||
|
serialNumber: '701005Table1NotifyNo', |
||||
|
tableId: '701005Table1', |
||||
|
tableName: '领料延误预警', |
||||
|
columnProp: 'status', |
||||
|
headerAlign: 'center', |
||||
|
align: 'center', |
||||
|
columnLabel: '领料单状态', |
||||
|
columnHidden: false, |
||||
|
columnImage: false, |
||||
|
columnSortable: false, |
||||
|
sortLv: 0, |
||||
|
status: true, |
||||
|
fixed: '', |
||||
|
columnWidth: 90, |
||||
|
}, |
||||
|
{ |
||||
|
userId: this.$store.state.user.name, |
||||
|
functionId: 701005, |
||||
|
serialNumber: '701005Table1NotifyNo', |
||||
|
tableId: '701005Table1', |
||||
|
tableName: '领料延误预警', |
||||
|
columnProp: 'confirmStatus', |
||||
|
headerAlign: 'center', |
||||
|
align: 'center', |
||||
|
columnLabel: '确认状态', |
||||
|
columnHidden: false, |
||||
|
columnImage: false, |
||||
|
columnSortable: false, |
||||
|
sortLv: 0, |
||||
|
status: true, |
||||
|
fixed: '', |
||||
|
columnWidth: 90, |
||||
|
}, |
||||
|
|
||||
|
{ |
||||
|
userId: this.$store.state.user.name, |
||||
|
functionId: 701005, |
||||
|
serialNumber: '701005Table1NotifyNo', |
||||
|
tableId: '701005Table1', |
||||
|
tableName: '领料延误预警', |
||||
|
columnProp: 'userName', |
||||
|
headerAlign: 'center', |
||||
|
align: 'center', |
||||
|
columnLabel: '申请账号', |
||||
|
columnHidden: false, |
||||
|
columnImage: false, |
||||
|
columnSortable: false, |
||||
|
sortLv: 0, |
||||
|
status: true, |
||||
|
fixed: '', |
||||
|
columnWidth: 90, |
||||
|
}, |
||||
|
|
||||
|
{ |
||||
|
userId: this.$store.state.user.name, |
||||
|
functionId: 701005, |
||||
|
serialNumber: '701005Table1NotifyNo', |
||||
|
tableId: '701005Table1', |
||||
|
tableName: '领料延误预警', |
||||
|
columnProp: 'overtimeMinutes', |
||||
|
headerAlign: 'center', |
||||
|
align: 'right', |
||||
|
columnLabel: '超时(分钟)', |
||||
|
columnHidden: false, |
||||
|
columnImage: false, |
||||
|
columnSortable: false, |
||||
|
sortLv: 0, |
||||
|
status: true, |
||||
|
fixed: '', |
||||
|
columnWidth: 100, |
||||
|
}, |
||||
|
], |
||||
|
} |
||||
|
}, |
||||
|
mounted() { |
||||
|
this.$nextTick(() => { |
||||
|
this.height = window.innerHeight - 260 |
||||
|
getEamWorkShop({}).then(({ data }) => { |
||||
|
if (data && data.code === 0) { |
||||
|
this.workShopList = data.rows |
||||
|
} |
||||
|
}) |
||||
|
this.searchTable() |
||||
|
}) |
||||
|
}, |
||||
|
methods: { |
||||
|
searchTable() { |
||||
|
this.dataListLoading = true |
||||
|
const inData = Object.assign({}, this.searchData) |
||||
|
inData.page = this.pageIndex |
||||
|
inData.limit = this.pageSize |
||||
|
searchOvertimeMaterialList(inData) |
||||
|
.then(({ data }) => { |
||||
|
if (data && data.code === 0) { |
||||
|
this.dataList = (data.page && data.page.list) || [] |
||||
|
this.pageIndex = data.page.currPage |
||||
|
this.pageSize = data.page.pageSize |
||||
|
this.totalPage = data.page.totalCount |
||||
|
} else { |
||||
|
this.dataList = [] |
||||
|
} |
||||
|
this.dataListLoading = false |
||||
|
}) |
||||
|
.catch(() => { |
||||
|
this.dataListLoading = false |
||||
|
}) |
||||
|
}, |
||||
|
// 行内修改超时原因 |
||||
|
onTimeoutReasonChange(timeoutReason, row) { |
||||
|
if (!timeoutReason) { |
||||
|
this.$message.warning('请选择超时原因') |
||||
|
return |
||||
|
} |
||||
|
updateTimeoutReason({ |
||||
|
site: row.site || this.$store.state.user.site, |
||||
|
notifyNo: row.notifyNo, |
||||
|
componentPartNo: row.componentPartNo, |
||||
|
timeoutReason, |
||||
|
itemNo: row.itemNo, |
||||
|
bOMItemNo: row.bOMItemNo, |
||||
|
}) |
||||
|
.then(({ data }) => { |
||||
|
if (data && data.code === 0) { |
||||
|
this.$message.success(data.message || '更新成功') |
||||
|
this.searchTable() |
||||
|
} else { |
||||
|
this.$message.error(data.msg || '更新失败') |
||||
|
} |
||||
|
}) |
||||
|
.catch((error) => { |
||||
|
this.$message.error('更新失败:' + (error.message || '未知错误')) |
||||
|
}) |
||||
|
}, |
||||
|
async createExportData() { |
||||
|
const inData = Object.assign({}, this.searchData) |
||||
|
inData.page = 1 |
||||
|
inData.limit = -1 |
||||
|
await searchOvertimeMaterialList(inData).then(({ data }) => { |
||||
|
this.exportList = (data.page && data.page.list) || [] |
||||
|
}) |
||||
|
return this.exportList |
||||
|
}, |
||||
|
startDownload() {}, |
||||
|
finishDownload() {}, |
||||
|
fields() { |
||||
|
return { |
||||
|
申请单号: 'notifyNo', |
||||
|
申请账号: 'userName', |
||||
|
申请人: 'userDisplay', |
||||
|
申请日期: 'notifyDate', |
||||
|
物料编码: 'componentPartNo', |
||||
|
物料名称: 'partDesc', |
||||
|
申请数量: 'qtyToIssue', |
||||
|
已发数量: 'qtyToIssueOriginal', |
||||
|
需求时间: 'needDate', |
||||
|
'超时(分钟)': 'overtimeMinutes', |
||||
|
配料状态: 'timeoutReason', |
||||
|
生产订单: 'orderNo', |
||||
|
工序: 'opsItemNo', |
||||
|
派工单号: 'seqNo', |
||||
|
'机台/库位': 'locationNo', |
||||
|
车间: 'workShopName', |
||||
|
领料单状态: 'status', |
||||
|
确认状态: 'confirmStatus', |
||||
|
} |
||||
|
}, |
||||
|
// 每页数 |
||||
|
sizeChangeHandle(val) { |
||||
|
this.pageSize = val |
||||
|
this.pageIndex = 1 |
||||
|
this.searchTable() |
||||
|
}, |
||||
|
// 当前页 |
||||
|
currentChangeHandle(val) { |
||||
|
this.pageIndex = val |
||||
|
this.searchTable() |
||||
|
}, |
||||
|
// 打开音量设置弹框 |
||||
|
openVolumeDialog() { |
||||
|
this.volumeDialogVisible = true |
||||
|
getSoundBoxVolume().then(({ data }) => { |
||||
|
if (data && data.code === 0) { |
||||
|
this.volume = data.volume || 1 |
||||
|
} |
||||
|
}) |
||||
|
}, |
||||
|
// 关闭音量设置弹框 |
||||
|
closeVolumeDialog() { |
||||
|
this.volumeDialogVisible = false |
||||
|
}, |
||||
|
// 确认设置音量 |
||||
|
confirmVolume() { |
||||
|
if (!this.volume) { |
||||
|
this.$message.warning('请选择音量') |
||||
|
return |
||||
|
} |
||||
|
changeSoundBoxVolume({ volume: this.volume }) |
||||
|
.then(({ data }) => { |
||||
|
if (data && data.code === 0) { |
||||
|
this.$message.success(data.message || '设置成功') |
||||
|
this.closeVolumeDialog() |
||||
|
} else { |
||||
|
this.$message.error(data.msg || '设置失败') |
||||
|
} |
||||
|
}) |
||||
|
.catch((error) => { |
||||
|
this.$message.error('设置失败:' + (error.message || '未知错误')) |
||||
|
}) |
||||
|
}, |
||||
|
}, |
||||
|
} |
||||
|
</script> |
||||
|
|
||||
|
<style scoped> |
||||
|
.selectReason /deep/ .el-input__inner { |
||||
|
height: 14px !important; |
||||
|
padding-right: 0px !important; |
||||
|
} |
||||
|
</style> |
||||
|
|
||||
Write
Preview
Loading…
Cancel
Save
Reference in new issue