1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123 |
- <template>
- <div v-loading.fullscreen.lock="fullscreenLoading">
- <div class="customer-head">
- <div class="customer-back">
- <el-button
- type="danger"
- style="border: none;background: none;color: red"
- icon="el-icon-arrow-left"
- @click="backToList"
- >返回列表
- </el-button>
- </div>
- <div>
- <div class="el-button--small-yh add-customer-btn">
- <el-button type="success" size="small" @click="release()" :disabled="form.status !== 3">发布</el-button>
- <el-button type="warning" size="small" @click="pleaseCheck()" :disabled="form.status !== 0">请核</el-button>
- <el-button type="warning" size="small" @click.stop="checkDialog = true,checkData = detailData.check" v-if="checkDisabled">审批</el-button>
- <el-button type="primary" size="small" @click="storage()">保存</el-button>
- <el-dropdown style="margin-left: 10px">
- <el-button type="primary" size="small">
- 业务处理<i class="el-icon-arrow-down el-icon--right"></i>
- </el-button>
- <el-dropdown-menu slot="dropdown">
- <el-dropdown-item @click.native="copyNew()" :disabled="!form.id">复制新增</el-dropdown-item>
- <el-dropdown-item @click.native="toVoid()" :disabled="form.status < 4 || !form.status">取消发布</el-dropdown-item>
- <el-dropdown-item @click.native="checkScheduleDialog = true,checkId=form.id" :disabled="form.status < 0 || !form.status">审批流程</el-dropdown-item>
- </el-dropdown-menu>
- </el-dropdown>
- </div>
- </div>
- </div>
- <trade-card title="基础资料" style="margin-top: 50px">
- <avue-form :option="optionForm" v-model="form" ref="form"></avue-form>
- </trade-card>
- <trade-card title="箱信息">
- <avue-crud ref="crudBox" :key="key" :option="optionBox" :data="dataListBox"
- @resetColumn="resetColumn('crudBox','optionBox','optionBoxTwo',201.1)"
- @saveColumn="saveColumn('crudBox','optionBox','optionBoxTwo',201.1)">
- <template slot-scope="{row,index}" slot="menu">
- <el-button
- type="text"
- size="small"
- :icon="row.$cellEdit?'el-icon-circle-plus-outline':'el-icon-edit'"
- @click="edit(row)"
- >{{ row.$cellEdit ? '确 认' : '编 辑' }}
- </el-button>
- <el-button
- type="text"
- size="small"
- icon="el-icon-delete"
- v-if="form.status === 0"
- @click="rowDel(row,index,'box')"
- >删 除
- </el-button>
- </template>
- </avue-crud>
- </trade-card>
- <trade-card title="代理信息">
- <avue-crud ref="crudAgent" :key="key" :option="optionAgent" :data="dataListAgent"
- @resetColumn="resetColumn('crudAgent','optionAgent','optionAgentTwo',201.2)"
- @saveColumn="saveColumn('crudAgent','optionAgent','optionAgentTwo',201.2)">
- <template slot-scope="{row,index}" slot="menu">
- <el-button
- type="text"
- size="small"
- :icon="row.$cellEdit?'el-icon-circle-plus-outline':'el-icon-edit'"
- @click="edit(row)"
- >{{ row.$cellEdit ? '确 认' : '编 辑' }}
- </el-button>
- <el-button
- type="text"
- size="small"
- icon="el-icon-delete"
- v-if="form.status === 0"
- @click="rowDel(row,index,'agent')"
- >删 除
- </el-button>
- </template>
- <template slot="menuLeft">
- <el-button
- type="success"
- size="small"
- icon="el-icon-bottom"
- @click="dialogVisible = true"
- >导入
- </el-button>
- </template>
- </avue-crud>
- </trade-card>
- <trade-card title="投标对比">
- <avue-crud ref="crudBid" :key="key" :option="optionBid" :data="dataListBid"
- @resetColumn="resetColumn('crudBid','optionBid','optionBidTwo',201.3)"
- @saveColumn="saveColumn('crudBid','optionBid','optionBidTwo',201.3)">
- <template slot-scope="{row,index}" slot="menu">
- <el-button
- type="text"
- size="small"
- :icon="row.$cellEdit?'el-icon-circle-plus-outline':'el-icon-edit'"
- @click="edit(row)"
- >{{ row.$cellEdit ? '确 认' : '编 辑' }}
- </el-button>
- <el-button
- type="text"
- size="small"
- @click="winningTheBid(row,index)"
- v-if="row.status === 5"
- >确认中标
- </el-button>
- </template>
- </avue-crud>
- </trade-card>
- <el-dialog
- v-dialogdrag
- title="导入客户"
- :fullscreen="dialogFull"
- :visible.sync="dialogVisible"
- class="el-dialogDeep"
- append-to-body
- :close-on-click-modal="false"
- width="80%"
- >
- <template slot="title">
- <span class="el-dialog__title">
- <span
- style="display:inline-block;background-color: #3478f5;width:3px;height:20px;margin-right:5px; float: left;margin-top:2px"
- ></span>
- 导入客户
- </span>
- <div
- style="float: right"
- class="avue-crud__dialog__menu"
- @click="dialogFull ? (dialogFull = false) : (dialogFull = true)"
- >
- <i class="el-icon-full-screen"></i>
- </div>
- </template>
- <el-row style="height: 0">
- <el-col :span="5">
- <div class="box">
- <el-scrollbar>
- <basic-container>
- <avue-tree
- :option="treeOption"
- :data="treeData"
- @node-click="nodeClick"
- />
- </basic-container>
- </el-scrollbar>
- </div>
- </el-col>
- <el-col :span="19">
- <basic-container>
- <avue-crud
- :option="option"
- :data="dataList"
- ref="crud"
- v-model="form"
- :page.sync="page"
- :before-close="beforeClose"
- @search-change="searchChange"
- @search-reset="searchReset"
- @refresh-change="refreshChange"
- @selection-change="selectionChange"
- @on-load="onLoad"
- @saveColumn="saveColumn('crud','option','option',47)"
- @tree-load="treeLoad"
- >
- </avue-crud>
- </basic-container>
- </el-col>
- </el-row>
- <span slot="footer" class="dialog-footer">
- <el-button @click="dialogVisible = false">取 消</el-button>
- <el-button
- type="primary"
- @click="confirmSelection"
- :disabled="selection.length > 0 ? false : true"
- >确 定</el-button>
- </span>
- </el-dialog>
- <el-dialog
- append-to-body
- title="审批"
- class="el-dialogDeep"
- :visible.sync="checkDialog"
- width="50%"
- :close-on-click-modal="false"
- :destroy-on-close="true"
- :close-on-press-escape="false"
- v-dialog-drag
- >
- <check
- :checkData="checkData"
- :checkDetail="false"
- :idList="[]"
- @choceCheckFun="checkDialog = false"
- >
- </check>
- </el-dialog>
- <el-dialog
- append-to-body
- title="审批进度"
- class="el-dialogDeep"
- :visible.sync="checkScheduleDialog"
- width="40%"
- :close-on-click-modal="false"
- :destroy-on-close="true"
- :close-on-press-escape="false"
- v-dialog-drag
- >
- <check-schedule
- :checkId="checkId"
- :batchNo="batchNo"
- @choceScheduleFun="checkScheduleDialog = false"
- >
- </check-schedule>
- </el-dialog>
- </div>
- </template>
- <script>
- import {
- detailDelegationList,
- saveSaveList,
- boxDelete,
- agentDelete,
- confirmRelease, confirmVoid, confirmPleaseCheck, confirmWinningTheBid,allList
- } from "@/api/bidingDocument/issueTender";
- import check from "@/components/check/check";
- import checkSchedule from "@/components/check/checkSchedule";
- import {dateFormat} from "@/util/date";
- import option from "@/components/selectComponent/configuration/mainList.json";
- import {customerList, getDeptLazyTree} from "@/api/basicData/customerInformation";
- import {customerParameter} from "@/enums/management-type";
- export default {
- name: "detailsPageEdit",
- components:{
- check,
- checkSchedule
- },
- watch: {
- form: {
- handler(newValue, oldValue) {
- if (this.form.status > 0){
- this.$set(this.optionForm,'disabled',true)
- this.$set(this.optionBox,'addRowBtn',false)
- this.$set(this.optionAgent,'addRowBtn',false)
- this.optionBox.column.forEach(item=>{
- this.$set(item,'disabled',true)
- if (item.prop === "remark"){
- this.$set(item,'disabled',false)
- }
- })
- this.optionAgent.column.forEach(item=>{
- this.$set(item,'disabled',true)
- if (item.prop === "remark"){
- this.$set(item,'disabled',false)
- }
- })
- }else {
- this.$set(this.optionForm,'disabled',false)
- this.findObject(this.optionForm.column, "status").disabled = true
- this.$set(this.optionBox,'disabled',false)
- if (this.optionBox.column){
- this.findObject(this.optionBox.column, "status").disabled = true
- }
- this.$set(this.optionAgent,'disabled',false)
- if (this.optionAgent.column){
- this.findObject(this.optionAgent.column, "status").disabled = true
- }
- }
- }
- }
- },
- data() {
- return {
- dialogVisible:false,
- option:{},
- treeOption: {
- nodeKey: "id",
- lazy: true,
- treeLoad: function (node, resolve) {
- const parentId = node.level === 0 ? 0 : node.data.id;
- getDeptLazyTree({
- parentId: parentId,
- corpType: customerParameter.code
- }).then(res => {
- resolve(
- res.data.data.map(item => {
- return {
- ...item,
- leaf: !item.hasChildren
- };
- })
- );
- });
- },
- addBtn: false,
- menu: false,
- size: "small",
- props: {
- labelText: "标题",
- label: "title",
- value: "value",
- children: "children"
- }
- },
- dataList:[],
- page: {
- pageSize: 10,
- pagerCount: 5,
- total: 0
- },
- dialogFull: false,
- checkDialog:false,
- checkScheduleDialog:false,
- checkId: '',
- batchNo:'',
- line:'',
- key:0,
- selection:[],
- checkData: {},
- fullscreenLoading: false,
- optionForm: {
- submitBtn: false,
- emptyBtn: false,
- span: 6,
- column: [{
- label: '发布日期',
- prop: 'releaseTime',
- type: "datetime",
- format: 'yyyy-MM-dd HH:mm',
- valueFormat: 'yyyy-MM-dd HH:mm:ss',
- value:dateFormat(new Date, 'yyyy-MM-dd hh:mm:ss'),
- rules: [{
- required: true,
- message: " ",
- trigger: "change"
- }],
- }, {
- label: '截止日期',
- prop: 'deadlineTime',
- type: "datetime",
- format: 'yyyy-MM-dd HH:mm',
- valueFormat: 'yyyy-MM-dd HH:mm:ss',
- rules: [{
- required: true,
- message: " ",
- trigger: "change"
- }],
- }, {
- label: '合同号',
- prop: 'contractNo',
- rules: [{
- required: true,
- message: " ",
- trigger: "change"
- }],
- }, {
- label: '状态',
- disabled:true,
- prop: 'status',
- dataType: "number",
- type: 'select',
- dicUrl: "/api/blade-system/dict-biz/dictionary?code=main_bid_status",
- props: {
- label: "dictValue",
- value: "dictKey"
- }
- }, {
- label: '起运港',
- prop: 'departureHarbor',
- filterable: true,
- type: "select",
- dicUrl: "/api/blade-client/port/allList",
- props: {
- label: "name",
- value: "name"
- },
- rules: [{
- required: true,
- message: " ",
- trigger: "change"
- }],
- }, {
- label: '目的港',
- prop: 'objectiveHarbor',
- filterable: true,
- type: "select",
- dicUrl: "/api/blade-client/port/allList",
- props: {
- label: "name",
- value: "name"
- },
- change:(data)=>{
- allList().then(res=>{
- for (let item of res.data.data){
- if (data.value == item.name){
- this.line = item.line
- }
- }
- })
- },
- rules: [{
- required: true,
- message: " ",
- trigger: "change"
- }],
- }, {
- label: '起运地',
- prop: 'departureLand',
- filterable: true,
- type: "select",
- dicUrl: "/api/blade-client/port/allList",
- props: {
- label: "name",
- value: "name"
- }
- }, {
- label: '目的地',
- prop: 'objectiveLand',
- filterable: true,
- type: "select",
- dicUrl: "/api/blade-client/port/allList",
- props: {
- label: "name",
- value: "name"
- }
- }, {
- label: '装柜日期',
- prop: 'loadingTime',
- type: "datetime",
- format: 'yyyy-MM-dd HH:mm',
- valueFormat: 'yyyy-MM-dd HH:mm:ss',
- rules: [{
- required: true,
- message: " ",
- trigger: "change"
- }],
- }, {
- label: '是否直航',
- prop: 'directFlight',
- type: 'select',
- dicData: [{
- label: '是',
- value: 1
- }, {
- label: '否',
- value: 0
- }],
- value:1,
- rules: [{
- required: true,
- message: " ",
- trigger: "change"
- }],
- }, {
- label: '转港',
- prop: 'transshipment',
- filterable: true,
- type: "select",
- dicUrl: "/api/blade-client/port/allList",
- props: {
- label: "name",
- value: "name"
- }
- }, {
- label: '运输方式',
- prop: 'transportType',
- type: 'select',
- dicUrl: "/api/blade-system/dict-biz/dictionary?code=mode_transport",
- props: {
- label: "dictValue",
- value: "dictValue"
- },
- value:"海运",
- rules: [{
- required: true,
- message: " ",
- trigger: "change"
- }],
- }, {
- label: '运输条款',
- prop: 'transportClause',
- value: "CY-CY",
- rules: [{
- required: true,
- message: " ",
- trigger: "change"
- }],
- }, {
- label: '件数',
- prop: 'number',
- value:10,
- rules: [{
- required: true,
- message: " ",
- trigger: "change"
- }],
- }, {
- label: '包装',
- prop: 'packing',
- type: 'select',
- dicUrl: "/api/blade-system/dict-biz/dictionary?code=packaging",
- props: {
- label: "dictValue",
- value: "dictValue"
- },
- value:"木箱",
- rules: [{
- required: true,
- message: " ",
- trigger: "change"
- }],
- }, {
- label: '重量(kgs)',
- prop: 'weight',
- value:27000,
- rules: [{
- required: true,
- message: " ",
- trigger: "change"
- }],
- }, {
- label: '尺码(cmb)',
- prop: 'size',
- value:18,
- rules: [{
- required: true,
- message: " ",
- trigger: "change"
- }],
- }, {
- label: '货物信息',
- prop: 'cargoInformation',
- span: 18,
- value: "GLASS",
- rules: [{
- required: true,
- message: " ",
- trigger: "change"
- }],
- }, {
- label: '备注',
- prop: 'remark',
- type: 'textarea',
- span: 24,
- }]
- },
- optionBox:{},
- optionBoxTwo: {
- align: 'center',
- index: true,
- refreshBtn: false,
- addBtn: false,
- addRowBtn: true,
- cellBtn: false,
- editBtn: false,
- delBtn: false,
- column: [{
- label: '箱型',
- prop: 'boxType',
- cell: true,
- type: "select",
- dicUrl: "/api/blade-system/dict-biz/dictionary?code=boxType",
- props: {
- label: "dictValue",
- value: "dictValue"
- },
- index:1,
- }, {
- label: '箱量',
- prop: 'boxAmount',
- cell: true,
- index:2,
- },
- // {
- // label: '海运费',
- // prop: 'seaFreight',
- // cell: true,
- // index:3,
- // }, {
- // label: '起运港箱使费',
- // prop: 'departureHarborFee',
- // cell: true,
- // index:4,
- // }, {
- // label: '目的港箱使费',
- // prop: 'objectiveHarborFee',
- // cell: true,
- // index:5,
- // },
- {
- label: '状态',
- prop: 'status',
- type: 'select',
- dataType: "string",
- dicUrl: "/api/blade-system/dict-biz/dictionary?code=main_bid_status",
- props: {
- label: "dictValue",
- value: "dictKey"
- },
- index:6,
- }, {
- label: '备注',
- prop: 'remark',
- cell: true,
- index:7,
- }]
- },
- optionAgent:{},
- optionAgentTwo: {
- align: 'center',
- index: true,
- refreshBtn: false,
- addBtn: false,
- addRowBtn: true,
- cellBtn: false,
- editBtn: false,
- delBtn: false,
- column: [{
- label: '名称',
- prop: 'agentId',
- filterable:true,
- cell: true,
- dicUrl: '/api/blade-client/corpsdesc/bidingCorpsList',
- type: 'select',
- props: {
- label: "cname",
- value: "id"
- },
- index:1,
- }, {
- label: '联系人',
- prop: 'contacts',
- cell: true,
- index:2,
- }, {
- label: '邮箱',
- prop: 'mailbox',
- cell: true,
- index:3,
- }, {
- label: '电话',
- prop: 'phone',
- cell: true,
- index:4,
- }, {
- label: '状态',
- prop: 'status',
- type: 'select',
- dataType: "string",
- dicUrl: "/api/blade-system/dict-biz/dictionary?code=main_bid_status",
- props: {
- label: "dictValue",
- value: "dictKey"
- },
- index:5,
- }, {
- label: '备注',
- prop: 'remark',
- cell: true,
- index:6,
- }]
- },
- optionBid:{},
- optionBidTwo: {
- align: 'center',
- index:true,
- refreshBtn: false,
- addBtn: false,
- addRowBtn: false,
- cellBtn: false,
- editBtn: false,
- delBtn: false,
- menuWidth:140,
- column: [{
- label: '名称',
- prop: 'contrastName',
- index:1,
- }, {
- label: '船公司',
- prop: 'shippingCompany',
- index:2,
- }, {
- label: '船名',
- prop: 'shipName',
- index:3,
- }, {
- label: '箱型',
- prop: 'boxType',
- type: "select",
- dicUrl: "/api/blade-system/dict-biz/dictionary?code=boxType",
- props: {
- label: "dictValue",
- value: "dictValue"
- },
- index:4,
- }, {
- label: '运费',
- prop: 'seaFreight',
- index:5,
- }, {
- label: '起运港箱使天数',
- prop: 'departureHarborFee',
- index:6,
- }, {
- label: '目的港箱使天数',
- prop: 'objectiveHarborFee',
- index:7,
- }, {
- label: '状态',
- prop: 'status',
- type: 'select',
- dataType: "string",
- dicUrl: "/api/blade-system/dict-biz/dictionary?code=main_bid_status",
- props: {
- label: "dictValue",
- value: "dictKey"
- },
- index:8,
- }, {
- label: '备注',
- prop: 'remark',
- cell: true,
- index:9,
- }]
- },
- form: {},
- dataListBox: [],
- dataListAgent: [],
- dataListBid: [],
- checkDisabled:false
- }
- },
- props: {
- id: {
- type: String
- },
- detailData: {
- type: Object
- }
- },
- async created() {
- this.option = await this.getColumnData(this.getColumnName(47), option);
- if (this.id) {
- this.refreshData(this.id)
- }
- if (this.detailData.check) {
- this.checkDisabled = true
- this.batchNo = this.detailData.check.batchNo
- }
- this.optionBox = await this.getColumnData(this.getColumnName(201.1), this.optionBoxTwo);
- this.optionAgent = await this.getColumnData(this.getColumnName(201.2), this.optionAgentTwo);
- this.optionBid = await this.getColumnData(this.getColumnName(201.3), this.optionBidTwo);
- this.key++
- },
- methods: {
- nodeClick(data) {
- this.treeDeptId = data.id;
- this.page.currentPage = 1;
- this.onLoad(this.page);
- },
- //确认导出触发
- confirmSelection() {
- for (let item of this.selection){
- this.dataListAgent.push({
- $cellEdit: true,
- agentId:item.id,
- contacts:item.attn,
- phone:item.tel
- })
- }
- this.selection = [];
- this.dialogVisible = false;
- },
- //点击新增时触发
- beforeClose(done) {
- this.parentId = "";
- const column = this.findObject(this.option.column, "parentId");
- column.value = "";
- column.addDisabled = false;
- done();
- },
- //点击搜索按钮触发
- searchChange(params, done) {
- console.log(params);
- this.treeDeptId = "";
- this.page.currentPage = 1;
- this.onLoad(this.page, params);
- done();
- },
- //搜索重置按钮触发
- searchReset() {
- this.treeDeptId = "";
- this.onLoad(this.page);
- },
- //刷新触发
- refreshChange() {
- this.page = {
- pageSize: 10,
- pagerCount: 5,
- total: 0
- };
- },
- //选中触发
- selectionChange(selection) {
- this.selection = selection;
- },
- //树桩列点击展开触发
- treeLoad(tree, treeNode, resolve) {
- const parentId = tree.id;
- customerList({
- parentId: parentId,
- corpType: this.corpType ? this.corpType : "KH"
- }).then(res => {
- resolve(res.data.data.records);
- });
- },
- onLoad(page, params = { parentId: 0 }) {
- let queryParams = Object.assign({}, params, {
- size: page.pageSize,
- current: page.currentPage,
- corpsTypeId: this.treeDeptId,
- corpType: this.corpType ? this.corpType : "KH",
- line:this.line
- });
- customerList(queryParams).then(res => {
- this.dataList = res.data.data.records;
- this.page.total = res.data.data.total;
- if (this.page.total) {
- this.option.height = window.innerHeight - 500;
- } else {
- this.option.height = window.innerHeight - 200;
- }
- });
- },
- //自定义列保存
- async saveColumn(ref, option, optionBack, code) {
- /**
- * 已定义全局方法,直接使用,saveColumnData保存列数据方法,参数传值(表格名称,当前表格的option数据)
- * 已定义全局方法,直接使用,getColumnName方法用来获取枚举值,参数根据自己定义的code值获取中文名
- * 一定要执行异步操作,要等接口成功返回,才能执行下一行代码
- */
- const inSave = await this.saveColumnData(this.getColumnName(code), this[option]);
- if (inSave) {
- this.$message.success("保存成功");
- //关闭窗口
- this.$refs[ref].$refs.dialogColumn.columnBox = false;
- }
- },
- //自定义列重置
- async resetColumn(ref, option, optionBack, code) {
- this[option] = this[optionBack];
- const inSave = await this.delColumnData(this.getColumnName(code), this[optionBack]);
- if (inSave) {
- this.$message.success("重置成功");
- if (this.form.status > 0){
- this.$set(this.optionForm,'disabled',true)
- this.$set(this.optionBox,'addRowBtn',false)
- this.$set(this.optionAgent,'addRowBtn',false)
- this.optionBox.column.forEach(item=>{
- this.$set(item,'disabled',true)
- if (item.prop === "remark"){
- this.$set(item,'disabled',false)
- }
- })
- this.optionAgent.column.forEach(item=>{
- this.$set(item,'disabled',true)
- if (item.prop === "remark"){
- this.$set(item,'disabled',false)
- }
- })
- }else {
- this.$set(this.optionForm,'disabled',false)
- this.findObject(this.optionForm.column, "status").disabled = true
- this.$set(this.optionBox,'disabled',false)
- this.findObject(this.optionBox.column, "status").disabled = true
- this.$set(this.optionAgent,'disabled',false)
- this.findObject(this.optionAgent.column, "status").disabled = true
- }
- this.$refs[ref].$refs.dialogColumn.columnBox = false;
- }
- },
- edit(row){
- if (row.$cellEdit){
- this.$set(row,'$cellEdit',false)
- }else {
- this.$set(row,'$cellEdit',true)
- }
- },
- rowDel(row, index, type) {
- this.$confirm('是否确认删除?', '提示', {
- confirmButtonText: '确定',
- cancelButtonText: '取消',
- type: 'warning'
- }).then(() => {
- if (type === 'box') {
- if (row.id) {
- boxDelete({id: row.id}).then(res => {
- this.dataListBox.splice(index, 1);
- this.$message({
- type: 'success',
- message: '删除成功!'
- });
- })
- } else {
- this.dataListBox.splice(index, 1);
- this.$message({
- type: 'success',
- message: '删除成功!'
- });
- }
- } else if (type === 'agent') {
- if (row.id) {
- agentDelete({id: row.id}).then(res => {
- this.dataListAgent.splice(index, 1);
- this.$message({
- type: 'success',
- message: '删除成功!'
- });
- })
- } else {
- this.dataListAgent.splice(index, 1);
- this.$message({
- type: 'success',
- message: '删除成功!'
- });
- }
- }
- }).catch(() => {
- this.$message({
- type: 'info',
- message: '已取消'
- });
- });
- },
- backToList() {
- this.$router.push({
- path: '/bidingDocument/issueTender/index'
- });
- this.$emit('backToList', false)
- },
- // 确认中标
- winningTheBid(row,index){
- this.$confirm('是否确认中标?', '提示', {
- confirmButtonText: '确定',
- cancelButtonText: '取消',
- type: 'warning'
- }).then(() => {
- confirmWinningTheBid({id:row.id}).then(res=>{
- this.$message({
- type: 'success',
- message: '确认中标!'
- });
- this.refreshData(this.id)
- })
- }).catch(() => {
- this.$message({
- type: 'info',
- message: '已取消'
- });
- });
- },
- // 请核
- pleaseCheck(){
- this.$refs['form'].validate((valid, done) => {
- done()
- if (valid){
- this.$confirm('是否确认请核?', '提示', {
- confirmButtonText: '确定',
- cancelButtonText: '取消',
- type: 'warning'
- }).then(() => {
- if (new Date(this.form.deadlineTime) < new Date()) return this.$message.error("截止日期不能小于等于当前日期")
- let form = {
- ...this.form,
- itemsList: this.dataListBox,
- agentList: this.dataListAgent,
- contrastList: this.dataListBid
- }
- this.fullscreenLoading = true
- saveSaveList(form).then(res => {
- const data = {
- id: res.data.data.id,
- url: '/bidingDocument/issueTender/index',
- pageStatus: "this.$store.getters.entranceXsStatus"
- }
- confirmPleaseCheck(data).then(res=>{
- this.fullscreenLoading = false
- this.$message({
- type: 'success',
- message: '请核成功!'
- });
- this.refreshData(this.form.id)
- })
- }).finally(() => {
- this.fullscreenLoading = false
- })
- }).catch(() => {
- this.$message({
- type: 'info',
- message: '已取消'
- });
- });
- }else {
- done()
- }
- })
- },
- // 复制新增
- copyNew(){
- this.$confirm('是否确认复制新增?', '提示', {
- confirmButtonText: '确定',
- cancelButtonText: '取消',
- type: 'warning'
- }).then(() => {
- this.form.status = 0
- this.form.id = ''
- this.dataListBid = []
- this.dataListBox.forEach(item => item.id = '')
- this.dataListAgent.forEach(item => item.id = '')
- this.$set(this.optionForm,'disabled',false)
- this.$set(this.optionBox,'addRowBtn',true)
- this.$set(this.optionAgent,'addRowBtn',true)
- this.optionBox.column.forEach(item=>{
- this.$set(item,'disabled',false)
- })
- this.optionAgent.column.forEach(item=>{
- this.$set(item,'disabled',false)
- })
- }).catch(() => {
- this.$message({
- type: 'info',
- message: '已取消'
- });
- });
- },
- // 作废
- toVoid(){
- this.$confirm('是否确认作废?', '提示', {
- confirmButtonText: '确定',
- cancelButtonText: '取消',
- type: 'warning'
- }).then(() => {
- confirmVoid({id:this.form.id}).then(res=>{
- this.$message({
- type: 'success',
- message: '作废成功!'
- });
- this.refreshData(this.form.id)
- })
- }).catch(() => {
- this.$message({
- type: 'info',
- message: '已取消'
- });
- });
- },
- // 发布
- release(){
- this.$confirm('是否确认发布?', '提示', {
- confirmButtonText: '确定',
- cancelButtonText: '取消',
- type: 'warning'
- }).then(() => {
- confirmRelease({id:this.form.id}).then(res=>{
- this.$message({
- type: 'success',
- message: '发布成功!'
- });
- this.refreshData(this.form.id)
- })
- }).catch(() => {
- this.$message({
- type: 'info',
- message: '已取消'
- });
- });
- },
- // 保存
- storage() {
- let form = {
- ...this.form,
- itemsList: this.dataListBox,
- agentList: this.dataListAgent,
- contrastList: this.dataListBid
- }
- this.fullscreenLoading = true
- saveSaveList(form).then(res => {
- this.refreshData(res.data.data.id)
- }).finally(() => {
- this.fullscreenLoading = false
- })
- },
- refreshData(id) {
- let ids = ''
- if (id) {
- ids = id
- } else {
- ids = this.form.id
- }
- this.fullscreenLoading = true
- detailDelegationList({id: ids}).then(res => {
- this.form = res.data.data
- this.dataListBox = this.form.itemsList
- this.dataListAgent = this.form.agentList
- this.dataListBid = this.form.contrastList
- delete this.form.itemsList
- delete this.form.agentList
- delete this.form.contrastList
- this.fullscreenLoading = false
- })
- },
- }
- }
- </script>
- <style scoped lang="scss">
- ::v-deep .el-form-item {
- margin-bottom: 8px;
- }
- </style>
|