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