|
|
@@ -0,0 +1,373 @@
|
|
|
+<template>
|
|
|
+ <view class="app-content">
|
|
|
+ <view class="info-content_box">
|
|
|
+ <view class="title">
|
|
|
+ 制单信息
|
|
|
+ </view>
|
|
|
+ <view class="bills-info_box content-box">
|
|
|
+ <view class="order-info_box">
|
|
|
+ <view>制单日期:</view>
|
|
|
+ <view>{{ detailInfo.addTime.substr(5,11) }}</view>
|
|
|
+ </view>
|
|
|
+ <view class="order-info_box">
|
|
|
+ <view>制单编号:</view>
|
|
|
+ <view>{{ detailInfo.orderSn }}</view>
|
|
|
+ <view class="price">
|
|
|
+ <button @click="copy(detailInfo.orderSn)" class="admin-button-com default">复制</button>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ <view class="order-info_box" v-if="detailInfo.status==1">
|
|
|
+ <view>制作人员:</view>
|
|
|
+ <view>{{detailInfo.finishStaffName}}</view>
|
|
|
+ </view>
|
|
|
+ <view class="order-info_box">
|
|
|
+ <view>制单状态:</view>
|
|
|
+ <view>{{ detailInfo.status==0?'待完成':detailInfo.status==1?'已完成':detailInfo.status==2?'已取消':'待完成' }}</view>
|
|
|
+ </view>
|
|
|
+ <view class="order-info_box" v-if="Number(detailInfo.orderPrice)>0">
|
|
|
+ <view>订单金额:</view>
|
|
|
+ <view>{{ detailInfo.orderPrice ? parseFloat(detailInfo.orderPrice) : 0 }}</view>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ <view class="flex-space title" v-if="!$util.isEmpty(goodsInfo)"> 作品 </view>
|
|
|
+ <view class="module-com content-box" v-if="!$util.isEmpty(goodsInfo)">
|
|
|
+ <view class="commodity-view">
|
|
|
+ <view class="commodity-list">
|
|
|
+ <view class="commodity-item" >
|
|
|
+ <image class="item-icon" :src="goodsInfo.cover" @click="pageTo({url:'/admin/goods/detail',query:{id: goodsInfo.id}})" ></image>
|
|
|
+ <view class="item-info">
|
|
|
+ <view class="info-line">
|
|
|
+ <text class="item-name">{{ goodsInfo.name }}</text>
|
|
|
+ <text class="item-price">
|
|
|
+ <text class="unit"></text>
|
|
|
+ <text class="price">
|
|
|
+ <text>{{ detailInfo.num }}份</text>
|
|
|
+ </text>
|
|
|
+ </text>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+
|
|
|
+ <view class="flex-space title"> 使用花材 </view>
|
|
|
+ <view class="module-com content-box">
|
|
|
+ <view class="commodity-view">
|
|
|
+ <view class="commodity-list">
|
|
|
+ <view v-for="(s, idx) in workItem" :key="idx" class="commodity-item" >
|
|
|
+ <image class="item-icon" :src="s.cover" @click="pageTo({url:'/admin/item/detail',query:{id: s.itemId}})" ></image>
|
|
|
+ <view class="item-info">
|
|
|
+ <view class="info-line">
|
|
|
+ <text class="item-name">{{ s.name }}</text>
|
|
|
+ <text class="item-price">
|
|
|
+ <text class="unit"></text>
|
|
|
+ <text class="price">
|
|
|
+ <text>{{s.num}}{{s.unitName}}</text>
|
|
|
+ <text></text>
|
|
|
+ </text>
|
|
|
+ </text>
|
|
|
+ </view>
|
|
|
+ <view class="info-line">
|
|
|
+ <text class="item-type">{{s.ratio}}{{s.smallName}}/{{s.bigName}}</text>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ <view class="summary-bar">
|
|
|
+ <view class="operate-view" ></view>
|
|
|
+ <view class="describe-view">
|
|
|
+ <text>
|
|
|
+ <text> </text>
|
|
|
+ </text>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ <view v-if="detailInfo.remark!=''" class="content-box price-detail">
|
|
|
+ <div class="module-com input-line-wrap">
|
|
|
+ <tui-list-cell class="line-cell" :hover="false">
|
|
|
+ <div class="tui-title">备注</div>
|
|
|
+ <div>{{ detailInfo.remark }}</div>
|
|
|
+ </tui-list-cell>
|
|
|
+ </div>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ <div class="app-footer">
|
|
|
+ <button class="admin-button-com bule" v-if="detailInfo.status == 1" @click="printWork(detailInfo)">打印</button>
|
|
|
+ <button class="admin-button-com default" v-else>打印</button>
|
|
|
+ <button class="admin-button-com bule" v-if="detailInfo.status == 0" @click="cancelFn(detailInfo)">取消</button>
|
|
|
+ <button class="admin-button-com default" v-else>取消</button>
|
|
|
+ </div>
|
|
|
+ </view>
|
|
|
+</template>
|
|
|
+<script>
|
|
|
+import { mapGetters } from "vuex";
|
|
|
+import TuiListCell from "@/components/plugin/list-cell";
|
|
|
+import { fullInfo,cancelWork,print } from "@/api/work/index";
|
|
|
+export default {
|
|
|
+ name: "detail",
|
|
|
+ components: { TuiListCell },
|
|
|
+ mixins: [],
|
|
|
+ data() {
|
|
|
+ return {
|
|
|
+ detailInfo: {addTime:''},
|
|
|
+ workItem:[],
|
|
|
+ goodsInfo:[]
|
|
|
+ };
|
|
|
+ },
|
|
|
+ onPullDownRefresh() {
|
|
|
+ this.init().then(res => {
|
|
|
+ uni.stopPullDownRefresh()
|
|
|
+ })
|
|
|
+ },
|
|
|
+ onShow() {
|
|
|
+
|
|
|
+ },
|
|
|
+ computed: {
|
|
|
+ ...mapGetters({ loginInfo: "getLoginInfo" }),
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ printWork(item){
|
|
|
+ print({id:item.id}).then(res=>{
|
|
|
+ if(res.code == 1){
|
|
|
+ this.$msg(res.msg)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ cancelFn(item){
|
|
|
+ let that = this
|
|
|
+ that.$util.confirmModal({content:'确认取消?'},() => {
|
|
|
+ cancelWork({id:item.id}).then(res=>{
|
|
|
+ if(res.code == 1){
|
|
|
+ item.status = 2
|
|
|
+ that.$msg('取消成功')
|
|
|
+ }
|
|
|
+ })
|
|
|
+ })
|
|
|
+ },
|
|
|
+ copy(val) {
|
|
|
+ const self = this;
|
|
|
+ uni.setClipboardData({
|
|
|
+ data: val,
|
|
|
+ success: function() {
|
|
|
+ self.$msg("复制成功");
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
+ async init() {
|
|
|
+ const res = await fullInfo({ id: this.option.id })
|
|
|
+ this.detailInfo = res.data.info;
|
|
|
+ this.workItem = res.data.item
|
|
|
+ this.goodsInfo = res.data.goods
|
|
|
+ }
|
|
|
+ }
|
|
|
+};
|
|
|
+</script>
|
|
|
+<style lang="scss" scoped>
|
|
|
+.info-content_box {
|
|
|
+ padding: 0 20upx 100upx;
|
|
|
+ & > .title {
|
|
|
+ color: #666666;
|
|
|
+ font-size: 28upx;
|
|
|
+ font-weight: 600;
|
|
|
+ padding: 30upx 3upx;
|
|
|
+ }
|
|
|
+ & .address-des_bx {
|
|
|
+ display: flex;
|
|
|
+ padding: 20upx 10upx 30upx 20upx;
|
|
|
+ & > view:nth-child(1) {
|
|
|
+ flex: 1;
|
|
|
+ margin-top: 10upx;
|
|
|
+ & > view:nth-child(1) {
|
|
|
+ color: #333333;
|
|
|
+ font-size: 32upx;
|
|
|
+ font-weight: bold;
|
|
|
+ }
|
|
|
+ & > view:nth-child(2) {
|
|
|
+ color: #666666;
|
|
|
+ font-size: 28upx;
|
|
|
+ font-weight: 400;
|
|
|
+ margin-top: 20upx;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ & > view:nth-child(2) {
|
|
|
+ display: flex;
|
|
|
+ & .icondianhua1 {
|
|
|
+ font-size: 50upx;
|
|
|
+ color: #3385ff;
|
|
|
+ margin-left: 0upx;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .bills-info_box {
|
|
|
+ padding: 30upx 20upx 30upx;
|
|
|
+ & > .order-info_box {
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ font-size: 26upx;
|
|
|
+ font-weight: 400;
|
|
|
+ margin-bottom: 5upx;
|
|
|
+ & > view:nth-child(1) {
|
|
|
+ color: #999999;
|
|
|
+ width: 135upx;
|
|
|
+ text-align: right;
|
|
|
+ }
|
|
|
+ & > view:nth-child(2) {
|
|
|
+ color: #333333;
|
|
|
+ }
|
|
|
+ & > .price {
|
|
|
+ flex: 1;
|
|
|
+ font-size: 30upx;
|
|
|
+ color: #333333;
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ justify-content: flex-end;
|
|
|
+ & .iconxiangyou {
|
|
|
+ color: #999999;
|
|
|
+ font-size: 25upx;
|
|
|
+ margin-left: 12upx;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .content-box {
|
|
|
+ background-color: #ffffff;
|
|
|
+ border-radius: 10upx;
|
|
|
+ }
|
|
|
+ .commodity-view {
|
|
|
+ display: flex;
|
|
|
+ flex-direction: column;
|
|
|
+ .commodity-list {
|
|
|
+ padding: 20upx;
|
|
|
+ .commodity-item {
|
|
|
+ display: flex;
|
|
|
+ margin-bottom: 20upx;
|
|
|
+ .item-icon {
|
|
|
+ flex-shrink: 0;
|
|
|
+ width: 140upx;
|
|
|
+ height: 140upx;
|
|
|
+ }
|
|
|
+ .item-info {
|
|
|
+ display: flex;
|
|
|
+ flex-direction: column;
|
|
|
+ justify-content: center;
|
|
|
+ flex: 1;
|
|
|
+ margin-left: 20upx;
|
|
|
+ .info-line {
|
|
|
+ margin-bottom: 20upx;
|
|
|
+ display: flex;
|
|
|
+ justify-content: space-between;
|
|
|
+ align-items: flex-end;
|
|
|
+ .item-name {
|
|
|
+ color: black;
|
|
|
+ font-size: 30upx;
|
|
|
+ font-weight: 700;
|
|
|
+ overflow: hidden;
|
|
|
+ white-space: nowrap;
|
|
|
+ text-overflow: ellipsis;
|
|
|
+ width:360upx;
|
|
|
+ }
|
|
|
+ .item-price {
|
|
|
+ color: #333;
|
|
|
+ font-size: 22upx;
|
|
|
+ .price {
|
|
|
+ font-size: 25upx;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .item-type {
|
|
|
+ color: #999;
|
|
|
+ font-size: 24upx;
|
|
|
+ }
|
|
|
+ .item-count {
|
|
|
+ color: #666;
|
|
|
+ font-size: 24upx;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .summary-bar {
|
|
|
+ padding: 0 20upx;
|
|
|
+ height: 90upx;
|
|
|
+ display: flex;
|
|
|
+
|
|
|
+ align-items: center;
|
|
|
+ justify-content: space-between;
|
|
|
+ border-top: 1upx solid #eeeeee;
|
|
|
+ .operate-view {
|
|
|
+ display: flex;
|
|
|
+
|
|
|
+ align-items: center;
|
|
|
+ color: #3385ff;
|
|
|
+ font-size: 26upx;
|
|
|
+ .iconfont {
|
|
|
+ margin-right: 20upx;
|
|
|
+ font-size: 40upx;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .describe-view {
|
|
|
+ display: flex;
|
|
|
+
|
|
|
+ align-items: center;
|
|
|
+ color: #333;
|
|
|
+ font-size: 24upx;
|
|
|
+ .price {
|
|
|
+ font-weight: bold;
|
|
|
+ font-size: 28upx;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .shipping-address {
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ margin-top: 20upx;
|
|
|
+ & > view:nth-child(1) {
|
|
|
+ color: #999999;
|
|
|
+ font-size: 28upx;
|
|
|
+ font-weight: 400;
|
|
|
+ display: inline-block;
|
|
|
+ padding: 30upx 0 30upx 20upx;
|
|
|
+ flex: 1;
|
|
|
+ & > text {
|
|
|
+ color: #333333;
|
|
|
+ font-weight: 600;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ & > view:nth-child(2) {
|
|
|
+ font-size: 60upx;
|
|
|
+ color: #d6e7ff;
|
|
|
+ margin-right: 10upx;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .price-detail {
|
|
|
+ margin-top: 20upx;
|
|
|
+ margin-bottom: 20upx;
|
|
|
+ }
|
|
|
+ .detail-price_box {
|
|
|
+ color: #333333;
|
|
|
+ font-size: 22upx;
|
|
|
+ text-align: right;
|
|
|
+ flex: 1;
|
|
|
+ font-weight: 600;
|
|
|
+ &.red {
|
|
|
+ color: #ff2842;
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|
|
|
+.app-footer {
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ justify-content: flex-end;
|
|
|
+ & .admin-button-com {
|
|
|
+ padding: 0;
|
|
|
+ margin-right:30upx;
|
|
|
+ width: 180upx;
|
|
|
+ height: 80upx;
|
|
|
+ line-height: 80upx;
|
|
|
+ font-size:30upx;
|
|
|
+ text-align: center;
|
|
|
+ }
|
|
|
+}
|
|
|
+</style>
|