Browse Source

2025-08-26 生产订单排产(扩展) 加分页

master
fengyuan_yang 5 months ago
parent
commit
daeb49a967
  1. 30
      src/views/modules/qc/inboundNotification.vue
  2. 95
      src/views/modules/schedule/order_schedule_expand.vue

30
src/views/modules/qc/inboundNotification.vue

@ -1177,8 +1177,8 @@
}, },
updateModal (row) { updateModal (row) {
if (this.currentRow.orderType === '采购入库') {
this.$message.warning('采购入库单据不能编辑!')
if (this.currentRow.orderType === '采购入库' || '销售退货') {
this.$message.warning('该类型单据不能编辑!')
return return
} }
this.modalData = { this.modalData = {
@ -1241,10 +1241,6 @@
// //
deleteModal () { deleteModal () {
if (this.currentRow.orderType === '采购入库') {
this.$message.warning('采购入库单据不能编辑!')
return
}
if (this.inboundSelection.length === 0) { if (this.inboundSelection.length === 0) {
this.$message.warning('请勾选要删除的单据!') this.$message.warning('请勾选要删除的单据!')
return return
@ -1276,8 +1272,8 @@
// //
closeModal (row) { closeModal (row) {
if (this.currentRow.orderType === '采购入库') {
this.$message.warning('采购入库单据不能编辑!')
if (this.currentRow.orderType === '采购入库' || '销售退货') {
this.$message.warning('该类型单据不能编辑!')
return return
} }
closeInboundNotification(row).then(({data}) => { closeInboundNotification(row).then(({data}) => {
@ -1292,8 +1288,8 @@
// //
issueModal (row) { issueModal (row) {
if (this.currentRow.orderType === '采购入库') {
this.$message.warning('采购入库单据不能编辑!')
if (this.currentRow.orderType === '采购入库' || '销售退货') {
this.$message.warning('该类型单据不能编辑!')
return return
} }
issueInboundNotification(row).then(({data}) => { issueInboundNotification(row).then(({data}) => {
@ -1364,8 +1360,8 @@
// //
addInboundDetailModal () { addInboundDetailModal () {
if (this.currentRow.orderType === '采购入库') {
this.$message.warning('采购入库单据不能编辑!')
if (this.currentRow.orderType === '采购入库' || '销售退货') {
this.$message.warning('该类型单据不能编辑!')
return return
} }
this.detailSearchData = { this.detailSearchData = {
@ -1481,10 +1477,10 @@
}) })
}, },
//
//
deleteInboundDetail () { deleteInboundDetail () {
if (this.currentRow.orderType === '采购入库') {
this.$message.warning('采购入库单据不能编辑!')
if (this.currentRow.orderType === '采购入库' || '销售退货') {
this.$message.warning('该类型单据不能编辑!')
return return
} }
if (this.inboundDetailSelection.length === 0) { if (this.inboundDetailSelection.length === 0) {
@ -1513,8 +1509,8 @@
// //
editBatchModel() { editBatchModel() {
if (this.currentRow.orderType === '采购入库') {
this.$message.warning('采购入库单据不能编辑!')
if (this.currentRow.orderType === '采购入库' || '销售退货') {
this.$message.warning('该类型单据不能编辑!')
return return
} }
if (this.editBatchVisible) { if (this.editBatchVisible) {

95
src/views/modules/schedule/order_schedule_expand.vue

@ -4,18 +4,10 @@
<el-form :inline="true" label-position="top" label-width="100px" style="margin-top: 0px;"> <el-form :inline="true" label-position="top" label-width="100px" style="margin-top: 0px;">
<el-row> <el-row>
<el-form-item :label=labels.enterDate> <el-form-item :label=labels.enterDate>
<el-date-picker class="el-time-width"
style=""
v-model="pageData.enterTime1"
value-format="yyyy-MM-dd">
</el-date-picker>
<el-date-picker class="el-time-width" style="" v-model="pageData.enterTime1" value-format="yyyy-MM-dd"></el-date-picker>
</el-form-item> </el-form-item>
<el-form-item :label="''" style="margin-top: -10px;"> <el-form-item :label="''" style="margin-top: -10px;">
<el-date-picker class="el-time-width"
style="margin-top: 30px;"
v-model="pageData.enterTime2"
value-format="yyyy-MM-dd" placeholder="">
</el-date-picker>
<el-date-picker class="el-time-width" style="margin-top: 30px;" v-model="pageData.enterTime2" value-format="yyyy-MM-dd" placeholder=""></el-date-picker>
</el-form-item> </el-form-item>
<el-form-item :label=labels.orderNo> <el-form-item :label=labels.orderNo>
<el-input v-model="pageData.orderNo" style="width: 120px"></el-input> <el-input v-model="pageData.orderNo" style="width: 120px"></el-input>
@ -26,18 +18,10 @@
</el-row> </el-row>
<el-row> <el-row>
<el-form-item :label=labels.needDate> <el-form-item :label=labels.needDate>
<el-date-picker class="el-time-width"
style=""
v-model="pageData.needTime1"
value-format="yyyy-MM-dd" placeholder="">
</el-date-picker>
<el-date-picker class="el-time-width" style="" v-model="pageData.needTime1" value-format="yyyy-MM-dd" placeholder=""></el-date-picker>
</el-form-item> </el-form-item>
<el-form-item :label="''" style="margin-top: -10px;"> <el-form-item :label="''" style="margin-top: -10px;">
<el-date-picker class="el-time-width"
style="margin-top: 30px;"
v-model="pageData.needTime2"
value-format="yyyy-MM-dd" placeholder="">
</el-date-picker>
<el-date-picker class="el-time-width" style="margin-top: 30px;" v-model="pageData.needTime2" value-format="yyyy-MM-dd" placeholder=""></el-date-picker>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<span slot="label" style="" @click="getBaseList(88)"><a herf="#">{{ labels.resourceId }}</a></span> <span slot="label" style="" @click="getBaseList(88)"><a herf="#">{{ labels.resourceId }}</a></span>
@ -66,17 +50,14 @@
</fieldset> </fieldset>
<!-- 菜单 --> <!-- 菜单 -->
<el-form :inline="true" label-position="top" label-width="100px"
style="margin-left: 660px; margin-top: -40px;">
<el-form :inline="true" label-position="top" label-width="100px" style="margin-left: 660px; margin-top: -40px;">
<el-row> <el-row>
<el-col :span="24"> <el-col :span="24">
<el-form-item :label="''"> <el-form-item :label="''">
<el-form-item :label="''" style="margin-left: 30px;"> <el-form-item :label="''" style="margin-left: 30px;">
<el-button class="customer-bun-min" type="primary" @click="refreshPageTables"
style="margin-left: 10px; margin-bottom: 5px;">{{ buttons.refreshButton }}
<el-button class="customer-bun-min" type="primary" @click="refreshPageTables" style="margin-left: 10px; margin-bottom: 5px;">{{ buttons.refreshButton }}
</el-button> </el-button>
<el-button :disabled="dataListSelections.length <= 0" type="primary" @click="scheduleBatchDialog()"
style="margin-left: 10px; margin-bottom: 5px;">
<el-button :disabled="dataListSelections.length <= 0" type="primary" @click="scheduleBatchDialog()" style="margin-left: 10px; margin-bottom: 5px;">
{{ buttons.scheduleBatch ? buttons.scheduleBatch : '批量排产' }} {{ buttons.scheduleBatch ? buttons.scheduleBatch : '批量排产' }}
</el-button> </el-button>
</el-form-item> </el-form-item>
@ -95,13 +76,9 @@
{{ buttons.primaryMenu }}<i class="el-icon-arrow-down el-icon--right"></i> {{ buttons.primaryMenu }}<i class="el-icon-arrow-down el-icon--right"></i>
</el-button> </el-button>
<el-dropdown-menu slot="dropdown"> <el-dropdown-menu slot="dropdown">
<el-dropdown-item class="customer-li" command="生产工单"
:disabled="primaryMenuButton.shopOrderFlag">{{ buttons.shopOrder }}
</el-dropdown-item>
<el-dropdown-item class="customer-li" command="生产工单" :disabled="primaryMenuButton.shopOrderFlag">{{ buttons.shopOrder }}</el-dropdown-item>
<hr width="95%"/> <hr width="95%"/>
<el-dropdown-item class="customer-li" command="查看物料库存"
:disabled="primaryMenuButton.partStockFlag">{{ buttons.viewPartStock }}
</el-dropdown-item>
<el-dropdown-item class="customer-li" command="查看物料库存" :disabled="primaryMenuButton.partStockFlag">{{ buttons.viewPartStock }}</el-dropdown-item>
</el-dropdown-menu> </el-dropdown-menu>
</el-dropdown> </el-dropdown>
<!-- <el-button @click="userSetting" type="primary">{{ buttons.settingTable }}</el-button>--> <!-- <el-button @click="userSetting" type="primary">{{ buttons.settingTable }}</el-button>-->
@ -138,19 +115,32 @@
<template slot-scope="scope"> <template slot-scope="scope">
<span v-if="!item.columnHidden && item.columnProp == 'resourceList'"> <span v-if="!item.columnHidden && item.columnProp == 'resourceList'">
<el-select class="table-select-input" v-model="scope.row.resourceId"> <el-select class="table-select-input" v-model="scope.row.resourceId">
<el-option v-for="(item,index) in scope.row.resourceList" :key="index"
:value="item.resourceId" :label="item.resourceDesc">
<el-option
v-for="(item,index) in scope.row.resourceList"
:key="index"
:value="item.resourceId"
:label="item.resourceDesc">
</el-option> </el-option>
</el-select> </el-select>
</span> </span>
<span v-if="!item.columnHidden && item.columnProp == 'qtyToSchedule'"> <span v-if="!item.columnHidden && item.columnProp == 'qtyToSchedule'">
<el-input v-model="scope.row.qtyToSchedule" type="number">
</el-input>
<el-input v-model="scope.row.qtyToSchedule" type="number"></el-input>
</span> </span>
<span v-else> {{ scope.row[item.columnProp] }}</span> <span v-else> {{ scope.row[item.columnProp] }}</span>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<!-- 分页栏 -->
<el-pagination
style="margin-top: 0px"
@size-change="sizeChangeHandle"
@current-change="currentChangeHandle"
:current-page="pageIndex"
:page-sizes="[20, 50, 100, 200, 500]"
:page-size="pageSize"
:total="totalPage"
layout="total, sizes, prev, pager, next, jumper">
</el-pagination>
</el-main> </el-main>
<!--列表的组件--> <!--列表的组件-->
@ -274,6 +264,9 @@ export default {
data() { data() {
return { return {
height: 200, height: 200,
pageIndex: 1,
pageSize: 20,
totalPage: 0,
tagNo: '', tagNo: '',
authEdit: false, authEdit: false,
authAdd: false, authAdd: false,
@ -440,7 +433,9 @@ export default {
calendarId: '', calendarId: '',
calendarDesc: '', calendarDesc: '',
status: 1, status: 1,
sortField: 'needDate'
sortField: 'needDate',
page: 1,
limit: 10,
}, },
shopOrderList: [], shopOrderList: [],
dataListLoading: false, dataListLoading: false,
@ -1265,7 +1260,7 @@ export default {
mounted() { mounted() {
this.$nextTick(() => { this.$nextTick(() => {
this.height = window.innerHeight - 205;
this.height = window.innerHeight - 235;
}) })
}, },
methods: { methods: {
@ -1332,20 +1327,37 @@ export default {
} }
this.scheduleVisible = true this.scheduleVisible = true
}, },
// //
handleSelectionChange(val) { handleSelectionChange(val) {
this.dataListSelections = val this.dataListSelections = val
}, },
/*刷新页面table*/ /*刷新页面table*/
refreshPageTables() { refreshPageTables() {
this.getShopOrderList(); this.getShopOrderList();
}, },
//
sizeChangeHandle (val) {
this.pageSize = val
this.pageIndex = 1
this.getShopOrderList()
},
//
currentChangeHandle (val) {
this.pageIndex = val
this.getShopOrderList()
},
/*获取工单信息*/ /*获取工单信息*/
getShopOrderList() { getShopOrderList() {
this.pageData.limit = this.pageSize
this.pageData.page = this.pageIndex
getShopOrderList(this.pageData).then(({data}) => { getShopOrderList(this.pageData).then(({data}) => {
if (this.pageData.resourceId) { if (this.pageData.resourceId) {
this.shopOrderList = data.rows.map(item => {
this.shopOrderList = data.page.list.map(item => {
item.resourceId = this.pageData.resourceId item.resourceId = this.pageData.resourceId
item.resourceList = item.resourceList.split(';').map(resItem => { item.resourceList = item.resourceList.split(';').map(resItem => {
let newItem = { let newItem = {
@ -1357,7 +1369,7 @@ export default {
return item; return item;
}) })
} else { } else {
this.shopOrderList = data.rows.map(item => {
this.shopOrderList = data.page.list.map(item => {
item.resourceList = item.resourceList.split(';').map(resItem => { item.resourceList = item.resourceList.split(';').map(resItem => {
let newItem = { let newItem = {
resourceId: resItem.split(':')[0], resourceId: resItem.split(':')[0],
@ -1368,6 +1380,9 @@ export default {
return item; return item;
}) })
} }
this.pageIndex = data.page.currPage
this.pageSize = data.page.pageSize
this.totalPage = data.page.totalCount
// //
this.currentRoutingRow = null; this.currentRoutingRow = null;
}) })

Loading…
Cancel
Save