TabSskcList.vue 8.8 KB
<template>
  <a-card :bordered="false" :class="'cust-erp-sub-tab'">
    <a-form-model ref="form" :model="model" :rules="validatorRules">
      <a-row>
        <h1>{{ sskcTitle }}</h1>
        <hr style="width :7%;height:1px;border:none;border-top:1px solid #B0B0B0; float: left">
        <br>
        <a-col :span="24">
          <a-form-model-item label="库存数据" :labelCol="labelCol" :wrapperCol="wrapperCol"
                             style=" width: 600px"
          >
            {{ model.actualInventory }}
            <!--            <a-input-->
            <!--              v-model="model.actualInventory"-->
            <!--              disabled="disabled"-->
            <!--            ></a-input>-->
          </a-form-model-item>
        </a-col>
        <a-col :span="24">
          <a-form-model-item label="在途库存" :labelCol="labelCol" :wrapperCol="wrapperCol"
                             style=" width: 600px">
            <!--            <a-input-->
            <!--              v-model="model.quantityInTransit"-->
            <!--              readonly-->
            <!--            ></a-input>-->
            {{ model.quantityInTransit }}
          </a-form-model-item>
        </a-col>

        <h1>{{ lszbTitle }}</h1>
        <hr style="width :7%;height:1px;border:none;border-top:1px solid #B0B0B0; float: left">
        <br>

        <a-col :span="24">
          <a-form-model-item label="最近中标单价(元)" :labelCol="labelCol" :wrapperCol="wrapperCol"
                             style=" width: 600px"
                            >
<!--            <a-input-->
<!--              v-model="model.supplier"-->
<!--              readonly-->
<!--            ></a-input>-->
            {{model.lastWinningBidPrice}}
          </a-form-model-item>
        </a-col>
        <a-col :span="24">
          <a-form-model-item label="最后一次中标时间" :labelCol="labelCol" :wrapperCol="wrapperCol"
                             style=" width: 600px"
                            >
<!--            <a-input-->
<!--              v-model="model.supplier"-->
<!--              readonly-->
<!--            ></a-input>-->
            {{model.lastBidDate}}
          </a-form-model-item>
        </a-col>
        <br>
        <h1>{{ bctbTitle }}</h1>
        <hr style="width :7%;height:1px;border:none;border-top:1px solid #B0B0B0; float: left">
        <br>

        <a-col :span="24">
          <a-form-model-item label="投标价格(元)" :labelCol="labelCol" :wrapperCol="wrapperCol"
                             style=" width: 600px">
<!--            <a-input-->
<!--              v-model="model.tbjg"-->
<!--            ></a-input>-->
            {{model.tbjg}}
          </a-form-model-item>
        </a-col>
        <a-col :span="24">
          <a-form-model-item label="投标时间" :labelCol="labelCol" :wrapperCol="wrapperCol"
                             style=" width: 600px">
<!--            <a-input-->
<!--              v-model="model.tbsj"-->
<!--            ></a-input>-->
            {{model.tbsj}}
          </a-form-model-item>
        </a-col>
        <a-col :span="24">
          <a-form-model-item label="投标人" :labelCol="labelCol" :wrapperCol="wrapperCol"
                             style=" width: 600px">
<!--            <a-input-->
<!--              v-model="model.tbr"-->
<!--            ></a-input>-->
            {{model.tbr}}
          </a-form-model-item>
        </a-col>


        <h1>{{ bczbTitle }}</h1>
        <hr style="width :7%;height:1px;border:none;border-top:1px solid #B0B0B0; float: left">
        <br>

        <a-col :span="24">
          <a-form-model-item label="中标单价(元)" :labelCol="labelCol" :wrapperCol="wrapperCol"
                             style=" width: 600px">
<!--            <a-input-->
<!--              v-model="model.zbdj"-->
<!--            ></a-input>-->
            {{model.zbdj}}
          </a-form-model-item>
        </a-col>
        <a-col :span="24">
          <a-form-model-item label="中标时间" :labelCol="labelCol" :wrapperCol="wrapperCol"
                             style=" width: 600px">
<!--            <a-input-->
<!--              v-model="model.zbsj"-->
<!--            ></a-input>-->
            {{model.zbsj}}
          </a-form-model-item>
        </a-col>


      </a-row>

    </a-form-model>
  </a-card>
</template>

<script>

import { JeecgListMixin } from '@/mixins/JeecgListMixin'
import TblTradeTenderInfoTab2Modal from './modules/TblTradeTenderInfoTab2Modal.vue'
import { getAction } from '@api/manage'

export default {
  name: 'TblTradeInquiryInfoList',
  mixins: [JeecgListMixin],
  components: { TblTradeTenderInfoTab2Modal },
  props: {
    selectedRowData: {
      type: Object,
      default: () => ({})
    }
  },
  watch: {},
  data() {
    return {
      sskcTitle: '实时库存',
      lszbTitle: '历史中标信息',
      bctbTitle: '本次投标信息',
      bczbTitle: '本次中标信息',
      model: {},
      labelCol: {
        xs: { span: 24 },
        sm: { span: 8 }
      },
      wrapperCol: {
        xs: { span: 24 },
        sm: { span: 16 }
      },
      validatorRules: {},
      description: '贸易招标信息管理页面',
      disableMixinCreated: true,
      // 表头
      columns: [
        {
          title: '#',
          dataIndex: '',
          key: 'rowIndex',
          width: 60,
          align: 'center',
          customRender: function(t, r, index) {
            return parseInt(index) + 1
          }
        },
        {
          title: '库存数据',
          align: 'center',
          dataIndex: 'ghsmc'
        },
        {
          title: '在途库存',
          align: 'center',
          dataIndex: 'tel'
        },
        {
          title: '库存单价(含税运)',
          align: 'center',
          dataIndex: 'wldz'
        },
        {
          title: '在途单价(含税运)',
          align: 'center',
          dataIndex: 'wxh'
        }
      ],
      url: {
        list: '/trade/tblTradeInventory/list',
        getHistoryBidInfo: '/trade/tblTradeBidMaterialDetails/getHistoryBidInfo',
        getBidInfo: '/trade/tblTradeBidSub/getBidInfo',
        getBidMaterialDetailsInfo: '/trade/tblTradeTenderInfo/getBidMaterialDetailsInfo'
      },
      dictOptions: {}
    }
  },
  created() {
  },
  computed: {},
  methods: {
    clearData(){
      this.model = {}
      this.sskcTitle = '实时库存'
    },
    loadData(rows) {
      if (rows) {
        const row = rows[0]
        console.log("row",row)
        const materialCode = row.code
        const xjbswjh = row.xjbswjh
        const param = {
          materialCode: materialCode
        }
        this.sskcTitle = '实时库存-' + materialCode
        //获取库存数据
        getAction(this.url.list, param).then((res) => {
          if (res.success) {
            if (res.result.records) {
              const record = res.result.records[0]
              //库存数据
              this.$set(this.model, 'actualInventory', record.actualInventory)
              //在途库存
              this.$set(this.model, 'quantityInTransit', record.quantityInTransit)
            }
          }
        })
        //获取历史中标信息
        getAction(this.url.getHistoryBidInfo, param).then((res) => {
          if (res.success) {
            if (res.result) {
              //最近中标单价(元)
              this.$set(this.model,"lastBidDate",res.result.lastBidDate)
              //最后一次中标时间
              this.$set(this.model,"lastWinningBidPrice",res.result.lastWinningBidPrice)
            }
          }
        })
        //获取本次投标信息
        getAction(this.url.getBidInfo, {
          wlbm: materialCode,
          xjbswjh: xjbswjh,
        }).then((res) => {
          if (res.success) {
            if (res.result) {
              console.log("result11111111111",res.result)
              //投标价格
              this.$set(this.model,"tbjg",res.result.xydj)
              //投标时间
              this.$set(this.model,"tbsj",res.result.createTime)
              //投标人
              this.$set(this.model,"tbr",res.result.createBy)
            }
          }
        })
        //获取本次中标信息
        getAction(this.url.getBidMaterialDetailsInfo, {
          materialCode: materialCode,
          bidNum: xjbswjh,
          isBid: 1,
        }).then((res) => {
          if (res.success) {
            if (res.result) {
              console.log("result",res.result)
              //投标价格
              this.$set(this.model,"zbdj",res.result.winningBidPrice)
              //投标时间
              this.$set(this.model,"zbsj",res.result.bidDate)

            }
          }
        })
      }
    },
    clearList() {
      this.dataSource = []
      this.selectedRowKeys = []
      this.ipagination.current = 1
    }

  }
}
</script>
<style scoped>
@import '~@assets/less/common.less'
</style>