| | |
| | | <el-row style="margin-top: 15px"> |
| | | <el-col> |
| | | <!--列表--> |
| | | <div :style="{ 'overflow-y': 'auto', height: `${clientHeight - 320}px` }" v-loading="loading"> |
| | | <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-header-left"> |
| | | <span>调拨单号:</span> |
| | | <span class="value">{{ item.businessFormCode }}</span> |
| | | <div v-if="item.states == 0" class="states states-warning">待出库</div> |
| | | <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 == 1" |
| | | site="form" |
| | | type="success" |
| | | size="mini" |
| | | >导出调拨出库单</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 == 0" |
| | | site="form" |
| | | type="success" |
| | | size="mini" |
| | | @click="handleOutput(item)" |
| | | >出库</el-button |
| | | > |
| | | <el-button |
| | | v-if="item.states == 2" |
| | | site="form" |
| | | type="primary" |
| | | size="mini" |
| | | >导出调拨入库单</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 |
| | | >查看详情 |
| | | </el-button |
| | | > |
| | | </div> |
| | | </div> |
| | |
| | | <span class="span-two">申请调拨时间:</span>{{ item.createTime | formatTime }} |
| | | </div> |
| | | <div class="box"> |
| | | <span class="span-two">接收时间:</span>{{ item.procureTime | formatTime }} |
| | | <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.procureTime | formatTime }} |
| | | <span class="span-two">调拨时间:</span>{{ item.outputTime | formatTime }} |
| | | </div> |
| | | </div> |
| | | <div class="card-end"> |
| | |
| | | </el-card> |
| | | </el-col> |
| | | </el-row> |
| | | <div class="no-data" v-else>暂无数据</div> |
| | | <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" |
| | | :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" |
| | | v-if="detailSetting.show" |
| | | :setting="detailSetting" |
| | | @close="detailSetting.show = false" |
| | | ref="detailRef" |
| | | ></detail> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import { transferList,transferOutput } from '@/api/stock/transfer'; |
| | | 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 '../../../mixins/listPage'; |
| | | import transfer from '../../../mixins/transfer'; |
| | | import { commonsApi } from '@/api/commonsApi'; |
| | | 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 }, |
| | | components: {MyButton, myImport, detail}, |
| | | data() { |
| | | return { |
| | | loading: false, |
| | | adddialog: false, |
| | | list: [], |
| | | // 搜索框 |
| | | items: [ |
| | |
| | | defaultValue: '', |
| | | }, |
| | | { |
| | | type: 'text', |
| | | dataIndex: 'goodsTemplateName', |
| | | type: 'select', |
| | | dataIndex: 'goodsTemplateId', |
| | | label: '物品名称', |
| | | placeholder: '可模糊搜索', |
| | | 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 }, |
| | | optionsConfig: {url: commonsApi.cascader_tree_fin_tenant, props: null}, |
| | | defaultValue: '', |
| | | options: [], |
| | | }, |
| | |
| | | fetchData() { |
| | | this.loading = true; |
| | | transferList({ |
| | | qryType: 0, |
| | | pageNum: this.pageNum, |
| | | pageSize: this.pageSize, |
| | | ...this.filterFrom, |
| | |
| | | this.list = res.datas; |
| | | this.total = res.totalRows; |
| | | this.loading = false; |
| | | console.log(this.list); |
| | | }); |
| | | }, |
| | | handleOutput(row) { |
| | | this.$confirm(`您确定 单号:${row.businessFormCode} 调拨出库吗?`, '调拨出库').then(() => { |
| | | transferOutput({ id: row.id }) |
| | | .then((res) => { |
| | | this.$message.success('调拨出库成功!'); |
| | | this.search(1); |
| | | }) |
| | | 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(); |
| | | } |
| | | }, |
| | | }); |
| | | }, |
| | | fifterForm(params) { |
| | | this.filterFrom = Object.assign(this.filterFrom, params); |
| | | if (this.filterFrom.createTimeStart) { |
| | | this.filterFrom.createTimeStart = this.filterFrom.createTimeStart.replace(/\-/g, ''); |
| | | } |
| | | if (this.filterFrom.createTimeEnd) { |
| | | this.filterFrom.createTimeEnd = this.filterFrom.createTimeEnd.replace(/\-/g, ''); |
| | | } |
| | | if (this.filterFrom.startTime) { |
| | | this.filterFrom.startTime = this.filterFrom.startTime.replace(/\-/g, ''); |
| | | } |
| | | if (this.filterFrom.endTime) { |
| | | this.filterFrom.endTime = this.filterFrom.endTime.replace(/\-/g, ''); |
| | | } |
| | | this.search(1); |
| | | }, |
| | | }, |
| | | }; |