Browse Source

老页面复用问题

dev
常熟吴彦祖 2 weeks ago
parent
commit
6e58c02505
  1. 4
      src/api/haianWarehouse/noOrderIssueNotify.js
  2. 240
      src/views/modules/haianWarehouse/noOrderIssue/noOrderNotification54.vue

4
src/api/haianWarehouse/noOrderIssueNotify.js

@ -38,3 +38,7 @@ export { searchOtherPart } from '@/api/orderIssure/soIssueNotify.js'
// 海安无单指定策略接口:维护单行物料的批次/标签指定分配层 - rqrq // 海安无单指定策略接口:维护单行物料的批次/标签指定分配层 - rqrq
export const getNoOrderMaterialAllocList = (data) => createAPI('/autoWareHourceHaian/haiAnIssureNotify/getNoOrderMaterialAllocList', 'post', data) export const getNoOrderMaterialAllocList = (data) => createAPI('/autoWareHourceHaian/haiAnIssureNotify/getNoOrderMaterialAllocList', 'post', data)
export const saveNoOrderMaterialAllocList = (data) => createAPI('/autoWareHourceHaian/haiAnIssureNotify/saveNoOrderMaterialAllocList', 'post', data) export const saveNoOrderMaterialAllocList = (data) => createAPI('/autoWareHourceHaian/haiAnIssureNotify/saveNoOrderMaterialAllocList', 'post', data)
// 海安无单指定弹窗:查询未预留且托盘在库可调用的标签清单,供双击回填 - rqrq
export const getNoOrderAvailableInStockLabelList = (data) => createAPI('/autoWareHourceHaian/haiAnIssureNotify/getNoOrderAvailableInStockLabelList', 'post', data)
// 海安无单查看页:按申请单查询指定物料清单(不含备注) - rqrq
export const getNoOrderMaterialAllocListByNotifyNo = (data) => createAPI('/autoWareHourceHaian/haiAnIssureNotify/getNoOrderMaterialAllocListByNotifyNo', 'post', data)

240
src/views/modules/haianWarehouse/noOrderIssue/noOrderNotification54.vue

@ -183,6 +183,29 @@
</el-table-column> </el-table-column>
</el-table> </el-table>
</el-tab-pane> </el-tab-pane>
<!-- rqrq - 指定物料清单页签展示当前申请单已保存的标签/批次指定不含备注 -->
<el-tab-pane label="指定物料清单" name="allocDetail">
<el-table
:data="allocDetailList"
:height="secondHeight - 68"
border
v-loading="allocDetailLoading"
style="width: 100%;">
<el-table-column prop="itemNo" label="订单序号" width="90" header-align="center" align="right"></el-table-column>
<el-table-column prop="soorderNo" label="订单号" min-width="130" header-align="center" align="center"></el-table-column>
<el-table-column label="bom行号" width="90" header-align="center" align="right">
<template slot-scope="scope">
<span>{{ scope.row.bOMItemNo || scope.row.bomItemNo || scope.row.BOMItemNo }}</span>
</template>
</el-table-column>
<el-table-column prop="partNo" label="物料编码" min-width="150" header-align="center" align="center"></el-table-column>
<el-table-column prop="allocSeq" label="指定序号" width="90" header-align="center" align="right"></el-table-column>
<el-table-column prop="allocTypeName" label="指定类型" width="90" header-align="center" align="center"></el-table-column>
<el-table-column prop="serialNo" label="标签号" min-width="160" header-align="center" align="center"></el-table-column>
<el-table-column prop="batchNo" label="批次号" min-width="140" header-align="center" align="center"></el-table-column>
<el-table-column prop="allocQty" label="指定数量" width="100" header-align="center" align="right"></el-table-column>
</el-table>
</el-tab-pane>
<el-tab-pane label="预留标签清单" name="labelDetail"> <el-tab-pane label="预留标签清单" name="labelDetail">
<el-table <el-table
:data="dataList7" :data="dataList7"
@ -690,6 +713,10 @@
<el-form-item label="子站点"> <el-form-item label="子站点">
<el-input v-model="noOrderAllocForm.subSite" disabled style="width: 100px"></el-input> <el-input v-model="noOrderAllocForm.subSite" disabled style="width: 100px"></el-input>
</el-form-item> </el-form-item>
<!-- rqrq - 申请数量取当前物料行haian_SOIssueNotifyOrderMaterialList.qty_to_issue仅展示不编辑 -->
<el-form-item label="申请数量">
<el-input v-model="noOrderAllocForm.qtyToIssue" disabled style="width: 120px"></el-input>
</el-form-item>
</el-form> </el-form>
<div style="margin-bottom: 10px;"> <div style="margin-bottom: 10px;">
<el-button type="primary" size="small" @click="addNoOrderAllocRow('LABEL')">新增标签指定</el-button> <el-button type="primary" size="small" @click="addNoOrderAllocRow('LABEL')">新增标签指定</el-button>
@ -705,27 +732,42 @@
</el-table-column> </el-table-column>
<el-table-column label="标签号" min-width="160" align="center"> <el-table-column label="标签号" min-width="160" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<el-input v-if="scope.row.allocType === 'LABEL'" v-model="scope.row.serialNo" placeholder="请输入标签号"></el-input>
<!-- rqrq - 标签指定禁止手填点击打开在库可用标签清单 -->
<el-input
v-if="scope.row.allocType === 'LABEL'"
v-model="scope.row.serialNo"
readonly
placeholder="点击选择标签"
@click.native="openNoOrderAvailableLabelDialog(scope.$index, 'LABEL')">
</el-input>
<span v-else>-</span> <span v-else>-</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="批次号" min-width="140" align="center"> <el-table-column label="批次号" min-width="140" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<el-input v-if="scope.row.allocType === 'BATCH'" v-model="scope.row.batchNo" placeholder="请输入批次号"></el-input>
<!-- rqrq - 批次指定同样从在库标签清单双击回填禁止手填 -->
<el-input
v-if="scope.row.allocType === 'BATCH'"
v-model="scope.row.batchNo"
readonly
placeholder="点击选择批次"
@click.native="openNoOrderAvailableLabelDialog(scope.$index, 'BATCH')">
</el-input>
<span v-else>-</span> <span v-else>-</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="指定数量" width="120" align="center"> <el-table-column label="指定数量" width="120" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<el-input v-model="scope.row.allocQty" type="number" :min="0"></el-input>
<!-- rqrq - 标签指定数量锁定为所选标签数量批次指定允许改数量 -->
<el-input v-model="scope.row.allocQty" type="number" :min="0" :disabled="scope.row.allocType === 'LABEL'"></el-input>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="备注" min-width="120" align="center">
<template slot-scope="scope">
<el-input v-model="scope.row.remark"></el-input>
</template>
</el-table-column>
<el-table-column fixed="right" label="操作" width="150" align="center">
<!-- <el-table-column label="备注" min-width="120" align="center">-->
<!-- <template slot-scope="scope">-->
<!-- <el-input v-model="scope.row.remark"></el-input>-->
<!-- </template>-->
<!-- </el-table-column>-->
<el-table-column fixed="right" label="操作" width="200" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button type="text" size="small" @click="moveNoOrderAllocRow(scope.$index, -1)">上移</el-button> <el-button type="text" size="small" @click="moveNoOrderAllocRow(scope.$index, -1)">上移</el-button>
<el-button type="text" size="small" @click="moveNoOrderAllocRow(scope.$index, 1)">下移</el-button> <el-button type="text" size="small" @click="moveNoOrderAllocRow(scope.$index, 1)">下移</el-button>
@ -734,8 +776,36 @@
</el-table-column> </el-table-column>
</el-table> </el-table>
<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" :loading="noOrderAllocSaving" @click="saveNoOrderMaterialAlloc">保存</el-button>
<el-button @click="noOrderAllocDialogVisible = false">关闭</el-button>
<el-button type="primary" :loading="noOrderAllocSaving" :disabled="noOrderAllocSaving" @click="saveNoOrderMaterialAlloc">保存</el-button>
<el-button :disabled="noOrderAllocSaving" @click="noOrderAllocDialogVisible = false">关闭</el-button>
</el-footer>
</el-dialog>
<!-- rqrq - 在库可用标签选择弹窗双击回填指定行的标签号或批次号 -->
<el-dialog
:title="noOrderLabelPickMode === 'BATCH' ? '选择批次' : '选择标签'"
:close-on-click-modal="false"
append-to-body
v-drag
:visible.sync="noOrderLabelPickDialogVisible"
width="980px">
<el-table
:data="noOrderLabelPickList"
border
highlight-current-row
height="420px"
v-loading="noOrderLabelPickLoading"
@row-dblclick="handleNoOrderAvailableLabelDblClick"
style="width: 100%;">
<el-table-column prop="serialNo" label="标签号" min-width="160" align="center"></el-table-column>
<el-table-column prop="qty" label="数量" width="90" align="center"></el-table-column>
<el-table-column prop="batchNo" label="批次号" min-width="140" align="center"></el-table-column>
<el-table-column prop="receiveDate" label="接收日期" min-width="160" align="center"></el-table-column>
<el-table-column prop="expiredDate" label="失效日期" min-width="160" align="center"></el-table-column>
<el-table-column prop="wdr" label="WDR" min-width="100" align="center"></el-table-column>
</el-table>
<el-footer style="height:40px;margin-top: 10px;text-align:center">
<el-button @click="noOrderLabelPickDialogVisible = false">关闭</el-button>
</el-footer> </el-footer>
</el-dialog> </el-dialog>
@ -822,7 +892,9 @@ import {
searchMaterialListDetail, // rqrq - API searchMaterialListDetail, // rqrq - API
deleteNotifySOS, // rqrq - API deleteNotifySOS, // rqrq - API
getNoOrderMaterialAllocList, getNoOrderMaterialAllocList,
saveNoOrderMaterialAllocList
saveNoOrderMaterialAllocList,
getNoOrderAvailableInStockLabelList,
getNoOrderMaterialAllocListByNotifyNo
} from '@/api/haianWarehouse/noOrderIssueNotify.js' } from '@/api/haianWarehouse/noOrderIssueNotify.js'
import { import {
getSiteAndBuByUserName, getSiteAndBuByUserName,
@ -1546,24 +1618,6 @@ export default {
fixed: false, fixed: false,
columnWidth: 80, columnWidth: 80,
}, },
{
userId: this.$store.state.user.name,
functionId: 444002,
serialNumber: '555001Table1NeedDate',
tableId: '555001Table1',
tableName: '领料申请派工单子表',
columnProp: 'needDate',
headerAlign: 'center',
align: 'left',
columnLabel: '要求发料时间',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: false,
columnWidth: 80,
},
{ {
userId: this.$store.state.user.name, userId: this.$store.state.user.name,
functionId: 444002, functionId: 444002,
@ -1638,6 +1692,9 @@ export default {
}, },
], ],
columnDetailList2:[], columnDetailList2:[],
// rqrq -
allocDetailList: [],
allocDetailLoading: false,
// rqrq - // rqrq -
dataList7: [], dataList7: [],
columnList6: [ columnList6: [
@ -1831,8 +1888,15 @@ export default {
partNo: '', partNo: '',
partDesc: '', partDesc: '',
subSite: '', subSite: '',
qtyToIssue: 0,
allocList: [] allocList: []
}, },
// - rqrq
noOrderLabelPickDialogVisible: false,
noOrderLabelPickLoading: false,
noOrderLabelPickList: [],
noOrderLabelPickIndex: -1,
noOrderLabelPickMode: 'LABEL',
availableMaterialList: [], // availableMaterialList: [], //
selectedMaterialList: [], // selectedMaterialList: [], //
availableMaterialSelections: [], // availableMaterialSelections: [], //
@ -2214,12 +2278,46 @@ export default {
if (this.activeTable === 'inboundDetail') { if (this.activeTable === 'inboundDetail') {
// - rqrq // - rqrq
this.getNotifyNoOrderDetailByType() this.getNotifyNoOrderDetailByType()
} else if (this.activeTable === 'allocDetail') {
// - rqrq
this.searchNoOrderMaterialAllocListByNotifyNo()
} else if (this.activeTable === 'labelDetail') { } else if (this.activeTable === 'labelDetail') {
// - rqrq // - rqrq
this.searchMaterialListDetail() this.searchMaterialListDetail()
} }
}, },
/**
* 查询当前申请单指定物料清单按site+notifyNo拉取全部指定行不含备注 - rqrq
*/
searchNoOrderMaterialAllocListByNotifyNo() {
if (!this.currentRow || !this.currentRow.notifyNo) {
this.allocDetailList = []
return
}
this.allocDetailLoading = true
getNoOrderMaterialAllocListByNotifyNo({
site: this.currentRow.site || this.$store.state.user.site,
notifyNo: this.currentRow.notifyNo,
page: 1,
limit: 20
}).then(({ data }) => {
if (data && data.code === 0) {
this.allocDetailList = data.rows || []
} else {
this.allocDetailList = []
if (data && data.msg) {
this.$alert(data.msg, '提示', { confirmButtonText: '确定' })
}
}
}).catch((error) => {
this.allocDetailList = []
this.$message.error(error.message || '查询指定物料清单失败')
}).finally(() => {
this.allocDetailLoading = false
})
},
// rqrq - // rqrq -
searchMaterialListDetail() { searchMaterialListDetail() {
if (!this.currentRow || !this.currentRow.notifyNo) { if (!this.currentRow || !this.currentRow.notifyNo) {
@ -2667,6 +2765,7 @@ export default {
partNo: row.partNo || row.componentPartNo || '', partNo: row.partNo || row.componentPartNo || '',
partDesc: row.partDesc || row.componentPartDesc || '', partDesc: row.partDesc || row.componentPartDesc || '',
subSite: row.subSite || (this.clickrow && this.clickrow.subSite) || this.$store.state.user.site, subSite: row.subSite || (this.clickrow && this.clickrow.subSite) || this.$store.state.user.site,
qtyToIssue: row.qtyToIssue == null || row.qtyToIssue === '' ? 0 : row.qtyToIssue,
allocList: [] allocList: []
} }
this.noOrderAllocDialogVisible = true this.noOrderAllocDialogVisible = true
@ -2705,6 +2804,77 @@ export default {
this.refreshNoOrderAllocRowNo() this.refreshNoOrderAllocRowNo()
}, },
/**
* 打开在库可用标签清单按当前指定行的subsite+物料号查询未预留且托盘可调用标签 - rqrq
* @param index 当前指定策略行下标
* @param pickMode LABEL回填标签号BATCH回填批次号
*/
openNoOrderAvailableLabelDialog (index, pickMode) {
if (!this.noOrderAllocForm.subSite) {
this.$alert('缺少子站点,无法查询在库标签', '提示', { confirmButtonText: '确定' })
return
}
if (!this.noOrderAllocForm.partNo) {
this.$alert('缺少物料号,无法查询在库标签', '提示', { confirmButtonText: '确定' })
return
}
this.noOrderLabelPickIndex = index
this.noOrderLabelPickMode = pickMode
this.noOrderLabelPickList = []
this.noOrderLabelPickDialogVisible = true
this.noOrderLabelPickLoading = true
// sitestoresubSite+partNo - rqrq
getNoOrderAvailableInStockLabelList({
site: this.$store.state.user.site,
subSite: this.noOrderAllocForm.subSite,
partNo: this.noOrderAllocForm.partNo,
page: 1,
limit: 20
}).then(({ data }) => {
if (data && data.code === 0) {
this.noOrderLabelPickList = data.rows || []
} else {
this.noOrderLabelPickList = []
this.$alert((data && data.msg) || '查询在库可用标签失败', '提示', { confirmButtonText: '确定' })
}
}).catch((error) => {
this.noOrderLabelPickList = []
this.$message.error(error.message || '查询在库可用标签失败')
}).finally(() => {
this.noOrderLabelPickLoading = false
})
},
/**
* 双击在库标签标签指定回填标签号并锁定数量批次指定回填批次号且数量默认可改 - rqrq
*/
handleNoOrderAvailableLabelDblClick (row) {
const target = this.noOrderAllocForm.allocList[this.noOrderLabelPickIndex]
if (!target) {
this.$message.warning('未找到待回填的指定行')
return
}
const labelQty = row.qty == null || row.qty === '' ? 0 : row.qty
if (this.noOrderLabelPickMode === 'LABEL') {
if (!row.serialNo) {
this.$alert('所选行缺少标签号,无法指定', '提示', { confirmButtonText: '确定' })
return
}
target.serialNo = row.serialNo
target.batchNo = ''
target.allocQty = labelQty
} else {
if (!row.batchNo) {
this.$alert('所选标签缺少批次号,无法指定批次', '提示', { confirmButtonText: '确定' })
return
}
target.serialNo = ''
target.batchNo = row.batchNo
target.allocQty = labelQty
}
this.noOrderLabelPickDialogVisible = false
},
/** /**
* 删除指定策略行删除后重排序号 - rqrq * 删除指定策略行删除后重排序号 - rqrq
*/ */
@ -3242,7 +3412,7 @@ export default {
previewInventory () { previewInventory () {
this.$message.warning('海安无单申请WCS推送功能暂不启用') this.$message.warning('海安无单申请WCS推送功能暂不启用')
}, },
/** /**
* @Description 获取区域显示文本 - rqrq * @Description 获取区域显示文本 - rqrq
* @param areaId 区域ID * @param areaId 区域ID
@ -3256,7 +3426,7 @@ export default {
} }
return areaId return areaId
}, },
/** /**
* @Description 目的地下拉框值改变时自动保存 - rqrq * @Description 目的地下拉框值改变时自动保存 - rqrq
* @param newValue 新的目的地值 * @param newValue 新的目的地值
@ -3266,15 +3436,15 @@ export default {
if (newValue === this.originalProductionArea) { if (newValue === this.originalProductionArea) {
return return
} }
this.destinationUpdating = true this.destinationUpdating = true
const updateData = { const updateData = {
site: this.currentNotifyRow.site, site: this.currentNotifyRow.site,
notifyNo: this.currentNotifyRow.notifyNo, notifyNo: this.currentNotifyRow.notifyNo,
productionArea: newValue productionArea: newValue
} }
updateProductionArea(updateData).then(({data}) => { updateProductionArea(updateData).then(({data}) => {
this.destinationUpdating = false this.destinationUpdating = false
if (data && data.code === 0) { if (data && data.code === 0) {

Loading…
Cancel
Save