Browse Source

2025-09-19 领料申请管理 申请数量允许修改

master
fengyuan_yang 4 months ago
parent
commit
23c20b146f
  1. 2
      src/api/orderIssure/soIssueNotify.js
  2. 146
      src/views/modules/orderIssure/soIssueNotify/searchIssureNotify.vue

2
src/api/orderIssure/soIssueNotify.js

@ -51,3 +51,5 @@ export const getSiteAndBuByUserName = data => createAPI(`/orderIssure/issureNoti
export const getEamWorkShop = data => createAPI(`/orderIssure/issureNotify/getEamWorkShop`,'post',data)
export const saveIssueNoOrderDetail = data => createAPI(`/orderIssure/issureNotify/saveIssueNoOrderDetail`,'post',data)
export const updateNotifyDetail = data => createAPI(`/orderIssure/issureNotify/updateNotifyDetail`,'post',data)

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

@ -1,5 +1,5 @@
<template>
<div class="mod-config yzz">
<div class="mod-config">
<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="'申请单号'">
@ -72,6 +72,7 @@
</el-form-item>
</el-form>
</el-form>
<el-table
:data="dataList"
@row-click="changeData"
@ -93,8 +94,7 @@
: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>
<span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span>
</template>
</el-table-column>
<el-table-column
@ -111,6 +111,7 @@
</template>
</el-table-column>
</el-table>
<el-pagination
@size-change="sizeChangeHandle"
@current-change="currentChangeHandle"
@ -121,10 +122,9 @@
layout="total, sizes, prev, pager, next, jumper">
</el-pagination>
<el-tabs style="font-size: 12px;min-height: 200px" class="customer-tab" v-model="activeName" type="border-card" @tab-click="tabClick">
<el-tab-pane label="申请单明细" name="detail">
<el-form :inline="true" label-position="top" label-width="100px" style="margin-top: -10px;">
<el-form :inline="true" label-position="top" label-width="100px">
<el-button
@click="createOrderDetail()"
type="primary"
@ -174,6 +174,10 @@
</el-tab-pane>
<el-tab-pane label="材料明细" name="sub">
<el-form label-position="top" style="margin-left: 2px;">
<el-button v-if="!editBatchVisible" type="primary" @click="editBatchModel">批量编辑</el-button>
<el-button v-if="editBatchVisible" type="primary" @click="batchModel" :loading="saveLoading">批量保存</el-button>
</el-form>
<el-table
:data="dataList3"
:height="height"
@ -193,8 +197,40 @@
: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>
<span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span>
</template>
</el-table-column>
<el-table-column
prop="qtyToIssue"
header-align="center"
align="right"
min-width="100"
label="申请数量">
<template slot-scope="scope">
<span v-if="editBatchVisible">
<el-input :controls="false" v-model="scope.row.qtyToIssue"
@input="value => scope.row.qtyToIssue = value.match(/^(\d+\.?\d*|\.\d+)$/) ? value : ''"
style="height: 11px; width: 98%;">
</el-input>
</span>
<span v-else>
<span>{{scope.row[scope.column.property]}}</span>
</span>
</template>
</el-table-column>
<el-table-column
v-for="(item,index) in columnList3s" :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>
@ -918,7 +954,8 @@
, getPartListByPaging
, xiadaNotify
, editNotifyMaterial
, deleteNotify
, deleteNotify,
updateNotifyDetail
} from "@/api/orderIssure/soIssueNotify.js"
import {
searchShopOrderByPaging
@ -1385,7 +1422,7 @@
sortLv: 0,
status: true,
fixed: '',
columnWidth: 130
columnWidth: 300
},{
userId: this.$store.state.user.name,
functionId: 701002,
@ -1437,42 +1474,9 @@
status: true,
fixed: '',
columnWidth: 110
},{
userId: this.$store.state.user.name,
functionId: 701002,
serialNumber: '701002Table3QtyToIssue',
tableId: "701002Table3",
tableName: "申请单材料明细表",
columnProp: "qtyToIssue",
headerAlign: "center",
align: "right",
columnLabel: "申请数量",
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 80
},
// {
// userId: this.$store.state.user.name,
// functionId: 701002,
// serialNumber: '701002Table3QtyToIssueOriginal',
// tableId: "701002Table3",
// tableName: "",
// columnProp: "qtyToIssueOriginal",
// headerAlign: "center",
// align: "right",
// columnLabel: "",
// columnHidden: false,
// columnImage: false,
// columnSortable: false,
// sortLv: 0,
// status: true,
// fixed: '',
// columnWidth: 80
// },
],
columnList3s:[
{
userId: this.$store.state.user.name,
functionId: 701002,
@ -2391,6 +2395,8 @@
columnWidth: 170,
},
],
editBatchVisible: false,
saveLoading: false,
}
},
computed: {
@ -2427,6 +2433,37 @@
},
methods: {
//
editBatchModel() {
if (this.currentRow.status !== '草稿') {
this.$message.warning('该类型单据不能编辑!')
return
}
if (this.editBatchVisible) {
this.editBatchVisible = false
} else {
this.editBatchVisible = true
}
},
//
batchModel() {
let params = []
params = this.dataList3
this.saveLoading = true
updateNotifyDetail(params).then(({data}) => {
if (data && data.code === 0) {
this.getNotifyMaterialList()
this.$message.success(data.msg)
this.editBatchVisible = false
} else {
this.$message.error(data.msg)
}
}).finally(() => {
this.saveLoading = false
})
},
//
outboundDetailModal (row) {
console.log(row)
@ -2594,6 +2631,18 @@
});
}
},
getNotifyMaterialList () {
searchNotifyMaterialList(this.currentRow).then(({data}) => {
//
if (data && data.code == 0) {
this.dataList3 = data.rows
} else {
this.dataList3 = []
}
})
},
searchTable(){
this.searchData.limit = this.pageSize
this.searchData.page = this.pageIndex
@ -3502,6 +3551,10 @@
</script>
<style scoped>
/deep/ .customer-tab .el-tabs__content {
padding: 5px !important;
}
.disabled {
cursor: not-allowed !important;
color: #C0C4CC !important;
@ -3547,4 +3600,9 @@
color: #C0C4CC !important;
cursor: not-allowed !important;
}
.el-table /deep/ .cell{
height: auto;
line-height: 1.5;
}
</style>
Loading…
Cancel
Save