Browse Source

修复部分bug

master
qb 1 year ago
parent
commit
81f875f3e4
  1. 2
      compoment/tiplist/tiplist.vue
  2. 9
      pages/user/user.vue
  3. 13
      pagesHome/pages/CustomerOrdersDetails/CustomerOrdersDetails.vue
  4. 2
      pagesHome/pages/CustomerSign/CustomerSign.vue
  5. 7
      pagesHome/pages/StockUplist/StockUplist.vue
  6. 2
      pagesHome/pages/StockUplistScandetails/StockUplistScandetails.vue
  7. 175
      pagesHome/pages/signOrderScan/signOrderScan.vue
  8. BIN
      static/appIcon/favicon.png
  9. 293
      unpackage/dist/dev/app-plus/app-service.js
  10. 2
      unpackage/dist/dev/app-plus/app.css
  11. 4
      unpackage/dist/dev/app-plus/pages/user/user.css
  12. 4
      unpackage/dist/dev/app-plus/pagesHome/pages/CustomerOrdersDetails/CustomerOrdersDetails.css
  13. 2
      utils/request.js

2
compoment/tiplist/tiplist.vue

@ -443,7 +443,7 @@
&.showTitle {
&::after {
content: '最少传入张图片';
content: '最少传入张图片';
margin-left: 20upx;
color: #f00;
}

9
pages/user/user.vue

@ -2,13 +2,13 @@
<view class="titles">个人中心</view>
<image class="usebg" src="/static/userbg.png"></image>
<view class="userviews" @click="gologin" v-if="!(users?.user_id)">
<image src="/static/userimg.png"></image>
<image class="profilePhoto" src="/static/appIcon/favicon.png"></image>
<view>
<view>未登录</view>
</view>
</view>
<view class="userviews" v-if="users?.user_id">
<image src="/static/userimg.png"></image>
<image class="profilePhoto" src="/static/appIcon/favicon.png"></image>
<view>
<view>{{users.real_name}}</view>
<view>
@ -541,4 +541,9 @@
height: 400upx;
background-color: #FA8C16da;
}
.profilePhoto {
background: #fff;
border-radius: 10upx;
}
</style>

13
pagesHome/pages/CustomerOrdersDetails/CustomerOrdersDetails.vue

@ -87,7 +87,7 @@
<uni-tr
:class="{'active': Number(ite.isAbnormalLoading) === 1 || Number(ite.isAbnnormalSigning) === 1}">
<uni-td
:class="{'isScan': ite.orderPackageStatus !== '70'}">{{ite.orderPackageCode}}</uni-td>
:class="{'isScan': ite.orderPackageLoadingStatus !== '20'}">{{ite.orderPackageCode}}</uni-td>
<uni-td>{{ite.thirdProduct}}</uni-td>
<uni-td>{{ite.isScan}}</uni-td>
<uni-td
@ -391,6 +391,8 @@
}
async function initpage() {
details.listcheckindex = -1
try {
let data = {
reservationId: details.items.id,
@ -550,6 +552,8 @@
/**
* */
async function scandata() {
let code = 0
try {
let loadingId = uni.getStorageSync('checkvehicle').id
//
@ -562,7 +566,8 @@
barcode: details.scancode
}
let res = await deliveryloadingscan(data)
const { code, audio } = res
const { audio } = res
code = res.code
//
if (code === 5000) {
utils.ttsspke('不在本次计划, 是否继续装车')
@ -585,6 +590,10 @@
}
//
const res = await postAbnormalTruckLoading(data)
if (res.code !== 200) return
basicContainer.value.startPullDownRefresh()
console.log('res :>> ', res);
tiplists.value.setdetails({ isshow: false })
},

2
pagesHome/pages/CustomerSign/CustomerSign.vue

@ -52,7 +52,7 @@
<view>{{item.ordNub}}</view>
</view>
<view>
<view>配送件数</view>
<view>计划件数</view>
<view>{{item.reservationNum}}</view>
</view>
<view>

7
pagesHome/pages/StockUplist/StockUplist.vue

@ -320,10 +320,9 @@
async function ckscanningCode(item : any) {
let content = '请扫描托盘码'
if (!details.goodsStockupAllocationId) {
content = '请先扫描库位码'
return
}
// if (!details.goodsStockupAllocationId) {
// content = ''
// }
details.isscan = item.taryLean
details.trayId = item.trayId
uni.showToast({

2
pagesHome/pages/StockUplistScandetails/StockUplistScandetails.vue

@ -286,7 +286,7 @@
})
}
async function scandata() {
if (Number(details.planNum) === Number(details.scanNum)) return utils.handleToast('该客户已齐套')
if (Number(details.planNum) === Number(details.scanNum)) return utils.handleToast('该客户已齐套, 请返回上一级页面')
//
if (Number(details.status) !== 0) return

175
pagesHome/pages/signOrderScan/signOrderScan.vue

@ -18,7 +18,7 @@
</view>
<view>
<view>计划件数</view>
<view>{{Plannednub}}</view>
<view>{{details.Plannednub}}</view>
</view>
<view>
<view>配送件数</view>
@ -26,7 +26,7 @@
</view>
<view>
<view>签收件数</view>
<view>{{signNub}}</view>
<view>{{details.signNub}}</view>
</view>
</view>
</view>
@ -64,12 +64,11 @@
</view>
</view>
<view class="contenbx1">
<view><text style="color: #90A0AF;">总数</text>{{item.reservationNum}}</view>
<view><text style="color: #90A0AF;">计划</text>{{item.reservationNum}}</view>
<view><text style="color: #90A0AF;">装车</text>{{item.loadingNub}}</view>
<view><text style="color: #90A0AF;">签收</text>{{item.signforNub}}</view>
</view>
<view class="contenbx1">
<view><text style="color: #90A0AF;">计划</text>{{item.reservationNum}}</view>
<view><text style="color: #90A0AF;">异常装车</text>{{item.abnormalLoading}}</view>
<view><text style="color: #90A0AF;">异常签收</text>{{item.abnormalSignature}}</view>
</view>
@ -210,32 +209,22 @@
inputtxt: '',
listcheckindex: -1,
scrollHeight: '',
/** 计划件数 */
Plannednub: 0,
/** 签收数 */
signNub: 0,
})
const tiplists = ref(null)
const tip = ref(null)
const Plannednub = computed(() => {
let num = 0
//
num += details.orderArr.reduce((curr, item) => curr + item.reservationNum, 0)
num += details.zeroArr.reduce((curr, item) => curr + item.reservationNum, 0)
num += details.stockArr.reduce((curr, item) => curr + item.reservationNum, 0)
return num
})
const ordNub = computed(() => {
let num = 0
num += details.orderArr.length
num += details.zeroArr.length
return num
})
const signNub = computed(() => {
let num = 0
details.datalist.map(item => {
if (item.signforNub) {
num += item.signforNub
}
})
return num
})
onLoad(async (op) => {
// #ifdef APP
utils.ttsspke('请扫描包条码')
@ -268,13 +257,18 @@
}
details.datalist = []
const promise1 = signfororder(data, { isShowLoading: false })
const promise2 = signforinventory(data, { isShowLoading: false })
uni.showLoading()
const [response, response1] = await Promise.all([promise1, promise2])
//
let response = null
response = await signfororder(data)
// let response = null
// response = await signfororder(data)
if (response.code !== 200) return
details.zeroArr = []
details.orderArr = []
if (response.data && response.data.records) response.data.records.forEach(val => {
if (response.data && response.data) response.data.forEach(val => {
//
if (val.isZero === '1') return details.zeroArr.push(val)
@ -290,12 +284,12 @@
details.orderArr.push(val)
})
//
let response1 = await signforinventory(data)
// let response1 = await signforinventory(data)
if (response1.code !== 200) return
if (response1.data) details.stockArr = response1.data.records || []
if (response1.data) details.stockArr = response1.data || []
computedNum()
console.log('response :>> ', response);
console.log('response1 :>> ', response1);
//
if (details.orderStatus === 1) details.datalist = details.orderArr
//
@ -305,6 +299,9 @@
} catch (err) {
console.log('err :>> ', err);
//TODO handle the exception
} finally {
await nextTick()
uni.hideLoading()
}
})
@ -326,18 +323,27 @@
})
}
/** 计算数据 */
function computedNum() {
const _arr = [...details.orderArr, ...details.zeroArr, ...details.stockArr]
details.Plannednub = 0
details.signNub = 0
for (let item of _arr) {
details.Plannednub += item.reservationNum
details.signNub += item.signforNub
}
}
//
onPullDownRefresh(() => {
const timer = setTimeout(() => {
initpage()
//
uni.stopPullDownRefresh()
clearTimeout(timer)
}, 500)
onPullDownRefresh(async () => {
await initpage()
//
uni.stopPullDownRefresh()
})
async function scandata() {
details.listcheckindex = -1
let data = {
barcode: details.scancode,
deliveryId: details.deliveryId,
@ -370,6 +376,7 @@
title: response.msg,
icon: 'none'
})
initpage()
tip.value.setdetails({ isshow: false })
},
cancel: () => {
@ -379,6 +386,8 @@
tip.value.setdetails({ isshow: false })
}
})
return
} else {
uni.showToast({
title: response.msg,
@ -406,6 +415,7 @@
title: response.msg,
icon: 'none'
})
initpage()
tip.value.setdetails({ isshow: false })
},
cancel: () => {
@ -415,6 +425,7 @@
tip.value.setdetails({ isshow: false })
}
})
return
} else {
uni.showToast({
title: response.msg,
@ -470,49 +481,59 @@
}
}
async function initpage() {
let data = {
reservationId: details.id,
completecode: details.orderType,
orderCode: details.inputtxt,
}
details.datalist = []
let response = null;
//
if (details.orderStatus == 1 || details.orderStatus === 2) {
response = await signfororder(data)
if (response.code !== 200) return
details.zeroArr = []
details.orderArr = []
response.data.records.forEach(val => {
//
if (val.isZero === '1') return details.zeroArr.push(val)
try {
details.listcheckindex = -1
//
val.abnormalSignature = 0
//
val.abnormalLoading = 0
val.distributionAppParcelListVOS.forEach(value => {
if (value.isAbnnormalSigning === 1) val.abnormalSignature += 1
if (value.isAbnormalLoading === 1) val.abnormalLoading += 1
let data = {
reservationId: details.id,
completecode: details.orderType,
orderCode: details.inputtxt,
}
details.datalist = []
let response = null;
//
if (details.orderStatus == 1 || details.orderStatus === 2) {
response = await signfororder(data)
if (response.code !== 200) return
details.zeroArr = []
details.orderArr = []
response.data.forEach(val => {
//
if (val.isZero === '1') return details.zeroArr.push(val)
//
val.abnormalSignature = 0
//
val.abnormalLoading = 0
val.distributionAppParcelListVOS.forEach(value => {
if (value.isAbnnormalSigning === 1) val.abnormalSignature += 1
if (value.isAbnormalLoading === 1) val.abnormalLoading += 1
})
console.log('val :>> ', val);
details.orderArr.push(val)
})
console.log('val :>> ', val);
details.orderArr.push(val)
})
}
//
else if (details.orderStatus == 3) {
response = await signforinventory(data)
if (response.code !== 200) return
details.stockArr = response.data.records || []
}
//
else if (details.orderStatus == 3) {
response = await signforinventory(data)
if (response.code !== 200) return
details.stockArr = response.data || []
}
//
if (details.orderStatus === 1) details.datalist = details.orderArr
//
else if (details.orderStatus === 2) details.datalist = details.zeroArr
//
else details.datalist = details.stockArr
} catch (err) {
console.log('err :>> ', err);
//TODO handle the exception
} finally {
computedNum()
return null
}
//
if (details.orderStatus === 1) details.datalist = details.orderArr
//
else if (details.orderStatus === 2) details.datalist = details.zeroArr
//
else details.datalist = details.stockArr
}
function setcheckindex(index : number) {
if (details.listcheckindex == index) {

BIN
static/appIcon/favicon.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 46 KiB

293
unpackage/dist/dev/app-plus/app-service.js vendored

@ -1747,7 +1747,7 @@ if (uni.restoreGlobal) {
};
};
const Base64$1 = new Base64();
const devhost = "http://192.168.10.57:13000/";
const devhost = "http://192.168.10.25:13000/";
const imghost = "";
const host = devhost;
const APPKEY = "h5u:h5u_secret";
@ -2235,7 +2235,8 @@ if (uni.restoreGlobal) {
utils.ttsspke("请检查是否连接到无线网络");
}).finally(async (res) => {
await vue.nextTick();
uni.hideLoading();
if (loadingObj.isShowLoading !== false)
uni.hideLoading();
});
});
};
@ -8767,7 +8768,10 @@ This will fail in production if not fixed.`);
class: "userviews",
onClick: gologin
}, [
vue.createElementVNode("image", { src: "/static/userimg.png" }),
vue.createElementVNode("image", {
class: "profilePhoto",
src: "/static/appIcon/favicon.png"
}),
vue.createElementVNode("view", null, [
vue.createElementVNode("view", null, "未登录")
])
@ -8776,7 +8780,10 @@ This will fail in production if not fixed.`);
key: 1,
class: "userviews"
}, [
vue.createElementVNode("image", { src: "/static/userimg.png" }),
vue.createElementVNode("image", {
class: "profilePhoto",
src: "/static/appIcon/favicon.png"
}),
vue.createElementVNode("view", null, [
vue.createElementVNode(
"view",
@ -19919,10 +19926,6 @@ This will fail in production if not fixed.`);
}
async function ckscanningCode(item) {
let content = "请扫描托盘码";
if (!details.goodsStockupAllocationId) {
content = "请先扫描库位码";
return;
}
details.isscan = item.taryLean;
details.trayId = item.trayId;
uni.showToast({
@ -19949,9 +19952,9 @@ This will fail in production if not fixed.`);
});
return;
}
formatAppLog("log", "at pagesHome/pages/StockUplist/StockUplist.vue:357", "item :>> ", item);
formatAppLog("log", "at pagesHome/pages/StockUplist/StockUplist.vue:356", "item :>> ", item);
const _allocationList = item.allocationList.map((val) => val.name);
formatAppLog("log", "at pagesHome/pages/StockUplist/StockUplist.vue:359", "_allocationList :>> ", _allocationList);
formatAppLog("log", "at pagesHome/pages/StockUplist/StockUplist.vue:358", "_allocationList :>> ", _allocationList);
if (_allocationList.length === 1) {
return uni.navigateTo({
url: "/pagesHome/pages/setbarcode/setbarcode?item=" + JSON.stringify(item) + "&reservationId=" + details.reservationId + "&goodsAreaName=" + details.user.goodsAreaName + "&stockupId=" + details.stockupId + "&allocationId=" + item.allocationList[0].id + "&positionCode=" + item.allocationList[0].name + "&mallName=" + details.items.mallName
@ -19976,7 +19979,7 @@ This will fail in production if not fixed.`);
});
return;
}
formatAppLog("log", "at pagesHome/pages/StockUplist/StockUplist.vue:392", "deta :>> ", deta);
formatAppLog("log", "at pagesHome/pages/StockUplist/StockUplist.vue:391", "deta :>> ", deta);
const _index = deta.checklist[0];
uni.navigateTo({
url: "/pagesHome/pages/setbarcode/setbarcode?item=" + JSON.stringify(item) + "&reservationId=" + details.reservationId + "&goodsAreaName=" + details.user.goodsAreaName + "&stockupId=" + details.stockupId + "&allocationId=" + item.allocationList[_index].id + "&positionCode=" + item.allocationList[_index].name + "&mallName=" + details.items.mallName
@ -20014,7 +20017,7 @@ This will fail in production if not fixed.`);
utils2.ttsspke(res.audio);
basicContainer.value.startPullDownRefresh();
} catch (err) {
formatAppLog("log", "at pagesHome/pages/StockUplist/StockUplist.vue:453", "err :>> ", err);
formatAppLog("log", "at pagesHome/pages/StockUplist/StockUplist.vue:452", "err :>> ", err);
} finally {
details.isscan = false;
uni.hideLoading();
@ -20022,9 +20025,9 @@ This will fail in production if not fixed.`);
};
function scanChooseStorage() {
const _allocationList = details.chooseItem.allocationList;
formatAppLog("log", "at pagesHome/pages/StockUplist/StockUplist.vue:464", "_allocationList :>> ", _allocationList);
formatAppLog("log", "at pagesHome/pages/StockUplist/StockUplist.vue:463", "_allocationList :>> ", _allocationList);
const _item = _allocationList.find((val) => val.id + "" === details.scancode + "");
formatAppLog("log", "at pagesHome/pages/StockUplist/StockUplist.vue:466", "_item :>> ", _item);
formatAppLog("log", "at pagesHome/pages/StockUplist/StockUplist.vue:465", "_item :>> ", _item);
if (!_item)
return uni.showToast({
title: "该货位无此物料",
@ -20056,7 +20059,7 @@ This will fail in production if not fixed.`);
let inpList = [];
if (code2 !== 200)
return;
formatAppLog("log", "at pagesHome/pages/StockUplist/StockUplist.vue:513", "res.data :>> ", res.data);
formatAppLog("log", "at pagesHome/pages/StockUplist/StockUplist.vue:512", "res.data :>> ", res.data);
inpList = res.data.map((val) => {
return {
id: val.id,
@ -20100,7 +20103,7 @@ This will fail in production if not fixed.`);
confirmTxt: "确认选择",
isonecheck: true,
success: async (deta) => {
formatAppLog("log", "at pagesHome/pages/StockUplist/StockUplist.vue:562", "deta :>> ", deta);
formatAppLog("log", "at pagesHome/pages/StockUplist/StockUplist.vue:561", "deta :>> ", deta);
if (deta.inpList.length === 0 || item.completeStact)
return tiplists.value.setdetails({ isshow: false });
let data2 = {
@ -20114,7 +20117,7 @@ This will fail in production if not fixed.`);
if (deta.inpList[0].allocationId)
data2.allocationId = deta.inpList[0].allocationId;
const _flag = deta.inpList.every((val) => {
formatAppLog("log", "at pagesHome/pages/StockUplist/StockUplist.vue:574", "val :>> ", val);
formatAppLog("log", "at pagesHome/pages/StockUplist/StockUplist.vue:573", "val :>> ", val);
if (val.value < val.minNum) {
uni.showToast({
title: "不能小于当前数量"
@ -20122,7 +20125,7 @@ This will fail in production if not fixed.`);
return false;
}
if (val.value > val.minNum) {
formatAppLog("log", "at pagesHome/pages/StockUplist/StockUplist.vue:582", "1 :>> ", 1);
formatAppLog("log", "at pagesHome/pages/StockUplist/StockUplist.vue:581", "1 :>> ", 1);
data2.list.push({
firsts: val.title,
id: val.id,
@ -20141,7 +20144,7 @@ This will fail in production if not fixed.`);
});
}
const res2 = await postZeroStockUp(data2);
formatAppLog("log", "at pagesHome/pages/StockUplist/StockUplist.vue:603", "res :>> ", res2);
formatAppLog("log", "at pagesHome/pages/StockUplist/StockUplist.vue:602", "res :>> ", res2);
const { code: code22 } = res2;
if (code22 === 200) {
tiplists.value.setdetails({ isshow: false });
@ -20160,7 +20163,7 @@ This will fail in production if not fixed.`);
});
}
function printOrderCode(item) {
formatAppLog("log", "at pagesHome/pages/StockUplist/StockUplist.vue:629", "item :>> ", item);
formatAppLog("log", "at pagesHome/pages/StockUplist/StockUplist.vue:628", "item :>> ", item);
tiplists.value.setdetails({
title: "生成订单编号二维码数量",
isshow: true,
@ -20192,7 +20195,7 @@ This will fail in production if not fixed.`);
for (let i = 0; i <= _inputValue; i++) {
if (_isReturn)
return;
formatAppLog("log", "at pagesHome/pages/StockUplist/StockUplist.vue:664", "i :>> ", i);
formatAppLog("log", "at pagesHome/pages/StockUplist/StockUplist.vue:663", "i :>> ", i);
let text = "! 0 200 200 330 1\r\n";
text += "SETBOLD 2\r\n";
text += `T 56 0 0 0 ${item.orderCode}\r
@ -20222,7 +20225,7 @@ This will fail in production if not fixed.`);
text += "FORM\r\n";
text += "PRINT\r\n";
let sylist = utils2.initbl();
formatAppLog("log", "at pagesHome/pages/StockUplist/StockUplist.vue:686", sylist);
formatAppLog("log", "at pagesHome/pages/StockUplist/StockUplist.vue:685", sylist);
utils2.getbl(bluetoothInfo.value, text).catch(() => {
bluetoothList.value.setdetails({ isshow: true });
_isReturn = true;
@ -24358,7 +24361,7 @@ This will fail in production if not fixed.`);
uni.$off("scancodedate");
uni.$on("scancodedate", function(code2) {
if (code2) {
formatAppLog("log", "at pagesHome/pages/CustomerOrdersDetails/CustomerOrdersDetails.vue:296", "code", code2);
formatAppLog("log", "at pagesHome/pages/CustomerOrdersDetails/CustomerOrdersDetails.vue:297", "code", code2);
details.scancode = code2;
details.isscan = true;
scandata();
@ -24379,7 +24382,7 @@ This will fail in production if not fixed.`);
vue.onMounted(async () => {
await vue.nextTick();
details.scrollHeight = utils2.getViewDistanceFormTop(".scve").then((res) => {
formatAppLog("log", "at pagesHome/pages/CustomerOrdersDetails/CustomerOrdersDetails.vue:326", "res :>> ", res);
formatAppLog("log", "at pagesHome/pages/CustomerOrdersDetails/CustomerOrdersDetails.vue:327", "res :>> ", res);
details.scrollHeight = res;
});
});
@ -24389,14 +24392,14 @@ This will fail in production if not fixed.`);
num += details.order.data.reduce((curr, item) => curr + item.loadingNub, 0);
if (details.zero.data)
num += details.zero.data.reduce((curr, item) => curr + item.loadingNub, 0);
formatAppLog("log", "at pagesHome/pages/CustomerOrdersDetails/CustomerOrdersDetails.vue:362", "details.stock.data :>> ", details.stock.data);
formatAppLog("log", "at pagesHome/pages/CustomerOrdersDetails/CustomerOrdersDetails.vue:363", "details.stock.data :>> ", details.stock.data);
if (details.stock.data)
num += details.stock.data.reduce((curr, item) => {
if (item.loadingStatusName !== "未装车")
return curr += 1;
return curr;
}, 0);
formatAppLog("log", "at pagesHome/pages/CustomerOrdersDetails/CustomerOrdersDetails.vue:367", "num :>> ", num);
formatAppLog("log", "at pagesHome/pages/CustomerOrdersDetails/CustomerOrdersDetails.vue:368", "num :>> ", num);
return num;
});
function showsdqs() {
@ -24420,6 +24423,7 @@ This will fail in production if not fixed.`);
});
}
async function initpage() {
details.listcheckindex = -1;
try {
let data = {
reservationId: details.items.id,
@ -24438,7 +24442,7 @@ This will fail in production if not fixed.`);
else
details.datalist = details.stock.data;
} catch (err) {
formatAppLog("log", "at pagesHome/pages/CustomerOrdersDetails/CustomerOrdersDetails.vue:412", "err :>> ", err);
formatAppLog("log", "at pagesHome/pages/CustomerOrdersDetails/CustomerOrdersDetails.vue:415", "err :>> ", err);
} finally {
return null;
}
@ -24457,7 +24461,7 @@ This will fail in production if not fixed.`);
details.order.data.push(val);
});
} catch (err) {
formatAppLog("log", "at pagesHome/pages/CustomerOrdersDetails/CustomerOrdersDetails.vue:435", "err :>> ", err);
formatAppLog("log", "at pagesHome/pages/CustomerOrdersDetails/CustomerOrdersDetails.vue:438", "err :>> ", err);
}
}
async function initPageStock(submitData) {
@ -24470,7 +24474,7 @@ This will fail in production if not fixed.`);
details.stock.data = data || [];
return response;
} catch (err) {
formatAppLog("log", "at pagesHome/pages/CustomerOrdersDetails/CustomerOrdersDetails.vue:453", "err :>> ", err);
formatAppLog("log", "at pagesHome/pages/CustomerOrdersDetails/CustomerOrdersDetails.vue:456", "err :>> ", err);
}
}
function checktype(e) {
@ -24499,7 +24503,7 @@ This will fail in production if not fixed.`);
details.datalist = details.zero.data;
else
details.datalist = details.stock.data;
formatAppLog("log", "at pagesHome/pages/CustomerOrdersDetails/CustomerOrdersDetails.vue:491", " details.datalist :>> ", details.datalist);
formatAppLog("log", "at pagesHome/pages/CustomerOrdersDetails/CustomerOrdersDetails.vue:494", " details.datalist :>> ", details.datalist);
}
function reatchBootomOrder() {
if (details.order.pages <= details.order.page.current) {
@ -24532,7 +24536,7 @@ This will fail in production if not fixed.`);
initpage();
}
function reatchBottom() {
formatAppLog("log", "at pagesHome/pages/CustomerOrdersDetails/CustomerOrdersDetails.vue:540", "111 :>> ", 111);
formatAppLog("log", "at pagesHome/pages/CustomerOrdersDetails/CustomerOrdersDetails.vue:543", "111 :>> ", 111);
if (details.orderStatus === 1)
reatchBootomOrder();
else if (details.orderStatus === 2)
@ -24541,6 +24545,7 @@ This will fail in production if not fixed.`);
reatchBootomStock();
}
async function scandata() {
let code2 = 0;
try {
let loadingId = uni.getStorageSync("checkvehicle").id;
if (details.orderStatus == 1) {
@ -24552,7 +24557,8 @@ This will fail in production if not fixed.`);
barcode: details.scancode
};
let res = await deliveryloadingscan(data);
const { code: code2, audio } = res;
const { audio } = res;
code2 = res.code;
if (code2 === 5e3) {
utils2.ttsspke("不在本次计划, 是否继续装车");
tiplists.value.setdetails({
@ -24571,7 +24577,10 @@ This will fail in production if not fixed.`);
barcode: details.scancode
};
const res2 = await postAbnormalTruckLoading(data2);
formatAppLog("log", "at pagesHome/pages/CustomerOrdersDetails/CustomerOrdersDetails.vue:587", "res :>> ", res2);
if (res2.code !== 200)
return;
basicContainer.value.startPullDownRefresh();
formatAppLog("log", "at pagesHome/pages/CustomerOrdersDetails/CustomerOrdersDetails.vue:597", "res :>> ", res2);
tiplists.value.setdetails({ isshow: false });
},
cancel: () => {
@ -24594,13 +24603,13 @@ This will fail in production if not fixed.`);
};
let res = await deliveryloadinginventory(data);
const { audio } = res;
formatAppLog("log", "at pagesHome/pages/CustomerOrdersDetails/CustomerOrdersDetails.vue:611", "res :>> ", res);
formatAppLog("log", "at pagesHome/pages/CustomerOrdersDetails/CustomerOrdersDetails.vue:621", "res :>> ", res);
if (!audio)
return;
utils2.ttsspke(res.audio);
}
} catch (err) {
formatAppLog("log", "at pagesHome/pages/CustomerOrdersDetails/CustomerOrdersDetails.vue:618", "err :>> ", err);
formatAppLog("log", "at pagesHome/pages/CustomerOrdersDetails/CustomerOrdersDetails.vue:628", "err :>> ", err);
} finally {
basicContainer.value.startPullDownRefresh();
}
@ -24659,7 +24668,7 @@ This will fail in production if not fixed.`);
}
basicContainer.value.startPullDownRefresh();
} catch (err) {
formatAppLog("log", "at pagesHome/pages/CustomerOrdersDetails/CustomerOrdersDetails.vue:686", "err :>> ", err);
formatAppLog("log", "at pagesHome/pages/CustomerOrdersDetails/CustomerOrdersDetails.vue:696", "err :>> ", err);
} finally {
uni.hideLoading();
tiplists.value.setdetails({ isshow: false });
@ -24965,23 +24974,19 @@ This will fail in production if not fixed.`);
class: vue.normalizeClass({ "active": Number(ite.isAbnormalLoading) === 1 || Number(ite.isAbnnormalSigning) === 1 })
}, {
default: vue.withCtx(() => [
vue.createVNode(
_component_uni_td,
null,
{
default: vue.withCtx(() => [
vue.createTextVNode(
vue.toDisplayString(ite.orderPackageCode),
1
/* TEXT */
)
]),
_: 2
/* DYNAMIC */
},
1024
/* DYNAMIC_SLOTS */
),
vue.createVNode(_component_uni_td, {
class: vue.normalizeClass({ "isScan": ite.orderPackageLoadingStatus !== "20" })
}, {
default: vue.withCtx(() => [
vue.createTextVNode(
vue.toDisplayString(ite.orderPackageCode),
1
/* TEXT */
)
]),
_: 2
/* DYNAMIC */
}, 1032, ["class"]),
vue.createVNode(
_component_uni_td,
null,
@ -26243,32 +26248,20 @@ This will fail in production if not fixed.`);
orderType: "",
inputtxt: "",
listcheckindex: -1,
scrollHeight: ""
scrollHeight: "",
/** 计划件数 */
Plannednub: 0,
/** 签收数 */
signNub: 0
});
const tiplists = vue.ref(null);
const tip = vue.ref(null);
const Plannednub = vue.computed(() => {
let num = 0;
num += details.orderArr.reduce((curr, item) => curr + item.reservationNum, 0);
num += details.zeroArr.reduce((curr, item) => curr + item.reservationNum, 0);
num += details.stockArr.reduce((curr, item) => curr + item.reservationNum, 0);
return num;
});
const ordNub = vue.computed(() => {
let num = 0;
num += details.orderArr.length;
num += details.zeroArr.length;
return num;
});
const signNub = vue.computed(() => {
let num = 0;
details.datalist.map((item) => {
if (item.signforNub) {
num += item.signforNub;
}
});
return num;
});
onLoad(async (op) => {
utils2.ttsspke("请扫描包条码");
details.items = JSON.parse(op.item);
@ -26280,7 +26273,7 @@ This will fail in production if not fixed.`);
uni.$off("scancodedate");
uni.$on("scancodedate", function(code2) {
if (code2) {
formatAppLog("log", "at pagesHome/pages/signOrderScan/signOrderScan.vue:256", code2);
formatAppLog("log", "at pagesHome/pages/signOrderScan/signOrderScan.vue:245", code2);
details.scancode = code2;
scandata();
}
@ -26291,14 +26284,16 @@ This will fail in production if not fixed.`);
orderCode: details.inputtxt
};
details.datalist = [];
let response = null;
response = await signfororder(data);
const promise1 = signfororder(data, { isShowLoading: false });
const promise2 = signforinventory(data, { isShowLoading: false });
uni.showLoading();
const [response, response1] = await Promise.all([promise1, promise2]);
if (response.code !== 200)
return;
details.zeroArr = [];
details.orderArr = [];
if (response.data && response.data.records)
response.data.records.forEach((val) => {
if (response.data && response.data)
response.data.forEach((val) => {
if (val.isZero === "1")
return details.zeroArr.push(val);
val.abnormalSignature = 0;
@ -26311,13 +26306,11 @@ This will fail in production if not fixed.`);
});
details.orderArr.push(val);
});
let response1 = await signforinventory(data);
if (response1.code !== 200)
return;
if (response1.data)
details.stockArr = response1.data.records || [];
formatAppLog("log", "at pagesHome/pages/signOrderScan/signOrderScan.vue:297", "response :>> ", response);
formatAppLog("log", "at pagesHome/pages/signOrderScan/signOrderScan.vue:298", "response1 :>> ", response1);
details.stockArr = response1.data || [];
computedNum();
if (details.orderStatus === 1)
details.datalist = details.orderArr;
else if (details.orderStatus === 2)
@ -26325,13 +26318,16 @@ This will fail in production if not fixed.`);
else
details.datalist = details.stockArr;
} catch (err) {
formatAppLog("log", "at pagesHome/pages/signOrderScan/signOrderScan.vue:306", "err :>> ", err);
formatAppLog("log", "at pagesHome/pages/signOrderScan/signOrderScan.vue:300", "err :>> ", err);
} finally {
await vue.nextTick();
uni.hideLoading();
}
});
vue.onMounted(async () => {
await vue.nextTick();
utils2.getViewDistanceFormTop(".scve").then((res) => {
formatAppLog("log", "at pagesHome/pages/signOrderScan/signOrderScan.vue:318", "res :>> ", res);
formatAppLog("log", "at pagesHome/pages/signOrderScan/signOrderScan.vue:315", "res :>> ", res);
details.scrollHeight = res;
});
});
@ -26340,15 +26336,20 @@ This will fail in production if not fixed.`);
url: "/pagesHome/pages/orderDetails/orderDetails?orderCode=" + item.orderCode
});
}
onPullDownRefresh(() => {
const timer = setTimeout(() => {
initpage();
uni.stopPullDownRefresh();
clearTimeout(timer);
}, 500);
function computedNum() {
const _arr = [...details.orderArr, ...details.zeroArr, ...details.stockArr];
details.Plannednub = 0;
details.signNub = 0;
for (let item of _arr) {
details.Plannednub += item.reservationNum;
details.signNub += item.signforNub;
}
}
onPullDownRefresh(async () => {
await initpage();
uni.stopPullDownRefresh();
});
async function scandata() {
details.listcheckindex = -1;
let data = {
barcode: details.scancode,
deliveryId: details.deliveryId,
@ -26356,7 +26357,7 @@ This will fail in production if not fixed.`);
};
if (Number(details.orderStatus) == 1) {
let response = await signforsignfor(data);
formatAppLog("log", "at pagesHome/pages/signOrderScan/signOrderScan.vue:349", response);
formatAppLog("log", "at pagesHome/pages/signOrderScan/signOrderScan.vue:355", response);
if (response.code === 200)
;
else if (response.code == 3006) {
@ -26372,11 +26373,12 @@ This will fail in production if not fixed.`);
let response2 = await signforsignforcontinue(data2);
if (response2.code !== 200)
return;
formatAppLog("log", "at pagesHome/pages/signOrderScan/signOrderScan.vue:368", response2);
formatAppLog("log", "at pagesHome/pages/signOrderScan/signOrderScan.vue:374", response2);
uni.showToast({
title: response2.msg,
icon: "none"
});
initpage();
tip.value.setdetails({ isshow: false });
},
cancel: () => {
@ -26386,6 +26388,7 @@ This will fail in production if not fixed.`);
tip.value.setdetails({ isshow: false });
}
});
return;
} else {
uni.showToast({
title: response.msg,
@ -26394,7 +26397,7 @@ This will fail in production if not fixed.`);
}
} else if (Number(details.orderStatus) === 3) {
let response = await signforsignforIn(data);
formatAppLog("log", "at pagesHome/pages/signOrderScan/signOrderScan.vue:391", response);
formatAppLog("log", "at pagesHome/pages/signOrderScan/signOrderScan.vue:400", response);
if (response.code == 3006) {
tip.value.setdetails({
isshow: true,
@ -26406,13 +26409,14 @@ This will fail in production if not fixed.`);
reservationId: details.id
};
let response2 = await signforsignforcontinue(data2);
formatAppLog("log", "at pagesHome/pages/signOrderScan/signOrderScan.vue:403", response2);
formatAppLog("log", "at pagesHome/pages/signOrderScan/signOrderScan.vue:412", response2);
if (response2.code !== 200)
return;
uni.showToast({
title: response2.msg,
icon: "none"
});
initpage();
tip.value.setdetails({ isshow: false });
},
cancel: () => {
@ -26422,6 +26426,7 @@ This will fail in production if not fixed.`);
tip.value.setdetails({ isshow: false });
}
});
return;
} else {
uni.showToast({
title: response.msg,
@ -26465,45 +26470,53 @@ This will fail in production if not fixed.`);
}
}
async function initpage() {
let data = {
reservationId: details.id,
completecode: details.orderType,
orderCode: details.inputtxt
};
details.datalist = [];
let response = null;
if (details.orderStatus == 1 || details.orderStatus === 2) {
response = await signfororder(data);
if (response.code !== 200)
return;
details.zeroArr = [];
details.orderArr = [];
response.data.records.forEach((val) => {
if (val.isZero === "1")
return details.zeroArr.push(val);
val.abnormalSignature = 0;
val.abnormalLoading = 0;
val.distributionAppParcelListVOS.forEach((value) => {
if (value.isAbnnormalSigning === 1)
val.abnormalSignature += 1;
if (value.isAbnormalLoading === 1)
val.abnormalLoading += 1;
try {
details.listcheckindex = -1;
let data = {
reservationId: details.id,
completecode: details.orderType,
orderCode: details.inputtxt
};
details.datalist = [];
let response = null;
if (details.orderStatus == 1 || details.orderStatus === 2) {
response = await signfororder(data);
if (response.code !== 200)
return;
details.zeroArr = [];
details.orderArr = [];
response.data.forEach((val) => {
if (val.isZero === "1")
return details.zeroArr.push(val);
val.abnormalSignature = 0;
val.abnormalLoading = 0;
val.distributionAppParcelListVOS.forEach((value) => {
if (value.isAbnnormalSigning === 1)
val.abnormalSignature += 1;
if (value.isAbnormalLoading === 1)
val.abnormalLoading += 1;
});
formatAppLog("log", "at pagesHome/pages/signOrderScan/signOrderScan.vue:513", "val :>> ", val);
details.orderArr.push(val);
});
formatAppLog("log", "at pagesHome/pages/signOrderScan/signOrderScan.vue:499", "val :>> ", val);
details.orderArr.push(val);
});
} else if (details.orderStatus == 3) {
response = await signforinventory(data);
if (response.code !== 200)
return;
details.stockArr = response.data.records || [];
} else if (details.orderStatus == 3) {
response = await signforinventory(data);
if (response.code !== 200)
return;
details.stockArr = response.data || [];
}
if (details.orderStatus === 1)
details.datalist = details.orderArr;
else if (details.orderStatus === 2)
details.datalist = details.zeroArr;
else
details.datalist = details.stockArr;
} catch (err) {
formatAppLog("log", "at pagesHome/pages/signOrderScan/signOrderScan.vue:531", "err :>> ", err);
} finally {
computedNum();
return null;
}
if (details.orderStatus === 1)
details.datalist = details.orderArr;
else if (details.orderStatus === 2)
details.datalist = details.zeroArr;
else
details.datalist = details.stockArr;
}
function setcheckindex(index2) {
if (details.listcheckindex == index2) {
@ -26526,7 +26539,7 @@ This will fail in production if not fixed.`);
});
}
function checkphon(item, index2) {
formatAppLog("log", "at pagesHome/pages/signOrderScan/signOrderScan.vue:540", "item :>> ", item);
formatAppLog("log", "at pagesHome/pages/signOrderScan/signOrderScan.vue:561", "item :>> ", item);
if (item.isZero === "1") {
const inpList = item.distributionParcelNumberVOS.map((val) => {
return {
@ -26568,7 +26581,7 @@ This will fail in production if not fixed.`);
parcelListDTOS: []
};
data.parcelListDTOS = deta.inpList.map((val) => {
formatAppLog("log", "at pagesHome/pages/signOrderScan/signOrderScan.vue:584", "val :>> ", val);
formatAppLog("log", "at pagesHome/pages/signOrderScan/signOrderScan.vue:605", "val :>> ", val);
return {
parcelListId: val.id,
stockArticleId: val.stockArticleId,
@ -26583,7 +26596,7 @@ This will fail in production if not fixed.`);
}
initpage();
} catch (err) {
formatAppLog("log", "at pagesHome/pages/signOrderScan/signOrderScan.vue:601", "err :>> ", err);
formatAppLog("log", "at pagesHome/pages/signOrderScan/signOrderScan.vue:622", "err :>> ", err);
} finally {
uni.hideLoading();
tiplists.value.setdetails({ isshow: false });
@ -26672,7 +26685,7 @@ This will fail in production if not fixed.`);
vue.createElementVNode(
"view",
null,
vue.toDisplayString(vue.unref(Plannednub)),
vue.toDisplayString(vue.unref(details).Plannednub),
1
/* TEXT */
)
@ -26692,7 +26705,7 @@ This will fail in production if not fixed.`);
vue.createElementVNode(
"view",
null,
vue.toDisplayString(vue.unref(signNub)),
vue.toDisplayString(vue.unref(details).signNub),
1
/* TEXT */
)
@ -26812,7 +26825,7 @@ This will fail in production if not fixed.`);
]),
vue.createElementVNode("view", { class: "contenbx1" }, [
vue.createElementVNode("view", null, [
vue.createElementVNode("text", { style: { "color": "#90A0AF" } }, "总数:"),
vue.createElementVNode("text", { style: { "color": "#90A0AF" } }, "计划:"),
vue.createTextVNode(
vue.toDisplayString(item.reservationNum),
1
@ -26837,14 +26850,6 @@ This will fail in production if not fixed.`);
])
]),
vue.createElementVNode("view", { class: "contenbx1" }, [
vue.createElementVNode("view", null, [
vue.createElementVNode("text", { style: { "color": "#90A0AF" } }, "计划:"),
vue.createTextVNode(
vue.toDisplayString(item.reservationNum),
1
/* TEXT */
)
]),
vue.createElementVNode("view", null, [
vue.createElementVNode("text", { style: { "color": "#90A0AF" } }, "异常装车:"),
vue.createTextVNode(
@ -26922,7 +26927,7 @@ This will fail in production if not fixed.`);
}, {
default: vue.withCtx(() => [
vue.createVNode(_component_uni_td, {
class: vue.normalizeClass({ "isScan": ite.orderPackageStatus === "70" })
class: vue.normalizeClass({ "isScan": ite.orderPackageStatus !== "70" })
}, {
default: vue.withCtx(() => [
vue.createTextVNode(

2
unpackage/dist/dev/app-plus/app.css vendored

@ -699,7 +699,7 @@ body {
color: #f00;
}
.tpstitl.showTitle[data-v-a3a2f036]::after {
content: "最少传入张图片";
content: "最少传入张图片";
margin-left: 0.625rem;
color: #f00;
}

4
unpackage/dist/dev/app-plus/pages/user/user.css vendored

@ -262,4 +262,8 @@
width: 100%;
height: 12.5rem;
background-color: #FA8C16da;
}
.profilePhoto {
background: #fff;
border-radius: 0.3125rem;
}

4
unpackage/dist/dev/app-plus/pagesHome/pages/CustomerOrdersDetails/CustomerOrdersDetails.css vendored

@ -830,4 +830,8 @@
}
.uni-scroll-view[data-v-6197e305] {
overflow: hidden;
}
.isScan[data-v-6197e305] {
background: var(--subjectColor);
color: #fff;
}

2
utils/request.js

@ -269,7 +269,7 @@ const HandleRequest = (params, key, loadingObj) => {
// #endif
}).finally(async res => {
await nextTick()
uni.hideLoading()
if (loadingObj.isShowLoading !== false) uni.hideLoading()
})
})

Loading…
Cancel
Save