| | |
| | | <template> |
| | | <div class="app-container"> |
| | | <div class="app-container stock-container"> |
| | | <el-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> |
| | | <!--列表--> |
| | | <my-button name="新增" @click="addtable" site="form" /> |
| | | <div :style="{'overflow-y': 'auto', height:`${clientHeight - 320}px`}"> |
| | | <el-row class="card" |
| | | :gutter="5"> |
| | | <el-col v-for="(item, index) in proData" :key="index" class="cm-item"> |
| | | <el-card class="card-data"> |
| | | <div class="card-container"> |
| | | <div class="hed-one"> <span>调拨单号:{{ item.order_no }}</span><span style="margin-left: 20px;"><el-button type="warning" plain size="mini">待接收</el-button></span></div> |
| | | <div class="one-hed"> |
| | | <div class="box"><span class="span-two">接受机构:</span>{{ item.customer_name }}</div> |
| | | <div class="box"><span class="span-two">申请人:</span>{{ item.customer_name }}</div> |
| | | <div class="box"><span class="span-two">申请调拨时间:</span>{{ item.customer_name }}</div> |
| | | <div class="box"><span class="span-two">接收时间:</span>{{ item.customer_name }}</div> |
| | | <div class="box"><span class="span-two">调拨时间:</span>{{ item.customer_name }}</div> |
| | | <div class="box"><span class="span-two">接受人:</span>{{ item.customer_name }}</div> |
| | | <div class="box"><span class="span-two">接受时间:</span>{{ item.customer_name }}</div> |
| | | </div> |
| | | <div class="card-end"> |
| | | <div v-for="(just, index) in item.data" class="two-end"> |
| | | <div class="item"><span>{{ just.order_no }}:</span>{{ just.customer_name }}</div> |
| | | </div> |
| | | </div> |
| | | <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: `${clientHeight - 320}px` }" v-loading="loading"> |
| | | <el-row 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> |
| | | <div class="card-header-right"> |
| | | <el-button site="form" type="success" size="mini" @click="handleExport(item)" |
| | | >导出调拨单</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.agencyId }}</div> |
| | | <div class="box"><span class="span-two">申请人:</span>{{ item.buyerName }}</div> |
| | | <div class="box"> |
| | | <span class="span-two">申请调拨时间:</span>{{ item.procureTime | formatTime }} |
| | | </div> |
| | | <div class="box"> |
| | | <span class="span-two">接收时间:</span>{{ item.procureTime | formatTime }} |
| | | </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.procureTime | 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 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 class="card-but"> |
| | | <div style="margin-top: 10px;"> |
| | | <my-button style="width: 120px;" name="删除" site="form" /> |
| | | <my-button style="width: 120px;" name="查看详情" site="form" /> |
| | | </div> |
| | | </div> |
| | | |
| | | </el-card> |
| | | </el-col> |
| | | </el-row> |
| | | </div> |
| | | <el-pagination |
| | | :small="false" |
| | | :current-page="1" |
| | | :page-sizes="[5, 10, 20, 50, 100, 200, 300, 400, 500]" |
| | | :page-size="10" |
| | | layout="total, sizes, prev, pager, next, jumper" |
| | | :total="0" |
| | | @size-change="handleSizeChange" |
| | | @current-change="handleCurrentChange" |
| | | /> |
| | | </el-col> |
| | | </el-row> |
| | | <!--添加/编辑弹窗--> |
| | | <el-dialog title="新增出库" :close-on-click-modal="false" :visible.sync="adddialog" width="60%" > |
| | | <el-form ref="ruleForm" :model="formData" class="demo-ruleForm" label-width="100px"> |
| | | <el-row :gutter="24" class="headerHeight"> |
| | | <el-col :span="12"> |
| | | <el-form-item label="仓库名称" prop="name"> |
| | | <el-input v-model="formData.name" clearable maxlength="20" show-word-limit style="width: 100%"/> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="仓库名称" prop="name"> |
| | | <el-input v-model="formData.name" clearable maxlength="20" show-word-limit style="width: 100%"/> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row :gutter="24" class="headerHeight"> |
| | | <el-col :span="24"> |
| | | <el-form-item label="出库手续" prop="name"> |
| | | 仅允许导入xls、xlsx格式文件 |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <div style="position: relative;"> |
| | | <div style="background-color: #F9F9F9;width: 90%;"> |
| | | <el-row :gutter="24" class=""> |
| | | <el-col :span="12"> |
| | | <el-form-item label="仓库名称" prop="name"> |
| | | <el-input v-model="formData.name" clearable maxlength="20" show-word-limit style="width: 100%"/> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="仓库名称" prop="name"> |
| | | <el-input v-model="formData.name" clearable maxlength="20" show-word-limit style="width: 100%"/> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row :gutter="24" class=""> |
| | | <el-col :span="12"> |
| | | <el-form-item label="仓库名称" prop="name"> |
| | | <el-input v-model="formData.name" clearable maxlength="20" show-word-limit style="width: 100%"/> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-table :data="formData.tableData" height="100%" :stripe="true"> |
| | | <el-table-column prop="projectName" label="规格型号" align="center"> </el-table-column> |
| | | <el-table-column prop="time1" label="单位" align="center"> </el-table-column> |
| | | <el-table-column prop="unit" label="现有库存" align="center"> </el-table-column> |
| | | <el-table-column prop="time2" label="出库数量" align="center"> </el-table-column> |
| | | </el-table> |
| | | </div> |
| | | <div style="position: absolute;right: 0;top: 152px;"> |
| | | <my-button style="display: block;margin-left: 10px;margin-bottom: 5px;" name="移除" site="form"/> |
| | | <my-button name="新增物品" site="form"/> |
| | | </div> |
| | | </div> |
| | | </el-form> |
| | | <div slot="footer" align="center" class="dialog-footer"> |
| | | <my-button name="确定" site="form" /> |
| | | <my-button name="取消" site="form" @click="adddialog = false"/> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </el-card> |
| | | </el-col> |
| | | </el-row> |
| | | </div> |
| | | </el-dialog> |
| | | </el-card> |
| | | </el-container> |
| | | <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> |
| | | <!--添加/编辑弹窗--> |
| | | <edit v-if="editSetting.show" :setting="editSetting" ref="editRef" @close="editSetting.show=false" @search="refreshData"></edit> |
| | | <detail ref="detailRef"></detail> |
| | | <my-import |
| | | :import-setting="importSetting" |
| | | :dialog-show="importSetting.dialogShow" |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | import MyButton from "@/components/myButton/myButton"; |
| | | import { procureList, procureDel, procureIncome } from '@/api/stock/procure/purchaseOrder'; |
| | | import MyButton from '@/components/myButton/myButton'; |
| | | import SettingIplatform from '@/utils/settingIplatform'; |
| | | import myImport from '@/views/components/myImport' |
| | | import {getBaseUrl} from '@/utils/base'; |
| | | import myImport from '@/views/components/myImport'; |
| | | import edit from './edit'; |
| | | import detail from './detail'; |
| | | import { getBaseUrl } from '@/utils/base'; |
| | | import * as DateFormatter from '@/utils/DateFormatter'; |
| | | |
| | | export default { |
| | | name: "index", |
| | | components: {MyButton, myImport}, |
| | | name: 'index', |
| | | components: { MyButton, myImport, edit, detail }, |
| | | data() { |
| | | return { |
| | | |
| | | loading: false, |
| | | adddialog: false, |
| | | formData:{ |
| | | tableData:[ |
| | | { |
| | | projectName:'555' |
| | | }, |
| | | { |
| | | projectName:'444' |
| | | } |
| | | ], |
| | | }, |
| | | list: [], |
| | | // 搜索框 |
| | | items: [ |
| | | { |
| | | type: 'text', |
| | | dataIndex: 'name', |
| | | label: '出库单号', |
| | | dataIndex: 'businessFormCode', |
| | | label: '调拨单号', |
| | | placeholder: '请输入', |
| | | defaultValue: '' |
| | | defaultValue: '', |
| | | }, |
| | | { |
| | | type: 'text', |
| | | dataIndex: 'name', |
| | | dataIndex: 'goodsTemplateName', |
| | | label: '物品名称', |
| | | placeholder: '可模糊搜索', |
| | | defaultValue: '' |
| | | defaultValue: '', |
| | | }, |
| | | { |
| | | type: 'select', |
| | | dataIndex: 'name', |
| | | label: '机构', |
| | | placeholder: '请选择', |
| | | defaultValue: '', |
| | | options: [], |
| | | }, |
| | | { |
| | | type: 'text', |
| | | dataIndex: 'name', |
| | | dataIndex: 'buyerName', |
| | | label: '创建人', |
| | | placeholder: '请输入', |
| | | defaultValue: '' |
| | | defaultValue: '', |
| | | }, |
| | | { |
| | | type: 'select', |
| | | dataIndex: 'states', |
| | | label: '状态', |
| | | placeholder: '请选择', |
| | | defaultValue: '', |
| | | options: [ |
| | | { |
| | | label: '全部', |
| | | value: '', |
| | | }, |
| | | { |
| | | label: '待调拨', |
| | | value: '1', |
| | | }, |
| | | { |
| | | label: '已调拨', |
| | | value: '2', |
| | | }, |
| | | ], |
| | | }, |
| | | { |
| | | type: 'date-picker', |
| | | dataIndex: 'val1', |
| | | label: '出库时间', |
| | | defaultValue: '' |
| | | label: '调拨时间', |
| | | defaultValue: '', |
| | | }, |
| | | { |
| | | type: 'date-picker', |
| | | dataIndex: 'val2', |
| | | label: '至', |
| | | defaultValue: '' |
| | | defaultValue: '', |
| | | }, |
| | | // { |
| | | // type: 'select', |
| | | // dataIndex: 'status', |
| | | // label: '状态', |
| | | // placeholder: '请选择', |
| | | // defaultValue: '1', |
| | | // options: [ |
| | | // { |
| | | // label: '启用', |
| | | // value: '1' |
| | | // }, |
| | | // { |
| | | // label: '禁用', |
| | | // value: '0' |
| | | // } |
| | | // ] |
| | | // } |
| | | ], |
| | | proData: [ |
| | | { |
| | | order_no:'55555', |
| | | customer_name:'郑州市邮政分公司', |
| | | data:[ |
| | | { |
| | | order_no:'石勒芬褐色碳粉', |
| | | customer_name:'20件' |
| | | }, |
| | | { |
| | | order_no:'石勒芬褐色碳粉', |
| | | customer_name:'666' |
| | | }, |
| | | ] |
| | | }, |
| | | { |
| | | order_no:'55555', |
| | | customer_name:'郑州市邮政分公司', |
| | | data:[ |
| | | { |
| | | order_no:'石勒芬褐色碳粉', |
| | | customer_name:'666' |
| | | }, |
| | | { |
| | | order_no:'石勒芬褐色碳粉', |
| | | customer_name:'666' |
| | | }, |
| | | { |
| | | order_no:'石勒芬褐色碳粉', |
| | | customer_name:'666' |
| | | }, |
| | | { |
| | | order_no:'石勒芬褐色碳粉', |
| | | customer_name:'666' |
| | | }, |
| | | { |
| | | order_no:'石勒芬褐色碳粉', |
| | | customer_name:'郑州市邮政分公司' |
| | | }, |
| | | ] |
| | | }, |
| | | { |
| | | order_no:'55555', |
| | | customer_name:'郑州市邮政分公司', |
| | | data:[ |
| | | { |
| | | order_no:'石勒芬褐色碳粉', |
| | | customer_name:'20件' |
| | | }, |
| | | { |
| | | order_no:'石勒芬褐色碳粉', |
| | | customer_name:'666' |
| | | }, |
| | | ] |
| | | }, |
| | | { |
| | | order_no:'55555', |
| | | customer_name:'郑州市邮政分公司', |
| | | data:[ |
| | | { |
| | | order_no:'石勒芬褐色碳粉', |
| | | customer_name:'20件' |
| | | }, |
| | | { |
| | | order_no:'石勒芬褐色碳粉', |
| | | customer_name:'666' |
| | | }, |
| | | ] |
| | | |
| | | }, |
| | | { |
| | | order_no:'55555', |
| | | customer_name:'郑州市邮政分公司', |
| | | data:[ |
| | | { |
| | | order_no:'石勒芬褐色碳粉', |
| | | customer_name:'20件' |
| | | }, |
| | | { |
| | | order_no:'石勒芬褐色碳粉', |
| | | customer_name:'666' |
| | | }, |
| | | ] |
| | | |
| | | }, |
| | | { |
| | | order_no:'55555', |
| | | customer_name:'郑州市邮政分公司', |
| | | data:[ |
| | | { |
| | | order_no:'石勒芬褐色碳粉', |
| | | customer_name:'20件' |
| | | }, |
| | | { |
| | | order_no:'石勒芬褐色碳粉', |
| | | customer_name:'666' |
| | | }, |
| | | ] |
| | | |
| | | }, |
| | | { |
| | | order_no:'55555', |
| | | customer_name:'郑州市邮政分公司', |
| | | data:[ |
| | | { |
| | | order_no:'石勒芬褐色碳粉', |
| | | customer_name:'20件' |
| | | }, |
| | | { |
| | | order_no:'石勒芬褐色碳粉', |
| | | customer_name:'666' |
| | | }, |
| | | ] |
| | | |
| | | } |
| | | ], |
| | | // 树数据 |
| | | treeDataList: [], |
| | |
| | | tenantId: null, |
| | | userName: null, |
| | | userPhone: null, |
| | | status: 1 |
| | | states: null, |
| | | }, |
| | | // 导入 |
| | | 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 |
| | | 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, |
| | | }, |
| | | editSetting: { |
| | | title: '', |
| | |
| | | orgId: '', |
| | | show: false, |
| | | }, |
| | | } |
| | | pageNum: 1, |
| | | pageSize: 10, |
| | | total: 0, |
| | | }; |
| | | }, |
| | | computed: { |
| | | clientHeight () { |
| | | return document.documentElement.clientHeight |
| | | clientHeight() { |
| | | return document.documentElement.clientHeight; |
| | | }, |
| | | }, |
| | | filters: { |
| | | formatTime(time) { |
| | | if (!time) return; |
| | | return DateFormatter.LongToDateTime(time); |
| | | }, |
| | | }, |
| | | created() { |
| | | this.fetchData(); |
| | | }, |
| | | methods: { |
| | | handleSizeChange(){}, |
| | | handleCurrentChange(){}, |
| | | fetchData() { |
| | | this.loading = true; |
| | | procureList({ |
| | | pageNum: this.pageNum, |
| | | pageSize: this.pageSize, |
| | | ...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() |
| | | 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(); |
| | | }; |
| | | }, |
| | | |
| | | addtable() { |
| | | this.adddialog = true |
| | | // 导出 |
| | | handleExport() {}, |
| | | // 新增 |
| | | handleAdd() { |
| | | this.editSetting.id = null; |
| | | this.editSetting.info = null; |
| | | this.editSetting.title = '新增'; |
| | | this.editSetting.show = true; |
| | | }, |
| | | // 编辑 |
| | | handleEdit(row) { |
| | | this.editSetting.id = row.id; |
| | | this.editSetting.info = null; |
| | | this.editSetting.title = '编辑'; |
| | | this.editSetting.show = true; |
| | | }, |
| | | // 详情 |
| | | handleDetail(row) { |
| | | this.$refs.detailRef.open(row.id); |
| | | }, |
| | | // 调拨 |
| | | handleIncome(row) { |
| | | this.$confirm(`您确定 单号:${row.businessFormCode} 调拨吗?`, '调拨调拨') |
| | | .then(function () { |
| | | procureIncome({ id: row.id }).then((res) => { |
| | | this.$message.success('调拨成功!'); |
| | | this.search(); |
| | | }); |
| | | }) |
| | | .catch(() => {}); |
| | | }, |
| | | del(row) { |
| | | this.$modal |
| | | .confirm('是否确认删除调拨单号为"' + row.businessFormCode + '"的数据吗?') |
| | | .then(function () { |
| | | procureDel({ id: row.id }).then((res) => {}); |
| | | }) |
| | | .then((res) => { |
| | | this.$message.success('删除成功!'); |
| | | this.search(); |
| | | }) |
| | | .catch(() => {}); |
| | | }, |
| | | // 分页 |
| | | handleSizeChange(pageSize) { |
| | | this.pageSize = pageSize; |
| | | this.search({ pageNum: 1 }); |
| | | }, |
| | | handleCurrentChange(pageNum) { |
| | | this.myTable.paging.page.pageNum = pageNum; |
| | | this.search({ pageNum: pageNum }); |
| | | }, |
| | | // 查询table列表 |
| | | search(pageNum) { |
| | | if (pageNum != undefined) { |
| | | // this.$refs.myTable.search(pageNum) |
| | | } else { |
| | | // this.$refs.myTable.search() |
| | | } |
| | | this.fetchData(); |
| | | }, |
| | | refreshData() { |
| | | this.pageNum = 1; |
| | | this.pageSize = 10; |
| | | this.search(); |
| | | }, |
| | | fifterForm(params) { |
| | | console.log(params,'555'); |
| | | this.filterFrom = Object.assign(this.filterFrom, params) |
| | | this.search(1) |
| | | } |
| | | } |
| | | } |
| | | this.filterFrom = Object.assign(this.filterFrom, params); |
| | | this.search(1); |
| | | }, |
| | | }, |
| | | }; |
| | | </script> |
| | | |
| | | <style scoped> |
| | | .card { |
| | | display: flex; |
| | | flex-wrap: wrap; |
| | | margin: 0px !important; |
| | | .cm-item { |
| | | width: 100%; |
| | | } |
| | | .cm-item /deep/ .el-card__body { |
| | | padding: 10px; |
| | | } |
| | | } |
| | | .card-data{ |
| | | position: relative; |
| | | margin-top: 8px; |
| | | .card-container{ |
| | | display: inline-block; |
| | | width: 70%; |
| | | .hed-one{ |
| | | color: #2298EE; |
| | | font-size: 18px; |
| | | } |
| | | .one-hed{ |
| | | margin-top: 5px; |
| | | .box{ |
| | | display: inline-block; |
| | | margin-right: 20px; |
| | | margin-top: 10px; |
| | | } |
| | | } |
| | | .span-two{ |
| | | color: #83919e; |
| | | font-size: 14px; |
| | | } |
| | | .card-end{ |
| | | font-size: 14px; |
| | | color: #3d3d3d; |
| | | margin-top: 15px; |
| | | display: flex; |
| | | flex-wrap: wrap; |
| | | .two-end{ |
| | | width: calc(33.33% - 20px); |
| | | margin-bottom: 15px; |
| | | } |
| | | } |
| | | |
| | | } |
| | | .card-but{ |
| | | position: absolute; |
| | | right: 20px; |
| | | top: 40%; |
| | | } |
| | | |
| | | } |
| | | |
| | | <style scoped lang="scss"> |
| | | @import url(../../index.scss); |
| | | </style> |