Showing
4 changed files
with
745 additions
and
0 deletions
api/car_request_order.js
0 → 100644
| 1 | +import request from '@/utils/request' | ||
| 2 | +import { ContentTypeEnum } from '@/utils/httpEnum'; | ||
| 3 | + | ||
| 4 | +const baseUrl = '/requestCarTicket'; | ||
| 5 | +// 查询列表 | ||
| 6 | +export function queryApi(params) { | ||
| 7 | + return request({ | ||
| 8 | + url: baseUrl + `/query`, | ||
| 9 | + method: 'get', | ||
| 10 | + params | ||
| 11 | + }) | ||
| 12 | +} | ||
| 13 | + | ||
| 14 | +// 根据ID查询详情数据 | ||
| 15 | +export function getDetailApi(id) { | ||
| 16 | + return request({ | ||
| 17 | + url: baseUrl, | ||
| 18 | + method: 'get', | ||
| 19 | + params: { id } | ||
| 20 | + }) | ||
| 21 | +} | ||
| 22 | + | ||
| 23 | +// 新增保存 | ||
| 24 | +export function createApi(params) { | ||
| 25 | + return request({ | ||
| 26 | + url: baseUrl, | ||
| 27 | + method: 'post', | ||
| 28 | + data: params, | ||
| 29 | + contentType: ContentTypeEnum.JSON | ||
| 30 | + }) | ||
| 31 | +} | ||
| 32 | + | ||
| 33 | + | ||
| 34 | +// 修改保存 | ||
| 35 | +export function updateApi(params) { | ||
| 36 | + return request({ | ||
| 37 | + url: baseUrl, | ||
| 38 | + method: 'put', | ||
| 39 | + data: params, | ||
| 40 | + contentType: ContentTypeEnum.JSON | ||
| 41 | + }) | ||
| 42 | +} | ||
| 43 | + |
| @@ -656,6 +656,22 @@ | @@ -656,6 +656,22 @@ | ||
| 656 | "navigationBarBackgroundColor": "#ffffff", | 656 | "navigationBarBackgroundColor": "#ffffff", |
| 657 | "navigationBarTextStyle": "black" | 657 | "navigationBarTextStyle": "black" |
| 658 | } | 658 | } |
| 659 | + }, | ||
| 660 | + { | ||
| 661 | + "path": "pages/car_request_order/index", | ||
| 662 | + "style": { | ||
| 663 | + "navigationBarTitleText": "要车单", | ||
| 664 | + "navigationBarBackgroundColor": "#ffffff", | ||
| 665 | + "navigationBarTextStyle": "black" | ||
| 666 | + } | ||
| 667 | + }, | ||
| 668 | + { | ||
| 669 | + "path": "pages/car_request_order/detail", | ||
| 670 | + "style": { | ||
| 671 | + "navigationBarTitleText": "要车单详情", | ||
| 672 | + "navigationBarBackgroundColor": "#ffffff", | ||
| 673 | + "navigationBarTextStyle": "black" | ||
| 674 | + } | ||
| 659 | } | 675 | } |
| 660 | ], | 676 | ], |
| 661 | "subPackages": [ | 677 | "subPackages": [ |
pages/car_request_order/detail.vue
0 → 100644
| 1 | +<template> | ||
| 2 | + <view class="page"> | ||
| 3 | + <scroll-view class="scroll" scroll-y> | ||
| 4 | + <view class="detail-page"> | ||
| 5 | + <view class="section"> | ||
| 6 | + <text class="row company">{{ form.orderingUnitName }}</text> | ||
| 7 | + <view class="row"><text class="label">要车日期</text><text class="value">{{ form.requestCarDate }}</text></view> | ||
| 8 | + <view class="row"><text class="label">要车办事处</text><text class="value">{{ form.deptName }}</text></view> | ||
| 9 | + <view class="row"><text class="label">计划装货日期</text><text class="value">{{ form.deliveryDate }}</text></view> | ||
| 10 | + <view class="row"><text class="label">装货厂别</text><text class="value">{{ form.workshopName }}</text></view> | ||
| 11 | + <view class="row"><text class="label">订单编号</text><text class="value">{{ form.orderNo }}</text></view> | ||
| 12 | + <view class="row"><text class="label">卸货地点</text><text class="value">{{ form.destination }}</text></view> | ||
| 13 | + <view class="row"><text class="label">计划吨位(kg)</text><text class="value">{{ form.quantity }}</text></view> | ||
| 14 | + <view class="row"><text class="label">接货人/联络人</text><text class="value">{{ form.consignee }}</text></view> | ||
| 15 | + <view class="row"><text class="label">联系电话</text><text class="value">{{ form.phone }}</text></view> | ||
| 16 | + <view class="row"><text class="label">装货时间</text><text class="value">{{ form.loadingTime }}</text></view> | ||
| 17 | + <view class="row"><text class="label">外办审核人</text><text class="value">{{ form.externalAuditorName }}</text></view> | ||
| 18 | + <view class="row"><text class="label">经营办审核人</text><text class="value">{{ form.businessOfficeAuditorName }}</text></view> | ||
| 19 | + <view class="row"><text class="label">运作科审核人</text><text class="value">{{ form.operationsDepartmentAuditorName }}</text></view> | ||
| 20 | + <view class="row"><text class="label">回货计划安排</text><text class="value">{{ form.returnPlanArrangement }}</text></view> | ||
| 21 | + <view class="row"><text class="label">特殊需求、其他等</text><text class="value">{{ form.other }}</text></view> | ||
| 22 | + <view class="row"><text class="label">装货特别要求/需求</text><text class="value">{{ form.specialLoadingRequirement }}</text></view> | ||
| 23 | + </view> | ||
| 24 | + </view> | ||
| 25 | + </scroll-view> | ||
| 26 | + </view> | ||
| 27 | +</template> | ||
| 28 | + | ||
| 29 | +<script> | ||
| 30 | +import { getDetailApi } from '@/api/car_request_order.js' | ||
| 31 | + | ||
| 32 | +export default { | ||
| 33 | + name: 'CarRequestOrderDetail', | ||
| 34 | + data() { | ||
| 35 | + return { | ||
| 36 | + form: {}, | ||
| 37 | + } | ||
| 38 | + }, | ||
| 39 | + computed: { | ||
| 40 | + }, | ||
| 41 | + onLoad(query) { | ||
| 42 | + const id = (query && (query.id || query.code)) || '' | ||
| 43 | + if (id) this.loadDetail(id) | ||
| 44 | + }, | ||
| 45 | + methods: { | ||
| 46 | + async loadDetail(id) { | ||
| 47 | + try { | ||
| 48 | + const res = await getDetailApi(id) | ||
| 49 | + this.form = res.data || {} | ||
| 50 | + } catch (e) { | ||
| 51 | + this.form = {} | ||
| 52 | + } | ||
| 53 | + } | ||
| 54 | + } | ||
| 55 | +} | ||
| 56 | +</script> | ||
| 57 | + | ||
| 58 | +<style lang="scss" scoped> | ||
| 59 | +.page { | ||
| 60 | + display: flex; | ||
| 61 | + flex-direction: column; | ||
| 62 | + height: 100vh; | ||
| 63 | +} | ||
| 64 | + | ||
| 65 | +.scroll { | ||
| 66 | + flex: 1; | ||
| 67 | + background: #f3f3f3; | ||
| 68 | +} | ||
| 69 | + | ||
| 70 | +.detail-page { | ||
| 71 | +} | ||
| 72 | + | ||
| 73 | +.section { | ||
| 74 | + padding: 32rpx; | ||
| 75 | + background: #fff; | ||
| 76 | + margin-bottom: 20rpx; | ||
| 77 | + position: relative; | ||
| 78 | +} | ||
| 79 | + | ||
| 80 | +.row { | ||
| 81 | + display: flex; | ||
| 82 | + margin-bottom: 28rpx; | ||
| 83 | + | ||
| 84 | + &:last-child { | ||
| 85 | + margin-bottom: 0; | ||
| 86 | + } | ||
| 87 | + | ||
| 88 | + &.company { | ||
| 89 | + font-size: 36rpx; | ||
| 90 | + font-weight: 600; | ||
| 91 | + color: rgba(0, 0, 0, 0.9); | ||
| 92 | + padding-top: 10rpx; | ||
| 93 | + margin-bottom: 32rpx; | ||
| 94 | + line-height: 50rpx; | ||
| 95 | + } | ||
| 96 | + | ||
| 97 | + .label { | ||
| 98 | + width: 240rpx; | ||
| 99 | + line-height: 32rpx; | ||
| 100 | + font-size: 28rpx; | ||
| 101 | + color: rgba(0, 0, 0, 0.6); | ||
| 102 | + } | ||
| 103 | + | ||
| 104 | + .value { | ||
| 105 | + flex: 1; | ||
| 106 | + line-height: 32rpx; | ||
| 107 | + font-size: 28rpx; | ||
| 108 | + color: rgba(0, 0, 0, 0.9); | ||
| 109 | + text-align: right; | ||
| 110 | + word-break: break-all; | ||
| 111 | + } | ||
| 112 | +} | ||
| 113 | + | ||
| 114 | +.title-header { | ||
| 115 | + background-color: #fff; | ||
| 116 | + display: flex; | ||
| 117 | + align-items: center; | ||
| 118 | + padding: 32rpx 32rpx 22rpx; | ||
| 119 | + border-bottom: 1rpx dashed #f0f0f0; | ||
| 120 | + | ||
| 121 | + &_icon { | ||
| 122 | + width: 32rpx; | ||
| 123 | + height: 28rpx; | ||
| 124 | + margin-right: 16rpx; | ||
| 125 | + } | ||
| 126 | + | ||
| 127 | + span { | ||
| 128 | + color: rgba(0, 0, 0, 0.9); | ||
| 129 | + font-size: 32rpx; | ||
| 130 | + line-height: 44rpx; | ||
| 131 | + font-weight: 600; | ||
| 132 | + } | ||
| 133 | +} | ||
| 134 | +</style> |
pages/car_request_order/index.vue
0 → 100644
| 1 | +<template> | ||
| 2 | + <view class="page"> | ||
| 3 | + <view class="dev-list-fixed"> | ||
| 4 | + <view class="search-row"> | ||
| 5 | + <uni-search-bar v-model="searchKeyword" radius="6" placeholder="请输入购货单位" clearButton="auto" | ||
| 6 | + cancelButton="none" bgColor="#F3F3F3" textColor="rgba(0,0,0,0.4)" @confirm="search" | ||
| 7 | + @input="onSearchInput" /> | ||
| 8 | + <view class="tool-icons"> | ||
| 9 | + <image class="tool-icon" src="/static/images/dev_manage/filter_icon.png" @click="openFilter" /> | ||
| 10 | + </view> | ||
| 11 | + </view> | ||
| 12 | + </view> | ||
| 13 | + | ||
| 14 | + | ||
| 15 | + <!-- 列表卡片组件 --> | ||
| 16 | + <view class="list-box"> | ||
| 17 | + <card-list ref="cardRef" :fetch-fn="fetchList" :query="query" :extra="extraParams" row-key="id" | ||
| 18 | + :enable-refresh="true" :enable-load-more="true" @loaded="onCardLoaded" @error="onCardError"> | ||
| 19 | + <template v-slot="{ item, selected }"> | ||
| 20 | + <view class="card" @click.stop="onCardClick(item)"> | ||
| 21 | + <view class="card-header"> | ||
| 22 | + <text class="title omit2">{{ item.orderingUnitName }}</text> | ||
| 23 | + </view> | ||
| 24 | + <view class="info-row"> | ||
| 25 | + <text>订单编号</text><text>{{ item.orderNo || '-' }}</text> | ||
| 26 | + </view> | ||
| 27 | + <view class="info-row"> | ||
| 28 | + <text>要车办事处</text><text>{{ item.deptName || '-' }}</text> | ||
| 29 | + </view> | ||
| 30 | + <view class="info-row"> | ||
| 31 | + <text>装货厂别</text><text>{{ item.workshopName || '-' }}</text> | ||
| 32 | + </view> | ||
| 33 | + <view class="info-row"> | ||
| 34 | + <text>要车日期</text><text>{{ item.requestCarDate || '-' }}</text> | ||
| 35 | + </view> | ||
| 36 | + </view> | ||
| 37 | + </template> | ||
| 38 | + </card-list> | ||
| 39 | + </view> | ||
| 40 | + | ||
| 41 | + | ||
| 42 | + | ||
| 43 | + <!-- 筛选弹框 --> | ||
| 44 | + <filter-modal :visible.sync="filterVisible" :value.sync="filterForm" title="筛选" @reset="onFilterReset" | ||
| 45 | + @confirm="onFilterConfirm"> | ||
| 46 | + <template v-slot="{ model }"> | ||
| 47 | + <view class="filter-form"> | ||
| 48 | + <view class="form-item"> | ||
| 49 | + <view class="label">办事处</view> | ||
| 50 | + <uni-easyinput v-model="model.deptName" placeholder="请输入办事处" :inputBorder="false" | ||
| 51 | + placeholderStyle="font-size:14px" /> | ||
| 52 | + </view> | ||
| 53 | + | ||
| 54 | + <view class="form-item"> | ||
| 55 | + <view class="label">装货厂别</view> | ||
| 56 | + <uni-data-checkbox mode="tag" :multiple="false" :value-field="'value'" :text-field="'text'" | ||
| 57 | + v-model="model.workshopId" @change="onWorkshopChange" :localdata="workshopOptions" /> | ||
| 58 | + </view> | ||
| 59 | + | ||
| 60 | + <view class="form-item"> | ||
| 61 | + <view class="label">要车日期</view> | ||
| 62 | + <uni-datetime-picker type="daterange" v-model="model.dateRange" start="2023-01-01" /> | ||
| 63 | + </view> | ||
| 64 | + </view> | ||
| 65 | + </template> | ||
| 66 | + </filter-modal> | ||
| 67 | + </view> | ||
| 68 | +</template> | ||
| 69 | + | ||
| 70 | +<script> | ||
| 71 | +import CardList from '@/components/card/index.vue' | ||
| 72 | +import FilterModal from '@/components/filter/index.vue' | ||
| 73 | +import { workshopQueryApi } from '@/api/devManage.js' | ||
| 74 | +import SingleSelectSheet from '@/components/single-select/index.vue' | ||
| 75 | +import { | ||
| 76 | + queryApi | ||
| 77 | +} from '@/api/car_request_order.js' | ||
| 78 | +import { | ||
| 79 | + getDicByCodes | ||
| 80 | +} from '@/utils/dic' | ||
| 81 | +import { | ||
| 82 | + getDicName | ||
| 83 | +} from '@/utils/dic.js' | ||
| 84 | + | ||
| 85 | +export default { | ||
| 86 | + components: { | ||
| 87 | + CardList, | ||
| 88 | + FilterModal, | ||
| 89 | + SingleSelectSheet | ||
| 90 | + }, | ||
| 91 | + data() { | ||
| 92 | + return { | ||
| 93 | + searchKeyword: '', | ||
| 94 | + searchKeywordDebounced: '', | ||
| 95 | + tabs: [], | ||
| 96 | + // 给到 card 的筛选值 | ||
| 97 | + query: { | ||
| 98 | + status: '', | ||
| 99 | + companySuggestedCategory: '', | ||
| 100 | + dateRange: [] | ||
| 101 | + }, | ||
| 102 | + extraParams: {}, | ||
| 103 | + | ||
| 104 | + // 批量选择 | ||
| 105 | + rowKey: 'id', | ||
| 106 | + currentItems: [], | ||
| 107 | + | ||
| 108 | + // 筛选弹框 | ||
| 109 | + filterVisible: false, | ||
| 110 | + filterForm: { | ||
| 111 | + status: '', | ||
| 112 | + companySuggestedCategory: '', | ||
| 113 | + dateRange: [] | ||
| 114 | + }, | ||
| 115 | + dicOptions: { | ||
| 116 | + SHIP_ORDER_STATUS: [], | ||
| 117 | + }, | ||
| 118 | + statusLocal: [], | ||
| 119 | + workshopOptions: [], | ||
| 120 | + } | ||
| 121 | + }, | ||
| 122 | + computed: { | ||
| 123 | + extraCombined() { | ||
| 124 | + return { | ||
| 125 | + searchKey: this.searchKeywordDebounced || undefined | ||
| 126 | + } | ||
| 127 | + } | ||
| 128 | + }, | ||
| 129 | + watch: { | ||
| 130 | + extraCombined: { | ||
| 131 | + deep: true, | ||
| 132 | + handler(v) { | ||
| 133 | + this.extraParams = v | ||
| 134 | + }, | ||
| 135 | + immediate: true | ||
| 136 | + }, | ||
| 137 | + | ||
| 138 | + }, | ||
| 139 | + created() { | ||
| 140 | + this.loadAllDicData() | ||
| 141 | + this.loadWorkshopOptions() | ||
| 142 | + }, | ||
| 143 | + onLoad() { }, | ||
| 144 | + // 页面触底兜底:当页面自身滚动到底部时,转调卡片组件加载更多 | ||
| 145 | + onReachBottom() { | ||
| 146 | + if (this.$refs && this.$refs.cardRef && this.$refs.cardRef.onLoadMore) { | ||
| 147 | + this.$refs.cardRef.onLoadMore() | ||
| 148 | + } | ||
| 149 | + }, | ||
| 150 | + beforeDestroy() { | ||
| 151 | + if (this.searchDebounceTimer) { | ||
| 152 | + clearTimeout(this.searchDebounceTimer) | ||
| 153 | + this.searchDebounceTimer = null | ||
| 154 | + } | ||
| 155 | + }, | ||
| 156 | + methods: { | ||
| 157 | + async loadWorkshopOptions() { | ||
| 158 | + try { | ||
| 159 | + const res = await workshopQueryApi({ pageIndex: 1, pageSize: 9999 }) | ||
| 160 | + const list = (res && res.data && res.data.datas) || [] | ||
| 161 | + this.workshopOptions = list.map(it => ({ text: it.name || it.workshopName || '', value: it.id || it.workshopId || '' })) | ||
| 162 | + } catch (e) { | ||
| 163 | + this.workshopOptions = [] | ||
| 164 | + } | ||
| 165 | + }, | ||
| 166 | + onCardLoaded({ | ||
| 167 | + items | ||
| 168 | + }) { | ||
| 169 | + this.currentItems = items | ||
| 170 | + }, | ||
| 171 | + onCardError() { | ||
| 172 | + uni.showToast({ | ||
| 173 | + title: '列表加载失败', | ||
| 174 | + icon: 'none' | ||
| 175 | + }) | ||
| 176 | + }, | ||
| 177 | + // 输入实时搜索:1200ms 防抖,仅在停止输入超过阈值后刷新 | ||
| 178 | + onSearchInput(val) { | ||
| 179 | + if (this.searchDebounceTimer) clearTimeout(this.searchDebounceTimer) | ||
| 180 | + this.searchDebounceTimer = setTimeout(() => { | ||
| 181 | + this.searchKeywordDebounced = this.searchKeyword | ||
| 182 | + this.searchDebounceTimer = null | ||
| 183 | + }, 1200) | ||
| 184 | + }, | ||
| 185 | + // uni-search-bar 确认搜索:更新关键字并触发 CardList 刷新 | ||
| 186 | + search(e) { | ||
| 187 | + const val = e && e.value != null ? e.value : this.searchKeyword | ||
| 188 | + this.searchKeyword = val | ||
| 189 | + this.searchKeywordDebounced = val | ||
| 190 | + }, | ||
| 191 | + onAdd() { | ||
| 192 | + uni.navigateTo({ | ||
| 193 | + url: '/pages/credit_manage/add' | ||
| 194 | + }) | ||
| 195 | + }, | ||
| 196 | + openFilter() { | ||
| 197 | + this.filterVisible = true | ||
| 198 | + }, | ||
| 199 | + onFilterReset(payload) { | ||
| 200 | + this.filterForm = payload | ||
| 201 | + }, | ||
| 202 | + onFilterConfirm(payload) { | ||
| 203 | + if ((payload.status === '' || payload.status == null) && this.filterForm.status !== '') { | ||
| 204 | + payload.status = this.filterForm.status | ||
| 205 | + } | ||
| 206 | + if ((payload.companySuggestedCategory === '' || payload.companySuggestedCategory == null) && this | ||
| 207 | + .filterForm | ||
| 208 | + .companySuggestedCategory !== '') { | ||
| 209 | + payload.companySuggestedCategory = this.filterForm.companySuggestedCategory | ||
| 210 | + } | ||
| 211 | + this.query = { | ||
| 212 | + ...payload | ||
| 213 | + } | ||
| 214 | + }, | ||
| 215 | + onStatusChange(e) { | ||
| 216 | + const raw = e && e.detail && e.detail.value !== undefined ? | ||
| 217 | + e.detail.value : | ||
| 218 | + (e && e.value !== undefined ? e.value : '') | ||
| 219 | + this.filterForm.status = raw | ||
| 220 | + }, | ||
| 221 | + onCategoryChange(e) { | ||
| 222 | + const raw = e && e.detail && e.detail.value !== undefined ? e.detail.value : (e && e.value !== undefined ? | ||
| 223 | + e.value : '') | ||
| 224 | + this.filterForm.companySuggestedCategory = raw | ||
| 225 | + }, | ||
| 226 | + | ||
| 227 | + // 列表接口(真实请求) | ||
| 228 | + fetchList({ | ||
| 229 | + pageIndex, | ||
| 230 | + pageSize, | ||
| 231 | + query, | ||
| 232 | + extra | ||
| 233 | + }) { | ||
| 234 | + const params = { | ||
| 235 | + pageIndex, | ||
| 236 | + pageSize, | ||
| 237 | + ...extra, | ||
| 238 | + ...query | ||
| 239 | + } | ||
| 240 | + if (Array.isArray(params.dateRange) && params.dateRange.length === 2) { | ||
| 241 | + params.requestCarDateStart = params.dateRange[0] | ||
| 242 | + params.requestCarDateEnd = params.dateRange[1] | ||
| 243 | + delete params.dateRange | ||
| 244 | + } | ||
| 245 | + if (this.searchKeywordDebounced) { | ||
| 246 | + params.searchKey = this.searchKeywordDebounced | ||
| 247 | + } | ||
| 248 | + return queryApi(params) | ||
| 249 | + .then(res => { | ||
| 250 | + const _data = res.data || {}; | ||
| 251 | + const records = _data.datas || []; | ||
| 252 | + const totalCount = _data.totalCount || 0; | ||
| 253 | + const hasNext = _data.hasNext || false | ||
| 254 | + return { | ||
| 255 | + records, | ||
| 256 | + totalCount, | ||
| 257 | + hasNext | ||
| 258 | + } | ||
| 259 | + }) | ||
| 260 | + .catch(err => { | ||
| 261 | + console.error('fetchList error', err) | ||
| 262 | + this.onCardError() | ||
| 263 | + return { | ||
| 264 | + records: [], | ||
| 265 | + totalCount: 0, | ||
| 266 | + hasNext: false | ||
| 267 | + } | ||
| 268 | + }) | ||
| 269 | + }, | ||
| 270 | + loadAllDicData() { | ||
| 271 | + const dicCodes = ['SHIP_ORDER_STATUS'] | ||
| 272 | + return getDicByCodes(dicCodes).then(results => { | ||
| 273 | + this.dicOptions.SHIP_ORDER_STATUS = results.SHIP_ORDER_STATUS.data || [] | ||
| 274 | + this.statusLocal = (this.dicOptions.SHIP_ORDER_STATUS || []).map(it => ({ | ||
| 275 | + value: it.code, | ||
| 276 | + text: it.name | ||
| 277 | + })) | ||
| 278 | + }).catch(() => { | ||
| 279 | + this.dicOptions = { | ||
| 280 | + SHIP_ORDER_STATUS: [], | ||
| 281 | + } | ||
| 282 | + this.statusLocal = [] | ||
| 283 | + }) | ||
| 284 | + }, | ||
| 285 | + onCardClick(item) { | ||
| 286 | + const id = (item && (item.id || item.code)) || '' | ||
| 287 | + if (!id) return | ||
| 288 | + const query = '?id=' + encodeURIComponent(id) | ||
| 289 | + uni.navigateTo({ | ||
| 290 | + url: '/pages/car_request_order/detail' + query | ||
| 291 | + }) | ||
| 292 | + }, | ||
| 293 | + getDicName: getDicName, | ||
| 294 | + getCategoryClass(categoryName) { | ||
| 295 | + if (!categoryName) return '' | ||
| 296 | + if (categoryName.includes('A') || categoryName.includes('a')) { | ||
| 297 | + return 'category_A' | ||
| 298 | + } else if (categoryName.includes('B') || categoryName.includes('b')) { | ||
| 299 | + return 'category_B' | ||
| 300 | + } else if (categoryName.includes('C') || categoryName.includes('c')) { | ||
| 301 | + return 'category_C' | ||
| 302 | + } else if (categoryName.includes('D') || categoryName.includes('d')) { | ||
| 303 | + return 'category_D' | ||
| 304 | + } | ||
| 305 | + }, | ||
| 306 | + onWorkshopChange(e) { | ||
| 307 | + const raw = e && e.detail && e.detail.value !== undefined ? e.detail.value : (e && e.value !== undefined ? e.value : '') | ||
| 308 | + this.filterForm.workshopId = raw | ||
| 309 | + const match = (this.workshopOptions || []).find(o => String(o.value) === String(raw)) | ||
| 310 | + this.filterForm.workshopIdName = match ? (match.text || '') : '' | ||
| 311 | + }, | ||
| 312 | + | ||
| 313 | + } | ||
| 314 | +} | ||
| 315 | +</script> | ||
| 316 | + | ||
| 317 | +<style lang="scss" scoped> | ||
| 318 | +.page { | ||
| 319 | + display: flex; | ||
| 320 | + flex-direction: column; | ||
| 321 | + height: 100vh; | ||
| 322 | +} | ||
| 323 | + | ||
| 324 | +.dev-list-fixed { | ||
| 325 | + position: fixed; | ||
| 326 | + top: 96rpx; | ||
| 327 | + left: 0; | ||
| 328 | + right: 0; | ||
| 329 | + z-index: 2; | ||
| 330 | + background: #fff; | ||
| 331 | + | ||
| 332 | + .search-row { | ||
| 333 | + display: flex; | ||
| 334 | + align-items: center; | ||
| 335 | + padding: 16rpx 32rpx; | ||
| 336 | + | ||
| 337 | + .uni-searchbar { | ||
| 338 | + padding: 0; | ||
| 339 | + flex: 1; | ||
| 340 | + } | ||
| 341 | + | ||
| 342 | + .tool-icons { | ||
| 343 | + display: flex; | ||
| 344 | + | ||
| 345 | + .tool-icon { | ||
| 346 | + width: 48rpx; | ||
| 347 | + height: 48rpx; | ||
| 348 | + display: block; | ||
| 349 | + margin-left: 32rpx; | ||
| 350 | + } | ||
| 351 | + } | ||
| 352 | + } | ||
| 353 | + | ||
| 354 | +} | ||
| 355 | + | ||
| 356 | +/* 仅当前页覆盖 uni-search-bar 盒子高度 */ | ||
| 357 | +::v-deep .uni-searchbar__box { | ||
| 358 | + height: 80rpx !important; | ||
| 359 | + justify-content: start; | ||
| 360 | + | ||
| 361 | + .uni-searchbar__box-search-input { | ||
| 362 | + font-size: 32rpx !important; | ||
| 363 | + } | ||
| 364 | +} | ||
| 365 | + | ||
| 366 | +.list-box { | ||
| 367 | + flex: 1; | ||
| 368 | + padding-top: 132rpx; | ||
| 369 | + | ||
| 370 | + &.pad-batch { | ||
| 371 | + padding-bottom: 144rpx; | ||
| 372 | + } | ||
| 373 | + | ||
| 374 | + .card { | ||
| 375 | + position: relative; | ||
| 376 | + } | ||
| 377 | + | ||
| 378 | + .card-header { | ||
| 379 | + margin-bottom: 28rpx; | ||
| 380 | + position: relative; | ||
| 381 | + | ||
| 382 | + .title { | ||
| 383 | + font-size: 36rpx; | ||
| 384 | + font-weight: 600; | ||
| 385 | + line-height: 50rpx; | ||
| 386 | + color: rgba(0, 0, 0, 0.9); | ||
| 387 | + width: 578rpx; | ||
| 388 | + } | ||
| 389 | + | ||
| 390 | + .status-box { | ||
| 391 | + position: absolute; | ||
| 392 | + top: -32rpx; | ||
| 393 | + right: -32rpx; | ||
| 394 | + | ||
| 395 | + .status { | ||
| 396 | + display: block; | ||
| 397 | + height: 48rpx; | ||
| 398 | + line-height: 48rpx; | ||
| 399 | + font-weight: 600; | ||
| 400 | + color: #fff; | ||
| 401 | + font-size: 24rpx; | ||
| 402 | + padding: 0 14rpx; | ||
| 403 | + border-radius: 6rpx; | ||
| 404 | + margin-bottom: 8rpx; | ||
| 405 | + | ||
| 406 | + // 已签收 | ||
| 407 | + &.status_DELIVERED { | ||
| 408 | + background: #E7E7E7; | ||
| 409 | + color: rgba(0, 0, 0, 0.9); | ||
| 410 | + } | ||
| 411 | + | ||
| 412 | + // 已发货 | ||
| 413 | + &.status_SHIPMENTS { | ||
| 414 | + background: #2BA471; | ||
| 415 | + } | ||
| 416 | + | ||
| 417 | + // 未发货 | ||
| 418 | + &.status_UN_SHIPMENTS { | ||
| 419 | + background: #D54941; | ||
| 420 | + } | ||
| 421 | + } | ||
| 422 | + | ||
| 423 | + .status2 { | ||
| 424 | + display: block; | ||
| 425 | + font-weight: 600; | ||
| 426 | + line-height: 48rpx; | ||
| 427 | + height: 48rpx; | ||
| 428 | + color: #fff; | ||
| 429 | + font-size: 24rpx; | ||
| 430 | + padding: 0 14rpx; | ||
| 431 | + border-radius: 6rpx; | ||
| 432 | + background: #E7E7E7; | ||
| 433 | + color: rgba(0, 0, 0, 0.9); | ||
| 434 | + | ||
| 435 | + } | ||
| 436 | + | ||
| 437 | + } | ||
| 438 | + | ||
| 439 | + } | ||
| 440 | + | ||
| 441 | + .info-row { | ||
| 442 | + display: flex; | ||
| 443 | + align-items: center; | ||
| 444 | + color: rgba(0, 0, 0, 0.6); | ||
| 445 | + font-size: 28rpx; | ||
| 446 | + margin-bottom: 24rpx; | ||
| 447 | + | ||
| 448 | + &:last-child { | ||
| 449 | + margin-bottom: 0; | ||
| 450 | + } | ||
| 451 | + | ||
| 452 | + text { | ||
| 453 | + width: 60%; | ||
| 454 | + line-height: 32rpx; | ||
| 455 | + | ||
| 456 | + &:last-child { | ||
| 457 | + color: rgba(0, 0, 0, 0.9); | ||
| 458 | + width: 40%; | ||
| 459 | + } | ||
| 460 | + | ||
| 461 | + &.category { | ||
| 462 | + display: inline-block; | ||
| 463 | + padding: 4rpx 12rpx; | ||
| 464 | + border-radius: 6rpx; | ||
| 465 | + font-size: 24rpx; | ||
| 466 | + width: auto; | ||
| 467 | + | ||
| 468 | + &.category_A { | ||
| 469 | + background: #FFF0ED; | ||
| 470 | + color: #D54941; | ||
| 471 | + } | ||
| 472 | + | ||
| 473 | + &.category_B { | ||
| 474 | + background: #FFF1E9; | ||
| 475 | + color: #E37318; | ||
| 476 | + } | ||
| 477 | + | ||
| 478 | + &.category_C { | ||
| 479 | + background: #F2F3FF; | ||
| 480 | + color: $theme-primary; | ||
| 481 | + } | ||
| 482 | + | ||
| 483 | + &.category_D { | ||
| 484 | + background: #E3F9E9; | ||
| 485 | + color: #2BA471; | ||
| 486 | + } | ||
| 487 | + } | ||
| 488 | + } | ||
| 489 | + | ||
| 490 | + } | ||
| 491 | +} | ||
| 492 | + | ||
| 493 | +.filter-form { | ||
| 494 | + .form-item { | ||
| 495 | + margin-bottom: 24rpx; | ||
| 496 | + } | ||
| 497 | + | ||
| 498 | + .label { | ||
| 499 | + margin-bottom: 20rpx; | ||
| 500 | + color: rgba(0, 0, 0, 0.9); | ||
| 501 | + height: 44rpx; | ||
| 502 | + line-height: 44rpx; | ||
| 503 | + font-size: 30rpx; | ||
| 504 | + } | ||
| 505 | + | ||
| 506 | + .uni-easyinput { | ||
| 507 | + border: 1rpx solid #f3f3f3; | ||
| 508 | + } | ||
| 509 | + | ||
| 510 | +} | ||
| 511 | + | ||
| 512 | +/* 深度覆盖 uni-data-checkbox(mode=tag)内部的 tag 展示与间距 */ | ||
| 513 | +::v-deep .filter-form .uni-data-checklist .checklist-group { | ||
| 514 | + .checklist-box { | ||
| 515 | + &.is--tag { | ||
| 516 | + width: 212rpx; | ||
| 517 | + margin-top: 0; | ||
| 518 | + margin-bottom: 24rpx; | ||
| 519 | + margin-right: 24rpx; | ||
| 520 | + height: 80rpx; | ||
| 521 | + padding: 0; | ||
| 522 | + border-radius: 12rpx; | ||
| 523 | + background-color: #f3f3f3; | ||
| 524 | + border-color: #f3f3f3; | ||
| 525 | + | ||
| 526 | + &:nth-child(3n) { | ||
| 527 | + margin-right: 0; | ||
| 528 | + } | ||
| 529 | + | ||
| 530 | + .checklist-content { | ||
| 531 | + display: flex; | ||
| 532 | + justify-content: center; | ||
| 533 | + } | ||
| 534 | + | ||
| 535 | + .checklist-text { | ||
| 536 | + color: rgba(0, 0, 0, 0.9); | ||
| 537 | + font-size: 28rpx; | ||
| 538 | + } | ||
| 539 | + } | ||
| 540 | + | ||
| 541 | + &.is-checked { | ||
| 542 | + background-color: $theme-primary-plain-bg !important; | ||
| 543 | + border-color: $theme-primary-plain-bg !important; | ||
| 544 | + | ||
| 545 | + .checklist-text { | ||
| 546 | + color: $theme-primary !important; | ||
| 547 | + } | ||
| 548 | + } | ||
| 549 | + } | ||
| 550 | + | ||
| 551 | +} | ||
| 552 | +</style> |