2025-05-19 16:33:07 +08:00
|
|
|
|
<template>
|
|
|
|
|
|
<div class="app-container">
|
|
|
|
|
|
<!--工具栏-->
|
|
|
|
|
|
<div class="head-container">
|
|
|
|
|
|
<div v-if="crud.props.searchToggle">
|
|
|
|
|
|
<!-- 搜索 -->
|
|
|
|
|
|
<el-form
|
|
|
|
|
|
:inline="true"
|
|
|
|
|
|
class="demo-form-inline"
|
|
|
|
|
|
label-position="right"
|
|
|
|
|
|
label-width="80px"
|
|
|
|
|
|
label-suffix=":"
|
|
|
|
|
|
>
|
2026-01-06 16:50:13 +08:00
|
|
|
|
<el-form-item :label="$t('common.inputCodeOrName')">
|
2025-05-19 16:33:07 +08:00
|
|
|
|
<el-input
|
|
|
|
|
|
v-model="query.bill_code"
|
|
|
|
|
|
clearable
|
|
|
|
|
|
size="mini"
|
2026-01-06 16:50:13 +08:00
|
|
|
|
:placeholder="$t('common.in_code')"
|
2025-05-19 16:33:07 +08:00
|
|
|
|
@keyup.enter.native="crud.toQuery"
|
|
|
|
|
|
/>
|
|
|
|
|
|
</el-form-item>
|
2026-01-06 16:50:13 +08:00
|
|
|
|
<el-form-item :label="$t('common.stor_name')">
|
2025-05-19 16:33:07 +08:00
|
|
|
|
<el-select
|
|
|
|
|
|
v-model="query.stor_id"
|
|
|
|
|
|
clearable
|
|
|
|
|
|
size="mini"
|
2026-01-06 16:50:13 +08:00
|
|
|
|
:placeholder="$t('common.Please_select')"
|
2025-05-19 16:33:07 +08:00
|
|
|
|
class="filter-item"
|
|
|
|
|
|
@change="crud.toQuery"
|
|
|
|
|
|
>
|
|
|
|
|
|
<el-option
|
|
|
|
|
|
v-for="item in storlist"
|
|
|
|
|
|
:key="item.stor_id"
|
|
|
|
|
|
:label="item.stor_name"
|
|
|
|
|
|
:value="item.stor_id"
|
|
|
|
|
|
/>
|
|
|
|
|
|
</el-select>
|
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
|
2026-01-06 16:50:13 +08:00
|
|
|
|
<el-form-item :label="$t('common.create_time')" prop="createTime">
|
2025-05-19 16:33:07 +08:00
|
|
|
|
<el-date-picker
|
|
|
|
|
|
v-model="query.createTime"
|
|
|
|
|
|
type="daterange"
|
|
|
|
|
|
value-format="yyyy-MM-dd HH:mm:ss"
|
2026-01-06 16:50:13 +08:00
|
|
|
|
:start-placeholder="$t('common.startDate')"
|
|
|
|
|
|
:end-placeholder="$t('common.endDate')"
|
2025-05-19 16:33:07 +08:00
|
|
|
|
:default-time="['00:00:00', '23:59:59']"
|
|
|
|
|
|
@change="crud.toQuery"
|
|
|
|
|
|
/>
|
|
|
|
|
|
</el-form-item>
|
2026-01-06 16:50:13 +08:00
|
|
|
|
<el-form-item :label="$t('common.create_mode')">
|
2025-05-19 16:33:07 +08:00
|
|
|
|
<el-select
|
|
|
|
|
|
v-model="query.create_mode"
|
|
|
|
|
|
clearable
|
|
|
|
|
|
size="mini"
|
2026-01-06 16:50:13 +08:00
|
|
|
|
:placeholder="$t('common.create_mode')"
|
2025-05-19 16:33:07 +08:00
|
|
|
|
class="filter-item"
|
|
|
|
|
|
@change="crud.toQuery"
|
|
|
|
|
|
>
|
|
|
|
|
|
<el-option
|
|
|
|
|
|
v-for="item in dict.ST_CREATE_MODE"
|
|
|
|
|
|
:key="item.value"
|
|
|
|
|
|
:label="item.label"
|
|
|
|
|
|
:value="item.value"
|
|
|
|
|
|
/>
|
|
|
|
|
|
</el-select>
|
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
|
2026-01-06 16:50:13 +08:00
|
|
|
|
<el-form-item :label="$t('common.bill_type')">
|
2025-05-19 16:33:07 +08:00
|
|
|
|
<el-select
|
|
|
|
|
|
v-model="query.bill_type"
|
|
|
|
|
|
clearable
|
|
|
|
|
|
filterable
|
|
|
|
|
|
size="mini"
|
2026-01-06 16:50:13 +08:00
|
|
|
|
:placeholder="$t('common.bill_type')"
|
2025-05-19 16:33:07 +08:00
|
|
|
|
class="filter-item"
|
|
|
|
|
|
@change="crud.toQuery"
|
|
|
|
|
|
>
|
|
|
|
|
|
<el-option
|
|
|
|
|
|
v-for="item in dict.ST_INV_IN_TYPE"
|
|
|
|
|
|
:key="item.value"
|
2026-06-20 12:00:00 +08:00
|
|
|
|
:disabled="item.value !== '0002' && item.value !== '0013' && item.value !== '0014'"
|
2025-05-19 16:33:07 +08:00
|
|
|
|
:label="item.label"
|
|
|
|
|
|
:value="item.value"
|
|
|
|
|
|
/>
|
|
|
|
|
|
</el-select>
|
|
|
|
|
|
</el-form-item>
|
2026-01-06 16:50:13 +08:00
|
|
|
|
<el-form-item :label="$t('common.container_name')">
|
2025-05-19 16:33:07 +08:00
|
|
|
|
<el-input
|
|
|
|
|
|
v-model="query.pcsn"
|
|
|
|
|
|
clearable
|
|
|
|
|
|
size="mini"
|
2026-01-06 16:50:13 +08:00
|
|
|
|
:placeholder="$t('common.container_name')"
|
2025-05-19 16:33:07 +08:00
|
|
|
|
@keyup.enter.native="crud.toQuery"
|
|
|
|
|
|
/>
|
|
|
|
|
|
</el-form-item>
|
2026-01-06 16:50:13 +08:00
|
|
|
|
<el-form-item :label="$t('common.pcsn')">
|
2025-05-19 16:33:07 +08:00
|
|
|
|
<el-input
|
|
|
|
|
|
v-model="query.sap_pcsn"
|
|
|
|
|
|
clearable
|
|
|
|
|
|
size="mini"
|
2026-01-06 16:50:13 +08:00
|
|
|
|
:placeholder="$t('common.pcsn')"
|
2025-05-19 16:33:07 +08:00
|
|
|
|
@keyup.enter.native="crud.toQuery"
|
|
|
|
|
|
/>
|
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
<rrOperation />
|
|
|
|
|
|
</el-form>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<!--如果想在工具栏加入更多按钮,可以使用插槽方式, slot = 'left' or 'right'-->
|
|
|
|
|
|
<crudOperation :permission="permission">
|
|
|
|
|
|
<el-button
|
|
|
|
|
|
slot="right"
|
|
|
|
|
|
class="filter-item"
|
|
|
|
|
|
type="success"
|
|
|
|
|
|
:disabled="crud.selections.length !== 1"
|
|
|
|
|
|
icon="el-icon-check"
|
|
|
|
|
|
size="mini"
|
|
|
|
|
|
@click="charge"
|
|
|
|
|
|
>
|
2026-06-23 11:44:59 +08:00
|
|
|
|
{{ $t('common.charge_against') }}
|
2025-05-19 16:33:07 +08:00
|
|
|
|
</el-button>
|
|
|
|
|
|
</crudOperation>
|
|
|
|
|
|
<!--表格渲染-->
|
|
|
|
|
|
<!--表格渲染-->
|
|
|
|
|
|
<el-table
|
|
|
|
|
|
ref="table"
|
|
|
|
|
|
v-loading="crud.loading"
|
|
|
|
|
|
:data="crud.data"
|
|
|
|
|
|
size="mini"
|
|
|
|
|
|
style="width: 100%;"
|
|
|
|
|
|
@selection-change="crud.selectionChangeHandler"
|
|
|
|
|
|
>
|
|
|
|
|
|
<el-table-column type="selection" width="55" />
|
2026-01-06 16:50:13 +08:00
|
|
|
|
<el-table-column show-overflow-tooltip prop="bill_code" width="130" :label="$t('common.bill_code')">
|
2025-05-19 16:33:07 +08:00
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
|
<el-link type="warning" @click="toView(scope.$index, scope.row)">{{ scope.row.bill_code }}</el-link>
|
|
|
|
|
|
</template>
|
|
|
|
|
|
</el-table-column>
|
2026-01-06 16:50:13 +08:00
|
|
|
|
<el-table-column show-overflow-tooltip :formatter="formatStatus" width="100" prop="bill_status" :label="$t('common.bill_status')" />
|
|
|
|
|
|
<el-table-column prop="stor_name" :label="$t('common.stor_name')" width="100" />
|
|
|
|
|
|
<el-table-column show-overflow-tooltip prop="bill_type" :formatter="bill_typeFormat" :label="$t('common.bill_type')" />
|
|
|
|
|
|
<el-table-column show-overflow-tooltip width="135" prop="biz_date" :label="$t('common.biz_date')" />
|
|
|
|
|
|
<el-table-column show-overflow-tooltip :formatter="create_modeFormat" prop="create_mode" :label="$t('common.create_mode')" width="100" />
|
|
|
|
|
|
<el-table-column :label="$t('common.detail_count')" align="center" prop="detail_count" width="100" />
|
|
|
|
|
|
<el-table-column :label="$t('common.total_qty')" align="center" prop="total_qty" width="100" />
|
|
|
|
|
|
<el-table-column show-overflow-tooltip :label="$t('common.remark')" align="center" prop="remark" width="100" />
|
|
|
|
|
|
<el-table-column show-overflow-tooltip :label="$t('common.input_optname')" align="center" prop="input_optname" />
|
|
|
|
|
|
<el-table-column show-overflow-tooltip :label="$t('common.input_time')" align="center" prop="input_time" width="140" />
|
|
|
|
|
|
<el-table-column show-overflow-tooltip :label="$t('common.update_optname')" align="center" prop="update_optname" />
|
|
|
|
|
|
<el-table-column show-overflow-tooltip :label="$t('common.update_time')" align="center" prop="update_time" width="140" />
|
|
|
|
|
|
<el-table-column show-overflow-tooltip :label="$t('common.dis_optname')" align="center" prop="dis_optname" />
|
|
|
|
|
|
<el-table-column show-overflow-tooltip :label="$t('common.dis_time')" align="center" prop="dis_time" width="140" />
|
|
|
|
|
|
<el-table-column show-overflow-tooltip :label="$t('common.confirm_optname')" align="center" prop="confirm_optname" />
|
|
|
|
|
|
<el-table-column show-overflow-tooltip :label="$t('common.confirm_time')" align="center" prop="confirm_time" width="140" />
|
2025-05-19 16:33:07 +08:00
|
|
|
|
</el-table>
|
|
|
|
|
|
<!--分页组件-->
|
|
|
|
|
|
<pagination />
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<ViewDialog :dialog-show.sync="viewShow" :rowmst="mstrow" @AddChanged="querytable" />
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
|
|
<script>
|
|
|
|
|
|
import CRUD, { crud, header, presenter } from '@crud/crud'
|
|
|
|
|
|
import rrOperation from '@crud/RR.operation'
|
|
|
|
|
|
import crudOperation from '@crud/CRUD.operation'
|
|
|
|
|
|
import udOperation from '@crud/UD.operation'
|
|
|
|
|
|
import pagination from '@crud/Pagination'
|
|
|
|
|
|
import DateRangePicker from '@/components/DateRangePicker/index'
|
|
|
|
|
|
import crudInchargefrom from '@/views/wms/st/incharge/incharge'
|
|
|
|
|
|
import crudStorattr from '@/views/wms/basedata/st/stor/storattr'
|
|
|
|
|
|
import ViewDialog from '@/views/wms/st/outbill/ViewDialog'
|
|
|
|
|
|
import crudUserStor from '@/views/wms/basedata/st/userStor/userStor'
|
|
|
|
|
|
|
|
|
|
|
|
export default {
|
|
|
|
|
|
name: 'Incharge',
|
|
|
|
|
|
components: { crudOperation, rrOperation, udOperation, pagination, DateRangePicker, ViewDialog },
|
|
|
|
|
|
cruds() {
|
|
|
|
|
|
return CRUD({
|
|
|
|
|
|
title: '入库冲销',
|
|
|
|
|
|
url: 'api/incharge',
|
|
|
|
|
|
idField: 'id',
|
|
|
|
|
|
sort: 'id,desc',
|
|
|
|
|
|
crudMethod: { ...crudInchargefrom },
|
|
|
|
|
|
optShow: {
|
|
|
|
|
|
add: false,
|
|
|
|
|
|
edit: false,
|
|
|
|
|
|
del: false,
|
|
|
|
|
|
download: false,
|
|
|
|
|
|
reset: false
|
|
|
|
|
|
},
|
|
|
|
|
|
queryOnPresenterCreated: false
|
|
|
|
|
|
})
|
|
|
|
|
|
},
|
|
|
|
|
|
mixins: [presenter(), header(), crud()],
|
|
|
|
|
|
// 数据字典
|
|
|
|
|
|
dicts: ['ST_CREATE_MODE', 'ST_INV_IN_TYPE', 'io_bill_status'],
|
|
|
|
|
|
data() {
|
|
|
|
|
|
return {
|
|
|
|
|
|
mstrow: {},
|
|
|
|
|
|
viewShow: false,
|
|
|
|
|
|
permission: {
|
|
|
|
|
|
},
|
|
|
|
|
|
storlist: []
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
created() {
|
|
|
|
|
|
crudUserStor.getUserStor().then(res => {
|
|
|
|
|
|
this.storlist = res
|
|
|
|
|
|
})
|
|
|
|
|
|
this.initQuery()
|
|
|
|
|
|
},
|
|
|
|
|
|
methods: {
|
|
|
|
|
|
/* 搜索框创建时间默认最近一周*/
|
|
|
|
|
|
initQuery() {
|
|
|
|
|
|
const end = new Date()
|
|
|
|
|
|
const start = new Date()
|
|
|
|
|
|
const endYear = end.getFullYear()
|
|
|
|
|
|
var endMonth = end.getMonth() + 1
|
|
|
|
|
|
if (end.getMonth() + 1 < 10) {
|
|
|
|
|
|
endMonth = '0' + endMonth.toString()
|
|
|
|
|
|
}
|
|
|
|
|
|
var endDay = end.getDate()
|
|
|
|
|
|
if (end.getDate() < 10) {
|
|
|
|
|
|
endDay = '0' + endDay.toString()
|
|
|
|
|
|
}
|
|
|
|
|
|
const endDate = endYear + '-' + endMonth + '-' + endDay + ' 23:59:59'
|
|
|
|
|
|
start.setTime(start.getTime() - 3600 * 1000 * 24 * 7)
|
|
|
|
|
|
const startYear = start.getFullYear()
|
|
|
|
|
|
var startMonth = start.getMonth() + 1
|
|
|
|
|
|
if (start.getMonth() + 1 < 10) {
|
|
|
|
|
|
startMonth = '0' + startMonth.toString()
|
|
|
|
|
|
}
|
|
|
|
|
|
var startDay = start.getDate()
|
|
|
|
|
|
if (start.getDate() < 10) {
|
|
|
|
|
|
startDay = '0' + startDay.toString()
|
|
|
|
|
|
}
|
|
|
|
|
|
const startDate = startYear + '-' + startMonth + '-' + startDay + ' 00:00:00'
|
|
|
|
|
|
this.$set(this.query, 'createTime', [startDate, endDate])
|
|
|
|
|
|
this.crud.toQuery()
|
|
|
|
|
|
},
|
|
|
|
|
|
// [CRUD.HOOK.beforeRefresh]() {
|
|
|
|
|
|
// return false
|
|
|
|
|
|
// },
|
|
|
|
|
|
toView(index, row) {
|
|
|
|
|
|
this.mstrow = row
|
|
|
|
|
|
this.viewShow = true
|
|
|
|
|
|
},
|
|
|
|
|
|
charge() {
|
|
|
|
|
|
const _selectData = this.$refs.table.selection
|
|
|
|
|
|
crudInchargefrom.charge(_selectData[0]).then(res => {
|
2026-01-06 16:50:13 +08:00
|
|
|
|
this.crud.notify(this.$t('common.Operation_success'), CRUD.NOTIFICATION_TYPE.SUCCESS)
|
2025-05-19 16:33:07 +08:00
|
|
|
|
this.crud.toQuery()
|
|
|
|
|
|
})
|
|
|
|
|
|
},
|
|
|
|
|
|
formatStatus(row) {
|
|
|
|
|
|
return this.dict.label.io_bill_status[row.bill_status]
|
|
|
|
|
|
},
|
|
|
|
|
|
bill_typeFormat(row) {
|
|
|
|
|
|
return this.dict.label.ST_INV_IN_TYPE[row.bill_type]
|
|
|
|
|
|
},
|
|
|
|
|
|
create_modeFormat(row) {
|
|
|
|
|
|
return this.dict.label.ST_CREATE_MODE[row.create_mode]
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
</script>
|
|
|
|
|
|
<style rel="stylesheet/scss" lang="scss" scoped>
|
|
|
|
|
|
::v-deep .el-dialog__body {
|
|
|
|
|
|
padding-top: 10px;
|
|
|
|
|
|
}
|
|
|
|
|
|
</style>
|