diff --git a/pages.json b/pages.json index 42020d8..607031d 100644 --- a/pages.json +++ b/pages.json @@ -17,6 +17,17 @@ "navigationBarTitleText": "验证码" } },{ + "path": "pages/goodSource/index", + "style": { + "navigationBarTitleText": "货源", + "enablePullDownRefresh": true + } + },{ + "path": "pages/goodSource/add", + "style": { + "navigationBarTitleText": "创建货源" + } + },{ "path": "pages/order/index", "style": { "navigationBarTitleText": "订单", @@ -224,6 +235,12 @@ "backgroundColor": "#FFFFFF", "list": [ { + "pagePath": "pages/goodSource/index", + "iconPath": "static/tabbar/good.png", + "selectedIconPath": "static/tabbar/good-active.png", + "text": "货源" + }, + { "pagePath": "pages/order/index", "iconPath": "static/tabbar/order.png", "selectedIconPath": "static/tabbar/order-active.png", diff --git a/pages/goodSource/add.vue b/pages/goodSource/add.vue new file mode 100644 index 0000000..14c1819 --- /dev/null +++ b/pages/goodSource/add.vue @@ -0,0 +1,464 @@ + + + diff --git a/pages/goodSource/card.vue b/pages/goodSource/card.vue new file mode 100644 index 0000000..3634219 --- /dev/null +++ b/pages/goodSource/card.vue @@ -0,0 +1,358 @@ + + + + diff --git a/pages/goodSource/index.vue b/pages/goodSource/index.vue new file mode 100644 index 0000000..49c9022 --- /dev/null +++ b/pages/goodSource/index.vue @@ -0,0 +1,451 @@ + + + diff --git a/pages/goodSource/qr-painter.js b/pages/goodSource/qr-painter.js new file mode 100644 index 0000000..ce32bd2 --- /dev/null +++ b/pages/goodSource/qr-painter.js @@ -0,0 +1,288 @@ +import dayjs from 'dayjs'; +export default { + data() { + return { + posterCss: { width: '150rpx', height: '150rpx', padding: '11rpx', backgroundColor: '#FFFFFF', borderRadius: '50%', objectFit: 'cover' }, // 二维码大小样式 + QRcss: { position: 'fixed', left: '52rpx', bottom: '24rpx', display: 'flex' }, // 二维码定位样式 + }; + }, + methods: { + saveQrImage() { + this.$refs.painter.canvasToTempFilePathSync({ + fileType: 'jpg', + // 如果返回的是base64是无法使用 saveImageToPhotosAlbum,需要设置 pathType为url + pathType: 'url', + quality: 1, + success: res => { + uni.saveImageToPhotosAlbum({ + filePath: res.tempFilePath, + success: () => { + this.qrShow = false; + uni.showToast({ title: '保存成功', icon: 'none' }); + }, + }); + }, + }); + }, + getPoster(item, params, wxcode) { + let driverInfo = item.driverName ? item.driverName : ''; + driverInfo += item.driverMobile ? item.driverMobile : ''; + let vehicle = item.vehicleLicenseNum; + if (item.trailerLicenseNum) { + vehicle += '·' + item.trailerLicenseNum; + } + return { + css: { + width: '640rpx', + height: '880rpx', + backgroundImage: 'url(https://zeyi-tms-product.oss-cn-hangzhou.aliyuncs.com/image/freight/b6988d70-26db-490c-9ddf-e59c554fa2ff.png)', + objectFit: 'cover', + }, + views: [ + { + type: 'view', + views: [ + { + type: 'text', + text: '订 单 号:', + css: { + width: '300rpx', + height: '33rpx', + fontSize: '24rpx', + fontSamily: 'PingFangSC-Regular', + color: '#999999', + lineHeight: '33rpx', + display: 'block', + boxOrient: 'vertical', + lineClamp: 1 /* 这里是超出几行省略 */, + position: 'fixed', + top: '169rpx', + left: '75rpx', + }, + }, + { + type: 'text', + text: params.code, + css: { + width: '400rpx', + height: '33rpx', + fontSize: '24rpx', + fontSamily: 'PingFangSC-Regular', + color: '#121212', + lineHeight: '33rpx', + overflow: 'hidden', + textOverflow: 'ellipsis', + display: 'block', + boxOrient: 'vertical', + lineClamp: 1 /* 这里是超出几行省略 */, + position: 'fixed', + top: '169rpx', + left: '195rpx', + }, + }, + { + type: 'text', + text: '任务日期:', + css: { + width: '400rpx', + height: '33rpx', + fontSize: '24rpx', + fontSamily: 'PingFangSC-Regular', + color: '#999999', + lineHeight: '33rpx', + display: 'block', + boxOrient: 'vertical', + lineClamp: 1 /* 这里是超出几行省略 */, + position: 'fixed', + top: '204rpx', + left: '75rpx', + }, + }, + { + type: 'text', + text: dayjs(params.loadTime).format('YYYY-MM-DD'), + css: { + width: '400rpx', + height: '33rpx', + fontSize: '24rpx', + fontSamily: 'PingFangSC-Regular', + color: '#121212', + lineHeight: '33rpx', + overflow: 'hidden', + textOverflow: 'ellipsis', + display: 'block', + boxOrient: 'vertical', + lineClamp: 1 /* 这里是超出几行省略 */, + position: 'fixed', + top: '204rpx', + left: '195rpx', + }, + }, + { + type: 'text', + text: params.startCityName + '-' + params.startAreaName, + css: { + width: '400rpx', + height: '40rpx', + fontSize: '36rpx', + fontSamily: 'PingFangSC-Semibold, PingFang SC', + fontWeight: '600', + color: '#051B33', + lineHeight: '40rpx', + overflow: 'hidden', + textOverflow: 'ellipsis', + display: 'block', + boxOrient: 'vertical', + lineClamp: 1 /* 这里是超出几行省略 */, + position: 'fixed', + top: '270rpx', + left: '129rpx', + }, + }, + { + type: 'text', + text: params.endCityName + '-' + params.endAreaName, + css: { + width: '400rpx', + height: '40rpx', + fontSize: '36rpx', + fontSamily: 'PingFangSC-Semibold, PingFang SC', + fontWeight: '600', + color: '#051B33', + lineHeight: '40rpx', + overflow: 'hidden', + textOverflow: 'ellipsis', + display: 'block', + boxOrient: 'vertical', + lineClamp: 1 /* 这里是超出几行省略 */, + position: 'fixed', + top: '405rpx', + left: '129rpx', + }, + }, + { + type: 'text', + text: '总里程:' + item.distance + 'KM', + css: { + width: '400rpx', + height: '33rpx', + fontSize: '24rpx', + fontWeight: '400', + fontSamily: 'PingFangSC-Medium, PingFang SC', + color: '#999999', + lineHeight: '33rpx', + position: 'fixed', + top: '345rpx', + left: '129rpx', + }, + }, + { + type: 'text', + text: '订单备注:', + css: { + width: '400rpx', + height: '33rpx', + fontSize: '24rpx', + fontSamily: 'PingFangSC-Regular', + color: '#999999', + lineHeight: '33rpx', + display: 'block', + boxOrient: 'vertical', + lineClamp: 1 /* 这里是超出几行省略 */, + position: 'fixed', + top: '477rpx', + left: '75rpx', + }, + }, + { + type: 'text', + text: params.remark, + css: { + width: '350rpx', + height: '33rpx', + fontSize: '24rpx', + fontSamily: 'PingFangSC-Regular', + color: '#121212', + lineHeight: '33rpx', + overflow: 'hidden', + textOverflow: 'ellipsis', + display: 'block', + boxOrient: 'vertical', + lineClamp: 1 /* 这里是超出几行省略 */, + position: 'fixed', + top: '477rpx', + left: '195rpx', + }, + }, + { + type: 'text', + text: '司 机:', + css: { + width: '400rpx', + height: '33rpx', + fontSize: '26rpx', + fontSamily: 'PingFangSC-Regular', + color: '#FFFFFF', + lineHeight: '33rpx', + display: 'block', + boxOrient: 'vertical', + lineClamp: 1 /* 这里是超出几行省略 */, + position: 'fixed', + top: '564rpx', + left: '75rpx', + }, + }, + { + type: 'text', + text: driverInfo, + css: { + width: '400rpx', + height: '33rpx', + fontSize: '26rpx', + fontSamily: 'PingFangSC-Regular', + color: '#FFFFFF', + lineHeight: '33rpx', + display: 'block', + boxOrient: 'vertical', + lineClamp: 1 /* 这里是超出几行省略 */, + position: 'fixed', + top: '564rpx', + left: '180rpx', + }, + }, + { + type: 'text', + text: '车牌号:' + vehicle, + css: { + width: '400rpx', + height: '33rpx', + fontSize: '26rpx', + fontSamily: 'PingFangSC-Regular', + color: '#FFFFFF', + lineHeight: '33rpx', + display: 'block', + boxOrient: 'vertical', + lineClamp: 1 /* 这里是超出几行省略 */, + position: 'fixed', + top: '613rpx', + left: '75rpx', + }, + }, + ], + }, + { + type: 'view', + css: this.QRcss, + views: [ + { + src: wxcode, + type: 'image', + css: this.posterCss, + }, + ], + }, + ], + }; + }, + }, +}; diff --git a/pages/order/card.vue b/pages/order/card.vue index 8b0eeed..3296d31 100644 --- a/pages/order/card.vue +++ b/pages/order/card.vue @@ -187,19 +187,6 @@ export default { font-weight: bold; } } - .title-notice { - display: flex; - align-items: center; - color: $color-red; - .u-icon { - margin-right: $padding-xs; - font-size: $font-lg; - } - } - .tip { - font-size: $font-md; - color: $color-red; - } } &__item-title { margin-top: $padding-xs; diff --git a/pages/settlement/index.vue b/pages/settlement/index.vue index f73f837..bd6f94f 100644 --- a/pages/settlement/index.vue +++ b/pages/settlement/index.vue @@ -391,20 +391,6 @@ export default { } } } - .add-order { - right: 34upx; - bottom: 34upx; - height: 106upx; - width: 106upx; - position: fixed; - .sx-image { - width: 100%; - height: 100%; - position: absolute; - top: 0; - left: 0; - } - } .popup { padding-left: $padding-md; padding-right: $padding-md; diff --git a/static/svgs/user.svg b/static/svgs/user.svg new file mode 100644 index 0000000..dac3fd0 --- /dev/null +++ b/static/svgs/user.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/static/tabbar/good-active.png b/static/tabbar/good-active.png new file mode 100644 index 0000000..9ee2624 Binary files /dev/null and b/static/tabbar/good-active.png differ diff --git a/static/tabbar/good.png b/static/tabbar/good.png new file mode 100644 index 0000000..2699912 Binary files /dev/null and b/static/tabbar/good.png differ diff --git a/static/tabbar/order-active.png b/static/tabbar/order-active.png index 9ee2624..7c64e20 100644 Binary files a/static/tabbar/order-active.png and b/static/tabbar/order-active.png differ diff --git a/static/tabbar/order.png b/static/tabbar/order.png index 2699912..f047147 100644 Binary files a/static/tabbar/order.png and b/static/tabbar/order.png differ diff --git a/static/xl.png b/static/xl.png new file mode 100644 index 0000000..19f3094 Binary files /dev/null and b/static/xl.png differ -- libgit2 0.21.0