| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361 |
- <template>
- <ele-modal
- custom-class="ele-dialog-form long-dialog-form"
- :centered="true"
- v-if="visible"
- :visible.sync="visible"
- :title="title"
- :close-on-click-modal="false"
- :model="isModal"
- width="70%"
- @close="cancel"
- >
- <div class="switch">
- <div class="switch_left">
- <ul>
- <li
- v-for="item in tabOptions"
- :key="item.key"
- :class="{ active: activeComp == item.key }"
- @click="activeComp = item.key"
- >
- {{ item.name }}
- </li>
- </ul>
- </div>
- </div>
- <div v-if="activeComp == 'main'">
- <el-form ref="form" :model="form" label-width="120px" class="el-form-box">
- <headerTitle title="基本信息">
- <!-- <el-button
- size="small"
- type="primary"
- icon="el-icon-s-grid"
- class="ele-btn-icon"
- @click="exportTable"
- >
- 导出
- </el-button> -->
- </headerTitle>
- <el-row>
- <el-col :span="8">
- <el-form-item label="采购计划单名称:" class="form_item_label" prop="planName">
- <el-input v-model="form.planName" disabled>
- <template slot="append" v-if="form.planName">
- <el-button type="primary" @click="openPlanDetail(form)" title="查看详情" icon="el-icon-view"></el-button>
- </template>
- </el-input>
- </el-form-item>
- </el-col>
- <el-col :span="8">
- <el-form-item label="询价单名称:" prop="inquiryName">
- <el-input v-model="form.inquiryName" disabled></el-input>
- </el-form-item>
- </el-col>
- <el-col :span="8">
- <el-form-item prop="acceptUnpack" label="是否接受拆单:">
- <el-select v-model="form.acceptUnpack" placeholder="请选择" disabled style="width: 100%">
- <el-option label="接受" :value="1"></el-option>
- <el-option label="不接受" :value="0"></el-option>
- </el-select>
- </el-form-item>
- </el-col>
- </el-row>
- <el-row>
- <el-col :span="8">
- <el-form-item prop="remark" label="备注:">
- <el-input type="textarea" v-model="form.remark" disabled></el-input>
- </el-form-item>
- </el-col>
- <el-col :span="8">
- <el-form-item prop="askFile" label="附件:">
- <fileMain v-model="form.files" type="view"></fileMain>
- <!-- <el-link-->
- <!-- v-if="form.files && form.files !== ''"-->
- <!-- type="primary"-->
- <!-- :underline="false"-->
- <!-- @click="downloadFile(form.files)">-->
- <!-- {{ form.files.name }}</el-link>-->
- </el-form-item>
- </el-col>
- </el-row>
- </el-form>
- <headerTitle title="产品清单" style="margin-top: 15px"></headerTitle>
- <ele-pro-table
- ref="table"
- :needPage="false"
- :columns="columns"
- :toolkit="[]"
- :datasource="form.detailList"
- row-key="id"
- >
- <template v-slot:files="{ row }">
- <fileMain v-model="row.files" type="view"></fileMain>
- <!-- <div v-if="row.files && row.files?.length">-->
- <!-- <el-link-->
- <!-- v-for="link in row.files"-->
- <!-- :key="link.id"-->
- <!-- type="primary"-->
- <!-- :underline="false"-->
- <!-- @click="downloadFile(link)"-->
- <!-- >-->
- <!-- {{ link.name }}</el-link-->
- <!-- >-->
- <!-- </div>-->
- </template>
- </ele-pro-table>
- <headerTitle title="报价清单" style="margin-top: 15px"></headerTitle>
- <inquiryTable
- :radio="form.winnerId"
- v-for="item in form.supplierList"
- :key="item.supplierId"
- style="margin-top: 15px"
- status="Detail"
- :obj="item"
- ></inquiryTable>
- </div>
- <bpmDetail
- v-if="activeComp === 'bpm' && form.processInstanceId"
- :id="form.processInstanceId"
- ></bpmDetail>
- <div slot="footer" class="footer">
- <el-button @click="cancel">返回</el-button>
- </div>
- <planDetaillog ref="planDetaillogRef" :isModal="false"></planDetaillog>
- </ele-modal>
- </template>
- <script>
- import { getpurchaseinquiry } from '@/api/purchasingManage/inquiryManage';
- import { getFile } from '@/api/system/file';
- import dictMixins from '@/mixins/dictMixins';
- import { copyObj } from '@/utils/util';
- import inquiryTable from './inquiryTable.vue';
- import planDetaillog from '../../../purchasingManage/purchasePlanManage/components/detailDialog.vue';
- import bpmDetail from '@/views/bpm/processInstance/detail.vue';
- import fileMain from "@/components/addDoc/index.vue";
- export default {
- mixins: [dictMixins],
- components: {
- fileMain,
- inquiryTable,
- planDetaillog,bpmDetail
- },
- props: {
- isModal: {
- default: true
- }
- },
- data() {
- return {
- activeComp: 'main',
- tabOptions: [
- { key: 'main', name: '核价单详情' },
- { key: 'bpm', name: '流程详情' }
- ],
- visible: false,
- title: '详情',
- row: {},
- form: {},
- detailData: {},
- inventoryList: [],
- columns: [
- {
- width: 45,
- type: 'index',
- columnKey: 'index',
- align: 'center',
- fixed: 'left'
- },
- {
- minWidth: 100,
- label: '状态',
- fixed: 'left',
- formatter: (row, column) => {
- return row.isInquiry==1?'已核价':'未核价'
- },
- align: 'center'
- },
- {
- minWidth: 100,
- prop: 'productCategoryName',
- label: '分类',
- slot: 'productCategoryName',
- align: 'center',
- showOverflowTooltip: true,
- },
- {
- minWidth: 120,
- prop: 'productCode',
- label: '编码',
- slot: 'productCode',
- showOverflowTooltip: true,
- align: 'center',
- },
- {
- minWidth: 120,
- prop: 'productName',
- label: '名称',
- slot: 'productName',
- showOverflowTooltip: true,
- align: 'center',
- },
- {
- minWidth: 80,
- prop: 'productBrand',
- label: '牌号',
- slot: 'productBrand',
- showOverflowTooltip: true,
- align: 'center',
- },
- {
- minWidth: 80,
- prop: 'totalCount',
- label: '数量',
- slot: 'totalCount',
- showOverflowTooltip: true,
- align: 'center',
- },
- {
- width: 120,
- prop: 'totalWeight',
- label: '重量',
- slot: 'totalWeight',
- align: 'center'
- },
- {
- minWidth: 80,
- prop: 'measuringUnit',
- label: '单位',
- slot: 'measuringUnit',
- showOverflowTooltip: true,
- align: 'center',
- },
- {
- minWidth: 120,
- prop: 'modelType',
- label: '型号',
- slot: 'modelType',
- showOverflowTooltip: true,
- align: 'center',
- },
- {
- minWidth: 120,
- prop: 'specification',
- label: '规格',
- slot: 'specification',
- showOverflowTooltip: true,
- align: 'center',
- },
- // {
- // width: 130,
- // prop: 'modelType',
- // label: '品牌',
- // slot: 'modelType'
- // },
- {
- minWidth: 170,
- prop: 'expectReceiveDate',
- label: '到货日期',
- slot: 'expectReceiveDate',
- showOverflowTooltip: true,
- align: 'center',
- },
- {
- minWidth: 140,
- prop: 'files',
- label: '附件',
- slot: 'files',
- align: 'center',
- },
- {
- minWidth: 220,
- prop: 'remark',
- label: '备注',
- slot: 'remark',
- showOverflowTooltip: true,
- align: 'center',
- }
- ]
- };
- },
- methods: {
- // //导出
- // async exportTable() {
- // this.loading = true;
- // const response = await getExport(this.detailId);
- // },
- async open(row) {
- this.visible = true;
- this.getInquiryData(row.id);
- this.detailId = row.id;
- },
- cancel() {
- this.$nextTick(() => {
- // 关闭后,销毁所有的表单数据
- (this.form = {}),
- (this.otherForm = copyObj(this.otherFormDef)),
- (this.tableBankData = []);
- this.tableLinkData = [];
- this.visible = false;
- });
- },
- downloadFile(file) {
- getFile({ objectName: file.storePath }, file.name);
- },
- async getInquiryData(id) {
- this.loading = true;
- const data = await getpurchaseinquiry(id);
- this.loading = false;
- if (data) {
- this.form = data;
- if (data.files && data.files.length > 0) {
- this.form.files = data.files[0];
- } else {
- this.form.files = null;
- }
- }
- // await this.getDetailData(data.requirementId);
- },
- //查看详情
- openPlanDetail(row) {
- this.$refs.planDetaillogRef.open(row);
- }
- // //获取需求详情
- // async getDetailData(id) {
- // this.loading = true;
- // let data = await getDetail(id);
- // this.loading = false;
- // if (data) {
- // this.$nextTick(() => {
- // this.inventoryList = copyObj(data.detailList);
- // });
- // }
- // }
- }
- };
- </script>
- <style scoped lang="scss">
- .ele-dialog-form {
- .el-form-item {
- margin-bottom: 10px;
- }
- }
- .headbox {
- display: flex;
- justify-content: space-between;
- align-items: center;
- .amount {
- font-size: 14px;
- font-weight: bold;
- }
- }
- </style>
|