This commit is contained in:
zds
2022-10-28 09:08:07 +08:00
parent a640eacff7
commit e6dd8937f9
2 changed files with 113 additions and 93 deletions

View File

@@ -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,7 +386,8 @@ export default {
structshow5: false,
button1: true,
button2: true,
XLList:[],
fullscreenLoading: false,
XLList: [],
tableDtl: [],
mstrow: {},
form: {},
@@ -902,7 +904,7 @@ export default {
}
for (let i = 0; i < this.tableDtl.length; i++) {
if (this.tableDtl[i].status === '10') {
if(this.tableDtl[i].is_need_move === '1'){
if (this.tableDtl[i].is_need_move === '1') {
if (parseFloat(this.tableDtl[i].sum_ivt_qty) < parseFloat(this.tableDtl[i].formula_qty)) {
this.crud.notify('配粉重量不允许大于可用库存重量,明细序号为' + (i + 1) + '请检查!')
return false
@@ -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
})
}
}

View File

@@ -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
@@ -199,15 +199,15 @@
>
添加软废
</el-button>
<el-button
slot="left"
class="filter-item"
type="primary"
icon="el-icon-plus"
size="mini"
:disabled="button1"
@click="openYzj"
>
<el-button
slot="left"
class="filter-item"
type="primary"
icon="el-icon-plus"
size="mini"
:disabled="button1"
@click="openYzj"
>
添加抑制剂
</el-button>
<el-button
@@ -251,52 +251,52 @@
<el-table-column prop="material_code" label="物料编码" align="center" width="150px" />
<el-table-column prop="material_name" label="物料名称" align="center" width="150px" />
<el-table-column prop="material_type" label="物料类别" align="center" :formatter="material_typeFormat" />
<!-- <el-table-column prop="seqno" label="顺序号" align="center" width="150px" />-->
<el-table-column prop="pcsn" label="批次号" align="center" width="70px"/>
<!-- <el-table-column prop="seqno" label="顺序号" align="center" width="150px" />-->
<el-table-column prop="pcsn" label="批次号" align="center" width="70px" />
<el-table-column prop="quality_scode" label="品质类型" align="center" width="70px" :formatter="quality_scodeFormat" />
<el-table-column prop="ivt_level" label="库存等级" align="center" width="70px" :formatter="ivt_levelFormat" />
<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" />
<el-table-column min-width="130" prop="sum_ivt_qty" label="库存重量(KG)" :formatter="crud.formatNum3" align="center" />
<el-table-column prop="is_need_manage" label="是否配粉" align="center" width="100px" :formatter="is_need_manageFormat" />
<el-table-column prop="is_need_move" label="是否需移库" align="center" width="100px" :formatter="is_need_moveFormat" />
<el-table-column prop="is_tan" label="碳%" align="center" width="100px" :formatter="crud.formatQlNum4"/>
<el-table-column prop="change_qty" label="修正值%" align="center" width="100px" :formatter="crud.formatQlNum4"/>
<el-table-column prop="is_09030102" label="钴%" align="center" width="100px" :formatter="crud.formatQlNum4"/>
<el-table-column prop="is_CJZB00021" label="碳化铬%" align="center" width="100px" :formatter="crud.formatQlNum4"/>
<el-table-column prop="is_CJZB00020" label="碳化钒%" align="center" width="100px" :formatter="crud.formatQlNum4"/>
<el-table-column prop="is_CXJ001" label="石蜡" align="center" width="100px" :formatter="crud.formatQlNum4"/>
<el-table-column prop="is_CXJ002" label="G3蜡" align="center" width="100px" :formatter="crud.formatQlNum4"/>
<el-table-column prop="is_CXJ003" label="PEG2000" align="center" width="100px" :formatter="crud.formatQlNum4"/>
<el-table-column prop="is_CXJ004" label="PVAC" align="center" width="100px" :formatter="crud.formatQlNum4"/>
<el-table-column prop="is_CXJ005" label="SBP" align="center" width="100px" :formatter="crud.formatQlNum4"/>
<el-table-column prop="is_CXJ006" label="白油" align="center" width="100px" :formatter="crud.formatQlNum4"/>
<el-table-column prop="is_CXJ007" label="油酸" align="center" width="100px" :formatter="crud.formatQlNum4"/>
<el-table-column prop="is_CXJ008" label="8号分散剂" align="center" width="100px" :formatter="crud.formatQlNum4"/>
<el-table-column prop="is_tan" label="碳%" align="center" width="100px" :formatter="crud.formatQlNum4" />
<el-table-column prop="change_qty" label="修正值%" align="center" width="100px" :formatter="crud.formatQlNum4" />
<el-table-column prop="is_09030102" label="钴%" align="center" width="100px" :formatter="crud.formatQlNum4" />
<el-table-column prop="is_CJZB00021" label="碳化铬%" align="center" width="100px" :formatter="crud.formatQlNum4" />
<el-table-column prop="is_CJZB00020" label="碳化钒%" align="center" width="100px" :formatter="crud.formatQlNum4" />
<el-table-column prop="is_CXJ001" label="石蜡" align="center" width="100px" :formatter="crud.formatQlNum4" />
<el-table-column prop="is_CXJ002" label="G3蜡" align="center" width="100px" :formatter="crud.formatQlNum4" />
<el-table-column prop="is_CXJ003" label="PEG2000" align="center" width="100px" :formatter="crud.formatQlNum4" />
<el-table-column prop="is_CXJ004" label="PVAC" align="center" width="100px" :formatter="crud.formatQlNum4" />
<el-table-column prop="is_CXJ005" label="SBP" align="center" width="100px" :formatter="crud.formatQlNum4" />
<el-table-column prop="is_CXJ006" label="白油" align="center" width="100px" :formatter="crud.formatQlNum4" />
<el-table-column prop="is_CXJ007" label="油酸" align="center" width="100px" :formatter="crud.formatQlNum4" />
<el-table-column prop="is_CXJ008" label="8号分散剂" align="center" width="100px" :formatter="crud.formatQlNum4" />
<el-table-column align="center" label="操作" width="270" fixed="right">
<template scope="scope">
<el-button :disabled="!button2" type="danger" class="filter-item" size="mini" icon="el-icon-delete" @click.native.prevent="deleteRow(scope.$index,tableDtl)" />
<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>
@@ -314,7 +314,7 @@
disabled
/>
</el-form-item>
<!-- <el-form-item label="添加物料重量" prop="add_qty2">
<!-- <el-form-item label="添加物料重量" prop="add_qty2">
<el-input-number
v-model="form2.add_qty2"
:controls="false"
@@ -364,22 +364,22 @@
<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 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" :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="sum_ivt_qty" label="库存重量(KG)" :formatter="crud.formatNum3" align="center" />
<el-table-column min-width="130" prop="sum_ivt_qty" label="库存重量(KG)" :formatter="crud.formatNum3" align="center" />
<el-table-column prop="is_need_manage" label="是否配粉" align="center" width="100px" :formatter="is_need_manageFormat" />
<el-table-column prop="is_need_move" label="是否需移库" align="center" width="100px" :formatter="is_need_moveFormat" />
<el-table-column prop="is_tan" label="碳%" align="center" width="100px" :formatter="crud.formatQlNum4" />
<el-table-column prop="is_09030102" label="钴%" align="center" width="100px" :formatter="crud.formatQlNum4"/>
<el-table-column prop="is_CXJ001" label="石蜡" align="center" width="100px" :formatter="crud.formatQlNum4"/>
<el-table-column prop="is_CXJ002" label="G3蜡" align="center" width="100px" :formatter="crud.formatQlNum4"/>
<el-table-column prop="is_CXJ003" label="PEG2000" align="center" width="100px" :formatter="crud.formatQlNum4"/>
<el-table-column prop="is_CXJ004" label="PVAC" align="center" width="100px" :formatter="crud.formatQlNum4"/>
<el-table-column prop="is_CXJ005" label="SBP" align="center" width="100px" :formatter="crud.formatQlNum4"/>
<el-table-column prop="is_CXJ006" label="白油" align="center" width="100px" :formatter="crud.formatQlNum4"/>
<el-table-column prop="is_CXJ007" label="油酸" align="center" width="100px" :formatter="crud.formatQlNum4"/>
<el-table-column prop="is_CXJ008" label="8号分散剂" align="center" width="100px" :formatter="crud.formatQlNum4"/>
<el-table-column prop="is_09030102" label="钴%" align="center" width="100px" :formatter="crud.formatQlNum4" />
<el-table-column prop="is_CXJ001" label="石蜡" align="center" width="100px" :formatter="crud.formatQlNum4" />
<el-table-column prop="is_CXJ002" label="G3蜡" align="center" width="100px" :formatter="crud.formatQlNum4" />
<el-table-column prop="is_CXJ003" label="PEG2000" align="center" width="100px" :formatter="crud.formatQlNum4" />
<el-table-column prop="is_CXJ004" label="PVAC" align="center" width="100px" :formatter="crud.formatQlNum4" />
<el-table-column prop="is_CXJ005" label="SBP" align="center" width="100px" :formatter="crud.formatQlNum4" />
<el-table-column prop="is_CXJ006" label="白油" align="center" width="100px" :formatter="crud.formatQlNum4" />
<el-table-column prop="is_CXJ007" label="油酸" align="center" width="100px" :formatter="crud.formatQlNum4" />
<el-table-column prop="is_CXJ008" label="8号分散剂" align="center" width="100px" :formatter="crud.formatQlNum4" />
<el-table-column align="center" label="操作" width="160" fixed="right">
<template scope="scope">
<el-button :disabled="!button2" type="danger" class="filter-item" size="mini" icon="el-icon-delete" @click.native.prevent="deleteRow2(scope.$index,tabledis)" />
@@ -437,8 +437,8 @@ export default {
tableDtl: [],
mstrow: {},
tabledis: [],
XLList:[],
form: { waste_limit_down:0, waste_limit_uo:0},
XLList: [],
form: { waste_limit_down: 0, waste_limit_uo: 0 },
form2: {
total_qty1: '0',
add_qty1: '0',
@@ -561,12 +561,12 @@ export default {
return this.dict.label.is_again_put[row.is_need_move]
}
},
is_rf_xl(row){
let maxNum = 9999999999.0
if(row.is_rf_xl === '1'){
return parseFloat(row.sum_ivt_qty).toFixed(3)
}else{
return parseFloat(maxNum).toFixed(3)
is_rf_xl(row) {
const maxNum = 9999999999.0
if (row.is_rf_xl === '1') {
return parseFloat(row.sum_ivt_qty).toFixed(3)
} else {
return parseFloat(maxNum).toFixed(3)
}
},
is_need_manageFormat(row, column) {
@@ -617,7 +617,7 @@ export default {
},
storChange(row) {
if (row === '00') {
this.$confirm('是否清空列表?','',{showClose:false})
this.$confirm('是否清空列表?', '', { showClose: false })
.then(_ => {
this.button1 = false
this.button2 = true
@@ -715,9 +715,9 @@ export default {
const row = { edit: false, is_rf_xl: '0', bucket_type: '01', material_type: '02', material_id: '', material_code: '',
material_name: '', pcsn: '', quality_scode: '01', ivt_level: '01', is_active: '1', formula_qty: '0', sum_ivt_qty: '0', is_need_move: '0', is_need_manage: '1', is_tan: '', is_09030102: '', qty_unit_id: '', qty_unit_name: '' }
row.material_id = item.class_id
if(row.material_id==='1503644362788179968'){
if (row.material_id === '1503644362788179968') {
row.is_tan = '100.0'
}else if(row.material_id==='1503644362192588800'){
} else if (row.material_id === '1503644362192588800') {
row.is_09030102 = '100.0'
}
row.material_code = item.class_code
@@ -730,9 +730,9 @@ export default {
row.material_id = item.class_id
row.material_code = item.class_code
row.material_name = item.class_name
if(row.material_id==='1503644362788179968'){
if (row.material_id === '1503644362788179968') {
row.is_tan = '100.0'
}else if(row.material_id==='1503644362192588800'){
} else if (row.material_id === '1503644362192588800') {
row.is_09030102 = '100.0'
}
tablemap.set(item.class_id, row)
@@ -752,18 +752,18 @@ 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
}
}
if (!this.flagnow) {
const row = { edit: false, is_rf_xl: '1', bucket_type: '02', material_type: '01', material_id: '', material_code: '',
material_name: '', pcsn: '', quality_scode: '', ivt_level: '', is_active: '', formula_qty: '0', sum_ivt_qty: '', is_need_move: '', is_need_manage: '1', is_tan: '', is_09030102: '', is_CXJ001: '',
is_CXJ003: '',is_CXJ004: '',is_CXJ005: '',is_CXJ006: '',is_CXJ007: '',is_CXJ008: '',is_CXJ002: '',
is_CXJ003: '', is_CXJ004: '', is_CXJ005: '', is_CXJ006: '', is_CXJ007: '', is_CXJ008: '', is_CXJ002: '',
qty_unit_id: '', qty_unit_name: '' }
row.material_id = item.material_id
row.quality_scode = item.quality_scode
@@ -786,12 +786,12 @@ 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: '',
material_name: '', pcsn: '', quality_scode: '', ivt_level: '', is_active: '', formula_qty: '0', sum_ivt_qty: '', is_need_move: '', is_need_manage: '1', is_tan: '', is_09030102: '', is_CXJ001: '',
is_CXJ003: '',is_CXJ004: '',is_CXJ005: '',is_CXJ006: '',is_CXJ007: '',is_CXJ008: '',is_CXJ002: '',
is_CXJ003: '', is_CXJ004: '', is_CXJ005: '', is_CXJ006: '', is_CXJ007: '', is_CXJ008: '', is_CXJ002: '',
qty_unit_id: '', qty_unit_name: '' }
row.material_id = item.material_id
row.quality_scode = item.quality_scode
@@ -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()) {
@@ -835,8 +835,8 @@ export default {
}
}
if (!this.flagnow) {
const row = { edit: false, bucket_type: '01',is_rf_xl: '0', material_type: '01', material_id: '', material_code: '',
material_name: '', pcsn: '', quality_scode: '01', need_sum_qty:'0',ivt_level: '01', is_active: '1', formula_qty: '0', sum_ivt_qty: '', is_need_move: '0', is_need_manage: '0', is_tan: '', is_09030102: '', is_CXJ001: '', is_CXJ003: '',is_CXJ004: '',is_CXJ005: '',is_CXJ006: '',is_CXJ007: '',is_CXJ008: '',is_CXJ002: '',
const row = { edit: false, bucket_type: '01', is_rf_xl: '0', material_type: '01', material_id: '', material_code: '',
material_name: '', pcsn: '', quality_scode: '01', need_sum_qty: '0', ivt_level: '01', is_active: '1', formula_qty: '0', sum_ivt_qty: '', is_need_move: '0', is_need_manage: '0', is_tan: '', is_09030102: '', is_CXJ001: '', is_CXJ003: '', is_CXJ004: '', is_CXJ005: '', is_CXJ006: '', is_CXJ007: '', is_CXJ008: '', is_CXJ002: '',
qty_unit_id: '', qty_unit_name: '' }
row.material_id = item.material_id
row.need_sum_qty = item.need_sum_qty
@@ -857,8 +857,8 @@ export default {
tablemap.set(item.material_id, row)
}
} else {
const row = { edit: false,is_rf_xl: '0', bucket_type: '01', material_type: '01', material_id: '', material_code: '',
material_name: '', pcsn: '', quality_scode: '01', need_sum_qty:'0', ivt_level: '01', is_active: '1', formula_qty: '0', sum_ivt_qty: '', is_need_move: '0', is_need_manage: '0', is_tan: '', is_09030102: '',is_CXJ001: '', is_CXJ003: '',is_CXJ004: '',is_CXJ005: '',is_CXJ006: '',is_CXJ007: '',is_CXJ008: '',is_CXJ002: '',
const row = { edit: false, is_rf_xl: '0', bucket_type: '01', material_type: '01', material_id: '', material_code: '',
material_name: '', pcsn: '', quality_scode: '01', need_sum_qty: '0', ivt_level: '01', is_active: '1', formula_qty: '0', sum_ivt_qty: '', is_need_move: '0', is_need_manage: '0', is_tan: '', is_09030102: '', is_CXJ001: '', is_CXJ003: '', is_CXJ004: '', is_CXJ005: '', is_CXJ006: '', is_CXJ007: '', is_CXJ008: '', is_CXJ002: '',
qty_unit_id: '', qty_unit_name: '' }
row.material_id = item.material_id
row.is_need_move = item.is_need_move
@@ -896,7 +896,7 @@ export default {
}
if (!this.flagnow) {
const row = { edit: false, is_rf_xl: '0', bucket_type: '01', material_type: '01', material_id: '', material_code: '',
material_name: '', pcsn: '', quality_scode: '01', need_sum_qty:'0',ivt_level: '01', is_active: '1', formula_qty: '0', sum_ivt_qty: '', is_need_move: '0', is_need_manage: '1', is_tan: '', is_09030102: '', is_CXJ001: '', is_CXJ003: '',is_CXJ004: '',is_CXJ005: '',is_CXJ006: '',is_CXJ007: '',is_CXJ008: '',is_CXJ002: '',
material_name: '', pcsn: '', quality_scode: '01', need_sum_qty: '0', ivt_level: '01', is_active: '1', formula_qty: '0', sum_ivt_qty: '', is_need_move: '0', is_need_manage: '1', is_tan: '', is_09030102: '', is_CXJ001: '', is_CXJ003: '', is_CXJ004: '', is_CXJ005: '', is_CXJ006: '', is_CXJ007: '', is_CXJ008: '', is_CXJ002: '',
qty_unit_id: '', qty_unit_name: '' }
row.is_need_move = item.is_need_move
row.is_need_manage = item.is_need_manage
@@ -919,7 +919,7 @@ export default {
}
} else {
const row = { edit: false, is_rf_xl: '0', bucket_type: '01', material_type: '01', material_id: '', material_code: '',
material_name: '', pcsn: '', quality_scode: '01', need_sum_qty:'0',ivt_level: '01', is_active: '1', formula_qty: '0', sum_ivt_qty: '', is_need_move: '0', is_need_manage: '1', is_tan: '', is_09030102: '',is_CXJ001: '', is_CXJ003: '',is_CXJ004: '',is_CXJ005: '',is_CXJ006: '',is_CXJ007: '',is_CXJ008: '',is_CXJ002: '',
material_name: '', pcsn: '', quality_scode: '01', need_sum_qty: '0', ivt_level: '01', is_active: '1', formula_qty: '0', sum_ivt_qty: '', is_need_move: '0', is_need_manage: '1', is_tan: '', is_09030102: '', is_CXJ001: '', is_CXJ003: '', is_CXJ004: '', is_CXJ005: '', is_CXJ006: '', is_CXJ007: '', is_CXJ008: '', is_CXJ002: '',
qty_unit_id: '', qty_unit_name: '' }
row.material_id = item.material_id
row.is_need_move = item.is_need_move
@@ -952,19 +952,19 @@ 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
}
}
if (!this.flagnow) {
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: '',
material_name: '', pcsn: '', quality_scode: '', ivt_level: '', is_active: '', formula_qty: '0', sum_ivt_qty: '', is_need_move: '', is_need_manage: '1', is_tan: '', is_09030102: '',
is_CXJ001: '', is_CXJ003: '',need_sum_qty:'0', is_CXJ004: '',is_CXJ005: '',is_CXJ006: '',is_CXJ007: '',is_CXJ008: '',is_CXJ002: '',is_CJZB00021: '',is_CJZB00020: '',
qty_unit_id: '', qty_unit_name: '',change_qty:'0' }
is_CXJ001: '', is_CXJ003: '', need_sum_qty: '0', is_CXJ004: '', is_CXJ005: '', is_CXJ006: '', is_CXJ007: '', is_CXJ008: '', is_CXJ002: '', is_CJZB00021: '', is_CJZB00020: '',
qty_unit_id: '', qty_unit_name: '', change_qty: '0' }
row.material_id = item.material_id
row.quality_scode = item.quality_scode
row.pcsn = item.pcsn
@@ -991,13 +991,13 @@ 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: '',
material_name: '', pcsn: '', quality_scode: '', need_sum_qty:'0',ivt_level: '', is_active: '', formula_qty: '0', sum_ivt_qty: '', is_need_move: '', is_need_manage: '1', is_tan: '', is_09030102: '', is_CXJ001: '',
is_CXJ003: '',is_CXJ004: '',is_CXJ005: '',is_CXJ006: '',is_CXJ007: '',is_CXJ008: '',is_CXJ002: '',is_CJZB00021: '',is_CJZB00020: '',
qty_unit_id: '', qty_unit_name: '',change_qty:'0' }
material_name: '', pcsn: '', quality_scode: '', need_sum_qty: '0', ivt_level: '', is_active: '', formula_qty: '0', sum_ivt_qty: '', is_need_move: '', is_need_manage: '1', is_tan: '', is_09030102: '', is_CXJ001: '',
is_CXJ003: '', is_CXJ004: '', is_CXJ005: '', is_CXJ006: '', is_CXJ007: '', is_CXJ008: '', is_CXJ002: '', is_CJZB00021: '', is_CJZB00020: '',
qty_unit_id: '', qty_unit_name: '', change_qty: '0' }
row.material_id = item.material_id
row.quality_scode = item.quality_scode
row.pcsn = item.pcsn
@@ -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()) {
@@ -1036,7 +1036,7 @@ export default {
this.crud.notify('主桶明细不能为空!')
return false
}
if (this.tabledis.length === 0 && this.form.is_again_put ==='1') {
if (this.tabledis.length === 0 && this.form.is_again_put === '1') {
this.$confirm('副桶记录数为0是否继续')
.then(_ => {
for (let i = 0; i < this.tabledis.length; i++) {
@@ -1053,16 +1053,20 @@ 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(_ => {
return false
})
}else{
} else {
for (let i = 0; i < this.tabledis.length; i++) {
if (!this.tabledis[i].edit) {
this.crud.notify('尚有未完成编辑的副桶物料,明细序号为' + (i + 1) + '请检查!')
@@ -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
@@ -1125,7 +1132,7 @@ export default {
this.crud.notify('主桶明细不能为空!')
return false
}
if (this.tabledis.length === 0 && this.form.is_again_put ==='1') {
if (this.tabledis.length === 0 && this.form.is_again_put === '1') {
this.$confirm('副桶记录数为0是否继续')
.then(_ => {
for (let i = 0; i < this.tabledis.length; i++) {
@@ -1142,16 +1149,20 @@ 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(_ => {
return false
})
}else{
} else {
for (let i = 0; i < this.tabledis.length; i++) {
if (!this.tabledis[i].edit) {
this.crud.notify('尚有未完成编辑的副桶物料,明细序号为' + (i + 1) + '请检查!')
@@ -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
})
}
}
}
}