mixin/mixin.js | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
pages.json | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
pages/user/supplier-user.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
sub_pages/partner/delivery/delivery-detail.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
sub_pages/partner/delivery/delivery.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
sub_pages/partner/markup-config/markup-config.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
sub_pages/partner/partner-info/partner-info.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
sub_pages/supplier/flower-manage/flower-add.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
sub_pages/supplier/flower-manage/flower-manage.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
mixin/mixin.js
@@ -278,7 +278,7 @@ } }) if (data) { if (this.page.current == 1) { if (this.page.current === 1) { this.list = data.records || [] } else { //根据id去重正常 pages.json
@@ -111,6 +111,20 @@ "navigationBarTitleText": "订单详情", "enablePullDownRefresh": false } }, { "path": "sub_pages/partner/delivery/delivery", "style": { "navigationBarTitleText": "配送质检", "enablePullDownRefresh": true } }, { "path": "sub_pages/partner/delivery/delivery-detail", "style": { "navigationBarTitleText": "质检详情", "enablePullDownRefresh": true } } ], "subPackages": [ pages/user/supplier-user.vue
@@ -64,13 +64,13 @@ <view class="user-util m-t-12"> <view class="title flex"> <view class="flex1">我的订单</view> <view class="m-r-a m-r-0 more">全部订单 <view class="m-r-a m-r-0 more" @click="goto('/pages/order/order')">全部订单 <uni-icons class="" type="right" size="12"></uni-icons> </view> </view> <view class="flex order-icons-container"> <view class="order-icons"> <view class="order-icons" @click="goto('/pages/order/order?status=PENDING')"> <image src="../../static/images/customer/order/order-type-1.png" class="order-icon dfk"></image> <view>待付款</view> </view> sub_pages/partner/delivery/delivery-detail.vue
对比新文件 @@ -0,0 +1,372 @@ <script> export default { data() { return { dto: { id: '', items: [], supplierName: '', orderNo: '', stationName: '', arriveRemarks: '', }, id: '', form: { id: '', status: '', checkImageList: [], checkRemarks: '', deductAmount: 0, }, check_status: [ { label: '退回', value: 'back' }, { label: '降级', value: 'reduce' }, { label: '缺货', value: 'lack' }, { label: '完成', value: 'ok' } ] }; }, async onLoad(options) { this.id = options.id || '' await this.init() }, async onPullDownRefresh() { await this.init() uni.stopPullDownRefresh() }, methods: { closeCheckForm() { this.$refs.popup_form.close() }, async clickCheck(item, status) { this.form = { id: item.id || '', status: '', statusStr: '', checkImageList: item.checkImageList || [], checkRemarks: item.checkRemarks || '', deductAmount: item.deductAmount || 0, } this.check_status.forEach(tmp => { if (tmp.value === this.form.status) { this.form.statusStr = tmp.label } }) //显示 this.$refs.popup_form.open() }, async submitCheck() { if (isNaN(parseFloat(this.form.deductAmount)) || this.form.deductAmount < 0) { this.$message.showToast('扣款金额需要大于等于0') return } this.$message.showLoading() const { code } = await this.$http.request('get', '/api/delivery/list/view/check', { data: { ...this.form } }) this.$message.hideLoading() if (code === 0) { this.$message.showToast('操作成功') this.$refs.popup_form.close() setTimeout(() => { this.init() }, 200) } }, async init() { this.$message.showLoading() const { data } = await this.$http.request('get', '/api/delivery/list/view?id=' + this.id, {}) this.$message.hideLoading() if (data) { this.dto = { ...this.dto, ...data } } }, deleteCheckImage(index) { this.form.checkImageList.splice(index, 1) }, uploadCheckImage() { let that = this uni.chooseImage({ count: 1, // 最多可以选择的图片张数,默认9 sizeType: ['compressed'], //original 原图,compressed 压缩图,默认二者都有 sourceType: ['camera', 'album'], //album 从相册选图,camera 使用相机,默认二者都有。如需直接开相机或直接选相册,请只使用一个选项 success: function (res) { let errMsg = res.errMsg let tempFiles = res.tempFiles if (errMsg === 'chooseImage:ok') { if (tempFiles[0].size > 1024 * 1024 * 5) { that.$message.confirm('图片最多支持5M大小,超出大小限制') return } that.$message.showLoading() that.$http.upload(tempFiles[0].path).then(async res => { console.log('res1', res) var pic = res.data && res.data.length > 0 && res.data[ 0] .url || '' that.$message.hideLoading() that.form.checkImageList.push(pic) that.$forceUpdate() }).catch(res => { that.$message.hideLoading() console.error(res) }) } } }) } } } </script> <template> <view class="delivery-detail-page"> <view v-if="dto.id"> <view class="delivery-info flex"> <view class="flex1 desc"> <view>供货商名称:{{ dto.stationName }}</view> <view>订单号:{{ dto.orderNo }}</view> <view>供货商备注:{{ dto.arriveRemarks }}</view> </view> <view class="m-l-15 m-r-0 station"> <view>{{ dto.stationName }}</view> </view> </view> <view v-for="(item,index) of dto.items" :key="index" class="delivery-order-item m-t-12"> <view class="flex"> <image class="flower-img img100 m-r-6" :src="item.flowerCover" @click="previewImg(item.flowerCover)"> </image> <view class="flex1"> <view class=" flex"> <view class="title">{{ item.flowerName }}<span class="level">{{ item.flowerLevelStr }}</span></view> </view> <view class="each-list"> <view class="each-item"> <view class="label">颜色</view> <view class="value">{{ item.flowerColor || '-' }}</view> </view> <view class="each-item"> <view class="label">规格</view> <view class="value">{{ item.flowerUnit || '-' }}</view> </view> <view class="each-item"> <view class="label">数量</view> <view class="value">{{ item.num || 0 }}</view> </view> <view class="each-item"> <view class="label">价格</view> <view class="value">{{ item.price || '-' }}</view> </view> </view> </view> </view> <view class="line-gray"> </view> <view class="buttons"> <view class="button" v-for="button of check_status" :key="check_status.value" @click.stop="clickCheck(item,button.value)">{{ button.label }} </view> </view> </view> </view> <uni-popup ref="popup_form" type="top" :mask-click="false"> <view class="popup-check-form"> <view class="close-parent"> 质检操作-{{ form.statusStr || '-' }} <uni-icons class="close" type="closeempty" @click="closeCheckForm"></uni-icons> </view> <view class="submit form"> <view class="form-item"> <view class="form-item-label require"> 质检备注 </view> <view class="form-item-value"> <input v-model="form.checkRemarks" placeholder="请输入质检备注" class="form-input"></input> </view> </view> <view class="form-item"> <view class="form-item-label require"> 扣款金额 </view> <view class="form-item-value"> <input v-model="form.deductAmount" placeholder="请输入扣款金额" type="digit" class="form-input"></input> </view> </view> <view class="form-item"> <view class="form-item-label require"> 图片 </view> <view class="form-item-value"> <u-button type="text" @click="uploadCheckImage()">上传</u-button> </view> </view> <view class="flex p20" v-if="form.checkImageList&&form.checkImageList.length>0"> <view class="m-t-12 m-r-10 " v-for="(timg,index) of dto.checkImageList" :key="index"> <image class="check-img" :src="timg" @click.stop="previewImg(timg)"> </image> <view class="t-red text-center" @click.stop="deleteCheckImage(index)">删除</view> </view> </view> </view> <view class="button-green m-t-15" @click="submitCheck">提交</view> </view> </uni-popup> </view> </template> <style lang="scss" scoped> .delivery-detail-page { .delivery-order-item { .title { font-weight: 600; font-size: 28rpx; color: #000000; line-height: 40rpx; .level { font-weight: 400; font-size: 28rpx; color: #20613D; line-height: 40rpx; margin-left: 20rpx; } } .buttons { display: flex; .button { margin: 0 auto; width: 98rpx; line-height: 48rpx; border-radius: 24rpx; border: 2rpx solid #CECECE; text-align: center; font-size: 24rpx; color: #666666; line-height: 34rpx; } } .flower-img { width: 128rpx; height: 118rpx; min-width: 128rpx; min-height: 118rpx; } .each-list { display: flex; flex-wrap: wrap; margin-top: 6rpx; .each-item { min-width: 30%; max-width: 40%; text-align: center; margin-left: 0rpx; margin-right: auto; display: flex; .label { font-weight: 400; font-size: 24rpx; color: #666666; text-align: left; padding-right: 10rpx; } .label::after { content: ": " } .value { font-weight: 400; font-size: 24rpx; color: #666666; } } } } .popup-check-form { background: #FFFFFF; border-radius: 16rpx; // width: 690rpx; height: 882rpx; margin-top: 120rpx; margin-left: 30rpx; margin-right: 30rpx; padding: 24rpx 36rpx; .check-img { width: 96rpx; height: 96rpx; border-radius: 4rpx; border: 2rpx dashed #CECECE; } .submit { margin-top: 30rpx; .form-input { height: 36rpx; line-height: 36rpx; } } } .delivery-info { padding: 20rpx; .desc { font-weight: 400; font-size: 28rpx; color: #666666; line-height: 40rpx; } .station { height: 50rpx; background: #C6E8D4; border-radius: 4rpx; padding-left: 20rpx; padding-right: 20rpx; min-width: 110rpx; line-height: 50rpx; } } } </style> sub_pages/partner/delivery/delivery.vue
对比新文件 @@ -0,0 +1,207 @@ <script> export default { data() { return { query: { supplierName: '', stationId: '', stationName: '', statusStr:'', status:'', }, show_select_station: false, show_select_status: false, columns_station: [], status_columns:[], } }, onLoad() { this.listApi = '/api/delivery/list/today' this.getList() this.$http.request('get', '/api/station/list', { params: {} }).then(res => { var data = res.data this.columns_station = [data || []] }) this.$http.request('get', '/api/code/value', { params: { type: 'DELIVERY_ORDER_STATUS' } }).then(res => { var data = res.data this.status_columns = [data || []] this.status_columns[0].unshift({ label: '全部', value: '' }) }) }, onReachBottom() { this.page.current += 1 this.getMore() }, async onPullDownRefresh() { this.page.current = 1 await this.getList() uni.stopPullDownRefresh() }, methods: { select_station(e) { this.show_select_station = false this.query.stationName = e.value[0].name this.query.stationId = e.value[0].id this.refreshList() }, select_status(e) { this.show_select_status = false this.query.statusStr = e.value[0].name this.query.status = e.value[0].id this.refreshList() }, toDetail(item) { uni.navigateTo({ url: `//sub_pages/partner/delivery/delivery-detail?id=${item.id}` }) }, async compelete(item) { await this.$message.confirm("是否完成此单质检") const {code, data} = this.$http.request('get', '/api/delivery/list/view/complete', { params: { id: item.id } }) if (code === 0) { this.$message.showToast('完成成功') setTimeout(() => { this.refreshList() }, 200) } } } } </script> <template> <!-- 列表页面 --> <view class="page-delivery"> <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="search_flow"> <template slot="suffix"> <uni-icons color="#20613D" type="search" size="24" @tap="buttonSearchFlow"></uni-icons> </template> </u-input> </view> </view> <view class="component-filter-container"> <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" @click="show_select_station=true"> 集货站:{{ query.stationName || '全部' }} <image src="../../../static/common/icon-arrow-down.png" class="icon-arrow-down"></image> </view> </view> <no-data v-if="!list||list.length===0" style="width: 100%;"></no-data> <view v-for="(item,index) in list" :key="index" class="m-b-24"> <view class="delivery-item"> <view class="title">{{ item.supplierName }}</view> <view class="line-gray"></view> <view class="form-item"> <view class="form-item-label">订单单号:</view> <view class="form-item-value">{{ item.orderNo || '-' }}</view> </view> <view class="form-item"> <view class="form-item-label">集货站名称:</view> <view class="form-item-value">{{ item.stationName || '-' }}</view> </view> <view class="form-item"> <view class="form-item-label">配送单状态:</view> <view class="form-item-value">{{ item.levelStr || '-' }}</view> </view> <view class="form-item"> <view class="form-item-label">送达时间</view> <view class="form-item-value">{{ item.arriveTime || '-' }}</view> </view> <view class="form-item"> <view class="form-item-label">供货总数</view> <view class="form-item-value">{{ item.totalNum || '-' }}</view> </view> <view class="line-gray"></view> <view class="flex"> <view class="button button-2 m-l-a m-r-0" @click="toDetail(item)">前往质检</view> <view class="button button-1 m-l-15 m-r-0" @click="compelete(item)">质检完成</view> </view> </view> </view> </view> <!-- 判断是否到底了,自动吧 --> <footer-msg :more="page.total>0&&page.total>page.current*page.size"></footer-msg> <u-picker @confirm="select_station" keyName="name" @cancel="show_select_station=false" :show="show_select_station" :columns="columns_station"></u-picker> <u-picker @confirm="select_status" keyName="name" @cancel="show_select_status=false" :show="show_select_status" :columns="status_columns"></u-picker> </view> </template> <style lang="scss" scoped> .page-delivery { .delivery-item { .title { font-weight: 400; font-size: 28rpx; color: #000000; line-height: 40rpx; } .button { min-width: 122rpx; text-align: center; height: 48rpx; line-height: 48rpx; border-radius: 28rpx; border: 2rpx solid #20613D; font-size: 24rpx; color: #20613D; } } .search-container { display: flex; margin: 12rpx 0rpx 20rpx 0rpx; position: relative; z-index: 1; .input { // flex: 1; // max-width: 400rpx; background-color: #fff !important; // line-height: 58rpx; // height: 58rpx; border-radius: 8rpx; } .button { min-width: 120rpx; max-width: 120rpx; margin-left: auto; margin-right: 0rpx; text-align: right; line-height: 70rpx !important; // height: 58rpx !important; // display: flex; } } } </style> sub_pages/partner/markup-config/markup-config.vue
@@ -7,6 +7,10 @@ </view> <view class="button" @click="refreshList">搜索</view> </view> <view class="m-t-12"> {{ !query.time && '请选择时间' || (query.time) }} </view> <view class="p15" style="min-height: calc(100vh - 160rpx);"> <no-data v-if="!list||list.length==0" style="width: 100%;"></no-data> @@ -64,6 +68,8 @@ <!-- 判断是否到底了,自动吧 --> <footer-msg :more="page.total>0&&page.total>page.current*page.size"></footer-msg> <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="time"></u-datetime-picker> </view> </template> @@ -74,8 +80,12 @@ return { tabIndex: 0, query: { name: '' } name: '', time: '', }, show_time_picker_time: false, tmp_picker_time: new Date(), } }, onLoad() { @@ -93,6 +103,15 @@ uni.stopPullDownRefresh() }, methods: { async select_time_picker_time(e) { var vv = e.value if (vv) { vv = vv.replace('aN:', '00:') } var time = new Date(`2023-8-21 ${vv}:00`) this.show_time_picker_time = false this.query.time = this.$util.toDateMinOnly(time) }, toDetail(item) { // uni.navigateTo({ // url: `/pages/notice/notice?id=${item.id}` @@ -193,9 +212,11 @@ max-width: 50%; flex: 1; .form-item-label {} .form-item-label { } .form-item-value {} .form-item-value { } } } sub_pages/partner/partner-info/partner-info.vue
@@ -169,7 +169,7 @@ this.getDetail() } else { //判断是不是来自登录步骤,是等话需要从缓存里面拿信息 if (this.source == 'step') { if (this.source === 'step') { var tjson = this.$storage.getItem('cache_partner_info') if (tjson) { this.dto = { sub_pages/supplier/flower-manage/flower-add.vue
@@ -629,7 +629,7 @@ uploadIcon(key) { console.log('that dto key', key) const that = this if (key == 'video') { if (key === 'video') { uni.chooseVideo({ maxDuration: 30, sourceType: ['camera', 'album'], sub_pages/supplier/flower-manage/flower-manage.vue
@@ -307,9 +307,6 @@ background-color: #fff; .flow-manage-list-item { // margin-bottom: 20rpx; .title { font-weight: 600; font-size: 28rpx;