|
|
@@ -8,6 +8,7 @@
|
|
|
<u-col span="10">
|
|
|
<view class="demo-layout">
|
|
|
<view>{{item.branchLineName}}<span>{{item.shipmentPackageCount}}</span>{{item.shipmentUnit}}</view>
|
|
|
+ <view>{{item.erpOrderCode}}</view>
|
|
|
<view>{{item.shipmentName}}</view>
|
|
|
</view>
|
|
|
</u-col>
|
|
|
@@ -131,54 +132,116 @@
|
|
|
onlyFromCamera: true,
|
|
|
scanType: ['barCode', 'qrCode'],
|
|
|
success: function(res) {
|
|
|
- if (res.result.match(new RegExp("^sendOrder.*$"))) {
|
|
|
- console.log(res.result)
|
|
|
- let idOrder = res.result.split("-")[2];
|
|
|
- console.log(idOrder)
|
|
|
- console.log(_that.hitOrders)
|
|
|
- if(_that.hitOrders.indexOf(idOrder)==-1){
|
|
|
- _that.hitOrders.push(idOrder)
|
|
|
- _that.getShipDetails(idOrder)
|
|
|
- }else {
|
|
|
- uni.showToast({
|
|
|
- title: "此单已扫码",
|
|
|
- icon: 'none'
|
|
|
- })
|
|
|
- }
|
|
|
- }
|
|
|
+ console.log("res",res);
|
|
|
+ console.log(res.result)
|
|
|
+ if (res.result.indexOf('sendOrder') != -1) {
|
|
|
+ let idOrder = res.result.split("-")[2];
|
|
|
+ console.log(idOrder)
|
|
|
+ _that.truckUpOrder(idOrder)
|
|
|
+ }else if(res.result.indexOf('orderLabel') != -1){
|
|
|
+ let orderCode = res.result.split("-")[1];
|
|
|
+ console.log(orderCode)
|
|
|
+ _that.getShipDetails(orderCode)
|
|
|
+ }
|
|
|
+
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
- getShipDetails(idOrder) {
|
|
|
+ truckUpOrder(idOrder){
|
|
|
+ let _that = this;
|
|
|
+ let parms = {
|
|
|
+ idOrder: idOrder
|
|
|
+ }
|
|
|
+ request.httpPost("/dnyDriver/truckUpScanSendOrder", parms, true).then(res => {
|
|
|
+ if(res.httpCode==200){
|
|
|
+ var datas = res.data.inputItemList;
|
|
|
+ for (let i = 0; i < datas.length; i++) {
|
|
|
+ var items = datas[i]
|
|
|
+ var itemData = {
|
|
|
+ 'branchLineName':items.branchLineName,
|
|
|
+ 'shipmentName':items.shipmentName,
|
|
|
+ 'shipmentPackageCount':items.shipmentPackageCount,
|
|
|
+ 'erpOrderCode':items.erpOrderCode,
|
|
|
+ 'shipmentUnit':items.shipmentUnit,
|
|
|
+ 'id':items.id
|
|
|
+ }
|
|
|
+ if(!_that.breedTaskList.find(x => x.id === items.id)){
|
|
|
+ _that.totalUnit+=items.shipmentPackageCount
|
|
|
+ _that.breedTaskList.push(itemData)
|
|
|
+ }else {
|
|
|
+ uni.showToast({
|
|
|
+ title: "此单已扫码",
|
|
|
+ icon: 'none'
|
|
|
+ })
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ if(res.data.inputString){
|
|
|
+ uni.showToast({
|
|
|
+ title: res.data.inputString,
|
|
|
+ icon: 'none',
|
|
|
+ mask: true,
|
|
|
+ duration: 4000,
|
|
|
+ })
|
|
|
+ }
|
|
|
+ }else {
|
|
|
+ uni.showToast({
|
|
|
+ title: res.msg,
|
|
|
+ icon: 'none',
|
|
|
+ mask: true,
|
|
|
+ duration: 4000,
|
|
|
+ })
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ getShipDetails(orderCode) {
|
|
|
let _that = this;
|
|
|
let parms = {
|
|
|
- idOrder: idOrder
|
|
|
+ orderCode: orderCode
|
|
|
}
|
|
|
- console.log(parms);
|
|
|
- request.httpPost("/dnyDriver/scanOrderCode", parms, true).then(res => {
|
|
|
- console.log(res);
|
|
|
- if (res.httpCode == 200) {
|
|
|
- console.log(res.data);
|
|
|
- var datas = res.data;
|
|
|
- var itemData = {
|
|
|
- 'branchLineName':datas.branchLineName,
|
|
|
- 'shipmentName':datas.shipmentName,
|
|
|
- 'shipmentPackageCount':datas.shipmentPackageCount,
|
|
|
- 'shipmentUnit':datas.shipmentUnit,
|
|
|
- 'id':datas.id
|
|
|
- }
|
|
|
- _that.totalUnit+=datas.shipmentPackageCount
|
|
|
- _that.breedTaskList.push(itemData)
|
|
|
- console.log(_that.breedTaskList);
|
|
|
- }else {
|
|
|
- if(_that.hitOrders.length>0){
|
|
|
- _that.hitOrders.pop()
|
|
|
- }else {
|
|
|
- _that.hitOrders = [];
|
|
|
- }
|
|
|
-
|
|
|
- _that.$refs.uNotify.warning(res.msg)
|
|
|
- }
|
|
|
+ request.httpPost("/dnyDriver/truckUpScanERPOrder", parms, true).then(res => {
|
|
|
+ if(res.httpCode==200){
|
|
|
+ var datas = res.data.inputItemList;
|
|
|
+ for (let i = 0; i < datas.length; i++) {
|
|
|
+ var items = datas[i]
|
|
|
+ var itemData = {
|
|
|
+ 'branchLineName':items.branchLineName,
|
|
|
+ 'shipmentName':items.shipmentName,
|
|
|
+ 'shipmentPackageCount':items.shipmentPackageCount,
|
|
|
+ 'shipmentUnit':items.shipmentUnit,
|
|
|
+ 'erpOrderCode':items.erpOrderCode,
|
|
|
+ 'id':items.id
|
|
|
+ }
|
|
|
+ if(!_that.breedTaskList.find(x => x.id === items.id)){
|
|
|
+ _that.totalUnit+=items.shipmentPackageCount
|
|
|
+ _that.breedTaskList.push(itemData)
|
|
|
+ }else {
|
|
|
+ uni.showToast({
|
|
|
+ title: "此单已扫码",
|
|
|
+ icon: 'none'
|
|
|
+ })
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ if(res.data.inputString){
|
|
|
+ uni.showToast({
|
|
|
+ title: res.data.inputString,
|
|
|
+ icon: 'none',
|
|
|
+ mask: true,
|
|
|
+ duration: 4000,
|
|
|
+ })
|
|
|
+ }
|
|
|
+ }else {
|
|
|
+ uni.showToast({
|
|
|
+ title: res.msg,
|
|
|
+ icon: 'none',
|
|
|
+ mask: true,
|
|
|
+ duration: 4000,
|
|
|
+ })
|
|
|
+ }
|
|
|
+
|
|
|
});
|
|
|
},
|
|
|
parseBreedTaskStatus(task) {
|
|
|
@@ -201,13 +264,13 @@
|
|
|
viewBreedTaskMore(task) {
|
|
|
task.showMore = !task.showMore
|
|
|
},
|
|
|
-
|
|
|
+
|
|
|
deleteBtn(index){
|
|
|
this.totalUnit = this.totalUnit-this.breedTaskList[index].shipmentPackageCount
|
|
|
this.breedTaskList.splice(index, 1)
|
|
|
this.hitOrders.splice(index, 1)
|
|
|
-
|
|
|
-
|
|
|
+
|
|
|
+
|
|
|
},
|
|
|
feedBackPopupClose() {
|
|
|
this.feedBackPopupShow = false;
|
|
|
@@ -275,19 +338,19 @@
|
|
|
.demo-layout{
|
|
|
font-size: 36rpx;
|
|
|
}
|
|
|
-/deep/ .uni-card .uni-card__header{
|
|
|
- border-bottom: none !important;
|
|
|
-}
|
|
|
+ /deep/ .uni-card .uni-card__header{
|
|
|
+ border-bottom: none !important;
|
|
|
+ }
|
|
|
/deep/ .uni-list-item__container {
|
|
|
padding: 0rpx;
|
|
|
}
|
|
|
- /deep/ .fab{
|
|
|
- .uniui-plusempty:before {
|
|
|
- //content: "\e67b";
|
|
|
- content: '\e654' !important;
|
|
|
- }
|
|
|
+ /deep/ .fab{
|
|
|
+ .uniui-plusempty:before {
|
|
|
+ //content: "\e67b";
|
|
|
+ content: '\e654' !important;
|
|
|
}
|
|
|
- .card-actions {
|
|
|
+ }
|
|
|
+ .card-actions {
|
|
|
display: flex;
|
|
|
flex-direction: row;
|
|
|
justify-content: space-around;
|
|
|
@@ -380,7 +443,6 @@
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
>view:last-child {
|
|
|
background: #FFD202;
|
|
|
}
|