| | |
| | | <el-col> |
| | | <!--列表--> |
| | | <div class="table-tool-bar" style="margin-bottom: 15px"> |
| | | <my-button name="新增" @click="handleAdd" site="tools" size="medium" /> |
| | | <my-button name="导入" @click="importSetting.dialogShow = true" site="tools" size="medium" /> |
| | | <my-button name="新增" @click="handleAdd" site="tools" size="medium"/> |
| | | </div> |
| | | <div :style="{ 'overflow-y': 'auto', height: `${clientHeight - 320}px` }" v-loading="loading"> |
| | | <div :style="{ 'overflow-y': 'auto', height: `calc(100vh - 320px)` }" 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>分发单号:</span> |
| | | <span class="value">{{ item.businessFormCode }}</span> |
| | | <div class="states" :class="item.states == 1 ? '' : 'states-success'"> |
| | | {{ item.states == 1 ? '待入库' : '已入库' }} |
| | | </div> |
| | | |
| | | <span style="padding-left: 30px">分发状态:</span> |
| | | <span style="color: red" v-if="item.states === 0" class="value">未分发</span> |
| | | <span v-if="item.states === 2" class="value">已分发</span> |
| | | </div> |
| | | <div class="card-header-right"> |
| | | <template v-if="item.states == 1"> |
| | | <el-button name="编辑" site="form" type="success" size="mini" @click="handleEdit(item)" |
| | | >编辑</el-button |
| | | > |
| | | <el-button name="入库" site="form" type="primary" size="mini" @click="handleIncome(item)" |
| | | >入库</el-button |
| | | > |
| | | <el-button name="删除" site="form" type="danger" size="mini" @click="del(item)" |
| | | >删除</el-button |
| | | > |
| | | </template> |
| | | <template v-if="item.states != 1"> |
| | | <el-button site="form" type="success" size="mini" @click="handleExport(item)" |
| | | >导出入库单</el-button |
| | | > |
| | | </template> |
| | | <el-button name="查看详情" site="form" type="info" size="mini" @click="handleDetail(item)" |
| | | >查看详情</el-button |
| | | > |
| | | <!-- 导出单子 --> |
| | | <el-button v-if="item.states === 0" name="下载" site="form" type="primary" size="mini" @click="handleDetail(item)"> |
| | | 下载 |
| | | </el-button> |
| | | |
| | | <el-button v-if="item.states === 0" name="上传" site="form" type="primary" size="mini" @click="handleUploadPage(item)"> |
| | | 上传 |
| | | </el-button> |
| | | |
| | | <el-button name="查看详情" site="form" type="primary" size="mini" @click="handleDetail(item)"> |
| | | 查看详情 |
| | | </el-button> |
| | | </div> |
| | | </div> |
| | | <div class="one-hed"> |
| | | <div class="box"><span class="span-two">机构:</span>{{ item.agencyId }}</div> |
| | | <div class="box"><span class="span-two">操作人:</span>{{ item.buyerName }}</div> |
| | | <div class="box"><span class="span-two">部门:</span>{{ item.inWarehouseName }}</div> |
| | | <div class="box"><span class="span-two">分发人:</span>{{ item.outOperatorName }}</div> |
| | | <div class="box"> |
| | | <span class="span-two">采购时间:</span>{{ item.procureTime | formatTime }} |
| | | </div> |
| | | <div class="box"> |
| | | <span class="span-two">入库时间:</span>{{ item.incomeTime | formatTime }} |
| | | <span class="span-two">分发时间:</span>{{ item.inTime | formatTime }} |
| | | </div> |
| | | </div> |
| | | <div class="card-end"> |
| | | <div v-for="(just, index) in item.fromProcureTemplateInfoList" :key="index" class="item"> |
| | | <div class="name">{{ just.goodsTemplateName }}</div> |
| | | <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> |
| | |
| | | </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> |
| | | |
| | | <!-- 上传分发单文件--> |
| | | <uploadPage |
| | | v-if="uploadPageSetting.show" |
| | | :setting="uploadPageSetting" |
| | | ref="uploadRef" |
| | | @close="uploadPageSetting.show = false" |
| | | @search="refreshData" |
| | | ></uploadPage> |
| | | |
| | | <!--添加/编辑弹窗--> |
| | | <edit |
| | | v-if="editSetting.show" |
| | | :setting="editSetting" |
| | | ref="editRef" |
| | | @close="editSetting.show = false" |
| | | @search="refreshData" |
| | | v-if="editSetting.show" |
| | | :setting="editSetting" |
| | | ref="editRef" |
| | | @close="editSetting.show = false" |
| | | @search="refreshData" |
| | | ></edit> |
| | | <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> |
| | | <my-import |
| | | :import-setting="importSetting" |
| | | :dialog-show="importSetting.dialogShow" |
| | | :dialog-title="importSetting.dialogTitle" |
| | | /> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import { procureList, procureDel, procureIncome } from '@/api/stock/procure/purchaseOrder'; |
| | | import {transferList} from '@/api/stock/transfer'; |
| | | import MyButton from '@/components/myButton/myButton'; |
| | | import SettingIplatform from '@/utils/settingIplatform'; |
| | | import myImport from '@/views/components/myImport'; |
| | | import edit from './edit'; |
| | | import detail from './detail'; |
| | | import { getBaseUrl } from '@/utils/base'; |
| | | import listPage from '../../../mixins/listPage' |
| | | import uploadPage from './uploadPage'; |
| | | import listPage from '@/views/mixins/listPage'; |
| | | import {getUserDetail} from "@/utils/auth"; |
| | | |
| | | export default { |
| | | name: 'index', |
| | | mixins: [listPage], |
| | | components: { MyButton, myImport, edit, detail }, |
| | | components: {MyButton, myImport, edit, detail,uploadPage}, |
| | | data() { |
| | | return { |
| | | loading: false, |
| | |
| | | { |
| | | type: 'text', |
| | | dataIndex: 'businessFormCode', |
| | | label: '入库单号', |
| | | placeholder: '请输入', |
| | | defaultValue: '', |
| | | }, |
| | | { |
| | | type: 'text', |
| | | dataIndex: 'goodsTemplateName', |
| | | label: '物品名称', |
| | | placeholder: '可模糊搜索', |
| | | defaultValue: '', |
| | | }, |
| | | { |
| | | type: 'cascader', |
| | | dataIndex: 'agencyId', |
| | | label: '机构', |
| | | placeholder: '请选择', |
| | | optionsConfig: { url: '/pc/fin/sys/tenant/select/tree_fin_tenant', props: null }, |
| | | defaultValue: '', |
| | | options: [], |
| | | }, |
| | | { |
| | | type: 'text', |
| | | dataIndex: 'createName', |
| | | label: '创建人', |
| | | label: '分发单号', |
| | | placeholder: '请输入', |
| | | defaultValue: '', |
| | | }, |
| | | { |
| | | type: 'select', |
| | | dataIndex: 'states', |
| | | label: '状态', |
| | | dataIndex: 'departmentId', |
| | | label: '分发部门', |
| | | placeholder: '请选择', |
| | | optionsConfig: { |
| | | url: `/pc/fin/sys/tenant/department/list/all?tenantId=${getUserDetail().tenantId}`, |
| | | label: 'name', |
| | | value: 'id', |
| | | }, |
| | | defaultValue: '', |
| | | options: [ |
| | | { |
| | | label: '全部', |
| | | value: '', |
| | | }, |
| | | { |
| | | label: '待入库', |
| | | value: '1', |
| | | }, |
| | | { |
| | | label: '已入库', |
| | | value: '2', |
| | | }, |
| | | ], |
| | | options: [], |
| | | }, |
| | | { |
| | | type: 'date-picker', |
| | | dataIndex: 'incomeTimeStart', |
| | | label: '入库时间', |
| | | type: 'select', |
| | | dataIndex: 'goodsTemplateId', |
| | | label: '物品名称', |
| | | placeholder: '请输入', |
| | | defaultValue: '', |
| | | options: [], |
| | | optionsConfig: { |
| | | label: 'goodsName', |
| | | value: 'id', |
| | | url: SettingIplatform.apiBaseURL + `/pc/base/goods/template/query/goodsTemplate?tenantId=${getUserDetail().tenantId}`, |
| | | }, |
| | | }, |
| | | { |
| | | type: 'text', |
| | | dataIndex: 'operatorName', |
| | | label: '领取人', |
| | | placeholder: '请输入', |
| | | defaultValue: '', |
| | | }, |
| | | { |
| | | type: 'date-picker', |
| | | dataIndex: 'incomeTimeEnd', |
| | | dataIndex: 'startTime', |
| | | label: '领取时间', |
| | | defaultValue: '', |
| | | }, |
| | | { |
| | | type: 'date-picker', |
| | | dataIndex: 'endTime', |
| | | label: '至', |
| | | defaultValue: '', |
| | | }, |
| | | ], |
| | | // 树数据 |
| | | treeDataList: [], |
| | | // 导入 |
| | | importSetting: { |
| | | dialogTitle: '导入', |
| | | dialogShow: false, |
| | | fileSettings: { |
| | | data: {}, |
| | | uploadUrl: getBaseUrl() + '/pc/fin/sys/tenant/import', // 上传地址 |
| | | accept: '.xls', // 格式 |
| | | type: 'text', // 回显形式 |
| | | loading: false, // 导入效果 |
| | | }, |
| | | /* 模板下载 */ |
| | | templateSettings: { |
| | | templateName: '导入模板.xls', // 名称 |
| | | templateUrl: SettingIplatform.apiBaseURL + '/pc/fin/sys/tenant/getImportTemplate', // 下载地址 |
| | | }, |
| | | onSuccess: null, |
| | | }, |
| | | treeDataList: [] |
| | | }; |
| | | }, |
| | | created() { |
| | | this.fetchData() |
| | | }, |
| | | methods: { |
| | | fetchData() { |
| | | this.loading = true; |
| | | procureList({ |
| | | transferList({ |
| | | qryType: 1, |
| | | pageNum: this.pageNum, |
| | | pageSize: this.pageSize, |
| | | outAgencyId: this.userInfo.tenantId, |
| | | ...this.filterFrom, |
| | | }).then((res) => { |
| | | this.list = res.datas; |
| | | this.total = res.totalRows; |
| | | this.loading = false; |
| | | console.log(this.list); |
| | | }); |
| | | }, |
| | | |
| | | //导入 |
| | | importOrg() { |
| | | this.importSetting.dialogShow = true; |
| | | this.importSetting.onSuccess = (response, callBack) => { |
| | | if (response.code === 1) { |
| | | this.$message.success(response.msg); |
| | | this.search(1); |
| | | } else { |
| | | this.$message.warning(response.msg); |
| | | } |
| | | callBack(); |
| | | }; |
| | | }, |
| | | // 入库 |
| | | handleIncome(row) { |
| | | this.$confirm(`您确定 单号:${row.businessFormCode} 入库吗?`, '采购入库').then(() => { |
| | | procureIncome({ id: row.id }) |
| | | .then((res) => { |
| | | this.$message.success('入库成功!'); |
| | | this.search(); |
| | | }) |
| | | .catch(() => {}); |
| | | }); |
| | | }, |
| | | del(row) { |
| | | this.$modal.confirm('是否确认删除入库单号为"' + row.businessFormCode + '"的数据吗?').then( () => { |
| | | procureDel({ id: row.id }) |
| | | .then((res) => { |
| | | this.$message.success('删除成功!'); |
| | | this.search(); |
| | | }) |
| | | .catch(() => {}); |
| | | }); |
| | | }, |
| | | fifterForm(params) { |
| | | this.filterFrom = Object.assign(this.filterFrom, params); |
| | | if (this.filterFrom.incomeTimeStart) { |
| | | this.filterFrom.incomeTimeStart = this.filterFrom.incomeTimeStart.replace(/\-/g, ''); |
| | | } |
| | | if (this.filterFrom.incomeTimeEnd) { |
| | | this.filterFrom.incomeTimeEnd = this.filterFrom.incomeTimeEnd.replace(/\-/g, ''); |
| | | } |
| | | if (this.filterFrom.agencyId && this.filterFrom.agencyId.length) { |
| | | this.filterFrom.agencyId = this.filterFrom.agencyId[this.filterFrom.agencyId.length - 1]; |
| | | } |
| | | this.search(1); |
| | | }, |
| | | } |
| | | }, |
| | | }; |
| | | </script> |
| | | |
| | | <style scoped lang="scss"> |
| | | @import url(../../../../styles/store.scss); |
| | | //@import url(../../../../styles/index.scss); |
| | | </style> |