工艺模块:页面完全完善
This commit is contained in:
parent
40f38ef660
commit
89ebffaf86
@ -17,12 +17,11 @@ export function getDetails(id) {
|
||||
})
|
||||
}
|
||||
|
||||
export function updateFBl(fnumber) {
|
||||
console.log('111',fnumber)
|
||||
export function updateFBl(data) {
|
||||
return request({
|
||||
url: '/system/details/updateFBMaterial',
|
||||
method: 'post',
|
||||
data: fnumber
|
||||
data: data
|
||||
})
|
||||
}
|
||||
// 获取项目令号列表
|
||||
|
||||
@ -18,7 +18,7 @@
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>-->
|
||||
<el-form-item label="父级图号" prop="partNumber">
|
||||
<el-form-item label="父级图号" prop="fnumber">
|
||||
<el-input
|
||||
v-model="queryParams.fnumber"
|
||||
placeholder="请输入图号"
|
||||
@ -456,26 +456,30 @@ export default {
|
||||
this.open = true;
|
||||
this.title = "添加bom明细";
|
||||
},
|
||||
/** 上传bom */
|
||||
updateFBMaterial(row) {
|
||||
this.loading = true;
|
||||
this.reset();
|
||||
const fnumbers =this.fnumbers
|
||||
console.log(fnumbers)
|
||||
updateFBl(fnumbers).then(response => {
|
||||
this.form = response;
|
||||
const fnumberCount = response.reduce((countMap, item) => {
|
||||
countMap[item.fnumber] = (countMap[item.fnumber] || 0) + 1;
|
||||
return countMap;
|
||||
}, {});
|
||||
// 获取成功的 fnumber 数量
|
||||
const successCount = Object.keys(fnumberCount).length;
|
||||
//彈窗
|
||||
this.resNotice(successCount);
|
||||
}).finally(()=>{
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
updateFBMaterial(row) {
|
||||
this.loading = true;
|
||||
this.reset();
|
||||
|
||||
// 获取选中行的数据
|
||||
const selectedData = this.ids.map(id => {
|
||||
const item = this.detailsList.find(row => row.id === id);
|
||||
return {
|
||||
fnumber: item.fnumber, // 物料编码
|
||||
totalWeight: item.totalWeight // 生产令号
|
||||
};
|
||||
});
|
||||
|
||||
console.log('发送数据:', selectedData);
|
||||
|
||||
// 调用接口
|
||||
updateFBl(selectedData).then(response => {
|
||||
this.form = response;
|
||||
const successCount = response.length;
|
||||
this.resNotice(successCount);
|
||||
}).finally(() => {
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
/** 弹窗 **/
|
||||
resNotice(successCount) {
|
||||
this.$alert(`成功上传的条数:${successCount}`, '成功信息', {
|
||||
|
||||
@ -136,14 +136,14 @@
|
||||
icon="el-icon-folder-opened"
|
||||
@click="handleDetail(scope.row.productionOrderNo)"
|
||||
v-hasPermi="['system:orderPro:view']"
|
||||
>查看详情</el-button>
|
||||
>查看工艺</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-folder-opened"
|
||||
@click="handleBOM(scope.row.productionOrderNo)"
|
||||
v-hasPermi="['system:orderPro:view']"
|
||||
>查看bom</el-button>
|
||||
>查看BOM</el-button>
|
||||
</template>
|
||||
|
||||
</el-table-column>
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user