| | |
| | | <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"> |
| | | <div class="table-tool-bar" style="margin-bottom: 15px"> |
| | | <my-button name="新增" @click="handleAdd" site="tools" size="medium" /> |
| | | </div> |
| | | <div :style="{ 'overflow-y': 'auto', height: `${clientHeight - 320}px` }"> |
| | | <el-row class="card" :gutter="5" v-loading="loading"> |
| | | <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 ? '待调拨' : '已调拨' }} |
| | | {{ item.states == 1 ? '待报废' : '已报废' }} |
| | | </div> |
| | | </div> |
| | | <div class="card-header-right"> |
| | | <el-button site="form" type="success" size="mini" @click="handleExport(item)" |
| | | >导出调拨出库单</el-button |
| | | >导出报废单</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 }}</div> |
| | | <div class="box"><span class="span-two">接收时间:</span>{{ item.procureTime }}</div> |
| | | <div class="box"><span class="span-two">调拨机构:</span>{{ item.procureTime }}</div> |
| | | <div class="box"><span class="span-two">调拨人:</span>{{ item.procureTime }}</div> |
| | | <div class="box"><span class="span-two">调拨时间:</span>{{ item.procureTime }}</div> |
| | | <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.models" :key="index" class="item"> |
| | | <div class="name">{{ just.baseGoodsModelsId }}</div> |
| | | <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.counts }}</span> |
| | | <span class="value">{{ just.count }}</span> |
| | | <span class="unit">{{ just.unit }}</span> |
| | | </div> |
| | | </div> |
| | |
| | | </el-card> |
| | | </el-container> |
| | | <!--添加/编辑弹窗--> |
| | | <edit ref="editRef"></edit> |
| | | <detail ref="detailRef"></detail> |
| | | <edit |
| | | 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" |
| | | ></detail> |
| | | <my-import |
| | | :import-setting="importSetting" |
| | | :dialog-show="importSetting.dialogShow" |
| | |
| | | |
| | | <script> |
| | | import { procureList, procureDel, procureIncome } from '@/api/stock/procure/purchaseOrder'; |
| | | import { getTree } from '@/api/baseSetting/finsystenant'; |
| | | 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 * as DateFormatter from '@/utils/DateFormatter'; |
| | | |
| | | export default { |
| | | name: 'index', |
| | |
| | | { |
| | | type: 'text', |
| | | dataIndex: 'businessFormCode', |
| | | label: '调拨单号', |
| | | label: '报废单号', |
| | | placeholder: '请输入', |
| | | defaultValue: '', |
| | | }, |
| | |
| | | defaultValue: '', |
| | | }, |
| | | { |
| | | type: 'select', |
| | | dataIndex: 'name', |
| | | type: 'cascader', |
| | | dataIndex: 'agencyId', |
| | | label: '机构', |
| | | placeholder: '请选择', |
| | | optionsConfig: { url: '/pc/fin/sys/tenant/select/tree_fin_tenant', props: null }, |
| | | defaultValue: '', |
| | | options: [], |
| | | }, |
| | | { |
| | | type: 'text', |
| | | dataIndex: 'buyerName', |
| | | label: '创建人', |
| | | placeholder: '请输入', |
| | | defaultValue: '', |
| | | }, |
| | | { |
| | | type: 'select', |
| | | dataIndex: 'states', |
| | | label: '状态', |
| | | placeholder: '请选择', |
| | | defaultValue: '', |
| | | options: [ |
| | | { |
| | | label: '全部', |
| | | value: '', |
| | | }, |
| | | { |
| | | label: '待调拨', |
| | | value: '1', |
| | | }, |
| | | { |
| | | label: '已调拨', |
| | | value: '2', |
| | | }, |
| | | ], |
| | | }, |
| | | { |
| | | type: 'date-picker', |
| | | dataIndex: 'val1', |
| | | label: '调拨时间', |
| | | dataIndex: 'incomeTimeStart', |
| | | label: '报废时间', |
| | | defaultValue: '', |
| | | }, |
| | | { |
| | | type: 'date-picker', |
| | | dataIndex: 'val2', |
| | | dataIndex: 'incomeTimeEnd', |
| | | label: '至', |
| | | defaultValue: '', |
| | | }, |
| | |
| | | orgId: '', |
| | | show: false, |
| | | }, |
| | | detailSetting: { |
| | | title: '详情', |
| | | id: '', |
| | | show: false, |
| | | }, |
| | | pageNum: 1, |
| | | pageSize: 10, |
| | | total: 0, |
| | |
| | | computed: { |
| | | clientHeight() { |
| | | return document.documentElement.clientHeight; |
| | | }, |
| | | }, |
| | | filters: { |
| | | formatTime(time) { |
| | | if (!time) return; |
| | | return DateFormatter.LongToDateTime(time); |
| | | }, |
| | | }, |
| | | created() { |
| | |
| | | console.log(this.list); |
| | | }); |
| | | }, |
| | | |
| | | //导入 |
| | | importOrg() { |
| | | this.importSetting.dialogShow = true; |
| | |
| | | // 导出 |
| | | handleExport() {}, |
| | | // 新增 |
| | | addtable() { |
| | | this.$refs.editRef.open(); |
| | | handleAdd() { |
| | | this.editSetting.id = null; |
| | | this.editSetting.info = null; |
| | | this.editSetting.title = '新增'; |
| | | this.editSetting.show = true; |
| | | }, |
| | | // 编辑 |
| | | handleEdit(row) { |
| | | this.$refs.editRef.open(row.id); |
| | | this.editSetting.id = row.id; |
| | | this.editSetting.info = null; |
| | | this.editSetting.title = '编辑'; |
| | | this.editSetting.show = true; |
| | | }, |
| | | // 详情 |
| | | handleDetail(row) { |
| | | this.$refs.detailRef.open(row.id); |
| | | this.detailSetting.id = row.id; |
| | | this.detailSetting.show = true; |
| | | }, |
| | | // 调拨 |
| | | // 报废 |
| | | handleIncome(row) { |
| | | this.$confirm(`您确定 单号:${row.businessFormCode} 调拨吗?`, '采购调拨') |
| | | .then(function () { |
| | | procureIncome({ id: row.id }).then((res) => { |
| | | this.$message.success('调拨成功!'); |
| | | }); |
| | | }) |
| | | .then((res) => { |
| | | this.search(); |
| | | }) |
| | | .catch(() => {}); |
| | | 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(function () { |
| | | procureDel({ id: row.id }).then((res) => {}); |
| | | }) |
| | | .then((res) => { |
| | | this.$message.success('删除成功!'); |
| | | this.search(); |
| | | }) |
| | | .catch(() => {}); |
| | | this.$modal.confirm('是否确认删除报废单号为"' + row.businessFormCode + '"的数据吗?').then(() => { |
| | | procureDel({ id: row.id }) |
| | | .then((res) => { |
| | | this.$message.success('删除成功!'); |
| | | this.search(); |
| | | }) |
| | | .catch(() => {}); |
| | | }); |
| | | }, |
| | | // 分页 |
| | | handleSizeChange(pageSize) { |
| | | this.pageSize = pageSize; |
| | | this.search({ pageNum: 1 }); |
| | | this.search(1); |
| | | }, |
| | | handleCurrentChange(pageNum) { |
| | | this.myTable.paging.page.pageNum = pageNum; |
| | | this.search({ pageNum: pageNum }); |
| | | this.pageNum = pageNum; |
| | | this.search(pageNum); |
| | | }, |
| | | // 查询table列表 |
| | | search(pageNum) { |
| | | if (pageNum) { |
| | | this.pageNum = pageNum; |
| | | } |
| | | this.fetchData(); |
| | | }, |
| | | refreshData() { |
| | | this.pageNum = 1; |
| | | this.pageSize = 10; |
| | | this.search(); |
| | | }, |
| | | 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.length) { |
| | | this.filterFrom.agencyId = this.filterFrom.agencyId[this.filterFrom.agencyId.length - 1]; |
| | | } |
| | | this.search(1); |
| | | }, |
| | | }, |