修改自动开单(新料、改配)加库存等级查询、排序
This commit is contained in:
182
mes/qd/src/views/wms/st/core/outbill/wastewashoutbill/AddDtl.vue
Normal file
182
mes/qd/src/views/wms/st/core/outbill/wastewashoutbill/AddDtl.vue
Normal file
@@ -0,0 +1,182 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
title="到货单物料选择"
|
||||
append-to-body
|
||||
:visible.sync="dialogVisible"
|
||||
destroy-on-close
|
||||
:show-close="false"
|
||||
width="1200px"
|
||||
@open="open"
|
||||
@close="close"
|
||||
>
|
||||
<!--工具栏-->
|
||||
<div class="head-container">
|
||||
<!-- 搜索 -->
|
||||
<el-input
|
||||
v-model="query.receive_code"
|
||||
clearable
|
||||
size="mini"
|
||||
placeholder="订单编号"
|
||||
style="width: 200px;"
|
||||
class="filter-item"
|
||||
@keyup.enter.native="crud.toQuery"
|
||||
/>
|
||||
<el-input
|
||||
v-model="query.source_bill_code"
|
||||
clearable
|
||||
size="mini"
|
||||
placeholder="到货单号"
|
||||
style="width: 200px;"
|
||||
class="filter-item"
|
||||
@keyup.enter.native="crud.toQuery"
|
||||
/>
|
||||
<date-range-picker v-model="query.createTime" class="date-item" />
|
||||
<el-select
|
||||
v-model="query.status"
|
||||
clearable
|
||||
size="mini"
|
||||
placeholder="单据状态"
|
||||
class="filter-item"
|
||||
style="width: 230px;"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in receiveStatusList"
|
||||
:key="item.code"
|
||||
:label="item.name"
|
||||
:value="item.code"
|
||||
/>
|
||||
</el-select>
|
||||
<el-input
|
||||
v-model="query.search"
|
||||
clearable
|
||||
size="mini"
|
||||
placeholder="物料编码或名称"
|
||||
style="width: 200px;"
|
||||
class="filter-item"
|
||||
@keyup.enter.native="crud.toQuery"
|
||||
/>
|
||||
<rrOperation />
|
||||
</div>
|
||||
<!--表格渲染-->
|
||||
<el-table
|
||||
ref="multipleTable"
|
||||
v-loading="crud.loading"
|
||||
:data="crud.data"
|
||||
style="width: 100%;"
|
||||
border
|
||||
:header-cell-style="{background:'#f5f7fa',color:'#606266'}"
|
||||
>
|
||||
<el-table-column type="selection" width="55" />
|
||||
<el-table-column show-overflow-tooltip prop="receive_code" width="150" label="订单编号" />
|
||||
<el-table-column show-overflow-tooltip prop="base_bill_code" width="150" label="到货单号" />
|
||||
<el-table-column show-overflow-tooltip prop="source_name" label="供应商" />
|
||||
<el-table-column show-overflow-tooltip prop="material_code" width="150" label="物料编码" />
|
||||
<el-table-column show-overflow-tooltip prop="material_name" label="物料名称" />
|
||||
<el-table-column show-overflow-tooltip prop="pcsn" label="批次" />
|
||||
<el-table-column show-overflow-tooltip prop="receive_qty" :formatter="crud.formatNum3" width="120" label="到货重量" />
|
||||
<el-table-column show-overflow-tooltip prop="instor_qty" :formatter="crud.formatNum3" label="入库重量" />
|
||||
<el-table-column show-overflow-tooltip prop="plan_qty" label="检测重量" />
|
||||
<el-table-column show-overflow-tooltip prop="qty_unit_name" label="重量单位" />
|
||||
<el-table-column show-overflow-tooltip prop="status" label="状态" :formatter="stateFormat" />
|
||||
<el-table-column show-overflow-tooltip prop="input_optname" label="创建人" />
|
||||
<el-table-column show-overflow-tooltip prop="receive_date" width="120" label="到货日期" />
|
||||
</el-table>
|
||||
<!--分页组件-->
|
||||
<pagination />
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button slot="left" type="info" @click="dialogVisible = false">关闭</el-button>
|
||||
<el-button slot="left" type="primary" @click="submit">保存</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
import CRUD, { header, presenter } from '@crud/crud'
|
||||
import rrOperation from '@crud/RR.operation'
|
||||
import pagination from '@crud/Pagination'
|
||||
import DateRangePicker from '@/components/DateRangePicker/index'
|
||||
import crudReceivemst from '@/api/wms/pcs/receivemst'
|
||||
|
||||
export default {
|
||||
name: 'AddDtl',
|
||||
components: { rrOperation, pagination, DateRangePicker },
|
||||
cruds() {
|
||||
return CRUD({ title: '用户', url: 'api/returnoutbill/addDtl',
|
||||
query: { receive_code: '', source_bill_code: '', status: '', search: '', mater_type: '' },
|
||||
optShow: {
|
||||
add: false,
|
||||
edit: false,
|
||||
del: false,
|
||||
reset: false,
|
||||
download: false
|
||||
}})
|
||||
},
|
||||
mixins: [presenter(), header()],
|
||||
props: {
|
||||
dialogShow: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
openParam: {
|
||||
type: String
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dialogVisible: false,
|
||||
receiveStatusList: [],
|
||||
opendtlParam: '',
|
||||
rows: []
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
dialogShow: {
|
||||
handler(newValue, oldValue) {
|
||||
this.dialogVisible = newValue
|
||||
}
|
||||
},
|
||||
openParam: {
|
||||
handler(newValue, oldValue) {
|
||||
this.opendtlParam = newValue
|
||||
}
|
||||
}
|
||||
},
|
||||
created() {
|
||||
crudReceivemst.getStatus().then(res => {
|
||||
this.receiveStatusList = res
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
[CRUD.HOOK.beforeRefresh]() {
|
||||
this.crud.query.mater_type = this.opendtlParam
|
||||
},
|
||||
close() {
|
||||
this.crud.resetQuery(false)
|
||||
this.$emit('update:dialogShow', false)
|
||||
},
|
||||
open() {
|
||||
this.crud.query.mater_type = this.opendtlParam
|
||||
this.crud.toQuery()
|
||||
},
|
||||
stateFormat(row, column) {
|
||||
for (const item of this.receiveStatusList) {
|
||||
if (item.code === row.status) {
|
||||
return item.name
|
||||
}
|
||||
}
|
||||
},
|
||||
submit() {
|
||||
this.rows = this.$refs.multipleTable.selection
|
||||
if (this.rows.length <= 0) {
|
||||
this.$message('请先勾选物料')
|
||||
return
|
||||
}
|
||||
this.crud.resetQuery(false)
|
||||
this.$emit('update:dialogShow', false)
|
||||
this.$emit('tableChanged', this.rows)
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user