Browse Source

领料申请单

master
Yangzz 5 months ago
parent
commit
907ef55227
  1. 5
      src/api/orderIssure/soIssueNotify.js
  2. 330
      src/views/modules/orderIssure/soIssueNotify/searchIssureNotify.vue

5
src/api/orderIssure/soIssueNotify.js

@ -6,8 +6,9 @@ export const createNotify = data => createAPI(`/orderIssure/issureNotify/createN
export const getNotifyNoDetail = data => createAPI(`/orderIssure/issureNotify/getNotifyNoDetail`,'post',data) export const getNotifyNoDetail = data => createAPI(`/orderIssure/issureNotify/getNotifyNoDetail`,'post',data)
export const getSOScheduledRoutingListForIssure= data => createAPI(`/orderIssure/issureNotify/getSOScheduledRoutingListForIssure`,'post',data)
export const getSOSBOMForIssure= data => createAPI(`/orderIssure/issureNotify/getSOSBOMForIssure`,'post',data) export const getSOSBOMForIssure= data => createAPI(`/orderIssure/issureNotify/getSOSBOMForIssure`,'post',data)
export const getSOScheduledRoutingListForIssure= data => createAPI(`/orderIssure/issureNotify/getSOScheduledRoutingListForIssure`,'post',data)
export const getSOScheduledRoutingListForIssureByPaging= data => createAPI(`/orderIssure/issureNotify/getSOScheduledRoutingListForIssureByPaging`,'post',data)
export const saveSOIssueNotifyOrderList= data => createAPI(`/orderIssure/issureNotify/saveSOIssueNotifyOrderList`,'post',data) export const saveSOIssueNotifyOrderList= data => createAPI(`/orderIssure/issureNotify/saveSOIssueNotifyOrderList`,'post',data)
export const saveMaterialDetail= data => createAPI(`/orderIssure/issureNotify/saveMaterialDetail`,'post',data) export const saveMaterialDetail= data => createAPI(`/orderIssure/issureNotify/saveMaterialDetail`,'post',data)
@ -29,6 +30,7 @@ export const searchSumNotifyMaterialList= data => createAPI(`/orderIssure/issure
export const updateNotifyBu= data => createAPI(`/orderIssure/issureNotify/updateNotifyBu`,'post',data) export const updateNotifyBu= data => createAPI(`/orderIssure/issureNotify/updateNotifyBu`,'post',data)
export const getPartList= data => createAPI(`/orderIssure/issureNotify/getPartList`,'post',data) export const getPartList= data => createAPI(`/orderIssure/issureNotify/getPartList`,'post',data)
export const getPartListByPaging= data => createAPI(`/orderIssure/issureNotify/getPartListByPaging`,'post',data)
export const checkPartStock= data => createAPI(`/orderIssure/issureNotify/checkPartStock`,'post',data) export const checkPartStock= data => createAPI(`/orderIssure/issureNotify/checkPartStock`,'post',data)
export const deleteNotifySOSPlus= data => createAPI(`/orderIssure/issureNotify/deleteNotifySOSPlus`,'post',data) export const deleteNotifySOSPlus= data => createAPI(`/orderIssure/issureNotify/deleteNotifySOSPlus`,'post',data)
export const updateNotifyStatus= data => createAPI(`/orderIssure/issureNotify/updateNotifyStatus`,'post',data) export const updateNotifyStatus= data => createAPI(`/orderIssure/issureNotify/updateNotifyStatus`,'post',data)
@ -46,4 +48,5 @@ export const updateNotifyBatchConfirmStatus= data => createAPI(`/orderIssure/iss
export const getSiteAndBuByUserName = data => createAPI(`/orderIssure/issureNotify/getSiteAndBuByUserName`,'post',data) export const getSiteAndBuByUserName = data => createAPI(`/orderIssure/issureNotify/getSiteAndBuByUserName`,'post',data)
export const getEamWorkShop = data => createAPI(`/orderIssure/issureNotify/getEamWorkShop`,'post',data) export const getEamWorkShop = data => createAPI(`/orderIssure/issureNotify/getEamWorkShop`,'post',data)
export const saveIssueNoOrderDetail = data => createAPI(`/orderIssure/issureNotify/saveIssueNoOrderDetail`,'post',data)

330
src/views/modules/orderIssure/soIssueNotify/searchIssureNotify.vue

@ -374,40 +374,38 @@
</el-dialog> </el-dialog>
<!-- 选择物料模态框 --> <!-- 选择物料模态框 -->
<el-dialog
width="600px"
<el-dialog width="1000px"
title="选择物料" title="选择物料"
:close-on-click-modal="false" :close-on-click-modal="false"
:visible.sync="choosePartModalFlag"> :visible.sync="choosePartModalFlag">
<el-form :inline="true" label-position="top" label-width="100px">
<el-form :inline="true" label-position="top" style="margin-left: 7px;margin-top: -5px;">
<el-row :gutter="20"> <el-row :gutter="20">
<el-col :span="6"> <el-col :span="6">
<el-form-item style="margin-left: 0px" label="物料编码">
<el-form-item :label="'物料编码'" >
<el-input v-model="choosePartData.partNo"></el-input> <el-input v-model="choosePartData.partNo"></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6">
<el-form-item style="margin-left: 0px" label="物料名称">
<el-form-item :label="'物料名称'" >
<el-input v-model="choosePartData.partDesc"></el-input> <el-input v-model="choosePartData.partDesc"></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6">
<el-form-item style="margin-left: 0px" label="规格型号">
<el-form-item :label="'规格型号'" >
<el-input v-model="choosePartData.spec"></el-input> <el-input v-model="choosePartData.spec"></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6">
<el-form-item label=" ">
<el-button type="primary" @click="searchPartModel">查询</el-button>
<el-form-item >
<el-button type="primary" @click="searchPartModel" style="margin-top: 5px" class="">查询</el-button>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
</el-form> </el-form>
<el-table <el-table
height="450"
:height="400"
:data="choosePartList" :data="choosePartList"
border border
@row-dblclick="choosePart"
style="width: 100%;"> style="width: 100%;">
<el-table-column <el-table-column
prop="partNo" prop="partNo"
@ -444,7 +442,26 @@
min-width="60" min-width="60"
label="计量单位"> label="计量单位">
</el-table-column> </el-table-column>
<el-table-column
fixed="left"
header-align="center"
align="center"
width="60"
label="操作">
<template slot-scope="scope">
<a type="text" size="small" @click="choosePart(scope.row)">选择</a>
</template>
</el-table-column>
</el-table> </el-table>
<el-pagination
@size-change="pp_sizeChangeHandle"
@current-change="pp_currentChangeHandle"
:current-page="pp_pageIndex"
:page-sizes="[20, 50, 100, 1000]"
:page-size="pp_pageSize"
:total="pp_totalPage"
layout="total, sizes, prev, pager, next, jumper">
</el-pagination>
<el-footer style="height:40px;margin-top: 10px;text-align:center"> <el-footer style="height:40px;margin-top: 10px;text-align:center">
<el-button type="primary" @click="choosePartModalFlag=false">关闭</el-button> <el-button type="primary" @click="choosePartModalFlag=false">关闭</el-button>
</el-footer> </el-footer>
@ -530,6 +547,15 @@
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<el-pagination
@size-change="ss_sizeChangeHandle"
@current-change="ss_currentChangeHandle"
:current-page="ss_pageIndex"
:page-sizes="[20, 50, 100, 1000]"
:page-size="ss_pageSize"
:total="ss_totalPage"
layout="total, sizes, prev, pager, next, jumper">
</el-pagination>
<el-footer style="height:40px;margin-top: 10px;text-align:center"> <el-footer style="height:40px;margin-top: 10px;text-align:center">
<el-button type="primary" @click="chooseSOSModalFlag = false">关闭</el-button> <el-button type="primary" @click="chooseSOSModalFlag = false">关闭</el-button>
</el-footer> </el-footer>
@ -545,7 +571,7 @@
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6">
<el-form-item :label="'工单状态'" > <el-form-item :label="'工单状态'" >
<el-select v-model="chooseOrderData.statusList" multiple style="width: 100%" class="single-line-multi-select">
<el-select multiple collapse-tags v-model="chooseOrderData.statusList" style="width: 220px">
<el-option label="全部" value=""></el-option> <el-option label="全部" value=""></el-option>
<el-option label="已停工" value="已停工"></el-option> <el-option label="已停工" value="已停工"></el-option>
<el-option label="已开工" value="已开工"></el-option> <el-option label="已开工" value="已开工"></el-option>
@ -620,7 +646,7 @@
</el-table-column> </el-table-column>
</el-table> </el-table>
<el-pagination <el-pagination
@size-change="co_SizeChangeHandle"
@size-change="co_sizeChangeHandle"
@current-change="co_currentChangeHandle" @current-change="co_currentChangeHandle"
:current-page="co_pageIndex" :current-page="co_pageIndex"
:page-sizes="[20, 50, 100, 1000]" :page-sizes="[20, 50, 100, 1000]"
@ -745,7 +771,7 @@
<!-- BOM物料和非BOM物料选择 --> <!-- BOM物料和非BOM物料选择 -->
<el-row :gutter="20" style="margin-bottom: 15px;"> <el-row :gutter="20" style="margin-bottom: 15px;">
<el-col :span="24"> <el-col :span="24">
<el-form-item :label="'物料类型'">
<el-form-item :label="'物料类型'" style="display: none;">
<el-radio-group v-model="orderDetailData.materialType" @change="onMaterialTypeChange"> <el-radio-group v-model="orderDetailData.materialType" @change="onMaterialTypeChange">
<el-radio label="BOM物料">BOM物料</el-radio> <el-radio label="BOM物料">BOM物料</el-radio>
<el-radio label="非BOM物料">非BOM物料</el-radio> <el-radio label="非BOM物料">非BOM物料</el-radio>
@ -776,8 +802,8 @@
<el-col :span="6"> <el-col :span="6">
<el-form-item> <el-form-item>
<template slot="label"> <template slot="label">
<span v-if="!orderDetailData.orderNo" slot="label">工序名称</span>
<span v-else style="cursor: pointer" slot="label" @click="openChooseOperationModal"><a>工序名称</a></span>
<span v-if="orderDetailData.orderNo && !orderDetailData.seqNo" style="cursor: pointer" slot="label" @click="openChooseOperationModal"><a>工序名称</a></span>
<span v-else slot="label">工序名称</span>
</template> </template>
<el-input v-model="orderDetailData.itemDesc" disabled placeholder="请选择工序"></el-input> <el-input v-model="orderDetailData.itemDesc" disabled placeholder="请选择工序"></el-input>
</el-form-item> </el-form-item>
@ -785,8 +811,8 @@
<el-col :span="6"> <el-col :span="6">
<el-form-item> <el-form-item>
<template slot="label"> <template slot="label">
<span v-if="!orderDetailData.orderNo" slot="label">机台</span>
<span v-else style="cursor: pointer" slot="label" @click="openChooseResourceModal"><a>机台</a></span>
<span v-if="orderDetailData.orderNo && !orderDetailData.seqNo" style="cursor: pointer" slot="label" @click="openChooseResourceModal"><a>机台</a></span>
<span v-else slot="label">机台</span>
</template> </template>
<el-input v-model="orderDetailData.resourceDesc" disabled placeholder="请选择机台"></el-input> <el-input v-model="orderDetailData.resourceDesc" disabled placeholder="请选择机台"></el-input>
</el-form-item> </el-form-item>
@ -799,7 +825,7 @@
<span v-if="orderDetailData.materialType === 'BOM物料'" slot="label">物料编码</span> <span v-if="orderDetailData.materialType === 'BOM物料'" slot="label">物料编码</span>
<span v-else style="cursor: pointer" slot="label" @click="openChoosePartModal"><a>物料编码</a></span> <span v-else style="cursor: pointer" slot="label" @click="openChoosePartModal"><a>物料编码</a></span>
</template> </template>
<el-input v-model="orderDetailData.partNo" :disabled="orderDetailData.materialType === 'BOM物料'"></el-input>
<el-input v-model="orderDetailData.partNo" disabled></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="18"> <el-col :span="18">
@ -834,7 +860,7 @@
</el-form> </el-form>
<el-footer style="height:40px;margin-top: 10px;text-align:center"> <el-footer style="height:40px;margin-top: 10px;text-align:center">
<el-button type="primary" @click="saveOrderDetail()">保存</el-button>
<el-button type="primary" @click="saveIssueNoOrderDetail()">保存</el-button>
<el-button type="primary" @click="saveOrderDetailFlag=false">关闭</el-button> <el-button type="primary" @click="saveOrderDetailFlag=false">关闭</el-button>
</el-footer> </el-footer>
</el-dialog> </el-dialog>
@ -857,8 +883,8 @@
, searchNotifyLogClose , searchNotifyLogClose
, getSiteAndBuByUserName , getSiteAndBuByUserName
, createNotify , createNotify
, getSOScheduledRoutingListForIssure
, getPartList
, getSOScheduledRoutingListForIssureByPaging
, getPartListByPaging
} from "@/api/orderIssure/soIssueNotify.js" } from "@/api/orderIssure/soIssueNotify.js"
import { import {
searchShopOrderByPaging searchShopOrderByPaging
@ -872,6 +898,7 @@
getTableDefaultListLanguage, getTableDefaultListLanguage,
getTableUserListLanguage, getTableUserListLanguage,
} from "@/api/table.js" } from "@/api/table.js"
import {saveIssueNoOrderDetail} from "../../../../api/orderIssure/soIssueNotify";
export default { export default {
@ -928,6 +955,14 @@
co_pageIndex: 1, co_pageIndex: 1,
co_pageSize: 100, co_pageSize: 100,
co_totalPage: 0, co_totalPage: 0,
//
ss_pageIndex: 1,
ss_pageSize: 100,
ss_totalPage: 0,
//BOM
pp_pageIndex: 1,
pp_pageSize: 100,
pp_totalPage: 0,
dataListLoading: false, dataListLoading: false,
currentRow:'', currentRow:'',
columnList1:[ columnList1:[
@ -1822,6 +1857,8 @@
}, },
chooseSOSModalFlag: false, chooseSOSModalFlag: false,
chooseSOSData: { chooseSOSData: {
page: 1,
limit: 100,
orderno: '', orderno: '',
seqno: '', seqno: '',
sResourceid: '', sResourceid: '',
@ -1857,6 +1894,8 @@
chooseSOSList: [], chooseSOSList: [],
choosePartModalFlag: false, choosePartModalFlag: false,
choosePartData: { choosePartData: {
page: 1,
limit: 100,
site: '', site: '',
sourceBu: '', sourceBu: '',
partNo: '', partNo: '',
@ -2204,6 +2243,7 @@
this.getTableUserColumn(this.$route.meta.menuId+'table6',6) this.getTableUserColumn(this.$route.meta.menuId+'table6',6)
}, },
methods: { methods: {
saveIssueNoOrderDetail,
// //
async getTableUserColumn(tableId, columnId) { async getTableUserColumn(tableId, columnId) {
let queryTableUser = { let queryTableUser = {
@ -2554,11 +2594,11 @@
// //
this.orderDetailData = { this.orderDetailData = {
orderno: '',
seqno: '',
orderNo: '',
seqNo: '',
operationNo: '', operationNo: '',
locationNo: '', locationNo: '',
qtyrequired: '',
qtyRequired: '',
issureQty: 0, issureQty: 0,
partDesc: '', partDesc: '',
partNo: '', partNo: '',
@ -2573,6 +2613,7 @@
this.saveOrderDetailFlag = true this.saveOrderDetailFlag = true
}, },
// //
editOrderDetail(){ editOrderDetail(){
// //
@ -2583,11 +2624,33 @@
return false return false
} }
//
this.$message.warning('编辑功能待实现');
}, },
saveOrderDetail(){
saveIssueNoOrderDetail(){
// //
// BOM
if (this.orderDetailData.materialType === 'BOM物料') {
if (!this.orderDetailData.orderNo ) {
this.$alert('请选择工单或者派工单!', '提示', {
confirmButtonText: '确定'
})
return false
}
if (!this.orderDetailData.itemNo) {
this.$alert('请选择工序!', '提示', {
confirmButtonText: '确定'
})
return false
}
//BOM
if (this.orderDetailData.issureQty > this.orderDetailData.qtyRequired){
this.$alert('领取数量不可大于工单/派工数量!', '提示', {
confirmButtonText: '确定'
})
return false
}
}
if (!this.orderDetailData.needDate) { if (!this.orderDetailData.needDate) {
this.$alert('请选择要求发料时间!', '提示', { this.$alert('请选择要求发料时间!', '提示', {
confirmButtonText: '确定' confirmButtonText: '确定'
@ -2602,53 +2665,74 @@
return false return false
} }
// API
let inData = { let inData = {
site: this.currentRow.site, site: this.currentRow.site,
bu: this.currentRow.bu, bu: this.currentRow.bu,
notifyNo: this.currentRow.notifyNo, notifyNo: this.currentRow.notifyNo,
orderno: this.orderDetailData.orderNo,
seqno: this.orderDetailData.seqNo,
operationNo: this.orderDetailData.operationNo,
locationNo: this.orderDetailData.locationNo,
qtyrequired: this.orderDetailData.qtyRequired,
materialType: this.orderDetailData.materialType,
sOOrderNo: this.orderDetailData.orderNo,
seqNo: this.orderDetailData.seqNo,
fGPartNo: this.orderDetailData.partNo,
opsItemNo: this.orderDetailData.itemNo,
issureQty: this.orderDetailData.issureQty, issureQty: this.orderDetailData.issureQty,
needDate: this.orderDetailData.needDate,
outWorkOrderFlag: 'N',
username: this.$store.state.user.name,
//
itemDesc: this.orderDetailData.itemDesc,
partDesc: this.orderDetailData.partDesc, partDesc: this.orderDetailData.partDesc,
partNo: this.orderDetailData.partNo,
resourceDesc: this.orderDetailData.resourceDesc, resourceDesc: this.orderDetailData.resourceDesc,
resourceId: this.orderDetailData.resourceId, resourceId: this.orderDetailData.resourceId,
itemDesc: this.orderDetailData.itemDesc,
itemNo: this.orderDetailData.itemNo,
workCenterNo: this.orderDetailData.workCenterNo, workCenterNo: this.orderDetailData.workCenterNo,
needDate: this.orderDetailData.needDate,
username: this.$store.state.user.name,
qtyrequired: this.orderDetailData.qtyRequired
} }
// API
// API
this.$message.success('保存成功')
this.saveOrderDetailFlag = false
// API
saveIssueNoOrderDetail(inData).then(({data}) => {
if (data && data.code === 0) {
this.$message({
message: '保存成功',
type: 'success',
duration: 1500,
onClose: () => {}
})
//
this.refreshCurrentTabTable()
//
this.saveOrderDetailFlag = false
//
this.orderDetailData = {
orderno: '',
seqno: '',
operationNo: '',
locationNo: '',
qtyrequired: '',
issureQty: 0,
partDesc: '',
partNo: '',
resourceId: '',
resourceDesc: '',
itemDesc: '',
itemNo: 0,
workCenterNo: '',
needDate: '',
materialType: 'BOM物料'
}
//
this.refreshCurrentTabTable()
//
this.orderDetailData = {
orderNo: '',
seqNo: '',
operationNo: '',
locationNo: '',
qtyRequired: '',
issureQty: 0,
partDesc: '',
partNo: '',
resourceId: '',
resourceDesc: '',
itemDesc: '',
itemNo: 0,
workCenterNo: '',
needDate: '',
materialType: 'BOM物料'
}
} else {
this.$alert(data.msg || '保存失败', '错误', {
confirmButtonText: '确定'
})
}
}).catch(error => {
console.error('保存派工单明细失败:', error)
this.$alert('保存失败,请稍后重试', '错误', {
confirmButtonText: '确定'
})
})
}, },
@ -2689,9 +2773,6 @@
return '' return ''
}, },
onMaterialTypeChange(value) { onMaterialTypeChange(value) {
// //
this.orderDetailData.orderNo = ''; this.orderDetailData.orderNo = '';
@ -2709,27 +2790,7 @@
this.orderDetailData.issureQty = 0; this.orderDetailData.issureQty = 0;
}, },
searchSOSRouting() {
// API
this.$message.warning('正在查询派工单信息...');
getSOScheduledRoutingListForIssure(this.chooseSOSData).then(({data}) => {
if (data.code === 0) {
this.chooseSOSList = data.rows;
if (this.chooseSOSList.length === 0) {
this.$message.warning('未查询到符合条件的派工单');
}
} else {
this.$message.error(data.msg || '查询失败');
}
}).catch(error => {
console.error('查询派工单失败:', error);
this.$message.error('查询失败,请稍后重试');
});
},
//
openChooseSOSModal() { openChooseSOSModal() {
// //
if (!this.currentRow || !this.currentRow.notifyNo) { if (!this.currentRow || !this.currentRow.notifyNo) {
@ -2739,37 +2800,77 @@
return false return false
} }
this.ss_totalPage= 0;
// //
this.chooseSOSData = { this.chooseSOSData = {
page: 1,
limit: 100,
site: this.currentRow.site, site: this.currentRow.site,
bu: this.currentRow.bu, bu: this.currentRow.bu,
orderno: '',
seqno: '',
orderNo: '',
seqNo: '',
sResourceid: '', sResourceid: '',
startDate: this.dayjs().format('YYYY-MM-DD'), startDate: this.dayjs().format('YYYY-MM-DD'),
endDate: this.dayjs().format('YYYY-MM-DD'), endDate: this.dayjs().format('YYYY-MM-DD'),
} }
// //
this.chooseSOSList = [] this.chooseSOSList = []
// //
this.chooseSOSModalFlag = true this.chooseSOSModalFlag = true
}, },
searchSOSRouting() {
this.chooseSOSData.limit = this.ss_pageSize
this.chooseSOSData.page = this.ss_pageIndex
// API
getSOScheduledRoutingListForIssureByPaging(this.chooseSOSData).then(({data}) => {
if (data.code === 0) {
this.chooseSOSList = data.page.list;
if (this.chooseSOSList.length === 0) {
this.$message.warning('未查询到符合条件的派工单');
}
this.ss_pageIndex = data.page.currPage
this.ss_pageSize = data.page.pageSize
this.ss_totalPage = data.page.totalCount
} else {
//
this.chooseSOSList = []
this.$message.error(data.msg || '查询失败');
}
}).catch(error => {
//
this.chooseSOSList = []
console.error('查询派工单失败:', error);
this.$message.error('查询失败,请稍后重试');
});
},
//
ss_sizeChangeHandle(val) {
this.ss_pageSize = val
this.ss_pageIndex = 1
this.searchSOSRouting()
},
//
ss_currentChangeHandle(val) {
this.ss_pageIndex = val
this.searchSOSRouting()
},
chooseSOS(row) { chooseSOS(row) {
// //
this.chooseSOSModalFlag = false this.chooseSOSModalFlag = false
// //
this.orderDetailData.orderNo = row.orderno || row.orderNo || '';
this.orderDetailData.seqNo = row.seqno || row.seqNo || '';
this.orderDetailData.operationNo = row.operationNo || row.operation || '';
this.orderDetailData.locationNo = row.sResourceid || row.locationNo || '';
this.orderDetailData.qtyRequired = row.qtyrequired || row.qtyToIssue || '';
this.orderDetailData.orderNo = row.orderno || '';
this.orderDetailData.seqNo = row.seqno || '';
this.orderDetailData.itemNo = row.itemno || '';
this.orderDetailData.itemDesc = row.itemDesc || '';
this.orderDetailData.resourceId = row.sResourceid || '';
this.orderDetailData.resourceDesc = row.resourceDesc || '';
this.orderDetailData.qtyRequired = row.qtyrequired || '';
this.orderDetailData.partDesc = row.partDesc || ''; this.orderDetailData.partDesc = row.partDesc || '';
this.orderDetailData.partNo = row.partNo || row.fGPartNo || '';
this.orderDetailData.workCenterNo = row.workCenterNo || '';
this.orderDetailData.needDate = row.startDate || this.dayjs().format('YYYY-MM-DD HH:mm:ss');
this.orderDetailData.partNo = row.partNo || '';
this.orderDetailData.workCenterNo = row.sWorkcenterno || '';
this.orderDetailData.needDate = this.dayjs().format('YYYY-MM-DD HH:mm:ss');
// //
if (row.issueType === '非BOM物料') { if (row.issueType === '非BOM物料') {
@ -2792,7 +2893,7 @@
}) })
return false return false
} }
this.co_totalPage= 0;
// //
this.chooseOrderData = { this.chooseOrderData = {
page: 1, page: 1,
@ -2881,7 +2982,8 @@
// //
this.chooseOperationList = [] this.chooseOperationList = []
//
this.searchOperation();
// //
this.chooseOperationModalFlag = true this.chooseOperationModalFlag = true
}, },
@ -2939,7 +3041,7 @@
// //
this.chooseResourceList = [] this.chooseResourceList = []
this.searchResource();
// //
this.chooseResourceModalFlag = true this.chooseResourceModalFlag = true
}, },
@ -3000,26 +3102,46 @@
// //
this.choosePartModalFlag = true this.choosePartModalFlag = true
this.searchPartModel()
}, },
// //
searchPartModel() { searchPartModel() {
this.choosePartData.limit = this.pp_pageSize
this.choosePartData.page = this.pp_pageIndex
// API // API
this.$message.warning('正在查询物料信息...');
getPartList(this.choosePartData).then(({data}) => {
getPartListByPaging(this.choosePartData).then(({data}) => {
if (data.code === 0) { if (data.code === 0) {
this.choosePartList = data.rows;
this.choosePartList = data.page.list;
if (this.choosePartList.length === 0) { if (this.choosePartList.length === 0) {
this.$message.warning('未查询到符合条件的物料'); this.$message.warning('未查询到符合条件的物料');
} }
this.pp_pageIndex = data.page.currPage
this.pp_pageSize = data.page.pageSize
this.pp_totalPage = data.page.totalCount
} else { } else {
//
this.choosePartList = []
this.$message.error(data.msg || '查询失败'); this.$message.error(data.msg || '查询失败');
} }
}).catch(error => { }).catch(error => {
//
this.choosePartList = []
console.error('查询物料失败:', error); console.error('查询物料失败:', error);
this.$message.error('查询失败,请稍后重试'); this.$message.error('查询失败,请稍后重试');
}); });
}, },
//
pp_sizeChangeHandle(val) {
this.pp_pageSize = val
this.pp_pageIndex = 1
this.searchPartModel()
},
//
pp_currentChangeHandle(val) {
this.pp_pageIndex = val
this.searchPartModel()
},
// //
choosePart(row) { choosePart(row) {
// //

Loading…
Cancel
Save