| | |
| | | }
|
| | | }
|
| | | // #endif
|
| | | // #ifdef PUB_CUSTOMER |
| | | , {
|
| | | "path": "order-manage/order-manage-settlement-op-detail",
|
| | | "style": {
|
| | | "navigationBarTitleText": "送货单质检操作明细"
|
| | | }
|
| | | }
|
| | | // #endif |
| | | ]
|
| | | },
|
| | | {
|
| | |
| | | {
|
| | | "path": "self/member-center",
|
| | | "style": {
|
| | | "navigationBarTitleText": "会员中心", |
| | | "enablePullDownRefresh": true |
| | | "navigationBarTitleText": "会员中心",
|
| | | "enablePullDownRefresh": true
|
| | | }
|
| | | }
|
| | | // #endif
|
| | |
| | | }, |
| | | printDeliveryOrder(item) { |
| | | // this.$message.showToast('敬请期待') |
| | | this.$storage.setItem('cache_delivery_order_print', JSON.stringify(item)) |
| | | var arr = [] |
| | | arr.push(item) |
| | | this.$storage.setItem('cache_delivery_order_print', JSON.stringify(arr)) |
| | | uni.navigateTo({ |
| | | url: '/sub_pages/supplier/print/print-list' |
| | | }) |
| | |
| | | url: '/pages/order/order-detail?showsales=1&id=' + dto.id + '&flowerId=' + flower.id |
| | | }) |
| | | }, |
| | | toOrderItemDetail(item, op, opstr) { |
| | | uni.navigateTo({ |
| | | url: `/sub_pages/supplier/order-manage/order-manage-settlement-op-detail?opStr=${opStr}&op=${op}&orderItemId=${item.id || item.orderItemId}` |
| | | }) |
| | | }, |
| | | async buttonClick(item, buttontype) { |
| | | switch (buttontype) { |
| | | case 'refund': { |
| | |
| | | if (code === 0) { |
| | | // this.$store.dispatch('sign_add', 'order') |
| | | this.refreshList() |
| | | |
| | | |
| | | } |
| | | } |
| | | break |
| | |
| | | </image> |
| | | <view class="flex1"> |
| | | <view class=" flex"> |
| | | <view class="title"><span class="level">{{ item.flowerCategory }}</span><span |
| | | class="level">{{ item.flowerLevelStr }}</span>{{ item.flowerName }} |
| | | <view class="title flex flex1"> |
| | | <!-- <span class="level">{{ item.flowerCategory }}</span> --> |
| | | <span class="m-r-10">{{ item.flowerName }}</span> |
| | | <span class="level">{{ item.flowerLevelStr }}</span> |
| | | <view class="m-l-a m-r-10 flex"> |
| | | <view class="m-r-10 button-icon" @click="toOrderItemDetail(item,'lack','缺货')" |
| | | v-if="item.lackNum"> |
| | | 缺货<uni-icons type="right" size="14" color="#ffffff"></uni-icons> |
| | | </view> |
| | | <view class="m-r-10 button-icon" @click="toOrderItemDetail(item,'reduce','降级')" |
| | | v-if="item.reduceNum"> |
| | | 降级<uni-icons type="right" size="14" color="#ffffff"></uni-icons> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | <view class="each-list"> |
| | |
| | | </view> |
| | | </view> |
| | | </view> |
| | | <view class="line-gray" v-if="dto.statusBackend!=='COMPLETED'&&dto.statusBackend!=='SEND'&&dto.statusBackend=='RECEIVE'"></view> |
| | | <view class="line-gray" |
| | | v-if="dto.statusBackend!=='COMPLETED'&&dto.statusBackend!=='SEND'&&dto.statusBackend=='RECEIVE'"> |
| | | </view> |
| | | <!-- dtoId:{{dto.id}} --> |
| | | <!-- flowerId:{{item.id}} --> |
| | | <view class="flex buttons" v-if="dto.statusBackend!=='COMPLETED'&&dto.statusBackend!=='SEND'&&dto.statusBackend=='RECEIVE'"> |
| | | <view class="flex buttons" |
| | | v-if="dto.statusBackend!=='COMPLETED'&&dto.statusBackend!=='SEND'&&dto.statusBackend=='RECEIVE'"> |
| | | <view class="button button-1 m-l-a m-r-0" @click="toDetailSaleInfo(dto,item)" |
| | | v-if="dto.statusBackend === 'RECEIVE'"> 申请售后 |
| | | </view> |
| | |
| | | font-size: 28rpx; |
| | | color: #000000; |
| | | line-height: 40rpx; |
| | | flex: 1; |
| | | |
| | | .level { |
| | | font-weight: 400; |
| | |
| | | line-height: 40rpx; |
| | | margin-right: 20rpx; |
| | | } |
| | | |
| | | .button-icon { |
| | | color: #fff; |
| | | padding-left: 10rpx; |
| | | padding-right: 10rpx; |
| | | background-color: darkred; |
| | | } |
| | | } |
| | | |
| | | .flower-img { |
| | |
| | | height: 118rpx; |
| | | min-width: 128rpx; |
| | | min-height: 118rpx; |
| | | |
| | | |
| | | } |
| | | |
| | | .each-list { |
| | |
| | | res.data.code.startsWith('401')) { |
| | | console.log('resp', res) |
| | | // storage.removeItem('token') |
| | | await store.dispatch('logout') |
| | | message.showToast('登录信息失效') |
| | | // await store.dispatch('logout') |
| | | store.commit('updateLogin', false) |
| | | |
| | | await message.showToast('登录信息失效') |
| | | |
| | | // #ifdef PUB_CUSTOMER |
| | | uni.reLaunch({ |
| | |
| | | // commit('updat') |
| | | // store.commit('updateLogin', false) |
| | | console.log('401', res) |
| | | storage.removeItem('token') |
| | | await store.dispatch('logout') |
| | | message.showToast('登录信息失效') |
| | | // storage.removeItem('token') |
| | | // await store.dispatch('logout') |
| | | store.commit('updateLogin', false) |
| | | await message.showToast('登录信息失效') |
| | | |
| | | |
| | | // #ifdef PUB_CUSTOMER |
| | |
| | | if (this.dto.couponRecordId && this.cache_coupon) { |
| | | //计算优惠券 |
| | | if (this.cache_coupon.couponDiscountType === 'zero') { |
| | | return this.cache_coupon.couponDiscountValue || 0 |
| | | return parseFloat(this.cache_coupon.couponDiscountValue).toFixed(2) || 0 |
| | | } else if (this.cache_coupon.minOrderAmount && this.cache_coupon.minOrderAmount > 0) { |
| | | var total = ((this.dto.totalMemberAmount || this.dto.totalAmount || 0) + (this.dto.packing || 0) + |
| | | (this.current_transport.fee || |
| | | 0) || 0) |
| | | .toFixed(2) |
| | | var total = (this.dto.totalMemberAmount || this.dto.totalAmount || 0).toFixed(2) |
| | | // + (this.dto.packing || 0) + |
| | | // (this.current_transport.fee || |
| | | // 0) || 0) |
| | | // .toFixed(2) |
| | | |
| | | if (total >= this.cache_coupon.minOrderAmount) { |
| | | return this.cache_coupon.couponDiscountValue || 0 |
| | | return parseFloat(this.cache_coupon.couponDiscountValue).toFixed(2) || 0 |
| | | } else { |
| | | |
| | | } |
| | | } else { |
| | | return this.cache_coupon.couponDiscountValue || 0 |
| | | return parseFloat(this.cache_coupon.couponDiscountValue).toFixed(2) || 0 |
| | | } |
| | | } |
| | | |
| | | return 0 |
| | | }, |
| | | order_fee() { |
| | | // 如果订单-优惠券<0,就等于0 +打包+运费,如果还等于0,那么就0.01 |
| | | var m1 = parseFloat(this.dto.totalMemberAmount || this.dto.totalAmount || 0) |
| | | var m2 = parseFloat((this.dto.packing || 0) + (this.current_transport.fee || 0)) |
| | | |
| | | if (m1 <= parseFloat(this.coupon_fee)) { |
| | | if (m2 > 0) { |
| | | return (m2).toFixed(2) |
| | | } else { |
| | | return '0.01' |
| | | } |
| | | } else { |
| | | return ((m1 - parseFloat(this.coupon_fee)) + m2).toFixed(2) |
| | | } |
| | | |
| | | } |
| | | |
| | | }, |
| | |
| | | <view class="bottom-price flex"> |
| | | <view class="m-t-12 m-l-0 m-r-a"> |
| | | 合计 <span class="t-red">¥ |
| | | {{ (( dto.totalMemberAmount || dto.totalAmount || 0) + (dto.packing || 0) + (current_transport.fee || 0) - coupon_fee || 0).toFixed(2) }} |
| | | {{ order_fee }} |
| | | </span>元 |
| | | </view> |
| | | <view class="button-green-1 m-l-a m-r-0" style="min-width: 240rpx" @click="submitOrder"> |
| | |
| | | <uni-icons color="#20613D" type="search" size="24" @click="buttonSearchFlow"></uni-icons> |
| | | </template> |
| | | </u-input> --> |
| | | <u-input :placeholder="search_home_placeholder" v-model="query.name" clearable @confirm="buttonSearchFlow" @clear="()=>{ |
| | | <u-input :placeholder="search_home_placeholder" v-model="query.name" clearable |
| | | @confirm="buttonSearchFlow" @clear="()=>{ |
| | | $nextTick(()=>{buttonSearchFlow()}) |
| | | }"> |
| | | <!-- <u--text text="http://" slot="prefix" margin="0 3px 0 0" type="tips"></u--text> --> |
| | | |
| | | |
| | | <template slot="suffix"> |
| | |
| | | currentCategory: {}, |
| | | type: 'category', //supplier |
| | | def: 0, |
| | | typeList:[ |
| | | { |
| | | label: '按分类', |
| | | value: 'category', |
| | | }, |
| | | { |
| | | label: '按店铺', |
| | | value: 'supplier', |
| | | }, |
| | | typeList: [{ |
| | | label: '按分类', |
| | | value: 'category', |
| | | }, |
| | | { |
| | | label: '按店铺', |
| | | value: 'supplier', |
| | | }, |
| | | ], |
| | | search_home_placeholder:"请输入分类", |
| | | search_home_placeholder: "请输入分类", |
| | | |
| | | |
| | | } |
| | |
| | | }) |
| | | }, |
| | | methods: { |
| | | fnChange(e) { |
| | | fnChange(e) { |
| | | this.type = e.value |
| | | if (this.type == 'category') { |
| | | this.search_home_placeholder = '请输入分类' |
| | | uni.setNavigationBarTitle({ |
| | | title: '搜分类', |
| | | success: function() { |
| | | // console.log('标题搜鲜花修改成功'); |
| | | } |
| | | title: '搜分类', |
| | | success: function() { |
| | | // console.log('标题搜鲜花修改成功'); |
| | | } |
| | | }); |
| | | |
| | | } else { |
| | | this.search_home_placeholder = '请输入店铺名' |
| | | uni.setNavigationBarTitle({ |
| | | title: '按店铺', |
| | | success: function() { |
| | | // console.log('标题搜店铺修改成功'); |
| | | } |
| | | title: '按店铺', |
| | | success: function() { |
| | | // console.log('标题搜店铺修改成功'); |
| | | } |
| | | }); |
| | | } |
| | | }, |
| | |
| | | }, |
| | | printDeliveryOrder(item) { |
| | | // this.$message.showToast('敬请期待') |
| | | this.$storage.setItem('cache_delivery_order_print', JSON.stringify(item)) |
| | | var arr = [] |
| | | arr.push(item) |
| | | this.$storage.setItem('cache_delivery_order_print', JSON.stringify(arr)) |
| | | uni.navigateTo({ |
| | | url: '/sub_pages/supplier/print/print-list' |
| | | }) |
| | |
| | | statusStr: '', |
| | | status: 'ARRIVED,PENDING', |
| | | warehouseLocationCode: '', |
| | | date: null |
| | | }, |
| | | show_select_station: false, |
| | | show_select_status: false, |
| | |
| | | }, |
| | | ], |
| | | flg: '0', |
| | | ids: [], |
| | | } |
| | | }, |
| | | onLoad(options) { |
| | | this.query.supplierId = options.supplierId || '' |
| | | this.query.stationId = options.stationId || '' |
| | | if (options.warehouseLocationCode) { |
| | | console.log('options',options) |
| | | this.query.warehouseLocationCode = options.warehouseLocationCode || '' |
| | | } |
| | | |
| | |
| | | |
| | | if (options.range == 'today') { |
| | | this.listApi += '/today' |
| | | } |
| | | if (options.date) { |
| | | this.query.date = options.date |
| | | } |
| | | |
| | | this.getList() |
| | |
| | | uni.stopPullDownRefresh() |
| | | }, |
| | | methods: { |
| | | |
| | | changeItem(item) { |
| | | if (this.ids.indexOf(item.orderNo) >= 0) { |
| | | this.ids.splice(this.ids.indexOf(item.orderNo), 1) |
| | | } else { |
| | | this.ids.push(item.orderNo) |
| | | } |
| | | }, |
| | | callTel(tel) { |
| | | if (tel) { |
| | | uni.makePhoneCall({ |
| | |
| | | }, |
| | | printDeliveryOrder(item) { |
| | | // this.$message.showToast('敬请期待') |
| | | this.$storage.setItem('cache_delivery_order_print', JSON.stringify(item)) |
| | | var arr = [] |
| | | arr.push(item) |
| | | this.$storage.setItem('cache_delivery_order_print', JSON.stringify(arr)) |
| | | uni.navigateTo({ |
| | | url: '/sub_pages/supplier/print/print-list' |
| | | }) |
| | |
| | | changeTab(flg) { |
| | | this.flg = '' + flg |
| | | this.query.status = this.tabs[flg].status |
| | | this.ids = [] |
| | | this.refreshList() |
| | | }, |
| | | selectAllOrder() { |
| | | if (this.ids.length > 0) { |
| | | // this.$message.showToast('敬请期待') |
| | | var arr = [] |
| | | for (var item of this.list) { |
| | | if (this.ids.indexOf(item.orderNo)) { |
| | | for (var each of item.items) { |
| | | arr.push(each) |
| | | } |
| | | } |
| | | } |
| | | if (arr.length > 0) { |
| | | this.$storage.setItem('cache_delivery_order_print', JSON.stringify(arr)) |
| | | uni.navigateTo({ |
| | | url: '/sub_pages/supplier/print/print-list' |
| | | }) |
| | | } |
| | | |
| | | } |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | |
| | | </view> |
| | | </view> |
| | | |
| | | <!-- <view class="search-container m-t-12 flex"> --> |
| | | |
| | | <!-- <view class="component-filter-container p10 bg-white m-l-10"> |
| | | <view class="flex1" @click="show_select_status=true"> |
| | | <view class="search-container m-t-12 flex" v-if="list&&list.length>0"> |
| | | <view class="component-filter-container p10 m-l-10 flex flex1" style="text-align: right;"> |
| | | <!-- <view class="flex1" @click="show_select_status=true"> |
| | | 配送单状态:{{ query.statusStr || '全部' }} |
| | | <image src="../../../static/common/icon-arrow-down.png" class="icon-arrow-down"></image> |
| | | </view> --> |
| | | <view class="flex1 m-l-a m-r-10" @click="selectAllOrder" style="text-align: right;"> |
| | | 点击打印全部(已选{{ids.length}}个) |
| | | <!-- <image src="../../../static/common/icon-arrow-down.png" class="icon-arrow-down"></image> --> |
| | | </view> |
| | | </view> --> |
| | | <!-- </view> --> |
| | | </view> |
| | | </view> |
| | | |
| | | |
| | | <no-data v-if="!list||list.length===0" style="width: 100%;"></no-data> |
| | | <!-- <view v-if="list&&list.length>0"> |
| | | <view class="m-t-12"> |
| | | <radio :checked="checkall" @click="selectAll"></radio> |
| | | 全选 |
| | | </view> |
| | | </view> --> |
| | | <view v-for="(item,index) in list" :key="index" class="m-b-24"> |
| | | <view class="delivery-item bg-white br-4 p10"> |
| | | <view class="title flex"> |
| | | <radio class="m-r-10" :checked="ids.indexOf(item.orderNo)>=0" @click="changeItem(item)"> |
| | | </radio> |
| | | <view>供应商:{{ item.supplierName }}</view> |
| | | <view class="w-fit m-l-a m-r-0 text-right" v-if="item.supplierTel" |
| | | @click="callTel(item.supplierTel)">{{ item.supplierTel }}</view> |
| | |
| | | <script> |
| | | export default { |
| | | data() { |
| | | var defaultDatePre = new Date(new Date().getTime() - 24 * 3600 * 1000) |
| | | return { |
| | | query: { |
| | | supplierName: '', |
| | |
| | | }, |
| | | show_select_station: false, |
| | | show_select_status: false, |
| | | selecttoday: true, |
| | | selecttoday: false, |
| | | columns_station: [], |
| | | status_columns: [], |
| | | show_time_picker_time: false, |
| | |
| | | status: 'CHECKED', |
| | | }, |
| | | ], |
| | | defaultDate: new Date(), |
| | | defaultDatePre: defaultDatePre |
| | | } |
| | | }, |
| | | onLoad(options) { |
| | |
| | | this.query.stationName = options.stationName || '' |
| | | |
| | | // this.listApi = '/api/delivery/list/today' |
| | | this.listApi = '/api/delivery/check/list/today' |
| | | // this.listApi = '/api/delivery/check/list' |
| | | // this.listApi = '/api/delivery/check/list/today' |
| | | this.listApi = '/api/delivery/check/list' |
| | | |
| | | this.query.date = this.$util.toDate(this.defaultDatePre) |
| | | this.getList() |
| | | // this.$http.request('get', '/api/station/list', { |
| | | // params: {} |
| | |
| | | }, |
| | | methods: { |
| | | async select_time_picker_time(e) { |
| | | console.log('select_time_picker_time', e) |
| | | var vv = e.value && new Date(e.value) || new Date() |
| | | // console.log('select_time_picker_time', e) |
| | | var vv = e && e.length >= 1 && new Date(e[0]) || new Date() |
| | | // if (vv) { |
| | | // vv = vv.replace('aN:', '00:') |
| | | // } |
| | | // var time = new Date(`2023-8-21 ${vv}:00`) |
| | | this.show_time_picker_time = false |
| | | this.show_time_picker_time = false; |
| | | this.query.date = this.$util.toDate(vv) || '' |
| | | |
| | | this.refreshList() |
| | | }, |
| | | changeSelecrRange() { |
| | | this.selecttoday = !this.selecttoday |
| | |
| | | }, |
| | | toDetail(item) { |
| | | uni.navigateTo({ |
| | | url: `/sub_pages/partner/delivery/delivery-supplier-detail-list?warehouseLocationCode=${this.query.warehouseLocationCode||''}&stationId=${this.query.stationId||''}&supplierId=${item.id}&range=` + |
| | | url: `/sub_pages/partner/delivery/delivery-supplier-detail-list?warehouseLocationCode=${this.query.warehouseLocationCode||''}&date=${ this.query.date||''}&stationId=${this.query.stationId||''}&supplierId=${item.id}&range=` + |
| | | (this |
| | | .selecttoday ? 'today' : '') |
| | | }) |
| | |
| | | const { |
| | | code, |
| | | data |
| | | } = await this.$http.request('get', '/api/delivery/check/list/complete', { |
| | | } = await this.$http.request('get', '/api/delivery/check/list/complete' + (this.selecttoday ? |
| | | "/today" : ""), { |
| | | params: { |
| | | id: item.id |
| | | id: item.id, |
| | | date: this.query.date || null |
| | | } |
| | | }) |
| | | if (code === 0) { |
| | |
| | | </view> --> |
| | | <!-- </view> --> |
| | | <view class="m-t-12 m-b-12 flex"> |
| | | <view class="" v-if="!selecttoday" :class="[query.date?'':'desc-gray']" |
| | | <!-- v-if="!selecttoday" --> |
| | | <view class="m-l-a m-r-20 w-fit" :class="[query.date?'':'desc-gray']" |
| | | @click="show_time_picker_time=true"> |
| | | <!-- 选择日期 --> |
| | | {{query.date || '请选择日期'}} |
| | | 订单日期:{{query.date || '请选择日期'}} |
| | | </view> |
| | | <view class="m-l-a m-r-20 w-fit flex"> |
| | | <!-- <view class="m-l-a m-r-20 w-fit flex"> |
| | | <radio :checked="selecttoday" @click="changeSelecrRange"></radio> |
| | | <view>只查看今日</view> |
| | | </view> |
| | | </view> --> |
| | | </view> |
| | | |
| | | <!-- <view class="component-filter-container p20 bg-white"> |
| | |
| | | <u-picker @confirm="select_status" keyName="label" @cancel="show_select_status=false" :show="show_select_status" |
| | | :columns="status_columns"></u-picker> |
| | | |
| | | <u-datetime-picker :show="show_time_picker_time" @cancel="show_time_picker_time=false" |
| | | @confirm="select_time_picker_time" v-model="tmp_picker_time" mode="date"></u-datetime-picker> |
| | | <!-- <u-datetime-picker :show="show_time_picker_time" @cancel="show_time_picker_time=false" |
| | | @confirm="select_time_picker_time" v-model="tmp_picker_time" mode="date"></u-datetime-picker> --> |
| | | |
| | | <u-calendar :show="show_time_picker_time" mode="single" @confirm="select_time_picker_time" |
| | | @cancel="show_time_picker_time = false" :monthNum="12" :maxDate="defaultDate" :defaultDate="defaultDatePre" |
| | | @close="show_time_picker_time = false" minDate="2024-07-01" toolTip="选择订单日期"> |
| | | </u-calendar> |
| | | |
| | | </view> |
| | | </template> |
| | |
| | | query: { |
| | | stationId: '', |
| | | stationName: '', |
| | | date: '', |
| | | }, |
| | | list: [], |
| | | defaultDatePre: new Date(), |
| | | show_time_picker_time:false |
| | | |
| | | } |
| | | }, |
| | | onLoad(options) { |
| | | this.query.date = this.$util.toDate(this.defaultDatePre) |
| | | |
| | | this.getList() |
| | | // this.list = [{}, {}] |
| | | }, |
| | |
| | | uni.stopPullDownRefresh() |
| | | }, |
| | | methods: { |
| | | async select_time_picker_time(e) { |
| | | var vv = e && e.length >= 1 && new Date(e[0]) || new Date() |
| | | this.show_time_picker_time = false; |
| | | this.query.date = this.$util.toDate(vv) || '' |
| | | this.refreshList() |
| | | }, |
| | | async getList() { |
| | | this.$message.showLoading() |
| | | const { |
| | |
| | | <view class="p15" style="min-height: calc(100vh - 260rpx);"> |
| | | <view class="search-container m-t-12 flex"> |
| | | <view class="flex1 input"> |
| | | <u-input placeholder="请输入集货站名称" v-model="query.stationName"> |
| | | <u-input placeholder="集货站、供应商名称、货位号、供应商手机号" v-model="query.stationName"> |
| | | <template slot="suffix"> |
| | | <uni-icons color="#20613D" type="search" size="24" @click="getList"></uni-icons> |
| | | </template> |
| | | </u-input> |
| | | </view> |
| | | </view> |
| | | <view class="search-container m-t-12 flex" v-if="currentInfo&¤tInfo.mainWarehouse"> |
| | | <view class="m-l-a m-r-0 w-fit" @click="showAll">查看全部>></view> |
| | | <view class="search-container m-t-12 flex" > |
| | | <view class="m-l-10 m-r-a w-fit" :class="[query.date?'':'desc-gray']" |
| | | @click="show_time_picker_time=true"> |
| | | 订单日期:{{query.date || '请选择日期'}} |
| | | </view> |
| | | |
| | | <view class="m-l-a m-r-0 w-fit" @click="showAll" v-if="currentInfo&¤tInfo.mainWarehouse">查看全部>></view> |
| | | </view> |
| | | |
| | | |
| | |
| | | </view> |
| | | |
| | | </view> |
| | | <view class="flex"> |
| | | <view class="form-item flex1"> |
| | | <view class="form-item-label">已质检</view> |
| | | <view class="form-item-value">{{ item.checkedSupplierCount || '0' }}</view> |
| | | </view> |
| | | <view class="form-item flex1"> |
| | | <view class="form-item-label">待质检</view> |
| | | <view class="form-item-value t-red">{{ item.uncheckedSupplierCount || '0' }}</view> |
| | | </view> |
| | | |
| | | </view> |
| | | |
| | | |
| | | <view class="flex buttons"> |
| | |
| | | </view> |
| | | |
| | | |
| | | <u-calendar :show="show_time_picker_time" mode="single" @confirm="select_time_picker_time" |
| | | @cancel="show_time_picker_time = false" :monthNum="12" :maxDate="defaultDatePre" :defaultDate="defaultDatePre" |
| | | @close="show_time_picker_time = false" minDate="2024-07-01" toolTip="选择订单日期"> |
| | | </u-calendar> |
| | | </view> |
| | | </template> |
| | | |
| | |
| | | }, |
| | | orderItemId: '', |
| | | op: '', |
| | | |
| | | opStr:'' |
| | | }; |
| | | }, |
| | | async onLoad(options) { |
| | |
| | | |
| | | <!-- <view class="name" v-if="dto.type">处理类型:{{ dto.type || '-'}}</view> --> |
| | | <view class="name">处理数量:{{ dto.num || '-' }}</view> |
| | | <view class="name">扣款金额:{{ dto.deductAmount || '-'}}</view> |
| | | <view class="name">扣款金额:¥{{ dto.deductAmount || '-'}}</view> |
| | | |
| | | </view> |
| | | </view> |
| | | |
| | | |
| | | </view> |
| | | <!-- #ifndef PUB_CUSTOMER --> |
| | | <view class="p10" style="margin-top: 0rpx;padding-top: 0rpx;" v-if="dto.pictureList&&dto.pictureList.length>0"> |
| | | <view class="line-gray"></view> |
| | | |
| | |
| | | </view> |
| | | </view> |
| | | </view> |
| | | <!-- #endif --> |
| | | |
| | | </view> |
| | | |
| | | </view> |
| | |
| | | <view class="flex"> |
| | | <view class="form-item"> |
| | | <view class="label">收入</view> |
| | | <view class="value">{{item.income||0}}</view> |
| | | <view class="value">¥{{item.income||0}}</view> |
| | | </view> |
| | | <view class="form-item"> |
| | | <view class="label">集货站运费</view> |
| | | <view class="value">{{item.stationFee||0}}</view> |
| | | <view class="value">¥{{item.stationFee||0}}</view> |
| | | </view> |
| | | |
| | | </view> |
| | | <view class="flex"> |
| | | <view class="form-item"> |
| | | <view class="label">服务费</view> |
| | | <view class="value">{{item.serviceFee||0}}</view> |
| | | <view class="value">¥{{item.serviceFee||0}}</view> |
| | | </view> |
| | | <view class="form-item"> |
| | | <view class="label">服务费率</view> |
| | |
| | | <view class="flex"> |
| | | <view class="form-item"> |
| | | <view class="label">售后退款</view> |
| | | <view class="value">{{item.salesFee||0}}</view> |
| | | <view class="value">¥{{item.salesFee||0}}</view> |
| | | </view> |
| | | |
| | | </view> |
| | |
| | | </view> |
| | | <view class="form-item"> |
| | | <view class="label">缺货扣款</view> |
| | | <view class="value">{{item.lackFee||0}}</view> |
| | | <view class="value">¥{{item.lackFee||0}}</view> |
| | | </view> |
| | | </view> |
| | | <view class="flex"> |
| | |
| | | </view> |
| | | <view class="form-item"> |
| | | <view class="label">补货扣款</view> |
| | | <view class="value">{{item.replaceFee||0}}</view> |
| | | <view class="value">¥{{item.replaceFee||0}}</view> |
| | | </view> |
| | | </view> |
| | | <view class="flex"> |
| | |
| | | </view> |
| | | <view class="form-item"> |
| | | <view class="label">降级扣款</view> |
| | | <view class="value">{{item.checkFee||0}}</view> |
| | | <view class="value">¥{{item.checkFee||0}}</view> |
| | | </view> |
| | | </view> |
| | | </view> |
| | |
| | | <template> |
| | | <!-- 显示要打印的东西 --> |
| | | <view class="list-container order-delivery-print supplier"> |
| | | <view class="p15"> |
| | | <view class="p15" v-if="false"> |
| | | <view class="m-b-24 order-sale-list list-container"> |
| | | <view class="order-sale-item list-item"> |
| | | <view class="title flex"> |
| | |
| | | |
| | | <view class="print-container m-t-12"> |
| | | <button class="btn" type="primary" @click="startSearch" :loading="isScanning"> 开始搜索 </button> |
| | | <button class="btn m-t-12" type="default" @click="breakPrint=true"> 中断打印 </button> |
| | | <view v-for="(device,index) of list" :key="device.deviceId" @click="bindViewTap(device)"> |
| | | <view class="item"> |
| | | <div class="deviceId block">{{device.deviceId}}</div> |
| | |
| | | export default { |
| | | data() { |
| | | return { |
| | | item: {}, |
| | | // item: {}, |
| | | items: [], |
| | | services: [], |
| | | serviceId: 0, |
| | | writeCharacter: false, |
| | |
| | | notifyServiceId: '', |
| | | BserviceId: '', |
| | | buffs: [], |
| | | breakPrint: false |
| | | } |
| | | }, |
| | | /** |
| | |
| | | async onLoad() { |
| | | var t = this.$storage.getItem('cache_delivery_order_print') || '' |
| | | if (t) { |
| | | this.item = JSON.parse(t) |
| | | this.items = JSON.parse(t) |
| | | var apitype = '' |
| | | // #ifdef PUB_SUPPLIER |
| | | apitype = '/supplier' |
| | |
| | | // apitype = '/supplier' |
| | | // #endif |
| | | //获取详情接口 |
| | | var ids = [] |
| | | for (var item of this.items) { |
| | | ids.push(item.id) |
| | | } |
| | | this.$message.showLoading() |
| | | // const { |
| | | // code, |
| | | // data |
| | | // } = await this.$http.request('get', `/api${apitype}/delivery/list/items/view`, { |
| | | // params: { |
| | | // id: this.item.id, |
| | | // ids: ids |
| | | // } |
| | | // }) |
| | | const { |
| | | code, |
| | | data |
| | | } = await this.$http.request('get', `/api${apitype}/delivery/list/items/view`, { |
| | | params: { |
| | | id: this.item.id |
| | | } = await this.$http.request('post', `/api${apitype}/delivery/list/items/views`, { |
| | | data: { |
| | | // id: this.item.id, |
| | | ids: ids |
| | | } |
| | | }) |
| | | this.$message.hideLoading() |
| | | if (code == 0 && data) { |
| | | this.item = { |
| | | ...this.item, |
| | | ...data |
| | | } |
| | | // this.item = { |
| | | // ...this.item, |
| | | // ...data |
| | | // } |
| | | this.items = data || [] |
| | | } |
| | | } else { |
| | | this.$message.showToast('获取详情失败') |
| | |
| | | * 链接到某一个蓝牙设备上 |
| | | */ |
| | | bindViewTap: function(device) { |
| | | |
| | | if (this.isLabelSend) { |
| | | this.$message.showToast('正在打印中') |
| | | return |
| | | } |
| | | this.breakPrint = false |
| | | |
| | | var that = this |
| | | wx.stopBluetoothDevicesDiscovery({ //关闭发现蓝牙设备 |
| | |
| | | //打印 |
| | | |
| | | var that = this; |
| | | if (that.item.num < 0) { |
| | | if (that.items.num <= 0) { |
| | | that.$message.showToast('打印数目不能小于0') |
| | | return |
| | | } |
| | | if (that.item.num > 3) { |
| | | await that.$message.confirm(`打印数目为${that.item.num}张,确定打印吗`) |
| | | var totalnum = 0 |
| | | for (var each of that.items) { |
| | | totalnum += each.num |
| | | } |
| | | if (totalnum > 3) { |
| | | await that.$message.confirm(`打印数目为${totalnum}张,确定打印吗`) |
| | | } |
| | | if (totalnum <= 0) { |
| | | that.$message.showToast('打印数目不能小于0') |
| | | return |
| | | } |
| | | that.buffs = [] |
| | | for (var i = 0; i < that.item.num; i++) { |
| | | |
| | | for (var each of that.items) { |
| | | for (var i = 0; i < each.num; i++) { |
| | | var command = tsc.jpPrinter.createNew() |
| | | |
| | | //根据数目不同,打印不同数目 |
| | | |
| | | var command = tsc.jpPrinter.createNew() |
| | | |
| | | //根据数目不同,打印不同数目 |
| | | |
| | | command.setSize(48, 60) |
| | | command.setGap(0) |
| | | command.setCls() |
| | | // command.setText(0, 30, "TSS24.BF2", 1, 1, "图片") |
| | | // command.setQR(40, 120, "L", 5, "A", "www.smarnet.cc佳博智汇") |
| | | // command.setText(60, 20, "TSS24.BF2", 1, 1, "单号:" + (that.item.orderNo || '-')) |
| | | // 仓库: |
| | | // if (that.item.warehouseName) |
| | | var paramsmap = {} |
| | | if (that.item.params) { |
| | | for (var p of that.item.params) { |
| | | if (p.name !== '枝长' && p.name !== '成熟度') { |
| | | continue |
| | | command.setSize(48, 60) |
| | | command.setGap(0) |
| | | command.setCls() |
| | | // command.setText(0, 30, "TSS24.BF2", 1, 1, "图片") |
| | | // command.setQR(40, 120, "L", 5, "A", "www.smarnet.cc佳博智汇") |
| | | // command.setText(60, 20, "TSS24.BF2", 1, 1, "单号:" + (each.orderNo || '-')) |
| | | // 仓库: |
| | | // if (each.warehouseName) |
| | | var paramsmap = {} |
| | | if (each.params) { |
| | | for (var p of each.params) { |
| | | if (p.name !== '枝长' && p.name !== '成熟度') { |
| | | continue |
| | | } |
| | | paramsmap[p.name] = p.value || '' |
| | | } |
| | | paramsmap[p.name] = p.value || '' |
| | | } |
| | | } |
| | | command.setText(30, 40, "TSS24.BF2", 1, 1, "" + (that.item.supplierName || '-')) |
| | | command.setText(200, 40, "TSS24.BF2", 1, 1, "" + (that.item.warehouseName || '待分配')) |
| | | var flowerCategory = that.item.flowerCategory |
| | | if (flowerCategory) { |
| | | //只取二级分类 |
| | | var tarr = flowerCategory.split("/") |
| | | if (tarr.length >= 2) { |
| | | flowerCategory = tarr[tarr.length - 1] |
| | | command.setText(30, 40, "TSS24.BF2", 1, 1, "" + (each.supplierName || '-')) |
| | | command.setText(200, 40, "TSS24.BF2", 1, 1, "" + (each.warehouseName || '待分配')) |
| | | var flowerCategory = each.flowerCategory |
| | | if (flowerCategory) { |
| | | //只取二级分类 |
| | | var tarr = flowerCategory.split("/") |
| | | if (tarr.length >= 2) { |
| | | flowerCategory = tarr[tarr.length - 1] |
| | | } |
| | | } |
| | | command.setText(30, 80, "TSS24.BF2", 1, 1, "" + (flowerCategory || '')) |
| | | command.setText(200, 80, "TSS24.BF2", 1, 1, "库位:" + (each.warehouseLocationCode || '')) |
| | | |
| | | command.setText(30, 120, "TSS24.BF2", 1, 1, "等级:" + (each.flowerLevelStr || '')) |
| | | command.setText(200, 120, "TSS24.BF2", 1, 1, "" + (each.flowerColor || '')) |
| | | // 规格: |
| | | command.setText(30, 160, "TSS24.BF2", 1, 1, "" + (each.flowerUnit || '-')) |
| | | // 成熟度: |
| | | command.setText(200, 160, "TSS24.BF2", 1, 1, "" + (paramsmap['成熟度'] || '-')) |
| | | // 枝长: |
| | | command.setText(30, 200, "TSS24.BF2", 1, 1, "" + (paramsmap['枝长'] || '-')) |
| | | command.setText(200, 200, "TSS24.BF2", 1, 1, that.$util.toDate(new Date())) |
| | | |
| | | command.setText(60, 230, "TSS24.BF2", 1, 1, "————————————") |
| | | |
| | | command.setText(30, 260, "TSS24.BF2", 1, 1, "花满芫") |
| | | command.setText(200, 260, "TSS24.BF2", 1, 1, `数目: ${i+1}/${each.num}`) |
| | | |
| | | // command.setText(20, 40, "TSS24.BF2", 1, 1, "" + (that.item.warehouseName || '待分配')) |
| | | // // 库位: |
| | | // // if (that.item.warehouseLocationCode) |
| | | // command.setText(200, 40, "TSS24.BF2", 1, 1, "" + (that.item.warehouseLocationCode || '待分配')) |
| | | |
| | | // // command.setText(170, 50, "TSS24.BF2", 1, 1, "小程序测试") |
| | | // // command.setText(170, 90, "TSS24.BF2", 1, 1, "测试数字12345678") |
| | | // // command.setText(170, 120, "TSS24.BF2", 1, 1, "测试英文abcdefg") |
| | | // // command.setText(170, 150, "TSS24.BF2", 1, 1, "测试符号/*-+!@#$") |
| | | |
| | | // // 供应商: |
| | | // command.setText(20, 80, "TSS24.BF2", 1, 1, "" + (that.item.supplierName || '-')) |
| | | // // 商品名称: |
| | | // command.setText(20, 120, "TSS24.BF2", 1, 1, "" + (that.item.flowerName || '-')) |
| | | // // 颜色: |
| | | // command.setText(200, 120, "TSS24.BF2", 1, 1, "" + (that.item.flowerColor || '-')) |
| | | // // command.setText(10, 220, "TSS24.BF2", 1, 1, "价格: ¥ " + (that.item.price || '-')) |
| | | // command.setText(20, 160, "TSS24.BF2", 1, 1, "规格: " + (that.item.flowerUnit || '-')) |
| | | // command.setText(200, 160, "TSS24.BF2", 1, 1, `数目: ${i+1}/${that.item.num}`) |
| | | // // command.setText(10, 300, "TSS24.BF2", 1, 1, "花满芫") |
| | | // command.setText(100, 200, "TSS24.BF2", 1, 1, that.$util.toDateMin(new Date())) |
| | | // if (that.item.params) { |
| | | // var addnum = 0 |
| | | // var hlen = 200 |
| | | // for (var p of that.item.params) { |
| | | // if (p.name !== '枝长' && p.name !== '成熟度') { |
| | | // continue |
| | | // } |
| | | // if (p.value) { |
| | | // var lef = 20 |
| | | // if (addnum % 2 == 1) { |
| | | // lef = 190 |
| | | // } else { |
| | | // lef = 20 |
| | | // hlen += 40 |
| | | // } |
| | | // command.setText(lef, hlen, "TSS24.BF2", 1, 1, "" + (p.name || '') + ':' + p.value) |
| | | // addnum += 1 |
| | | // } |
| | | // } |
| | | // } |
| | | // <view class="delivery-form" v-if="item.params"> |
| | | // <view class="form-item" v-for="(p,k) of item.params" :key="k"> |
| | | // <view class="label">{{p.name||'-'}}:</view> |
| | | // <view class="value red">{{p.value}}</view> |
| | | // </view> |
| | | // </view> |
| | | // command.setBar(170, 180, "EAN8", 64, 1, 3, 3, "1234567") |
| | | |
| | | command.setPagePrint() |
| | | |
| | | that.buffs.push(command.getData()) |
| | | } |
| | | command.setText(30, 80, "TSS24.BF2", 1, 1, "" + (flowerCategory || '')) |
| | | command.setText(200, 80, "TSS24.BF2", 1, 1, "库位:" + (that.item.warehouseLocationCode || '')) |
| | | |
| | | command.setText(30, 120, "TSS24.BF2", 1, 1, "等级:" + (that.item.flowerLevelStr || '')) |
| | | command.setText(200, 120, "TSS24.BF2", 1, 1, "" + (that.item.flowerColor || '')) |
| | | // 规格: |
| | | command.setText(30, 160, "TSS24.BF2", 1, 1, "" + (that.item.flowerUnit || '-')) |
| | | // 成熟度: |
| | | command.setText(200, 160, "TSS24.BF2", 1, 1, "" + (paramsmap['成熟度'] || '-')) |
| | | // 枝长: |
| | | command.setText(30, 200, "TSS24.BF2", 1, 1, "" + (paramsmap['枝长'] || '-')) |
| | | command.setText(200, 200, "TSS24.BF2", 1, 1, that.$util.toDate(new Date())) |
| | | |
| | | command.setText(60, 230, "TSS24.BF2", 1, 1, "————————————") |
| | | |
| | | command.setText(30, 260, "TSS24.BF2", 1, 1, "花满芫") |
| | | command.setText(200, 260, "TSS24.BF2", 1, 1, `数目: ${i+1}/${that.item.num}`) |
| | | |
| | | // command.setText(20, 40, "TSS24.BF2", 1, 1, "" + (that.item.warehouseName || '待分配')) |
| | | // // 库位: |
| | | // // if (that.item.warehouseLocationCode) |
| | | // command.setText(200, 40, "TSS24.BF2", 1, 1, "" + (that.item.warehouseLocationCode || '待分配')) |
| | | |
| | | // // command.setText(170, 50, "TSS24.BF2", 1, 1, "小程序测试") |
| | | // // command.setText(170, 90, "TSS24.BF2", 1, 1, "测试数字12345678") |
| | | // // command.setText(170, 120, "TSS24.BF2", 1, 1, "测试英文abcdefg") |
| | | // // command.setText(170, 150, "TSS24.BF2", 1, 1, "测试符号/*-+!@#$") |
| | | |
| | | // // 供应商: |
| | | // command.setText(20, 80, "TSS24.BF2", 1, 1, "" + (that.item.supplierName || '-')) |
| | | // // 商品名称: |
| | | // command.setText(20, 120, "TSS24.BF2", 1, 1, "" + (that.item.flowerName || '-')) |
| | | // // 颜色: |
| | | // command.setText(200, 120, "TSS24.BF2", 1, 1, "" + (that.item.flowerColor || '-')) |
| | | // // command.setText(10, 220, "TSS24.BF2", 1, 1, "价格: ¥ " + (that.item.price || '-')) |
| | | // command.setText(20, 160, "TSS24.BF2", 1, 1, "规格: " + (that.item.flowerUnit || '-')) |
| | | // command.setText(200, 160, "TSS24.BF2", 1, 1, `数目: ${i+1}/${that.item.num}`) |
| | | // // command.setText(10, 300, "TSS24.BF2", 1, 1, "花满芫") |
| | | // command.setText(100, 200, "TSS24.BF2", 1, 1, that.$util.toDateMin(new Date())) |
| | | // if (that.item.params) { |
| | | // var addnum = 0 |
| | | // var hlen = 200 |
| | | // for (var p of that.item.params) { |
| | | // if (p.name !== '枝长' && p.name !== '成熟度') { |
| | | // continue |
| | | // } |
| | | // if (p.value) { |
| | | // var lef = 20 |
| | | // if (addnum % 2 == 1) { |
| | | // lef = 190 |
| | | // } else { |
| | | // lef = 20 |
| | | // hlen += 40 |
| | | // } |
| | | // command.setText(lef, hlen, "TSS24.BF2", 1, 1, "" + (p.name || '') + ':' + p.value) |
| | | // addnum += 1 |
| | | // } |
| | | // } |
| | | // } |
| | | // <view class="delivery-form" v-if="item.params"> |
| | | // <view class="form-item" v-for="(p,k) of item.params" :key="k"> |
| | | // <view class="label">{{p.name||'-'}}:</view> |
| | | // <view class="value red">{{p.value}}</view> |
| | | // </view> |
| | | // </view> |
| | | // command.setBar(170, 180, "EAN8", 64, 1, 3, 3, "1234567") |
| | | |
| | | command.setPagePrint() |
| | | |
| | | that.buffs.push(command.getData()) |
| | | } |
| | | that.isLabelSend = true |
| | | // that.prepareSend(command.getData()) |
| | |
| | | wx.showToast({ |
| | | title: '已打印第' + currentPrint + '张', |
| | | }) |
| | | if (currentPrint == that.buffs.length) { |
| | | |
| | | if (currentPrint == that.buffs.length || that.breakPrint) { |
| | | if (that.breakPrint) { |
| | | wx.showToast({ |
| | | title: '中断成功', |
| | | }) |
| | | that.breakPrint = false |
| | | } |
| | | that.looptime = 0 |
| | | that.lastData = 0 |
| | | that.currentTime = 1 |