Browse Source

loading

java8
han\hanst 2 months ago
parent
commit
ff271d1451
  1. 17
      src/views/modules/part/bom_create.vue
  2. 6
      src/views/modules/part/quicklyCreateBom.vue

17
src/views/modules/part/bom_create.vue

@ -4076,7 +4076,7 @@ export default {
this.$message.warning('请选择可选物料!') this.$message.warning('请选择可选物料!')
return return
} }
// componentPart partNo使 entity.getPartNo() // componentPart partNo使 entity.getPartNo()
const convertedSelections = this.copyBomSelections.map(item => { const convertedSelections = this.copyBomSelections.map(item => {
return { return {
@ -4087,12 +4087,20 @@ export default {
qtyPerAssembly: item.qtyPerAssembly || 0 // qtyPerAssembly: item.qtyPerAssembly || 0 //
} }
}) })
this.$confirm("是否确认添加该"+ this.copyBomSelections.length +"条子件记录?", "提示", { this.$confirm("是否确认添加该"+ this.copyBomSelections.length +"条子件记录?", "提示", {
confirmButtonText: "确定", confirmButtonText: "确定",
cancelButtonText: "取消", cancelButtonText: "取消",
type: "warning" type: "warning"
}).then(() => { }).then(() => {
// loading
const loadingInstance = this.$loading({
lock: true,
text: '正在保存BOM子件...',
spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.3)'
})
let tempData = { let tempData = {
site: this.modalData.site, site: this.modalData.site,
buNo: this.modalData.buNo, buNo: this.modalData.buNo,
@ -4117,6 +4125,8 @@ export default {
batchSaveList: convertedSelections // 使 batchSaveList: convertedSelections // 使
} }
batchSaveBomComponent(tempData).then(({data}) => { batchSaveBomComponent(tempData).then(({data}) => {
loadingInstance.close() // loading
if (data && data.code === 0) { if (data && data.code === 0) {
this.subDetailList = data.rows.subDetailList this.subDetailList = data.rows.subDetailList
this.copyBomDialogFlag = false this.copyBomDialogFlag = false
@ -4140,6 +4150,9 @@ export default {
page: 1, page: 1,
limit: 10 limit: 10
} }
}).catch(error => {
loadingInstance.close() // loading
this.$message.error('保存失败:' + (error.message || '未知错误'))
}) })
}) })

6
src/views/modules/part/quicklyCreateBom.vue

@ -5457,7 +5457,7 @@ export default {
lock: true, lock: true,
text: '正在加载商品组数据...', text: '正在加载商品组数据...',
spinner: 'el-icon-loading', spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.7)'
background: 'rgba(0, 0, 0, 0.3)'
}) })
// BU1 // BU1
@ -5513,7 +5513,7 @@ export default {
lock: true, lock: true,
text: '正在加载ProcessTimeMatrix数据...', text: '正在加载ProcessTimeMatrix数据...',
spinner: 'el-icon-loading', spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.7)'
background: 'rgba(0, 0, 0, 0.3)'
}) })
} else { } else {
// loading // loading
@ -5689,7 +5689,7 @@ export default {
lock: true, lock: true,
text: '正在添加参数...', text: '正在添加参数...',
spinner: 'el-icon-loading', spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.7)'
background: 'rgba(0, 0, 0, 0.3)'
}) })
// //

Loading…
Cancel
Save