优化
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
<el-dialog
|
||||
append-to-body
|
||||
:visible.sync="dialogVisible"
|
||||
v-loading.fullscreen.lock="fullscreenLoading"
|
||||
destroy-on-close
|
||||
:show-close="false"
|
||||
fullscreen
|
||||
@@ -385,6 +386,7 @@ export default {
|
||||
structshow5: false,
|
||||
button1: true,
|
||||
button2: true,
|
||||
fullscreenLoading: false,
|
||||
XLList: [],
|
||||
tableDtl: [],
|
||||
mstrow: {},
|
||||
@@ -911,10 +913,14 @@ export default {
|
||||
}
|
||||
}
|
||||
this.form.tableDtl = this.tableDtl
|
||||
this.fullscreenLoading = true
|
||||
formula.submit(this.form).then(res => {
|
||||
this.crud.notify('操作成功!')
|
||||
this.$emit('DivChanged')
|
||||
this.$emit('update:dialogShow', false)
|
||||
this.fullscreenLoading = false
|
||||
}).catch(() => {
|
||||
this.fullscreenLoading = false
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
v-loading.fullscreen.lock="fullscreenLoading"
|
||||
append-to-body
|
||||
:visible.sync="dialogVisible"
|
||||
v-loading.fullscreen.lock="fullscreenLoading"
|
||||
destroy-on-close
|
||||
:show-close="false"
|
||||
fullscreen
|
||||
@@ -258,7 +258,7 @@
|
||||
<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">
|
||||
<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>
|
||||
</el-table-column>
|
||||
<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="success" class="filter-item" size="mini" icon="el-icon-check" @click="handleEdit(scope.$index, scope.row)">完成</el-button>
|
||||
<el-button
|
||||
type="primary" class="filter-item"
|
||||
type="primary"
|
||||
class="filter-item"
|
||||
size="mini"
|
||||
icon="el-icon-top"
|
||||
@click="moveUp(scope.$index, scope.row)"
|
||||
>
|
||||
</el-button>
|
||||
/>
|
||||
<el-button
|
||||
type="primary" class="filter-item"
|
||||
type="primary"
|
||||
class="filter-item"
|
||||
size="mini"
|
||||
icon="el-icon-bottom"
|
||||
@click="moveDown(scope.$index, scope.row)"
|
||||
>
|
||||
</el-button>
|
||||
/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
@@ -562,7 +562,7 @@ export default {
|
||||
}
|
||||
},
|
||||
is_rf_xl(row) {
|
||||
let maxNum = 9999999999.0
|
||||
const maxNum = 9999999999.0
|
||||
if (row.is_rf_xl === '1') {
|
||||
return parseFloat(row.sum_ivt_qty).toFixed(3)
|
||||
} else {
|
||||
@@ -752,11 +752,11 @@ export default {
|
||||
this.flagnow = false
|
||||
for (let i = 0; i < this.tabledis.length; i++) {
|
||||
// ----就物料、批次、品质类型、等级、是否可用
|
||||
if (this.tableDtl[i].material_id === item.material_id
|
||||
&& this.tableDtl[i].pcsn === item.pcsn
|
||||
&& this.tableDtl[i].is_active === item.is_active
|
||||
&& this.tableDtl[i].ivt_level === item.ivt_level
|
||||
&& this.tableDtl[i].quality_scode === item.quality_scode ) {
|
||||
if (this.tableDtl[i].material_id === item.material_id &&
|
||||
this.tableDtl[i].pcsn === item.pcsn &&
|
||||
this.tableDtl[i].is_active === item.is_active &&
|
||||
this.tableDtl[i].ivt_level === item.ivt_level &&
|
||||
this.tableDtl[i].quality_scode === item.quality_scode) {
|
||||
this.flagnow = true
|
||||
}
|
||||
}
|
||||
@@ -786,7 +786,7 @@ export default {
|
||||
row.is_CXJ007 = item.is_CXJ007
|
||||
row.is_CXJ008 = item.is_CXJ008
|
||||
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 {
|
||||
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_CXJ008 = item.is_CXJ008
|
||||
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()) {
|
||||
@@ -952,11 +952,11 @@ export default {
|
||||
this.flagnow = false
|
||||
for (let i = 0; i < this.tableDtl.length; i++) {
|
||||
// ----就物料、批次、品质类型、等级、是否可用
|
||||
if (this.tableDtl[i].material_id === item.material_id
|
||||
&& this.tableDtl[i].pcsn === item.pcsn
|
||||
&& this.tableDtl[i].is_active === item.is_active
|
||||
&& this.tableDtl[i].ivt_level === item.ivt_level
|
||||
&& this.tableDtl[i].quality_scode === item.quality_scode ) {
|
||||
if (this.tableDtl[i].material_id === item.material_id &&
|
||||
this.tableDtl[i].pcsn === item.pcsn &&
|
||||
this.tableDtl[i].is_active === item.is_active &&
|
||||
this.tableDtl[i].ivt_level === item.ivt_level &&
|
||||
this.tableDtl[i].quality_scode === item.quality_scode) {
|
||||
this.flagnow = true
|
||||
}
|
||||
}
|
||||
@@ -991,7 +991,7 @@ export default {
|
||||
row.is_CXJ002 = item.is_CXJ002
|
||||
row.is_CJZB00020 = item.is_CJZB00020
|
||||
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 {
|
||||
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_CJZB00020 = item.is_CJZB00020
|
||||
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()) {
|
||||
@@ -1053,10 +1053,14 @@ export default {
|
||||
}
|
||||
this.form.tabledis = this.tabledis
|
||||
this.form.tableDtl = this.tableDtl
|
||||
this.fullscreenLoading = true
|
||||
initformula.save(this.form).then(res => {
|
||||
this.crud.notify('操作成功!')
|
||||
this.$emit('DivChanged')
|
||||
this.$emit('update:dialogShow', false)
|
||||
this.fullscreenLoading = false
|
||||
}).catch(() => {
|
||||
this.fullscreenLoading = false
|
||||
})
|
||||
})
|
||||
.catch(_ => {
|
||||
@@ -1077,13 +1081,16 @@ export default {
|
||||
}
|
||||
this.form.tabledis = this.tabledis
|
||||
this.form.tableDtl = this.tableDtl
|
||||
this.fullscreenLoading = true
|
||||
initformula.save(this.form).then(res => {
|
||||
this.crud.notify('操作成功!')
|
||||
this.$emit('DivChanged')
|
||||
this.$emit('update:dialogShow', false)
|
||||
this.fullscreenLoading = false
|
||||
}).catch(() => {
|
||||
this.fullscreenLoading = false
|
||||
})
|
||||
}
|
||||
|
||||
},
|
||||
autoCalculation() {
|
||||
this.fullscreenLoading = true
|
||||
@@ -1142,10 +1149,14 @@ export default {
|
||||
}
|
||||
this.form.tabledis = this.tabledis
|
||||
this.form.tableDtl = this.tableDtl
|
||||
this.fullscreenLoading = true
|
||||
initformula.submit(this.form).then(res => {
|
||||
this.crud.notify('操作成功!')
|
||||
this.$emit('DivChanged')
|
||||
this.$emit('update:dialogShow', false)
|
||||
this.fullscreenLoading = false
|
||||
}).catch(() => {
|
||||
this.fullscreenLoading = false
|
||||
})
|
||||
})
|
||||
.catch(_ => {
|
||||
@@ -1166,13 +1177,16 @@ export default {
|
||||
}
|
||||
this.form.tabledis = this.tabledis
|
||||
this.form.tableDtl = this.tableDtl
|
||||
this.fullscreenLoading = true
|
||||
initformula.submit(this.form).then(res => {
|
||||
this.crud.notify('操作成功!')
|
||||
this.$emit('DivChanged')
|
||||
this.$emit('update:dialogShow', false)
|
||||
this.fullscreenLoading = false
|
||||
}).catch(() => {
|
||||
this.fullscreenLoading = false
|
||||
})
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user