Browse Source

shipment修改

master
shenzhouyu 2 months ago
parent
commit
ad1c9bfec2
  1. 6
      src/api/shipment/shipmentIssue.js
  2. 2
      src/views/modules/orderIssure/inboundNotification.vue
  3. 5
      src/views/modules/orderIssure/searchIssureNotify.vue
  4. 383
      src/views/modules/shipment/shipmentIssue.vue
  5. 106
      src/views/modules/shipment/shipmentNotification.vue

6
src/api/shipment/shipmentIssue.js

@ -52,6 +52,10 @@ export const searchNotifyMaterialList = data => createAPI(`/shipmentIssue/search
export const closeInboundNotification = data => createAPI(`/shipmentIssue/closeInboundNotification`,'post',data)
export const getShipmentAndLineForIssure = data => createAPI(`/shipmentIssue/getShipmentAndLineForIssure`,'post',data)
export const saveNewShipmentAndLine = data => createAPI(`/shipmentIssue/saveNewShipmentAndLine`,'post',data)
// ================== rqrq - 发货通知单取消下达功能接口 ==================
// 检查用户是否有未下达的shipment申请单 - rqrq
@ -64,4 +68,4 @@ export const cancelIssueShipment = data => createAPI(`/shipmentIssue/cancelIssue
export const checkShipmentInventory = data => createAPI(`/shipmentIssue/checkShipmentInventory`,'post',data)
// 推送发货通知单库存预览数据至WCS - rqrq
export const pushShipmentInventoryToWcs = data => createAPI(`/shipmentIssue/pushShipmentInventoryToWcs`,'post',data)
export const pushShipmentInventoryToWcs = data => createAPI(`/shipmentIssue/pushShipmentInventoryToWcs`,'post',data)

2
src/views/modules/orderIssure/inboundNotification.vue

@ -36,7 +36,7 @@
</el-date-picker>
</el-form-item>
<el-form-item :label="' '">
<el-button v-if="!authSearch" type="primary" :loading="searchLoading" @click="getDataList()">查询</el-button>
<el-button type="primary" :loading="searchLoading" @click="getDataList()">查询</el-button>
<!-- <el-button v-if="!authDelete" type="primary" @click="deleteModal()">删除</el-button> -->
<!-- <el-button v-if="!authArchive" type="primary" @click="archiveModal()">归档</el-button> -->
</el-form-item>

5
src/views/modules/orderIssure/searchIssureNotify.vue

@ -307,12 +307,14 @@
prop="componentPartNo"
label="物料编码"
sortable
headerAlign="center"
width="120"
align="left">
</el-table-column>
<el-table-column
prop="componentPartDesc"
label="物料描述"
headerAlign="center"
width="200"
align="left"
show-overflow-tooltip>
@ -320,12 +322,14 @@
<el-table-column
prop="qtyRequired"
label="需求数量"
headerAlign="center"
width="100"
align="right">
</el-table-column>
<el-table-column
prop="qtyToIssue"
label="本次申请数量"
headerAlign="center"
width="120"
align="right">
<template slot-scope="scope">
@ -336,6 +340,7 @@
<el-table-column
prop="remark"
label="备注"
headerAlign="center"
width="200"
align="left">
<template slot-scope="scope">

383
src/views/modules/shipment/shipmentIssue.vue

@ -115,18 +115,18 @@
</el-table>
</el-tab-pane> -->
</el-tabs>
<el-dialog title="选择SHIPMENT" :close-on-click-modal="false" v-drag :visible.sync="seqNoModalFlag" width="1000px">
<el-dialog title="选择SHIPMENT" :close-on-click-modal="false" v-drag :visible.sync="seqNoModalFlag" width="1200px">
<el-form :inline="true" label-position="top" style="margin-left: 7px;margin-top: -5px;">
<el-row :gutter="20">
<el-col :span="4">
<el-form-item :label="'shipmentId'">
<el-input v-model="seqNoData.orderNo"></el-input>
<el-input v-model="seqNoData.orderNo" @keyup.enter.native="searchSOSRouting()"></el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item :label="' '">
<el-button type="primary" @click="searchSOSRouting()" class="">查询</el-button>
<el-button type="primary" @click="searchSOSRouting()" class="" :loading="seqNoModalLoading">添加</el-button>
<el-button type="danger" @click="deleteFromSeqNoList()" class="">删除</el-button>
</el-form-item>
</el-col>
</el-row>
@ -137,19 +137,24 @@
: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>
<div v-if="item.columnProp === 'qtyToApply'">
<el-input class="qtyToApplyClass" v-model="scope.row.qtyToApply" style="height: 11px; width: 98%;"
:step="0" :min="0"></el-input>
</div>
<span v-else-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-column fixed="left" header-align="center" align="center" width="80" label="操作">
<!-- <el-table-column fixed="left" header-align="center" align="center" width="80" label="操作">
<template slot-scope="scope">
<el-button type="primary" size="mini" plain class="choose-sos-btn" :loading="chooseLoading"
@click="chooseSOS(scope.row)">选择</el-button>
</template>
</el-table-column>
</el-table-column> -->
</el-table>
<el-footer style="height:40px;margin-top: 10px;text-align:center">
<el-button type="primary" @click="saveNewSoIssueNotify" :loading="saveNewLoading">保存</el-button>
<el-button type="primary" @click="seqNoModalFlag = false">关闭</el-button>
</el-footer>
</el-dialog>
@ -288,7 +293,7 @@
</div>
<el-footer style="height:40px;margin-top: 10px;text-align:center">
<el-button type="primary" @click="saveMaterialDetail()">保存</el-button>
<!-- <el-button type="primary" @click="materialModalFlag=false">关闭</el-button>-->
<!-- <el-button type="primary" @click="materialModalFlag=false">关闭</el-button>-->
</el-footer>
</el-dialog>
@ -466,6 +471,35 @@
<el-button type="primary" @click="showAddNotifyTypeDialog=false">取消</el-button>
</el-footer>
</el-dialog>
<el-dialog title="下达申请单" :close-on-click-modal="false" v-drag :visible.sync="showXiadaNotifyDialog"
width="400px">
<el-form :inline="true" label-position="top" label-width="500px" style="margin-left: 7px;margin-top: -5px;">
<el-row :gutter="20">
<el-col :span="24">
<el-form-item label="要求发料时间">
<el-date-picker
v-model="xiadaNotifyData.planIssueDate"
type="datetime"
value-format="yyyy-MM-dd HH:mm:ss"
format="yyyy-MM-dd HH:mm:ss"
placeholder="选择日期时间"
style="width: 100%">
</el-date-picker>
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="备注" class="issueNotify">
<el-input type="textarea" v-model="xiadaNotifyData.remark" :rows="3" placeholder="请输入内容"
style="width: 100%"></el-input>
</el-form-item>
</el-col>
</el-row>
</el-form>
<el-footer style="height:30px;text-align:center;">
<el-button type="primary" @click="confirmXiadaNotify()">下达</el-button>
<el-button type="primary" @click="showXiadaNotifyDialog=false">取消</el-button>
</el-footer>
</el-dialog>
<Chooselist ref="baseList" @getBaseData="getBaseData"></Chooselist>
</div>
</template>
@ -485,8 +519,11 @@ import {
saveShipmentMaterialDetail,
updateNotifyStatus,
deleteUnissueNotifyHeader,
getShipmentAndLineForIssure,
saveNewShipmentAndLine,
} from '@/api/shipment/shipmentIssue.js'
import Chooselist from '@/views/modules/common/Chooselist_eam'
import { get } from 'lodash'
export default {
name: 'shipmentIssue',
@ -675,7 +712,7 @@ export default {
tableName: '领料申请工单子表',
columnProp: 'itemNo',
headerAlign: 'center',
align: 'right',
align: 'center',
columnLabel: '序号',
columnHidden: false,
columnImage: false,
@ -798,10 +835,10 @@ export default {
{
userId: this.$store.state.user.name,
functionId: 701001,
serialNumber: '701001Table2Orderno',
serialNumber: '701001Table2ShipmentId',
tableId: '701001Table2',
tableName: '查询派工单',
columnProp: 'SHIPMENT_ID',
columnProp: 'shipmentId',
headerAlign: 'center',
align: 'center',
columnLabel: 'SHIPMENTID',
@ -811,145 +848,144 @@ export default {
sortLv: 0,
status: true,
fixed: '',
columnWidth: 120,
columnWidth: 100,
},
/* {
{
userId: this.$store.state.user.name,
functionId: 701001,
serialNumber: '701001Table2Itemno',
serialNumber: '701001Table2InventoryUom',
tableId: '701001Table2',
tableName: '查询派工单',
columnProp: 'itemNo',
columnProp: 'inventoryUom',
headerAlign: 'center',
align: 'right',
columnLabel: '工序',
align: 'center',
columnLabel: '单位',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 50,
columnWidth: 60,
},
{
userId: this.$store.state.user.name,
functionId: 701001,
serialNumber: '701001Table2ItemDesc',
serialNumber: '701001Table2InventoryPartNo',
tableId: '701001Table2',
tableName: '查询派工单',
columnProp: 'itemDesc',
columnProp: 'inventoryPartNo',
headerAlign: 'center',
align: 'left',
columnLabel: '工序名称',
columnLabel: '库存物料号',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 100,
}, */
columnWidth: 120,
},
{
userId: this.$store.state.user.name,
functionId: 701001,
serialNumber: '701001Table2PartNo',
serialNumber: '701001Table2ShipmentLineNo',
tableId: '701001Table2',
tableName: '查询派工单',
columnProp: 'STATE',
columnProp: 'shipmentLineNo',
headerAlign: 'center',
align: 'left',
columnLabel: '状态',
align: 'right',
columnLabel: '行号',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 80,
columnWidth: 60,
},
{
userId: this.$store.state.user.name,
functionId: 701001,
serialNumber: '701001Table2PartNo',
serialNumber: '701001Table2InventoryQty',
tableId: '701001Table2',
tableName: '查询派工单',
columnProp: 'RECEIVER_ADDRESS_NAME',
columnProp: 'inventoryQty',
headerAlign: 'center',
align: 'left',
columnLabel: '客户',
align: 'right',
columnLabel: '库存数量',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 120,
showOverflowTooltip: true,
columnWidth: 100,
},
{
userId: this.$store.state.user.name,
functionId: 701001,
serialNumber: '701001Table2Qtyrequired',
serialNumber: '701001Table2QtyAssigned',
tableId: '701001Table2',
tableName: '查询派工单',
columnProp: 'SHIPMENT_TYPE',
columnProp: 'qtyAssigned',
headerAlign: 'center',
align: 'center',
columnLabel: 'SHIPMENT类型',
align: 'right',
columnLabel: '已分配数量',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 80,
columnWidth: 100,
},
{
userId: this.$store.state.user.name,
functionId: 701001,
serialNumber: '701001Table2Qtyreported',
serialNumber: '701001Table2QtyToApply',
tableId: '701001Table2',
tableName: '查询派工单',
columnProp: 'CREATED_DATE',
columnProp: 'qtyToApply',
headerAlign: 'center',
align: 'left',
columnLabel: '创建时间',
align: 'right',
columnLabel: '本次申请数量',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 80,
columnWidth: 100,
},
{
userId: this.$store.state.user.name,
functionId: 701001,
serialNumber: '701001Table2SScheduleddate',
serialNumber: '701001Table2State',
tableId: '701001Table2',
tableName: '查询工单',
columnProp: 'PLANNED_SHIP_DATE',
tableName: '查询工单',
columnProp: 'state',
headerAlign: 'center',
align: 'left',
columnLabel: '计划运输时间',
columnLabel: '状态',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 100,
columnWidth: 80,
},
{
userId: this.$store.state.user.name,
functionId: 701001,
serialNumber: '701001Table2SScheduleddate',
serialNumber: '701001Table2NextStepFlow',
tableId: '701001Table2',
tableName: '查询工单',
columnProp: 'PLANNED_DELIVERY_DATE',
tableName: '查询工单',
columnProp: 'nextStepFlow',
headerAlign: 'center',
align: 'left',
columnLabel: '计划交付时间',
columnLabel: '下一步流程',
columnHidden: false,
columnImage: false,
columnSortable: false,
@ -958,70 +994,71 @@ export default {
fixed: '',
columnWidth: 100,
},
/* {
{
userId: this.$store.state.user.name,
functionId: 701001,
serialNumber: '701001Table2SWorkcenterno',
serialNumber: '701001Table2ReceiverType',
tableId: '701001Table2',
tableName: '查询派工单',
columnProp: 'sWorkCenterNo',
columnProp: 'receiverType',
headerAlign: 'center',
align: 'left',
columnLabel: '加工中心编码',
columnLabel: '接收方类型',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 80,
columnWidth: 100,
},
{
userId: this.$store.state.user.name,
functionId: 701001,
serialNumber: '701001Table2WorkCenterDesc',
serialNumber: '701001Table2ReceiverAddressName',
tableId: '701001Table2',
tableName: '查询工单',
columnProp: 'workCenterDesc',
tableName: '查询工单',
columnProp: 'receiverAddressName',
headerAlign: 'center',
align: 'left',
columnLabel: '加工中心名称',
columnLabel: '接收方地址名称',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 100,
columnWidth: 150,
showOverflowTooltip: true,
},
{
userId: this.$store.state.user.name,
functionId: 701001,
serialNumber: '701001Table2SResourceid',
serialNumber: '701001Table2ShipmentType',
tableId: '701001Table2',
tableName: '查询派工单',
columnProp: 'sResourceID',
columnProp: 'shipmentType',
headerAlign: 'center',
align: 'left',
columnLabel: '机台编码',
align: 'center',
columnLabel: '运输类型',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 60,
columnWidth: 80,
},
{
userId: this.$store.state.user.name,
functionId: 701001,
serialNumber: '701001Table2ResourceDesc',
serialNumber: '701001Table2PlannedShipDate',
tableId: '701001Table2',
tableName: '查询派工单',
columnProp: 'resourceDesc',
columnProp: 'plannedShipDate',
headerAlign: 'center',
align: 'left',
columnLabel: '机台名称',
align: 'center',
columnLabel: '计划运输时间',
columnHidden: false,
columnImage: false,
columnSortable: false,
@ -1033,13 +1070,13 @@ export default {
{
userId: this.$store.state.user.name,
functionId: 701001,
serialNumber: '701001Table2OperatorDesc',
serialNumber: '701001Table2PlannedDeliveryDate',
tableId: '701001Table2',
tableName: '查询派工单',
columnProp: 'operatorDesc',
columnProp: 'plannedDeliveryDate',
headerAlign: 'center',
align: 'left',
columnLabel: '操作员',
align: 'center',
columnLabel: '计划交付时间',
columnHidden: false,
columnImage: false,
columnSortable: false,
@ -1047,7 +1084,7 @@ export default {
status: true,
fixed: '',
columnWidth: 100,
},*/
},
],
columnList3: [
{
@ -1062,7 +1099,7 @@ export default {
columnLabel: '物料编码',
columnHidden: false,
columnImage: false,
columnSortable: false,
columnSortable: true,
sortLv: 0,
status: true,
fixed: '',
@ -1256,13 +1293,20 @@ export default {
selectedNotifyType: 'production',
selectedNotifyRemark: '',
chooseLoading: false,
seqNoModalLoading: false,
saveNewLoading: false,
showXiadaNotifyDialog: false,
xiadaNotifyData: {
planIssueDate: '',
remark: '',
},
}
},
mounted() {
/* this.$nextTick(() => {
this.height = window.innerHeight - 300
}) */
this.$nextTick(() => {
this.height = window.innerHeight - 230
})
},
created() {
@ -1546,6 +1590,45 @@ export default {
this.chooseLoading = false
})
},
saveNewSoIssueNotify() {
for (let i = 0; i < this.seqNoList.length; i++) {
if (
this.seqNoList[i].qtyToApply === '' ||
this.seqNoList[i].qtyToApply == null
) {
this.seqNoList[i].qtyToApply = 0
}
this.seqNoList[i].notifyNo = this.notifyNo
this.seqNoList[i].site = this.$store.state.user.site
}
let materialList = this.seqNoList.filter((item) => item.qtyToApply > 0)
if (materialList.length == 0) {
this.$alert('没有需要保存的内容!', '提示', {
confirmButtonText: '确定',
})
return false
}
console.log('this.sobomList', materialList)
var savaNotify = {
site: this.$store.state.user.site,
notifyNo: this.notifyNo,
userName: this.$store.state.user.name,
materialList: materialList,
}
this.saveNewLoading = true
saveNewShipmentAndLine(savaNotify).then(({ data }) => {
if (data.code === 0) {
this.seqNoModalFlag = false
this.getUserNotifyNo()
this.$message.success('操作成功')
} else {
this.$message.error(data.msg)
}
}).finally(() => {
this.saveNewLoading = false
})
},
saveSOS() {
if (
this.notifyOrderData.needDate == null ||
@ -1593,8 +1676,8 @@ export default {
saveShipmentOrderList(inData).then(({ data }) => {
if (data.code === 0) {
this.saveSeqNoModalFlag = false;
(() => {
this.saveSeqNoModalFlag = false
;(() => {
//
row.itemNo = data.itemNo
})()
@ -1693,14 +1776,74 @@ export default {
operatorId: '',
}
//this.searchSOSRouting()
this.seqNoList = []
this.seqNoModalFlag = true
},
searchSOSRouting() {
getShipmentListForIssure(this.seqNoData).then(({ data }) => {
if (this.seqNoData.orderNo == null || this.seqNoData.orderNo == '') {
this.$message.warning('请输入shipmentid!')
return false
}
if (!this.seqNoList) {
this.seqNoList = []
}
// this.seqNoListorderNo
const orderNoExists = this.seqNoList.some(row => row.shipmentId === this.seqNoData.orderNo)
if (orderNoExists) {
this.$message.warning('该shipmentId的数据已存在,请先删除再添加!')
return false
}
const dataListExists = this.dataList.some(row => row.soorderNo === this.seqNoData.orderNo)
if (dataListExists) {
this.$message.warning('该shipmentId的数据已添加过,请先删除再添加!')
return false
}
this.seqNoModalLoading = true
getShipmentAndLineForIssure(this.seqNoData).then(({ data }) => {
if (data.code === 0) {
this.seqNoList = data.rows
}
// this.seqNoList
data.rows.forEach((newRow) => {
// - -
const inventoryQty = parseFloat(newRow.inventoryQty) || 0
const qtyAssigned = parseFloat(newRow.qtyAssigned) || 0
const qtyToApply = inventoryQty - qtyAssigned
this.$set(
newRow,
'qtyToApply',
qtyToApply > 0 ? qtyToApply : 0
)
//
this.seqNoList.push(newRow)
})
this.$message.success(`成功添加 ${data.rows.length} 条数据`)
}else {
this.$message.error(data.msg)
}
}).catch((e) => {
this.$message.error(e.msg || '查询失败')
return
}).finally(() => {
this.seqNoModalLoading = false
})
},
deleteFromSeqNoList() {
if (!this.seqNoData.orderNo || this.seqNoData.orderNo.trim() === '') {
this.$message.warning('请输入shipmentId')
return
}
const orderNo = this.seqNoData.orderNo.trim()
const originalLength = this.seqNoList.length
// shipmentId orderNo
this.seqNoList = this.seqNoList.filter((item) => {
return item.shipmentId !== orderNo
})
const deletedCount = originalLength - this.seqNoList.length
if (deletedCount > 0) {
this.$message.success(`成功删除 ${deletedCount} 条数据`)
} else {
this.$message.warning('未找到匹配的数据')
}
},
saveMaterialDetail() {
for (let i = 0; i < this.sobomList.length; i++) {
@ -1721,7 +1864,6 @@ export default {
saveShipmentMaterialDetail(materialList).then(({ data }) => {
if (data.code === 0) {
this.materialModalFlag = false
this.chooseSOSModal()
this.$message.success('操作成功')
} else {
this.$alert(data.msg, '错误', {
@ -1849,38 +1991,56 @@ export default {
})
},
xiadaNotifyModel() {
//
if (
this.dataList.length == 0 &&
this.dataList2.length == 0 &&
this.dataList3.length == 0
this.dataList.length == 0
) {
this.$alert('没有明细记录无法下达!!', '提示', {
confirmButtonText: '确定',
})
return false
}
this.$confirm('确定下达' + '?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
}).then(() => {
updateNotifyStatus(this.notifyData)
.then(({ data }) => {
if (data.code === 0) {
this.$message.success('下达成功')
this.getUserNotifyNo()
}
})
.catch(() => {
this.$message.error(data.msg)
})
})
/* checkPartStock(this.notifyData).then(({ data }) => {
//
this.xiadaNotifyData = {
planIssueDate: this.notifyData.planIssueDate || this.dayjs().format('YYYY-MM-DD HH:mm:ss'),
remark: this.notifyData.remark || '',
}
//
this.showXiadaNotifyDialog = true
},
confirmXiadaNotify() {
if (
this.dataList.length == 0
) {
this.$alert('没有明细记录无法下达!!', '提示', {
confirmButtonText: '确定',
})
return false
}
//
if (!this.xiadaNotifyData.planIssueDate || this.xiadaNotifyData.planIssueDate === '') {
this.$message.warning('请选择要求发料时间!')
return false
}
//
const notifyData = {
...this.notifyData,
planIssueDate: this.xiadaNotifyData.planIssueDate,
remark: this.xiadaNotifyData.remark,
}
//
updateNotifyStatus(notifyData).then(({ data }) => {
if (data.code === 0) {
this.xiadaList = data.rows
this.showXiadaNotifyDialog = false
this.xiadaModelFlag = false
this.getUserNotifyNo()
this.$message.success('操作成功')
} else {
this.$alert(data.msg, '错误', {
confirmButtonText: '确定',
})
}
}) */
//this.xiadaModelFlag = true
})
},
xiadaNotify() {
xiadaNotify(this.notifyData).then(({ data }) => {
@ -2155,6 +2315,9 @@ export default {
font-size: 12px;
height: 20px;
}
.qtyToApplyClass /deep/.el-input__inner {
height: 14px !important;
}
</style>
<style scoped>
/* 选择工单弹窗:紧凑表格与按钮样式 */

106
src/views/modules/shipment/shipmentNotification.vue

@ -7,10 +7,8 @@
</el-form-item>
<el-form-item :label="'单据状态'">
<el-select multiple collapse-tags v-model="searchData.orderStatusList" clearable style="width: 160px">
<el-option label="草稿" value="UNISSUE"></el-option>
<el-option label="已下达" value="ISSUE"></el-option>
<el-option label="已完成" value="FINISH"></el-option>
<el-option label="已关闭" value="CLOSED"></el-option>
<el-option label="ISSUE" value="ISSUE"></el-option>
<el-option label="CLOSED" value="CLOSED"></el-option>
</el-select>
</el-form-item>
<el-form-item :label="'申请单日期'">
@ -35,7 +33,7 @@
<!-- 展示列表 -->
<el-table :height="height" :data="dataList" border v-loading="searchLoading" ref="inboundTable"
:row-style="rowStyle" @row-click="inboundClickRow" @current-change="changeCurrentRow"
@selection-change="selectionInbound" style="width: 100%;">
style="width: 100%;">
<el-table-column type="selection" header-align="center" align="center" width="50">
</el-table-column>
<el-table-column v-for="(item,index) in columnList" :key="index" :sortable="item.columnSortable"
@ -121,14 +119,14 @@
<!-- 页签 -->
<el-tabs v-model="activeTable" style="width: 100%" :style="{height: secondHeight + 'px'}" type="border-card"
@tab-click="tabClick" class="customer-tab">
<el-tab-pane label="入库明细" name="inboundDetail">
<el-tab-pane label="已申请SHIPMENT" name="inboundDetail">
<!-- <el-form label-position="top" style="margin-left: 2px;">
<el-button type="primary" @click="deleteInboundDetail()" icon="el-icon-delete">删除</el-button>
</el-form> -->
<el-table :data="detailList" :height="secondHeight - 68" border @selection-change="selectionInboundDetail"
v-loading="searchLoading" style="width: 100%;">
<el-table-column type="selection" header-align="center" align="center" width="50">
</el-table-column>
<!-- <el-table-column type="selection" header-align="center" align="center" width="50">
</el-table-column> -->
<el-table-column v-for="(item,index) in columnDetailList" :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"
@ -166,9 +164,10 @@
</el-table-column>
<el-table-column prop="actualStockInQty" header-align="center" align="right" min-width="100" label="实际入库数量">
</el-table-column> -->
<el-table-column fixed="right" header-align="center" align="center" width="90" label="操作">
<el-table-column fixed="right" header-align="center" align="center" width="150" label="操作">
<template slot-scope="scope">
<el-link style="cursor: pointer" @click="enterSOSDetail(scope.row)">发料明细</el-link>
<a type="text" size="small" @click="enterSOSDetail(scope.row)">修改</a>
<a type="text" size="small" @click="deleteNotifySOS(scope.row)" style="margin-left: 10px;">删除</a>
</template>
</el-table-column>
</el-table>
@ -482,9 +481,9 @@
: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">
<div v-if="item.columnProp === 'qtyToUnissue'">
<el-input v-model="scope.row.qtyToUnissue" style="height: 11px; width: 98%;" :step="0" :min="0"></el-input>
<template slot-scope="scope">
<div v-if="item.columnProp === 'qtyToIssue'">
<el-input v-model="scope.row.qtyToIssue" style="height: 11px; width: 98%;" :step="0" :min="0"></el-input>
</div>
<div v-else-if="item.columnProp === 'remark'">
<el-input v-model="scope.row.remark" style="padding: 0;width: 100%"></el-input>
@ -495,11 +494,12 @@
style="width: 100px; height: 80px" /></span>
</div>
</template> -->
</template>
</el-table-column>
</el-table>
</div>
<el-footer style="height:40px;margin-top: 10px;text-align:center">
<el-button type="primary" @click="saveMaterialDetail()">保存</el-button>
<el-button type="primary" @click="materialModalFlag=false">关闭</el-button>
</el-footer>
</el-dialog>
@ -563,7 +563,10 @@ import {
checkUserHasUnissueShipment,
cancelIssueShipment,
checkShipmentInventory,
pushShipmentInventoryToWcs
pushShipmentInventoryToWcs,
deleteNotifyUnissue,
saveShipmentMaterialDetail,
searchUnissueNotifyMaterialList
} from '@/api/shipment/shipmentIssue.js'
import Chooselist from '@/views/modules/common/Chooselist_eam'
import { getChooselist } from '@/api/chooselist/chooselist.js'
@ -1109,6 +1112,24 @@ export default {
fixed: '',
columnWidth: 120,
},
{
userId: this.$store.state.user.name,
functionId: 701001,
serialNumber: '701001Table3QtyToIssue',
tableId: '701001Table3',
tableName: '领料申请BOM子表',
columnProp: 'qtyOnHand',
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: 701001,
@ -2197,6 +2218,33 @@ export default {
this.tempWareHouseRow = row
this.getBaseList(20)
},
saveMaterialDetail() {
for (let i = 0; i < this.sobomList.length; i++) {
this.sobomList[i].notifyNo = this.currentRow.notifyNo
this.sobomList[i].site = this.$store.state.user.site
this.sobomList[i].bomItemNo =
this.sobomList[i].lineItemNo || this.sobomList[i].bomItemNo
}
let materialList = this.sobomList.filter((item) => item.qtyToIssue > 0)
if (materialList.length == 0) {
this.$alert('没有需要保存的内容!', '提示', {
confirmButtonText: '确定',
})
return false
}
console.log('this.sobomList', materialList)
saveShipmentMaterialDetail(materialList).then(({ data }) => {
if (data.code === 0) {
this.materialModalFlag = false
this.$message.success('操作成功')
} else {
this.$alert(data.msg, '错误', {
confirmButtonText: '确定',
})
}
})
},
// S
getBaseList(val, type) {
@ -2280,7 +2328,7 @@ export default {
searchUnissueNotifyMaterialList(row){
this.bomLoadFlag = true
this.materialModalFlag = true
searchNotifyMaterialList(row).then(({ data }) => {
searchUnissueNotifyMaterialList(row).then(({ data }) => {
if (data.code === 0) {
this.sobomList = data.rows
}
@ -2288,6 +2336,32 @@ export default {
this.bomLoadFlag = false
})
},
//
deleteNotifySOS(row) {
this.$confirm(`是否删除这个工单的申请信息?`, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
})
.then(() => {
deleteNotifyUnissue(row).then(({ data }) => {
if (data && data.code === 0) {
this.getNotifyNoDetail()
this.$message({
message: '操作成功',
type: 'success',
duration: 1500,
onClose: () => {},
})
} else {
this.$alert(data.msg, '错误', {
confirmButtonText: '确定',
})
}
})
})
.catch(() => {})
},
// tableDefault
async getColumnList(tableId, columnId) {

Loading…
Cancel
Save