123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273 |
- <template>
- <div class="app-container">
- <!-- 基本信息 -->
- <el-row :gutter="10">
- <el-col :span="22" :offset="1">
- <div class="info-title">基本信息</div>
- <el-col :span="8" :offset="1" :xs="{span: 24, offset: 0}">
- <div class="title">手机号码:{{ info.tel }}</div>
- </el-col>
- <el-col :span="8" :xs="{span: 24, offset: 0}">
- <div class="title">门店名称:{{ info.channelName }}</div>
- </el-col>
- </el-col>
- </el-row>
- <!-- 库存信息 -->
- <el-row :gutter="10" >
- <el-col :span="22" :offset="1">
- <div class="info-title">库存信息</div>
- <el-col :span="8" :offset="1" :xs="{span: 24, offset: 0}">
- <div class="title">总库存:{{ info.totalQuantity }}</div>
- </el-col>
- <el-col :span="7" :xs="{span: 24, offset: 0}">
- <div class="title">已核销:{{ info.totalVerifyQty }}</div>
- </el-col>
- <el-col :span="8" :xs="{span: 24, offset: 0}">
- <div class="title">剩余库存:{{ info.totalRemainQty }}</div>
- </el-col>
- <el-col :span="8" :offset="1" :xs="{span: 24, offset: 0}">
- <div class="title">结算库存:{{ info.totalSettleQty }}</div>
- </el-col>
- <el-col :span="7" :xs="{span: 24, offset: 0}">
- <div class="title">采购成本:¥{{ $numberFormat(info.items && info.items[0].purchaseCost) }}</div>
- </el-col>
- <el-col :span="8" :offset="1" :xs="{span: 24, offset: 0}">
- <div class="title">门店应付金额:¥{{ $numberFormat(info.totalPurchaseCost) }}</div>
- </el-col>
- <el-col :span="7" :xs="{span: 24, offset: 0}">
- <div class="title">实际结算金额:¥{{ $numberFormat(info.payAmount) }}</div>
- </el-col>
- </el-col>
- </el-row>
- <!-- 订单状态 -->
- <el-row :gutter="10">
- <el-col :span="22" :offset="1">
- <div class="info-title">状态</div>
- <el-col :span="8" :offset="1" :xs="{span: 24, offset: 0}">
- <div class="title">状态:{{ status.desc }}</div>
- </el-col>
- <el-col :span="8" :offset="1" :xs="{span: 24, offset: 0}" v-if="status && status.value == 2">
- <div class="title">支付金额:¥{{ $numberFormat(info.payAmount) }}</div>
- </el-col>
- <el-col :span="7" :xs="{span: 24, offset: 0}" v-if="(status && status.value == 2) || (status && status.value == 3)">
- <div class="title">发起结算时间:{{ parseTime(info.pushTime) }}</div>
- </el-col>
- <el-col :span="8" :offset="1" :xs="{span: 24, offset: 0}" v-if="status && status.value == 2">
- <div class="title">结算时间:{{ parseTime(info.settleTime) || '--' }}</div>
- </el-col>
- <el-button
- v-if="status && status.value == 1"
- v-hasPermi="['business:ticket:on']"
- type="primary"
- @click="toInventory()"
- >去结算</el-button
- >
- </el-col>
- </el-row>
- <!-- 商品信息 -->
- <el-row :gutter="10">
- <el-col :span="22" :offset="1">
- <div class="info">
- <div class="info-title">商品信息</div>
- <div class="info-table">
- <el-table :data="list">
- <el-table-column label="商品信息" min-width="200">
- <div slot-scope="{ row }" class="flex">
- <el-image
- style="width: 100px; height: 100px"
- :src="row.picUrl"
- :preview-src-list="[row.picUrl]"
- />
- <div class="txt">{{ row.title }}</div>
- </div>
- </el-table-column>
- <el-table-column label="规格" min-width="100">
- <template slot-scope="{ row }">
- <div>{{ row.properties || "--" }}</div>
- </template>
- </el-table-column>
- <el-table-column label="采购成本(单价)" prop="purchaseCost" min-width="80">
- <template slot-scope="{ row }">
- <div>¥{{ $numberFormat(row.purchaseCost) }}</div>
- </template>
- </el-table-column>
- <el-table-column label="库存" prop="quantity" min-width="80"/>
- <el-table-column label="已核销" prop="verifyQty" min-width="80"/>
- <el-table-column label="剩余库存" prop="remainQty" min-width="80"/>
- </el-table>
- </div>
- </div>
- </el-col>
- </el-row>
- <!-- 结算 -->
- <inventory-goods :inventory-show="inventoryShow" :inventory-info="info" @close="close" v-if="inventoryShow"/>
- </div>
- </template>
- <script>
- import { getInventoryDetail } from "@/api/business/inventory";
- import { publicFileGetUrl } from "@/api/common";
- import InventoryGoods from "./components/InventoryGoods";
- export default {
- name: "InventoryDetail",
- components: {
- InventoryGoods,
- },
- data() {
- return {
- // 订单ID
- orderId: "",
- // 订单详情
- info: {},
- // 订单状态
- status: {},
- // 商品信息列表
- list: [],
- // 结算显示
- inventoryShow: false,
- };
- },
- created() {
- this.orderId = this.$route.query.id;
- this.getDetail();
- },
- activated() {
- const orderId = this.$route.query.id;
- if (orderId != null && orderId != this.orderId) {
- this.orderId = orderId;
- this.getDetail();
- }
- },
- methods: {
- // 订单详情
- getDetail() {
- getInventoryDetail(this.orderId).then((res) => {
- if (res.code == 0) {
- this.info = res.data;
- this.status = JSON.parse(res.data.status);
- res.data.items &&
- res.data.items.forEach((item) => {
- let picUrlArr = item.picUrl.split(",");
- item.picUrl = publicFileGetUrl + picUrlArr[0];
- });
- this.list = res.data.items;
- }
- });
- },
- // 点击发货
- toInventory() {
- this.inventoryShow = true;
- },
- // 发货关闭
- close() {
- this.inventoryShow = false;
- this.getDetail();
- },
- },
- };
- </script>
- <style lang="scss" scoped>
- .title {
- line-height: 30px;
- text-align: left;
- }
- .edit-express {
- color: #409eff;
- cursor: pointer;
- }
- .info {
- margin-bottom: 10px;
- &-title {
- font-size: 14px;
- margin-bottom: 20px;
- font-weight: bold;
- }
- &-item {
- padding-left: 50px;
- &-content {
- display: flex;
- &-one {
- display: flex;
- margin-bottom: 10px;
- .title {
- //width: 100px;
- }
- .txt {
- //width: 200px;
- }
- }
- }
- &-logistics {
- margin-bottom: 20px;
- .logistics-title {
- text-align: left;
- font-weight: bold;
- margin-bottom: 20px;
- }
- .info {
- display: flex;
- margin-bottom: 10px;
- &-one {
- display: flex;
- }
- .tit {
- line-height: 22px;
- //width: 100px;
- }
- .txt {
- line-height: 22px;
- //width: 200px;
- }
- .edit-express{
- color: #409eff;
- cursor: pointer;
- }
- }
- .goods {
- margin: 10px 0;
- &-item {
- display: flex;
- border-bottom: 1px solid #f3eeee;
- img {
- width: 100px;
- height: 100px;
- }
- .info {
- padding-left: 20px;
- display: flex;
- flex-direction: column;
- height: 100px;
- justify-content: space-between;
- }
- }
- }
- }
- }
- &-amt {
- margin-top: 10px;
- &-price {
- span {
- display: inline-block;
- width: 80px;
- margin-bottom: 20px;
- }
- }
- }
- }
- .flex {
- display: flex;
- align-items: center;
- .txt {
- margin-left: 20px;
- }
- }
- </style>
|