123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360 |
- <template>
- <div class="logistics">
- <div style="margin: 20px 0">
- <el-radio-group v-model="curTarget" size="small">
- <template v-for="(item, index) in tabsList">
- <el-radio-button v-if="item.show" :key="index" :label="item.value">{{ item.label }}</el-radio-button>
- </template>
- </el-radio-group>
- </div>
- <el-card v-if="curTarget === 1 && tabsList[curTarget-1].show">
- <div slot="header">
- <span>物流信息</span>
- </div>
- <slot name="header" />
- <div>
- <el-timeline v-if="logisticsDetail.length" :reverse="false">
- <el-timeline-item
- v-for="(item, index) in logisticsDetail"
- :key="index"
- placement="top"
- type="success"
- :timestamp="item.time"
- >
- <el-row :gutter="20">
- <el-col class="logistics-title"> {{ item.status }} </el-col>
- <el-col>
- <div class="flex">
- <div>{{ item.context }}</div>
- <!-- <div>{{ item.createTime }}</div> -->
- </div>
- </el-col>
- </el-row>
- </el-timeline-item>
- </el-timeline>
- <div v-else class="tip">暂无物流信息</div>
- </div>
- </el-card>
- <el-card v-if="curTarget === 2 && tabsList[curTarget-1].show">
- <div slot="header">
- <span>物流费用</span>
- </div>
- <div>
- <zj-table
- :table-attributes="defaultTableAttributes"
- :is-drop="true"
- :columns="formLogistics"
- :table-data="logisticsData"
- />
- </div>
- </el-card>
- <el-card v-if="curTarget === 3 && tabsList[curTarget-1].show">
- <div slot="header">
- <span>出库条码</span>
- </div>
- <div>
- <zj-table
- :table-attributes="defaultTableAttributes"
- :is-drop="true"
- :columns="formOutbound"
- :table-data="outboundData"
- />
- </div>
- </el-card>
- </div>
- </template>
- <script>
- import { getListCostBillV2 } from '@/api/logisticsBill'
- import { getListOrderTrack } from '@/api/supply/pickup'
- import { getListCodeV2 } from '@/api/barcode'
- export default {
- props: {
- invoiceId: {
- type: String,
- default: null
- },
- detailsId: {
- type: String,
- default: null
- }
- },
- data() {
- return {
- tabsList: [
- {
- label: '物流状态',
- value: 1,
- show: true
- },
- {
- label: '物流费用',
- value: 2,
- show: true
- },
- {
- label: '出库条码',
- value: 3,
- show: true
- }
- ],
- curTarget: 1,
- defaultTableAttributes: {
- border: true,
- headerCellClassName: 'headerRowColor',
- size: 'mini',
- 'summary-method': this.$getSummaries,
- 'show-summary': true
- },
- logisticsData: [],
- outboundData: [],
- logisticsDetail: []
- }
- },
- computed: {
- formLogistics() {
- return [
- {
- columnAttributes: {
- label: '序号',
- type: 'index'
- }
- },
- {
- columnAttributes: {
- label: '结算状态',
- prop: 'materialName'
- }
- },
- {
- columnAttributes: {
- label: '调拨单号',
- prop: 'orderCode'
- }
- },
- {
- columnAttributes: {
- label: '嘉贤单据号',
- prop: 'materialName'
- }
- },
- {
- columnAttributes: {
- label: '存货编码',
- prop: 'materialName'
- }
- },
- {
- columnAttributes: {
- label: '物料代码',
- prop: 'materialName'
- }
- },
- {
- columnAttributes: {
- label: '产品名称',
- prop: 'materialName'
- }
- },
- {
- columnAttributes: {
- label: '规格型号',
- prop: 'materialSpecification'
- }
- },
- {
- columnAttributes: {
- label: '单价',
- prop: 'price'
- }
- },
- {
- columnAttributes: {
- label: '数量',
- prop: 'qty'
- }
- },
- {
- columnAttributes: {
- label: '物流费用',
- prop: 'totalCost'
- }
- },
- {
- columnAttributes: {
- label: '仓储费用',
- prop: 'materialName'
- }
- },
- {
- columnAttributes: {
- label: '合计费用',
- prop: 'materialName'
- }
- },
- {
- columnAttributes: {
- label: '对账人',
- prop: 'materialName'
- }
- },
- {
- columnAttributes: {
- label: '对账日期',
- prop: 'materialName'
- }
- },
- {
- columnAttributes: {
- label: '结算人',
- prop: 'materialName'
- }
- },
- {
- columnAttributes: {
- label: '结算日期',
- prop: 'materialName'
- }
- }
- ]
- },
- formOutbound() {
- return [
- {
- columnAttributes: {
- label: '序号',
- type: 'index'
- }
- },
- {
- columnAttributes: {
- label: '条码状态',
- prop: 'materialName'
- }
- },
- {
- columnAttributes: {
- label: '签收状态',
- prop: 'materialName'
- }
- },
- {
- columnAttributes: {
- label: '上墙状态',
- prop: 'materialName'
- }
- },
- {
- columnAttributes: {
- label: '物料代码',
- prop: 'materialName'
- }
- },
- {
- columnAttributes: {
- label: '产品名称',
- prop: 'materialName'
- }
- },
- {
- columnAttributes: {
- label: '规格型号',
- prop: 'materialName'
- }
- },
- {
- columnAttributes: {
- label: '内外机',
- prop: 'materialName'
- }
- },
- {
- columnAttributes: {
- label: '物料条码',
- prop: 'materialName'
- }
- },
- {
- columnAttributes: {
- label: '出库条形码',
- prop: 'materialName'
- }
- },
- {
- columnAttributes: {
- label: '签收日期',
- prop: 'materialName'
- }
- },
- {
- columnAttributes: {
- label: '上增日期',
- prop: 'materialName'
- }
- }
- ]
- }
- },
- mounted() {
- this.getListCodeV2()
- this.getListCostBillV2()
- },
- methods: {
- getListOrderTrack() {
- getListOrderTrack({ orderId: this.invoiceId }).then(res => {
- this.logisticsDetail = res.data
- })
- },
- getListCostBillV2() {
- getListCostBillV2({
- pageNum: 1,
- pageSize: -1,
- params: [
- {
- param: 'order_code',
- compare: '=',
- value: this.invoiceId
- }
- ]
- }).then(res => {
- res.data.records.forEach(item => {
- item.sums1 = ['orderHasSendQty', 'subsidyCoefficient', 'unloadUpstairsCoefficient', 'coefficient']
- item.sums2 = ['cost', 'unitPrice', 'totalCost', 'allowanceCost']
- })
- this.logisticsData = res.data.records
- })
- },
- getListCodeV2() {
- getListCodeV2({
- pageNum: 1,
- pageSize: -1,
- params: [
- {
- param: 'order_number',
- compare: '=',
- value: this.invoiceId
- }
- ]
- }).then(res => {
- this.outboundData = res.data.records
- })
- }
- }
- }
- </script>
- <style lang="scss" scoped>
- ::v-deep .el-timeline-item__tail {
- border-left: 2px solid #67c23a;
- }
- ::v-deep .el-form-item__content {
- line-height: 33px;
- }
- .logistics-title {
- padding: 10px;
- }
- .logistics {
- margin: 20px 0;
- }
- </style>
|