This commit is contained in:
zds
2022-07-12 17:06:59 +08:00
parent 92206a6711
commit dc0c050eea
4 changed files with 312 additions and 51 deletions

View File

@@ -58,15 +58,6 @@
@change="crud.toQuery"
/>
</el-form-item>
<el-form-item label="工令">
<el-input
v-model="query.source_bill_code"
size="mini"
clearable
placeholder="工令"
@keyup.enter.native="crud.toQuery"
/>
</el-form-item>
<el-form-item label="物料">
<el-input
v-model="query.material_code"
@@ -85,6 +76,11 @@
@keyup.enter.native="crud.toQuery"
/>
</el-form-item>
<el-form-item label="工令">
<el-input v-model="query.source_bill_code" size="mini" placeholder="工令号" disabled class="input-with-select">
<el-button slot="append" icon="el-icon-search" @click="queryMater" />
</el-input>
</el-form-item>
<el-form-item label="人员">
<el-input
v-model="query.username"
@@ -109,9 +105,6 @@
style="width: 100%;"
:highlight-current-row="true"
@selection-change="crud.selectionChangeHandler"
@current-change="handleCurrentChange"
@select="handleSelectionChange"
@select-all="onSelectAll"
>
<el-table-column type="index" label="序号" width="50" align="center" />
<el-table-column prop="material_code" label="物料编码" width="150" align="center" />
@@ -127,6 +120,7 @@
<!--分页组件-->
<pagination />
</div>
<StructIvt :dialog-show.sync="structshow" @StructIvtClosed="queryTableDtl" />
</div>
</template>
@@ -138,11 +132,12 @@ import crudOperation from '@crud/CRUD.operation'
import pagination from '@crud/Pagination'
import crudStorattr from '@/api/wms/basedata/st/storattr'
import Date from '@/utils/datetime'
import StructIvt from '@/views/wms/statistics/outStorQuery/StructIvt'
import crudRawAssist from '@/api/wms/st/core/inbill/rawassist'
export default {
name: 'outStorQuery',
components: { crudOperation, rrOperation, pagination },
components: { StructIvt, crudOperation, rrOperation, pagination },
cruds() {
return CRUD({ title: '生产配粉领料', idField: 'iostorinv_id', url: 'api/checkoutbill/queryDtl', crudMethod: { ...checkoutbill },
optShow: {
@@ -161,11 +156,8 @@ export default {
height: document.documentElement.clientHeight - 180 + 'px;',
permission: {
},
divShow: false,
openParam: [],
mstrow: {},
structshow: false,
currentRow: null,
checkrows: [],
storlist: [],
billtypelist: []
}
@@ -187,31 +179,11 @@ export default {
this.crud.toQuery()
},
methods: {
[CRUD.HOOK.beforeRefresh]() {
this.handleCurrentChange(null)
},
onInput() {
this.$forceUpdate()
},
handleSelectionChange(val, row) {
if (val.length > 1) {
this.$refs.table.clearSelection()
this.$refs.table.toggleRowSelection(val.pop())
this.buttonChange(row)
} else if (val.length === 1) {
this.buttonChange(row)
} else {
this.handleCurrentChange(null)
}
},
onSelectAll() {
this.$refs.table.clearSelection()
this.handleCurrentChange(null)
},
buttonChange(current) {
if (current !== null) {
this.currentRow = current
}
async queryMater() {
this.structshow = true
},
quality_scodeFormat(row, column) {
return this.dict.label.ST_QUALITY_SCODE[row.quality_scode]
@@ -222,14 +194,19 @@ export default {
is_activeFormat(row, column) {
return this.dict.label.is_usable[row.is_active]
},
handleCurrentChange(current) {
if (current === null) {
this.currentRow = {}
queryTableDtl(rows) {
let devices = ''
for (let i = 0; i < rows.length; i++) {
if ( i === 0 ) {
devices = rows[i].workorder_code
}else{
devices = devices + ',' + rows[i].workorder_code
}
}
if(rows.length > 0){
this.crud.query.source_bill_code = devices
this.crud.toQuery()
}
},
querytable() {
this.crud.toQuery()
this.handleCurrentChange(null)
}
}
}