Commit e65252c98005eecf47cfb5df6d9144f70c7f7118

Authored by lxf
1 parent bd988dfd

fix: 运单列表优化

@@ -17,6 +17,17 @@ @@ -17,6 +17,17 @@
17 "navigationBarTitleText": "验证码" 17 "navigationBarTitleText": "验证码"
18 } 18 }
19 },{ 19 },{
  20 + "path": "pages/goodSource/index",
  21 + "style": {
  22 + "navigationBarTitleText": "货源",
  23 + "enablePullDownRefresh": true
  24 + }
  25 + },{
  26 + "path": "pages/goodSource/add",
  27 + "style": {
  28 + "navigationBarTitleText": "创建货源"
  29 + }
  30 + },{
20 "path": "pages/order/index", 31 "path": "pages/order/index",
21 "style": { 32 "style": {
22 "navigationBarTitleText": "订单", 33 "navigationBarTitleText": "订单",
@@ -224,6 +235,12 @@ @@ -224,6 +235,12 @@
224 "backgroundColor": "#FFFFFF", 235 "backgroundColor": "#FFFFFF",
225 "list": [ 236 "list": [
226 { 237 {
  238 + "pagePath": "pages/goodSource/index",
  239 + "iconPath": "static/tabbar/good.png",
  240 + "selectedIconPath": "static/tabbar/good-active.png",
  241 + "text": "货源"
  242 + },
  243 + {
227 "pagePath": "pages/order/index", 244 "pagePath": "pages/order/index",
228 "iconPath": "static/tabbar/order.png", 245 "iconPath": "static/tabbar/order.png",
229 "selectedIconPath": "static/tabbar/order-active.png", 246 "selectedIconPath": "static/tabbar/order-active.png",
pages/goodSource/add.vue 0 → 100644
@@ -0,0 +1,464 @@ @@ -0,0 +1,464 @@
  1 +<template>
  2 + <Page name="good-source-add" flank>
  3 + <template #content>
  4 + <u-form :model="form" ref="uForm" labelWidth="100">
  5 + <view class="card">
  6 + <u-form-item label="所属项目" required @click="choseProjectCode">
  7 + <u-input v-model="form.projectName" border="none" suffix-icon="arrow-right" placeholder="请选择项目" disabledColor="#ffffff" disabled />
  8 + </u-form-item>
  9 + <u-form-item label="开始时间" @click="showLoadTime1 = true" required>
  10 + <u-datetime-picker :show="showLoadTime1" :value="loadTimeDef1" @cancel="showLoadTime1 = false" @close="showLoadTime2 = false" @confirm="loadTimeFormat1"></u-datetime-picker>
  11 + <u-input v-model="form.loadTime" border="none" suffix-icon="arrow-right" placeholder="请选择时间" disabledColor="#ffffff" disabled />
  12 + </u-form-item>
  13 + <u-form-item label="结束时间" @click="showLoadTime2 = true" required>
  14 + <u-datetime-picker :show="showLoadTime2" :value="loadTimeDef2" @cancel="showLoadTime2 = false" @close="showLoadTime2 = false" @confirm="loadTimeFormat2"></u-datetime-picker>
  15 + <u-input v-model="form.loadTime" border="none" suffix-icon="arrow-right" placeholder="请选择时间" disabledColor="#ffffff" disabled />
  16 + </u-form-item>
  17 + </view>
  18 + <view class="card">
  19 + <u-form-item label="装货地址" required @click="() => selectAddress(0)">
  20 + <u-input :value="form.waypoints[0].address" border="none" suffix-icon="arrow-right" placeholder="请选择" disabledColor="#ffffff" disabled />
  21 + </u-form-item>
  22 + <u-form-item label="卸货地址" required @click="() => selectAddress(1)">
  23 + <u-input v-model="form.waypoints[1].address" border="none" suffix-icon="arrow-right" placeholder="请选择" disabledColor="#ffffff" disabled />
  24 + </u-form-item>
  25 + </view>
  26 + <view class="card">
  27 + <u-form-item label="货物类型" required @click="choseGoodsType">
  28 + <u-input :value="form.goodsTypeName" border="none" suffix-icon="arrow-right" placeholder="请选择" disabledColor="#ffffff" disabled />
  29 + </u-form-item>
  30 + <u-form-item label="需求车型" required @click="specificationVisible = true">
  31 + <u-input :value="formatSpecification" border="none" suffix-icon="arrow-right" placeholder="请选择" disabledColor="#ffffff" disabled />
  32 + </u-form-item>
  33 + <u-form-item label="需求箱型" required @click="vanTypeVisible = true">
  34 + <u-input :value="formatVanType" border="none" suffix-icon="arrow-right" placeholder="请选择" disabledColor="#ffffff" disabled />
  35 + </u-form-item>
  36 + </view>
  37 + <view class="card">
  38 + <u-form-item label="计价方式" @click="chosePriceType">
  39 + <u-input v-model="form.priceType" border="none" suffix-icon="arrow-right" placeholder="请选择" disabledColor="#ffffff" disabled />
  40 + </u-form-item>
  41 + <u-form-item label="货物总量" required>
  42 + <u-input v-model="form.goodsValue" border="none" type="digit" placeholder="请输入">
  43 + <template slot="suffix">吨</template>
  44 + </u-input>
  45 + </u-form-item>
  46 + <u-form-item label="运输单价">
  47 + <u-input v-model="form.goodsValue" border="none" type="digit" placeholder="请输入">
  48 + <template slot="suffix">元/吨</template>
  49 + </u-input>
  50 + </u-form-item>
  51 + <u-form-item label="需求车数" required>
  52 + <u-input v-model="form.goodsValue" border="none" type="digit" placeholder="请输入">
  53 + <template slot="suffix">吨</template>
  54 + </u-input>
  55 + </u-form-item>
  56 + <u-form-item label="总运费">
  57 + <u-input v-model="form.goodsValue" border="none" type="digit" placeholder="请输入">
  58 + <template slot="suffix">元/吨</template>
  59 + </u-input>
  60 + </u-form-item>
  61 + </view>
  62 + <view class="card" @tap="more = !more">
  63 + <view class="more-action">
  64 + {{ !more ? '展开更多信息' : '收起更多信息' }}
  65 + <view class="sx-img">
  66 + <image v-if="more" class="sx-image up" :src="formatImagePath('down')"></image>
  67 + <image v-else class="sx-image" :src="formatImagePath('down')"></image>
  68 + </view>
  69 + </view>
  70 + </view>
  71 + <template v-if="more">
  72 + <view class="card">
  73 + <u-form-item label="订单备注" @click="selectRemark">
  74 + <u-input v-model="form.remark" border="none" suffix-icon="arrow-right" placeholder="请输入,选填" disabledColor="#ffffff" disabled />
  75 + </u-form-item>
  76 + </view>
  77 + <view class="card">
  78 + <u-form-item label="报价联系人">
  79 + <u-input v-model="form.contactName" border="none" placeholder="请输入,选填" />
  80 + </u-form-item>
  81 + <u-form-item label="报价联系电话">
  82 + <u-input v-model="form.contactMobile" border="none" placeholder="请输入,选填" />
  83 + </u-form-item>
  84 + </view>
  85 + </template>
  86 + </u-form>
  87 + </template>
  88 + <template #footer>
  89 + <u-button :loading="loading" type="primary" @tap="submitAddFun">确定</u-button>
  90 + </template>
  91 + <tui-bottom-popup :show="vanTypeVisible" @close="vanTypeVisible = false">
  92 + <view class="popup-more">
  93 + <view class="pm-title">选择箱型</view>
  94 + <view class="pm-list">
  95 + <view v-for="(item, index) in vanTypeList" :key="index" @click="choseVanType(item.valueCode)" class="pm-btn">
  96 + <text :class="choseVanTypeList.includes(item.valueCode) ? 'action' : ''">{{ item.valueName }}</text>
  97 + </view>
  98 + </view>
  99 + </view>
  100 + </tui-bottom-popup>
  101 + <tui-bottom-popup :show="specificationVisible" @close="specificationVisible = false">
  102 + <view class="popup-more">
  103 + <view class="pm-title">选择车型</view>
  104 + <view class="pm-list">
  105 + <view v-for="(item, index) in specificationList" :key="index" @click="choseSpecification(item.valueCode)" class="pm-btn">
  106 + <text :class="choseSpecificationList.includes(item.valueCode) ? 'action' : ''">{{ item.valueName }}</text>
  107 + </view>
  108 + </view>
  109 + </view>
  110 + </tui-bottom-popup>
  111 + <u-toast ref="uToast"></u-toast>
  112 + </Page>
  113 +</template>
  114 +<script>
  115 +import { urlParam } from '@/utils/param';
  116 +import { mapGetters } from 'vuex';
  117 +import dayjs from 'dayjs';
  118 +export default {
  119 + name: 'good-source-add',
  120 + data() {
  121 + return {
  122 + loading: false,
  123 + showModal: '',
  124 + showModal2: '',
  125 + content: '',
  126 + content2: '',
  127 + carNumber: '',
  128 + showLoadTime1: false,
  129 + showLoadTime2: false,
  130 + loadTimeDef1: new Date(),
  131 + loadTimeDef2: new Date(),
  132 + showCar: false,
  133 + typeCar: '',
  134 + more: false,
  135 + radioList: [],
  136 + form: {
  137 + projectCode: '',
  138 + loadTime: '',
  139 + projectName: '',
  140 + customerOrderCode: '',
  141 + goodsName: '',
  142 + goodsValue: '',
  143 + goodsPiece: '',
  144 + goodsWeight: '',
  145 + goodsVolume: '',
  146 + mobile: '',
  147 + driverId: '',
  148 + driverName: '',
  149 + licenseNumber: '',
  150 + trailerNumber: '',
  151 + paidAmount: '',
  152 + oilAmount: '',
  153 + prepaidAmount: '',
  154 + deliveryAmount: '',
  155 + balancePaymentAmount: '',
  156 + distance: '',
  157 + allowDriverSeeFreightAmountNode: '',
  158 + waypoints: [{}, {}],
  159 + remark: '',
  160 + },
  161 + payeeModel: {},
  162 + driverObj: {}, //司机信息
  163 + currentFreight: {},
  164 + vanTypeVisible: false,
  165 + choseVanTypeList: [],
  166 + specificationVisible: false,
  167 + choseSpecificationList: [],
  168 + };
  169 + },
  170 + computed: {
  171 + ...mapGetters(['dictList', 'dictValue']),
  172 + // 箱型
  173 + vanTypeList() {
  174 + return [...this.dictList('VEHICLE_COMPARTMENT_TYPE'), { valueCode: 'ALL', valueName: '不限' }];
  175 + },
  176 + formatVanType() {
  177 + let res = [];
  178 + for (let v of this.choseVanTypeList) {
  179 + if (v === 'ALL') {
  180 + res.push('不限');
  181 + } else {
  182 + res.push(this.dictValue('VEHICLE_COMPARTMENT_TYPE', v));
  183 + }
  184 + }
  185 + return res.join('/');
  186 + },
  187 + // 箱型
  188 + specificationList() {
  189 + return [...this.dictList('VEHICLE_SPECIFICATION'), { valueCode: 'ALL', valueName: '不限' }];
  190 + },
  191 + formatSpecification() {
  192 + let res = [];
  193 + for (let v of this.choseSpecificationList) {
  194 + if (v === 'ALL') {
  195 + res.push('不限');
  196 + } else {
  197 + res.push(this.dictValue('VEHICLE_SPECIFICATION', v));
  198 + }
  199 + }
  200 + return res.join('/');
  201 + },
  202 + },
  203 + onLoad(option) {
  204 + if (option.code) {
  205 + uni.setNavigationBarTitle({ title: '修改货源' });
  206 + }
  207 + },
  208 + methods: {
  209 + initData(code) {
  210 + uni.$u.api.freightOrder.getDetail({ code }).then(res => {
  211 + let detail = res.result || {};
  212 + ['goodsName', 'waypoints', 'allowDriverSeeFreightAmountNode', 'projectCode', 'projectName', 'remark', 'goodsPiece', 'goodsWeight', 'goodsVolume'].forEach(key => {
  213 + this.form[key] = detail[key];
  214 + });
  215 + if (detail.vehicleLicenseNum) {
  216 + this.typeCar = 'licenseNumber';
  217 + this.form.licenseNumber = detail.vehicleLicenseNum;
  218 + this.vehicleChange(detail.vehicleLicenseNum);
  219 + }
  220 + if (detail.trailerLicenseNum) {
  221 + setTimeout(() => {
  222 + this.typeCar = 'trailerNumber';
  223 + this.form.trailerNumber = detail.trailerLicenseNum;
  224 + this.vehicleChange(detail.trailerLicenseNum);
  225 + }, 500);
  226 + }
  227 + this.form.mobile = detail.driverMobile;
  228 + this.form.driverId = detail.driverId;
  229 + this.form.driverName = detail.driverName;
  230 + this.form.driverMobile = detail.driverMobile;
  231 + this.payeeModel = {
  232 + driverId: detail.payeeId,
  233 + dueBank: detail.dueBank,
  234 + openingBank: detail.openingBank,
  235 + dueBankCardNo: detail.dueBankCardNo,
  236 + };
  237 + this.$refs.payee.setItem(this.payeeModel);
  238 + this.computedDistance();
  239 + });
  240 + },
  241 + selectRemark() {
  242 + uni.$once('select-remark', remark => {
  243 + this.form.remark = remark || '';
  244 + });
  245 + uni.navigateTo({
  246 + url: `/pages/order/select-remark`,
  247 + });
  248 + },
  249 + choseProjectCode() {
  250 + uni.$once('select-common', option => {
  251 + this.form.projectCode = option.code;
  252 + this.form.projectName = option.name;
  253 + });
  254 + uni.navigateTo({
  255 + url: `/pages/global/search-common${urlParam({
  256 + mode: 'select',
  257 + url: 'projectCode',
  258 + title: '项目',
  259 + label: 'name',
  260 + value: '',
  261 + params: '{"status":"ENABLE"}',
  262 + })}`,
  263 + });
  264 + },
  265 + // 选择箱型
  266 + choseVanType(code) {
  267 + if (this.choseVanTypeList.includes(code)) {
  268 + this.choseVanTypeList = this.choseVanTypeList.filter(i => i !== code);
  269 + } else {
  270 + if (code === 'ALL') {
  271 + this.choseVanTypeList = [code];
  272 + } else {
  273 + this.choseVanTypeList = this.choseVanTypeList.filter(i => i !== 'ALL');
  274 + this.choseVanTypeList.push(code);
  275 + }
  276 + }
  277 + this.form.vanType = this.choseVanTypeList.join('/');
  278 + },
  279 + // 选择车型
  280 + choseSpecification(code) {
  281 + if (this.choseSpecificationList.includes(code)) {
  282 + this.choseSpecificationList = this.choseSpecificationList.filter(i => i !== code);
  283 + } else {
  284 + if (code === 'ALL') {
  285 + this.choseSpecificationList = [code];
  286 + } else {
  287 + this.choseSpecificationList = this.choseSpecificationList.filter(i => i !== 'ALL');
  288 + this.choseSpecificationList.push(code);
  289 + }
  290 + }
  291 + this.form.specification = this.choseSpecificationList.join('/');
  292 + },
  293 + choseGoodsName() {
  294 + uni.$once('select-common', option => {
  295 + this.form.goodsName = option.name;
  296 + });
  297 + uni.navigateTo({
  298 + url: `/pages/global/search-common${urlParam({
  299 + mode: 'select',
  300 + url: 'goodsName',
  301 + title: '货物名称',
  302 + label: 'name',
  303 + value: '',
  304 + })}`,
  305 + });
  306 + },
  307 + selectAddress(index) {
  308 + uni.$once('select-detail', location => {
  309 + let station = {
  310 + lng: location.lng,
  311 + lat: location.lat,
  312 + provinceCode: location.provinceCode,
  313 + provinceName: location.provinceName,
  314 + cityCode: location.cityCode,
  315 + cityName: location.cityName,
  316 + areaCode: location.areaCode,
  317 + areaName: location.areaName,
  318 + address: (location.provinceName || '') + (location.cityName || '') + (location.areaName || '') + (location.address || ''),
  319 + };
  320 + let waypoints = index === 0 ? [station, this.form.waypoints[1]] : [this.form.waypoints[0], station];
  321 + this.form = {
  322 + ...this.form,
  323 + waypoints,
  324 + };
  325 + this.computedDistance();
  326 + });
  327 + let type = index === 0 ? 'getStartLatestAddress' : 'getEndLatestAddress';
  328 + let lat = this.form.waypoints[index].lat ? Number(this.form.waypoints[index].lat) : '';
  329 + let lng = this.form.waypoints[index].lng ? Number(this.form.waypoints[index].lng) : '';
  330 + uni.navigateTo({ url: `/pages/global/search-address?type=${type}&lng=${lng}&lat=${lat}` });
  331 + },
  332 +
  333 + loadTimeFormat1({ value }) {
  334 + this.form.loadTime = dayjs(value).format('YYYY-MM-DD HH:mm:ss');
  335 + this.showLoadTime1 = false;
  336 + },
  337 + loadTimeFormat2({ value }) {
  338 + this.form.loadTime = dayjs(value).format('YYYY-MM-DD HH:mm:ss');
  339 + this.showLoadTime2 = false;
  340 + },
  341 + choseGoodsType() {
  342 + uni.$once('select-dict', option => {
  343 + this.searchForm.goodsType = option.valueCode;
  344 + this.searchForm.goodsTypeName = option.valueName;
  345 + });
  346 + uni.navigateTo({
  347 + url: `/pages/global/search-dict${urlParam({
  348 + title: '货物类型',
  349 + dict: 'ONLINE_FREIGHT_ORDER_PAY_STATUS',
  350 + })}`,
  351 + });
  352 + },
  353 + chosePriceType() {
  354 + uni.$once('select-dict', option => {
  355 + this.searchForm.goodsType = option.valueCode;
  356 + this.searchForm.goodsTypeName = option.valueName;
  357 + });
  358 + uni.navigateTo({
  359 + url: `/pages/global/search-dict${urlParam({
  360 + title: '计价方式',
  361 + dict: 'ONLINE_FREIGHT_ORDER_PAY_STATUS',
  362 + })}`,
  363 + });
  364 + },
  365 + submitAddFun() {
  366 + if (this.loading) return;
  367 + this.loading = true;
  368 + let totalAmount = Number(this.form.paidAmount || 0) + Number(this.form.serviceAmount || 0) + Number(this.form.securityServiceAmount || 0);
  369 + uni.$u.api.freightOrder
  370 + .add({ ...this.form, totalAmount, payeeId: this.payeeModel.driverId })
  371 + .then(res => {
  372 + if (res.success) {
  373 + this.form = {};
  374 + uni.showToast({ title: '下单成功', icon: 'none' });
  375 + this.getOpenerEventChannel().emit('refreshData');
  376 + setTimeout(() => uni.navigateBack(), 500);
  377 + }
  378 + this.loading = false;
  379 + })
  380 + .catch(e => {
  381 + this.loading = false;
  382 + this.$refs.uToast.show({
  383 + type: 'default',
  384 + message: e,
  385 + });
  386 + });
  387 + },
  388 + },
  389 +};
  390 +</script>
  391 +<style lang="scss">
  392 +.page-good-source-add {
  393 + &__footer {
  394 + background: $color-white;
  395 + }
  396 + .card {
  397 + color: #999999;
  398 + margin-bottom: $padding-md;
  399 + background-color: $color-white;
  400 + border-radius: $radius-md;
  401 + box-shadow: $shadow-normal;
  402 + .u-form-item {
  403 + padding-left: $padding-md !important;
  404 + padding-right: $padding-sm !important;
  405 + }
  406 + .u-form-item + .u-form-item {
  407 + border-top: 1px solid #f6f6f6;
  408 + }
  409 + .more-action {
  410 + display: flex;
  411 + padding: $padding-sm;
  412 + justify-content: center;
  413 + align-content: center;
  414 + align-items: center;
  415 + .sx-img {
  416 + height: 12upx;
  417 + width: 14upx;
  418 + position: relative;
  419 + margin-left: 12upx;
  420 +
  421 + .sx-image {
  422 + width: 100%;
  423 + height: 100%;
  424 + position: absolute;
  425 + top: 0;
  426 + left: 0;
  427 + }
  428 + .up {
  429 + transform: rotate(180deg);
  430 + }
  431 + }
  432 + }
  433 + }
  434 + .popup-more {
  435 + background: #fff;
  436 + border-radius: 20rpx;
  437 + .pm-title {
  438 + display: flex;
  439 + justify-content: center;
  440 + color: #999999;
  441 + font-size: 32rpx;
  442 + padding: 32rpx 0;
  443 + }
  444 + .pm-list {
  445 + display: grid;
  446 + grid-template-columns: 1fr 1fr 1fr;
  447 + grid-gap: 10px;
  448 + padding-bottom: 70rpx;
  449 + .pm-btn {
  450 + padding: 20rpx;
  451 + display: flex;
  452 + flex-direction: column;
  453 + align-items: center;
  454 + color: #2b2a27;
  455 + font-size: 30rpx;
  456 + font-weight: 700;
  457 + .action {
  458 + color: #2673fb;
  459 + }
  460 + }
  461 + }
  462 + }
  463 +}
  464 +</style>
pages/goodSource/card.vue 0 → 100644
@@ -0,0 +1,358 @@ @@ -0,0 +1,358 @@
  1 +<template>
  2 + <view class="card" @click="toDetail">
  3 + <view class="card-header">
  4 + <view class="title">
  5 + <view class="order-no">
  6 + <field-copy :value="item.code" v-if="item.code">{{ item.code }} </field-copy>
  7 + <view class="image" @click.stop="qrShow">
  8 + <image style="height: 30upx; width: 30upx" src="/static/qr.png"></image>
  9 + </view>
  10 + </view>
  11 + <view style="display: flex; align-items: center">
  12 + <render-dict v-if="item.status" class="status" :style="{ color: colorMap[item.status] }" dict="FREIGHT_ORDER_STATUS" :value="item.status"></render-dict>
  13 + <u-icon name="arrow-right" size="14"></u-icon>
  14 + </view>
  15 + </view>
  16 + </view>
  17 + <view class="card-content">
  18 + <view class="cc-info">
  19 + <view class="info-v">
  20 + <view class="v-t">
  21 + <view class="v-t-img">
  22 + <image src="@/static/svgs/user.svg" />
  23 + </view>
  24 + <text>{{ item.customerName }}</text>
  25 + </view>
  26 + <view class="v-t">
  27 + <text style="white-space: nowrap; overflow: hidden; color: #999; max-width: 50vw; text-overflow: ellipsis">
  28 + {{ item.lineName }}
  29 + </text>
  30 + </view>
  31 + </view>
  32 + <view class="info-line">
  33 + <view class="address">
  34 + <view class="text">{{ item.startProvinceShortName || '' }}-{{ item.startCityShortName || '' }}</view>
  35 + </view>
  36 + <view class="way">
  37 + <view class="w-text">{{ item.distance || 0 }}km</view>
  38 + <view class="img">
  39 + <image src="@/static/xl.png" />
  40 + </view>
  41 + </view>
  42 + <view class="address">
  43 + <view class="text">{{ item.endProvinceShortName || '' }}-{{ item.endCityShortName || '' }}</view>
  44 + </view>
  45 + </view>
  46 + <view class="info-task">
  47 + <view class="task">
  48 + <text v-if="item.startTime">{{ item.startTime.slice(0, -3) }} 开始</text>
  49 + </view>
  50 + <view class="task">
  51 + <text v-if="item.endTime">{{ item.endTime.slice(0, -3) }} 结束</text>
  52 + </view>
  53 + </view>
  54 + <view v-if="!onlyShow" class="info-operate">
  55 + <view class="task">
  56 + <text>
  57 + 已抢单<text class="color-blue">{{ item.assignVehicleNumber }}</text> /待确认<text class="color-red">{{ item.waitConfirmNumber }}</text> /待指派<text class="color-red">{{
  58 + item.waitAssignNumber
  59 + }}</text>
  60 + </text>
  61 + </view>
  62 + <view class="task-2"> 剩余{{ item.remainTonnage }}吨 </view>
  63 + </view>
  64 + </view>
  65 + <view v-if="!onlyShow" class="cc-operate">
  66 + <view class="price-box">
  67 + <text class="com-price">{{ item.unitPrice || 200 }}</text
  68 + ><text>元/吨</text>
  69 + </view>
  70 + <view class="but-box">
  71 + <zb-tooltip placement="bottom" :visible="visible" @update:visible="e => (visible = e)">
  72 + <template #content>
  73 + <view class="more-action">
  74 + <view @click="modifyGoodSource"> 修改货源 </view>
  75 + <view @click="cancelGoodSource"> 取消货源 </view>
  76 + <view @click="endGoodSource"> 结束找车 </view>
  77 + <view @click="deleteGoodSource"> 删除货源 </view>
  78 + </view>
  79 + </template>
  80 + <view class="button">
  81 + 更多操作
  82 + <view class="sx-img">
  83 + <image class="sx-image" :src="formatImagePath('down')"></image>
  84 + </view>
  85 + </view>
  86 + </zb-tooltip>
  87 + <view class="button primary" @click.stop="toGrabPage">抢单管理</view>
  88 + </view>
  89 + </view>
  90 + </view>
  91 + </view>
  92 +</template>
  93 +<script>
  94 +import FieldCopy from '@/components/field/field-copy.vue';
  95 +import ZbTooltip from '../../uni_modules/zb-tooltip/components/zb-tooltip/zb-tooltip.vue';
  96 +import page from '@/mixins/page';
  97 +export default {
  98 + name: 'bulk-order-card',
  99 + mixins: [page],
  100 + components: { ZbTooltip, FieldCopy },
  101 + props: {
  102 + onlyShow: Boolean,
  103 + item: {
  104 + type: Object,
  105 + default() {
  106 + return {};
  107 + },
  108 + },
  109 + },
  110 + data() {
  111 + return {
  112 + quoteMap: {
  113 + FINDING: '#2673fb',
  114 + ENDED: '#2b2a27',
  115 + CANCEL: '#999999',
  116 + },
  117 + };
  118 + },
  119 + methods: {
  120 + qrShow() {
  121 + this.$emit('qrShow', this.item.code, this.item);
  122 + },
  123 + // 详情
  124 + toDetail() {
  125 + if (this.onlyShow) return;
  126 + uni.navigateTo({ url: `/pages/bulkOrder/bulk-order-detail?code=${this.item.code}` });
  127 + },
  128 + // 抢单记录
  129 + toGrabPage() {
  130 + uni.navigateTo({ url: `/pages/bulkOrder/bulk-order-grab-record?orderCode=${this.item.code}` });
  131 + },
  132 + modifyGoodSource() {
  133 + this.visible = false;
  134 + this.$emit('modify', this.item.code);
  135 + },
  136 + cancelGoodSource() {
  137 + this.visible = false;
  138 + this.$emit('cancel', this.item.code);
  139 + },
  140 + endGoodSource() {
  141 + this.visible = false;
  142 + this.$emit('end', this.item.code);
  143 + },
  144 + deleteGoodSource() {
  145 + this.visible = false;
  146 + this.$emit('delete', this.item.code);
  147 + },
  148 + },
  149 +};
  150 +</script>
  151 +
  152 +<style scoped lang="scss">
  153 +.card {
  154 + background-color: $color-white;
  155 + color: $color-text;
  156 + padding: $padding-sm;
  157 + margin-bottom: $padding-sm;
  158 + border-radius: $radius-md;
  159 + box-shadow: $shadow-normal;
  160 + font-size: $font-md;
  161 + .card-header {
  162 + display: flex;
  163 + align-items: center;
  164 + border-bottom: 1px solid $color-border;
  165 + padding-bottom: $padding-sm;
  166 + margin-bottom: $padding-sm;
  167 + .title {
  168 + width: 100%;
  169 + display: flex;
  170 + flex-direction: row;
  171 + align-items: center;
  172 + justify-content: space-between;
  173 + .order-no {
  174 + display: flex;
  175 + align-items: center;
  176 + .image {
  177 + width: 30upx;
  178 + height: 30upx;
  179 + margin-left: 20upx;
  180 + }
  181 + }
  182 + .status {
  183 + color: $color-primary;
  184 + font-weight: bold;
  185 + }
  186 + }
  187 + }
  188 + .card-content {
  189 + padding: 0;
  190 + .cc-info {
  191 + padding: 0 16rpx;
  192 + .info-v {
  193 + display: flex;
  194 + justify-content: space-between;
  195 + margin-bottom: 20rpx;
  196 + margin-top: 20rpx;
  197 + .v-t {
  198 + color: #575c69;
  199 + font-size: 26rpx;
  200 + display: flex;
  201 + overflow: hidden;
  202 + .v-t-img {
  203 + width: 27rpx;
  204 + height: 26rpx;
  205 + margin-right: 10rpx;
  206 + image {
  207 + width: 100%;
  208 + height: 100%;
  209 + }
  210 + }
  211 + text {
  212 + text-overflow: ellipsis;
  213 + overflow: hidden;
  214 + white-space: nowrap;
  215 + }
  216 + }
  217 + }
  218 + .info-line {
  219 + display: flex;
  220 + justify-content: space-between;
  221 + .address {
  222 + display: flex;
  223 + flex-direction: column;
  224 + align-items: flex-end;
  225 + .text {
  226 + font-size: 30rpx;
  227 + color: #2b2a27;
  228 + font-weight: 600;
  229 + margin-bottom: 10rpx;
  230 + }
  231 + .time {
  232 + font-size: 22rpx;
  233 + color: #575c69;
  234 + }
  235 + }
  236 + .address:nth-child(1) {
  237 + align-items: flex-start;
  238 + }
  239 + .way {
  240 + width: 122rpx;
  241 + margin-top: -10rpx;
  242 + .img {
  243 + width: 122rpx;
  244 + height: 15rpx;
  245 + margin-top: -20rpx;
  246 + image {
  247 + width: 100%;
  248 + height: 100%;
  249 + }
  250 + }
  251 + .w-text {
  252 + color: #575c69;
  253 + font-size: 24rpx;
  254 + text-align: center;
  255 + margin-right: 5rpx;
  256 + }
  257 + .w-point {
  258 + color: #2673fb;
  259 + font-size: 22rpx;
  260 + margin-top: 22rpx;
  261 + margin-left: 2rpx;
  262 + text-align: center;
  263 + }
  264 + .wp-none {
  265 + color: #575c69;
  266 + }
  267 + }
  268 + }
  269 + .info-task {
  270 + display: flex;
  271 + justify-content: space-between;
  272 + font-size: 26rpx;
  273 + color: #2b2a27;
  274 + margin-top: 10rpx;
  275 + }
  276 + .info-operate {
  277 + display: flex;
  278 + justify-content: space-between;
  279 + font-size: 26rpx;
  280 + margin-top: 20rpx;
  281 + color: #999999;
  282 + .task {
  283 + flex: 2;
  284 + text {
  285 + margin-right: 5rpx;
  286 + }
  287 + }
  288 + .task-2 {
  289 + flex: 1;
  290 + text-align: right;
  291 + color: $color-red;
  292 + }
  293 + }
  294 + }
  295 + .cc-operate {
  296 + padding: 0 16rpx;
  297 + margin-top: 26rpx;
  298 + display: flex;
  299 + justify-content: space-between;
  300 + .price-box {
  301 + flex: 1;
  302 + display: flex;
  303 + align-items: baseline;
  304 + .com-price {
  305 + font-size: 50rpx;
  306 + font-weight: 500;
  307 + color: red;
  308 + }
  309 + }
  310 + .but-box {
  311 + flex: 2;
  312 + display: flex;
  313 + justify-content: flex-end;
  314 + .more-action {
  315 + text-align: center;
  316 + color: #666666;
  317 + box-shadow: 0px 2px 8px 2px rgba(0, 0, 0, 0.22);
  318 + view {
  319 + padding: $padding-sm;
  320 + }
  321 + view + view {
  322 + border-top: 1px solid #eaeaea;
  323 + }
  324 + }
  325 + .button {
  326 + width: 164rpx;
  327 + height: 56rpx;
  328 + background: #ffffff;
  329 + border-radius: 12rpx;
  330 + border: 2rpx solid #e2e2e3;
  331 + display: flex;
  332 + align-items: center;
  333 + justify-content: center;
  334 + margin-left: $padding-base;
  335 + .sx-img {
  336 + height: 12upx;
  337 + width: 14upx;
  338 + position: relative;
  339 + margin-left: 12upx;
  340 + .sx-image {
  341 + width: 100%;
  342 + height: 100%;
  343 + position: absolute;
  344 + top: 0;
  345 + left: 0;
  346 + }
  347 + }
  348 + }
  349 + .primary {
  350 + border: 2rpx solid $color-primary !important;
  351 + background: $color-primary;
  352 + color: #ffffff;
  353 + }
  354 + }
  355 + }
  356 + }
  357 +}
  358 +</style>
pages/goodSource/index.vue 0 → 100644
@@ -0,0 +1,451 @@ @@ -0,0 +1,451 @@
  1 +<template>
  2 + <Page name="good-source" flank>
  3 + <template #header>
  4 + <u-tabs :current="activeTab" :list="tabList" @click="onTabChange" :scrollable="true" :disabled="loading" :activeStyle="{ color: '#1E7B6B' }"> </u-tabs>
  5 + <view class="line"></view>
  6 + <view class="quick-tag">
  7 + <view class="quick-tag-group">
  8 + <view class="quick-tag-item" :class="searchForm.projectCode ? 'active' : ''" @click="selectQuickTag({ key: 'projectCode', value: searchForm.projectCode })">
  9 + <text>{{ searchForm.projectName || '所属项目' }}</text>
  10 + <view class="sx-img">
  11 + <image v-if="searchForm.projectCode" class="sx-image" :src="formatImagePath('active-down')"></image>
  12 + <image v-else class="sx-image" :src="formatImagePath('down')"></image>
  13 + </view>
  14 + </view>
  15 + <view class="quick-tag-item" :class="searchForm.startCityCode ? 'active' : ''" @click="selectQuickTag({ key: 'startCityCode', value: searchForm.startCityCode })">
  16 + <text>{{ searchForm.startCityName || '始发地' }}</text>
  17 + <view class="sx-img">
  18 + <image v-if="searchForm.startCityCode" class="sx-image" :src="formatImagePath('active-down')"></image>
  19 + <image v-else class="sx-image" :src="formatImagePath('down')"></image>
  20 + </view>
  21 + </view>
  22 + <view class="quick-tag-item" :class="searchForm.endCityCode ? 'active' : ''" @click="selectQuickTag({ key: 'endCityCode', value: searchForm.endCityCode })">
  23 + <text>{{ searchForm.endCityName || '目的地' }}</text>
  24 + <view class="sx-img">
  25 + <image v-if="searchForm.endCityCode" class="sx-image" :src="formatImagePath('active-down')"></image>
  26 + <image v-else class="sx-image" :src="formatImagePath('down')"></image>
  27 + </view>
  28 + </view>
  29 + </view>
  30 + <view class="quick-screen" @click="openFilter">
  31 + <image class="search-image" :src="formatImagePath('search')"></image>
  32 + </view>
  33 + </view>
  34 + </template>
  35 + <template #content>
  36 + <List ref="list" v-model="list" :api="orderAPI" @update:loading="e => (loading = e)" :verify="true">
  37 + <template v-for="(item, index) in list">
  38 + <card @modify="more" @cancel="cancelOrder" @end="deleteOrder" @delete="deleteOrder" @qrShow="qrCodeShow" :key="index" :item="item" @tap="toDetail(item.code)"></card>
  39 + </template>
  40 + <template #empty>
  41 + <Empty tips="暂无数据" />
  42 + </template>
  43 + </List>
  44 + <view class="add-order" @tap="toAddPage('')">
  45 + <zui-icon name="add" color="#fff" size="30px"></zui-icon>
  46 + <!-- <image class="sx-image" src="/static/addOrder.png"></image>-->
  47 + </view>
  48 + </template>
  49 + <u-popup :show="popShow" @close="closePop" closeable>
  50 + <view class="popup">
  51 + <view class="title">{{ popConfig[popType].title }}</view>
  52 + <u--textarea v-model="popValue" :placeholder="popConfig[popType].placeholder" placeholderStyle="background:#f6f6f6" :cursorSpacing="60"></u--textarea>
  53 + <view class="but">
  54 + <u-button type="primary" @tap="popSubmit">确定</u-button>
  55 + </view>
  56 + </view>
  57 + </u-popup>
  58 + <u-popup :show="qrShow" @close="qrShow = false" mode="center" closeable>
  59 + <l-painter ref="painter" :board="poster"></l-painter>
  60 + <view style="margin-top: 30upx">
  61 + <u-button type="primary" @click="saveQrImage">保存</u-button>
  62 + </view>
  63 + </u-popup>
  64 + </Page>
  65 +</template>
  66 +<script>
  67 +import { urlParam } from '@/utils/param';
  68 +import card from './card.vue';
  69 +import page from '../../mixins/page';
  70 +import qrPainter from './qr-painter';
  71 +export default {
  72 + name: 'goodSource',
  73 + mixins: [page, qrPainter],
  74 + components: { card },
  75 + data() {
  76 + return {
  77 + poster: {},
  78 + qrShow: false,
  79 + popType: 'cancel',
  80 + popValue: '',
  81 + popConfig: {
  82 + cancel: { fun: '', title: '取消原因', placeholder: '请输入取消原因,必填' },
  83 + delete: { fun: '', title: '删除原因', placeholder: '请输入删除原因,必填' },
  84 + },
  85 + loading: false,
  86 + popShow: false,
  87 + currentCode: '',
  88 + searchForm: {
  89 + projectCode: '',
  90 + projectName: '',
  91 + code: '', //
  92 + driverName: '',
  93 + driverMobile: '', // 客户
  94 + vehicleLicenseNum: '',
  95 + unHandledExceptionFlag: '', // 存在异常
  96 + startCityCode: '',
  97 + endCityCode: '',
  98 + status: '',
  99 + receiptFlag: '', // 是否已签单
  100 + payStatus: '', // 支付状态
  101 + payStatusName: '', //
  102 + },
  103 + activeTab: 0,
  104 + count: {},
  105 + list: [],
  106 + };
  107 + },
  108 + onPullDownRefresh() {
  109 + this.onSearch();
  110 + },
  111 + computed: {
  112 + tabList() {
  113 + let list = [
  114 + { name: '找车中', value: 'TRANSFER', key: 'transfer' },
  115 + { name: '已结束', value: 'COMPLETED', key: 'completed' },
  116 + { name: '已取消', value: 'CANCEL', key: 'cancel' },
  117 + ];
  118 + return Object.keys(this.count).length > 0
  119 + ? list.map(item => {
  120 + return { ...item, name: `${item.name}(${this.count[item.key] || 0})`, disabled: this.loading };
  121 + })
  122 + : list;
  123 + },
  124 + },
  125 + methods: {
  126 + onTabChange({ index }) {
  127 + if (this.loading) {
  128 + return;
  129 + }
  130 + this.activeTab = index;
  131 + this.list = [];
  132 + this.onSearch();
  133 + },
  134 + selectQuickTag({ key, value }) {
  135 + this.searchForm = Object.assign(this.searchForm, { [key]: value });
  136 + if (key == 'startCityCode') {
  137 + uni.$once('select-city', option => {
  138 + this.searchForm.startCityCode = option.code;
  139 + this.searchForm.startCityName = option.shortName;
  140 + this.onSearch();
  141 + });
  142 + uni.navigateTo({ url: '/pages/global/search-city' });
  143 + } else if (key == 'endCityCode') {
  144 + uni.$once('select-city', option => {
  145 + this.searchForm.endCityCode = option.code;
  146 + this.searchForm.endCityName = option.shortName;
  147 + this.onSearch();
  148 + });
  149 + uni.navigateTo({ url: '/pages/global/search-city' });
  150 + } else if (key == 'projectCode') {
  151 + uni.$once('select-common', option => {
  152 + this.searchForm.projectCode = option.code;
  153 + this.searchForm.projectName = option.name;
  154 + this.onSearch();
  155 + });
  156 + uni.navigateTo({
  157 + url: `/pages/global/search-common${urlParam({
  158 + mode: 'select',
  159 + url: 'projectCode',
  160 + title: '项目',
  161 + label: 'name',
  162 + value: '',
  163 + })}`,
  164 + });
  165 + }
  166 + },
  167 + // 再来一单
  168 + more(code) {
  169 + this.currentCode = code;
  170 + this.toAddPage('?code=' + code);
  171 + },
  172 + // 取消订单
  173 + cancelOrder(code) {
  174 + this.currentCode = code;
  175 + this.popType = 'cancel';
  176 + this.popValue = '';
  177 + this.popShow = true;
  178 + uni.hideTabBar();
  179 + },
  180 + closePop() {
  181 + setTimeout(() => uni.showTabBar(), 300);
  182 + this.popShow = false;
  183 + },
  184 + popSubmit() {
  185 + if (!this.popValue) {
  186 + uni.showToast({ title: '请输入原因', icon: 'none' });
  187 + return;
  188 + }
  189 + uni.$u.api.freightOrder[this.popType]({
  190 + codeList: [this.currentCode],
  191 + reason: this.popValue,
  192 + }).then(res => {
  193 + if (res.success) {
  194 + this.closePop();
  195 + this.onSearch();
  196 + }
  197 + });
  198 + },
  199 + // 删除订单
  200 + deleteOrder(code) {
  201 + this.currentCode = code;
  202 + this.popType = 'delete';
  203 + this.popValue = '';
  204 + this.popShow = true;
  205 + uni.hideTabBar();
  206 + },
  207 + toUploadReceipt(code) {
  208 + uni.navigateTo({
  209 + url: '/pages/order/upload-receipt?code=' + code,
  210 + events: {
  211 + refreshData: () => {
  212 + this.onSearch();
  213 + },
  214 + },
  215 + });
  216 + },
  217 + toAddPage(param) {
  218 + uni.navigateTo({
  219 + url: '/pages/goodSource/add' + param,
  220 + events: {
  221 + refreshData: option => {
  222 + this.onSearch();
  223 + },
  224 + },
  225 + });
  226 + },
  227 + // 筛选
  228 + openFilter() {
  229 + uni.navigateTo({
  230 + url: `/pages/order/filter${urlParam(this.searchForm)}`,
  231 + events: {
  232 + refreshData: option => {
  233 + this.searchForm = { ...this.searchForm, ...option };
  234 + this.onSearch();
  235 + },
  236 + },
  237 + });
  238 + },
  239 + orderAPI(params) {
  240 + let format = {
  241 + ...this.searchForm,
  242 + status: this.tabList[this.activeTab].value,
  243 + };
  244 + this.getAggregateType(format);
  245 + return uni.$u.api.freightOrder.page({
  246 + ...format,
  247 + ...params,
  248 + });
  249 + },
  250 + // 获取聚合数量
  251 + getAggregateType(params) {
  252 + uni.$u.api.freightOrder.count({ ...params, status: '' }).then(res => {
  253 + this.count = res?.result || {};
  254 + });
  255 + },
  256 + toDetail(code) {
  257 + uni.navigateTo({ url: '/pages/order/detail?code=' + code });
  258 + },
  259 + toStartCar(code) {
  260 + uni.navigateTo({
  261 + url: '/pages/order/start-car?code=' + code,
  262 + events: {
  263 + refreshData: () => {
  264 + this.onSearch();
  265 + },
  266 + },
  267 + });
  268 + },
  269 + toArrivalCar(code) {
  270 + uni.navigateTo({
  271 + url: '/pages/order/arrival-car?code=' + code,
  272 + events: {
  273 + refreshData: () => {
  274 + this.onSearch();
  275 + },
  276 + },
  277 + });
  278 + },
  279 + qrCodeShow(code, data) {
  280 + if (this.loading) return;
  281 + this.loading = true;
  282 + this.qrShow = true;
  283 + uni.$u.api.freightOrder
  284 + .getSensitiveByOrderCode({ orderCode: code })
  285 + .then(res => {
  286 + if (res.success) {
  287 + uni.$u.api.freightOrder
  288 + .buildMaQrcode({ orderCode: code })
  289 + .then(res2 => {
  290 + this.loading = false;
  291 + if (res2.success) {
  292 + this.poster = this.getPoster(res.result, data, res2.result);
  293 + console.info(this.poster);
  294 + }
  295 + })
  296 + .catch(e => {
  297 + this.loading = false;
  298 + });
  299 + }
  300 + })
  301 + .catch(e => {
  302 + this.loading = false;
  303 + });
  304 + },
  305 + },
  306 +};
  307 +</script>
  308 +<style lang="scss">
  309 +.page-good-source {
  310 + &__content {
  311 + padding-bottom: 100px !important;
  312 + }
  313 + &__header {
  314 + padding: 0 !important;
  315 +
  316 + .line {
  317 + height: 1rpx;
  318 + background: #f6f6f6;
  319 + position: relative;
  320 + top: -5rpx;
  321 + }
  322 +
  323 + .quick-tag {
  324 + display: flex;
  325 + padding: 15upx 22upx;
  326 + box-sizing: border-box;
  327 + position: relative;
  328 +
  329 + .quick-cover {
  330 + width: 25upx;
  331 + height: 90upx;
  332 + position: absolute;
  333 + right: 122upx;
  334 + top: 0;
  335 +
  336 + .cover-image {
  337 + width: 100%;
  338 + height: 100%;
  339 + }
  340 + }
  341 +
  342 + .quick-screen {
  343 + width: 100upx;
  344 + display: flex;
  345 + align-items: center;
  346 + justify-content: center;
  347 +
  348 + .search-image {
  349 + width: 42upx;
  350 + height: 42upx;
  351 + }
  352 + }
  353 +
  354 + .quick-tag-group {
  355 + flex: 1;
  356 + display: flex;
  357 + align-items: center;
  358 + background-color: #fff;
  359 + padding-left: $padding-xs !important;
  360 + padding-right: $padding-xs !important;
  361 + overflow-y: auto;
  362 +
  363 + .quick-tag-item {
  364 + flex-shrink: 0;
  365 + min-width: 158upx;
  366 + height: 58upx;
  367 + background: #f6f6f6;
  368 + border-radius: 8upx;
  369 + font-size: 28upx;
  370 + font-weight: 400;
  371 + color: #2b2a27;
  372 + display: flex;
  373 + align-items: center;
  374 + justify-content: center;
  375 + padding: 0 10upx;
  376 + box-sizing: border-box;
  377 +
  378 + &:not(:last-child) {
  379 + margin-right: 18upx;
  380 + }
  381 +
  382 + &.active {
  383 + background: #ffffff;
  384 + border-radius: 8upx;
  385 + border: 2upx solid #2673fb;
  386 + font-size: 28upx;
  387 + font-family:
  388 + PingFangSC,
  389 + PingFang SC;
  390 + font-weight: 400;
  391 + color: #2673fb;
  392 + }
  393 +
  394 + .sx-img {
  395 + height: 12upx;
  396 + width: 14upx;
  397 + position: relative;
  398 + margin-left: 12upx;
  399 +
  400 + .sx-image {
  401 + width: 100%;
  402 + height: 100%;
  403 + position: absolute;
  404 + top: 0;
  405 + left: 0;
  406 + }
  407 + }
  408 + }
  409 +
  410 + .z-dropdown__text .text {
  411 + word-break: keep-all;
  412 + }
  413 + }
  414 + }
  415 + }
  416 + .add-order {
  417 + left: 34upx;
  418 + bottom: 34upx;
  419 + height: 90upx;
  420 + width: 90upx;
  421 + background: $color-primary;
  422 + border-radius: 100upx;
  423 + position: fixed;
  424 + display: flex;
  425 + align-items: center;
  426 + justify-content: center;
  427 + }
  428 + .popup {
  429 + padding-left: $padding-md;
  430 + padding-right: $padding-md;
  431 + border-top-left-radius: $radius-md;
  432 + border-top-right-radius: $radius-md;
  433 + .title {
  434 + padding-top: $padding-xs;
  435 + padding-bottom: $padding-xs;
  436 + display: flex;
  437 + align-content: center;
  438 + justify-content: center;
  439 + font-weight: 400;
  440 + font-size: 32rpx;
  441 + color: #2b2a27;
  442 + line-height: 45px;
  443 + text-align: left;
  444 + font-style: normal;
  445 + }
  446 + .but {
  447 + margin-top: $padding-md;
  448 + }
  449 + }
  450 +}
  451 +</style>
pages/goodSource/qr-painter.js 0 → 100644
@@ -0,0 +1,288 @@ @@ -0,0 +1,288 @@
  1 +import dayjs from 'dayjs';
  2 +export default {
  3 + data() {
  4 + return {
  5 + posterCss: { width: '150rpx', height: '150rpx', padding: '11rpx', backgroundColor: '#FFFFFF', borderRadius: '50%', objectFit: 'cover' }, // 二维码大小样式
  6 + QRcss: { position: 'fixed', left: '52rpx', bottom: '24rpx', display: 'flex' }, // 二维码定位样式
  7 + };
  8 + },
  9 + methods: {
  10 + saveQrImage() {
  11 + this.$refs.painter.canvasToTempFilePathSync({
  12 + fileType: 'jpg',
  13 + // 如果返回的是base64是无法使用 saveImageToPhotosAlbum,需要设置 pathType为url
  14 + pathType: 'url',
  15 + quality: 1,
  16 + success: res => {
  17 + uni.saveImageToPhotosAlbum({
  18 + filePath: res.tempFilePath,
  19 + success: () => {
  20 + this.qrShow = false;
  21 + uni.showToast({ title: '保存成功', icon: 'none' });
  22 + },
  23 + });
  24 + },
  25 + });
  26 + },
  27 + getPoster(item, params, wxcode) {
  28 + let driverInfo = item.driverName ? item.driverName : '';
  29 + driverInfo += item.driverMobile ? item.driverMobile : '';
  30 + let vehicle = item.vehicleLicenseNum;
  31 + if (item.trailerLicenseNum) {
  32 + vehicle += '·' + item.trailerLicenseNum;
  33 + }
  34 + return {
  35 + css: {
  36 + width: '640rpx',
  37 + height: '880rpx',
  38 + backgroundImage: 'url(https://zeyi-tms-product.oss-cn-hangzhou.aliyuncs.com/image/freight/b6988d70-26db-490c-9ddf-e59c554fa2ff.png)',
  39 + objectFit: 'cover',
  40 + },
  41 + views: [
  42 + {
  43 + type: 'view',
  44 + views: [
  45 + {
  46 + type: 'text',
  47 + text: '订 单 号:',
  48 + css: {
  49 + width: '300rpx',
  50 + height: '33rpx',
  51 + fontSize: '24rpx',
  52 + fontSamily: 'PingFangSC-Regular',
  53 + color: '#999999',
  54 + lineHeight: '33rpx',
  55 + display: 'block',
  56 + boxOrient: 'vertical',
  57 + lineClamp: 1 /* 这里是超出几行省略 */,
  58 + position: 'fixed',
  59 + top: '169rpx',
  60 + left: '75rpx',
  61 + },
  62 + },
  63 + {
  64 + type: 'text',
  65 + text: params.code,
  66 + css: {
  67 + width: '400rpx',
  68 + height: '33rpx',
  69 + fontSize: '24rpx',
  70 + fontSamily: 'PingFangSC-Regular',
  71 + color: '#121212',
  72 + lineHeight: '33rpx',
  73 + overflow: 'hidden',
  74 + textOverflow: 'ellipsis',
  75 + display: 'block',
  76 + boxOrient: 'vertical',
  77 + lineClamp: 1 /* 这里是超出几行省略 */,
  78 + position: 'fixed',
  79 + top: '169rpx',
  80 + left: '195rpx',
  81 + },
  82 + },
  83 + {
  84 + type: 'text',
  85 + text: '任务日期:',
  86 + css: {
  87 + width: '400rpx',
  88 + height: '33rpx',
  89 + fontSize: '24rpx',
  90 + fontSamily: 'PingFangSC-Regular',
  91 + color: '#999999',
  92 + lineHeight: '33rpx',
  93 + display: 'block',
  94 + boxOrient: 'vertical',
  95 + lineClamp: 1 /* 这里是超出几行省略 */,
  96 + position: 'fixed',
  97 + top: '204rpx',
  98 + left: '75rpx',
  99 + },
  100 + },
  101 + {
  102 + type: 'text',
  103 + text: dayjs(params.loadTime).format('YYYY-MM-DD'),
  104 + css: {
  105 + width: '400rpx',
  106 + height: '33rpx',
  107 + fontSize: '24rpx',
  108 + fontSamily: 'PingFangSC-Regular',
  109 + color: '#121212',
  110 + lineHeight: '33rpx',
  111 + overflow: 'hidden',
  112 + textOverflow: 'ellipsis',
  113 + display: 'block',
  114 + boxOrient: 'vertical',
  115 + lineClamp: 1 /* 这里是超出几行省略 */,
  116 + position: 'fixed',
  117 + top: '204rpx',
  118 + left: '195rpx',
  119 + },
  120 + },
  121 + {
  122 + type: 'text',
  123 + text: params.startCityName + '-' + params.startAreaName,
  124 + css: {
  125 + width: '400rpx',
  126 + height: '40rpx',
  127 + fontSize: '36rpx',
  128 + fontSamily: 'PingFangSC-Semibold, PingFang SC',
  129 + fontWeight: '600',
  130 + color: '#051B33',
  131 + lineHeight: '40rpx',
  132 + overflow: 'hidden',
  133 + textOverflow: 'ellipsis',
  134 + display: 'block',
  135 + boxOrient: 'vertical',
  136 + lineClamp: 1 /* 这里是超出几行省略 */,
  137 + position: 'fixed',
  138 + top: '270rpx',
  139 + left: '129rpx',
  140 + },
  141 + },
  142 + {
  143 + type: 'text',
  144 + text: params.endCityName + '-' + params.endAreaName,
  145 + css: {
  146 + width: '400rpx',
  147 + height: '40rpx',
  148 + fontSize: '36rpx',
  149 + fontSamily: 'PingFangSC-Semibold, PingFang SC',
  150 + fontWeight: '600',
  151 + color: '#051B33',
  152 + lineHeight: '40rpx',
  153 + overflow: 'hidden',
  154 + textOverflow: 'ellipsis',
  155 + display: 'block',
  156 + boxOrient: 'vertical',
  157 + lineClamp: 1 /* 这里是超出几行省略 */,
  158 + position: 'fixed',
  159 + top: '405rpx',
  160 + left: '129rpx',
  161 + },
  162 + },
  163 + {
  164 + type: 'text',
  165 + text: '总里程:' + item.distance + 'KM',
  166 + css: {
  167 + width: '400rpx',
  168 + height: '33rpx',
  169 + fontSize: '24rpx',
  170 + fontWeight: '400',
  171 + fontSamily: 'PingFangSC-Medium, PingFang SC',
  172 + color: '#999999',
  173 + lineHeight: '33rpx',
  174 + position: 'fixed',
  175 + top: '345rpx',
  176 + left: '129rpx',
  177 + },
  178 + },
  179 + {
  180 + type: 'text',
  181 + text: '订单备注:',
  182 + css: {
  183 + width: '400rpx',
  184 + height: '33rpx',
  185 + fontSize: '24rpx',
  186 + fontSamily: 'PingFangSC-Regular',
  187 + color: '#999999',
  188 + lineHeight: '33rpx',
  189 + display: 'block',
  190 + boxOrient: 'vertical',
  191 + lineClamp: 1 /* 这里是超出几行省略 */,
  192 + position: 'fixed',
  193 + top: '477rpx',
  194 + left: '75rpx',
  195 + },
  196 + },
  197 + {
  198 + type: 'text',
  199 + text: params.remark,
  200 + css: {
  201 + width: '350rpx',
  202 + height: '33rpx',
  203 + fontSize: '24rpx',
  204 + fontSamily: 'PingFangSC-Regular',
  205 + color: '#121212',
  206 + lineHeight: '33rpx',
  207 + overflow: 'hidden',
  208 + textOverflow: 'ellipsis',
  209 + display: 'block',
  210 + boxOrient: 'vertical',
  211 + lineClamp: 1 /* 这里是超出几行省略 */,
  212 + position: 'fixed',
  213 + top: '477rpx',
  214 + left: '195rpx',
  215 + },
  216 + },
  217 + {
  218 + type: 'text',
  219 + text: '司 机:',
  220 + css: {
  221 + width: '400rpx',
  222 + height: '33rpx',
  223 + fontSize: '26rpx',
  224 + fontSamily: 'PingFangSC-Regular',
  225 + color: '#FFFFFF',
  226 + lineHeight: '33rpx',
  227 + display: 'block',
  228 + boxOrient: 'vertical',
  229 + lineClamp: 1 /* 这里是超出几行省略 */,
  230 + position: 'fixed',
  231 + top: '564rpx',
  232 + left: '75rpx',
  233 + },
  234 + },
  235 + {
  236 + type: 'text',
  237 + text: driverInfo,
  238 + css: {
  239 + width: '400rpx',
  240 + height: '33rpx',
  241 + fontSize: '26rpx',
  242 + fontSamily: 'PingFangSC-Regular',
  243 + color: '#FFFFFF',
  244 + lineHeight: '33rpx',
  245 + display: 'block',
  246 + boxOrient: 'vertical',
  247 + lineClamp: 1 /* 这里是超出几行省略 */,
  248 + position: 'fixed',
  249 + top: '564rpx',
  250 + left: '180rpx',
  251 + },
  252 + },
  253 + {
  254 + type: 'text',
  255 + text: '车牌号:' + vehicle,
  256 + css: {
  257 + width: '400rpx',
  258 + height: '33rpx',
  259 + fontSize: '26rpx',
  260 + fontSamily: 'PingFangSC-Regular',
  261 + color: '#FFFFFF',
  262 + lineHeight: '33rpx',
  263 + display: 'block',
  264 + boxOrient: 'vertical',
  265 + lineClamp: 1 /* 这里是超出几行省略 */,
  266 + position: 'fixed',
  267 + top: '613rpx',
  268 + left: '75rpx',
  269 + },
  270 + },
  271 + ],
  272 + },
  273 + {
  274 + type: 'view',
  275 + css: this.QRcss,
  276 + views: [
  277 + {
  278 + src: wxcode,
  279 + type: 'image',
  280 + css: this.posterCss,
  281 + },
  282 + ],
  283 + },
  284 + ],
  285 + };
  286 + },
  287 + },
  288 +};
pages/order/card.vue
@@ -187,19 +187,6 @@ export default { @@ -187,19 +187,6 @@ export default {
187 font-weight: bold; 187 font-weight: bold;
188 } 188 }
189 } 189 }
190 - .title-notice {  
191 - display: flex;  
192 - align-items: center;  
193 - color: $color-red;  
194 - .u-icon {  
195 - margin-right: $padding-xs;  
196 - font-size: $font-lg;  
197 - }  
198 - }  
199 - .tip {  
200 - font-size: $font-md;  
201 - color: $color-red;  
202 - }  
203 } 190 }
204 &__item-title { 191 &__item-title {
205 margin-top: $padding-xs; 192 margin-top: $padding-xs;
pages/settlement/index.vue
@@ -391,20 +391,6 @@ export default { @@ -391,20 +391,6 @@ export default {
391 } 391 }
392 } 392 }
393 } 393 }
394 - .add-order {  
395 - right: 34upx;  
396 - bottom: 34upx;  
397 - height: 106upx;  
398 - width: 106upx;  
399 - position: fixed;  
400 - .sx-image {  
401 - width: 100%;  
402 - height: 100%;  
403 - position: absolute;  
404 - top: 0;  
405 - left: 0;  
406 - }  
407 - }  
408 .popup { 394 .popup {
409 padding-left: $padding-md; 395 padding-left: $padding-md;
410 padding-right: $padding-md; 396 padding-right: $padding-md;
static/svgs/user.svg 0 → 100644
@@ -0,0 +1 @@ @@ -0,0 +1 @@
  1 +<svg class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="4380" height="128" width="128"><path d="M512 464c88 0 160-72 160-160s-72-160-160-160-160 72-160 160 72 160 160 160z m-19.2 153.6c-8-6.4-12.8-14.4-12.8-25.6 0-17.6 14.4-32 32-32s32 14.4 32 32c0 11.2-4.8 19.2-12.8 25.6l43.2 152c3.2 11.2 0 22.4-8 30.4l-43.2 43.2c-6.4 6.4-16 6.4-22.4 0L457.6 800c-8-8-11.2-19.2-8-30.4l43.2-152zM372.8 480C321.6 438.4 288 376 288 304c0-123.2 100.8-224 224-224s224 100.8 224 224c0 70.4-33.6 134.4-84.8 176C811.2 526.4 928 673.6 928 848c0 52.8-43.2 96-96 96H192c-52.8 0-96-43.2-96-96 0-174.4 116.8-321.6 276.8-368zM832 880c17.6 0 32-14.4 32-32 0-176-144-320-320-320h-64c-176 0-320 144-320 320 0 17.6 14.4 32 32 32h640z" fill="#333333" p-id="4381"></path></svg>
0 \ No newline at end of file 2 \ No newline at end of file
static/tabbar/good-active.png 0 → 100644

3.81 KB

static/tabbar/good.png 0 → 100644

3.68 KB

static/tabbar/order-active.png

3.81 KB | W: | H:

880 Bytes | W: | H:

  • 2-up
  • Swipe
  • Onion skin
static/tabbar/order.png

3.68 KB | W: | H:

842 Bytes | W: | H:

  • 2-up
  • Swipe
  • Onion skin
static/xl.png 0 → 100644

476 Bytes