<template>
|
<div class="app-container stock-container">
|
<el-container>
|
<el-card class="box-card" style="width: 100%" shadow="never">
|
<!--搜索条件-->
|
<div class="filter-container">
|
<my-search ref="searchBar" :items="items" @search="fifterForm"></my-search>
|
</div>
|
<el-row style="margin-top: 15px">
|
<el-col>
|
<!--列表-->
|
<div :style="{ 'overflow-y': 'auto', height: 'calc(100vh - 352px)' }" v-loading="loading">
|
<el-row v-if="list.length" class="card" :gutter="5">
|
<el-col v-for="(item, index) in list" :key="index" class="cm-item">
|
<el-card class="card-data">
|
<div class="card-container">
|
<div class="card-header">
|
<div class="card-header-left">
|
<span>调拨单号:</span>
|
<span class="value">{{ item.businessFormCode }}</span>
|
<div v-if="item.states == 0 && item.procureDoc !=null" class="states states-warning">待出库</div>
|
<div v-if="item.states == 0 && item.procureDoc ==null" class="states states-warning">待提交</div>
|
<div v-if="item.states == 1" class="states states-warning">待接收</div>
|
<div v-if="item.states == 2" class="states states-success">已接收</div>
|
<div v-if="item.states == 4" class="states states-info">已撤销</div>
|
</div>
|
<div class="card-header-right">
|
<el-button
|
v-if="item.states == 0 && item.procureDoc !=null"
|
site="form"
|
type="success"
|
size="mini"
|
@click="handleOutput(item)"
|
>出库
|
</el-button
|
>
|
<el-button v-if="item.states == 2" site="form" type="primary" size="mini"
|
@click="handleExport('transferExport',`调拨出库单-${item.businessFormCode}`,{id:item.id,type: 2})">
|
导出调拨出库单
|
</el-button>
|
<el-button name="查看详情" site="form" type="info" size="mini" @click="handleDetail(item)"
|
>查看详情
|
</el-button
|
>
|
</div>
|
</div>
|
<div class="one-hed">
|
<div class="box"><span class="span-two">接收机构:</span>{{ item.inAgencyName }}</div>
|
<div class="box"><span class="span-two">申请人:</span>{{ item.operatorName }}</div>
|
<div class="box">
|
<span class="span-two">申请调拨时间:</span>{{ item.createTime | formatTime }}
|
</div>
|
<div class="box">
|
<span class="span-two">接收时间:</span>{{ item.inTime | formatTime }}
|
</div>
|
</div>
|
<div class="one-hed">
|
<div class="box"><span class="span-two">调拨机构:</span>{{ item.outAgencyName }}</div>
|
<div class="box"><span class="span-two">调拨人:</span>{{ item.outOperatorName }}</div>
|
<div class="box">
|
<span class="span-two">调拨时间:</span>{{ item.outputTime | formatTime }}
|
</div>
|
</div>
|
<div class="card-end">
|
<div v-for="(just, index) in item.fromTransferTemplateInfoList" :key="index" class="item">
|
<div class="name">{{ just.goodsName }}</div>
|
<div class="value-box">
|
<div class="value-box-item">
|
<span class="label">数量:</span>
|
<span class="value">{{ just.count }}</span>
|
<span class="unit">{{ just.unit }}</span>
|
</div>
|
</div>
|
</div>
|
</div>
|
</div>
|
</el-card>
|
</el-col>
|
</el-row>
|
<el-empty v-else description="暂无数据"></el-empty>
|
</div>
|
<el-pagination
|
:small="false"
|
:current-page="pageNum"
|
:page-sizes="[5, 10, 20, 50, 100, 200, 300, 400, 500]"
|
:page-size="pageSize"
|
layout="total, sizes, prev, pager, next, jumper"
|
:total="total"
|
@size-change="handleSizeChange"
|
@current-change="handleCurrentChange"
|
/>
|
</el-col>
|
</el-row>
|
</el-card>
|
</el-container>
|
<detail
|
v-if="detailSetting.show"
|
:setting="detailSetting"
|
@close="detailSetting.show = false"
|
ref="detailRef"
|
></detail>
|
</div>
|
</template>
|
|
<script>
|
import {transferList, transferOutput} from '@/api/stock/transfer';
|
import MyButton from '@/components/myButton/myButton';
|
import myImport from '@/views/components/myImport';
|
import detail from './detail';
|
import listPage from '@/views/mixins/listPage';
|
import transfer from '@/views/mixins/transfer';
|
import {commonsApi} from '@/api/commonsApi';
|
import SettingIplatform from '@/utils/settingIplatform';
|
|
export default {
|
name: 'index',
|
mixins: [listPage, transfer],
|
components: {MyButton, myImport, detail},
|
data() {
|
return {
|
loading: false,
|
list: [],
|
// 搜索框
|
items: [
|
{
|
type: 'text',
|
dataIndex: 'businessFormCode',
|
label: '调拨单号',
|
placeholder: '请输入',
|
defaultValue: '',
|
},
|
{
|
type: 'select',
|
dataIndex: 'goodsTemplateId',
|
label: '物品名称',
|
placeholder: '请输入',
|
defaultValue: '',
|
options: [],
|
cascader: [{key: 'baseGoodsModelsId', queryKey: 'goodsTemplatesId'}],
|
optionsConfig: {
|
label: 'goodsName',
|
value: 'id',
|
url: SettingIplatform.apiBaseURL + '/pc/base/goods/template/query/goodsTemplate',
|
},
|
},
|
{
|
type: 'cascader',
|
dataIndex: 'inAgencyId',
|
label: '接收机构',
|
placeholder: '请选择',
|
optionsConfig: {url: commonsApi.cascader_tree_fin_tenant, props: null},
|
defaultValue: '',
|
options: [],
|
},
|
{
|
type: 'select',
|
dataIndex: 'states',
|
label: '状态',
|
placeholder: '请选择',
|
defaultValue: '',
|
options: [],
|
},
|
{
|
type: 'date-picker',
|
dataIndex: 'createTimeStart',
|
label: '申请时间',
|
defaultValue: '',
|
},
|
{
|
type: 'date-picker',
|
dataIndex: 'createTimeEnd',
|
label: '至',
|
defaultValue: '',
|
},
|
{
|
type: 'date-picker',
|
dataIndex: 'startTime',
|
label: '接收时间',
|
defaultValue: '',
|
},
|
{
|
type: 'date-picker',
|
dataIndex: 'endTime',
|
label: '至',
|
defaultValue: '',
|
},
|
],
|
};
|
},
|
created() {
|
this.filterFrom = {
|
outAgencyId: this.userInfo.tenantId,
|
};
|
this.fetchData();
|
this.items.map((v) => {
|
if (v.label == '状态') {
|
v.options = this.statesOptions;
|
}
|
return v;
|
});
|
},
|
methods: {
|
fetchData() {
|
this.loading = true;
|
transferList({
|
qryType: 0,
|
pageNum: this.pageNum,
|
pageSize: this.pageSize,
|
...this.filterFrom,
|
}).then((res) => {
|
this.list = res.datas;
|
this.total = res.totalRows;
|
this.loading = false;
|
});
|
},
|
handleOutput(row) {
|
this.$confirm(`您确定 单号:${row.businessFormCode} 调拨出库吗?`, '调拨出库', {
|
beforeClose: (action, instance, done) => {
|
if (action == 'confirm') {
|
instance.confirmButtonLoading = true;
|
instance.confirmButtonText = '执行中...';
|
transferOutput({id: row.id})
|
.then((res) => {
|
this.$message.success('调拨出库成功!');
|
done();
|
instance.confirmButtonLoading = false;
|
this.search(1);
|
})
|
.catch(() => {
|
done();
|
});
|
} else {
|
done();
|
}
|
},
|
});
|
},
|
},
|
};
|
</script>
|
|
<style scoped lang="scss">
|
@import url(../../index.scss);
|
</style>
|