优化
This commit is contained in:
@@ -2,6 +2,7 @@
|
|||||||
<el-dialog
|
<el-dialog
|
||||||
append-to-body
|
append-to-body
|
||||||
:visible.sync="dialogVisible"
|
:visible.sync="dialogVisible"
|
||||||
|
v-loading.fullscreen.lock="fullscreenLoading"
|
||||||
destroy-on-close
|
destroy-on-close
|
||||||
:show-close="false"
|
:show-close="false"
|
||||||
fullscreen
|
fullscreen
|
||||||
@@ -385,6 +386,7 @@ export default {
|
|||||||
structshow5: false,
|
structshow5: false,
|
||||||
button1: true,
|
button1: true,
|
||||||
button2: true,
|
button2: true,
|
||||||
|
fullscreenLoading: false,
|
||||||
XLList: [],
|
XLList: [],
|
||||||
tableDtl: [],
|
tableDtl: [],
|
||||||
mstrow: {},
|
mstrow: {},
|
||||||
@@ -911,10 +913,14 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
this.form.tableDtl = this.tableDtl
|
this.form.tableDtl = this.tableDtl
|
||||||
|
this.fullscreenLoading = true
|
||||||
formula.submit(this.form).then(res => {
|
formula.submit(this.form).then(res => {
|
||||||
this.crud.notify('操作成功!')
|
this.crud.notify('操作成功!')
|
||||||
this.$emit('DivChanged')
|
this.$emit('DivChanged')
|
||||||
this.$emit('update:dialogShow', false)
|
this.$emit('update:dialogShow', false)
|
||||||
|
this.fullscreenLoading = false
|
||||||
|
}).catch(() => {
|
||||||
|
this.fullscreenLoading = false
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-dialog
|
<el-dialog
|
||||||
|
v-loading.fullscreen.lock="fullscreenLoading"
|
||||||
append-to-body
|
append-to-body
|
||||||
:visible.sync="dialogVisible"
|
:visible.sync="dialogVisible"
|
||||||
v-loading.fullscreen.lock="fullscreenLoading"
|
|
||||||
destroy-on-close
|
destroy-on-close
|
||||||
:show-close="false"
|
:show-close="false"
|
||||||
fullscreen
|
fullscreen
|
||||||
@@ -258,7 +258,7 @@
|
|||||||
<el-table-column prop="is_active" label="是否可用" align="center" width="70px" :formatter="is_activeFormat" />
|
<el-table-column prop="is_active" label="是否可用" align="center" width="70px" :formatter="is_activeFormat" />
|
||||||
<el-table-column prop="formula_qty" label="重量(KG)" :formatter="crud.formatNum3" width="150" align="center">
|
<el-table-column prop="formula_qty" label="重量(KG)" :formatter="crud.formatNum3" width="150" align="center">
|
||||||
<template scope="scope">
|
<template scope="scope">
|
||||||
<el-input-number size="mini" v-model="scope.row.formula_qty" :disabled="scope.row.edit" :precision="3" :controls="false" :min="0" :max="is_rf_xl(scope.row)" style="width: 120px" />
|
<el-input-number v-model="scope.row.formula_qty" size="mini" :disabled="scope.row.edit" :precision="3" :controls="false" :min="0" :max="is_rf_xl(scope.row)" style="width: 120px" />
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column min-width="130" prop="need_sum_qty" label="需配重量(KG)" :formatter="crud.formatNum3" align="center" />
|
<el-table-column min-width="130" prop="need_sum_qty" label="需配重量(KG)" :formatter="crud.formatNum3" align="center" />
|
||||||
@@ -284,19 +284,19 @@
|
|||||||
<el-button v-show="!scope.row.edit" :disabled="!button2" type="primary" class="filter-item" size="mini" icon="el-icon-edit" @click="handleEdit(scope.$index, scope.row)">编辑</el-button>
|
<el-button v-show="!scope.row.edit" :disabled="!button2" type="primary" class="filter-item" size="mini" icon="el-icon-edit" @click="handleEdit(scope.$index, scope.row)">编辑</el-button>
|
||||||
<el-button v-show="scope.row.edit" :disabled="!button2" type="success" class="filter-item" size="mini" icon="el-icon-check" @click="handleEdit(scope.$index, scope.row)">完成</el-button>
|
<el-button v-show="scope.row.edit" :disabled="!button2" type="success" class="filter-item" size="mini" icon="el-icon-check" @click="handleEdit(scope.$index, scope.row)">完成</el-button>
|
||||||
<el-button
|
<el-button
|
||||||
type="primary" class="filter-item"
|
type="primary"
|
||||||
|
class="filter-item"
|
||||||
size="mini"
|
size="mini"
|
||||||
icon="el-icon-top"
|
icon="el-icon-top"
|
||||||
@click="moveUp(scope.$index, scope.row)"
|
@click="moveUp(scope.$index, scope.row)"
|
||||||
>
|
/>
|
||||||
</el-button>
|
|
||||||
<el-button
|
<el-button
|
||||||
type="primary" class="filter-item"
|
type="primary"
|
||||||
|
class="filter-item"
|
||||||
size="mini"
|
size="mini"
|
||||||
icon="el-icon-bottom"
|
icon="el-icon-bottom"
|
||||||
@click="moveDown(scope.$index, scope.row)"
|
@click="moveDown(scope.$index, scope.row)"
|
||||||
>
|
/>
|
||||||
</el-button>
|
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
@@ -562,7 +562,7 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
is_rf_xl(row) {
|
is_rf_xl(row) {
|
||||||
let maxNum = 9999999999.0
|
const maxNum = 9999999999.0
|
||||||
if (row.is_rf_xl === '1') {
|
if (row.is_rf_xl === '1') {
|
||||||
return parseFloat(row.sum_ivt_qty).toFixed(3)
|
return parseFloat(row.sum_ivt_qty).toFixed(3)
|
||||||
} else {
|
} else {
|
||||||
@@ -752,11 +752,11 @@ export default {
|
|||||||
this.flagnow = false
|
this.flagnow = false
|
||||||
for (let i = 0; i < this.tabledis.length; i++) {
|
for (let i = 0; i < this.tabledis.length; i++) {
|
||||||
// ----就物料、批次、品质类型、等级、是否可用
|
// ----就物料、批次、品质类型、等级、是否可用
|
||||||
if (this.tableDtl[i].material_id === item.material_id
|
if (this.tableDtl[i].material_id === item.material_id &&
|
||||||
&& this.tableDtl[i].pcsn === item.pcsn
|
this.tableDtl[i].pcsn === item.pcsn &&
|
||||||
&& this.tableDtl[i].is_active === item.is_active
|
this.tableDtl[i].is_active === item.is_active &&
|
||||||
&& this.tableDtl[i].ivt_level === item.ivt_level
|
this.tableDtl[i].ivt_level === item.ivt_level &&
|
||||||
&& this.tableDtl[i].quality_scode === item.quality_scode ) {
|
this.tableDtl[i].quality_scode === item.quality_scode) {
|
||||||
this.flagnow = true
|
this.flagnow = true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -786,7 +786,7 @@ export default {
|
|||||||
row.is_CXJ007 = item.is_CXJ007
|
row.is_CXJ007 = item.is_CXJ007
|
||||||
row.is_CXJ008 = item.is_CXJ008
|
row.is_CXJ008 = item.is_CXJ008
|
||||||
row.is_CXJ002 = item.is_CXJ002
|
row.is_CXJ002 = item.is_CXJ002
|
||||||
tablemap.set(item.material_id+"--"+item.quality_scode+"--"+item.pcsn+"--"+item.is_active+"--"+item.ivt_level, row)
|
tablemap.set(item.material_id + '--' + item.quality_scode + '--' + item.pcsn + '--' + item.is_active + '--' + item.ivt_level, row)
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
const row = { edit: false, is_rf_xl: '1', bucket_type: '02', material_type: '01', material_id: '', material_code: '',
|
const row = { edit: false, is_rf_xl: '1', bucket_type: '02', material_type: '01', material_id: '', material_code: '',
|
||||||
@@ -814,7 +814,7 @@ export default {
|
|||||||
row.is_CXJ007 = item.is_CXJ007
|
row.is_CXJ007 = item.is_CXJ007
|
||||||
row.is_CXJ008 = item.is_CXJ008
|
row.is_CXJ008 = item.is_CXJ008
|
||||||
row.is_CXJ002 = item.is_CXJ002
|
row.is_CXJ002 = item.is_CXJ002
|
||||||
tablemap.set(item.material_id+"--"+item.quality_scode+"--"+item.pcsn+"--"+item.is_active+"--"+item.ivt_level, row)
|
tablemap.set(item.material_id + '--' + item.quality_scode + '--' + item.pcsn + '--' + item.is_active + '--' + item.ivt_level, row)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
for (const value of tablemap.values()) {
|
for (const value of tablemap.values()) {
|
||||||
@@ -952,11 +952,11 @@ export default {
|
|||||||
this.flagnow = false
|
this.flagnow = false
|
||||||
for (let i = 0; i < this.tableDtl.length; i++) {
|
for (let i = 0; i < this.tableDtl.length; i++) {
|
||||||
// ----就物料、批次、品质类型、等级、是否可用
|
// ----就物料、批次、品质类型、等级、是否可用
|
||||||
if (this.tableDtl[i].material_id === item.material_id
|
if (this.tableDtl[i].material_id === item.material_id &&
|
||||||
&& this.tableDtl[i].pcsn === item.pcsn
|
this.tableDtl[i].pcsn === item.pcsn &&
|
||||||
&& this.tableDtl[i].is_active === item.is_active
|
this.tableDtl[i].is_active === item.is_active &&
|
||||||
&& this.tableDtl[i].ivt_level === item.ivt_level
|
this.tableDtl[i].ivt_level === item.ivt_level &&
|
||||||
&& this.tableDtl[i].quality_scode === item.quality_scode ) {
|
this.tableDtl[i].quality_scode === item.quality_scode) {
|
||||||
this.flagnow = true
|
this.flagnow = true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -991,7 +991,7 @@ export default {
|
|||||||
row.is_CXJ002 = item.is_CXJ002
|
row.is_CXJ002 = item.is_CXJ002
|
||||||
row.is_CJZB00020 = item.is_CJZB00020
|
row.is_CJZB00020 = item.is_CJZB00020
|
||||||
row.is_CJZB00021 = item.is_CJZB00021
|
row.is_CJZB00021 = item.is_CJZB00021
|
||||||
tablemap.set(item.material_id+"--"+item.quality_scode+"--"+item.pcsn+"--"+item.is_active+"--"+item.ivt_level, row)
|
tablemap.set(item.material_id + '--' + item.quality_scode + '--' + item.pcsn + '--' + item.is_active + '--' + item.ivt_level, row)
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
const row = { edit: false, is_rf_xl: '1', bucket_type: '01', material_type: '01', material_id: '', material_code: '',
|
const row = { edit: false, is_rf_xl: '1', bucket_type: '01', material_type: '01', material_id: '', material_code: '',
|
||||||
@@ -1024,7 +1024,7 @@ export default {
|
|||||||
row.is_CXJ002 = item.is_CXJ002
|
row.is_CXJ002 = item.is_CXJ002
|
||||||
row.is_CJZB00020 = item.is_CJZB00020
|
row.is_CJZB00020 = item.is_CJZB00020
|
||||||
row.is_CJZB00021 = item.is_CJZB00021
|
row.is_CJZB00021 = item.is_CJZB00021
|
||||||
tablemap.set(item.material_id+"--"+item.quality_scode+"--"+item.pcsn+"--"+item.is_active+"--"+item.ivt_level, row)
|
tablemap.set(item.material_id + '--' + item.quality_scode + '--' + item.pcsn + '--' + item.is_active + '--' + item.ivt_level, row)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
for (const value of tablemap.values()) {
|
for (const value of tablemap.values()) {
|
||||||
@@ -1053,10 +1053,14 @@ export default {
|
|||||||
}
|
}
|
||||||
this.form.tabledis = this.tabledis
|
this.form.tabledis = this.tabledis
|
||||||
this.form.tableDtl = this.tableDtl
|
this.form.tableDtl = this.tableDtl
|
||||||
|
this.fullscreenLoading = true
|
||||||
initformula.save(this.form).then(res => {
|
initformula.save(this.form).then(res => {
|
||||||
this.crud.notify('操作成功!')
|
this.crud.notify('操作成功!')
|
||||||
this.$emit('DivChanged')
|
this.$emit('DivChanged')
|
||||||
this.$emit('update:dialogShow', false)
|
this.$emit('update:dialogShow', false)
|
||||||
|
this.fullscreenLoading = false
|
||||||
|
}).catch(() => {
|
||||||
|
this.fullscreenLoading = false
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
.catch(_ => {
|
.catch(_ => {
|
||||||
@@ -1077,13 +1081,16 @@ export default {
|
|||||||
}
|
}
|
||||||
this.form.tabledis = this.tabledis
|
this.form.tabledis = this.tabledis
|
||||||
this.form.tableDtl = this.tableDtl
|
this.form.tableDtl = this.tableDtl
|
||||||
|
this.fullscreenLoading = true
|
||||||
initformula.save(this.form).then(res => {
|
initformula.save(this.form).then(res => {
|
||||||
this.crud.notify('操作成功!')
|
this.crud.notify('操作成功!')
|
||||||
this.$emit('DivChanged')
|
this.$emit('DivChanged')
|
||||||
this.$emit('update:dialogShow', false)
|
this.$emit('update:dialogShow', false)
|
||||||
|
this.fullscreenLoading = false
|
||||||
|
}).catch(() => {
|
||||||
|
this.fullscreenLoading = false
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
autoCalculation() {
|
autoCalculation() {
|
||||||
this.fullscreenLoading = true
|
this.fullscreenLoading = true
|
||||||
@@ -1142,10 +1149,14 @@ export default {
|
|||||||
}
|
}
|
||||||
this.form.tabledis = this.tabledis
|
this.form.tabledis = this.tabledis
|
||||||
this.form.tableDtl = this.tableDtl
|
this.form.tableDtl = this.tableDtl
|
||||||
|
this.fullscreenLoading = true
|
||||||
initformula.submit(this.form).then(res => {
|
initformula.submit(this.form).then(res => {
|
||||||
this.crud.notify('操作成功!')
|
this.crud.notify('操作成功!')
|
||||||
this.$emit('DivChanged')
|
this.$emit('DivChanged')
|
||||||
this.$emit('update:dialogShow', false)
|
this.$emit('update:dialogShow', false)
|
||||||
|
this.fullscreenLoading = false
|
||||||
|
}).catch(() => {
|
||||||
|
this.fullscreenLoading = false
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
.catch(_ => {
|
.catch(_ => {
|
||||||
@@ -1166,13 +1177,16 @@ export default {
|
|||||||
}
|
}
|
||||||
this.form.tabledis = this.tabledis
|
this.form.tabledis = this.tabledis
|
||||||
this.form.tableDtl = this.tableDtl
|
this.form.tableDtl = this.tableDtl
|
||||||
|
this.fullscreenLoading = true
|
||||||
initformula.submit(this.form).then(res => {
|
initformula.submit(this.form).then(res => {
|
||||||
this.crud.notify('操作成功!')
|
this.crud.notify('操作成功!')
|
||||||
this.$emit('DivChanged')
|
this.$emit('DivChanged')
|
||||||
this.$emit('update:dialogShow', false)
|
this.$emit('update:dialogShow', false)
|
||||||
|
this.fullscreenLoading = false
|
||||||
|
}).catch(() => {
|
||||||
|
this.fullscreenLoading = false
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user