|
|
|
@ -9,10 +9,14 @@ |
|
|
|
<el-input v-model="searchData.userName" style="width: 120px"></el-input> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="状态" > |
|
|
|
<el-select v-model="searchData.status" placeholder="请选择" style="width: 120px"> |
|
|
|
<el-option label="全部" value=""></el-option> |
|
|
|
<el-option label="已下达" value="已下达"></el-option> |
|
|
|
<el-select v-model="searchData.status" clearable placeholder="请选择" style="width: 120px"> |
|
|
|
<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> |
|
|
|
<el-option label="已归档" value="已归档"></el-option> |
|
|
|
</el-select> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item :label="'申请单日期'"> |
|
|
|
@ -270,6 +274,16 @@ |
|
|
|
<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="right" |
|
|
|
header-align="center" |
|
|
|
align="center" |
|
|
|
width="80" |
|
|
|
label="操作"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<el-link style="cursor: pointer" @click="getAlternativePart(scope.row)">替代料</el-link> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
</el-table> |
|
|
|
</el-tab-pane> |
|
|
|
<el-tab-pane label="材料汇总" name="sum"> |
|
|
|
@ -1020,6 +1034,28 @@ |
|
|
|
</el-footer> |
|
|
|
</el-dialog> |
|
|
|
|
|
|
|
<!-- 替代料模态框 --> |
|
|
|
<el-dialog title="替代料列表" :close-on-click-modal="false" v-drag :visible.sync="alternativePartsModalFlag" width="900px"> |
|
|
|
<el-table |
|
|
|
:data="alternativePartsList" |
|
|
|
border |
|
|
|
v-loading="alternativePartsLoading" |
|
|
|
style="width: 100%;" |
|
|
|
height="400"> |
|
|
|
<!-- <el-table-column prop="partNo" label="母件编码" align="center" min-width="120"></el-table-column>--> |
|
|
|
<!-- <el-table-column prop="partDesc" label="母件名称" align="left" min-width="150" show-overflow-tooltip></el-table-column>--> |
|
|
|
<!-- <el-table-column prop="componentPartNo" label="子件编码" align="center" min-width="120"></el-table-column>--> |
|
|
|
<!-- <el-table-column prop="componentPartDesc" label="子件名称" align="left" min-width="150" show-overflow-tooltip></el-table-column>--> |
|
|
|
<el-table-column prop="alternativePartNo" label="替代料编码" align="left" min-width="120"></el-table-column> |
|
|
|
<el-table-column prop="alternativePartDesc" label="替代料名称" align="left" min-width="150" show-overflow-tooltip></el-table-column> |
|
|
|
<el-table-column prop="replacementRatio" label="替代比例" align="right" min-width="100"></el-table-column> |
|
|
|
<el-table-column prop="priority" label="优先级" align="right" min-width="80"></el-table-column> |
|
|
|
</el-table> |
|
|
|
<span slot="footer" class="dialog-footer"> |
|
|
|
<el-button @click="alternativePartsModalFlag = false">关闭</el-button> |
|
|
|
</span> |
|
|
|
</el-dialog> |
|
|
|
|
|
|
|
<Chooselist ref="baseList" @getBaseData="getBaseData"></Chooselist> |
|
|
|
</div> |
|
|
|
</template> |
|
|
|
@ -1043,7 +1079,8 @@ |
|
|
|
, editNotifyMaterial |
|
|
|
, deleteNotify, |
|
|
|
updateNotifyDetail, |
|
|
|
saveSOIssueNotifyOrderMateria |
|
|
|
saveSOIssueNotifyOrderMateria, |
|
|
|
getBomAlternativeParts |
|
|
|
} from "@/api/orderIssure/soIssueNotify.js" |
|
|
|
import { |
|
|
|
searchShopOrderByPaging |
|
|
|
@ -1102,6 +1139,9 @@ |
|
|
|
bomSeqNo: '', |
|
|
|
warehouseId: '' |
|
|
|
}, |
|
|
|
alternativePartsModalFlag: false, |
|
|
|
alternativePartsList: [], |
|
|
|
alternativePartsLoading: false, |
|
|
|
orderOptions: [], |
|
|
|
searchData: { |
|
|
|
page: 1, |
|
|
|
@ -1109,12 +1149,12 @@ |
|
|
|
site: '', |
|
|
|
userName: '', |
|
|
|
notifyNo: '', |
|
|
|
status: '', |
|
|
|
status: '草稿', |
|
|
|
issueFlag: '', |
|
|
|
loginUserName: this.$store.state.user.name, |
|
|
|
issueResult: '', |
|
|
|
startDate: this.dayjs().format("YYYY-MM-DD"), |
|
|
|
endDate: this.dayjs().format("YYYY-MM-DD"), |
|
|
|
startDate: '', |
|
|
|
endDate: '', |
|
|
|
sql: "", |
|
|
|
}, |
|
|
|
notifyData:{ |
|
|
|
@ -1329,14 +1369,14 @@ |
|
|
|
columnProp: 'needDate', |
|
|
|
headerAlign: "center", |
|
|
|
align: "left", |
|
|
|
columnLabel: '要求发料时间', |
|
|
|
columnLabel: '要求发料日期', |
|
|
|
columnHidden: false, |
|
|
|
columnImage: false, |
|
|
|
columnSortable: false, |
|
|
|
sortLv: 0, |
|
|
|
status: true, |
|
|
|
fixed: '', |
|
|
|
columnWidth: 80, |
|
|
|
columnWidth: 120, |
|
|
|
},{ |
|
|
|
userId: this.$store.state.user.name, |
|
|
|
functionId: 701002, |
|
|
|
@ -1479,6 +1519,24 @@ |
|
|
|
}, |
|
|
|
], |
|
|
|
columnList3:[ |
|
|
|
{ |
|
|
|
userId: this.$store.state.user.name, |
|
|
|
functionId: 701002, |
|
|
|
serialNumber: '701002Table3OrderNo', |
|
|
|
tableId: "701002Table3", |
|
|
|
tableName: "申请单材料明细表", |
|
|
|
columnProp: "orderNo", |
|
|
|
headerAlign: "center", |
|
|
|
align: "left", |
|
|
|
columnLabel: "生产订单号", |
|
|
|
columnHidden: false, |
|
|
|
columnImage: false, |
|
|
|
columnSortable: false, |
|
|
|
sortLv: 0, |
|
|
|
status: true, |
|
|
|
fixed: '', |
|
|
|
columnWidth: 130 |
|
|
|
}, |
|
|
|
{ |
|
|
|
userId: this.$store.state.user.name, |
|
|
|
functionId: 701002, |
|
|
|
@ -1488,14 +1546,14 @@ |
|
|
|
columnProp: "itemNo", |
|
|
|
headerAlign: "center", |
|
|
|
align: "right", |
|
|
|
columnLabel: "申请单序号", |
|
|
|
columnLabel: "序号", |
|
|
|
columnHidden: false, |
|
|
|
columnImage: false, |
|
|
|
columnSortable: false, |
|
|
|
sortLv: 0, |
|
|
|
status: true, |
|
|
|
fixed: '', |
|
|
|
columnWidth: 80 |
|
|
|
columnWidth: 60 |
|
|
|
},{ |
|
|
|
userId: this.$store.state.user.name, |
|
|
|
functionId: 701002, |
|
|
|
@ -1512,7 +1570,7 @@ |
|
|
|
sortLv: 0, |
|
|
|
status: true, |
|
|
|
fixed: '', |
|
|
|
columnWidth: 100 |
|
|
|
columnWidth: 130 |
|
|
|
},{ |
|
|
|
userId: this.$store.state.user.name, |
|
|
|
functionId: 701002, |
|
|
|
@ -1573,7 +1631,7 @@ |
|
|
|
tableName: "申请单材料明细表", |
|
|
|
columnProp: "issueType", |
|
|
|
headerAlign: "center", |
|
|
|
align: "right", |
|
|
|
align: "left", |
|
|
|
columnLabel: "类型", |
|
|
|
columnHidden: false, |
|
|
|
columnImage: false, |
|
|
|
@ -2539,23 +2597,10 @@ |
|
|
|
}) |
|
|
|
}, |
|
|
|
|
|
|
|
// watch: { |
|
|
|
// searchData: { |
|
|
|
// deep: true, |
|
|
|
// handler: function (newV, oldV) { |
|
|
|
// this.searchData.partNo = this.searchData.partNo.toUpperCase() |
|
|
|
// } |
|
|
|
// }, |
|
|
|
// }, |
|
|
|
created () { |
|
|
|
// 动态列 |
|
|
|
// this.getTableUserColumn(this.$route.meta.menuId+'table1',1) |
|
|
|
// this.getTableUserColumn(this.$route.meta.menuId+'table2',2) |
|
|
|
// this.getTableUserColumn(this.$route.meta.menuId+'table3',3) |
|
|
|
// this.getTableUserColumn(this.$route.meta.menuId+'table4',4) |
|
|
|
// this.getTableUserColumn(this.$route.meta.menuId+'table5',5) |
|
|
|
// this.getTableUserColumn(this.$route.meta.menuId+'table6',6) |
|
|
|
this.searchTable() |
|
|
|
}, |
|
|
|
|
|
|
|
methods: { |
|
|
|
|
|
|
|
// 批量编辑模态框 |
|
|
|
@ -3782,6 +3827,46 @@ |
|
|
|
}) |
|
|
|
}, |
|
|
|
|
|
|
|
// 查询替代料 |
|
|
|
getAlternativePart(row) { |
|
|
|
if (!this.currentRow || !this.currentRow.notifyNo) { |
|
|
|
this.$message.warning('请先选择一条申请单记录!'); |
|
|
|
return; |
|
|
|
} |
|
|
|
|
|
|
|
if (!row.orderNo) { |
|
|
|
this.$message.warning('该记录没有关联工单,无法查询替代料!'); |
|
|
|
return; |
|
|
|
} |
|
|
|
|
|
|
|
const params = { |
|
|
|
site: row.site, |
|
|
|
notifyNo: row.notifyNo, |
|
|
|
orderNo: row.orderNo, |
|
|
|
componentPart: row.componentPartNo |
|
|
|
}; |
|
|
|
|
|
|
|
this.alternativePartsLoading = true; |
|
|
|
this.alternativePartsModalFlag = true; |
|
|
|
|
|
|
|
getBomAlternativeParts(params).then(({data}) => { |
|
|
|
if (data && data.code === 0) { |
|
|
|
this.alternativePartsList = data.rows || []; |
|
|
|
if (this.alternativePartsList.length === 0) { |
|
|
|
this.$message.info('未找到该物料的替代料'); |
|
|
|
} |
|
|
|
} else { |
|
|
|
this.$message.error(data.msg || '查询替代料失败'); |
|
|
|
this.alternativePartsList = []; |
|
|
|
} |
|
|
|
}).catch(err => { |
|
|
|
this.$message.error('查询替代料失败: ' + err.message); |
|
|
|
this.alternativePartsList = []; |
|
|
|
}).finally(() => { |
|
|
|
this.alternativePartsLoading = false; |
|
|
|
}); |
|
|
|
}, |
|
|
|
|
|
|
|
// 获取基础数据列表S |
|
|
|
getBaseList (val, type) { |
|
|
|
this.tagNo = val |
|
|
|
|