|
|
@@ -479,6 +479,25 @@
|
|
|
</template>
|
|
|
</modal-module>
|
|
|
|
|
|
+ <modal-module :show="treePrintShow" @click="confirmPrintTree" :maskClosable="true" title="填写数量" padding="30rpx 30rpx" >
|
|
|
+ <template v-slot:content>
|
|
|
+ <view class="app-modal-input-wrap">
|
|
|
+ <view class="inp-list-line">
|
|
|
+ <view class="line-label">打印数</view>
|
|
|
+ <view class="line-input">
|
|
|
+ <input type="number" @blur="treePrintBlur" :focus="treePrintFocus" v-model="treePrintNum" :adjust-position="false" class="inp-input" />
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ <view class="inp-list-line">
|
|
|
+ <view class="line-label">装箱数</view>
|
|
|
+ <view class="line-input">
|
|
|
+ <input type="number" v-model="treeBoxNum" :adjust-position="false" class="inp-input" />
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ </template>
|
|
|
+ </modal-module>
|
|
|
+
|
|
|
<uni-popup ref="modifyRemarkRef" background-color="#fff" type="center" :animation="false" class="class-popup-style">
|
|
|
<view style="padding:30upx;">
|
|
|
<textarea v-model="modifyRemarkText" style="border:1upx solid #cccccc;height:140upx;font-size:28upx;" placeholder="请填写备注"></textarea>
|
|
|
@@ -610,8 +629,8 @@
|
|
|
import { mapGetters } from "vuex";
|
|
|
import stepStatus from "./components/stepStatus";
|
|
|
import TuiListCell from "@/components/plugin/list-cell";
|
|
|
-import { getDetail,debtPay,hasPay, freeShipping,confirmFinish,cancel,modifyRemarkFn,orderFh,modifyOrderConfirmTimeFn,printWlLabel } from "@/api/order";
|
|
|
-import { getOrderProduct,giveItem } from "@/api/order-item";
|
|
|
+import { getDetail,debtPay,hasPay, freeShipping,confirmFinish,cancel,modifyRemarkFn,orderFh,modifyOrderConfirmTimeFn,printWlLabel} from "@/api/order";
|
|
|
+import { getOrderProduct,giveItem,printItemWlLabel } from "@/api/order-item";
|
|
|
import productMins from "@/mixins/product";
|
|
|
import { ORDER_STATUS } from "@/utils/declare";
|
|
|
import { cloudPrintOrder, cancelOrder,cancelBookOrderInfo,confirmReachFn,changeSendStaffFn } from "@/api/order";
|
|
|
@@ -681,6 +700,11 @@ export default {
|
|
|
tipAmount: '',
|
|
|
tipOrderId: 0,
|
|
|
tipDeliveryId: '',
|
|
|
+ treePrintShow: false,
|
|
|
+ treePrintFocus: false,
|
|
|
+ treePrintNum: '',
|
|
|
+ treeBoxNum: '',
|
|
|
+ treePrintItem: null,
|
|
|
// 配送状态映射
|
|
|
sendStatusMap: {
|
|
|
'-4': { text: '未叫跑腿', color: '#999' },
|
|
|
@@ -761,7 +785,61 @@ export default {
|
|
|
this.$util.pageTo({url: '/pagesOrder/tree?orderSn='+this.detailInfo.orderSn+'&productId='+item.productId})
|
|
|
},
|
|
|
printTree(item){
|
|
|
- console.log(item,'printTree')
|
|
|
+ this.treePrintItem = item
|
|
|
+ this.treePrintNum = ''
|
|
|
+ this.treeBoxNum = ''
|
|
|
+ this.treePrintShow = true
|
|
|
+ setTimeout(() => {
|
|
|
+ this.$nextTick(() => {
|
|
|
+ this.treePrintFocus = true
|
|
|
+ })
|
|
|
+ }, 200)
|
|
|
+ },
|
|
|
+ treePrintBlur() {
|
|
|
+ this.treePrintFocus = false
|
|
|
+ },
|
|
|
+ confirmPrintTree(val) {
|
|
|
+ if (val.index == 0) {
|
|
|
+ this.treePrintShow = false
|
|
|
+ this.treePrintFocus = false
|
|
|
+ return
|
|
|
+ }
|
|
|
+
|
|
|
+ let currentNum = this.treePrintNum
|
|
|
+ let currentBoxNum = this.treeBoxNum
|
|
|
+ if (currentNum === '' || currentNum == null) {
|
|
|
+ this.$msg('请填写打印数')
|
|
|
+ this.treePrintFocus = true
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if (Number(currentNum) <= 0) {
|
|
|
+ this.$msg('打印数不能小于1')
|
|
|
+ this.treePrintFocus = true
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if (currentBoxNum === '' || currentBoxNum == null) {
|
|
|
+ this.$msg('请填写装箱')
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if (Number(currentBoxNum) <= 0) {
|
|
|
+ this.$msg('装箱不能小于1')
|
|
|
+ this.treePrintFocus = true
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if (!this.treePrintItem || !this.treePrintItem.id) {
|
|
|
+ this.$msg('打印的花材id出错')
|
|
|
+ this.treePrintShow = false
|
|
|
+ this.treePrintFocus = false
|
|
|
+ return
|
|
|
+ }
|
|
|
+ let orderSn = this.detailInfo.orderSn || ''
|
|
|
+ printItemWlLabel({orderSn: orderSn,id: this.treePrintItem.id,num: currentNum,boxNum: currentBoxNum}).then(res => {
|
|
|
+ this.treePrintShow = false
|
|
|
+ this.treePrintFocus = false
|
|
|
+ if (res.code == 1) {
|
|
|
+
|
|
|
+ }
|
|
|
+ })
|
|
|
},
|
|
|
toggleFinanceInfo() {
|
|
|
this.showFinanceInfo = !this.showFinanceInfo
|