|
@@ -123,9 +123,11 @@
|
|
|
<view class="module-com content-box">
|
|
<view class="module-com content-box">
|
|
|
<view class="commodity-view">
|
|
<view class="commodity-view">
|
|
|
<view class="commodity-list">
|
|
<view class="commodity-list">
|
|
|
- <view v-for="(s, idx) in detailInfo.product" :key="idx" class="commodity-item" >
|
|
|
|
|
|
|
+ <view v-for="(s, idx) in detailInfo.product" :key="idx" class="commodity-item" style="position:relative;">
|
|
|
<image class="item-icon" :src="s.cover" @click.stop="previewImage(s.bigCover)" />
|
|
<image class="item-icon" :src="s.cover" @click.stop="previewImage(s.bigCover)" />
|
|
|
- <button v-if="s.xhUnitType == 1" style="position:absolute;left:57upx;" class="admin-button-com blue mini-btn" @click="partOne(s)">拆1份</button>
|
|
|
|
|
|
|
+ <button v-if="s.xhUnitType == 1" style="position:absolute;left:15upx;" class="admin-button-com blue mini-btn" @click="partOne(s)">拆1份</button>
|
|
|
|
|
+ <button style="position:absolute;left:155upx;top:78upx;" class="admin-button-com mini-btn" @click="giveItemFn(s)">发起赠送</button>
|
|
|
|
|
+ <text v-if="s.giveNum && Number(s.giveNum)>0" style="position:absolute;left:320upx;top:90upx;color:#333333;">已赠 {{parseFloat(s.giveNum)}}</text>
|
|
|
<view class="item-info" @click="pageTo({url:'/admin/item/detail',query:{id: s.productId}})">
|
|
<view class="item-info" @click="pageTo({url:'/admin/item/detail',query:{id: s.productId}})">
|
|
|
<view class="info-line">
|
|
<view class="info-line">
|
|
|
<text class="item-name">{{ s.name }}</text>
|
|
<text class="item-name">{{ s.name }}</text>
|
|
@@ -252,6 +254,19 @@
|
|
|
:size="32"
|
|
:size="32"
|
|
|
padding="30upx 30upx"
|
|
padding="30upx 30upx"
|
|
|
></modal-module>
|
|
></modal-module>
|
|
|
|
|
+
|
|
|
|
|
+ <modal-module :show="givePopShow" @click="confirmGive" :maskClosable="true" title="数量" padding="30rpx 30rpx" >
|
|
|
|
|
+ <template v-slot:content>
|
|
|
|
|
+ <div class="app-modal-input-wrap">
|
|
|
|
|
+ <div class="inp-list-line">
|
|
|
|
|
+ <div class="line-input">
|
|
|
|
|
+ <input type="number" ref="input" style="width:61.8%;text-align:center;" v-model="giveNum" :adjust-position="false" class="inp-input" @focus="giveNum=''" />
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </template>
|
|
|
|
|
+ </modal-module>
|
|
|
|
|
+
|
|
|
</view>
|
|
</view>
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
@@ -260,7 +275,7 @@ import { mapGetters } from "vuex";
|
|
|
import stepStatus from "./components/stepStatus";
|
|
import stepStatus from "./components/stepStatus";
|
|
|
import TuiListCell from "@/components/plugin/list-cell";
|
|
import TuiListCell from "@/components/plugin/list-cell";
|
|
|
import { getDetail,debtPay,hasPay, freeShipping,confirmFinish,cancel } from "@/api/order";
|
|
import { getDetail,debtPay,hasPay, freeShipping,confirmFinish,cancel } from "@/api/order";
|
|
|
-import { getOrderProduct } from "@/api/order-item";
|
|
|
|
|
|
|
+import { getOrderProduct,giveItem } from "@/api/order-item";
|
|
|
import productMins from "@/mixins/product";
|
|
import productMins from "@/mixins/product";
|
|
|
import { ORDER_STATUS } from "@/utils/declare";
|
|
import { ORDER_STATUS } from "@/utils/declare";
|
|
|
import BLE from "@/mixins/BLE";
|
|
import BLE from "@/mixins/BLE";
|
|
@@ -269,11 +284,13 @@ import { hasHitNavigate } from "@/api/map";
|
|
|
import { getWeixinId } from "@/api/invite";
|
|
import { getWeixinId } from "@/api/invite";
|
|
|
import { IMGHOST } from '@/config'
|
|
import { IMGHOST } from '@/config'
|
|
|
import { partItem } from "@/api/part"
|
|
import { partItem } from "@/api/part"
|
|
|
|
|
+import ModalModule from "@/components/plugin/modal"
|
|
|
export default {
|
|
export default {
|
|
|
name: "orderDetail",
|
|
name: "orderDetail",
|
|
|
components: {
|
|
components: {
|
|
|
stepStatus,
|
|
stepStatus,
|
|
|
- TuiListCell
|
|
|
|
|
|
|
+ TuiListCell,
|
|
|
|
|
+ ModalModule
|
|
|
},
|
|
},
|
|
|
mixins: [productMins,BLE],
|
|
mixins: [productMins,BLE],
|
|
|
data() {
|
|
data() {
|
|
@@ -293,7 +310,10 @@ export default {
|
|
|
settlePrice:0,
|
|
settlePrice:0,
|
|
|
showCancelBtn: true,
|
|
showCancelBtn: true,
|
|
|
getappIdList: {},
|
|
getappIdList: {},
|
|
|
- title:'新订单'
|
|
|
|
|
|
|
+ title:'新订单',
|
|
|
|
|
+ giveTargetId:0,
|
|
|
|
|
+ givePopShow:false,
|
|
|
|
|
+ giveNum:1
|
|
|
};
|
|
};
|
|
|
},
|
|
},
|
|
|
onPullDownRefresh() {
|
|
onPullDownRefresh() {
|
|
@@ -322,6 +342,31 @@ export default {
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
methods: {
|
|
methods: {
|
|
|
|
|
+ giveItemFn(item){
|
|
|
|
|
+ this.givePopShow = true
|
|
|
|
|
+ this.giveNum = 1
|
|
|
|
|
+ this.giveTargetId = item.id
|
|
|
|
|
+ },
|
|
|
|
|
+ confirmGive(){
|
|
|
|
|
+ let that = this
|
|
|
|
|
+ if(Number(this.giveTargetId)<=0){
|
|
|
|
|
+ this.$msg('请选择要赠送的花材')
|
|
|
|
|
+ return false
|
|
|
|
|
+ }
|
|
|
|
|
+ if(Number(this.giveNum)<=0){
|
|
|
|
|
+ this.$msg('请填写赠送数量')
|
|
|
|
|
+ return false
|
|
|
|
|
+ }
|
|
|
|
|
+ uni.showLoading({mask:true})
|
|
|
|
|
+ giveItem({id:this.giveTargetId,num:this.giveNum}).then(res=>{
|
|
|
|
|
+ uni.hideLoading()
|
|
|
|
|
+ if(res.code == 1){
|
|
|
|
|
+ that.givePopShow = false
|
|
|
|
|
+ that.init()
|
|
|
|
|
+ that.$msg(that.msg)
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
|
|
+ },
|
|
|
partOne(item){
|
|
partOne(item){
|
|
|
let that = this
|
|
let that = this
|
|
|
let product = [{ productId: item.productId, bigNum: 1, smallNum: 0, classId: 0, itemId: item.itemId, ratio:item.ratio }]
|
|
let product = [{ productId: item.productId, bigNum: 1, smallNum: 0, classId: 0, itemId: item.itemId, ratio:item.ratio }]
|
|
@@ -751,7 +796,7 @@ export default {
|
|
|
align-items: flex-end;
|
|
align-items: flex-end;
|
|
|
.item-name {
|
|
.item-name {
|
|
|
color: black;
|
|
color: black;
|
|
|
- font-size: 30upx;
|
|
|
|
|
|
|
+ font-size:34upx;
|
|
|
font-weight: 700;
|
|
font-weight: 700;
|
|
|
overflow: hidden;
|
|
overflow: hidden;
|
|
|
white-space: nowrap;
|
|
white-space: nowrap;
|