diff --git a/common/api.js b/common/api.js
index b541fe6..1fb33e9 100644
--- a/common/api.js
+++ b/common/api.js
@@ -158,6 +158,21 @@ module.exports = (vm) => {
},
freightMaRecord: {
add: params => vm.$u.http.post( freightAPI + '/freightMaRecord/add', params,{custom: {toast:true}}), // 出发到达记录日志
+ },
+ // 货源管理v2版本
+ freightGoodsSourceV2:{
+ page: params => vm.$u.http.get( freightAPI + '/freightGoodsSourceV2/page', {params}),
+ biddingPage: params => vm.$u.http.get( freightAPI + '/freightGoodsSourceV2/biddingPage', {params}),
+ biddingCount: params => vm.$u.http.get( freightAPI + '/freightGoodsSourceV2/biddingCount', {params}),
+ count: params => vm.$u.http.get( freightAPI + '/freightGoodsSourceV2/count', {params}),
+ getDetail: params => vm.$u.http.get( freightAPI + '/freightGoodsSourceV2/getDetail', {params}),
+ add: data => vm.$u.http.post( freightAPI + '/freightGoodsSourceV2/add', data,{custom: {toast:true}}),
+ modify: data => vm.$u.http.post( freightAPI + '/freightGoodsSourceV2/modify', data),
+ complete: data => vm.$u.http.post( freightAPI + '/freightGoodsSourceV2/complete', data),
+ cancel: data => vm.$u.http.post( freightAPI + '/freightGoodsSourceV2/cancel', data),
+ cancelBidding: data => vm.$u.http.post( freightAPI + '/freightGoodsSourceV2/cancelBidding', data),
+ delete: data => vm.$u.http.post( freightAPI + '/freightGoodsSourceV2/delete', data),
+ buildMaQrcode: params => vm.$u.http.get( freightAPI + '/freightGoodsSourceV2/buildMaQrcode', {params}),
}
};
}
diff --git a/pages.json b/pages.json
index 607031d..0b3ebac 100644
--- a/pages.json
+++ b/pages.json
@@ -28,6 +28,18 @@
"navigationBarTitleText": "创建货源"
}
},{
+ "path": "pages/goodSource/detail",
+ "style": {
+ "navigationBarTitleText": "飞牛货源详情",
+ "enablePullDownRefresh": true
+ }
+ },{
+ "path": "pages/goodSource/grab-record",
+ "style": {
+ "navigationBarTitleText": "飞牛货源抢单记录",
+ "enablePullDownRefresh": true
+ }
+ },{
"path": "pages/order/index",
"style": {
"navigationBarTitleText": "订单",
diff --git a/pages/goodSource/add.vue b/pages/goodSource/add.vue
index 14c1819..4d4ffa8 100644
--- a/pages/goodSource/add.vue
+++ b/pages/goodSource/add.vue
@@ -8,24 +8,24 @@
-
+
-
+
selectAddress(0)">
-
+
selectAddress(1)">
-
+
-
-
+
+
@@ -36,28 +36,32 @@
-
-
-
-
- 吨
-
-
-
-
- 元/吨
-
-
-
-
- 吨
-
-
-
-
- 元/吨
-
+
+
+
+
+ 吨
+
+
+
+
+ 元/吨
+
+
+
+
+
+
+ 车
+
+
+
+
+ 元/车
+
+
+
@@ -70,13 +74,13 @@
-
-
+
+
-
+
@@ -113,6 +117,7 @@
+
diff --git a/pages/goodSource/grab-record.vue b/pages/goodSource/grab-record.vue
new file mode 100644
index 0000000..136e035
--- /dev/null
+++ b/pages/goodSource/grab-record.vue
@@ -0,0 +1,304 @@
+
+
+
+
+
+
+
+
+ {{ searchForm.projectName || '车牌号' }}
+
+
+
+
+
+
+
+
+
+ {{ searchForm.startCityName || '司机姓名' }}
+
+
+
+
+
+
+ {{ searchForm.endCityName || '司机手机' }}
+
+
+
+
+
+ 抢单时间
+
+
+
+
+
+
+
+
+
+ {{ form.code }}
+
+
+
+
+
+
+
+ {{ form.driverName || '' }}{{ form.driverMobile || '' }}
+
+
+
+
+
+
+
+
+
+ /{{ form.vehicleLicenseNum }}
+ /{{ form.trailerLicenseNum }}
+
+
+
+ {{ form.biddingWeight || '--' }}吨
+
+
+ 总运费:{{ form.paidAmount }}
+
+ 取消
+ toSubmit(form)">确认
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/pages/goodSource/index.vue b/pages/goodSource/index.vue
index 49c9022..3b6c1a5 100644
--- a/pages/goodSource/index.vue
+++ b/pages/goodSource/index.vue
@@ -1,7 +1,7 @@
-
+
@@ -11,6 +11,9 @@
+
+
+
{{ searchForm.startCityName || '始发地' }}
@@ -26,16 +29,17 @@
+ 发布时间
-
-
-
+
+
+
(loading = e)" :verify="true">
-
+
@@ -80,7 +84,6 @@ export default {
popValue: '',
popConfig: {
cancel: { fun: '', title: '取消原因', placeholder: '请输入取消原因,必填' },
- delete: { fun: '', title: '删除原因', placeholder: '请输入删除原因,必填' },
},
loading: false,
popShow: false,
@@ -88,17 +91,11 @@ export default {
searchForm: {
projectCode: '',
projectName: '',
- code: '', //
- driverName: '',
- driverMobile: '', // 客户
- vehicleLicenseNum: '',
- unHandledExceptionFlag: '', // 存在异常
startCityCode: '',
+ startCityName: '',
endCityCode: '',
+ endCityName: '',
status: '',
- receiptFlag: '', // 是否已签单
- payStatus: '', // 支付状态
- payStatusName: '', //
},
activeTab: 0,
count: {},
@@ -111,9 +108,9 @@ export default {
computed: {
tabList() {
let list = [
- { name: '找车中', value: 'TRANSFER', key: 'transfer' },
- { name: '已结束', value: 'COMPLETED', key: 'completed' },
- { name: '已取消', value: 'CANCEL', key: 'cancel' },
+ { name: '找车中', value: 'MATCHING', key: 'matchingCount' },
+ { name: '已结束', value: 'COMPLETED', key: 'completedCount' },
+ { name: '已取消', value: 'CANCELLED', key: 'cancelledCount' },
];
return Object.keys(this.count).length > 0
? list.map(item => {
@@ -164,19 +161,51 @@ export default {
});
}
},
- // 再来一单
- more(code) {
+ // 修改货源
+ modifySource(code) {
this.currentCode = code;
this.toAddPage('?code=' + code);
},
- // 取消订单
- cancelOrder(code) {
+ // 取消货源
+ cancelSource(code) {
this.currentCode = code;
this.popType = 'cancel';
this.popValue = '';
this.popShow = true;
uni.hideTabBar();
},
+ // 删除货源
+ deleteSource(code) {
+ uni.showModal({
+ title: '提示',
+ content: '确定删除此货源吗?',
+ success: res => {
+ if (res.confirm) {
+ uni.$u.api.freightGoodsSourceV2.delete([code]).then(res => {
+ if (res.success) {
+ this.onSearch();
+ }
+ });
+ }
+ },
+ });
+ },
+ // 结束货源
+ completeSource(code) {
+ uni.showModal({
+ title: '提示',
+ content: '确定结束此货源吗?',
+ success: res => {
+ if (res.confirm) {
+ uni.$u.api.freightGoodsSourceV2.complete([code]).then(res => {
+ if (res.success) {
+ this.onSearch();
+ }
+ });
+ }
+ },
+ });
+ },
closePop() {
setTimeout(() => uni.showTabBar(), 300);
this.popShow = false;
@@ -186,9 +215,9 @@ export default {
uni.showToast({ title: '请输入原因', icon: 'none' });
return;
}
- uni.$u.api.freightOrder[this.popType]({
- codeList: [this.currentCode],
- reason: this.popValue,
+ uni.$u.api.freightGoodsSourceV2[this.popType]({
+ code: this.currentCode,
+ cancelReason: this.popValue,
}).then(res => {
if (res.success) {
this.closePop();
@@ -196,24 +225,6 @@ export default {
}
});
},
- // 删除订单
- deleteOrder(code) {
- this.currentCode = code;
- this.popType = 'delete';
- this.popValue = '';
- this.popShow = true;
- uni.hideTabBar();
- },
- toUploadReceipt(code) {
- uni.navigateTo({
- url: '/pages/order/upload-receipt?code=' + code,
- events: {
- refreshData: () => {
- this.onSearch();
- },
- },
- });
- },
toAddPage(param) {
uni.navigateTo({
url: '/pages/goodSource/add' + param,
@@ -242,39 +253,19 @@ export default {
status: this.tabList[this.activeTab].value,
};
this.getAggregateType(format);
- return uni.$u.api.freightOrder.page({
+ return uni.$u.api.freightGoodsSourceV2.page({
...format,
...params,
});
},
// 获取聚合数量
getAggregateType(params) {
- uni.$u.api.freightOrder.count({ ...params, status: '' }).then(res => {
+ uni.$u.api.freightGoodsSourceV2.count({ ...params, status: '' }).then(res => {
this.count = res?.result || {};
});
},
toDetail(code) {
- uni.navigateTo({ url: '/pages/order/detail?code=' + code });
- },
- toStartCar(code) {
- uni.navigateTo({
- url: '/pages/order/start-car?code=' + code,
- events: {
- refreshData: () => {
- this.onSearch();
- },
- },
- });
- },
- toArrivalCar(code) {
- uni.navigateTo({
- url: '/pages/order/arrival-car?code=' + code,
- events: {
- refreshData: () => {
- this.onSearch();
- },
- },
- });
+ uni.navigateTo({ url: '/pages/goodSource/detail?code=' + code });
},
qrCodeShow(code, data) {
if (this.loading) return;
@@ -308,7 +299,7 @@ export default {