|  |  |  | 
|---|
|  |  |  | </el-table-column> | 
|---|
|  |  |  | <el-table-column prop="param1" label="类型" min-width="70" show-overflow-tooltip> | 
|---|
|  |  |  | <template v-slot="{ row }"> | 
|---|
|  |  |  | <span v-if="row.type || row.type == 0">{{ StoreTypeOps[row.type] }}</span> | 
|---|
|  |  |  | <span v-if="row.type || row.type == 0">{{ StoreTypeOps[row.type].name }}</span> | 
|---|
|  |  |  | </template> | 
|---|
|  |  |  | </el-table-column> | 
|---|
|  |  |  | <el-table-column prop="warehouseName" label="仓库" min-width="90" show-overflow-tooltip /> | 
|---|
|  |  |  | <el-table-column prop="code" label="单据编号" min-width="120" show-overflow-tooltip> | 
|---|
|  |  |  | <el-table-column prop="code" label="单据编号" min-width="140"> | 
|---|
|  |  |  | <template v-slot="{ row }"> | 
|---|
|  |  |  | <span class="primaryColor">{{ row.code }}</span> | 
|---|
|  |  |  | <span class="primaryColor pointer" @click='detailClick(row)'>{{ row.code }}</span> | 
|---|
|  |  |  | </template> | 
|---|
|  |  |  | </el-table-column> | 
|---|
|  |  |  | <el-table-column prop="createUserName" label="创建人" min-width="80" show-overflow-tooltip /> | 
|---|
|  |  |  | 
|---|
|  |  |  | <div class="mt20"> | 
|---|
|  |  |  | <Pagination @size-change="handleSizeChange" @current-change="getList" :pagination="pagination" /> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | <!--  --> | 
|---|
|  |  |  | <OutDetail v-if="isShowOutDetail" ref="OutDetailRef" /> | 
|---|
|  |  |  | <InDetail v-if="isShowInDetail" ref="InDetailRef" /> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | </template> | 
|---|
|  |  |  |  | 
|---|
|  |  |  | <script> | 
|---|
|  |  |  | import Pagination from '@/components/common/Pagination' | 
|---|
|  |  |  | import QueryForm from '@/components/common/QueryForm' | 
|---|
|  |  |  | import InDetail from './components/InDetail' | 
|---|
|  |  |  | import OutDetail from './components/OutDetail.vue' | 
|---|
|  |  |  |  | 
|---|
|  |  |  | import dayjs from 'dayjs' | 
|---|
|  |  |  | import duration from 'dayjs/plugin/duration' | 
|---|
|  |  |  |  | 
|---|
|  |  |  | dayjs.extend(duration) | 
|---|
|  |  |  | import { ywOutinboundRecord, ywOutinboundRecordEx } from '@/api' | 
|---|
|  |  |  | import { fetchList as getStoreList } from '@/api/ywWarehouse' | 
|---|
|  |  |  | 
|---|
|  |  |  | export default { | 
|---|
|  |  |  | components: { | 
|---|
|  |  |  | Pagination, | 
|---|
|  |  |  | QueryForm | 
|---|
|  |  |  | QueryForm, | 
|---|
|  |  |  | InDetail, | 
|---|
|  |  |  | OutDetail | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | data() { | 
|---|
|  |  |  | return { | 
|---|
|  |  |  | loading: false, | 
|---|
|  |  |  | isShowInDetail: false, | 
|---|
|  |  |  | isShowOutDetail: false, | 
|---|
|  |  |  | pagination: { | 
|---|
|  |  |  | pageSize: 10, | 
|---|
|  |  |  | page: 1, | 
|---|
|  |  |  | 
|---|
|  |  |  | } | 
|---|
|  |  |  | }) | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | detailClick(item) { | 
|---|
|  |  |  | const index = item.code.indexOf('RK') | 
|---|
|  |  |  | if(index > -1){ | 
|---|
|  |  |  | this.isShowInDetail = true | 
|---|
|  |  |  | this.$nextTick(() => { | 
|---|
|  |  |  | this.$refs.InDetailRef.visible = true | 
|---|
|  |  |  | this.$refs.InDetailRef.getDetail(item.outInBoundId) | 
|---|
|  |  |  | }) | 
|---|
|  |  |  | }else{ | 
|---|
|  |  |  | this.isShowOutDetail = true | 
|---|
|  |  |  | this.$nextTick(() => { | 
|---|
|  |  |  | this.$refs.OutDetailRef.visible = true | 
|---|
|  |  |  | this.$refs.OutDetailRef.getDetail(item.outInBoundId) | 
|---|
|  |  |  | }) | 
|---|
|  |  |  | } | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | handleEx() { | 
|---|
|  |  |  | this.$dialog.exportConfirm('确认导出吗?') | 
|---|
|  |  |  | .then(() => { | 
|---|
|  |  |  | 
|---|
|  |  |  | filters.createDateStart = null | 
|---|
|  |  |  | filters.createDateEnd = null | 
|---|
|  |  |  | } | 
|---|
|  |  |  | if(page){ | 
|---|
|  |  |  | pagination.page = page | 
|---|
|  |  |  | } | 
|---|
|  |  |  | ywOutinboundRecord({ | 
|---|
|  |  |  | model: { | 
|---|
|  |  |  | ...filters | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | capacity: pagination.pageSize, | 
|---|
|  |  |  | page: page || pagination.page, | 
|---|
|  |  |  | page: pagination.page, | 
|---|
|  |  |  | }).then(res => { | 
|---|
|  |  |  | this.loading = false | 
|---|
|  |  |  | this.list = res.records || [] | 
|---|