Browse Source

提交招标

caojunjie 2 years ago
parent
commit
ae1b5881e5

+ 34 - 0
src/api/bidingDocument/issueTender.js

@@ -0,0 +1,34 @@
+import request from '@/router/axios';
+// 列表查询
+export function selectInvoiceList(data) {
+    return request({
+        url: '/api/blade-purchase-sales/exportBiding/page',
+        method: 'get',
+        params: data
+    })
+}
+// 标书保存
+export function saveSaveList(data) {
+    return request({
+        url: '/api/blade-purchase-sales/exportBiding/submit',
+        method: 'post',
+        data: data
+    })
+}
+// 单据查询
+export function detailDelegationList(data) {
+    return request({
+        url: '/api/blade-purchase-sales/exportBiding/detail',
+        method: 'get',
+        params:data
+    })
+}
+
+// 列表单条删除
+export function removeDelegationList(data) {
+    return request({
+        url: '/api/blade-purchase-sales/exportBiding/update',
+        method: 'post',
+        data: data
+    })
+}

+ 0 - 38
src/views/bidingDocument/IssueTender/detailsPageEdit.vue

@@ -1,38 +0,0 @@
-<template>
-  <div>
-    <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&#45;&#45;small-yh add-customer-btn">
-          <el-button type="primary" size="small">保存</el-button>
-        </div>
-      </div>
-    </div>
-    <trade-card title="基础资料" style="margin-top: 50px">
-      1
-    </trade-card>
-  </div>
-</template>
-
-<script>
-export default {
-  name: "detailsPageEdit",
-  methods:{
-    backToList(){
-      this.$emit('backToList', false)
-    }
-  }
-}
-</script>
-
-<style scoped>
-
-</style>

+ 0 - 52
src/views/bidingDocument/IssueTender/index.vue

@@ -1,52 +0,0 @@
-<template>
-  <div v-if="false">
-    <basic-container v-show="!show">
-      <avue-crud :option="option" :data="dataList" :page.sync="page">
-        <template slot-scope="scope" slot="menuLeft">
-          <el-button type="primary"
-                     icon="el-icon-plus"
-                     size="small"
-                     @click="rowSave">新增</el-button>
-        </template>
-      </avue-crud>
-    </basic-container>
-    <details-page-edit v-if="show" @backToList="backToList"></details-page-edit>
-  </div>
-</template>
-
-<script>
-import detailsPageEdit from './detailsPageEdit'
-export default {
-  components: {
-    detailsPageEdit
-  },
-  data(){
-    return {
-      page: {
-        pageSize: 10,
-        currentPage: 1,
-        total: 0,
-        pageSizes: [10, 50, 100, 200, 300]
-      },
-      dataList:[],
-      show:false,
-      option:{
-        addBtn:false
-      }
-    }
-  },
-  methods:{
-    rowSave(){
-      this.show = true
-    },
-    backToList(args){
-      this.show = false
-      console.log(args)
-    }
-  }
-}
-</script>
-
-<style scoped>
-
-</style>

+ 372 - 0
src/views/bidingDocument/issueTender/detailsPageEdit.vue

@@ -0,0 +1,372 @@
+<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&#45;&#45;small-yh add-customer-btn">
+          <el-button type="primary" size="small" @click="storage()">保存</el-button>
+        </div>
+      </div>
+    </div>
+    <trade-card title="基础资料" style="margin-top: 50px">
+      <avue-form :option="optionForm" v-model="form"></avue-form>
+    </trade-card>
+    <trade-card title="箱信息">
+      <avue-crud ref="crudBox" :option="optionBox" :data="dataListBox"></avue-crud>
+    </trade-card>
+    <trade-card title="代理信息">
+      <avue-crud ref="crudAgent" :option="optionAgent" :data="dataListAgent"></avue-crud>
+    </trade-card>
+    <trade-card title="投标对比">
+      <avue-crud ref="crudAgent" :option="optionBid" :data="dataListBid"></avue-crud>
+    </trade-card>
+  </div>
+</template>
+
+<script>
+import {detailDelegationList, saveSaveList} from "@/api/bidingDocument/issueTender";
+
+export default {
+  name: "detailsPageEdit",
+  data(){
+    return {
+      fullscreenLoading:false,
+      optionForm:{
+        submitBtn:false,
+        emptyBtn:false,
+        span:6,
+        column:[{
+          label:'发布日期',
+          prop:'releaseTime',
+          type: "datetime",
+          format:'yyyy-MM-dd HH:mm:ss',
+          valueFormat:'yyyy-MM-dd HH:mm:ss'
+        },{
+          label:'截止日期',
+          prop:'deadlineTime',
+          type: "datetime",
+          format:'yyyy-MM-dd HH:mm:ss',
+          valueFormat:'yyyy-MM-dd HH:mm:ss'
+        },{
+          label:'合同号',
+          prop:'contractNo',
+        },{
+          label:'状态',
+          prop:'status',
+          dataType: "string",
+          type: 'select',
+          dicUrl: "/api/blade-system/dict-biz/dictionary?code=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"
+          }
+        },{
+          label:'目的港',
+          prop:'objectiveHarbor',
+          filterable: true,
+          type: "select",
+          dicUrl:"/api/blade-client/port/allList",
+          props: {
+            label: "name",
+            value: "name"
+          }
+        },{
+          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:ss',
+          valueFormat:'yyyy-MM-dd HH:mm:ss'
+        },{
+          label:'是否直航',
+          prop:'directFlight',
+          type: 'select',
+          dicData:[{
+            label:'是',
+            value:1
+          },{
+            label:'否',
+            value:0
+          }]
+        },{
+          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"
+          }
+        },{
+          label:'运输条款',
+          prop:'transportClause',
+        },{
+          label:'件数',
+          prop:'number',
+        },{
+          label:'包装',
+          prop:'packing',
+          type: 'select',
+          dicUrl: "/api/blade-system/dict-biz/dictionary?code=packaging",
+          props: {
+            label: "dictValue",
+            value: "dictValue"
+          }
+        },{
+          label:'重量(kgs)',
+          prop:'weight',
+        },{
+          label:'尺码(cmb)',
+          prop:'size',
+        },{
+          label:'货物信息',
+          prop:'cargoInformation',
+          span:18,
+        },{
+          label:'备注',
+          prop:'remark',
+          type:'textarea',
+          span:24,
+        }]
+      },
+      optionBox:{
+        align:'center',
+        refreshBtn:false,
+        addBtn:false,
+        addRowBtn:true,
+        cellBtn:true,
+        column:[{
+          label:'箱型',
+          prop: 'boxType',
+          cell: true,
+        },{
+          label:'箱量',
+          prop: 'boxAmount',
+          cell: true,
+        },{
+          label:'海运费',
+          prop: 'seaFreight',
+          cell: true,
+        },{
+          label:'起运港箱使费',
+          prop: 'departureHarborFee',
+          cell: true,
+        },{
+          label:'目的港箱使费',
+          prop: 'objectiveHarborFee',
+          cell: true,
+        },{
+          label:'状态',
+          prop: 'status',
+          type: 'select',
+          dataType: "string",
+          dicUrl: "/api/blade-system/dict-biz/dictionary?code=bid_status",
+          props: {
+            label: "dictValue",
+            value: "dictKey"
+          },
+          cell: true,
+        },{
+          label:'备注',
+          prop: 'remark',
+          cell: true,
+        }]
+      },
+      optionAgent:{
+        align:'center',
+        refreshBtn:false,
+        addBtn:false,
+        addRowBtn:true,
+        cellBtn:true,
+        column:[{
+          label:'名称',
+          prop: 'agentName',
+          cell: true,
+        },{
+          label:'联系人',
+          prop: 'contacts',
+          cell: true,
+        },{
+          label:'邮箱',
+          prop: 'mailbox',
+          cell: true,
+        },{
+          label:'电话',
+          prop: 'phone',
+          cell: true,
+        },{
+          label:'状态',
+          prop: 'status',
+          type: 'select',
+          dataType: "string",
+          dicUrl: "/api/blade-system/dict-biz/dictionary?code=bid_status",
+          props: {
+            label: "dictValue",
+            value: "dictKey"
+          },
+          cell: true,
+        },{
+          label:'备注',
+          prop: 'remark',
+          cell: true,
+        }]
+      },
+      optionBid:{
+        align:'center',
+        refreshBtn:false,
+        addBtn:false,
+        addRowBtn:true,
+        cellBtn:true,
+        column:[{
+          label:'名称',
+          prop: 'contrastName',
+          cell: true,
+        },{
+          label:'船公司',
+          prop: 'shippingCompany',
+          cell: true,
+        },{
+          label:'船名',
+          prop: 'shipName',
+          cell: true,
+        },{
+          label:'箱型',
+          prop: 'boxType',
+          cell: true,
+        },{
+          label:'运费',
+          prop: 'seaFreight',
+          cell: true,
+        },{
+          label:'起运港箱使费',
+          prop: 'departureHarborFee',
+          cell: true,
+        },{
+          label:'目的港箱使费',
+          prop: 'objectiveHarborFee',
+          cell: true,
+        },{
+          label:'状态',
+          prop: 'status',
+          type: 'select',
+          dataType: "string",
+          dicUrl: "/api/blade-system/dict-biz/dictionary?code=bid_status",
+          props: {
+            label: "dictValue",
+            value: "dictKey"
+          },
+          cell: true,
+        },{
+          label:'备注',
+          prop: 'remark',
+          cell: true,
+        }]
+      },
+      form:{},
+      dataListBox:[],
+      dataListAgent:[],
+      dataListBid:[],
+    }
+  },
+  props: {
+    id: {
+      type: String
+    }
+  },
+  created() {
+    if (this.id){
+      this.refreshData(this.id)
+    }
+  },
+  methods:{
+    backToList(){
+      this.$emit('backToList', false)
+    },
+    storage(){
+      let form = {
+        ...this.form,
+        itemsList:this.dataListBox,
+        agentList:this.dataListAgent,
+        contrastList:this.dataListBid
+      }
+      // this.loading = true;
+      saveSaveList(form).then(res=>{
+        console.log(res)
+        this.refreshData(res.data.data.id)
+      })
+    },
+    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>

+ 103 - 0
src/views/bidingDocument/issueTender/index.vue

@@ -0,0 +1,103 @@
+<template>
+  <div>
+    <basic-container v-show="!show">
+      <avue-crud
+          :option="option"
+          :data="dataList"
+          :page.sync="page"
+          :table-loading="loading"
+          @on-load="onLoad">
+        <template slot-scope="scope" slot="menuLeft">
+          <el-button type="primary"
+                     icon="el-icon-plus"
+                     size="small"
+                     @click="rowSave">新增</el-button>
+        </template>
+        <template slot-scope="{type,size,row,index}" slot="menu">
+          <el-button icon="el-icon-view" :size="size" :type="type" @click.stop="rowCell(row,index)">查看</el-button>
+          <el-button icon="el-icon-delete" :size="size" :type="type" @click.stop="rowDel(row)">删除</el-button>
+        </template>
+      </avue-crud>
+    </basic-container>
+    <details-page-edit v-if="show" @backToList="backToList" :id="id"></details-page-edit>
+  </div>
+</template>
+
+<script>
+import detailsPageEdit from './detailsPageEdit'
+import {selectInvoiceList,removeDelegationList} from '@/api/bidingDocument/issueTender'
+export default {
+  components: {
+    detailsPageEdit
+  },
+  data(){
+    return {
+      page: {
+        pageSize: 10,
+        currentPage: 1,
+        total: 0,
+        pageSizes: [10, 50, 100, 200, 300]
+      },
+      dataList:[],
+      loading:false,
+      show:false,
+      id:'',
+      option:{
+        addBtn:false,
+        editBtn:false,
+        delBtn:false,
+      }
+    }
+  },
+  methods:{
+    rowSave(){
+      this.show = true
+    },
+    backToList(args){
+      this.show = false
+      console.log(args)
+    },
+    //查看
+    rowCell(row, index) {
+      this.id = row.id
+      this.show = true
+    },
+    //列表删除
+    rowDel(row) {
+      this.$confirm('此操作将永久删除该单据, 是否继续?', '提示', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning'
+      }).then(() => {
+        removeDelegationList({id: row.id}).then(res => {
+          this.$message.success('删除成功');
+          this.onLoad(this.page)
+        })
+      }).catch(() => {
+        this.$message({
+          type: 'info',
+          message: '已取消删除'
+        });
+      });
+    },
+    onLoad(page, params = {}) {
+      let queryParams = {
+        size: page.pageSize,
+        current: page.currentPage,
+        // ...Object.assign(params, this.query)
+      }
+      this.loading = true;
+      selectInvoiceList(queryParams).then(res=>{
+        this.dataList = res.data.data.records
+        this.page.total = res.data.data.total
+      }).finally(() => {
+        this.loading = false;
+      })
+    }
+  }
+}
+</script>
+
+<style scoped>
+
+</style>