You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
207 lines
7.3 KiB
207 lines
7.3 KiB
"use strict"; |
|
const common_vendor = require("../../../common/vendor.js"); |
|
const api_user = require("../../../api/user.js"); |
|
require("../../../utils/request.js"); |
|
require("../../../store/index.js"); |
|
require("../../../utils/functions.js"); |
|
require("../../../utils/IDCardVerification.js"); |
|
require("../../../utils/base64.js"); |
|
require("../../../config/host.js"); |
|
require("../../../utils/md5.js"); |
|
if (!Array) { |
|
const _easycom_u_icon2 = common_vendor.resolveComponent("u-icon"); |
|
const _component_BasicContainer = common_vendor.resolveComponent("BasicContainer"); |
|
const _easycom_l_calendar2 = common_vendor.resolveComponent("l-calendar"); |
|
(_easycom_u_icon2 + _component_BasicContainer + _easycom_l_calendar2)(); |
|
} |
|
const _easycom_u_icon = () => "../../../uni_modules/uview-plus/components/u-icon/u-icon.js"; |
|
const _easycom_l_calendar = () => "../../../uni_modules/l-calendar/components/l-calendar/l-calendar.js"; |
|
if (!Math) { |
|
(_easycom_u_icon + _easycom_l_calendar)(); |
|
} |
|
const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({ |
|
__name: "signinScan", |
|
setup(__props) { |
|
const basicContainer = common_vendor.ref(null); |
|
const option = { |
|
title: "签收扫描", |
|
haveData: true, |
|
async pullDownRefreshInitPage() { |
|
await init(); |
|
} |
|
}; |
|
let details = common_vendor.reactive({ |
|
datatime: "", |
|
show: false, |
|
taskTime_start: "", |
|
taskTime_end: "", |
|
datalist: [], |
|
orderList: [], |
|
stockList: [], |
|
current: 1, |
|
size: 5, |
|
checkstate: 1 |
|
}); |
|
const date = common_vendor.ref([]); |
|
function showCalendar() { |
|
details.show = !details.show; |
|
} |
|
common_vendor.watchEffect(() => { |
|
if (date.value.length != 0) { |
|
details.datatime = date.value[0] + " 至 " + date.value[1]; |
|
} |
|
}); |
|
function setstates(state) { |
|
if (details.checkstate == state) { |
|
return; |
|
} |
|
details.checkstate = state; |
|
basicContainer.value.startPullDownRefresh(); |
|
} |
|
function onConfirm(e) { |
|
console.log(e); |
|
date.value[0] = e.startDate; |
|
date.value[1] = e.endDate; |
|
details.datatime = date.value[0] + " 至 " + date.value[1]; |
|
init(); |
|
} |
|
common_vendor.onLoad(() => { |
|
date.value[0] = common_vendor.index.$u.timeFormat((/* @__PURE__ */ new Date()).valueOf() - 1e3 * 60 * 60 * 24 * 3, "yyyy-mm-dd"); |
|
date.value[1] = common_vendor.index.$u.timeFormat((/* @__PURE__ */ new Date()).valueOf(), "yyyy-mm-dd"); |
|
details.current = 1; |
|
}); |
|
common_vendor.onShow(() => { |
|
const timer = setTimeout(() => { |
|
basicContainer.value.startPullDownRefresh(); |
|
clearTimeout(timer); |
|
}, 200); |
|
}); |
|
async function init() { |
|
details.current = 1; |
|
return await initpage(); |
|
} |
|
function jiazai() { |
|
details.current++; |
|
initpage(); |
|
} |
|
async function initpage() { |
|
let data = { |
|
current: details.current, |
|
size: details.size, |
|
taskTime_start: date.value[0], |
|
taskTime_end: date.value[1], |
|
type: details.checkstate |
|
}; |
|
let response = await api_user.signforpage(data); |
|
console.log("111 :>> ", 111); |
|
if (response.code !== 200) |
|
return; |
|
console.log("response :>> ", response); |
|
if (details.current == 1) { |
|
if (details.checkstate === data.type) { |
|
details.datalist = response.data.records; |
|
} |
|
} else { |
|
if (response.data.records.lngth == 0) { |
|
common_vendor.index.showToast({ |
|
title: "已经到底了。", |
|
icon: "none" |
|
}); |
|
details.current--; |
|
return; |
|
} |
|
if (details.checkstate === data.type) { |
|
details.datalist = details.datalist.concat(response.data.records); |
|
} |
|
} |
|
return; |
|
} |
|
function showtime(value) { |
|
console.log(value); |
|
details.show = value; |
|
} |
|
function gocustomersign(item) { |
|
common_vendor.index.navigateTo({ |
|
url: "/pagesHome/pages/CustomerSign/CustomerSign?item=" + JSON.stringify(item) |
|
}); |
|
} |
|
function goSignDetailScan(item) { |
|
console.log("item :>> ", item); |
|
common_vendor.index.navigateTo({ |
|
url: "/pagesHome/pages/SignDetailScan/SignDetailScan?item=" + JSON.stringify(item) |
|
}); |
|
} |
|
function cleartime() { |
|
details.datatime = ""; |
|
date.value = []; |
|
init(); |
|
} |
|
const { checkstate, datatime, datalist, show } = common_vendor.toRefs(details); |
|
return (_ctx, _cache) => { |
|
return common_vendor.e({ |
|
a: common_vendor.o(($event) => setstates(1)), |
|
b: common_vendor.n(common_vendor.unref(checkstate) == 1 ? "xz" : ""), |
|
c: common_vendor.o(($event) => setstates(2)), |
|
d: common_vendor.n(common_vendor.unref(checkstate) == 2 ? "xz" : ""), |
|
e: common_vendor.unref(datatime), |
|
f: !common_vendor.unref(datatime) |
|
}, !common_vendor.unref(datatime) ? { |
|
g: common_vendor.o(($event) => showtime(true)), |
|
h: common_vendor.p({ |
|
name: "calendar", |
|
color: "#999999", |
|
size: "50" |
|
}) |
|
} : { |
|
i: common_vendor.o(cleartime), |
|
j: common_vendor.p({ |
|
name: "close-circle", |
|
color: "#999999", |
|
size: "40" |
|
}) |
|
}, { |
|
k: common_vendor.o(() => { |
|
}), |
|
l: common_vendor.o(($event) => showtime(true)), |
|
m: common_vendor.o(init), |
|
n: common_vendor.f(common_vendor.unref(datalist), (item, k0, i0) => { |
|
return { |
|
a: common_vendor.t(item == null ? void 0 : item.noteNumber), |
|
b: common_vendor.t(item == null ? void 0 : item.type_name), |
|
c: common_vendor.t(item == null ? void 0 : item.deliStatus_name), |
|
d: common_vendor.t(item == null ? void 0 : item.vehicleName), |
|
e: common_vendor.t(item == null ? void 0 : item.driverName), |
|
f: common_vendor.t(item == null ? void 0 : item.loadingTeamName), |
|
g: common_vendor.t(item == null ? void 0 : item.isstock), |
|
h: common_vendor.t(item == null ? void 0 : item.consignee), |
|
i: common_vendor.t(item == null ? void 0 : item.taskTime), |
|
j: common_vendor.t((item == null ? void 0 : item.customersNumber) || 0), |
|
k: common_vendor.o(($event) => gocustomersign(item)), |
|
l: common_vendor.t((item == null ? void 0 : item.orderNumber) || 0), |
|
m: common_vendor.o(($event) => goSignDetailScan(item)), |
|
n: common_vendor.t((item == null ? void 0 : item.deliveryNumber) || 0), |
|
o: common_vendor.t((item == null ? void 0 : item.signNub) || 0), |
|
p: common_vendor.t((item == null ? void 0 : item.inventoryNub) || 0) |
|
}; |
|
}), |
|
o: common_vendor.o(jiazai), |
|
p: common_vendor.sr(basicContainer, "badb2eb8-0", { |
|
"k": "basicContainer" |
|
}), |
|
q: common_vendor.p({ |
|
option |
|
}), |
|
r: common_vendor.o(showCalendar), |
|
s: common_vendor.o(onConfirm), |
|
t: common_vendor.o(($event) => common_vendor.isRef(show) ? show.value = $event : null), |
|
v: common_vendor.p({ |
|
initStartDate: date.value[0], |
|
initEndDate: date.value[1], |
|
value: common_vendor.unref(show) |
|
}) |
|
}); |
|
}; |
|
} |
|
}); |
|
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__file", "D:/worksp/logpm/pagesHome/pages/signinScan/signinScan.vue"]]); |
|
wx.createPage(MiniProgramPage);
|
|
|