diff --git a/api/partner.js b/api/partner.js
index a7ddcde..5dff2d0 100644
--- a/api/partner.js
+++ b/api/partner.js
@@ -1,12 +1,14 @@
const login = '/users/admin-login' //登录
const loginInfo = '/users/get-info' //登录信息
+const getPartnerList = '/dealer/get-list'//经销商列表
const getPartner = '/dealer/get-one' //经销商信息
+const editPartner = '/dealer/modify' //修改经销商信息
const getPackageList = '/new-install/packages' //套餐购买列表
-
const createNewOrder = '/new-install/create' //创建新装工单
+
const phoneSearch = '/customer/phone-search' //搜索客户电话
const getproductList = '/water/dealer/deposit_pack_product'//新增工单产品
@@ -28,8 +30,69 @@ const getOrderPairList = '/order-repair/list'
const getOrderPairListInfo = '/order-repair/one'
const assignPartReplaceMaster = '/part_replace/assign' //指派
+
+const getNewOrder = '/new-install/list' //新增工单列表
+const newOrderDesc = '/new-install/one' //新装工单详情
+const BeActive = '/new-install/active-device' //新装工单激活
+const completeNewOrder = '/new-install/complete' //新装工单完成
+const cancelNewOrder = '/water/new-install-cancel'
+
+
+const gerRepairOrder = '/order-repair/list' //维修工单列表
+const RepairOrderDesc = '/order-repair/one'//维修工单详情
+const completeRepairOrder = '/order-repair/complete'//完成维修工单
+const assignRepairMaster = '/order-repair/assign' //维修工单指派师傅
+
+
+const getPartOrder = '/part_replace/list' //更换工单列表
+const PartOrderDesc = '/part_replace/one' //滤芯更换详情
+const completePartOrder = '/part_replace/complete-part-replace'//完成更换
+
+const getUninstallOrder = '/uninstall/list' //拆除工单列表
+const getUninstallDesc = '/uninstall/one' //拆除工单详情
+const unintsall = '/uninstall/complete' //完成拆除
+const operate = '/uninstall/operate' //报废 入库
+
+const boardInfo = '/waters/board-info-query'
+const getDeviceByCode = '/device/qrcode' //扫码
+const ScanQrcodeInNewOrder = '/water/new-install-device-code'
+const allocation = '/device/allocation' //设备分配
+
+const UninstallAllocation = '/uninstall/allocation'//分配拆除工单
+
+
+const getEquipmentStock = '/product/inventory-list'//设备库存
+const getEquipmentStockInfo = '/inventory/info' //设备库存-设备详情
+const getFilterStock = ''
+const getFilterStockInfo = ''
+
const apiArr = {
+ getDeviceByCode,
+ assignRepairMaster,
+ UninstallAllocation,
+ ScanQrcodeInNewOrder,
+ getEquipmentStock,
+ getEquipmentStockInfo,
+ allocation,
+ operate,
+ unintsall,
+ completeRepairOrder,
+ newOrderDesc,
+ BeActive,
+ getPartnerList,
+ completeNewOrder,
+ completePartOrder,
+ cancelNewOrder,
+ editPartner,
+ RepairOrderDesc,
+ PartOrderDesc,
+ getUninstallDesc,
+ boardInfo,
createMaster,
+ getNewOrder,
+ gerRepairOrder,
+ getPartOrder,
+ getUninstallOrder,
getOrderPairList,
getOrderPairListInfo,
masterSelect,
diff --git a/api/water_filter.js b/api/water_filter.js
index a871e7e..0f7f5fc 100644
--- a/api/water_filter.js
+++ b/api/water_filter.js
@@ -50,7 +50,6 @@ const deviceDesc = '/device/one' //设备详情
// const newOrderList = '/wechat/water/dealer/get_list_new_install' //新装工单列表
const newOrderList = '/new-install/list' //新装工单列表
-
const userNewOrderList = '/wechat/water/new-install-list' //微信新装工单列表
@@ -142,7 +141,31 @@ const scanOrder = '/wechat/trans-order/confirm' //查询是否有转账
const queryOrder = '/wechat/trans-order/success' //确认是否转账
const BeActive = '/wechat/water/dealer/active-device' //激活设备
+
+const UninstallOrder = '/uninstall/create'//创建拆机工单
+const deviceActive = '/device/active' //设备激活
+const deviceDataForce = '/waters/board-data-force' //流量充值
+const deviceDeactivation = '/waters/board-deactivation' //时长充值
+const deviceToTime = '/waters/billing-mode-to-time' //转时长
+const deviceToTraffic = '/waters/billing-mode-to-traffic' //转流量
+const deviceToRetail = '/waters/billing-mode-to-retail' //转零售
+
+
+const getServerInfo = '/wechat/cus-server-info' //平台客服 二维码
+const cusGetServerInfo = '/wechat/water/get-customer-service' //用户获取平台二维码
+
+const getTrans = '/wechat/water/trans' //品宣金
const apiArr = {
+ getServerInfo,
+ cusGetServerInfo,
+ getTrans,
+ deviceDeactivation,
+ deviceToTime,
+ deviceToTraffic,
+ deviceDataForce,
+ deviceActive,
+ deviceToRetail,
+ UninstallOrder,
cancelActivation,
queryOrder,
createUninstallOrder,
diff --git a/app.json b/app.json
index 586bdee..29f7c74 100644
--- a/app.json
+++ b/app.json
@@ -1,5 +1,6 @@
{
"pages": [
+ "pages/newLogin/newLogin",
"pages/chooseEntrance/chooseEntrance",
"pages/water_filter/water_filter",
"pages/info/info",
@@ -16,8 +17,10 @@
"pages/newOrderList/newOrderList",
"pages/newOrderListDesc/index",
"pages/RechargeRecord/RechargeRecord",
+ "pages/RechargeRecordDesc/RechargeRecordDesc",
"pages/filterChange/filterChange",
- "pages/SubscribeMessage/SubscribeMessage"
+ "pages/SubscribeMessage/SubscribeMessage",
+ "pages/renewalRecord/renewalRecord"
],
"subPackages": [
{
@@ -72,12 +75,14 @@
{
"root": "packages/master",
"pages":[
+ "masterIndex/index",
"order/index",
"orderDesc/index",
"PersonCen/index",
"masterInfo/index",
"device/index",
- "deviceInfo/index"
+ "deviceInfo/index",
+ "addNewOrder/index"
]
},
{
@@ -85,6 +90,9 @@
"pages": [
"pages/login/login",
"pages/partner",
+ "pages/OrderMsg/OrderMsg",
+ "pages/OrderMsgInfo/OrderMsgInfo",
+ "pages/distributor/distributor",
"pages/purchaseGoods/purchaseGoods",
"pages/WorkOrder/WorkOrder",
"pages/newWorkOrder/newWorkOrder",
@@ -103,7 +111,20 @@
"pages/income/income",
"pages/incomeDesc/incomeDesc",
"pages/incomeDetail/incomeDetail",
- "pages/addNewOrder/addNewOrder"
+ "pages/addNewOrder/addNewOrder",
+ "pages/chooseDevice/chooseDevice",
+ "pages/chooseRepairDevice/chooseRepairDevice",
+ "pages/editAdmin/editAdmin",
+ "pages/device/device",
+ "pages/equipmentStock/equipmentStock",
+ "pages/filterStock/filterStock",
+ "pages/filterStockInfo/filterStockInfo",
+ "pages/deviceDesc/deviceDesc",
+ "pages/mine/mine",
+ "pages/marketingOrder1/marketingOrder1",
+ "pages/marketingOrder2/marketingOrder2",
+ "pages/order1/order1",
+ "pages/order2/order2"
]
}
],
diff --git a/component/masterFooter/index.js b/component/masterFooter/index.js
index e284630..1c16fcd 100644
--- a/component/masterFooter/index.js
+++ b/component/masterFooter/index.js
@@ -16,8 +16,8 @@ Component({
data: {
nav_list:[
{
- url:"/packages/master/order/index",
- nav_name:"订单",
+ url:"/packages/master/masterIndex/index",
+ nav_name:"首页",
photo:"https://wechat-img-file.oss-cn-beijing.aliyuncs.com/water_filter/partner/partner_icon3.png?1"
},
{
diff --git a/component/partnerFooter/index.js b/component/partnerFooter/index.js
new file mode 100644
index 0000000..ba08694
--- /dev/null
+++ b/component/partnerFooter/index.js
@@ -0,0 +1,50 @@
+import apiAddr from '../../api/base';
+import { setData } from '../../utils/index';
+
+Component({
+
+ /**
+ * 组件的属性列表
+ */
+ properties: {
+
+ },
+
+ /**
+ * 组件的初始数据
+ */
+ data: {
+ nav_list:[
+ {
+ url:"/packages/partner/pages/partner",
+ nav_name:"首页",
+ photo:"https://wechat-img-file.oss-cn-beijing.aliyuncs.com/water_filter/partner/partner_icon3.png?1"
+ },
+ {
+ url:"/packages/partner/pages/mine/mine",
+ nav_name:"我的",
+ photo:"https://zhsq.hshuishang.com/attachs/navigation/2024/12/23/6768c0b16ce89.png"
+ },
+ ],
+ foot_width:'50%',
+ },
+
+ /**
+ * 组件的方法列表
+ */
+ methods: {
+
+ jump(e){
+ wx.redirectTo({
+ url: e.currentTarget.dataset.url,
+ })
+ },
+
+ },
+
+ lifetimes: {
+ attached: function () {
+ // 组件被添加到页面节点树时执行
+ },
+ },
+})
\ No newline at end of file
diff --git a/component/partnerFooter/index.json b/component/partnerFooter/index.json
new file mode 100644
index 0000000..011372e
--- /dev/null
+++ b/component/partnerFooter/index.json
@@ -0,0 +1,4 @@
+{
+ "component": true,
+ "usingComponents": {}
+}
\ No newline at end of file
diff --git a/component/partnerFooter/index.wxml b/component/partnerFooter/index.wxml
new file mode 100644
index 0000000..08df2e1
--- /dev/null
+++ b/component/partnerFooter/index.wxml
@@ -0,0 +1,9 @@
+
\ No newline at end of file
diff --git a/component/partnerFooter/index.wxss b/component/partnerFooter/index.wxss
new file mode 100644
index 0000000..4f0490b
--- /dev/null
+++ b/component/partnerFooter/index.wxss
@@ -0,0 +1,3 @@
+/* pages/public/footer.wxss */
+@import "../../app.wxss";
+
diff --git a/component/wan-select/index.js b/component/wan-select/index.js
new file mode 100644
index 0000000..111037b
--- /dev/null
+++ b/component/wan-select/index.js
@@ -0,0 +1,132 @@
+// components/wan-select/select.js
+Component({
+ options: {
+ addGlobalClass: true,
+ },
+ properties: {
+ /* --------- 样式参数 --------- */
+ titleWidth: { // 标题长度
+ type: String,
+ value: "60px"
+ },
+ bgColor: { // 输入框背景颜色
+ type: String,
+ value: "#fff"
+ },
+ itemBgColor: { // 选中的选项背景颜色
+ type: String,
+ value: "#F5F8FE"
+ },
+ textColor: { // 选中的字体颜色
+ type: String,
+ value: "#3772E9"
+ },
+ /* --------- 数据参数 --------- */
+ title: { // 下拉框标题
+ type: String,
+ value: ""
+ },
+ options: { // 选项数组
+ type: Array,
+ value: [],
+ },
+ labelName: { // 选项数组-绑定的label名称
+ type: String,
+ value: "dictLabel",
+ },
+ valueName: { // 选项数组-绑定的value名称
+ type: String,
+ value: "dictValue"
+ },
+ modelValue: { // 绑定的value
+ type: String,
+ value: "",
+ observer: function () {
+ //如果有默认值,需要匹配出name,所以这里使用obersver,当父组件中值改变时触发
+ this.handleData();
+ }
+ },
+ placeholder: { // 输入框为空时占位符
+ type: String,
+ value: "请选择"
+ },
+ disabled: { // 是否禁用
+ type: Boolean,
+ value: false
+ },
+ readonly: { // 是否只读
+ type: Boolean,
+ value: false
+ }
+ },
+ /**
+ * 页面的初始数据
+ */
+ data: {
+ show: false, //选项框及图标展示
+ selectValue: "", //选中的value
+ selectLabel: "", //选中的label
+ toTop: false, // 下拉框是否展示在输入框上方
+ },
+ attached() {
+ this.handleData()
+ },
+ methods: {
+ // 清空输入框
+ clearInput() {
+ this.setData({
+ selectValue: "", //选中的value
+ selectLabel: "", //选中的label
+ show: false,
+ })
+ },
+ // 下拉框收起和展开
+ changeShow(e) {
+ let that = this
+ const query = wx.createSelectorQuery();
+ // 选择当前点击的 view 元素
+ query.select('.inputPlaceholder').boundingClientRect();
+ query.exec(function (res) { // res[0].bottom 是元素距离可视区域顶部的距离加上元素自身的高度; res[1].scrollTop 是页面的滚动距离
+ var show = !that.data.show
+ if (res[0]) {
+ /* that.triggerEvent("handleShow", show); // [暂未发现]处理滚动选项区域时背景页面滚动问题 */
+ let toBottom = wx.getSystemInfoSync().windowHeight - res[0].bottom;
+ console.log('距离设备底部的距离:', toBottom);
+ that.setData({
+ toTop: toBottom < 160 ? true : false,
+ show: show
+ })
+ } else {
+ that.setData({ show: show })
+ }
+ });
+ },
+ // 选择数据后回显
+ handleChange(e) {
+ let { item } = e.currentTarget.dataset
+ let { labelName, valueName } = this.data
+ this.setData({
+ selectValue: item[valueName],
+ selectLabel: item[labelName],
+ show: false
+ })
+ let obj = {}
+ obj[valueName] = item[valueName]
+ obj[labelName] = item[labelName]
+ this.triggerEvent("handleChange", obj);// 传参
+ },
+ // 匹配值并回显
+ handleData() {
+ let { modelValue, options, valueName, labelName } = this.properties;
+ if (modelValue) {
+ let item = options.find(r => r[valueName] == modelValue)
+ this.setData({
+ selectLabel: item ? item[labelName] : modelValue,
+ selectValue: modelValue,
+ });
+ }
+ }
+ }
+ })
+
+
\ No newline at end of file
diff --git a/component/wan-select/index.json b/component/wan-select/index.json
new file mode 100644
index 0000000..6aec2a2
--- /dev/null
+++ b/component/wan-select/index.json
@@ -0,0 +1,5 @@
+{
+ "component": true,
+ "usingComponents": {}
+ }
+
\ No newline at end of file
diff --git a/component/wan-select/index.wxml b/component/wan-select/index.wxml
new file mode 100644
index 0000000..0663294
--- /dev/null
+++ b/component/wan-select/index.wxml
@@ -0,0 +1,40 @@
+
+
+
+ {{title}}
+
+
+
+ {{selectLabel}}
+ {{placeholder}}
+
+
+
+
+
+ {{selectLabel}}
+
+
+
+
+ {{placeholder}}
+
+
+
+
+
+
+
+
+
+
+ 暂无数据
+
+ {{item[labelName]}}
+
+
+
+
+
\ No newline at end of file
diff --git a/component/wan-select/index.wxss b/component/wan-select/index.wxss
new file mode 100644
index 0000000..773e3d6
--- /dev/null
+++ b/component/wan-select/index.wxss
@@ -0,0 +1,100 @@
+/* components/wan-select/select.wxss */
+.select_all_view {
+ display: flex;
+ justify-content: start;
+ align-items: start;
+ }
+
+ .select_view {
+ /* min-width: 200rpx; */
+ min-height: 64rpx;
+ }
+
+ .inputPlaceholder {
+ font-size: 28rpx;
+ }
+
+ .icon {
+ position: absolute;
+ right: 12rpx;
+ top: 20rpx;
+ }
+
+ .contentItem {
+ height: 64rpx;
+ }
+
+ .content {
+ width: calc(100% - 4px);
+ margin-left: 2px;
+ position: absolute;
+ z-index: 999;
+ max-height: 296rpx;
+ background: #FFFFFF;
+ /* border: 1px solid #ccc; */
+ box-shadow: 0 0 4px #ccc;
+ opacity: 1;
+ /* margin-top: 10rpx; */
+ overflow-x: hidden;
+ overflow-y: scroll;
+ }
+
+ .triangleBox {
+ position: absolute;
+ z-index: 1000;
+ left: 30rpx;
+ }
+
+ .triangle {
+ position: relative;
+ border-left: 12rpx solid transparent;
+ border-right: 12rpx solid transparent;
+ border-bottom: 10rpx solid #ccc;
+ }
+
+ .triangle::after {
+ content: '';
+ position: absolute;
+ top: 3rpx;
+ left: -12rpx;
+ border-left: 12rpx solid transparent;
+ border-right: 12rpx solid transparent;
+ border-bottom: 10rpx solid #fff;
+ }
+
+ .triangleBox-top {
+ position: absolute;
+ z-index: 1000;
+ left: 30rpx;
+
+ }
+
+ .triangle-top {
+ position: relative;
+ border-left: 12rpx solid transparent;
+ border-right: 12rpx solid transparent;
+ border-top: 10rpx solid #ccc;
+ }
+
+ .triangle-top::after {
+ content: '';
+ position: absolute;
+ bottom: 3rpx;
+ left: -12rpx;
+ border-left: 12rpx solid transparent;
+ border-right: 12rpx solid transparent;
+ border-top: 10rpx solid #fff;
+ }
+
+ .is-reverse {
+ transform: rotate(180deg);
+ }
+
+ .transfer {
+ transition: transform .3s;
+ }
+
+ .no-reverse {
+ transition: rotate(0deg);
+ }
+
\ No newline at end of file
diff --git a/packages/WaterPurifier/pages/Addfriend/Addfriend.js b/packages/WaterPurifier/pages/Addfriend/Addfriend.js
index 8bc4832..f26b30d 100644
--- a/packages/WaterPurifier/pages/Addfriend/Addfriend.js
+++ b/packages/WaterPurifier/pages/Addfriend/Addfriend.js
@@ -1,116 +1,138 @@
+let util = require('../../../../utils/util')
+let apiArr = require('../../../../api/water_filter')
// packages/WaterPurifier/pages/Addfriend/Addfriend.js
Page({
- /**
- * 页面的初始数据
- */
- data: {
+ /**
+ * 页面的初始数据
+ */
+ data: {
- },
+ },
- save(){
- wx.downloadFile({
- url: 'https://wechat-img-file.oss-cn-beijing.aliyuncs.com/water_filter/customer.jpg',
- success(res) {
- if (res.statusCode === 200) {
- const tempFilePath = res.tempFilePath; // 获取临时文件路径
+ save() {
+ wx.downloadFile({
+ url: 'https://wechat-img-file.oss-cn-beijing.aliyuncs.com/water_filter/customer.jpg',
+ success(res) {
+ if (res.statusCode === 200) {
+ const tempFilePath = res.tempFilePath; // 获取临时文件路径
- // 保存图片到相册
- wx.saveImageToPhotosAlbum({
- filePath: tempFilePath,
- success() {
- wx.showToast({
- title: '保存成功',
- icon: 'success',
- });
+ // 保存图片到相册
+ wx.saveImageToPhotosAlbum({
+ filePath: tempFilePath,
+ success() {
+ wx.showToast({
+ title: '保存成功',
+ icon: 'success',
+ });
+ },
+ fail(err) {
+ console.error('保存失败', err);
+ wx.showToast({
+ title: '保存失败,请重试',
+ icon: 'none',
+ });
+ },
+ });
+ }
},
fail(err) {
- console.error('保存失败', err);
- wx.showToast({
- title: '保存失败,请重试',
- icon: 'none',
- });
+ console.error('下载失败', err);
+ wx.showToast({
+ title: '下载失败,请重试',
+ icon: 'none',
+ });
},
});
+ },
+
+ getServerInfo() {
+ let that = this
+ util.postUrl(apiArr.cusGetServerInfo, {
+ device_id:wx.getStorageSync('device_id')
+ }, res => {
+ res.qr_code = res.qr_code.startsWith('http') ? res.qr_code : util.img_url + res.qr_code
+ console.log(res.qr_code);
+ that.setData({
+ serverInfo: res
+ })
+ })
+ },
+ call(){
+ let that = this
+ wx.makePhoneCall({
+ phoneNumber: that.data.serverInfo.customer_phone,
+ })
+ },
+
+ /**
+ * 生命周期函数--监听页面加载
+ */
+ onLoad(options) {
+ wx.showShareMenu({
+ withShareTicket: true,
+ menus: ['shareAppMessage', 'shareTimeline']
+ })
+ this.getServerInfo()
+ },
+
+ /**
+ * 生命周期函数--监听页面初次渲染完成
+ */
+ onReady() {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面显示
+ */
+ onShow() {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面隐藏
+ */
+ onHide() {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面卸载
+ */
+ onUnload() {
+
+ },
+
+ /**
+ * 页面相关事件处理函数--监听用户下拉动作
+ */
+ onPullDownRefresh() {
+
+ },
+
+ /**
+ * 页面上拉触底事件的处理函数
+ */
+ onReachBottom() {
+
+ },
+
+ /**
+ * 用户点击右上角分享
+ */
+ onShareAppMessage() {
+ return {
+ title: '人人爱净水', // 分享卡片标题(必填)
+ path: '/pages/water_filter/water_filter', // 用户点击后跳转的路径(可选,默认当前页)
+ imageUrl: 'https://wechat-img-file.oss-cn-beijing.aliyuncs.com/share.png' // 自定义图片(可选,比例建议 5:4)
}
},
- fail(err) {
- console.error('下载失败', err);
- wx.showToast({
- title: '下载失败,请重试',
- icon: 'none',
- });
+ onShareTimeline() {
+ return {
+ title: '人人爱净水', // 自定义标题
+ query: '', // 自定义页面路径中的参数
+ imageUrl: 'https://wechat-img-file.oss-cn-beijing.aliyuncs.com/share.png' // 自定义分享图片路径
+ }
},
- });
-},
-
- /**
- * 生命周期函数--监听页面加载
- */
- onLoad(options) {
- wx.showShareMenu({
- withShareTicket: true,
- menus: ['shareAppMessage', 'shareTimeline']
- })
- },
-
- /**
- * 生命周期函数--监听页面初次渲染完成
- */
- onReady() {
-
- },
-
- /**
- * 生命周期函数--监听页面显示
- */
- onShow() {
-
- },
-
- /**
- * 生命周期函数--监听页面隐藏
- */
- onHide() {
-
- },
-
- /**
- * 生命周期函数--监听页面卸载
- */
- onUnload() {
-
- },
-
- /**
- * 页面相关事件处理函数--监听用户下拉动作
- */
- onPullDownRefresh() {
-
- },
-
- /**
- * 页面上拉触底事件的处理函数
- */
- onReachBottom() {
-
- },
-
- /**
- * 用户点击右上角分享
- */
- onShareAppMessage(){
- return {
- title: '人人爱净水', // 分享卡片标题(必填)
- path: '/pages/water_filter/water_filter', // 用户点击后跳转的路径(可选,默认当前页)
- imageUrl: 'https://wechat-img-file.oss-cn-beijing.aliyuncs.com/share.png' // 自定义图片(可选,比例建议 5:4)
- }
-},
-onShareTimeline() {
- return {
- title: '人人爱净水', // 自定义标题
- query: '', // 自定义页面路径中的参数
- imageUrl: 'https://wechat-img-file.oss-cn-beijing.aliyuncs.com/share.png' // 自定义分享图片路径
- }
-},
})
\ No newline at end of file
diff --git a/packages/WaterPurifier/pages/Addfriend/Addfriend.wxml b/packages/WaterPurifier/pages/Addfriend/Addfriend.wxml
index a1ab6df..221da15 100644
--- a/packages/WaterPurifier/pages/Addfriend/Addfriend.wxml
+++ b/packages/WaterPurifier/pages/Addfriend/Addfriend.wxml
@@ -1,5 +1,10 @@
-
- 保存到相册
+
+ 客服电话:
+ {{serverInfo.customer_phone}}
+
+
+
+ 长按保存二维码
\ No newline at end of file
diff --git a/packages/WaterPurifier/pages/Addfriend/Addfriend.wxss b/packages/WaterPurifier/pages/Addfriend/Addfriend.wxss
index 0c9dbdc..aab9ece 100644
--- a/packages/WaterPurifier/pages/Addfriend/Addfriend.wxss
+++ b/packages/WaterPurifier/pages/Addfriend/Addfriend.wxss
@@ -3,28 +3,29 @@ image {
height: 100%;
}
-.box{
+.box {
display: flex;
flex-direction: column;
align-items: center;
- justify-content: center;
height: 100vh;
}
-.btn {
- width: 650rpx;
- height: 80rpx;
- background: #2583FF;
- border-radius: 100rpx 100rpx 100rpx 100rpx;
- font-family: HarmonyOS Sans SC, HarmonyOS Sans SC;
- font-weight: 400;
- font-size: 36rpx;
- color: #FFFFFF;
+
+.row {
+ margin-top: 100rpx;
display: flex;
align-items: center;
justify-content: center;
- margin-top: 120rpx;
+ font-size: 30rpx;
+ color: #000;
}
-#img{
+
+.label {
+ color: #999;
+ margin-right: 10rpx;
+}
+
+#img {
width: 400rpx;
- margin-bottom: 300rpx;
+ margin-top: 120rpx;
+ margin-bottom: 60rpx;
}
\ No newline at end of file
diff --git a/packages/WaterPurifier/pages/RechargeRecord/RechargeRecord.js b/packages/WaterPurifier/pages/RechargeRecord/RechargeRecord.js
index 9a67f3b..c8d8c1f 100644
--- a/packages/WaterPurifier/pages/RechargeRecord/RechargeRecord.js
+++ b/packages/WaterPurifier/pages/RechargeRecord/RechargeRecord.js
@@ -29,14 +29,6 @@ Page({
name: "待支付",
type: "1"
},
- {
- name: "待发货",
- type: "2"
- },
- {
- name: "已发货",
- type: "3"
- },
{
name: "已支付",
type: "4"
@@ -45,14 +37,6 @@ Page({
name: "已取消",
type: "5"
},
- {
- name: "已失效",
- type: "6"
- },
- {
- name: "支付失败",
- type: "7"
- },
],
state: 0,
selectPackage: ""
diff --git a/packages/WaterPurifier/pages/RechargeRecord/RechargeRecord.wxml b/packages/WaterPurifier/pages/RechargeRecord/RechargeRecord.wxml
index 97c443a..8cbdeb5 100644
--- a/packages/WaterPurifier/pages/RechargeRecord/RechargeRecord.wxml
+++ b/packages/WaterPurifier/pages/RechargeRecord/RechargeRecord.wxml
@@ -22,14 +22,11 @@
待支付
- 代发货
- 已发货
- 已支付
+ 已支付
已取消
- 已失效
- 支付失败
-
+ 其他
+
订单名称
@@ -40,8 +37,8 @@
{{item.order_no}}
- 本次购买
- {{item.pay_time}}
+ 套餐名称
+ {{item.package_name}}
支付方式
@@ -55,6 +52,11 @@
金额
¥{{item.total_price}}
+
+ 支付时间
+ {{item.pay_time}}
+
+
去支付
diff --git a/packages/WaterPurifier/pages/device/deviceDesc/deviceDesc copy.js b/packages/WaterPurifier/pages/device/deviceDesc/deviceDesc copy.js
new file mode 100644
index 0000000..805a287
--- /dev/null
+++ b/packages/WaterPurifier/pages/device/deviceDesc/deviceDesc copy.js
@@ -0,0 +1,403 @@
+let util = require("../../../../../utils/util")
+const apiArr = require('../../../../../api/water_filter')
+const { postUrl3 } = require("../../../../../utils/util")
+
+// packages/WaterPurifier/pages/device/deviceDesc/deviceDesc.js
+Page({
+
+ /**
+ * 页面的初始数据
+ */
+ data: {
+ progress_List: [{
+ "name": "HXTH滤芯",
+ "progress": 97.41
+ },
+ {
+ "name": "RO膜滤芯",
+ "progress": 87.41
+ },
+ {
+ "name": "PP+CB滤芯",
+ "progress": 40.41
+ },
+ {
+ "name": "PP棉滤芯",
+ "progress": 90.41
+ }
+ ],
+ device_id: "",
+ Info: {},
+ show: false,
+ show2: false,
+ show3: false,
+ remarks1: "",
+ remainingDays: "",
+ surplusFlow: "",
+ },
+
+ getInfo() {
+ let that = this
+ util.postUrl(apiArr.deviceDesc, {
+ device_id: Number(that.data.device_id)
+ }, res => {
+ if (res.device_part) {
+ res.device_part.forEach(item => {
+ item.shengyuTime = that.getDaysDifference(item.expiration_time)
+ item.parent = Math.round((Number(item.shengyuTime) / Number(item.availableDays) * 100))
+ })
+
+ const first = res.device_part.findIndex(item =>
+ item.parts_name.indexOf("PP棉滤芯") !== -1
+ );
+ if (first !== -1) {
+ const [removed] = res.device_part.splice(first, 1); // 移除该对象
+ res.device_part.unshift(removed); // 插入到首位
+ }
+
+ const Second = res.device_part.findIndex(item =>
+ item.parts_name.indexOf("PP+CB") !== -1
+ );
+ if (Second !== -1) {
+ const [removed] = res.device_part.splice(Second, 1); // 移除该对象
+ res.device_part.splice(1, 0, removed); // 插入到第二位
+ }
+
+ const Third = res.device_part.findIndex(item =>
+ item.parts_name.indexOf("RO") !== -1
+ );
+ if (Third !== -1) {
+ const [removed] = res.device_part.splice(Third, 1); // 移除该对象
+ res.device_part.splice(2, 0, removed); // 插入到第二位
+ }
+
+
+ const Fourth = res.device_part.findIndex(item =>
+ item.parts_name.indexOf("后置活性炭") !== -1
+ );
+ if (Fourth !== -1) {
+ const [removed] = res.device_part.splice(Fourth, 1); // 移除该对象
+ res.device_part.splice(3, 0, removed); // 插入到第二位
+ }
+ }
+ that.setData({
+ Info: res
+ })
+ })
+ },
+
+ getDaysDifference(targetDate) {
+ // 获取当前时间
+ const now = new Date();
+ // 将传递的时间转换为日期对象
+ const target = new Date(targetDate);
+ // 计算时间差(以毫秒为单位)
+ const timeDiff = target.getTime() - now.getTime();
+ // 将毫秒转换为天数
+ const daysDiff = Math.ceil(timeDiff / (1000 * 60 * 60 * 24));
+ return daysDiff;
+ },
+
+
+ //开机
+ Open() {
+ let that = this
+ util.postUrl2(apiArr.openOff, {
+ deviceId: that.data.Info.device_id,
+ onOff: 1
+ }, res => {
+ if (res.data.params.sevice_status.value == '10') {
+ wx.showToast({
+ title: '开机成功!',
+ icon: "none"
+ })
+ that.getInfo()
+ }
+ })
+ },
+ //关机
+ Close() {
+ let that = this
+ util.postUrl2(apiArr.openOff, {
+ deviceId: that.data.Info.device_id,
+ onOff: 2
+ }, res => {
+ if (res.data.params.sevice_status.value == '00') {
+ wx.showToast({
+ title: '关机成功!',
+ icon: "none"
+ })
+ that.getInfo()
+ }
+ })
+ },
+
+ // 拆机
+ uninstall() {
+ let that = this
+ wx.showModal({
+ title: '提示',
+ content: '请确保设备通电开机状态,该操作将取消设备激活状态',
+ complete: (res) => {
+ if (res.cancel) {
+
+ }
+
+ if (res.confirm) {
+ that.setData({
+ show: true
+ })
+ }
+ }
+ })
+ },
+ createUninstall() {
+ wx.showLoading({
+ title: '加载中...',
+ mask: true
+ })
+ let that = this
+ util.postUrl(apiArr.UninstallOrder, {
+ device_id: that.data.Info.device_id,
+ remark: that.data.remarks1
+ }, res => {
+ console.log(res);
+ wx.hideLoading()
+ wx.showToast({
+ title: '拆机工单创建完成',
+ icon: "none"
+ })
+
+ setTimeout(()=>{
+ wx.navigateTo({
+ url: '/packages/partner/pages/removeOrder/removeOrder',
+ })
+ },1500)
+ })
+ },
+ // 激活
+ active() {
+ wx.showLoading({
+ title: '加载中...',
+ mask: true
+ })
+ let that = this
+ util.postUrl2(apiArr.deviceActive, {
+ device_id: that.data.Info.device_id
+ }, res => {
+ if (res.statusCode == 200) {
+ wx.showToast({
+ title: '激活成功',
+ icon: "none"
+ })
+ that.getInfo()
+
+ } else {
+ wx.showToast({
+ title: res.data.msg,
+ icon: "none"
+ })
+ }
+ wx.hideLoading()
+ })
+ },
+ //时长充值
+ recharge1() {
+ let that = this
+ that.setData({
+ show2: true
+ })
+ },
+ deviceDeactivation() {
+ let that = this
+ if(!that.isPureNumber(that.data.remainingDays)){
+ return wx.showToast({
+ title: '请输入正确到期日期',
+ icon:"none"
+ })
+ }
+ wx.showModal({
+ title: '提示',
+ content: '确定要充值时长吗?请在设备通电开机的状态下进行操作',
+ complete: (res) => {
+ if (res.cancel) {
+
+ }
+
+ if (res.confirm) {
+ wx.showLoading({
+ title: '加载中...',
+ mask: true
+ })
+ util.postUrl2(apiArr.deviceDeactivation, {
+ device_id: that.data.Info.device_id,
+ remainingDays: that.data.remainingDays
+ }, res => {
+ wx.hideLoading()
+ if (res.statusCode == 200) {
+ wx.showToast({
+ title: '充值成功',
+ icon: "none"
+ })
+ that.getInfo()
+ } else {
+ wx.showToast({
+ title: res.data.msg,
+ icon: "none"
+ })
+ }
+ that.setData({
+ show2: false,
+ remainingDays: ""
+ })
+ })
+ }
+ }
+ })
+ },
+ changeRemainingDay(e) {
+ console.log(e);
+ let that = this
+ that.setData({
+ remainingDays: e.detail.value
+ })
+ },
+ //流量充值
+ recharge2() {
+ let that = this
+ that.setData({
+ show3: true
+ })
+ },
+ changeSurplusFlow(e) {
+ let that = this
+ that.setData({
+ surplusFlow: e.detail.value
+ })
+ },
+ deviceDataForce() {
+ let that = this
+
+ if(!that.isPureNumber(that.data.surplusFlow)){
+ return wx.showToast({
+ title: '请输入正确数额',
+ icon:"none"
+ })
+ }
+ wx.showModal({
+ title: '提示',
+ content: '确定要充值流量吗?请在设备通电开机的状态下进行操作',
+ complete: (res) => {
+ if (res.cancel) {
+
+ }
+
+ if (res.confirm) {
+ util.postUrl2(apiArr.deviceDataForce, {
+ device_id: that.data.Info.device_id,
+ surplusFlow: that.data.surplusFlow
+ }, res => {
+ wx.hideLoading()
+ if (res.statusCode == 200) {
+ wx.showToast({
+ title: '充值成功',
+ icon: "none"
+ })
+ that.getInfo()
+ } else {
+ wx.showToast({
+ title: res.data.msg,
+ icon: "none"
+ })
+ }
+ that.setData({
+ show3: false,
+ surplusFlow: ""
+ })
+ })
+ }
+ }
+ })
+ },
+
+ isPureNumber(value) {
+ return /^\d+(\.\d+)?$/.test(value);
+ },
+
+ onClose() {
+ this.setData({
+ show: false,
+ show2: false,
+ show3: false
+ })
+ },
+
+ remarksIpt1(e) {
+ console.log(e);
+ let that = this
+ that.setData({
+ remarks1: e.detail.value
+ })
+ },
+
+ /**
+ * 生命周期函数--监听页面加载
+ */
+ onLoad(options) {
+ let that = this
+ console.log(options);
+ that.setData({
+ device_id: options.device_id
+ })
+ that.getInfo()
+ },
+
+ /**
+ * 生命周期函数--监听页面初次渲染完成
+ */
+ onReady() {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面显示
+ */
+ onShow() {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面隐藏
+ */
+ onHide() {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面卸载
+ */
+ onUnload() {
+
+ },
+
+ /**
+ * 页面相关事件处理函数--监听用户下拉动作
+ */
+ onPullDownRefresh() {
+
+ },
+
+ /**
+ * 页面上拉触底事件的处理函数
+ */
+ onReachBottom() {
+
+ },
+
+ /**
+ * 用户点击右上角分享
+ */
+ onShareAppMessage() {
+
+ }
+})
\ No newline at end of file
diff --git a/packages/WaterPurifier/pages/device/deviceDesc/deviceDesc copy.wxml b/packages/WaterPurifier/pages/device/deviceDesc/deviceDesc copy.wxml
new file mode 100644
index 0000000..7b8fe42
--- /dev/null
+++ b/packages/WaterPurifier/pages/device/deviceDesc/deviceDesc copy.wxml
@@ -0,0 +1,145 @@
+
+
+
+
+
+
+ 设备编号:{{Info.device.device_code}}
+
+ 设备型号
+ {{Info.device.product_name}}
+
+
+
+ 设备状态
+ {{Info.device_net.active_status}}
+
+
+ 原水值
+ {{Info.device_net.raw_water_value}}
+
+
+ 净水值
+ {{Info.device_net.purification_water_value}}
+
+
+ 计费模式
+ {{Info.device_net.billing_mode}}
+
+
+ 剩余流量
+ {{Info.device.surplus_flow}}
+
+
+ 货贷总价
+ 277天
+
+
+ 累计过滤流量
+ {{Info.device.accumulated_usage}}升
+
+
+ 水质等级
+ {{Info.device.purification_water_value}}
+
+
+ iccd
+ {{Info.device.device_iccid}}
+
+
+ 创建时间
+ {{Info.device.create_time}}
+
+
+
+ 开机
+
+ 关机
+ 拆机
+ 激活
+
+ 流量充值
+ 时长充值
+
+
+
+
+ 滤芯信息
+
+ {{item.parts_name}}
+
+ 复位
+
+
+
+
+ 机主信息
+
+ 姓名
+ {{Info.device.customer_name}}
+
+
+ 微信昵称
+ {{Info.device.customer_name}}
+
+
+ 手机号码
+ {{Info.device.customer_phone}}
+
+
+ 地址
+ {{Info.device.region + Info.device.address}}
+
+
+
+
+
+
+
+
+ 取消
+ 确定
+
+
+ 备注:
+
+
+
+
+
+
+
+
+
+ 取消
+ 确定
+
+
+ 到期日期:
+
+
+
+
+
+
+
+
+
+
+ 取消
+ 确定
+
+
+ 设置数额:
+
+
+
+
+
\ No newline at end of file
diff --git a/packages/WaterPurifier/pages/device/deviceDesc/deviceDesc copy.wxss b/packages/WaterPurifier/pages/device/deviceDesc/deviceDesc copy.wxss
new file mode 100644
index 0000000..60f6257
--- /dev/null
+++ b/packages/WaterPurifier/pages/device/deviceDesc/deviceDesc copy.wxss
@@ -0,0 +1,214 @@
+page {}
+
+/* 容器样式 */
+.container {
+ display: flex;
+ flex-direction: column;
+ padding-bottom: 200rpx;
+}
+
+/* 滑动 Tab 栏样式 */
+.tab-scroll {
+ white-space: nowrap;
+ /* 禁止换行 */
+ background-color: #f7f8fa;
+ padding: 10px 0;
+}
+
+.tab-item {
+ display: inline-block;
+ padding: 10px 20px;
+ font-size: 16px;
+ color: #333;
+}
+
+
+/* 内容区域样式 */
+.content-scroll {
+ white-space: nowrap;
+ /* 禁止换行 */
+ height: 300px;
+ /* 设置内容区域高度 */
+}
+
+.content-item {
+ display: inline-block;
+ width: 100vw;
+ /* 每个内容项占满屏幕宽度 */
+ height: 100%;
+ display: flex;
+ justify-content: center;
+ align-items: center;
+ font-size: 20px;
+ border-bottom: 1px solid #eee;
+}
+
+
+.tab-item.active {
+ font-weight: bold;
+ font-size: 32rpx;
+ color: #222222;
+ position: relative;
+}
+
+.tab-item.active::after {
+ content: '';
+ width: 127rpx;
+ height: 10rpx;
+ background: #2583FF;
+ position: absolute;
+ left: 50%;
+ transform: translateX(-50%);
+ bottom: 0;
+
+}
+
+.tab-item.active::before {
+ content: '';
+ width: 127rpx;
+ height: 10rpx;
+ background: #FF5D73;
+ position: absolute;
+ left: 50%;
+ transform: translateX(-50%);
+ bottom: 0;
+}
+
+.deviceInfo {
+ padding: 30rpx 20rpx;
+}
+
+.deviceInfo_Tit {
+ font-weight: bold;
+ font-size: 32rpx;
+ color: #222222;
+ margin-bottom: 30rpx;
+}
+
+.deviceInfo_Item {
+ display: flex;
+ align-items: flex-start;
+ margin-bottom: 20rpx;
+}
+
+.deviceInfo_Item_ask {
+ font-weight: 400;
+ font-size: 26rpx;
+ color: #999999;
+ margin-right: 30rpx;
+ min-width: 110rpx;
+}
+
+.deviceInfo_Item_con {
+ font-weight: 400;
+ font-size: 26rpx;
+ color: #222222;
+}
+
+.btnList {
+ display: flex;
+ align-items: center;
+ margin-top: 40rpx;
+ color: #fff;
+ justify-content: space-between;
+ /* padding: 0 82rpx; */
+}
+
+.btn {
+ border-radius: 100rpx 100rpx 100rpx 100rpx;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ padding: 10rpx 40rpx;
+ white-space: nowrap;
+}
+
+.btn1 {
+ background: #2583FF;
+}
+
+.btn2 {
+ background: #999999;
+}
+
+.btn3 {
+ background: #D5AC66;
+}
+
+.btn4 {
+ background: #67C23A;
+}
+
+.filter_Info {
+ padding: 30rpx 20rpx;
+}
+
+.lifetime-progress {
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+ margin-bottom: 30rpx;
+}
+
+.progress-name {
+ font-weight: 400;
+ font-size: 26rpx;
+ color: #999999;
+ width: 20%;
+ white-space: nowrap;
+}
+
+.van-progress {
+ width: 366rpx;
+ margin-right: 19rpx;
+ margin-top: 10rpx;
+}
+
+.progress {
+ font-weight: 400;
+ font-size: 26rpx;
+ color: #FFFFFF;
+ width: 90rpx;
+ height: 36rpx;
+ background: #2583FF;
+ border-radius: 100rpx 100rpx 100rpx 100rpx;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+}
+
+.owner {
+ padding: 30rpx 20rpx;
+}
+
+.row {
+ padding-top: 30rpx;
+ height: 300rpx;
+ overflow: hidden;
+ overflow-y: auto;
+ padding: 30rpx;
+ box-sizing: border-box;
+ font-size: 30rpx;
+ display: flex;
+ color: #606266;
+}
+.row_label{
+ margin-right: 20rpx;
+ white-space: nowrap;
+}
+
+.row_con{
+ flex: 1;
+}
+.row_con textarea{
+ height: 100% !important;
+}
+.tit {
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+ font-size: 32rpx;
+ padding-right: 30rpx;
+ padding-left: 30rpx;
+ padding-top: 20rpx;
+}
\ No newline at end of file
diff --git a/packages/WaterPurifier/pages/device/deviceDesc/deviceDesc.js b/packages/WaterPurifier/pages/device/deviceDesc/deviceDesc.js
index 631b34f..7e3de02 100644
--- a/packages/WaterPurifier/pages/device/deviceDesc/deviceDesc.js
+++ b/packages/WaterPurifier/pages/device/deviceDesc/deviceDesc.js
@@ -1,137 +1,802 @@
-let util = require("../../../../../utils/util")
-const apiArr = require('../../../../../api/water_filter')
-// packages/WaterPurifier/pages/device/deviceDesc/deviceDesc.js
+let util = require('../../../../../utils/util')
+let apiArr = require('../../../../../api/water_filter')
+import * as echarts from '../../../../../component/ec-canvas/echarts';
+
+// packages/master/deviceInfo/index.js
Page({
- /**
- * 页面的初始数据
- */
- data: {
- progress_List: [{
- "name": "HXTH滤芯",
- "progress": 97.41
- },
- {
- "name": "RO膜滤芯",
- "progress": 87.41
- },
- {
- "name": "PP+CB滤芯",
- "progress": 40.41
- },
- {
- "name": "PP棉滤芯",
- "progress": 90.41
- }
- ],
- device_id:"",
- Info:{},
- },
+ /**
+ * 页面的初始数据
+ */
+ data: {
+ id: "",
+ currentDevice: "",
+ imagePath: "",
+ ec: {
+ onInit: initChart
+ },
- getInfo(){
- let that= this
- util.postUrl(apiArr.deviceDesc,{
- device_id:Number(that.data.device_id)
- },res=>{
- console.log(res);
- res.device_part.forEach(item=>{
- item.shengyuTime = that.getDaysDifference(item.expiration_time)
- item.parent = Math.round((Number(item.shengyuTime) / Number(item.availableDays)*100))
- })
+ appointment_time: "",
+ show: false,
+ show2: false,
+ show3: false,
+ show4: false,
+ show5: false,
+ show6: false,
+ remarks1: "", //拆机备注
+ remainingDays: "",//到期日期
+ surplusFlow: "",//剩余流量
+ remaining_days: "",//转时长
+ surplus_flow: "",//转流量
+ minDate: new Date().getTime(),
+ formatter(type, value) {
+ if (type === 'year') {
+ return `${value}年`;
+ }
+ if (type === 'month') {
+ return `${value}月`;
+ }
+ if (type === 'day') {
+ return `${value}日`;
+ }
+ return value;
+ },
+ },
+ onInput(event) {
+ let that = this
+ const date = new Date(event.detail); // 获取选中的 Date 对象
+ const year = date.getFullYear(); // 获取年份
+ const month = String(date.getMonth() + 1).padStart(2, '0'); // 月份从0开始,所以需要+1
+ const day = String(date.getDate()).padStart(2, '0');
+ const hours = String(date.getHours()).padStart(2, '0'); // 小时补零
+ const minutes = String(date.getMinutes()).padStart(2, '0'); // 分钟补零
+ const time = `${year}-${month}-${day} ${hours}:${minutes}`;
that.setData({
- Info:res
+ appointment_time: time,
+ show: false
})
- })
- },
- getDaysDifference(targetDate) {
- // 获取当前时间
- const now = new Date();
- // 将传递的时间转换为日期对象
- const target = new Date(targetDate);
- // 计算时间差(以毫秒为单位)
- const timeDiff = target.getTime() - now.getTime();
- // 将毫秒转换为天数
- const daysDiff = Math.ceil(timeDiff / (1000 * 60 * 60 * 24));
- return daysDiff;
- },
+ that.cancelActivation()
+ },
+ onClose() {
+ let that = this
+ that.setData({
+ show: false
+ })
+ },
+ formatPercentage(value) {
+ return Math.max(0, Number((value || 0).toFixed(0)));
+ },
+ getInfo() {
+ let that = this
+ console.log(that, 'ssss');
+ util.postUrl(apiArr.deviceInfo, {
+ device_id: that.data.id
+ }, res => {
+ res.remainDay = Math.max(0, that.getDaysBetweenDates2(res.expiration_duration)) //剩余天数
+ if (res.expiration_duration) {
+ res.difDay = Math.max(0, that.getDaysBetweenDates(res.install_time)) //服务天数,确保不小于0
+ } else {
+ const installDate = new Date(res.install_time)
+ const expireDate = new Date(res.expiration_duration)
+ res.difDay = Math.max(0, Math.floor((expireDate - installDate) / (1000 * 60 * 60 * 24))) //确保不小于0
+ }
+
+ if (res.device_part) {
+ res.device_part.forEach(item => {
+ item.difDay = that.getDaysBetweenDates(item.start_time)
+ const remainingDays = Math.max(0, (item.available_days || 0) - (item.difDay || 0));
+
+ item.percentageDay = that.formatPercentage(
+ (remainingDays / (item.available_days || 1)) * 100
+ );
+ item.percentageCapacity = that.formatPercentage(
+ (1 - (item.threshold_volume || 0) / (item.available_volume || 1)) * 100
+ );
+ })
+
+ const first = res.device_part.findIndex(item =>
+ item.parts_name.indexOf("PP棉滤芯") !== -1
+ );
+ if (first !== -1) {
+ const [removed] = res.device_part.splice(first, 1); // 移除该对象
+ res.device_part.unshift(removed); // 插入到首位
+ }
+ const Second = res.device_part.findIndex(item =>
+ item.parts_name.indexOf("PP+CB") !== -1
+ );
+ if (Second !== -1) {
+ const [removed] = res.device_part.splice(Second, 1); // 移除该对象
+ res.device_part.splice(1, 0, removed); // 插入到第二位
+ }
+ const Third = res.device_part.findIndex(item =>
+ item.parts_name.indexOf("RO") !== -1
+ );
+ if (Third !== -1) {
+ const [removed] = res.device_part.splice(Third, 1); // 移除该对象
+ res.device_part.splice(2, 0, removed); // 插入到第二位
+ }
+ const Fourth = res.device_part.findIndex(item =>
+ item.parts_name.indexOf("后置活性炭") !== -1
+ );
+ if (Fourth !== -1) {
+ const [removed] = res.device_part.splice(Fourth, 1); // 移除该对象
+ res.device_part.splice(3, 0, removed); // 插入到第二位
+ }
+ }
+ res.today = Number(res.today).toFixed(2)
+ res.yesterday = Number(res.yesterday).toFixed(2)
+
+ that.setData({
+ currentDevice: res
+ })
+ let Xarr = [];
+ let Yarr = [];
+ res.device_net.forEach(item => {
+ Xarr.push(item.create_time.slice(11, 16))
+ Yarr.push((item.cumulative_filtration_flow).toFixed(1))
+ })
+ that.updateChart({
+ xAxis: Xarr,
+ series: Yarr
+ })
+ that.getDeriveInfo()
+ setTimeout(() => {
+ const ecComponent = that.selectComponent("#mychart-dom-bar")
+ // 将 canvas 内容转换为临时图片文件
+ ecComponent.canvasToTempFilePath({
+ // canvasId: 'mychart-dom-bar',
+ success: (result) => {
+ that.base64({
+ url: result.tempFilePath,
+ type: 'png',
+ }).then((res) => {
+ that.setData({
+ imagePath: res
+ })
+ })
+ },
+ fail: (err) => {
+ console.error('转换失败:', err);
+ }
+ });
+ }, 2000)
+
+ })
+ },
+ replay(e) {
+ wx.showLoading({
+ title: '重置中...',
+ })
+ util.postUrl4(apiArr.resetFilter, {
+ part_id: e.currentTarget.dataset.item.id,
+ device_id: e.currentTarget.dataset.item.device_id,
+ }, res => {
+ wx.hideLoading()
+ console.log(res);
+ if (res.msg == '操作成功') {
+ wx.showToast({
+ title: '重置成功!',
+ icon: "none"
+ })
+ that.getfilterList()
+ } else {
+ wx.showToast({
+ title: res.msg,
+ icon: "none"
+ })
+ }
+ })
+ },
- //开机
- Open(){
- let that = this
- util.postUrl(apiArr)
- },
- //关机
- Close(){
- let that = this
- util.postUrl(apiArr)
- },
-// 强冲
- QC(){
- let that = this
- util.postUrl(apiArr)
- },
+ //查询设备实时信息
+ getDeriveInfo() {
+ let that = this
+ util.postUrl4(apiArr.boardInfo, {
+ device_id: that.data.currentDevice.device_id
+ }, res => {
+ console.log(res);
+ })
+ },
+ ///////////////////////////////////////////////新增/////////////////////////////////////////////////////////////////////////
+ onClose2() {
+ this.setData({
+ show2: false,
+ show3: false,
+ show4: false,
+ show5: false,
+ show6: false,
+ })
+ },
+ // 拆机
+ uninstall() {
+ let that = this
+ wx.showModal({
+ title: '提示',
+ content: '请确保设备通电开机状态,该操作将取消设备激活状态',
+ complete: (res) => {
+ if (res.cancel) {
- /**
- * 生命周期函数--监听页面加载
- */
- onLoad(options) {
- let that = this
- console.log(options);
- that.setData({
- device_id:options.device_id
- })
- that.getInfo()
- },
+ }
- /**
- * 生命周期函数--监听页面初次渲染完成
- */
- onReady() {
+ if (res.confirm) {
+ that.setData({
+ show2: true
+ })
+ }
+ }
+ })
+ },
+ remarksIpt1(e) {
+ console.log(e);
+ let that = this
+ that.setData({
+ remarks1: e.detail.value
+ })
+ },
+ createUninstall() {
+ wx.showLoading({
+ title: '加载中...',
+ mask: true
+ })
+ let that = this
+ util.postUrl(apiArr.createUninstallOrder, {
+ device_id: that.data.currentDevice.device_id,
+ info_id:wx.getStorageSync('info_id'),
+ remark: that.data.remarks1
+ }, res => {
+ console.log(res);
+ wx.hideLoading()
+ wx.showToast({
+ title: '拆机工单创建完成',
+ icon: "none"
+ })
- },
+ setTimeout(() => {
+ wx.navigateTo({
+ url: '/packages/master/order/index?type=3',
+ })
+ }, 1500)
+ })
+ },
+ // 激活
+ active() {
+ wx.showLoading({
+ title: '加载中...',
+ mask: true
+ })
+ let that = this
+ util.postUrl4(apiArr.deviceActive, {
+ device_id: that.data.currentDevice.device_id
+ }, res => {
+ console.log(res);
+ wx.showToast({
+ title: res.msg,
+ icon: "none"
+ })
+ that.getInfo()
+ wx.hideLoading()
- /**
- * 生命周期函数--监听页面显示
- */
- onShow() {
+ return
+ if (res.statusCode == 200) {
+ wx.showToast({
+ title: '激活成功',
+ icon: "none"
+ })
+ that.getInfo()
- },
+ } else {
+ wx.showToast({
+ title: res.data.msg,
+ icon: "none"
+ })
+ }
+ wx.hideLoading()
+ })
+ },
- /**
- * 生命周期函数--监听页面隐藏
- */
- onHide() {
- },
+ isPureNumber(value) {
+ return /^\d+(\.\d+)?$/.test(value);
+ },
+ //时长充值
+ recharge1() {
+ let that = this
+ that.setData({
+ show4: true
+ })
+ },
+ deviceDeactivation() {
+ let that = this
+ if (!that.isPureNumber(that.data.remainingDays)) {
+ return wx.showToast({
+ title: '请输入正确到期日期',
+ icon: "none"
+ })
+ }
+ wx.showModal({
+ title: '提示',
+ content: '确定要充值时长吗?请在设备通电开机的状态下进行操作',
+ complete: (res) => {
+ if (res.cancel) {
- /**
- * 生命周期函数--监听页面卸载
- */
- onUnload() {
+ }
- },
+ if (res.confirm) {
+ wx.showLoading({
+ title: '加载中...',
+ mask: true
+ })
+ util.postUrl4(apiArr.deviceDeactivation, {
+ device_id: that.data.currentDevice.device_id,
+ remainingDays: that.data.remainingDays
+ }, res => {
+ wx.hideLoading()
+ if (res.data.code == 200) {
+ wx.showToast({
+ title: '充值成功',
+ icon: "none"
+ })
+ that.getInfo()
+ } else {
+ wx.showToast({
+ title: res.data.msg,
+ icon: "none"
+ })
+ }
+ that.setData({
+ show4: false,
+ remainingDays: ""
+ })
+ })
+ }
+ }
+ })
+ },
+ changeRemainingDay(e) {
+ console.log(e);
+ let that = this
+ that.setData({
+ remainingDays: e.detail.value
+ })
+ },
+ //流量充值
+ recharge2() {
+ let that = this
+ that.setData({
+ show3: true
+ })
+ },
+ changeSurplusFlow(e) {
+ let that = this
+ that.setData({
+ surplusFlow: e.detail.value
+ })
+ },
+ deviceDataForce() {
+ let that = this
+ if (!that.isPureNumber(that.data.surplusFlow)) {
+ return wx.showToast({
+ title: '请输入正确数额',
+ icon: "none"
+ })
+ }
+ wx.showModal({
+ title: '提示',
+ content: '确定要充值流量吗?请在设备通电开机的状态下进行操作',
+ complete: (res) => {
+ if (res.cancel) {
- /**
- * 页面相关事件处理函数--监听用户下拉动作
- */
- onPullDownRefresh() {
+ }
- },
+ if (res.confirm) {
+ util.postUrl4(apiArr.deviceDataForce, {
+ device_id: that.data.currentDevice.device_id,
+ surplusFlow: that.data.surplusFlow
+ }, res => {
+ if (res.data.code == 200) {
+ wx.showToast({
+ title: '充值成功',
+ icon: "none"
+ })
+ that.getInfo()
+ } else {
+ wx.showToast({
+ title: res.data.msg,
+ icon: "none"
+ })
+ }
+ that.setData({
+ show3: false,
+ surplusFlow: ""
+ })
+ })
+ }
+ }
+ })
+ },
+ //转时长
+ timeSet() {
+ let that = this
+ that.setData({
+ show5: true
+ })
+ },
+ changeRemainingDay2(e) {
+ console.log(e);
+ let that = this
+ that.setData({
+ remaining_days: e.detail.value
+ })
+ },
+ modeToTime() {
+ let that = this
+ if (!that.data.remaining_days) {
+ return wx.showToast({
+ title: '请输入到期日期',
+ })
+ }
+ wx.showModal({
+ title: '提示',
+ content: '确定要将设备转时长吗?请在设备通电开机的状态下进行操作',
+ complete: (res) => {
+ if (res.cancel) {
+ }
+ if (res.confirm) {
+ util.postUrl4(apiArr.deviceToTime, {
+ device_id: that.data.currentDevice.device_id,
+ remaining_days: that.data.remaining_days
+ }, res => {
+ if (res.data.code == 200) {
+ wx.showToast({
+ title: '充值成功',
+ icon: "none"
+ })
+ that.getInfo()
+ } else {
+ wx.showToast({
+ title: res.data.msg,
+ icon: "none"
+ })
+ }
+ that.setData({
+ show5: false,
+ remaining_days: ""
+ })
+ })
+ }
+ }
+ })
+ },
+ // 转流量
+ timeSet2() {
+ let that = this
+ that.setData({
+ show6: true
+ })
+ },
+ changeRemainingDay3(e) {
+ console.log(e);
+ let that = this
+ that.setData({
+ surplus_flow: e.detail.value
+ })
+ },
+ modeToFlowRate() {
+ let that = this
+ if (!that.data.surplus_flow) {
+ return wx.showToast({
+ title: '请输入数额',
+ })
+ }
+ wx.showModal({
+ title: '提示',
+ content: '确定要设备转流量吗?请在设备通电开机的状态下进行操作',
+ complete: (res) => {
+ if (res.cancel) {
+ }
+ if (res.confirm) {
+ util.postUrl4(apiArr.deviceToTraffic, {
+ device_id: that.data.currentDevice.device_id,
+ surplus_flow: that.data.surplus_flow
+ }, res => {
+ if (res.data.code == 200) {
+ wx.showToast({
+ title: '充值成功',
+ icon: "none"
+ })
+ that.getInfo()
+ } else {
+ wx.showToast({
+ title: res.data.msg,
+ icon: "none"
+ })
+ }
+ that.setData({
+ show6: false,
+ surplus_flow: ""
+ })
+ })
+ }
+ }
+ })
- /**
- * 页面上拉触底事件的处理函数
- */
- onReachBottom() {
- },
+ },
+ // 转零售
+ retailSet() {
+ let that = this
+ wx.showModal({
+ title: '提示',
+ content: '是否确认设置为零售模式?此操作请在设备通电开机的状态下进行操作',
+ complete: (res) => {
+ if (res.cancel) {
- /**
- * 用户点击右上角分享
- */
- onShareAppMessage() {
+ }
- }
-})
\ No newline at end of file
+ if (res.confirm) {
+ util.postUrl4(apiArr.deviceToRetail, {
+ device_id: that.data.currentDevice.device_id
+ }, res => {
+ if (res.data.code == 200) {
+ wx.showToast({
+ title: '设置成功',
+ icon: "none"
+ })
+ that.getInfo()
+ } else {
+ wx.showToast({
+ title: res.data.msg,
+ icon: "none"
+ })
+ }
+ })
+ }
+ }
+ })
+ },
+
+ ///////////////////////////////////////////////新增/////////////////////////////////////////////////////////////////////////
+ //开关机
+ openOff() {
+ let that = this
+ let onOff = ''
+
+ if (that.data.currentDevice.sevice_status == 1) {
+ onOff = 2
+ } else if (that.data.currentDevice.sevice_status == 2) {
+ onOff = 1
+ }
+
+ wx.showLoading({
+ title: '操作中...',
+ mask: true
+ })
+
+ util.postUrl(apiArr.openOff, {
+ deviceId: that.data.currentDevice.device_id,
+ onOff
+ }, res => {
+ wx.hideLoading()
+ console.log(res);
+ if (res.msg == '操作成功') {
+ if (res.data.params.sevice_status.value == '00') {
+ wx.hideLoading()
+ wx.showToast({
+ title: '关机成功!',
+ icon: "none"
+ })
+ that.setData({
+ "currentDevice.sevice_status": 2
+ })
+ console.log('关机');
+ } else if (res.data.params.sevice_status.value == '10') {
+ wx.hideLoading()
+ wx.showToast({
+ title: '开机成功!',
+ icon: "none"
+ })
+ that.setData({
+ "currentDevice.sevice_status": 1
+ })
+ console.log('开机');
+ }
+ }
+ })
+ },
+
+ updateChart(data) {
+ const ecComponent = this.selectComponent("#mychart-dom-bar");
+ if (!ecComponent) return;
+
+ this.setData({
+ chartData: data
+ });
+
+ ecComponent.init((canvas, width, height, dpr) => {
+ const chart = initChart(canvas, width, height, dpr);
+ chart.setOption({
+ grid: {
+ left: '3%', // 左边距
+ right: '4%', // 右边距
+ bottom: '3%', // 底部边距
+ containLabel: true // 确保标签包含在内
+ },
+ xAxis: {
+ data: data.xAxis
+ },
+ series: [{
+ data: data.series,
+ label: { // 添加这个label配置
+ show: true, // 开启显示
+ position: 'top', // 位置在柱子上方
+ color: '#333', // 文字颜色
+ // fontSize: 8 // 文字大小
+ }
+ }]
+ });
+ return chart;
+ });
+ },
+
+ base64({ url, type }) {
+ return new Promise((resolve, reject) => {
+ wx.getFileSystemManager().readFile({
+ filePath: url, //选择图片返回的相对路径
+ encoding: 'base64', //编码格式
+ success: res => {
+ resolve('data:image/' + type.toLocaleLowerCase() + ';base64,' + res.data)
+ },
+ fail: res => reject(res.errMsg)
+ })
+ })
+ },
+ convertCanvasToImage() {
+ wx.canvasToTempFilePath({
+ canvasId: 'myChart',
+ success: (res) => {
+ console.log(res.tempFilePath);
+ this.setData({
+ imagePath: res.tempFilePath
+ });
+ },
+ fail: (err) => {
+ console.error('Canvas to image failed:', err);
+ }
+ });
+ },
+ getDaysBetweenDates(inputDate) {
+ const currentDate = new Date();
+ // 将传入的日期字符串转换为日期对象
+ const targetDate = new Date(inputDate);
+ // 计算两个日期之间的时间差(以毫秒为单位)
+ const timeDifference = currentDate - targetDate;
+ // 将时间差转换为天数
+ const daysDifference = Math.floor(timeDifference / (1000 * 60 * 60 * 24));
+ // 返回天数
+ return daysDifference;
+ },
+ getDaysBetweenDates2(targetDate) {
+ // 获取当前日期(不含时间)
+ const today = new Date();
+ today.setHours(0, 0, 0, 0); // 时间归零,避免时间差影响
+ // 解析目标日期(格式:YYYY-MM-DD)
+ const target = new Date(targetDate);
+ target.setHours(0, 0, 0, 0);
+ // 计算毫秒差并转换为天数
+ const timeDiff = target - today;
+ const daysRemaining = Math.ceil(timeDiff / (1000 * 60 * 60 * 24));
+ return daysRemaining;
+ },
+
+ /**
+ * 生命周期函数--监听页面加载
+ */
+ onLoad(options) {
+ let that = this
+ that.setData({
+ id: options.device_id
+ })
+ that.getInfo()
+ },
+
+ /**
+ * 生命周期函数--监听页面初次渲染完成
+ */
+ onReady() {
+ let that = this
+ setTimeout(() => {
+ this.convertCanvasToImage()
+ }, 5000)
+ },
+
+ /**
+ * 生命周期函数--监听页面显示
+ */
+ onShow() {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面隐藏
+ */
+ onHide() {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面卸载
+ */
+ onUnload() {
+
+ },
+
+ /**
+ * 页面相关事件处理函数--监听用户下拉动作
+ */
+ onPullDownRefresh() {
+
+ },
+
+ /**
+ * 页面上拉触底事件的处理函数
+ */
+ onReachBottom() {
+
+ },
+
+ /**
+ * 用户点击右上角分享
+ */
+ onShareAppMessage() {
+
+ }
+})
+
+function initChart(canvas, width, height, dpr) {
+ const chart = echarts.init(canvas, null, {
+ width: width,
+ height: height,
+ devicePixelRatio: dpr // 将此选项设置为 2,可以在高分辨率屏幕上绘制更清晰的图表
+ });
+ canvas.setChart(chart);
+ const option = {
+ xAxis: {
+ type: 'category',
+ // data: ['16:41', '22:41', '04:41', '10:41', '16:41'],
+ data: []
+ },
+ yAxis: {
+ type: 'value',
+ // data: ['0ml', '560ml']
+ min: 0,
+ axisLabel: {
+ formatter: '{value}ml'
+ }
+ },
+ series: [{
+ // data: [150, 230, 224, 218, 135, 147, 345],
+ data: [],
+ type: 'bar',
+ barWidth: 15,
+ itemStyle: { //柱状颜色和圆角
+ color: {
+ x: 0,
+ y: 1,
+ colorStops: [{
+ offset: 0,
+ color: '#FFBBAC',
+ }, {
+ offset: 1,
+ color: '#338BFF'
+ }]
+ },
+ barBorderRadius: [5, 5, 0, 0], // (顺时针左上,右上,右下,左下)
+ },
+ }]
+ };
+ chart.setOption(option);
+ return chart;
+}
\ No newline at end of file
diff --git a/packages/WaterPurifier/pages/device/deviceDesc/deviceDesc.json b/packages/WaterPurifier/pages/device/deviceDesc/deviceDesc.json
index 71aff8b..719aba1 100644
--- a/packages/WaterPurifier/pages/device/deviceDesc/deviceDesc.json
+++ b/packages/WaterPurifier/pages/device/deviceDesc/deviceDesc.json
@@ -1,4 +1,6 @@
{
- "usingComponents": {},
+ "usingComponents": {
+ "ec-canvas": "/component/ec-canvas/ec-canvas"
+ },
"navigationBarTitleText": "设备详情"
}
\ No newline at end of file
diff --git a/packages/WaterPurifier/pages/device/deviceDesc/deviceDesc.wxml b/packages/WaterPurifier/pages/device/deviceDesc/deviceDesc.wxml
index 8bd13e3..0cf3d96 100644
--- a/packages/WaterPurifier/pages/device/deviceDesc/deviceDesc.wxml
+++ b/packages/WaterPurifier/pages/device/deviceDesc/deviceDesc.wxml
@@ -1,97 +1,209 @@
-
-
-
+
+
+
+
+
+
+
+ {{currentDevice.region + currentDevice.address}}
+
- -->
+
+
+
+
+
+ 净化前
+ 水质TDS值
+ {{currentDevice.raw_water_value}}
+ PPM
+
+
+
+
+
+
+ 净化后
+ 水质TDS值
+ {{currentDevice.purification_water_value}}
+ PPM
+
+
+
+
+
+
+ 净化前水质:极好
+ 净化前水质:良好
+ 净化前水质:正常
+ 净化前水质:较差
+ 净化前水质:极差
+
+
+ 净化后水质:极好
+ 净化后水质:良好
+ 净化后水质:正常
+ 净化后水质:较差
+ 净化后水质:极差
+
+
+
+
+
+
+
+
+
+ 我的设备
+
+ {{currentDevice.product_name}}
+
+
+
+
+ 开机
+ 关机
+ 制水故障
+ 漏水故障
+ 主板故障
-
- 设备编号:{{Info.device.device_code}}
-
- 设备型号
- {{Info.device.product_name}}
+
+
+ {{currentDevice.network_status == '1'?'在线':'离线'}}
+
+
+
+
+
+ 编号:{{currentDevice.device_code}}
+
+
+ 已服务{{currentDevice.difDay}}天
+
+
+
+ 已服务0天
+
+
+
+
+
+ 剩余天数
+ {{ currentDevice.remainDay}}
+ 天
+
+
+
+ 已欠费
+
+
+
+
+
+ 剩余天数
+ 0
+ 天
+
+
+
+
+
+
+
+
+
+ 滤芯寿命
+ 滤芯寿命用水量和使用时间来综合计算
+
+
+
+
+
+ {{item.parts_name}}
+
+
+
+
+
+ {{item.percentageDay}}%
+
+
+
+ {{item.percentageCapacity}}%
+
+
+
+
+ {{item.percentageDay}}%
+
+
+
+
+ 重置
+
+
+
+
+
+
+
+
+
+ 用水量
+
+
+
+
+ 累计用水量
+ {{currentDevice.cumulative_filtration_flow}}L
+
+
+ 今日用水量
+ {{currentDevice.today}}L
+
+
+ 昨日用水量
+ {{currentDevice.yesterday}}L
+
+
+
+
+
+
+
+
+
+
+
-
-
- 设备状态
- {{Info.device_net.active_status}}
-
-
- 原水值
- {{Info.device_net.raw_water_value}}
-
-
- 净水值
- {{Info.device_net.purification_water_value}}
-
-
- 计费模式
- {{Info.device_net.billing_mode}}
-
-
- 剩余流量
- {{Info.device.surplus_flow}}
-
-
- 货贷总价
- 277天
-
-
- 累计过滤流量
- {{Info.device.accumulated_usage}}升
-
-
- 水质等级
- {{Info.device.purification_water_value}}
-
-
- iccd
- {{Info.device.device_iccid}}
-
-
- 创建时间
- {{Info.device.create_time}}
-
-
- 开机
- 关机
- 强冲
-
-
-
-
- 滤芯信息
-
- {{item.parts_name}}
-
- 复位
-
-
-
-
- 机主信息
-
- 姓名
- {{Info.device.customer_name}}
-
-
- 微信昵称
- {{Info.device.customer_name}}
-
-
- 手机号码
- {{Info.device.customer_phone}}
-
-
- 地址
- {{Info.device.region + Info.device.address}}
-
-
+
-
\ No newline at end of file
+
+
+ 拆机
+
+
+
+
+
+
+
+
+
+
+
+
+ 取消
+ 确定
+
+
+ 备注:
+
+
+
+
+
+
diff --git a/packages/WaterPurifier/pages/device/deviceDesc/deviceDesc.wxss b/packages/WaterPurifier/pages/device/deviceDesc/deviceDesc.wxss
index 0ad9d8e..41c7281 100644
--- a/packages/WaterPurifier/pages/device/deviceDesc/deviceDesc.wxss
+++ b/packages/WaterPurifier/pages/device/deviceDesc/deviceDesc.wxss
@@ -1,180 +1,741 @@
-page{
+.nav-box {
+ box-sizing: border-box;
+ width: 100%;
+ position: relative;
+ /* position: fixed; */
+ z-index: 2;
}
-/* 容器样式 */
-.container {
+.nav-box .nav-bar {
display: flex;
- flex-direction: column;
- padding-bottom: 200rpx;
+ align-items: center;
}
-/* 滑动 Tab 栏样式 */
-.tab-scroll {
- white-space: nowrap;
- /* 禁止换行 */
- background-color: #f7f8fa;
- padding: 10px 0;
+.nav-box .nav-bar .nav-bar-left,
+.nav-box .nav-bar .nav-bar-right {
+ padding: 0 20rpx;
+ min-width: 36rpx;
}
-.tab-item {
- display: inline-block;
- padding: 10px 20px;
- font-size: 16px;
- color: #333;
+.nav-box .nav-bar .nav-bar-left van-icon {
+ vertical-align: sub;
+ color: #333333;
+}
+
+.nav-box .nav-bar .nav-bar-title {
+ flex: 1;
+ text-align: center;
+ font-weight: 400;
+ font-size: 36rpx;
+ color: #FFFFFF;
+}
+
+.nav-box .nav-bar-title {
+ color: red;
+ margin-left: -20rpx;
}
-/* 内容区域样式 */
-.content-scroll {
- white-space: nowrap;
- /* 禁止换行 */
- height: 300px;
- /* 设置内容区域高度 */
-}
-
-.content-item {
- display: inline-block;
+.water-filter {
width: 100vw;
- /* 每个内容项占满屏幕宽度 */
- height: 100%;
+ overflow: hidden;
+}
+
+.nowrap {
+ white-space: nowrap;
+}
+
+.top {
+ background-color: #FFFFFF;
+
+}
+
+/* 位置定位 */
+.positioning {
+ display: flex;
+ margin-left: 24rpx;
+ padding-top: 40rpx;
+ margin-right: 20rpx;
+ margin-bottom: 64rpx;
+ justify-content: space-between;
+}
+
+.positioning-left {
+ display: flex;
+ align-items: center;
+ overflow: hidden;
+}
+
+.positioning-right {
+ display: flex;
+ align-items: center;
+}
+
+.positioning-icon-left {
+ width: 33rpx;
+ height: 33rpx;
+}
+
+.positioning-text {
+ font-size: 26rpx;
+ color: #FFFFFF;
+ margin-left: 9rpx;
+ white-space: nowrap;
+ overflow: hidden;
+ text-overflow: ellipsis;
+}
+
+.positioning-icon-right {
+ width: 24rpx;
+ height: 24rpx;
+}
+
+/* 净化前后数值 */
+.purification-value {
+ display: flex;
+ margin-left: 114rpx;
+}
+
+.purification-value-left {
+ display: inline;
+ width: 210rpx;
+ height: 250rpx;
+}
+
+.purification-value-right {
+ margin-left: 116rpx;
+}
+
+.purification-value-icon {
+ width: 210rpx;
+ height: 250rpx;
+ position: absolute;
+}
+
+.purification-value-text {
+ position: absolute;
+ margin: 60rpx 42rpx 0 41rpx;
+}
+
+.puri-text {
display: flex;
justify-content: center;
- align-items: center;
- font-size: 20px;
- border-bottom: 1px solid #eee;
-}
-
-
-.tab-item.active {
- font-weight: bold;
- font-size: 32rpx;
- color: #222222;
- position: relative;
-}
-
-.tab-item.active::after {
- content: '';
- width: 127rpx;
- height: 10rpx;
- background: #2583FF;
- position: absolute;
- left: 50%;
- transform: translateX(-50%);
- bottom: 0;
-
-}
-
-.tab-item.active::before {
- content: '';
- width: 127rpx;
- height: 10rpx;
- background: #FF5D73;
- position: absolute;
- left: 50%;
- transform: translateX(-50%);
- bottom: 0;
-}
-
-.deviceInfo {
- padding: 30rpx 20rpx;
-}
-
-.deviceInfo_Tit {
- font-weight: bold;
- font-size: 32rpx;
- color: #222222;
- margin-bottom: 30rpx;
-}
-
-.deviceInfo_Item {
- display: flex;
- align-items: flex-start;
- margin-bottom: 20rpx;
-}
-
-.deviceInfo_Item_ask {
- font-weight: 400;
+ color: #FFFFFF;
font-size: 26rpx;
- color: #999999;
- margin-right: 30rpx;
- min-width: 110rpx;
}
-.deviceInfo_Item_con {
- font-weight: 400;
- font-size: 26rpx;
- color: #222222;
+.tds {
+ opacity: 0.5;
}
-.btnList {
+.tds-value {
+ font-size: 50rpx;
+}
+
+/* 净化前后水质 */
+.water-quality {
+ margin-left: 80rpx;
+ margin-top: 23rpx;
+}
+
+.water-quality2 {
display: flex;
- align-items: center;
- margin-top: 40rpx;
- color: #fff;
- justify-content: space-between;
- padding: 0 82rpx;
+ margin: 0 80rpx;
+ margin-top: 10rpx;
}
-.btn {
+.water-quality2 .water-quality-left {
+ flex: 1;
+ display: flex;
+ text-align: center;
+ height: auto;
+ background: transparent;
+}
+
+.water-quality2 .water-quality-text {
width: 150rpx;
height: 50rpx;
+ background: #fff;
border-radius: 100rpx 100rpx 100rpx 100rpx;
+ color: #2583FF;
+ display: block;
+ line-height: 50rpx;
+}
+
+.water-quality-left {
+ display: inline;
+ width: 265rpx;
+ height: 50rpx;
+ padding: 10rpx 38rpx 10rpx 30rpx;
+ justify-content: center;
+ align-items: center;
+ border-radius: 20rpx;
+ background: linear-gradient(to right, #2583FF1a, #2583FF);
+}
+
+.water-quality-text {
+ font-size: 26rpx;
+ color: #FFFFFF;
+}
+
+/* 我的设备 */
+.my-device {
+ background-color: #FFFFFF;
+ /* margin: 0 24rpx 0 20rpx; */
+ /* padding-bottom: 30rpx; */
+}
+
+.mydevice {
+ font-size: 28rpx;
+ display: flex;
+ margin-bottom: 23rpx;
+}
+
+.text-color {
+ color: #999999;
+}
+
+.replayBtn {
+ width: 120rpx;
+ height: 50rpx;
display: flex;
align-items: center;
justify-content: center;
+ background-color: #2887ff;
+ color: #fff;
+ border-radius: 30rpx;
+ margin-left: 20rpx;
}
-.btn1 {
- background: #2583FF;
+.day-num2 {
+ color: #ff0000da;
+ font-size: 36rpx;
+ font-weight: bold;
+ margin: 0 7rpx 0 8rpx;
}
-.btn2 {
- background: #999999;
+.device-info {
+ margin: 0 24rpx 0 20rpx;
}
-.btn3 {
- background: #D5AC66;
+.info-top {
+ display: flex;
+ justify-content: space-between;
}
-.filter_Info {
+.device-name {
+ font-size: 36rpx;
+ color: #222222;
+ font-weight: bold;
+}
+
+.device-state {
+ display: flex;
+ align-items: center;
+}
+
+.switch-icon {
+ width: 28rpx;
+ height: 28rpx;
+}
+
+.switch-text {
+ margin-right: 31rpx;
+ margin-left: 10rpx;
+}
+
+.wifi-text {
+ margin-left: 10rpx;
+}
+
+.text-size {
+ font-size: 26rpx;
+}
+
+.wifi-icon {
+ width: 30rpx;
+ height: 22rpx;
+}
+
+.info-bottom {
+ display: flex;
+ margin-top: 22rpx;
+ justify-content: space-between;
+ align-items: center;
+}
+
+.device-id {
+ color: #2583FF;
+ /* display: inline; */
+}
+
+.service-day {
+ /* display: inline; */
+ /* float: right; */
+}
+
+.day-num {
+ color: #2583FF;
+ font-size: 36rpx;
+ font-weight: bold;
+ margin: 0 7rpx 0 8rpx;
+}
+
+.day {
+ color: #222222;
+}
+
+/* 购买滤芯和报修记录 */
+.van-row {
+ padding: 0 20rpx !important;
+}
+
+.van-col {
+ display: flex;
+ background-color: #FFF0ED;
+ height: 150rpx;
+ border-radius: 30rpx;
+ align-items: center;
+ font-size: 28rpx;
+ font-weight: bold;
+}
+
+.purchase {
+ width: 100rpx;
+ height: 100rpx;
+ margin-left: 68rpx;
+}
+
+/* 功能列表 */
+.van-grid {
+ margin-top: 20rpx;
+ background-color: #FFFFFF;
+}
+
+.van-icon__image {
+ width: 100rpx !important;
+ height: 100rpx !important;
+}
+
+.van-icon--image {
+ width: 100rpx !important;
+ height: 100rpx !important;
+}
+
+
+.van-grid-item__text {
+ font-size: 26rpx !important;
+ color: #222222 !important;
+}
+
+/* 滤芯寿命 */
+.lifetime {
+ margin-top: 20rpx;
+ background-color: #FFFFFF;
padding: 30rpx 20rpx;
}
+.lifetime-title {
+ font-size: 28rpx;
+ font-weight: bold;
+ color: #000000;
+}
+
+.lifetime-prompt {
+ font-size: 24rpx;
+ color: #999999;
+ margin-top: 20rpx;
+ margin-bottom: 25rpx;
+}
+
.lifetime-progress {
+ margin-top: 10rpx;
display: flex;
align-items: center;
justify-content: space-between;
- margin-bottom: 30rpx;
}
.progress-name {
- font-weight: 400;
- font-size: 26rpx;
- color: #999999;
- width: 20%;
white-space: nowrap;
+ /* width: 24%; */
+ overflow: hidden;
+ white-space: nowrap;
+ font-size: 26rpx;
+ display: flex;
+ justify-content: space-between;
+ padding-top: 10rpx;
}
.van-progress {
- width: 366rpx;
+ width: 100%;
margin-right: 19rpx;
margin-top: 10rpx;
}
.progress {
+ color: #000000;
+ font-size: 24rpx;
+}
+
+.contral3 {
+ display: flex;
+ flex-direction: column;
+}
+
+.equi-contral-right2 {
+ margin-top: 20rpx;
+}
+
+/* 用水量 */
+.water-consumption {
+ background-color: #FFFFFF;
+ margin-top: 20rpx;
+ padding: 30rpx 24rpx 0 20rpx;
+}
+
+.water-consumption-title {
+ font-size: 28rpx;
+ font-weight: bold;
+ margin-bottom: 30rpx;
+}
+
+.row-index--van-row {
+ margin: 0 !important;
+}
+
+.van-col--8 {
+ display: inline;
+ height: 130rpx !important;
+ width: 220rpx !important;
+ margin-right: 5rpx;
+}
+
+.water-consumption-col-name {
+ font-size: 24rpx;
+ font-weight: normal;
+ color: #000000;
+ display: flex;
+ justify-content: center;
+ align-items: center;
+ text-align: center;
+ margin-top: 12rpx;
+ margin-bottom: 16rpx;
+}
+
+.water-consumption-col-num {
+ text-align: center;
+ font-size: 38rpx;
+ font-weight: bold;
+ color: #2583FF;
+}
+
+.water-consumption-col-num-size {
+ font-size: 24rpx;
+ font-weight: normal;
+}
+
+.container {
+ width: 100%;
+ height: 600rpx;
+ padding-bottom: 100rpx;
+ position: relative;
+
+}
+
+.container canvas {
+ position: absolute;
+ right: -100vw;
+ top: 0;
+}
+
+#mychart-bar {
+ border-radius: 30rpx 30rpx 0 0;
+}
+
+.chart {
+ display: flex;
+ align-items: flex-end;
+ height: 300px;
+}
+
+.bar {
+ width: 20px;
+ margin: 0 5px;
+ background-color: blue;
+ border-radius: 30rpx 30rpx 0 0;
+}
+
+
+
+
+
+.water-consumption-row {
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+ padding: 0;
+ margin: 0 24rpx;
+}
+
+.water-consumption-col {
+ width: 220rpx;
+ height: 112rpx;
+ background: linear-gradient(180deg, #F0F4FF 0%, #DEE7FF 100%);
+ border-radius: 20rpx 20rpx 20rpx 20rpx;
+ box-sizing: border-box;
+}
+
+.water-consumption-row .col2 {
+ background: linear-gradient(180deg, #FFFBD8 0%, #FFEBB8 100%);
+ margin: 0 20rpx;
+}
+
+.water-consumption-row .col3 {
+ background: linear-gradient(180deg, #ECECEC 0%, #E5E4E4 100%);
+}
+
+.water-consumption-col .water-consumption-col-name {
font-weight: 400;
- font-size: 26rpx;
- color: #FFFFFF;
- width: 90rpx;
- height: 36rpx;
+ font-size: 24rpx;
+ color: #000000;
+}
+
+.water-consumption-col .water-consumption-col-num {
+ font-weight: bold;
+ font-size: 36rpx;
+ color: #2583FF;
+}
+
+.equi-contral {
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+ margin-left: 20rpx;
+ margin-right: 20rpx;
+}
+
+.equi-contral2 .equi-contral-right {
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+ width: 100%;
+}
+
+.equi-contral2 .equi-contral-right .equi-contral-right-btn2 {
+ margin-top: 0;
+ width: 335rpx;
+}
+
+.equi-contral2 .equi-contral-right .equi-contral-right-btn1 {
+ margin-top: 0;
+ width: 335rpx;
+}
+
+.equi-contral-left {
+ position: relative;
+ width: 345rpx;
+ height: 320rpx;
+ background: #FFF0ED;
+ border-radius: 30rpx 30rpx 30rpx 30rpx;
+ font-weight: bold;
+ font-size: 28rpx;
+ color: #000000;
+ box-sizing: border-box;
+ padding-top: 58rpx;
+ padding-left: 28rpx;
+}
+
+.equi-contral-left #img1 {
+ width: 219.21rpx;
+ height: 175rpx;
+ position: absolute;
+ left: 116rpx;
+ bottom: 5rpx;
+}
+
+.equi-contral-left #img2 {
+ width: 119rpx;
+ height: 95rpx;
+ position: absolute;
+ bottom: 32rpx;
+ left: 180rpx;
+}
+
+.van-grid-item__text text {
+ white-space: nowrap;
+}
+
+.equi-contral-right {
+ /* justify-content: center !important; */
+}
+
+.equi-contral-right-btn1 {
+ width: 345rpx;
+ height: 150rpx;
+ background: linear-gradient(180deg, #FFFBD8 0%, #FFEBB8 100%);
+ border-radius: 20rpx 20rpx 20rpx 20rpx;
+ font-weight: bold;
+ font-size: 28rpx;
+ color: #000000;
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+ padding-left: 30rpx;
+ padding-right: 30rpx;
+ box-sizing: border-box;
+}
+
+.equi-contral-right-btn1 image {
+ width: 100rpx;
+ height: 100rpx;
+}
+
+.equi-contral-right-btn2 {
+ width: 345rpx;
+ height: 150rpx;
+ background: linear-gradient(180deg, #ECECEC 0%, #E5E4E4 100%);
+ border-radius: 20rpx 20rpx 20rpx 20rpx;
+ margin-top: 23rpx;
+ position: relative;
+ box-sizing: border-box;
+ font-weight: bold;
+ font-size: 28rpx;
+ color: #000000;
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+ padding-left: 30rpx;
+ padding-right: 30rpx;
+ box-sizing: border-box;
+}
+
+.equi-contral-right-btn2 image {
+ width: 100rpx;
+ height: 100rpx;
+}
+
+
+.foot-fixed {
+ z-index: 999999999999 !important;
+}
+
+.btnDevice {
+ width: 650rpx;
+ height: 80rpx;
background: #2583FF;
border-radius: 100rpx 100rpx 100rpx 100rpx;
display: flex;
align-items: center;
justify-content: center;
+ margin: 0 auto;
+ margin-top: 300rpx;
+ font-weight: 400;
+ font-size: 36rpx;
+ color: #FFFFFF;
}
-.owner{
- padding: 30rpx 20rpx;
+.deleteBtn {
+ width: 710rpx;
+ height: 100rpx;
+ background-color: #dd0000;
+ color: #fff;
+ border-radius: 20rpx;
+ font-size: 34rpx;
+ font-weight: 700;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ margin: 0 auto;
+ margin-top: 40rpx;
+}
+
+.btn3 {
+ background: #D5AC66;
+ width: 710rpx;
+ height: 100rpx;
+ color: #fff;
+ border-radius: 20rpx;
+ font-size: 34rpx;
+ font-weight: 700;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ margin: 0 auto;
+ margin-top: 40rpx;
+}
+
+.btn4 {
+ background: #67C23A;
+ width: 710rpx;
+ height: 100rpx;
+ color: #fff;
+ border-radius: 20rpx;
+ font-size: 34rpx;
+ font-weight: 700;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ margin: 0 auto;
+ margin-top: 40rpx;
+}
+.btn5{
+ background-color: #909399;
+ width: 710rpx;
+ height: 100rpx;
+ color: #fff;
+ border-radius: 20rpx;
+ font-size: 34rpx;
+ font-weight: 700;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ margin: 0 auto;
+ margin-top: 40rpx;
+}
+
+.row {
+ padding-top: 30rpx;
+ height: 300rpx;
+ overflow: hidden;
+ overflow-y: auto;
+ padding: 30rpx;
+ box-sizing: border-box;
+ font-size: 30rpx;
+ display: flex;
+ color: #606266;
+}
+
+.row2 {
+ padding-top: 30rpx;
+ overflow: hidden;
+ overflow-y: auto;
+ padding: 30rpx;
+ padding-bottom: 0;
+ box-sizing: border-box;
+ font-size: 30rpx;
+ display: flex;
+ color: #606266;
+}
+.row_label {
+ margin-right: 20rpx;
+ white-space: nowrap;
+}
+
+.row_con {
+ flex: 1;
+}
+
+.row_con textarea {
+ height: 100% !important;
+}
+
+.tit {
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+ font-size: 32rpx;
+ padding-right: 30rpx;
+ padding-left: 30rpx;
+ padding-top: 20rpx;
}
\ No newline at end of file
diff --git a/packages/WaterPurifier/pages/device/deviceList/deviceList.js b/packages/WaterPurifier/pages/device/deviceList/deviceList.js
index 0e0d34a..979b444 100644
--- a/packages/WaterPurifier/pages/device/deviceList/deviceList.js
+++ b/packages/WaterPurifier/pages/device/deviceList/deviceList.js
@@ -12,37 +12,32 @@ Page({
option1: [
{ text: '全部', value: 0 },
{ text: '已安装', value: 1 },
- { text: '空闲', value: 2 },
+ { text: '待启用', value: 2 },
{ text: '已拆机', value: 3 },
],
option2: [
{ text: '全部', value: 0 },
- { text: '正常', value: 1 },
- { text: '报废', value: 2 },
- { text: '待启用', value: 3 },
+ { text: '在用', value: 1 },
+ { text: '待启用', value: 2 },
+ { text: '关机', value: 3 },
{ text: '已拆机', value: 4 },
{ text: '漏水', value: 5 },
- { text: '制水故障', value: 6 },
- { text: '关机', value: 7 },
- { text: '已欠费', value: 8 },
- { text: '在库', value: 9 },
- { text: '激活失败', value: 10 },
+ { text: '制水故障', value: 6 }
],
-
-
stateType: {
- 1: '正常',
- 2: '报废',
- 3: '待启用',
+ 1: '在用',
+ 2: '待启用',
+ 3: '关机',
4: '已拆机',
5: '漏水',
6: '制水故障',
- 7: '关机',
+ 7: '报废',
8: '已欠费',
9: '在库',
+ 10: '激活失败'
},
value1: 0,
- value2: 'a',
+ value2: 0,
nav_list: {},
foot_width: "",
@@ -51,17 +46,22 @@ Page({
page_size: 10,
flag: false,
total: '',
- deviceList: []
+ deviceList: [],
+ dropdownOpen:false,
+ text2:"设备状态:全部"
},
-
+ onDropdownOpen() {
+ console.log(123);
+ this.setData({ dropdownOpen: true });
+ },
+ onDropdownClose() {
+ this.setData({ dropdownOpen: false });
+ },
ipt1(e) {
let that = this
that.setData({
searchText: e.detail.value,
- page_num: 1,
- deviceList: [],
})
- that.getDeviceList()
},
deviceDesc(e) {
@@ -85,29 +85,62 @@ Page({
deviceList: []
});
if (e.detail == 0) {
- this.getDeviceList();
+ this.getDeviceList(0);
return;
}
- this.getDeviceList(e.detail, '');
+ this.getDeviceList(e.detail);
},
// 设备管理选择
headerEquipmentClick(e) {
+ let that = this
+ let text2 = ''
+ if(e.detail == 0){
+ text2 = '设备状态:全部'
+ }else if(e.detail == 1){
+ text2 = '设备状态:在用'
+ }else if(e.detail == 2){
+ text2 = '设备状态:待启用'
+ }else if(e.detail == 3){
+ text2 = '设备状态:关机'
+ }else if(e.detail == 4){
+ text2 = '设备状态:已拆机'
+ }else if(e.detail == 5){
+ text2 = '设备状态:漏水'
+ }else if(e.detail == 6){
+ text2 = '设备状态:制水故障'
+ }else if(e.detail == 7){
+ text2 = '设备状态:报废'
+ }else if(e.detail == 8){
+ text2 = '设备状态:已欠费'
+ }else if(e.detail == 9){
+ text2 = '设备状态:在库'
+ }else if(e.detail == 10){
+ text2 = '设备状态:激活失败'
+ }
this.setData({
value2: e.detail,
- value1: 0,
page_num: 1,
- deviceList: []
+ deviceList: [],
+ text2
});
if (e.detail == 0) {
- this.getDeviceList();
+ this.getDeviceList(0);
return;
}
- this.getDeviceList('', e.detail);
+ this.getDeviceList(e.detail);
},
-
- getDeviceList(networkStatus, status) {
+ search2(){
+ let that=this
+ that.setData({
+ deviceList:[],
+ flag:false,
+ page_num:1
+ })
+ that.getDeviceList(that.data.value2)
+ },
+ getDeviceList(status) {
wx.showLoading({
title: '加载中',
mask: true
@@ -118,22 +151,11 @@ Page({
page_size: that.data.page_size,
page_num: that.data.page_num,
search: that.data.searchText,
- dealer_id: admin.shop_id
+ info_id: wx.getStorageSync('info_id'),
+ status: Number(status),
};
- if (networkStatus) {
- param = {
- ...param,
- install_status: networkStatus
- }
- }
- if (status) {
- param = {
- ...param,
- status: Number(status),
- }
- }
- util.postUrl4(apiArr2.deviceList, param, res => {
+ util.postUrl(apiArr.masterDeviceList, param, res => {
wx.hideLoading()
let flag = false
if (res.list && res.list.length == that.data.page_size) {
@@ -144,7 +166,7 @@ Page({
flag = false
}
that.setData({
- deviceList: that.data.deviceList.concat(res.list || []),
+ deviceList: that.data.deviceList.concat(res.rows || []),
total: res.total,
flag,
page_num: that.data.page_num + 1
@@ -157,7 +179,7 @@ Page({
* 生命周期函数--监听页面加载
*/
onLoad(options) {
- this.getDeviceList();
+ this.getDeviceList(0);
wx.showShareMenu({
withShareTicket: true,
menus: ['shareAppMessage', 'shareTimeline']
@@ -196,7 +218,18 @@ Page({
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
-
+ let that = this
+ that.setData({
+ flag:false,
+ page_num:1,
+ total:0,
+ searchText:"",
+ value1:"",
+ value2:"",
+ deviceList:[]
+ })
+ that.getDeviceList(0);
+ wx.stopPullDownRefresh();
},
/**
@@ -204,9 +237,8 @@ Page({
*/
onReachBottom() {
let that = this
- console.log(123, that.data.flag);
if (that.data.flag) {
- that.getDeviceList('', that.data.value2)
+ that.getDeviceList( that.data.value2)
}
},
diff --git a/packages/WaterPurifier/pages/device/deviceList/deviceList.json b/packages/WaterPurifier/pages/device/deviceList/deviceList.json
index a7dbd7d..2a62106 100644
--- a/packages/WaterPurifier/pages/device/deviceList/deviceList.json
+++ b/packages/WaterPurifier/pages/device/deviceList/deviceList.json
@@ -1,4 +1,5 @@
{
"usingComponents": {},
- "navigationBarTitleText": "设备管理"
+ "navigationBarTitleText": "设备管理",
+ "enablePullDownRefresh": true
}
\ No newline at end of file
diff --git a/packages/WaterPurifier/pages/device/deviceList/deviceList.wxml b/packages/WaterPurifier/pages/device/deviceList/deviceList.wxml
index 2347e3f..957a3be 100644
--- a/packages/WaterPurifier/pages/device/deviceList/deviceList.wxml
+++ b/packages/WaterPurifier/pages/device/deviceList/deviceList.wxml
@@ -1,32 +1,35 @@
-
+
设备总数:{{total}}
-
-
+
+
+
+
+
-
-
+
+
-
+
设备编码:{{item.device_code}}
客户姓名
- {{item.customer_name}}
+ {{item.customer_info.name}}
客户手机
- {{item.customer_phone}}
+ {{item.customer_info.phone}}
网络状态
@@ -45,19 +48,18 @@
设备地址
- {{item.address}}
+ {{item.region}}{{item.address}}
-
+
-
-新增
+
diff --git a/packages/WaterPurifier/pages/device/deviceList/deviceList.wxss b/packages/WaterPurifier/pages/device/deviceList/deviceList.wxss
index 56a5c28..eebd90c 100644
--- a/packages/WaterPurifier/pages/device/deviceList/deviceList.wxss
+++ b/packages/WaterPurifier/pages/device/deviceList/deviceList.wxss
@@ -1,4 +1,3 @@
-
.deviceList {
background-color: #F9F9F9;
padding-bottom: 120rpx;
@@ -9,6 +8,13 @@
background-color: #fff;
}
+.fixed-page {
+ position: fixed;
+ width: 100%;
+ height: 100%;
+ overflow: hidden;
+}
+
.deviceImg {
width: 157rpx;
height: 157rpx;
@@ -32,7 +38,7 @@
.deviceIpt {
width: 710rpx;
- height: 54rpx;
+ height: 70rpx;
background: #F9F9F9;
border-radius: 100rpx 100rpx 100rpx 100rpx;
margin: 0 auto;
@@ -50,9 +56,9 @@
flex: 1;
}
-.deviceIpt image{
- width: 30rpx;
- height: 30rpx;
+.deviceIpt image {
+ width: 40rpx;
+ height: 40rpx;
}
.dropBox .van-dropdown-menu {
@@ -85,17 +91,25 @@
.deviceItemCon_tit {
font-weight: 400;
- font-size: 26rpx;
+ font-size: 28rpx;
color: #999999;
margin-right: 30rpx;
}
.deviceItemCon_con {
font-weight: 400;
- font-size: 26rpx;
+ font-size: 28rpx;
color: #222222;
}
+.searchBox {
+ padding-left: 30rpx;
+ height: 54rpx;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+}
+
.addBtn {
@@ -116,14 +130,14 @@
.addBtn::after {
content: '';
- background: rgba(77, 154, 255,.5);
+ background: rgba(77, 154, 255, .5);
filter: blur(10.899999618530273rpx);
width: 90rpx;
height: 90rpx;
position: absolute;
left: 50%;
top: 50%;
- transform: translate(-50%,-50%);
+ transform: translate(-50%, -50%);
border-radius: 50%;
overflow: hidden;
z-index: -1;
diff --git a/packages/WaterPurifier/pages/filter/filter.js b/packages/WaterPurifier/pages/filter/filter.js
index 32ec4c9..1ced138 100644
--- a/packages/WaterPurifier/pages/filter/filter.js
+++ b/packages/WaterPurifier/pages/filter/filter.js
@@ -72,6 +72,7 @@ Page({
}
res.list.forEach(item => {
+ console.log(item, 'zzzz');
// 计算已使用天数
item.difDay = that.getDaysBetweenDates(item.start_time || item.create_time);
@@ -85,6 +86,36 @@ Page({
(1 - (item.threshold_volume || 0) / (item.available_volume || 1)) * 100
);
})
+
+ const first = res.list.findIndex(item =>
+ item.parts_name.indexOf("PP棉滤芯") !== -1
+ );
+ if (first !== -1) {
+ const [removed] = res.list.splice(first, 1); // 移除该对象
+ res.list.unshift(removed); // 插入到首位
+ }
+ const Second = res.list.findIndex(item =>
+ item.parts_name.indexOf("PP+CB") !== -1
+ );
+ if (Second !== -1) {
+ const [removed] = res.list.splice(Second, 1); // 移除该对象
+ res.list.splice(1, 0, removed); // 插入到第二位
+ }
+ const Third = res.list.findIndex(item =>
+ item.parts_name.indexOf("RO") !== -1
+ );
+ if (Third !== -1) {
+ const [removed] = res.list.splice(Third, 1); // 移除该对象
+ res.list.splice(2, 0, removed); // 插入到第二位
+ }
+ const Fourth = res.list.findIndex(item =>
+ item.parts_name.indexOf("后置活性炭") !== -1
+ );
+ if (Fourth !== -1) {
+ const [removed] = res.list.splice(Fourth, 1); // 移除该对象
+ res.list.splice(3, 0, removed); // 插入到第二位
+ }
+
that.setData({
filterList: res.list
})
@@ -211,9 +242,9 @@ Page({
that.queryPay()
},
fail(fal) {
- if(fal.errMsg == 'requestPayment:fail cancel'){
+ if (fal.errMsg == 'requestPayment:fail cancel') {
that.payFail(2)
- }else{
+ } else {
that.payFail(1)
}
}
@@ -222,13 +253,13 @@ Page({
})
},
- payFail(e){
+ payFail(e) {
let that = this
- util.postUrl(PayJs.payFail,{
- order_id:that.data.orderMsg.OrderId,
- type:"3",
- state:e,
- },res=>{
+ util.postUrl(PayJs.payFail, {
+ order_id: that.data.orderMsg.OrderId,
+ type: "3",
+ state: e,
+ }, res => {
console.log(res);
})
},
diff --git a/packages/WaterPurifier/pages/filter/filter.wxml b/packages/WaterPurifier/pages/filter/filter.wxml
index 64f6242..41fcaec 100644
--- a/packages/WaterPurifier/pages/filter/filter.wxml
+++ b/packages/WaterPurifier/pages/filter/filter.wxml
@@ -39,20 +39,20 @@
-
+
- 剩余可用{{item.available_days}}天
+ 预计剩余寿命:{{item.available_days}}天
-
+
- 剩余流量{{item.remaining_volume}}
+ 预计剩余寿命:{{item.remaining_volume}}升
购买
- 剩余可用{{item.available_days}}天
+ 预计剩余寿命:{{item.available_days}}天
diff --git a/packages/WaterPurifier/pages/filter/filter.wxss b/packages/WaterPurifier/pages/filter/filter.wxss
index f5d49df..5758e8c 100644
--- a/packages/WaterPurifier/pages/filter/filter.wxss
+++ b/packages/WaterPurifier/pages/filter/filter.wxss
@@ -115,7 +115,7 @@
.filter_Item_Info_desc {
font-weight: 400;
- font-size: 22rpx;
+ font-size: 24rpx;
color: #999999;
margin-top: 10rpx;
text-align: right;
diff --git a/packages/WaterPurifier/pages/repair/repair.js b/packages/WaterPurifier/pages/repair/repair.js
index aaa7749..4870846 100644
--- a/packages/WaterPurifier/pages/repair/repair.js
+++ b/packages/WaterPurifier/pages/repair/repair.js
@@ -1,6 +1,6 @@
-const apiArr = require("~/api/water_filter");
-const { postUrl } = require("~/utils/util");
-const util = require("~/utils/util");
+const apiArr = require("../../../../api/water_filter");
+const { postUrl } = require("../../../../utils/util");
+const util = require("../../../../utils/util");
// pages/water_filter/repair/repair.js
const app = getApp()
@@ -20,6 +20,8 @@ Page({
name: "",
phone: "",
message: "",
+ address:"",
+
fileList: [],
fileList2: [],
time: "",
@@ -42,6 +44,39 @@ Page({
}
return value;
},
+ currentDevice:{},
+
+ show2: false,
+ cityList: [],
+ areaList: [],
+ businessList: [],
+ newAreaList: [], // 默认展示 市区
+ newBusiness: [], // 默认展示 县/区
+ confirmCity: '',
+ confirmArea: '',
+ confirmBusiness: '',
+ },
+ choseRegion(){
+ this.setData({
+ show2:true
+ })
+ },
+ getInfo() {
+ wx.showLoading({
+ title: '加载中...',
+ mask: true
+ })
+ let that = this
+ util.postUrl(apiArr.deviceInfo, { device_id:wx.getStorageSync('device_id')}, res => {
+ wx.hideLoading()
+ that.setData({
+ currentDevice: res,
+ name:res.device_customer.name,
+ phone:res.device_customer.phone,
+ address:res.address,
+ region:res.region
+ })
+ })
},
deleteImg(e) {
console.log(e);
@@ -74,6 +109,12 @@ Page({
message: e.detail
})
},
+ ipt4(e) {
+ let that = this
+ that.setData({
+ address: e.detail
+ })
+ },
switchShow() {
let that = this
@@ -253,7 +294,8 @@ Page({
device_id: selectEquipment.device_id,
fault_desc: message,
fault_imgs: fileList2.length !== 0 ? fileList2[0].url : '',
- user_id: Number(wx.getStorageSync('userId'))
+ user_id: Number(wx.getStorageSync('userId')),
+
}, res => {
wx.hideLoading();
if (res.error) {
@@ -345,9 +387,92 @@ Page({
})
}
});
+ },
+
+ getSSQ() {
+ let that = this
+ util.postUrl2(apiArr.city, {}, res => {
+ util.postUrl2(apiArr.area, {}, res1 => {
+ util.postUrl2(apiArr.business, {}, res2 => {
+ wx.hideLoading();
+ // 省列表来自 res
+ let cityList = res.data.data.rows;
+ // 市列表来自 res1
+ let areaList = res1.data.data.rows;
+ // 区列表来自 res2
+ let businessList = res2.data.data.rows;
+
+ // 处理市列表,将衡水市放到最后
+ let hengshuiIndex = areaList.findIndex(item => item.name === '衡水市');
+ console.log(hengshuiIndex, 'hengshuiIndex');
+ if (hengshuiIndex !== -1) {
+ const hengshui = areaList.splice(hengshuiIndex, 1)[0];
+ areaList.push(hengshui);
+ }
+
+ console.log(businessList);
+ // 处理区列表,将衡水市的桃城区放到最后一个
+ let taochengIndex = businessList.findIndex(item => item.business_name === '桃城区');
+ if (taochengIndex !== -1) {
+ const taocheng = businessList.splice(taochengIndex, 1)[0];
+ businessList.unshift(taocheng);
+ }
+ // 默认展示第一条数据的省、市和区
+ let newArea = res1.data.data.rows.filter((item) => {
+ return item.city_id === res.data.data.rows[0].city_id
+ });
+ let newbus = res2.data.data.rows.filter((item) => {
+ return item.area_id === res1.data.data.rows[0].area_id
+ });
+ // 正确存储数据
+ wx.setStorageSync('cityList', cityList)
+ wx.setStorageSync('areaList', areaList)
+ wx.setStorageSync('businessList', businessList)
+
+ this.setData({
+ cityList: cityList,
+ areaList: areaList,
+ businessList: businessList,
+ newAreaList: newArea, // 默认展示市
+ newBusiness: newbus, // 默认展示区
+ confirmCity: cityList[0],
+ confirmArea: newArea[0],
+ confirmBusiness: newbus[0],
+ })
+ })
+ })
+ })
+ },
+ onClose2() {
+ this.setData({
+ show2: false
+ })
+ },
+
+ bindChange(e) {
+ const { value } = e.detail;
+ const { cityList, areaList, businessList } = this.data;
+ // 每次切换时,根据当前点击的省过滤出所属市区,并且试试变化县/区
+ let newArea = areaList.filter((item) => item.city_id === cityList[value[0]].city_id);
+ let newbus = businessList.filter((item) => item.area_id === newArea[value[1]].area_id);
+ this.setData({
+ newAreaList: newArea,
+ newBusiness: newbus,
+ confirmCity: cityList[value[0]],
+ confirmArea: newArea[value[1]],
+ confirmBusiness: newbus[value[2]],
+ })
+ },
+ onOk() {
+ const { confirmCity, confirmArea, confirmBusiness } = this.data;
+ console.log(confirmCity, confirmArea, confirmBusiness);
+ this.setData({
+ show2: false,
+ region: `${confirmCity.name}${confirmArea.area_name}${confirmBusiness.business_name}`,
+ })
},
/**
@@ -355,10 +480,36 @@ Page({
*/
onLoad(options) {
this.init();
+ this.getInfo()
wx.showShareMenu({
withShareTicket: true,
menus: ['shareAppMessage', 'shareTimeline']
})
+ if (wx.getStorageSync('cityList') && wx.getStorageSync('areaList') && wx.getStorageSync('businessList')) {
+ let res = wx.getStorageSync('cityList')
+ let res1 = wx.getStorageSync('areaList')
+ let res2 = wx.getStorageSync('businessList')
+ console.log(res1);
+ // 默认展示第一条数据 的市区 和 城区
+ let newArea = res1.filter((item) => {
+ return item.city_id === res[0].city_id
+ });
+ let newbus = res2.filter((item) => {
+ return item.area_id === res1[0].area_id
+ });
+ this.setData({
+ cityList: res,
+ areaList: res1,
+ businessList: res2,
+ newAreaList: newArea, // 默认展示 市区
+ newBusiness: newbus, // 默认展示 县/区
+ confirmCity: res1[0],
+ confirmArea: newArea[0],
+ confirmBusiness: newbus[0],
+ })
+ } else {
+ that.getSSQ()
+ }
},
init() {
@@ -378,7 +529,8 @@ Page({
item.product_icon = util.img_url + item.product_icon
})
this.setData({
- equipmentList: res.rows || []
+ equipmentList: res.rows || [],
+ selectEquipment:res.rows[0] || ''
})
}
}
@@ -392,7 +544,9 @@ Page({
selectEquipment: e.currentTarget.dataset.item,
name: e.currentTarget.dataset.item.customer_name,
phone: e.currentTarget.dataset.item.customer_phone,
- equipmentShow: false
+ address:e.currentTarget.dataset.item.address,
+ region:e.currentTarget.dataset.item.region,
+ equipmentShow: false,
})
},
diff --git a/packages/WaterPurifier/pages/repair/repair.wxml b/packages/WaterPurifier/pages/repair/repair.wxml
index 41b2c5f..837601d 100644
--- a/packages/WaterPurifier/pages/repair/repair.wxml
+++ b/packages/WaterPurifier/pages/repair/repair.wxml
@@ -1,103 +1,114 @@
-
-
-
- 基本信息
-
- 设备型号
-
-
+
+
+
+ 基本信息
+
+ 设备型号
+
+
+
+
+
+
+ 联系人
+
+
+
+
+
+
+ 联系电话
+
+
+
+
+
+
+ 省市区
+
+
+
+
+
+
+ 详细地址
+
+
+
+
+
+
+ 期望上门时间
+
+
+ {{time}}
+
+
+
+
+
+
+
-
-
-
- 联系人
-
-
+
+
+ 报修内容
+
-
+
+
+ 图片上传
+
+
+
+
-
- 联系电话
-
-
-
-
- 期望上门时间
-
-
- {{time}}
-
+
+ 提交
-
-
-
-
-
-
-
- 报修内容
-
+
+
+
+ 提交成功
-
-
- 图片上传
-
-
-
-
-
-
-
- 提交
-
-
-
-
-
- 提交成功
-
-
-
-
-
-
+
+
-
-
-
- 取消
+
+
+
+ 取消
+
+
+
+ {{item.device_code}}
+
-
-
- {{item.device_code}}
+
+
+
+
+
-
+
+
+ {{item.name}}
+
+
+ {{item.name}}
+
+
+ {{item.business_name}}
+
+
\ No newline at end of file
diff --git a/packages/WaterPurifier/pages/repair/repair.wxss b/packages/WaterPurifier/pages/repair/repair.wxss
index 5ae7958..eff4108 100644
--- a/packages/WaterPurifier/pages/repair/repair.wxss
+++ b/packages/WaterPurifier/pages/repair/repair.wxss
@@ -211,4 +211,18 @@
.equipment_title {
margin-bottom: 20rpx;
text-align: right;
-}
\ No newline at end of file
+}
+
+
+
+.popup_title {
+ display: flex;
+ margin: 20rpx 30rpx 0;
+ justify-content: space-between;
+ }
+ .popup_label {
+ color: #999;
+ }
+ .color_blue {
+ color: #576b95;
+ }
\ No newline at end of file
diff --git a/packages/WaterPurifier/pages/upKeep/upKeep.js b/packages/WaterPurifier/pages/upKeep/upKeep.js
index fb8e00b..fcbe3f1 100644
--- a/packages/WaterPurifier/pages/upKeep/upKeep.js
+++ b/packages/WaterPurifier/pages/upKeep/upKeep.js
@@ -1,318 +1,348 @@
let util = require('../../../../utils/util')
let apiArr = require('../../../../api/water_filter')
let apiArr2 = require('../../../../api/partner')
+const app = getApp({ allowDefault: true })
+
// packages/WaterPurifier/pages/upKeep/upKeep.js
Page({
- /**
- * 页面的初始数据
- */
- data: {
- stateType: {
- 1: '待分配',
- 2: '维修中',
- 3: '维修成功',
- 4: '已撤销',
+ /**
+ * 页面的初始数据
+ */
+ data: {
+ s: app.system.statusBarHeight, // 状态栏高度
+ n: (app.menu.top - app.system.statusBarHeight) * 2 + app.menu.height, // 导航栏高度
+ t: app.menu.top, // 胶囊局顶部距离
+ h: app.menu.height, // 胶囊高度
+ stateType: {
+ 1: '待分配',
+ 2: '维修中',
+ 3: '维修成功',
+ 4: '已撤销',
+ },
+ option1: [
+ { text: '全部', value: 0 },
+ { text: '待分配', value: 1 },
+ { text: '维修中', value: 2 },
+ { text: '维修成功', value: 3 },
+ { text: '已撤销', value: 4 },
+ ],
+ value1: 0,
+ show: false,
+ MasterList: [],
+ orderList: [],
+ page_num: 1,
+ page_size: 10,
+ total: '',
+ flag: false,
+ sendOrders: {},
+ searchText: "",
},
- option1: [
- { text: '全部', value: 0 },
- { text: '待分配', value: 1 },
- { text: '维修中', value: 2 },
- { text: '维修成功', value: 3 },
- { text: '已撤销', value: 4 },
- ],
- value1: 0,
- show:false,
- MasterList:[],
- orderList:[],
- page_num:1,
- page_size:10,
- total:'',
- flag:false,
- sendOrders: {},
- },
-
- onClose(){
- let that = this
- that.setData({
- show:false
- })
- },
- dispatch(e){
- let that = this
- that.setData({
- show:true,
- sendOrders: e.currentTarget.dataset.item
- })
- },
-
- addOrder(){
- wx.navigateTo({
- url: '/packages/partner/pages/addNewOrder/addNewOrder',
- })
- },
-
- desc(e){
- let that = this
- wx.navigateTo({
- url: `/packages/partner/pages/orderDesc/orderDesc?install_id=${e.currentTarget.dataset.id}&type=repair`,
- })
-},
-
- headerDropdownClick(e) {
- this.setData({
- value1: e.detail,
- orderList: [],
- page_num: 1,
- })
- this.getOrderList();
- },
-
- // 撤回工单
- headerRecallClick(e) {
- const _this = this;
- const { item } = e.currentTarget.dataset;
- console.log('eitmeitmeitmeitme', item)
- wx.showLoading({
- title: '加载中...',
- mask: true
- })
-
- util.postUrl4(apiArr.RecallRepair,{
- status: 4,
- repair_id: item.repair_id,
- },res=>{
- wx.hideLoading()
- if (res.error) {
- wx.showToast({
- title: '撤回工单失败',
- icon: 'none',
+ back(){
+ wx.reLaunch({
+ url: '/packages/partner/pages/partner',
})
- return;
- }
- wx.showToast({
- title: res.msg,
- icon: 'none',
- success() {
- setTimeout(() => {
- _this.setData({
- orderList: [],
- page_num: 1,
- flag:false
+ },
+ ipt1(e) {
+ let that = this
+ console.log(e);
+ that.setData({
+ searchText: e.detail.value,
+ })
+ },
+ onClose() {
+ let that = this
+ that.setData({
+ show: false
+ })
+ },
+ dispatch(e) {
+ let that = this
+ that.setData({
+ show: true,
+ sendOrders: e.currentTarget.dataset.item
+ })
+ },
+
+ addOrder() {
+ wx.navigateTo({
+ url: '/packages/partner/pages/addNewOrder/addNewOrder',
+ })
+ },
+
+ desc(e) {
+ let that = this
+ wx.navigateTo({
+ url: `/packages/partner/pages/OrderMsgInfo/OrderMsgInfo?id=${e.currentTarget.dataset.id}&type=1`,
+ })
+ },
+
+ headerDropdownClick(e) {
+ this.setData({
+ value1: e.detail,
+ orderList: [],
+ page_num: 1,
+ })
+ this.getOrderList();
+ },
+
+ // 撤回工单
+ headerRecallClick(e) {
+ const _this = this;
+ const { item } = e.currentTarget.dataset;
+ console.log('eitmeitmeitmeitme', item)
+ wx.showLoading({
+ title: '加载中...',
+ mask: true
+ })
+
+ util.postUrl4(apiArr.RecallRepair, {
+ status: 4,
+ repair_id: item.repair_id,
+ }, res => {
+ wx.hideLoading()
+ if (res.error) {
+ wx.showToast({
+ title: '撤回工单失败',
+ icon: 'none',
+ })
+ return;
+ }
+ wx.showToast({
+ title: res.msg,
+ icon: 'none',
+ success() {
+ setTimeout(() => {
+ _this.setData({
+ orderList: [],
+ page_num: 1,
+ flag: false
+ })
+ _this.getOrderList();
+ }, 2000)
+ }
})
- _this.getOrderList();
- }, 2000)
- }
- })
- })
- },
-
- getOrderList(name){
- let that = this
- //设置加载状态
- wx.showLoading({
- title: '加载中...',
- mask: true
- });
-
- let admin = wx.getStorageSync('admin')
- let param = {
- status:that.data.value1,
- page_num:that.data.page_num,
- page_size:that.data.page_size,
- dealer_id:admin.shop_id
- };
- if(name) {
- param = {
- ...param,
- customer_name: name
- }
- };
-
- util.postUrl4(apiArr2.getOrderPairList,param,res=>{
- console.log('rererererererere', res);
- wx.hideLoading()
- let flag = false
- if(res.rows.length == that.data.page_size){
- flag = true
- }else{
- flag = false
- }
+ })
+ },
+ search() {
+ let that = this
that.setData({
- orderList:that.data.orderList.concat(res.rows || []),
- page_num:that.data.page_num+1,
- flag
+ orderList: []
})
- console.log(that.data.flag);
- })
- },
+ this.getOrderList();
+ },
+ getOrderList(name) {
+ let that = this
+ //设置加载状态
+ wx.showLoading({
+ title: '加载中...',
+ mask: true
+ });
- headerInputClick(e) {
- const that = this;
- that.setData({
- orderList:[],
- page_num: 1,
- flag:false
- }, () => {
- this.getOrderList(e.detail.value);
- })
- },
+ let admin = wx.getStorageSync('admin')
+ let param = {
+ status: that.data.value1,
+ page_num: that.data.page_num,
+ page_size: that.data.page_size,
+ dealer_id: admin.shop_id,
+ search: that.data.searchText,
+ };
+ if (name) {
+ param = {
+ ...param,
+ customer_name: name
+ }
+ };
- //师傅列表
- getMasterList(){
- let that = this
- wx.showLoading({
- title: '加载中...',
- mask: true
- })
-
- util.postUrl4(apiArr.MasterList,{
- page_num:1,
- page_size:100,
- dealer_id:wx.getStorageSync('dealer_id')
- },res=>{
- wx.hideLoading()
- res.rows.forEach(item=>{
- item.avatar = util.img_url + item.avatar
+ util.postUrl4(apiArr2.getOrderPairList, param, res => {
+ console.log('rererererererere', res);
+ wx.hideLoading()
+ let flag = false
+ if (res.rows.length == that.data.page_size) {
+ flag = true
+ } else {
+ flag = false
+ }
+ that.setData({
+ orderList: that.data.orderList.concat(res.rows || []),
+ page_num: that.data.page_num + 1,
+ flag
+ })
+ console.log(that.data.flag);
})
+ },
+ headerInputClick(e) {
+ const that = this;
that.setData({
- MasterList:res.rows
+ orderList: [],
+ page_num: 1,
+ flag: false
+ }, () => {
+ this.getOrderList(e.detail.value);
})
- })
- },
- //选择师傅
- selectMaster(e){
- console.log(e);
- let that = this
- let MasterList = that.data.MasterList
- MasterList.forEach(item=>{
- item.checked = false
- })
- MasterList[e.currentTarget.dataset.index].checked = true
- that.setData({
- MasterList
- })
-},
-//确定
-sure(){
- let that = this
- const { sendOrders, MasterList } = this.data;
- const checkedMaster = MasterList.filter((item) => item.checked)[0];
- console.log('sendOrders', sendOrders);
- console.log('checkedMaster', checkedMaster);
- that.setData({
- show:false
- })
- util.postUrl4(apiArr.orderRepairAssign,{
- master_id: checkedMaster.info_id,
- repair_id: sendOrders.repair_id,
- dealer_id: Number(wx.getStorageSync('dealer_id'))
- },res=>{
- if (res.error) {
- wx.showToast({
- title: '派单失败',
- icon: 'none',
- })
- return;
- }
- wx.showToast({
- title: res.msg,
- icon: 'none',
- success() {
- setTimeout(() => {
- that.setData({
- flag:false,
- page_num:1,
- orderList:[]
+ },
+
+ //师傅列表
+ getMasterList() {
+ let that = this
+ wx.showLoading({
+ title: '加载中...',
+ mask: true
+ })
+
+ util.postUrl4(apiArr.MasterList, {
+ page_num: 1,
+ page_size: 100,
+ dealer_id: wx.getStorageSync('dealer_id')
+ }, res => {
+ wx.hideLoading()
+ res.rows.forEach(item => {
+ item.avatar = util.img_url + item.avatar
+ })
+
+ that.setData({
+ MasterList: res.rows
+ })
+ })
+ },
+ //选择师傅
+ selectMaster(e) {
+ console.log(e);
+ let that = this
+ let MasterList = that.data.MasterList
+ MasterList.forEach(item => {
+ item.checked = false
+ })
+ MasterList[e.currentTarget.dataset.index].checked = true
+ that.setData({
+ MasterList
+ })
+ },
+ //确定
+ sure() {
+ let that = this
+ const { sendOrders, MasterList } = this.data;
+ const checkedMaster = MasterList.filter((item) => item.checked)[0];
+ console.log('sendOrders', sendOrders);
+ console.log('checkedMaster', checkedMaster);
+ that.setData({
+ show: false
+ })
+ util.postUrl4(apiArr2.assignRepairMaster, {
+ master_id: checkedMaster.info_id,
+ repair_id: sendOrders.repair_id,
+ }, res => {
+ if (res.error) {
+ wx.showToast({
+ title: '派单失败',
+ icon: 'none',
+ })
+ return;
+ }
+ wx.showToast({
+ title: res.msg,
+ icon: 'none',
+ success() {
+ setTimeout(() => {
+ that.setData({
+ flag: false,
+ page_num: 1,
+ orderList: []
+ })
+ that.getOrderList()
+ }, 1500)
+ }
+ })
+ })
+ },
+
+ /**
+ * 生命周期函数--监听页面加载
+ */
+ onLoad(options) {
+ let that = this
+ // that.getFootNav()
+ // that.getOrderList()
+ that.getMasterList()
+ wx.showShareMenu({
+ withShareTicket: true,
+ menus: ['shareAppMessage', 'shareTimeline']
+ })
+ },
+
+ /**
+ * 生命周期函数--监听页面初次渲染完成
+ */
+ onReady() {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面显示
+ */
+ onShow() {
+ this.setData({
+ page_num: 1,
+ orderList: [],
+ })
+ this.getOrderList()
+ },
+
+ /**
+ * 生命周期函数--监听页面隐藏
+ */
+ onHide() {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面卸载
+ */
+ onUnload() {
+
+ },
+
+ /**
+ * 页面相关事件处理函数--监听用户下拉动作
+ */
+ onPullDownRefresh() {
+ let that = this
+ that.setData({
+ page_num: 1,
+ orderList: [],
+ flag: false
})
that.getOrderList()
- }, 1500)
- }
- })
- })
-},
+ wx.stopPullDownRefresh();
+ },
- /**
- * 生命周期函数--监听页面加载
- */
- onLoad(options) {
- let that =this
- // that.getFootNav()
- // that.getOrderList()
- // that.getMasterList()
- wx.showShareMenu({
- withShareTicket: true,
- menus: ['shareAppMessage', 'shareTimeline']
- })
- },
+ /**
+ * 页面上拉触底事件的处理函数
+ */
+ onReachBottom() {
+ let that = this
+ console.log(123, that.data.flag);
+ if (that.data.flag) {
+ this.getOrderList()
+ }
+ },
- /**
- * 生命周期函数--监听页面初次渲染完成
- */
- onReady() {
-
- },
-
- /**
- * 生命周期函数--监听页面显示
- */
- onShow() {
- this.setData({
- page_num: 1,
- orderList: [],
- })
- this.getOrderList()
- this.getMasterList()
- },
-
- /**
- * 生命周期函数--监听页面隐藏
- */
- onHide() {
-
- },
-
- /**
- * 生命周期函数--监听页面卸载
- */
- onUnload() {
-
- },
-
- /**
- * 页面相关事件处理函数--监听用户下拉动作
- */
- onPullDownRefresh() {
-
- },
-
- /**
- * 页面上拉触底事件的处理函数
- */
- onReachBottom() {
- let that = this
- console.log(123,that.data.flag);
- if(that.data.flag){
- this.getOrderList()
- }
- },
-
- /**
- * 用户点击右上角分享
- */
- onShareAppMessage(){
- return {
- title: '人人爱净水', // 分享卡片标题(必填)
- path: '/pages/water_filter/water_filter', // 用户点击后跳转的路径(可选,默认当前页)
- imageUrl: 'https://wechat-img-file.oss-cn-beijing.aliyuncs.com/share.png' // 自定义图片(可选,比例建议 5:4)
- }
-},
-onShareTimeline() {
- return {
- title: '人人爱净水', // 自定义标题
- query: '', // 自定义页面路径中的参数
- imageUrl: 'https://wechat-img-file.oss-cn-beijing.aliyuncs.com/share.png' // 自定义分享图片路径
- }
-},
+ /**
+ * 用户点击右上角分享
+ */
+ onShareAppMessage() {
+ return {
+ title: '人人爱净水', // 分享卡片标题(必填)
+ path: '/pages/water_filter/water_filter', // 用户点击后跳转的路径(可选,默认当前页)
+ imageUrl: 'https://wechat-img-file.oss-cn-beijing.aliyuncs.com/share.png' // 自定义图片(可选,比例建议 5:4)
+ }
+ },
+ onShareTimeline() {
+ return {
+ title: '人人爱净水', // 自定义标题
+ query: '', // 自定义页面路径中的参数
+ imageUrl: 'https://wechat-img-file.oss-cn-beijing.aliyuncs.com/share.png' // 自定义分享图片路径
+ }
+ },
})
\ No newline at end of file
diff --git a/packages/WaterPurifier/pages/upKeep/upKeep.json b/packages/WaterPurifier/pages/upKeep/upKeep.json
index e82b2e4..e3cfdde 100644
--- a/packages/WaterPurifier/pages/upKeep/upKeep.json
+++ b/packages/WaterPurifier/pages/upKeep/upKeep.json
@@ -2,5 +2,6 @@
"usingComponents": {
"Footer":"/component/footer/index"
},
- "navigationBarTitleText": "维修工单"
+ "enablePullDownRefresh": true,
+ "navigationStyle": "custom"
}
\ No newline at end of file
diff --git a/packages/WaterPurifier/pages/upKeep/upKeep.wxml b/packages/WaterPurifier/pages/upKeep/upKeep.wxml
index 1762e43..c53ca93 100644
--- a/packages/WaterPurifier/pages/upKeep/upKeep.wxml
+++ b/packages/WaterPurifier/pages/upKeep/upKeep.wxml
@@ -1,11 +1,30 @@
+
+
+
+
+
+
+
+
+ 维修工单
+
+
+
+
+
+
+
+
-
-
+
+
+
+
+
- 新增
@@ -25,8 +44,9 @@
工单号:{{item.repair_no}}
+
- 设备号
+ 设备编号
{{item.device_code}}
@@ -50,14 +70,13 @@
{{item.fault_desc}}
- 具体位置
- {{item.region + item.address}}
+ 详细地址
+ {{item.region + item.address || "暂无数据"}}
撤回
派单
-
diff --git a/packages/WaterPurifier/pages/upKeep/upKeep.wxss b/packages/WaterPurifier/pages/upKeep/upKeep.wxss
index c5589e7..b1d0de1 100644
--- a/packages/WaterPurifier/pages/upKeep/upKeep.wxss
+++ b/packages/WaterPurifier/pages/upKeep/upKeep.wxss
@@ -1,5 +1,11 @@
.upkeep{
}
+.nav-box{
+ padding-bottom: 30rpx;
+}
+.nav-bar-right{
+ opacity: 0;
+}
.upkeep_select {
display: flex;
align-items: center;
@@ -8,16 +14,20 @@
font-size: 26rpx;
color: #222222;
background-color: #F9F9F9;
- padding: 30rpx 20rpx;
+ padding: 16rpx 20rpx;
+}
+.ipt input{
+ flex: 1;
+ height: 100%;
}
-
.upkeep_select .ipt {
display: flex;
align-items: center;
justify-content: space-between;
background-color: #fff;
- width: 623rpx;
- height: 54rpx;
+ width: 710rpx;
+ height: 98rpx;
+
background: #FFFFFF;
border-radius: 100rpx 100rpx 100rpx 100rpx;
padding-left: 26rpx;
@@ -25,8 +35,8 @@
}
.ipt image {
- width: 30rpx;
- height: 30rpx;
+ width: 42rpx;
+ height: 42rpx;
}
.orderList {
@@ -54,7 +64,7 @@
.orderItem_Item_tit {
font-weight: 400;
- font-size: 26rpx;
+ font-size: 28rpx;
color: #999999;
min-width: 110rpx;
margin-right: 30rpx;
@@ -62,7 +72,7 @@
.orderItem_Item_con {
font-weight: 400;
- font-size: 26rpx;
+ font-size: 28rpx;
color: #222222;
}
@@ -236,4 +246,12 @@
.MasterAva .van-uploader__wrapper{
width: 100% !important;
height: 100% !important;
+}
+
+
+.searchBox{
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ padding-left: 40rpx;
}
\ No newline at end of file
diff --git a/packages/master/PersonCen/index.js b/packages/master/PersonCen/index.js
index 80c2fc3..ecaa208 100644
--- a/packages/master/PersonCen/index.js
+++ b/packages/master/PersonCen/index.js
@@ -43,7 +43,7 @@ Page({
loginOut(){
wx.removeStorageSync('is_master')
wx.redirectTo({
- url:"/pages/chooseEntrance/chooseEntrance"
+ url:"/pages/newLogin/newLogin"
})
},
@@ -70,8 +70,10 @@ Page({
})
if (res.avatar) {
+ let avatarUrl = res.avatar.startsWith('http')? res.avatar : util.img_url + res.avatar
+ console.log(res.avatar.startsWith('http'));
that.setData({
- avatarUrl: util.img_url + res.avatar
+ avatarUrl
})
}
diff --git a/packages/master/PersonCen/index.wxml b/packages/master/PersonCen/index.wxml
index 4adf111..0591228 100644
--- a/packages/master/PersonCen/index.wxml
+++ b/packages/master/PersonCen/index.wxml
@@ -27,9 +27,9 @@
-
+
diff --git a/packages/master/addNewOrder/index.js b/packages/master/addNewOrder/index.js
new file mode 100644
index 0000000..16fdcc3
--- /dev/null
+++ b/packages/master/addNewOrder/index.js
@@ -0,0 +1,394 @@
+let util = require('../../../utils/util')
+let apiArr = require('../../../api/partner')
+let apiArr2 = require('../../../api/water_filter')
+Page({
+
+ /**
+ * 页面的初始数据
+ */
+ data: {
+ fileList: [],
+ fileList2: [],
+ device_code: "",
+ customer_name: "",
+ customer_phone: "",
+ region: "",
+ address: "",
+ deviceList: [],
+ fault_desc: "",
+ page_num: 1,
+ page_size: 50,
+ show: false,
+ currentDeviceInfo: {
+ region:"",
+ address:"",
+ },
+ formatter(type, value) {
+ if (type === 'year') {
+ return `${value}年`;
+ }
+ if (type === 'month') {
+ return `${value}月`;
+ }
+ if (type === 'day') {
+ return `${value}日`;
+ }
+ return value;
+ },
+ show2: false,
+ cityList: [],
+ areaList: [],
+ businessList: [],
+ newAreaList: [], // 默认展示 市区
+ newBusiness: [], // 默认展示 县/区
+ confirmCity: '',
+ confirmArea: '',
+ confirmBusiness: '',
+ deviceInfo:{
+ customer_name:"",
+ customer_phone:"",
+ device_code:"",
+ address:"",
+ region:""
+ }
+ },
+ onClose2() {
+ this.setData({
+ show2: false
+ })
+ },
+ headerAreaClick() {
+ this.setData({
+ show2: true
+ })
+ },
+ bindChange(e) {
+ const { value } = e.detail;
+ const { cityList, areaList, businessList } = this.data;
+ // 每次切换时,根据当前点击的省过滤出所属市区,并且试试变化县/区
+ let newArea = areaList.filter((item) => item.city_id === cityList[value[0]].city_id);
+ let newbus = businessList.filter((item) => item.area_id === newArea[value[1]].area_id);
+ this.setData({
+ newAreaList: newArea,
+ newBusiness: newbus,
+ confirmCity: cityList[value[0]],
+ confirmArea: newArea[value[1]],
+ confirmBusiness: newbus[value[2]],
+ })
+
+ },
+ onOk() {
+ const { confirmCity, confirmArea, confirmBusiness } = this.data;
+ console.log(confirmCity, confirmArea, confirmBusiness);
+ this.setData({
+ show2: false,
+ "currentDeviceInfo.region": `${confirmCity.name}${confirmArea.area_name}${confirmBusiness.business_name}`,
+ })
+ },
+
+ getSSQ() {
+ let that = this
+ util.postUrl2(apiArr2.city, {}, res => {
+ util.postUrl2(apiArr2.area, {}, res1 => {
+ util.postUrl2(apiArr2.business, {}, res2 => {
+ wx.hideLoading();
+ // 省列表来自 res
+ let cityList = res.data.data.rows;
+ // 市列表来自 res1
+ let areaList = res1.data.data.rows;
+ // 区列表来自 res2
+ let businessList = res2.data.data.rows;
+
+ // 处理市列表,将衡水市放到最后
+ let hengshuiIndex = areaList.findIndex(item => item.name === '衡水市');
+ console.log(hengshuiIndex, 'hengshuiIndex');
+ if (hengshuiIndex !== -1) {
+ const hengshui = areaList.splice(hengshuiIndex, 1)[0];
+ areaList.push(hengshui);
+ }
+
+ console.log(businessList);
+ // 处理区列表,将衡水市的桃城区放到最后一个
+ let taochengIndex = businessList.findIndex(item => item.business_name === '桃城区');
+ if (taochengIndex !== -1) {
+ const taocheng = businessList.splice(taochengIndex, 1)[0];
+ businessList.unshift(taocheng);
+ }
+
+
+ // 默认展示第一条数据的省、市和区
+ let newArea = res1.data.data.rows.filter((item) => {
+ return item.city_id === res.data.data.rows[0].city_id
+ });
+ let newbus = res2.data.data.rows.filter((item) => {
+ return item.area_id === res1.data.data.rows[0].area_id
+ });
+
+ // 正确存储数据
+ wx.setStorageSync('cityList', cityList)
+ wx.setStorageSync('areaList', areaList)
+ wx.setStorageSync('businessList', businessList)
+
+ this.setData({
+ cityList: cityList,
+ areaList: areaList,
+ businessList: businessList,
+ newAreaList: newArea, // 默认展示市
+ newBusiness: newbus, // 默认展示区
+ confirmCity: cityList[0],
+ confirmArea: newArea[0],
+ confirmBusiness: newbus[0],
+ })
+ })
+ })
+ })
+ },
+ changeShow1() {
+ let that = this
+ // wx.navigateTo({
+ // url: '/packages/partner/pages/chooseRepairDevice/chooseRepairDevice',
+ // })
+ that.setData({
+ show:true
+ })
+ },
+ getDeviceList() {
+ let that = this
+ util.postUrl(apiArr2.masterDeviceList, {
+ page_num: that.data.page_num,
+ page_size: that.data.page_size,
+ info_id:wx.getStorageSync('info_id')
+ }, res => {
+ that.setData({
+ deviceList: res.rows
+ })
+ })
+ },
+
+ changeAddress(e){
+ console.log(e);
+ let that = this
+ that.setData({
+ "currentDeviceInfo.address":e.detail.value
+ })
+ },
+
+ updateFault_desc(e) {
+ let that = this
+ that.setData({
+ fault_desc: e.detail.value
+ })
+ },
+
+ confirmPackage(e) {
+ let that = this
+ that.setData({
+ show: false,
+ // currentDeviceInfo: e.detail.value,
+ device_code: e.detail.value.device_code
+ })
+ },
+ onClose() {
+ let that = this
+ that.setData({
+ show: false
+ })
+ },
+
+ beforeRead(e) {
+ let that = this
+ wx.showLoading({
+ title: '上传中',
+ mask: true,
+ })
+ util.uploadFileUrl(e.detail.file.url, (res) => {
+ wx.hideLoading()
+ let datas = JSON.parse(res)
+ console.log(datas.data);
+ let url = util.img_url + datas.data.path
+ let fileList = that.data.fileList
+ let fileList2 = that.data.fileList2
+ let obj = {
+ url: url,
+ name: 'avatar'
+ }
+ let obj2 = {
+ url: datas.data.path,
+ name: 'avatar'
+ }
+ fileList.push(obj)
+ fileList2.push(obj2)
+ that.setData({
+ fileList,
+ fileList2
+ })
+ })
+ },
+ deleteImg(e) {
+ console.log(e);
+ let that = this
+ let fileList = that.data.fileList
+ let fileList2 = that.data.fileList2
+ fileList.splice(e.detail.index, 1)
+ fileList2.splice(e.detail.index, 1)
+ that.setData({
+ fileList,
+ fileList2
+ })
+ },
+ changeCustomerPhone(e){
+ let that = this
+ that.setData({
+ customer_phone: e.detail.value
+ })
+ if(e.detail.value.length == 11){
+ that.searchCustomer(e.detail.value)
+ }
+ },
+ searchCustomer(e) {
+ let that = this
+ util.postUrl(apiArr.phoneSearch, {
+ phone: e
+ }, res => {
+ console.log(res);
+ if (res.row.length == 1) {
+ that.setData({
+ customer_name: res.row[0].name,
+ address: res.row[0].address,
+ customer_id: res.row[0].info_id,
+ area:res.row[0].region,
+ address:res.row[0].address,
+ customer_phone:res.row[0].phone,
+ })
+ } else {
+ that.setData({
+ customer_name: '',
+ address: '',
+ customer_id: 0
+ })
+ }
+ })
+ },
+ submit() {
+ let that = this
+
+
+ if (!that.data.deviceInfo.device_code) {
+ return wx.showToast({
+ title: '请选择维修设备',
+ icon: "none"
+ })
+ }
+ if (!that.data.fault_desc) {
+ return wx.showToast({
+ title: '请填写故障描述',
+ icon: "none"
+ })
+ }
+
+ if (!that.data.fileList.length) {
+ return wx.showToast({
+ title: '请上传故障图片',
+ icon: "none"
+ })
+ }
+ util.postUrl(apiArr.createRepairOrder, {
+ device_code: that.data.deviceInfo.device_code,
+ appointment_time: '',
+ fault_desc: that.data.fault_desc,
+ fault_imgs: that.data.fileList2[0].url,
+ info_id:wx.getStorageSync('info_id')
+ }, res => {
+ wx.showToast({
+ title: '创建成功!',
+ icon: "none"
+ })
+ setTimeout(() => {
+ wx.navigateBack({
+ delta: 1
+ })
+ }, 1500)
+ })
+ },
+ /**
+ * 生命周期函数--监听页面加载
+ */
+ onLoad(options) {
+ let that = this
+ that.getDeviceList()
+ if (wx.getStorageSync('cityList') && wx.getStorageSync('areaList') && wx.getStorageSync('businessList')) {
+ let res = wx.getStorageSync('cityList')
+ let res1 = wx.getStorageSync('areaList')
+ let res2 = wx.getStorageSync('businessList')
+ console.log(res1);
+ // 默认展示第一条数据 的市区 和 城区
+ let newArea = res1.filter((item) => {
+ return item.city_id === res[0].city_id
+ });
+ let newbus = res2.filter((item) => {
+ return item.area_id === res1[0].area_id
+ });
+ this.setData({
+ cityList: res,
+ areaList: res1,
+ businessList: res2,
+ newAreaList: newArea, // 默认展示 市区
+ newBusiness: newbus, // 默认展示 县/区
+ confirmCity: res1[0],
+ confirmArea: newArea[0],
+ confirmBusiness: newbus[0],
+ })
+ } else {
+ that.getSSQ()
+ }
+ },
+
+ /**
+ * 生命周期函数--监听页面初次渲染完成
+ */
+ onReady() {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面显示
+ */
+ onShow() {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面隐藏
+ */
+ onHide() {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面卸载
+ */
+ onUnload() {
+
+ },
+
+ /**
+ * 页面相关事件处理函数--监听用户下拉动作
+ */
+ onPullDownRefresh() {
+
+ },
+
+ /**
+ * 页面上拉触底事件的处理函数
+ */
+ onReachBottom() {
+
+ },
+
+ /**
+ * 用户点击右上角分享
+ */
+ onShareAppMessage() {
+
+ }
+})
\ No newline at end of file
diff --git a/packages/master/addNewOrder/index.json b/packages/master/addNewOrder/index.json
new file mode 100644
index 0000000..b24f6b1
--- /dev/null
+++ b/packages/master/addNewOrder/index.json
@@ -0,0 +1,4 @@
+{
+ "usingComponents": {},
+ "navigationBarTitleText": "新增维修工单"
+ }
\ No newline at end of file
diff --git a/packages/master/addNewOrder/index.wxml b/packages/master/addNewOrder/index.wxml
new file mode 100644
index 0000000..2587dcc
--- /dev/null
+++ b/packages/master/addNewOrder/index.wxml
@@ -0,0 +1,127 @@
+
+
+
+
+
+ *
+ 维修设备
+
+
+
+
+
+
+
+
+
+ *
+ 用户姓名
+
+
+
+
+
+
+
+
+ *
+ 用户电话
+
+
+
+
+
+
+
+
+
+
+ *
+ 所在区域
+
+
+
+
+
+
+
+
+ *
+ 详细地址
+
+
+
+
+
+
+
+
+
+ *
+ 故障描述
+
+
+
+
+
+
+
+
+
+
+ *
+ 故障图片
+
+
+
+
+
+
+
+
+
+ 提交
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{item.name}}
+
+
+ {{item.name}}
+
+
+ {{item.business_name}}
+
+
+
\ No newline at end of file
diff --git a/packages/master/addNewOrder/index.wxss b/packages/master/addNewOrder/index.wxss
new file mode 100644
index 0000000..7c05122
--- /dev/null
+++ b/packages/master/addNewOrder/index.wxss
@@ -0,0 +1,88 @@
+.newWorkOrder{
+ padding-bottom: 60rpx;
+}
+.form {
+ margin: 0 50rpx;
+ margin-top: 12rpx;
+}
+
+.formItem {
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+ padding: 30rpx 0;
+ border-bottom: 1rpx solid #E6E6E6;
+ box-sizing: border-box;
+}
+
+.formItem_tit {
+ display: flex;
+ font-weight: 400;
+ font-size: 26rpx;
+ color: #222;
+}
+
+.formItem_tit .icon {
+ color: #2583FF;
+ font-size: 26rpx;
+}
+
+.formItem_con {
+ text-align: right;
+ font-weight: 400;
+ font-size: 26rpx;
+ color: #222222;
+}
+
+.formItem_con view {
+ display: flex;
+ align-items: center;
+}
+
+.formItem_con image {
+ width: 13rpx;
+ height: 26rpx;
+ margin-left: 13rpx;
+}
+.formItem2{
+ display: flex;
+ flex-direction: column;
+ padding: 30rpx 0;
+}
+.formItem_con2{
+ display: flex;
+ width: 100%;
+ margin-top: 20rpx;
+ height: 200rpx;
+}
+.formItem_con2 textarea{
+ width: 100%;
+ height: 100%;
+}
+
+.submit {
+ font-weight: 400;
+ font-size: 36rpx;
+ color: #FFFFFF;
+ width: 650rpx;
+ height: 80rpx;
+ background: #2583FF;
+ border-radius: 100rpx 100rpx 100rpx 100rpx;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ margin-top: 0rpx;
+}
+
+
+.popup_title {
+ display: flex;
+ margin: 20rpx 30rpx 0;
+ justify-content: space-between;
+ }
+ .popup_label {
+ color: #999;
+ }
+ .color_blue {
+ color: #576b95;
+ }
\ No newline at end of file
diff --git a/packages/master/device/index.js b/packages/master/device/index.js
index ddf5a9c..307df36 100644
--- a/packages/master/device/index.js
+++ b/packages/master/device/index.js
@@ -18,9 +18,9 @@ Page({
option1: [
{ text: '全部', value: 0 },
{ text: '在用', value: 1 },
- { text: '已拆机', value: 2 },
- { text: '已报废 ', value: 3 },
- { text: '已在库', value: 4 },
+ { text: '已拆机', value: 4 },
+ { text: '已报废 ', value: 7 },
+ { text: '已在库', value: 9 },
],
active: 0,
diff --git a/packages/master/device/index.wxml b/packages/master/device/index.wxml
index 0431637..b94e577 100644
--- a/packages/master/device/index.wxml
+++ b/packages/master/device/index.wxml
@@ -5,23 +5,38 @@
-
+
-
+
{{item.product_name}}
+
+
+
+ {{item.device_code}}
+
-
+
{{item.customer_name}}
-
+
{{item.customer_phone}}
+
+
+ {{item.repairman_name}}
+
+
+
+
+ {{item.repairman_phone}}
+
+
{{item.region}} {{item.address}}
@@ -39,7 +54,7 @@
已拆机
漏水
制水故障
- 报废
+ 已报废
已欠费
在库
激活失败
@@ -48,4 +63,6 @@
+
+
\ No newline at end of file
diff --git a/packages/master/deviceInfo/index.js b/packages/master/deviceInfo/index.js
index 0d67576..b80cbf3 100644
--- a/packages/master/deviceInfo/index.js
+++ b/packages/master/deviceInfo/index.js
@@ -187,6 +187,9 @@ Page({
remark: ''
},res=>{
console.log(res);
+ wx.navigateTo({
+ url: `/packages/master/orderDesc/index?id=${res.uninstall_id}&type=3`,
+ })
})
},
diff --git a/packages/master/deviceInfo/index.wxml b/packages/master/deviceInfo/index.wxml
index 132e798..85126b4 100644
--- a/packages/master/deviceInfo/index.wxml
+++ b/packages/master/deviceInfo/index.wxml
@@ -70,9 +70,8 @@
漏水故障
主板故障
-
-
+
{{currentDevice.network_status == '1'?'在线':'离线'}}
diff --git a/packages/master/deviceInfo/index.wxss b/packages/master/deviceInfo/index.wxss
index 60423c6..0a3f467 100644
--- a/packages/master/deviceInfo/index.wxss
+++ b/packages/master/deviceInfo/index.wxss
@@ -631,14 +631,17 @@
color: #FFFFFF;
}
-.deleteBtn{
- width: 100rpx;
+.deleteBtn {
+ width: 710rpx;
height: 100rpx;
background-color: #dd0000;
color: #fff;
- border-radius: 50%;
+ border-radius: 20rpx;
+ font-size: 34rpx;
+ font-weight: 700;
display: flex;
align-items: center;
justify-content: center;
margin: 0 auto;
+ margin-top: 40rpx;
}
\ No newline at end of file
diff --git a/packages/master/masterIndex/index.js b/packages/master/masterIndex/index.js
new file mode 100644
index 0000000..00deb27
--- /dev/null
+++ b/packages/master/masterIndex/index.js
@@ -0,0 +1,130 @@
+let util = require('../../../utils/util')
+let apiArr = require('../../../api/water_filter')
+
+// packages/master/masterIndex/index.js
+Page({
+
+ /**
+ * 页面的初始数据
+ */
+ data: {
+ funcList: [
+ {
+ text: "新装工单",
+ img: "https://wechat-img-file.oss-cn-beijing.aliyuncs.com/water_filter/partner/partner_icon3.png?1",
+ url: "../order/index?type=0",
+ },
+ {
+ text: "维修工单",
+ img: "https://wechat-img-file.oss-cn-beijing.aliyuncs.com/water_filter/partner/partner_icon4.png?1",
+ url: "../order/index?type=1",
+ },
+ {
+ text: "拆除工单",
+ img: "https://wechat-img-file.oss-cn-beijing.aliyuncs.com/removeIcon.png",
+ url: "../order/index?type=3",
+ },
+ {
+ text: "滤芯更换工单",
+ img: "https://wechat-img-file.oss-cn-beijing.aliyuncs.com/partsIcon.png",
+ url: "../order/index?type=2",
+ },
+ {
+ text: "设备管理",
+ img: "https://wechat-img-file.oss-cn-beijing.aliyuncs.com/water_filter/partner/partner_icon2.png?1",
+ url: "../../WaterPurifier/pages/device/deviceList/deviceList",
+ }
+ ],
+ serverInfo: {}
+ },
+
+ callPhone() {
+ let that = this
+ wx.makePhoneCall({
+ phoneNumber: that.data.serverInfo.customer_phone,
+ })
+ },
+ jump(e) {
+ wx.navigateTo({
+ url: e.currentTarget.dataset.url,
+ })
+ },
+ getMasterInfo() {
+ let that = this
+ util.postUrl(apiArr.masterInfo, {
+ user_id: wx.getStorageSync('userId')
+ }, res => {
+ that.setData({
+ info_id: res.info_id
+ })
+ wx.setStorageSync('info_id', res.info_id)
+ })
+ },
+
+ getServerInfo() {
+ let that = this
+ util.postUrl(apiArr.getServerInfo, '', res => {
+ res.qr_code = res.qr_code.startsWith('http') ? res.qr_code : util.img_url + res.qr_code
+ console.log(res.qr_code);
+ that.setData({
+ serverInfo: res
+ })
+ })
+ },
+ /**
+ * 生命周期函数--监听页面加载
+ */
+ onLoad(options) {
+ this.getMasterInfo()
+ this.getServerInfo()
+ },
+
+ /**
+ * 生命周期函数--监听页面初次渲染完成
+ */
+ onReady() {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面显示
+ */
+ onShow() {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面隐藏
+ */
+ onHide() {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面卸载
+ */
+ onUnload() {
+
+ },
+
+ /**
+ * 页面相关事件处理函数--监听用户下拉动作
+ */
+ onPullDownRefresh() {
+
+ },
+
+ /**
+ * 页面上拉触底事件的处理函数
+ */
+ onReachBottom() {
+
+ },
+
+ /**
+ * 用户点击右上角分享
+ */
+ onShareAppMessage() {
+
+ }
+})
\ No newline at end of file
diff --git a/packages/master/masterIndex/index.json b/packages/master/masterIndex/index.json
new file mode 100644
index 0000000..b097ee8
--- /dev/null
+++ b/packages/master/masterIndex/index.json
@@ -0,0 +1,5 @@
+{
+ "usingComponents": {
+ "Footer":"/component/masterFooter/index"
+ }
+}
\ No newline at end of file
diff --git a/packages/master/masterIndex/index.wxml b/packages/master/masterIndex/index.wxml
new file mode 100644
index 0000000..5042470
--- /dev/null
+++ b/packages/master/masterIndex/index.wxml
@@ -0,0 +1,31 @@
+
+ 工单管理
+
+
+
+ {{item.text}}
+
+
+
+
+
+ 平台客服
+
+
+
+ 平台电话
+ {{serverInfo.customer_phone}}
+
+
+ 工作时间
+ {{serverInfo.business_hours}}
+
+
+
+
+ 长按保存二维码
+
+
+
+
+
\ No newline at end of file
diff --git a/packages/master/masterIndex/index.wxss b/packages/master/masterIndex/index.wxss
new file mode 100644
index 0000000..99af6ee
--- /dev/null
+++ b/packages/master/masterIndex/index.wxss
@@ -0,0 +1,86 @@
+page {
+ background-color: #f0f2fd;
+}
+
+.orderMsg {
+ background-color: #fff;
+ padding: 10rpx;
+ width: 90%;
+ margin: 0 auto;
+ margin-top: 20rpx;
+ border-radius: 20rpx;
+ overflow: hidden;
+}
+
+.Tit {
+ font-weight: bold;
+ font-size: 32rpx;
+ color: #222222;
+ margin-left: 30rpx;
+ margin-top: 20rpx;
+}
+
+
+.func {
+ display: flex;
+ flex-wrap: wrap;
+ margin-top: 46rpx;
+}
+
+.funcItem {
+ display: flex;
+ flex-direction: column;
+ align-items: center;
+ font-weight: 400;
+ font-size: 26rpx;
+ color: #222222;
+ width: 25%;
+ margin-bottom: 50rpx;
+}
+
+.funcItem image {
+ height: 54rpx;
+ margin-bottom: 15rpx;
+}
+
+.orderMsgBox {
+ display: flex;
+ /* align-items: center; */
+ align-items: stretch;
+ justify-content: space-between;
+ margin-top: 30rpx;
+}
+
+.orderMsgBox_left {
+ width: 48%;
+ background-color: #edf6fd;
+ border-radius: 20rpx;
+ display: flex;
+ flex-direction: column;
+ align-items: center;
+ justify-content: center;
+}
+
+.orderMsgBox_right {
+ width: 48%;
+ border-radius: 20rpx;
+ border: 1rpx solid #000;
+ overflow: hidden;
+ display: flex;
+ flex-direction: column;
+ align-items: center;
+ justify-content: center;
+ padding: 10rpx 0;
+}
+.orderMsgBox_right span{
+ margin-top: 20rpx;
+}
+
+.orderMsgBox_left1 {
+ text-align: center;
+ margin-bottom: 20rpx;
+}
+
+.orderMsgBox_left2 {
+ text-align: center;
+}
\ No newline at end of file
diff --git a/packages/master/masterInfo/index.json b/packages/master/masterInfo/index.json
index 6f5247b..d58b50c 100644
--- a/packages/master/masterInfo/index.json
+++ b/packages/master/masterInfo/index.json
@@ -1,3 +1,4 @@
{
- "usingComponents": {}
+ "usingComponents": {},
+ "navigationBarTitleText": "个人信息"
}
\ No newline at end of file
diff --git a/packages/master/order/index.js b/packages/master/order/index.js
index 09d8348..b271e6d 100644
--- a/packages/master/order/index.js
+++ b/packages/master/order/index.js
@@ -9,7 +9,7 @@ Page({
n: (app.menu.top - app.system.statusBarHeight) * 2 + app.menu.height, // 导航栏高度
t: app.menu.top, // 胶囊局顶部距离
h: app.menu.height, // 胶囊高度
-
+ currentType: "",
option1: [
{ text: '新装工单', value: 0 },
{ text: '维修工单', value: 1 },
@@ -17,8 +17,9 @@ Page({
{ text: '移机工单', value: 4 },
{ text: '滤芯更换工单', value: 2 },
],
- active:0,
-
+ active: 0,
+ searchText: "",
+
value1: 0,
page_num: 1,
page_size: 10,
@@ -27,33 +28,63 @@ Page({
NewOrderList: [], //新装工单
RepairOrderList: [],//维修工单
PartOrderList: [],//滤芯跟换工单
- UninstallOrderList:[],//拆卸工单
- RemoveList:[],//移机工单
+ UninstallOrderList: [],//拆卸工单
+ RemoveList: [],//移机工单
info_id: "",//师傅id
},
-
-
- changeActive(e){
+ back(){
+ wx.reLaunch({
+ url: '/packages/master/masterIndex/index',
+ })
+ },
+ search() {
let that = this
that.setData({
- active:e.currentTarget.dataset.item.value,
- page_num: 1,
NewOrderList: [],
RepairOrderList: [],
PartOrderList: [],
- UninstallOrderList:[],
+ UninstallOrderList: [],
+ RemoveList: [],
+ page_num: 1,
+ flag: false
})
-
if (that.data.active == 0) {
that.getNewOrderList()
} else if (that.data.active == 1) {
that.gerRepairOrderList()
- } else if(that.data.active == 2){
+ } else if (that.data.active == 3) {
that.getPartOrderList()
- }else if(that.data.active == 3){
+ } else if (that.data.active == 2) {
+ this.getUninstallOrder()
+ }
+ },
+ ipt1(e) {
+ let that = this
+ that.setData({
+ searchText: e.detail.value
+ })
+ },
+ changeActive(e) {
+ let that = this
+ that.setData({
+ active: e.currentTarget.dataset.item.value,
+ page_num: 1,
+ NewOrderList: [],
+ RepairOrderList: [],
+ PartOrderList: [],
+ UninstallOrderList: [],
+ })
+
+ if (that.data.active == 1) {
+ that.getNewOrderList()
+ } else if (that.data.active == 2) {
+ that.gerRepairOrderList()
+ } else if (that.data.active == 4) {
+ that.getPartOrderList()
+ } else if (that.data.active == 3) {
this.getUninstallOrder()
}
@@ -94,13 +125,39 @@ Page({
});
},
- onLoad() {
+ onLoad(options) {
+ let currentType = ''
+ if (options.type == 0) {
+ currentType = '新装工单'
+ wx.setNavigationBarTitle({
+ title: '新装工单',
+ })
+ } else if (options.type == 1) {
+ currentType = '维修工单'
+ wx.setNavigationBarTitle({
+ title: '维修工单',
+ })
+ } else if (options.type == 3) {
+ currentType = '拆除工单'
+ wx.setNavigationBarTitle({
+ title: '拆除工单',
+ })
+ } else if (options.type == 2) {
+ currentType = '滤芯更换工单'
+ wx.setNavigationBarTitle({
+ title: '滤芯更换工单',
+ })
+ }
// 移除原有的wx.setNavigationBarRightButton相关代码
let that = this
wx.showShareMenu({
withShareTicket: true,
menus: ['shareAppMessage', 'shareTimeline']
})
+ that.setData({
+ currentType,
+ active: options.type
+ })
},
onShow() {
let that = this
@@ -109,17 +166,17 @@ Page({
NewOrderList: [],
RepairOrderList: [],
PartOrderList: [],
- UninstallOrderList:[],
- page_num: 1
+ UninstallOrderList: [],
+ page_num: 1,
+ searchText: ""
})
that.getMasterInfo()
-
},
+
// 跳转到个人中心
navigateToProfile() {
- console.log(123);
wx.navigateTo({
url: '/packages/master/PersonCen/index'
});
@@ -130,13 +187,14 @@ Page({
let that = this
wx.showLoading({
title: '加载中...',
- mask:true
+ mask: true
})
util.postUrl(apiArr.getNewOrder, {
info_id: that.data.info_id,
search: that.data.searchCon,
page_num: that.data.page_num,
- page_size: that.data.page_size
+ page_size: that.data.page_size,
+ search: that.data.searchText,
}, res => {
wx.hideLoading()
if (res.msg == '操作成功') {
@@ -164,13 +222,14 @@ Page({
let that = this
wx.showLoading({
title: '加载中...',
- mask:true
+ mask: true
})
util.postUrl(apiArr.gerRepairOrder, {
info_id: that.data.info_id,
page_num: that.data.page_num,
- page_size: that.data.page_size
+ page_size: that.data.page_size,
+ search: that.data.searchText
}, res => {
wx.hideLoading()
if (res.msg == '操作成功') {
@@ -197,13 +256,14 @@ Page({
let that = this
wx.showLoading({
title: '加载中...',
- mask:true
+ mask: true
})
util.postUrl(apiArr.getPartOrder, {
info_id: that.data.info_id,
page_num: that.data.page_num,
- page_size: that.data.page_size
+ page_size: that.data.page_size,
+ search: that.data.searchText
}, res => {
wx.hideLoading()
if (res.msg == '操作成功') {
@@ -225,39 +285,40 @@ Page({
}
})
},
- //拆除工单
- getUninstallOrder() {
- let that = this
- wx.showLoading({
- title: '加载中...',
- mask:true
- })
- util.postUrl(apiArr.getUninstallOrder, {
- info_id: that.data.info_id,
- status: 0,
- page_num: that.data.page_num,
- page_size: that.data.page_size
- }, res => {
- wx.hideLoading()
- if (res.msg == '操作成功') {
- let flag = false
- if (res.rows && res.rows.length == that.data.page_size) {
- flag = true
+ //拆除工单
+ getUninstallOrder() {
+ let that = this
+ wx.showLoading({
+ title: '加载中...',
+ mask: true
+ })
+ util.postUrl(apiArr.getUninstallOrder, {
+ info_id: that.data.info_id,
+ status: 0,
+ page_num: that.data.page_num,
+ page_size: that.data.page_size,
+ search: that.data.searchText
+ }, res => {
+ wx.hideLoading()
+ if (res.msg == '操作成功') {
+ let flag = false
+ if (res.rows && res.rows.length == that.data.page_size) {
+ flag = true
+ } else {
+ flag = false
+ }
+ that.setData({
+ UninstallOrderList: that.data.UninstallOrderList.concat(res.rows || []),
+ page_num: that.data.page_num + 1,
+ flag
+ })
} else {
- flag = false
+ wx.showToast({
+ title: res.msg,
+ })
}
- that.setData({
- UninstallOrderList: that.data.UninstallOrderList.concat(res.rows || []),
- page_num: that.data.page_num + 1,
- flag
- })
- } else {
- wx.showToast({
- title: res.msg,
- })
- }
- })
-},
+ })
+ },
//师傅信息
getMasterInfo() {
@@ -274,33 +335,33 @@ Page({
},
searchIcon() {
-
+
let that = this
that.setData({
flag: false,
NewOrderList: [],
RepairOrderList: [],
PartOrderList: [],
- UninstallOrderList:[],
+ UninstallOrderList: [],
page_num: 1
})
if (that.data.active == 0) {
that.getNewOrderList()
} else if (that.data.active == 1) {
that.gerRepairOrderList()
- } else if(that.data.active == 2){
+ } else if (that.data.active == 2) {
that.getPartOrderList()
- }else if(that.data.active == 3){
+ } else if (that.data.active == 3) {
this.getUninstallOrder()
}
},
- onShareAppMessage(){
+ onShareAppMessage() {
return {
title: '人人爱净水', // 分享卡片标题(必填)
path: '/pages/water_filter/water_filter', // 用户点击后跳转的路径(可选,默认当前页)
imageUrl: 'https://wechat-img-file.oss-cn-beijing.aliyuncs.com/share.png' // 自定义图片(可选,比例建议 5:4)
- }
+ }
},
onShareTimeline() {
return {
@@ -310,4 +371,32 @@ Page({
}
},
+ onReachBottom() {
+ let that = this
+ if (that.data.flag) {
+ that.getMasterInfo()
+ }
+ },
+ onPullDownRefresh() {
+ let that = this
+ that.setData({
+ flag: false,
+ NewOrderList: [],
+ RepairOrderList: [],
+ PartOrderList: [],
+ UninstallOrderList: [],
+ page_num: 1,
+ searchText: ""
+ })
+ that.getMasterInfo()
+ wx.stopPullDownRefresh();
+ },
+
+ //新增维修工单
+ addWorkOrder(){
+ wx.navigateTo({
+ url: '/packages/master/addNewOrder/index',
+ })
+ },
+
});
\ No newline at end of file
diff --git a/packages/master/order/index.json b/packages/master/order/index.json
index d3aeddd..7f1bb58 100644
--- a/packages/master/order/index.json
+++ b/packages/master/order/index.json
@@ -2,5 +2,7 @@
"navigationStyle": "default",
"usingComponents": {
"Footer":"/component/masterFooter/index"
- }
+ },
+ "enablePullDownRefresh": true,
+ "navigationStyle": "custom"
}
\ No newline at end of file
diff --git a/packages/master/order/index.wxml b/packages/master/order/index.wxml
index d4c7d28..b648bb7 100644
--- a/packages/master/order/index.wxml
+++ b/packages/master/order/index.wxml
@@ -1,28 +1,66 @@
+
+
+
+
+
+
+
+ {{currentType}}
+
+
+
+
+
+
+
+
-
+
+
+ {{currentType}}
-
+
+
+
+
+
+
+
+
+
+
+
+
-
+
-
+
- 提交人:
+ 产品名称:
+ {{item.product_name}}
+
+
+ 设备编号:
+ {{item.device_code}}
+
+
+ 客户姓名:
{{item.customer_name}}
- 联系电话:
+ 客户手机:
{{item.customer_phone}}
@@ -31,7 +69,7 @@
- 预约地址:
+ 详细地址:
{{item.region}} {{item.address}}
@@ -41,37 +79,41 @@
- 订单状态:
+ 工单状态:
待分配
安装中
待激活
已安装
- 忽略
+ 已撤销
-
-
+
+
-
+
-
+
设备名称:
- {{item.parts_name}}
+ {{item.product_name}}
+
+
+ 设备编号:
+ {{item.device_code}}
- 提交人:
+ 客户姓名:
{{item.customer_name}}
- 联系电话:
+ 客户手机:
{{item.customer_phone}}
@@ -80,7 +122,7 @@
- 预约地址:
+ 详细地址:
{{item.region}}{{item.address}}
@@ -100,34 +142,34 @@
-
-
+
+
-
+
-
+
-
+ 设备编号:
+ {{item.device_code}}
+
- 提交人:
+ 客户姓名:
{{item.customer_name}}
- 联系电话:
+ 客户手机:
{{item.customer_phone}}
- 预约地址:
+ 详细地址:
{{item.region}} {{item.address}}
@@ -143,53 +185,57 @@
- 订单状态:
+ 工单状态:
待分配
待更换
已更换
- 已撤销
+ 已忽略
-
-
-
-
+
+
+
+
-
+
- 设备名称:
- {{item.device.product_name}}
+ 产品名称:
+ {{item.product_name}}
+
+
+ 设备编号:
+ {{item.device_code}}
- 指派人:
+ 师傅姓名:
{{item.repairman_name}}
- 指派人电话:
+ 师傅电话:
{{item.repairman_phone}}
- 提交人:
+ 客户姓名:
{{item.customer_name}}
- 联系电话:
+ 客户手机:
{{item.customer_phone}}
-
+
预约时间:
@@ -208,9 +254,12 @@
-
+
+
-
+
+
-
\ No newline at end of file
+
+
\ No newline at end of file
diff --git a/packages/master/order/index.wxss b/packages/master/order/index.wxss
index 97be1c5..c6dc109 100644
--- a/packages/master/order/index.wxss
+++ b/packages/master/order/index.wxss
@@ -1,6 +1,15 @@
.container {
padding: 20rpx;
}
+.nav-box{
+ padding-bottom: 10rpx;
+}
+.nav-bar-right{
+ opacity: 0;
+}
+page {
+ padding-bottom: 120rpx;
+}
.search-bar {
display: flex;
@@ -23,7 +32,7 @@
}
.order-list {
- height: calc(100vh - 160rpx);
+ /* height: calc(100vh - 160rpx); */
}
.order-item {
@@ -120,18 +129,12 @@
/* 新增固定定位样式 */
.fixed-top {
- position: fixed;
- top: 0;
- left: 0;
- right: 0;
- z-index: 999;
background: #fff;
}
/* 调整内容区域的上边距 */
.content {
- margin-top: 80rpx;
- /* 根据实际高度调整 */
+
}
.search_icon {
@@ -147,7 +150,6 @@
}
.navItem {
- flex: 1;
white-space: nowrap;
font-weight: 400;
font-size: 28rpx;
@@ -158,6 +160,7 @@
font-weight: bold;
position: relative;
font-size: 32rpx;
+ display: inline-block;
}
.active::after {
@@ -183,11 +186,12 @@
color: #fff;
flex: unset;
}
-.order-field2{
+
+.order-field2 {
justify-content: flex-end;
}
-.btn2{
+.btn2 {
width: 120rpx;
height: 50rpx;
display: flex;
@@ -198,7 +202,8 @@
color: #fff;
flex: unset;
}
-.btn3{
+
+.btn3 {
width: 120rpx;
height: 50rpx;
display: flex;
@@ -208,4 +213,81 @@
background-color: #2583ff;
color: #fff;
flex: unset;
-}
\ No newline at end of file
+}
+
+
+
+
+.upkeep_select {
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+ font-weight: 400;
+ font-size: 26rpx;
+ color: #222222;
+ background-color: #F9F9F9;
+ padding: 16rpx 20rpx;
+ margin-top: 20rpx;
+ padding-bottom: 40rpx;
+}
+
+.upkeep_select .ipt {
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+ background-color: #fff;
+ width: 710rpx;
+ height: 98rpx;
+ background: #FFFFFF;
+ border-radius: 100rpx 100rpx 100rpx 100rpx;
+ padding-left: 26rpx;
+ padding-right: 26rpx;
+}
+
+.ipt input{
+ flex: 1;
+ height: 100%;
+}
+.ipt image {
+ width: 42rpx;
+ height: 42rpx;
+}
+.searchBox{
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ padding-left: 40rpx;
+}
+
+
+
+.addBtn {
+ font-weight: 400;
+ font-size: 30rpx;
+ color: #FFFFFF;
+ width: 100rpx;
+ height: 100rpx;
+ background: #2583FF;
+ position: fixed;
+ right: 55rpx;
+ bottom: 200rpx;
+ border-radius: 50%;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+}
+
+.addBtn::after {
+ content: '';
+ background: rgba(77, 154, 255,.5);
+ filter: blur(10.899999618530273rpx);
+ width: 90rpx;
+ height: 90rpx;
+ position: absolute;
+ left: 50%;
+ top: 50%;
+ transform: translate(-50%,-50%);
+ border-radius: 50%;
+ overflow: hidden;
+ z-index: -1;
+}
diff --git a/packages/master/orderDesc/index.js b/packages/master/orderDesc/index.js
index c348bed..bf6b729 100644
--- a/packages/master/orderDesc/index.js
+++ b/packages/master/orderDesc/index.js
@@ -25,7 +25,9 @@ Page({
dis1: false,
dis2: false,
dis3: false,
- deviceInfo: {},
+ deviceInfo: {
+ device_code:""
+ },
deviceCode: "",
@@ -130,7 +132,7 @@ Page({
newOrderDesc: res,
imgList: newArr,
msg:res.install_desc,
- newOrderDateAppointment:res.remaining_days
+ newOrderDateAppointment:res.remaining_days?res.remaining_days:''
})
if (res.status == 5 ) {
@@ -207,7 +209,7 @@ Page({
})
}
- if (!that.data.deviceInfo.device_id) {
+ if (!that.data.deviceInfo.device_code) {
return wx.showToast({
title: '请扫码设备二维码',
icon: "none"
@@ -221,41 +223,59 @@ Page({
})
}
- wx.showModal({
- title: '提示',
- content: content,
- success: (res) => {
- if (res.confirm) {
- util.postUrl(apiArr.completeNewOrder, {
- install_id: Number(that.data.id),
- status: 3,
- install_desc: that.data.msg,
- install_imgs: that.data.imgList2.join(','),
- install_time: util.getCurrentTime(),
- device_id: that.data.deviceInfo.device_id,
- product_id: that.data.deviceInfo.product_id
- }, res => {
- if (res.msg == '操作成功') {
- // that.jihuoItem()
- wx.showToast({
- title: '创建成功!',
- icon: "none"
- })
- setTimeout(() => {
- wx.navigateBack({
- delta: 1
- })
- }, 1500)
- } else {
- wx.showToast({
- title: res.msg,
- icon: "none"
- })
- }
- })
- }
+ util.postUrl(apiArr.getDeviceByCode, {
+ device_code: that.data.deviceInfo.device_code,
+ install_id:that.data.id
+ }, res => {
+ console.log(res,'res');
+ if(res.msg == '设备与订单产品不匹配'){
+
+ return wx.showToast({
+ title: res.msg,
+ icon:"none"
+ })
}
- });
+ that.setData({
+ deviceInfo: res
+ })
+ wx.showModal({
+ title: '提示',
+ content: content,
+ success: (res) => {
+ if (res.confirm) {
+ util.postUrl(apiArr.completeNewOrder, {
+ install_id: Number(that.data.id),
+ status: 3,
+ install_desc: that.data.msg,
+ install_imgs: that.data.imgList2.join(','),
+ install_time: util.getCurrentTime(),
+ device_id: that.data.deviceInfo.device_id,
+ product_id: that.data.deviceInfo.product_id
+ }, res => {
+ if (res.msg == '操作成功') {
+ // that.jihuoItem()
+ wx.showToast({
+ title: '创建成功!',
+ icon: "none"
+ })
+ setTimeout(() => {
+ // wx.navigateBack({
+ // delta: 1
+ // })
+ that.getNewOrderDesc()
+ }, 1500)
+ } else {
+ wx.showToast({
+ title: res.msg,
+ icon: "none"
+ })
+ }
+ })
+ }
+ }
+ });
+ })
+
},
cancelNewOrder() {
let that = this
@@ -280,14 +300,14 @@ Page({
success: (res) => {
// 处理扫码结果
this.setData({
- deviceCode: res.result
+ deviceCode: res.result,
+ "deviceInfo.device_code":res.result
});
util.postUrl(apiArr.getDeviceByCode, {
device_code: res.result,
install_id:that.data.id
}, res => {
- console.log(res, '222');
that.setData({
deviceInfo: res
})
@@ -302,6 +322,24 @@ Page({
}
});
},
+ iptDeviceCode(e){
+ let that = this
+ console.log(e);
+ that.setData({
+ "deviceInfo.device_code":e.detail.value
+ })
+ },
+ iptSearch(){
+ let that = this
+ util.postUrl(apiArr.getDeviceByCode, {
+ device_code: that.data.deviceInfo.device_code,
+ install_id:that.data.id
+ }, res => {
+ that.setData({
+ deviceInfo: res
+ })
+ })
+ },
// 新装///////////////////////////////
// 维修 ///////////////////////////////
@@ -362,6 +400,7 @@ Page({
})
if (res.msg == '操作成功') {
setTimeout(() => {
+
wx.navigateBack({
delta: 1
})
@@ -398,6 +437,7 @@ Page({
})
},
+
completePartOrder(e) {
let status = Number(e.currentTarget.dataset.type)
let that = this
@@ -423,9 +463,19 @@ Page({
})
if (res.msg == '操作成功') {
setTimeout(() => {
- wx.navigateBack({
- delta: 1
- })
+ // wx.navigateBack({
+ // delta: 1
+ // })
+ // device_id
+ if(status == 3){
+ wx.navigateTo({
+ url: '/packages/master/deviceInfo/index?id=' + that.data.partOrderDesc.device_id,
+ })
+ }else{
+ wx.navigateTo({
+ url: '/packages/master/order/index?type=2',
+ })
+ }
}, 1500);
}
})
@@ -559,9 +609,16 @@ Page({
icon: "none"
})
setTimeout(() => {
- wx.navigateBack({
- delta: 1
+ // wx.navigateBack({
+ // delta: 1
+ // })
+ that.setData({
+ uninstallMsg:"",
+ imgList2:[],
+ imgList:[],
+ uninstall_time:"",
})
+ that.getUninstallDesc()
}, 1500)
} else {
wx.showToast({
@@ -638,10 +695,10 @@ Page({
that.getNewOrderDesc()
} else if (options.type == 1) {
that.getRepairOrderDesc()
- } else if (options.type == 2) {
- that.getPartOrderDesc()
} else if (options.type == 3) {
that.getUninstallDesc()
+ } else if (options.type == 2) {
+ that.getPartOrderDesc()
}
wx.showShareMenu({
diff --git a/packages/master/orderDesc/index.wxml b/packages/master/orderDesc/index.wxml
index f2f3eed..5a41cd4 100644
--- a/packages/master/orderDesc/index.wxml
+++ b/packages/master/orderDesc/index.wxml
@@ -3,10 +3,30 @@
- 工单信息
+
+ 工单信息
+
+ 待分配
+ 安装中
+ 待激活
+ 已安装
+ 忽略
+
+
+
+
- 产品名称:
- {{newOrderDesc.product_name || '暂无数据'}}
+ 订单编号:
+ {{newOrderDesc.install_no || '暂无数据'}}
+
+
+ 设备编号:
+
+
+
+
+
+ {{newOrderDesc.device_code || '暂无数据'}}
@@ -26,22 +46,14 @@
客户地址:
- {{newOrderDesc.address || '暂无数据'}}
+ {{newOrderDesc.region + newOrderDesc.address || '暂无数据'}}
-
-
-
- 订单状态:
- 待分配
- 安装中
- 待激活
- 已安装
- 忽略
+ 创建时间:
+ {{newOrderDesc.create_time || '暂无数据'}}
+
+
产品图片:
@@ -49,40 +61,13 @@
-
-
-
-
-
- 安装说明
- 说明:
-
-
-
-
-
- 安装时间:
-
-
-
-
- 设备编码:{{newOrderDesc.device_code}}
-
- 去扫码
-
-
-
- {{deviceInfo.device_code}}
- 重新扫码
-
-
-
-
- 剩余天数:
-
+ 产品名称:
+ {{newOrderDesc.product_name || '暂无数据'}}
+
+
安装图片
@@ -90,7 +75,7 @@
- ×
+ ×
@@ -99,18 +84,73 @@
+
+
+
+ 安装说明
+
+ 说明:
+
+
+
+
+
+ 安装时间:
+
+
+
+
+
+
+ 剩余天数:
+
+
+
+
- 工单信息
+
+ 工单信息
+
+ 待指派
+ 待维修
+ 维修完成
+ 已取消
+
+
+
+
+ 订单编号:
+ {{repairOrderDesc.repair_no || '暂无数据'}}
+
+
+
产品名称:
{{repairOrderDesc.product_name || '暂无数据'}}
+
+ 设备编号:
+ {{repairOrderDesc.device_code || '暂无数据'}}
+
+
约定时间:
{{repairOrderDesc.appointment_time || '暂无数据'}}
@@ -128,7 +168,7 @@
客户地址:
- {{repairOrderDesc.address || '暂无数据'}}
+ {{repairOrderDesc.region + repairOrderDesc.address || '暂无数据'}}
@@ -136,13 +176,7 @@
{{repairOrderDesc.fault_desc || '暂无数据'}}
-
- 订单状态:
- 待指派
- 待维修
- 维修完成
- 已取消
-
+
工单来源:
@@ -151,6 +185,11 @@
后台
+
+ 创建时间:
+ {{repairOrderDesc.create_time || '暂无数据'}}
+
+
故障图片:
@@ -192,13 +231,33 @@
- 工单信息
+
+ 工单信息
+
+ 待分配
+ 待更换
+ 已更换
+ 已撤销
+
+
+
+
+
+ 订单编号:
+ {{partOrderDesc.replace_no || '暂无数据'}}
+
+
+
配件名称:
{{item.parts_name}}
-
+
+
+
+ 设备编号:
+ {{partOrderDesc.device_code || '暂无数据'}}
@@ -213,12 +272,22 @@
客户电话:
- {{partOrderDesc.customer_phone || '暂无数据'}}
+ {{partOrderDesc.replace_man_name || '暂无数据'}}
+
+
+
+ 师傅姓名:
+ {{partOrderDesc.replace_man_phone || '暂无数据'}}
+
+
+
+ 师傅电话:
+ {{partOrderDesc.customer_phone }}
客户地址:
- {{partOrderDesc.region}} {{partOrderDesc.address}}
+ {{partOrderDesc.region + partOrderDesc.address || '暂无数据'}}
@@ -239,12 +308,11 @@
{{partOrderDesc.threshold_volume}}升
+
+
- 订单状态:
- 待分配
- 待更换
- 已更换
- 已撤销
+ 创建时间:
+ {{partOrderDesc.create_time || '暂无数据'}}
@@ -268,38 +336,68 @@
+
+
+ 更换耗材
+
+
+ 耗材名称:
+ {{item.parts_name || '暂无数据'}}
+ 剩余天数:{{item.available_days}}
+ 剩余流量:{{item.available_volume}}
+
+
+
+
- 工单信息
+
+ 工单信息
+
+
+
+
+ 待拆机
+ 待操作
+
+
+
- 设备名称:
+ 订单编号:
+ {{uninstallDesc.uninstall_no || '暂无数据'}}
+
+
+
+
+ 产品名称:
{{uninstallDesc.device.product_name || '暂无数据'}}
-
- 指派人:
- {{uninstallDesc.repairman_name || '暂无数据'}}
+ 设备编号:
+ {{uninstallDesc.device_code || '暂无数据'}}
-
- 联系电话:
- {{uninstallDesc.repairman_phone || '暂无数据'}}
-
+
+
- 提交人:
+ 客户姓名:
{{uninstallDesc.customer_name}}
- 联系电话:
+ 客户手机:
{{uninstallDesc.customer_phone}}
+
+ 详细地址:
+ {{uninstallDesc.region + uninstallDesc.address || '暂无数据'}}
+
预约时间:
@@ -307,10 +405,21 @@
- 订单状态:
- 待拆机
- 待操作
+ 师傅姓名:
+ {{uninstallDesc.master.name || '暂无数据'}}
+
+
+ 师傅手机:
+ {{uninstallDesc.master.phone || '暂无数据'}}
+
+
+
+ 创建时间:
+ {{uninstallDesc.create_time || '暂无数据'}}
+
+
+
安装说明
@@ -330,25 +439,10 @@
-
-
拆除说明
-
- 说明:
-
-
-
-
-
- 拆除时间:
-
-
-
-
-
拆除图片
-
+
@@ -361,23 +455,34 @@
+
+ 说明:
+
+
+
+
+ 拆除时间:
+
+
+
+
-
+
-
+
-
+
diff --git a/packages/master/orderDesc/index.wxss b/packages/master/orderDesc/index.wxss
index 5f349da..6dacc6d 100644
--- a/packages/master/orderDesc/index.wxss
+++ b/packages/master/orderDesc/index.wxss
@@ -15,6 +15,14 @@
font-weight: bold;
margin-bottom: 20rpx;
}
+.section-title2{
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+}
+.section-title2_status{
+ font-size: 26rpx !important;
+}
.info-item {
display: flex;
@@ -33,11 +41,16 @@
flex: 1;
overflow: hidden;
white-space: wrap;
+ text-align: right;
+ overflow-x: auto;
}
.product-image {
margin: 32rpx 0;
text-align: center;
+ width: 300rpx;
+ height: 300rpx;
+ box-shadow: 0 4rpx 16rpx rgba(0, 0, 0, 0.1);
}
.product-image image {
@@ -67,7 +80,7 @@
}
.cancel-btn {
- background: #999;
+ background: #F56C6C;
}
@@ -131,13 +144,24 @@
align-items: flex-start;
}
+
+.item4{
+}
+
+
.value2 {
display: flex;
- justify-content: center;
+ justify-content: flex-end;
+ align-items: flex-end;
+}
+.value2 image{
+ width: 50rpx;
+ height: 50rpx;
+ margin-left: 10rpx;
}
.btn {
- width: 240rpx;
+ width: 200rpx;
height: 60rpx;
line-height: 60rpx;
background: #2583FF;
diff --git a/packages/partner/pages/OrderMsg/OrderMsg.js b/packages/partner/pages/OrderMsg/OrderMsg.js
new file mode 100644
index 0000000..cd2a881
--- /dev/null
+++ b/packages/partner/pages/OrderMsg/OrderMsg.js
@@ -0,0 +1,303 @@
+const app = getApp({ allowDefault: true })
+let util = require('../../../../utils/util')
+let apiArr = require('../../../../api/partner')
+
+Page({
+ data: {
+ newOrderTotal: 200,
+ s: app.system.statusBarHeight, // 状态栏高度
+ n: (app.menu.top - app.system.statusBarHeight) * 2 + app.menu.height, // 导航栏高度
+ t: app.menu.top, // 胶囊局顶部距离
+ h: app.menu.height, // 胶囊高度
+
+ option1: [
+ { text: '新装工单', value: 0 },
+ { text: '维修工单', value: 1 },
+ { text: '拆机工单', value: 3 },
+ { text: '移机工单', value: 4 },
+ { text: '滤芯更换工单', value: 2 },
+ ],
+ active:0,
+
+ value1: 0,
+ page_num: 1,
+ page_size: 10,
+ flag: false,
+ searchCon: "",
+ NewOrderList: [], //新装工单
+ RepairOrderList: [],//维修工单
+ PartOrderList: [],//滤芯跟换工单
+ UninstallOrderList:[],//拆卸工单
+ RemoveList:[],//移机工单
+ },
+
+
+ changeActive(e){
+ let that = this
+ that.setData({
+ active:e.currentTarget.dataset.item.value,
+ page_num: 1,
+ NewOrderList: [],
+ RepairOrderList: [],
+ PartOrderList: [],
+ UninstallOrderList:[],
+ })
+
+ if (that.data.active == 0) {
+ that.getNewOrderList()
+ } else if (that.data.active == 1) {
+ that.gerRepairOrderList()
+ } else if(that.data.active == 2){
+ that.getPartOrderList()
+ }else if(that.data.active == 3){
+ this.getUninstallOrder()
+ }
+
+ },
+
+ // 查看工单详情
+ viewOrderDetail(e) {
+ let that = this
+ const id = e.currentTarget.dataset.id;
+ wx.navigateTo({
+ url: `/packages/partner/pages/OrderMsgInfo/OrderMsgInfo?id=${id}&type=${that.data.active}`
+ });
+ },
+
+ // 完成订单
+ completeOrder(e) {
+ const orderId = e.currentTarget.dataset.id;
+ wx.showModal({
+ title: '提示',
+ content: '确认完成该订单吗?',
+ success: (res) => {
+ if (res.confirm) {
+ this.removeOrder(orderId);
+ }
+ }
+ });
+ },
+
+ // 移除已完成的订单
+ removeOrder(orderId) {
+ const newOrderList = this.data.orderList.filter(item => item.id !== orderId);
+ this.setData({
+ orderList: newOrderList
+ });
+ wx.showToast({
+ title: '订单已完成',
+ icon: 'success'
+ });
+ },
+
+ onLoad() {
+ // 移除原有的wx.setNavigationBarRightButton相关代码
+ let that = this
+ wx.showShareMenu({
+ withShareTicket: true,
+ menus: ['shareAppMessage', 'shareTimeline']
+ })
+ },
+ onShow() {
+ let that = this
+ that.setData({
+ flag: false,
+ NewOrderList: [],
+ RepairOrderList: [],
+ PartOrderList: [],
+ UninstallOrderList:[],
+ page_num: 1
+ })
+ that.searchIcon()
+ },
+
+ // 跳转到个人中心
+ navigateToProfile() {
+ console.log(123);
+ wx.navigateTo({
+ url: '/packages/master/PersonCen/index'
+ });
+ },
+
+ //新装工单
+ getNewOrderList() {
+ let that = this
+ wx.showLoading({
+ title: '加载中...',
+ mask:true
+ })
+ util.postUrl4(apiArr.getNewOrder, {
+ info_id: that.data.info_id,
+ search: that.data.searchCon,
+ page_num: that.data.page_num,
+ page_size: that.data.page_size
+ }, res => {
+ console.log(res);
+ wx.hideLoading()
+ if (res.msg == '操作成功') {
+ let flag = false
+ if (res.rows && res.rows.length == that.data.page_size) {
+ flag = true
+ } else {
+ flag = false
+ }
+ that.setData({
+ NewOrderList: that.data.NewOrderList.concat(res.row || []),
+ page_num: that.data.page_num + 1,
+ newOrderTotal: res.total,
+ flag
+ })
+ } else {
+ wx.showToast({
+ title: res.msg,
+ })
+ }
+ })
+ },
+ //维修工单
+ gerRepairOrderList() {
+ let that = this
+ wx.showLoading({
+ title: '加载中...',
+ mask:true
+
+ })
+ util.postUrl4(apiArr.gerRepairOrder, {
+ info_id: that.data.info_id,
+ page_num: that.data.page_num,
+ page_size: that.data.page_size
+ }, res => {
+ wx.hideLoading()
+ if (res.msg == '操作成功') {
+ let flag = false
+ if (res.rows && res.rows.length == that.data.page_size) {
+ flag = true
+ } else {
+ flag = false
+ }
+ that.setData({
+ RepairOrderList: that.data.RepairOrderList.concat(res.rows || []),
+ page_num: that.data.page_num + 1,
+ flag
+ })
+ } else {
+ wx.showToast({
+ title: res.msg,
+ })
+ }
+ })
+ },
+ //滤材更换工单
+ getPartOrderList() {
+ let that = this
+ wx.showLoading({
+ title: '加载中...',
+ mask:true
+
+ })
+ util.postUrl4(apiArr.getPartOrder, {
+ info_id: that.data.info_id,
+ page_num: that.data.page_num,
+ page_size: that.data.page_size
+ }, res => {
+ wx.hideLoading()
+ if (res.msg == '操作成功') {
+ let flag = false
+ if (res.rows && res.rows.length == that.data.page_size) {
+ flag = true
+ } else {
+ flag = false
+ }
+ that.setData({
+ PartOrderList: that.data.PartOrderList.concat(res.rows || []),
+ page_num: that.data.page_num + 1,
+ flag
+ })
+ } else {
+ wx.showToast({
+ title: res.msg,
+ })
+ }
+ })
+ },
+ //拆除工单
+ getUninstallOrder() {
+ let that = this
+ wx.showLoading({
+ title: '加载中...',
+ mask:true
+ })
+ util.postUrl4(apiArr.getUninstallOrder, {
+ info_id: that.data.info_id,
+ status: 0,
+ page_num: that.data.page_num,
+ page_size: that.data.page_size
+ }, res => {
+ wx.hideLoading()
+ if (res.msg == '操作成功') {
+ let flag = false
+ if (res.rows && res.rows.length == that.data.page_size) {
+ flag = true
+ } else {
+ flag = false
+ }
+ that.setData({
+ UninstallOrderList: that.data.UninstallOrderList.concat(res.row || []),
+ page_num: that.data.page_num + 1,
+ flag
+ })
+ } else {
+ wx.showToast({
+ title: res.msg,
+ })
+ }
+ })
+},
+
+
+
+ searchIcon() {
+
+ let that = this
+ that.setData({
+ flag: false,
+ NewOrderList: [],
+ RepairOrderList: [],
+ PartOrderList: [],
+ UninstallOrderList:[],
+ page_num: 1
+ })
+ if (that.data.active == 0) {
+ that.getNewOrderList()
+ } else if (that.data.active == 1) {
+ that.gerRepairOrderList()
+ } else if(that.data.active == 2){
+ that.getPartOrderList()
+ }else if(that.data.active == 3){
+ this.getUninstallOrder()
+ }
+ },
+
+ onShareAppMessage(){
+ return {
+ title: '人人爱净水', // 分享卡片标题(必填)
+ path: '/pages/water_filter/water_filter', // 用户点击后跳转的路径(可选,默认当前页)
+ imageUrl: 'https://wechat-img-file.oss-cn-beijing.aliyuncs.com/share.png' // 自定义图片(可选,比例建议 5:4)
+ }
+ },
+ onShareTimeline() {
+ return {
+ title: '人人爱净水', // 自定义标题
+ query: '', // 自定义页面路径中的参数
+ imageUrl: 'https://wechat-img-file.oss-cn-beijing.aliyuncs.com/share.png' // 自定义分享图片路径
+ }
+ },
+
+ onReachBottom() {
+ let that = this
+ if (that.data.flag) {
+ that.searchIcon()
+ }
+ },
+
+});
\ No newline at end of file
diff --git a/packages/partner/pages/OrderMsg/OrderMsg.json b/packages/partner/pages/OrderMsg/OrderMsg.json
new file mode 100644
index 0000000..e8585e1
--- /dev/null
+++ b/packages/partner/pages/OrderMsg/OrderMsg.json
@@ -0,0 +1,4 @@
+{
+ "navigationStyle": "default",
+ "usingComponents": {}
+ }
\ No newline at end of file
diff --git a/packages/partner/pages/OrderMsg/OrderMsg.wxml b/packages/partner/pages/OrderMsg/OrderMsg.wxml
new file mode 100644
index 0000000..51f9d52
--- /dev/null
+++ b/packages/partner/pages/OrderMsg/OrderMsg.wxml
@@ -0,0 +1,232 @@
+
+
+
+
+ {{item.text}}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 设备名称:
+ {{item.product_name}}
+
+
+ 设备编号:
+ {{item.device_code}}
+
+
+ 客户姓名:
+ {{item.customer_name}}
+
+
+ 客户手机:
+ {{item.customer_phone}}
+
+
+ 预约时间:
+ {{item.appointment_time}}
+
+
+
+ 预约地址:
+ {{item.region}} {{item.address}}
+
+
+
+ 客户备注:
+ {{item.remark}}
+
+
+
+ 工单状态:
+ 待分配
+ 安装中
+ 待激活
+ 已安装
+ 忽略
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 设备名称:
+ {{item.product_name}}
+
+
+ 设备编号:
+ {{item.device_code}}
+
+
+
+
+ 客户姓名:
+ {{item.customer_name}}
+
+
+ 客户手机:
+ {{item.customer_phone}}
+
+
+ 预约时间:
+ {{item.appointment_time}}
+
+
+
+ 预约地址:
+ {{item.region}}{{item.address}}
+
+
+
+ 故障说明:
+ {{item.fault_desc}}
+
+
+
+ 工单状态:
+ 待指派
+ 待维修
+ 维修完成
+ 已取消
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 设备名称:
+ {{item.device.product_name}}
+
+
+ 设备编号:
+ {{item.device_code}}
+
+
+
+ 客户姓名:
+ {{item.customer_name}}
+
+
+ 客户手机:
+ {{item.customer_phone}}
+
+
+
+ 预约地址:
+ {{item.region}} {{item.address}}
+
+
+
+ 预约时间:
+ {{item.appointment_time}}
+
+
+
+ 安装说明:
+ {{item.install_desc}}
+
+
+
+
+ 工单状态:
+ 待分配
+ 待更换
+ 已更换
+ 已撤销
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 设备名称:
+ {{item.product_name}}
+
+
+ 设备编号:
+ {{item.device_code}}
+
+
+
+ 师傅姓名:
+ {{item.repairman_name}}
+
+
+
+ 指派人电话:
+ {{item.repairman_phone}}
+
+
+
+ 客户姓名:
+ {{item.customer_name}}
+
+
+ 客户手机:
+ {{item.customer_phone}}
+
+
+
+
+
+ 预约时间:
+ {{item.appointment_time}}
+
+
+
+ 状态:
+ 待指派
+ 待拆机
+ 待操作
+ 巳完成
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/packages/partner/pages/OrderMsg/OrderMsg.wxss b/packages/partner/pages/OrderMsg/OrderMsg.wxss
new file mode 100644
index 0000000..97be1c5
--- /dev/null
+++ b/packages/partner/pages/OrderMsg/OrderMsg.wxss
@@ -0,0 +1,211 @@
+.container {
+ padding: 20rpx;
+}
+
+.search-bar {
+ display: flex;
+ align-items: center;
+ background: #f5f5f5;
+ border-radius: 8rpx;
+ padding: 20rpx;
+ margin-bottom: 20rpx;
+}
+
+.search-input {
+ flex: 1;
+ font-size: 28rpx;
+}
+
+.search-icon {
+ width: 40rpx;
+ height: 40rpx;
+ margin-left: 20rpx;
+}
+
+.order-list {
+ height: calc(100vh - 160rpx);
+}
+
+.order-item {
+ background: #fff;
+ border-radius: 8rpx;
+ padding: 20rpx;
+ margin-bottom: 20rpx;
+ box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.1);
+}
+
+.order-field {
+ display: flex;
+ margin-bottom: 16rpx;
+}
+
+.label {
+ color: #666;
+ font-size: 28rpx;
+ width: 180rpx;
+ white-space: nowrap;
+}
+
+.value {
+ color: #333;
+ font-size: 28rpx;
+ flex: 1;
+}
+
+.order-actions {
+ display: flex;
+ justify-content: flex-end;
+ margin-top: 20rpx;
+}
+
+.action-btn {
+ margin: 0;
+ padding: 0 40rpx;
+ height: 60rpx;
+ line-height: 60rpx;
+ font-size: 28rpx;
+ border-radius: 30rpx;
+}
+
+.complete-btn {
+ background: #2583FF;
+ color: #fff;
+}
+
+.custom-navbar {
+ position: fixed;
+ top: 0;
+ left: 0;
+ right: 0;
+ height: 88rpx;
+ background: #fff;
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+ padding: 0 32rpx;
+ box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.1);
+ z-index: 999;
+}
+
+.navbar-title {
+ font-size: 32rpx;
+ font-weight: bold;
+}
+
+.navbar-right {
+ font-size: 28rpx;
+ color: #007aff;
+}
+
+
+/* 新增右下角按钮样式 */
+.fixed-bottom-right {
+ position: fixed;
+ right: 32rpx;
+ bottom: 32rpx;
+ z-index: 999;
+}
+
+.profile-btn {
+ width: 160rpx;
+ height: 80rpx;
+ line-height: 80rpx;
+ text-align: center;
+ background: #2583FF;
+ color: #fff;
+ border-radius: 40rpx;
+ box-shadow: 0 4rpx 16rpx rgba(255, 81, 42, 0.3);
+}
+
+
+/* 新增固定定位样式 */
+.fixed-top {
+ position: fixed;
+ top: 0;
+ left: 0;
+ right: 0;
+ z-index: 999;
+ background: #fff;
+}
+
+/* 调整内容区域的上边距 */
+.content {
+ margin-top: 80rpx;
+ /* 根据实际高度调整 */
+}
+
+.search_icon {
+ width: 30rpx;
+ height: 30rpx;
+}
+
+.navBox {
+ display: flex;
+ align-items: center;
+ padding: 0 20rpx;
+ box-sizing: border-box;
+}
+
+.navItem {
+ flex: 1;
+ white-space: nowrap;
+ font-weight: 400;
+ font-size: 28rpx;
+ color: #555555;
+}
+
+.active {
+ font-weight: bold;
+ position: relative;
+ font-size: 32rpx;
+}
+
+.active::after {
+ content: '';
+ width: 90%;
+ height: 10rpx;
+ background: #2583FF;
+ border-radius: 0rpx 0rpx 0rpx 0rpx;
+ position: absolute;
+ left: 50%;
+ bottom: -8rpx;
+ transform: translateX(-50%);
+}
+
+.btn1 {
+ width: 120rpx;
+ height: 50rpx;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ border-radius: 30rpx;
+ background-color: #2583ff;
+ color: #fff;
+ flex: unset;
+}
+.order-field2{
+ justify-content: flex-end;
+}
+
+.btn2{
+ width: 120rpx;
+ height: 50rpx;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ border-radius: 30rpx;
+ background-color: #2583ff;
+ color: #fff;
+ flex: unset;
+}
+.btn3{
+ width: 120rpx;
+ height: 50rpx;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ border-radius: 30rpx;
+ background-color: #2583ff;
+ color: #fff;
+ flex: unset;
+}
\ No newline at end of file
diff --git a/packages/partner/pages/OrderMsgInfo/OrderMsgInfo.js b/packages/partner/pages/OrderMsgInfo/OrderMsgInfo.js
new file mode 100644
index 0000000..d9bbc57
--- /dev/null
+++ b/packages/partner/pages/OrderMsgInfo/OrderMsgInfo.js
@@ -0,0 +1,736 @@
+let util = require('../../../../utils/util')
+let apiArr = require('../../../../api/partner')
+const app = getApp({ allowDefault: true })
+
+Page({
+ data: {
+ s: app.system.statusBarHeight, // 状态栏高度
+ n: (app.menu.top - app.system.statusBarHeight) * 2 + app.menu.height, // 导航栏高度
+ t: app.menu.top, // 胶囊局顶部距离
+ h: app.menu.height, // 胶囊高度
+
+ type: "",
+ id: "",
+ newOrderDesc: {},
+ newOrderDateShow: false,
+ newOrderDateAppointment: "",
+ msg: "", //安装说明
+ msg2: "", //更换说明
+ imgList: [],
+ imgList2: [],
+ repairOrderDesc: {},
+ partOrderDesc: {},
+
+ uninstallDesc: {},
+ uninstalldis: false,
+ uninstallMsg: "",
+ UninstallDate: false,
+ uninstall_time: "",
+
+
+ dis1: false,
+ dis2: false,
+ dis3: false,
+ deviceInfo: {
+ device_code: ""
+ },
+ deviceCode: "",
+
+
+ minDate: new Date().getTime(),
+ formatter(type, value) {
+ if (type === 'year') {
+ return `${value}年`;
+ }
+ if (type === 'month') {
+ return `${value}月`;
+ }
+ if (type === 'day') {
+ return `${value}日`;
+ }
+ return value;
+ },
+ },
+
+ back() {
+ let that = this
+ let pages = getCurrentPages() // 获取页面栈
+ let prevPage = pages[pages.length - 2] // 上一页的实例
+ if(prevPage.route == 'packages/partner/pages/newWorkOrder/newWorkOrder'){
+ wx.navigateTo({
+ url: '/packages/partner/pages/device/device',
+ })
+ }else{
+ if (that.data.type == 0) {
+ wx.reLaunch({
+ url: '/packages/partner/pages/WorkOrder/WorkOrder',
+ })
+ } else if (that.data.type == 1) {
+ wx.reLaunch({
+ url: '/packages/WaterPurifier/pages/upKeep/upKeep',
+ })
+ } else if (that.data.type == 2) {
+ wx.reLaunch({
+ url: '/packages/partner/pages/partsOrder/partsOrder',
+ })
+ } else if (that.data.type == 3) {
+ wx.reLaunch({
+ url: '/packages/partner/pages/removeOrder/removeOrder',
+ })
+ }
+ }
+ },
+
+
+ // 新装///////////////////////////////
+ //输入框
+ updateInstructions(e) {
+ let that = this
+ that.setData({
+ msg: e.detail.value
+ })
+ },
+ // 上传图片
+ uploadImage() {
+ let that = this
+ wx.showLoading({
+ title: '上传中...',
+ })
+ wx.chooseMedia({
+ count: 9,
+ mediaType: ['image'],
+ success: (res) => {
+ let tempFiles = res.tempFiles.map(file => file.tempFilePath);
+ let imgList = []
+ let imgList2 = []
+ let uploadCount = 0;
+
+ tempFiles.forEach((item, index) => {
+ util.uploadFileUrl(item, res => {
+ res = JSON.parse(res)
+ imgList[index] = util.img_url + res.data.path;
+ imgList2[index] = res.data.path
+ uploadCount++;
+
+ // 所有文件上传完成后更新数据
+ if (uploadCount === tempFiles.length) {
+ that.setData({
+ imgList: imgList,
+ imgList2
+ }, () => {
+ wx.hideLoading();
+ });
+ }
+ });
+ });
+ },
+ fail: err => {
+ wx.hideLoading()
+ console.log(err, 999);
+ }
+ });
+ },
+ // 删除图片
+ deleteImage(e) {
+ let that = this
+ const index = e.currentTarget.dataset.index;
+ let imgList = that.data.imgList
+ let imgList2 = that.data.imgList2
+ imgList.splice(index, 1)
+ imgList2.splice(index, 1)
+ this.setData({
+ imgList,
+ imgList2
+ });
+ },
+ getNewOrderDesc() {
+ let that = this
+ wx.showLoading({
+ title: '加载中...',
+ mask: true
+ })
+ util.postUrl4(apiArr.newOrderDesc, { install_id: Number(that.data.id) }, res => {
+ wx.hideLoading()
+ console.log(res);
+ res.product_icon2 = util.img_url + res.product_icon
+ let imgList = ''
+ let newArr = []
+ if (res.install_imgs) {
+ imgList = res.install_imgs.split(",")
+ newArr = []
+ imgList.forEach(item => {
+ newArr.push(util.img_url + item)
+ })
+ } else {
+ imgList = ''
+ newArr = []
+ }
+ that.setData({
+ newOrderDesc: res,
+ imgList: newArr,
+ msg: res.install_desc,
+ newOrderDateAppointment: res.remaining_days ? res.remaining_days : ''
+ })
+
+ if (res.status == 5) {
+ // that.getDeriveInfo()
+ let imgList2 = ''
+ let imgList = []
+
+ if (res.install_imgs) {
+ console.log(123);
+ imgList2 = res.install_imgs.split(',')
+ imgList = []
+ imgList2.forEach((item, index) => {
+ imgList.push(util.img_url + item)
+ })
+ } else {
+ console.log(456);
+ imgList2 = []
+ imgList = []
+ }
+ that.setData({
+ msg: res.install_desc,
+ imgList2,
+ imgList,
+ dis1: true
+ })
+ }
+
+
+
+ })
+ },
+ closeNewOrder() {
+ let that = this
+ that.setData({
+ newOrderDateShow: !that.data.newOrderDateShow
+ })
+ },
+ changeNewAppointment(e) {
+ let that = this
+ that.setData({
+ newOrderDateAppointment: e.detail.value
+ })
+ },
+ jihuoItem() {
+ let that = this
+
+ util.postUrl4(apiArr.BeActive, {
+ install_id: that.data.newOrderDesc.install_id,
+ remaining_days: Number(that.data.newOrderDateAppointment)
+ }, res => {
+ console.log(res);
+ if (res.msg == '操作成功') {
+ wx.showToast({
+ title: '激活成功!',
+ icon: "none"
+ })
+ setTimeout(() => {
+ that.back()
+ }, 1500)
+ }
+ })
+ },
+ completeNewOrder() {
+ let that = this
+ let content = '确认完成该工单吗?'
+
+ if (!that.data.msg) {
+ return wx.showToast({
+ title: '请填写安装说明',
+ icon: "none"
+ })
+ }
+
+ if (!that.data.deviceInfo.device_code) {
+ return wx.showToast({
+ title: '请扫设备二维码或填写设备编码',
+ icon: "none"
+ })
+ }
+
+ if (!that.data.imgList.length) {
+ return wx.showToast({
+ title: '请上传安装图片',
+ icon: "none"
+ })
+ }
+
+ wx.showModal({
+ title: '提示',
+ content: content,
+ success: (res) => {
+ if (res.confirm) {
+ util.postUrl4(apiArr.completeNewOrder, {
+ install_id: Number(that.data.id),
+ status: 3,
+ install_desc: that.data.msg,
+ install_imgs: that.data.imgList2.join(','),
+ install_time: util.getCurrentTime(),
+ device_id: that.data.deviceInfo.device_id,
+ product_id: that.data.deviceInfo.product_id
+ }, res => {
+ if (res.msg == '操作成功') {
+ // that.jihuoItem()
+ wx.showToast({
+ title: '创建成功!',
+ icon: "none"
+ })
+ setTimeout(() => {
+ // wx.navigateBack({
+ // delta: 1
+ // })
+ that.getNewOrderDesc()
+ }, 1500)
+ } else {
+ wx.showToast({
+ title: res.msg,
+ icon: "none"
+ })
+ }
+ })
+ }
+ }
+ });
+ },
+ cancelNewOrder() {
+ let that = this
+ util.postUrl4(apiArr.cancelNewOrder, {
+ install_id: Number(that.data.id),
+ }, res => {
+ wx.showToast({
+ title: res.msg,
+ })
+ if (res.msg == '操作成功') {
+ setTimeout(() => {
+ // wx.navigateBack({
+ // delta: 1
+ // })
+ that.back()
+ }, 1500);
+ }
+ })
+ },
+ scanQrcode() {
+ let that = this
+ wx.scanCode({
+ success: (res) => {
+ // 处理扫码结果
+ this.setData({
+ deviceCode: res.result
+ });
+ util.postUrl4(apiArr.getDeviceByCode, {
+ device_code: res.result,
+ install_id: that.data.id
+ }, res => {
+ that.setData({
+ deviceInfo: res
+ })
+ })
+
+ },
+ fail: (err) => {
+ wx.showToast({
+ title: '扫码失败',
+ icon: 'none'
+ });
+ }
+ });
+ },
+ iptDeviceCode(e) {
+ let that = this
+ that.setData({
+ "deviceInfo.device_code": e.detail.value
+ })
+ },
+ chooseDevice() {
+ let that = this
+ wx.navigateTo({
+ url: `/packages/partner/pages/chooseDevice/chooseDevice?id=${that.data.id}&product_id=${that.data.newOrderDesc.product_id}`,
+ })
+ },
+ // 新装///////////////////////////////
+
+ // 维修 ///////////////////////////////
+ getRepairOrderDesc() {
+ let that = this
+ wx.showLoading({
+ title: '加载中...',
+ mask: true
+ })
+ util.postUrl4(apiArr.RepairOrderDesc, {
+ repair_id: that.data.id
+ }, res => {
+ wx.hideLoading()
+ if (res.fault_imgs) {
+ res.fault_imgs = util.img_url + res.fault_imgs
+ }
+ that.setData({
+ repairOrderDesc: res
+ })
+
+ if (res.status == 3 || res.status == 4) {
+ let imgList2 = res.repair_imgs.split(',')
+ let imgList = []
+ imgList2.forEach((item, index) => {
+ imgList.push(util.img_url + item)
+ })
+ console.log(imgList);
+ that.setData({
+ msg: res.repair_desc,
+ imgList,
+ imgList2,
+ dis2: true
+ })
+ }
+ })
+ },
+ completeRepairOrder(e) {
+ let status = Number(e.currentTarget.dataset.type)
+ let that = this
+ let content = '确认完成该工单吗?'
+ if (status == 3) {
+ content = '确认完成该工单吗?'
+ } else {
+ content = '确认撤销该工单吗?'
+ }
+ wx.showModal({
+ title: '提示',
+ content: content,
+ success: (res) => {
+ if (res.confirm) {
+ util.postUrl4(apiArr.completeRepairOrder, {
+ repair_id: Number(that.data.id),
+ status,
+ repair_desc: that.data.msg,
+ repair_imgs: that.data.imgList2.join(','),
+ repair_time: util.getCurrentTime()
+ }, res => {
+ wx.showToast({
+ title: res.msg,
+ })
+ if (res.msg == '操作成功') {
+ setTimeout(() => {
+ // wx.navigateBack({
+ // delta: 1
+ // })
+ that.back()
+ }, 1500);
+ }
+ })
+ }
+ }
+ });
+ },
+ // 维修 ///////////////////////////////
+
+ // 滤芯更换 ///////////////////////////////
+ getPartOrderDesc() {
+ let that = this
+ wx.showLoading({
+ title: '加载中...',
+ mask: true
+ })
+ util.postUrl4(apiArr.PartOrderDesc, {
+ replace_id: that.data.id
+ }, res => {
+ wx.hideLoading()
+ that.setData({
+ partOrderDesc: res
+ })
+
+ if (res.status == 3 || res.status == 4) {
+ that.setData({
+ msg2: res.install_desc,
+ dis3: true
+ })
+ }
+
+ })
+ },
+
+ //没接口
+ completePartOrder(e) {
+ let status = Number(e.currentTarget.dataset.type)
+ let that = this
+ let content = '确认完成该工单吗?'
+ if (status == 3) {
+ content = '确认完成该工单吗?'
+ } else {
+ content = '确认撤销该工单吗?'
+ }
+ wx.showModal({
+ title: '提示',
+ content: content,
+ success: (res) => {
+ if (res.confirm) {
+ util.postUrl4(apiArr.completePartOrder, {
+ replace_id: Number(that.data.id),
+ status,
+ install_desc: that.data.msg2,
+ install_time: util.getCurrentTime()
+ }, res => {
+ wx.showToast({
+ title: res.msg,
+ })
+ if (res.msg == '操作成功') {
+ setTimeout(() => {
+
+ if (status == 3) {
+ wx.navigateTo({
+ url: '/packages/WaterPurifier/pages/device/deviceDesc/deviceDesc?device_id=' + that.data.partOrderDesc.device_id,
+ })
+ } else {
+ wx.navigateTo({
+ url: '/packages/partner/pages/partsOrder/partsOrder',
+ })
+ }
+ }, 1500);
+ }
+ })
+ }
+ }
+ });
+ },
+ updateInstructions2(e) {
+ let that = this
+ that.setData({
+ msg2: e.detail.value
+ })
+ },
+ // 滤芯更换 ///////////////////////////////
+
+
+
+ // 拆卸工单详情/////////////////////////////////////////////
+ getUninstallDesc() {
+ let that = this
+ wx.showLoading({
+ title: '加载中...',
+ mask: true
+ })
+ util.postUrl4(apiArr.getUninstallDesc, {
+ uninstall_id: that.data.id
+ }, res => {
+ wx.hideLoading()
+ let uninstalldis = false
+ if (res.status != 2) {
+ uninstalldis = true
+ }
+
+ let imgList = ''
+ let newArr = []
+ if (res.uninstall_imgs) {
+ imgList = res.uninstall_imgs.split(",")
+ imgList.forEach(item => {
+ newArr.push(util.img_url + item)
+ })
+ } else {
+ imgList = ''
+ newArr = []
+ }
+
+
+ that.setData({
+ uninstallDesc: res,
+ uninstall_time: res.uninstall_time,
+ uninstallMsg: res.uninstall_desc,
+ imgList: newArr,
+ uninstalldis
+ })
+ })
+ },
+ updateInstructions3(e) {
+ let that = this
+ that.setData({
+ uninstallMsg: e.detail.value
+ })
+ },
+ changeUninstallDate() {
+ let that = this
+ that.setData({
+ UninstallDate: !that.data.UninstallDate
+ })
+ },
+ onInput(event) {
+ let that = this
+ const date = new Date(event.detail); // 获取选中的 Date 对象
+ const year = date.getFullYear(); // 获取年份
+ const month = String(date.getMonth() + 1).padStart(2, '0'); // 月份从0开始,所以需要+1
+ const day = String(date.getDate()).padStart(2, '0');
+ const hours = String(date.getHours()).padStart(2, '0'); // 小时补零
+ const minutes = String(date.getMinutes()).padStart(2, '0'); // 分钟补零
+ const time = `${year}-${month}-${day} ${hours}:${minutes}`;
+ that.setData({
+ uninstall_time: time,
+ UninstallDate: false
+ })
+ },
+ onInput2(event) {
+ let that = this
+ const date = new Date(event.detail); // 获取选中的 Date 对象
+ const year = date.getFullYear(); // 获取年份
+ const month = String(date.getMonth() + 1).padStart(2, '0'); // 月份从0开始,所以需要+1
+ const day = String(date.getDate()).padStart(2, '0');
+ const hours = String(date.getHours()).padStart(2, '0'); // 小时补零
+ const minutes = String(date.getMinutes()).padStart(2, '0'); // 分钟补零
+ const time = `${year}-${month}-${day} ${hours}:${minutes}`;
+ that.setData({
+ newOrderDateAppointment: time,
+ newOrderDateShow: false
+ })
+ },
+ // 拆机
+ uninstallDesc() {
+ let that = this
+
+ if (!that.data.uninstallMsg) {
+ return wx.showToast({
+ title: '请填写拆除说明',
+ icon: "none"
+ })
+ }
+ if (!that.data.uninstall_time) {
+ return wx.showToast({
+ title: '请选择拆除时间',
+ icon: "none"
+ })
+ }
+ if (!that.data.imgList.length) {
+ return wx.showToast({
+ title: '请上传拆除图片',
+ icon: "none"
+ })
+ }
+
+ util.postUrl4(apiArr.unintsall, {
+ uninstall_id: that.data.uninstallDesc.uninstall_id,
+ uninstall_time: that.data.uninstall_time + ':00',
+ uninstall_desc: that.data.uninstallMsg,
+ uninstall_imgs: that.data.imgList2.join(','),
+ }, res => {
+ console.log(res);
+ if (res.msg == '操作成功') {
+ wx.showToast({
+ title: '拆机成功!',
+ icon: "none"
+ })
+ setTimeout(() => {
+ // wx.navigateBack({
+ // delta: 1
+ // })
+ that.setData({
+ uninstallMsg: "",
+ imgList2: [],
+ imgList: [],
+ uninstall_time: "",
+ })
+ that.getUninstallDesc()
+ }, 1500)
+ } else {
+ wx.showToast({
+ title: res.msg,
+ icon: "none"
+ })
+ }
+ })
+ },
+
+ //报废 入库
+ operate(e) {
+ let that = this
+ let status = e.currentTarget.dataset.type
+ let content = ''
+ if (status == 9) {
+ content = '确定要入库吗'
+ } else {
+ content = '确定要报废吗'
+ }
+ wx.showModal({
+ title: '提示',
+ content: content,
+ complete: (res) => {
+ if (res.cancel) {
+
+ }
+
+ if (res.confirm) {
+ util.postUrl4(apiArr.operate, {
+ uninstall_id: that.data.uninstallDesc.uninstall_id,
+ status: status
+ }, res => {
+ wx.showToast({
+ title: '操作成功',
+ icon: "none"
+ })
+ setTimeout(() => {
+ // wx.navigateBack({
+ // delta: 1
+ // })
+ that.back()
+ }, 1500)
+ })
+ }
+ }
+ })
+
+ },
+
+
+
+ //查询设备实时信息
+ getDeriveInfo() {
+ let that = this
+ util.postUrl4(apiArr.boardInfo, {
+ device_id: that.data.newOrderDesc.device_id
+ }, res => {
+ console.log(res);
+ })
+ },
+
+
+
+ onLoad(options) {
+ let that = this
+ // 这里可以根据options.id来设置不同的假数据
+ const id = options.id;
+ this.setData({
+ id,
+ type: options.type
+ });
+
+ if (options.type == 0) {
+ that.getNewOrderDesc()
+ } else if (options.type == 1) {
+ that.getRepairOrderDesc()
+ } else if (options.type == 2) {
+ that.getPartOrderDesc()
+ } else if (options.type == 3) {
+ that.getUninstallDesc()
+ }
+
+ wx.showShareMenu({
+ withShareTicket: true,
+ menus: ['shareAppMessage', 'shareTimeline']
+ })
+
+ },
+
+ onShareAppMessage() {
+ return {
+ title: '人人爱净水', // 分享卡片标题(必填)
+ path: '/pages/water_filter/water_filter', // 用户点击后跳转的路径(可选,默认当前页)
+ imageUrl: 'https://wechat-img-file.oss-cn-beijing.aliyuncs.com/share.png' // 自定义图片(可选,比例建议 5:4)
+ }
+ },
+ onShareTimeline() {
+ return {
+ title: '人人爱净水', // 自定义标题
+ query: '', // 自定义页面路径中的参数
+ imageUrl: 'https://wechat-img-file.oss-cn-beijing.aliyuncs.com/share.png' // 自定义分享图片路径
+ }
+ },
+
+
+});
\ No newline at end of file
diff --git a/packages/partner/pages/OrderMsgInfo/OrderMsgInfo.json b/packages/partner/pages/OrderMsgInfo/OrderMsgInfo.json
new file mode 100644
index 0000000..844f4cc
--- /dev/null
+++ b/packages/partner/pages/OrderMsgInfo/OrderMsgInfo.json
@@ -0,0 +1,4 @@
+{
+ "usingComponents": {},
+ "navigationStyle": "custom"
+}
\ No newline at end of file
diff --git a/packages/partner/pages/OrderMsgInfo/OrderMsgInfo.wxml b/packages/partner/pages/OrderMsgInfo/OrderMsgInfo.wxml
new file mode 100644
index 0000000..76e7657
--- /dev/null
+++ b/packages/partner/pages/OrderMsgInfo/OrderMsgInfo.wxml
@@ -0,0 +1,538 @@
+
+
+
+
+
+
+
+
+
+ 工单详情
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 工单信息
+
+ 待分配
+ 安装中
+ 待激活
+ 已安装
+ 忽略
+
+
+
+
+ 订单编号:
+ {{newOrderDesc.install_no || '暂无数据'}}
+
+
+
+ 设备编号:
+ 选择设备
+
+
+ {{deviceInfo.device_code}}
+
+
+
+ {{newOrderDesc.device_code || '暂无数据'}}
+
+
+
+ 约定时间:
+ {{newOrderDesc.appointment_time || '暂无数据'}}
+
+
+
+ 客户姓名:
+ {{newOrderDesc.customer_name || '暂无数据'}}
+
+
+
+ 客户电话:
+ {{newOrderDesc.customer_phone || '暂无数据'}}
+
+
+
+ 客户地址:
+ {{newOrderDesc.region + newOrderDesc.address || '暂无数据'}}
+
+
+
+
+
+ 创建时间:
+ {{newOrderDesc.create_time || '暂无数据'}}
+
+
+
+
+ 产品图片:
+
+
+
+
+
+
+ 产品名称:
+ {{newOrderDesc.product_name || '暂无数据'}}
+
+
+
+
+
+
+ 安装图片
+
+
+
+
+ ×
+
+
+
+
+ + 上传图片
+
+
+
+
+
+
+ 安装说明
+
+ 说明:
+
+
+
+
+
+ 安装时间:
+
+
+
+
+
+
+ 剩余天数:
+
+
+
+
+
+
+
+
+
+
+
+ 工单信息
+
+ 待指派
+ 待维修
+ 维修完成
+ 已取消
+
+
+
+
+ 订单编号:
+ {{repairOrderDesc.repair_no || '暂无数据'}}
+
+
+
+
+ 产品名称:
+ {{repairOrderDesc.product_name || '暂无数据'}}
+
+
+
+ 设备编号:
+ {{repairOrderDesc.device_code || '暂无数据'}}
+
+
+
+ 约定时间:
+ {{repairOrderDesc.appointment_time || '暂无数据'}}
+
+
+
+ 客户姓名:
+ {{repairOrderDesc.customer_name || '暂无数据'}}
+
+
+
+ 客户电话:
+ {{repairOrderDesc.customer_phone || '暂无数据'}}
+
+
+
+ 客户地址:
+ {{repairOrderDesc.region + repairOrderDesc.address || '暂无数据'}}
+
+
+
+ 故障说明:
+ {{repairOrderDesc.fault_desc || '暂无数据'}}
+
+
+
+
+
+ 工单来源:
+ 系统
+ 微信
+ 后台
+
+
+
+ 创建时间:
+ {{repairOrderDesc.create_time || '暂无数据'}}
+
+
+
+ 故障图片:
+ 暂无数据图片
+
+
+
+
+
+
+ 维修说明
+
+ 说明:
+
+
+
+
+ 维修时间:
+
+
+
+
+
+
+ 维修图片
+
+
+
+
+ ×
+
+
+
+ + 上传图片
+
+
+
+
+
+
+
+
+
+
+ 工单信息
+
+ 待分配
+ 待更换
+ 已更换
+ 已撤销
+
+
+
+
+
+ 订单编号:
+ {{partOrderDesc.replace_no || '暂无数据'}}
+
+
+
+
+ 配件名称:
+
+ {{item.parts_name}}
+
+
+
+
+ 设备编号:
+ {{partOrderDesc.device_code || '暂无数据'}}
+
+
+
+ 约定时间:
+ {{partOrderDesc.appointment_time || '暂无数据'}}
+
+
+
+ 客户姓名:
+ {{partOrderDesc.customer_name || '暂无数据'}}
+
+
+
+ 客户电话:
+ {{partOrderDesc.customer_phone || '暂无数据'}}
+
+
+
+ 客户地址:
+ {{partOrderDesc.region + partOrderDesc.address || '暂无数据'}}
+
+
+
+ 师傅姓名:
+ {{partOrderDesc.master_info.name || '暂无数据'}}
+
+
+
+ 师傅电话:
+ {{partOrderDesc.master_info.phone || '暂无数据'}}
+
+
+
+ 工单来源:
+ 系统
+ 微信
+ 后台
+
+
+
+
+ 天数阈值:
+ {{partOrderDesc.threshold}}天
+
+
+
+ 水量阈值:
+ {{partOrderDesc.threshold_volume}}升
+
+
+
+
+
+ 创建时间:
+ {{partOrderDesc.create_time || '暂无数据'}}
+
+
+
+
+
+ 安装说明
+
+ 说明:
+
+
+
+ 安装时间:
+
+
+
+
+
+ 更换说明
+
+ 说明:
+
+
+
+
+
+ 更换耗材
+
+
+ 耗材名称:
+ {{item.parts_name || '暂无数据'}}
+ 剩余天数:{{item.available_days}}
+ 剩余流量:{{item.available_volume}}
+
+
+
+
+
+
+
+
+
+
+
+ 工单信息
+
+
+
+
+ 待拆机
+ 待操作
+
+
+
+
+ 订单编号:
+ {{uninstallDesc.uninstall_no || '暂无数据'}}
+
+
+
+
+ 产品名称:
+ {{uninstallDesc.product_name || '暂无数据'}}
+
+
+
+ 设备编号:
+ {{uninstallDesc.device_code || '暂无数据'}}
+
+
+
+
+ 客户姓名:
+ {{uninstallDesc.customer_name}}
+
+
+
+ 客户手机:
+ {{uninstallDesc.customer_phone}}
+
+
+
+
+ 预约时间:
+ {{uninstallDesc.region + uninstallDesc.address || "暂无数据" }}
+
+
+
+ 预约时间:
+ {{uninstallDesc.appointment_time}}
+
+
+
+ 师傅姓名:
+ {{uninstallDesc.repairman_name || '暂无数据'}}
+
+
+
+ 师傅手机:
+ {{uninstallDesc.repairman_phone || '暂无数据'}}
+
+
+
+ 创建时间:
+ {{uninstallDesc.create_time || '暂无数据'}}
+
+
+
+ 安装说明
+
+ 说明:
+
+
+
+ 安装时间:
+
+
+
+
+ 更换说明
+
+ 说明:
+
+
+
+
+
+ 拆除说明
+ 拆除图片
+
+
+
+
+ ×
+
+
+
+
+ + 上传图片
+
+
+
+
+ 说明:
+
+
+
+
+ 拆除时间:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/packages/partner/pages/OrderMsgInfo/OrderMsgInfo.wxss b/packages/partner/pages/OrderMsgInfo/OrderMsgInfo.wxss
new file mode 100644
index 0000000..a65f8f5
--- /dev/null
+++ b/packages/partner/pages/OrderMsgInfo/OrderMsgInfo.wxss
@@ -0,0 +1,184 @@
+.container {
+ padding: 20rpx;
+ padding-top: 0;
+ padding-left: 0;
+}
+.nav-box{
+ padding-bottom: 30rpx;
+}
+.nav-bar-right{
+ opacity: 0;
+}
+
+.section {
+ margin-bottom: 40rpx;
+ padding: 20rpx;
+ background: #fff;
+ border-radius: 8rpx;
+ box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.1);
+ margin-left: 20rpx;
+}
+
+.section-title {
+ font-size: 32rpx;
+ font-weight: bold;
+ margin-bottom: 20rpx;
+}
+.section-title2{
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+}
+.section-title2_status{
+ font-size: 26rpx !important;
+}
+
+.info-item {
+ display: flex;
+ margin-bottom: 16rpx;
+}
+
+.label {
+ color: #666;
+ font-size: 28rpx;
+ width: 160rpx;
+}
+
+.value {
+ color: #333;
+ font-size: 28rpx;
+ flex: 1;
+ overflow: hidden;
+ white-space: wrap;
+ text-align: right;
+ overflow-x: auto;
+}
+
+.product-image {
+ margin: 32rpx 0;
+ text-align: center;
+ width: 300rpx;
+ height: 300rpx;
+ box-shadow: 0 4rpx 16rpx rgba(0, 0, 0, 0.1);
+}
+
+.product-image image {
+ width: 300rpx;
+ height: 300rpx;
+ border-radius: 16rpx;
+ box-shadow: 0 4rpx 16rpx rgba(0, 0, 0, 0.1);
+}
+
+.complete-btn-container {
+ position: fixed;
+ bottom: 32rpx;
+ left: 32rpx;
+ right: 32rpx;
+ display: flex;
+ justify-content: space-between;
+}
+
+.complete-btn {
+ width: 48%;
+ height: 80rpx;
+ line-height: 80rpx;
+ background: #2583FF;
+ color: #fff;
+ border-radius: 40rpx;
+ font-size: 32rpx;
+}
+
+.cancel-btn {
+ background: #F56C6C;
+}
+
+
+.installation-images {
+ display: flex;
+ flex-wrap: wrap;
+ gap: 16rpx;
+}
+
+.installation-image {
+ width: 210rpx;
+ height: 210rpx;
+ border-radius: 8rpx;
+}
+
+
+.image-container {
+ display: flex;
+ flex-wrap: wrap;
+ gap: 16rpx;
+ /* 图片间距 */
+ position: relative;
+}
+
+.image-item {
+ width: calc((100% - 32rpx) / 3);
+ /* 每行显示3张图片,减去间距 */
+ height: 210rpx;
+ border-radius: 8rpx;
+}
+
+.delete-icon {
+ position: absolute;
+ top: -10rpx;
+ right: -10rpx;
+ width: 40rpx;
+ height: 40rpx;
+ background: #2583FF;
+ color: #fff;
+ border-radius: 50%;
+ text-align: center;
+ line-height: 40rpx;
+ font-size: 28rpx;
+}
+
+.upload-btn {
+ width: 210rpx;
+ height: 210rpx;
+ border: 2rpx dashed #ccc;
+ border-radius: 8rpx;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ color: #666;
+}
+
+.item2 {
+ margin-top: 10rpx;
+ display: flex;
+ flex-direction: column;
+ align-items: flex-start;
+}
+
+
+.item4{
+}
+
+
+.value2 {
+ display: flex;
+ justify-content: flex-end;
+ flex-direction: column;
+ align-items: flex-end;
+}
+
+.btn {
+ width: 200rpx;
+ height: 60rpx;
+ line-height: 60rpx;
+ background: #2583FF;
+ color: #fff;
+ border-radius: 40rpx;
+ font-size: 32rpx;
+ text-align: center;
+ margin-top: 10rpx;
+}
+
+.value3 {
+ display: flex;
+ flex-wrap: wrap;
+ flex-direction: column;
+}
\ No newline at end of file
diff --git a/packages/partner/pages/WorkOrder/WorkOrder.js b/packages/partner/pages/WorkOrder/WorkOrder.js
index fc89edf..e000c87 100644
--- a/packages/partner/pages/WorkOrder/WorkOrder.js
+++ b/packages/partner/pages/WorkOrder/WorkOrder.js
@@ -1,5 +1,6 @@
let util = require('../../../../utils/util')
let apiArr = require('../../../../api/water_filter')
+const app = getApp({ allowDefault: true })
// packages/WaterPurifier/pages/upKeep/upKeep.js
Page({
@@ -8,194 +9,200 @@ Page({
* 页面的初始数据
*/
data: {
- admin:"",
- statusType: {
- 1: '待分配',
- 2: '安装中',
- 3: '待激活',
- 4: '已安装',
- 5: '忽略',
- },
- option1: [
- { text: '全部', value: 0 },
- { text: '待分配', value: 1 },
- { text: '安装中', value: 2 },
- { text: '待激活', value: 3 },
- { text: '已安装', value: 4 },
- { text: '忽略', value: 5 },
- ],
- option2: [
- { text: '渠道', value: 'a' },
- { text: '好评排序', value: 'b' },
- { text: '销量排序', value: 'c' },
- ],
- value1: 0,
- value2: 'a',
- show:false,
- MasterList:[
-
- ],
+ s: app.system.statusBarHeight, // 状态栏高度
+ n: (app.menu.top - app.system.statusBarHeight) * 2 + app.menu.height, // 导航栏高度
+ t: app.menu.top, // 胶囊局顶部距离
+ h: app.menu.height, // 胶囊高度
+ admin: "",
+ statusType: {
+ 1: '待分配',
+ 2: '安装中',
+ 3: '待激活',
+ 4: '已安装',
+ 5: '已撤销',
+ },
+ option1: [
+ { text: '全部', value: 0 },
+ { text: '待分配', value: 1 },
+ { text: '安装中', value: 2 },
+ { text: '待激活', value: 3 },
+ { text: '已安装', value: 4 },
+ { text: '忽略', value: 5 },
+ ],
+ option2: [
+ { text: '渠道', value: 'a' },
+ { text: '好评排序', value: 'b' },
+ { text: '销量排序', value: 'c' },
+ ],
+ value1: 0,
+ value2: 'a',
+ show: false,
+ MasterList: [
- searchText:"",//搜索文字
- page_num:1,
- page_size:10,
- total:'',
- deviceList:[],
- sendOrders: {}, // 派单订单
- flag:false
+ ],
+
+ searchText: "",//搜索文字
+ page_num: 1,
+ page_size: 10,
+ total: '',
+ deviceList: [],
+ sendOrders: {}, // 派单订单
+ flag: false
},
- desc(e){
+ back(){
+ wx.reLaunch({
+ url: '/packages/partner/pages/partner',
+ })
+ },
+ desc(e) {
let that = this
wx.navigateTo({
- url: `../orderDesc/orderDesc?install_id=${e.currentTarget.dataset.id}&type=desc`,
+ url: `/packages/partner/pages/OrderMsgInfo/OrderMsgInfo?id=${e.currentTarget.dataset.id}&type=0`,
})
},
- addWorkOrder(){
+ addWorkOrder() {
wx.navigateTo({
- url: '../newWorkOrder/newWorkOrder',
+ url: '../newWorkOrder/newWorkOrder',
})
},
-
- onClose(){
+
+ onClose() {
let that = this
that.setData({
- show:false
+ show: false
})
},
- dispatch(e){
+ dispatch(e) {
let that = this
that.setData({
- show:true,
- sendOrders: e.currentTarget.dataset.item
+ show: true,
+ sendOrders: e.currentTarget.dataset.item
})
},
// 下拉列表选择工单状态
headerDropdownClick(e) {
- console.log('headerDropdownClickheaderDropdownClick', e);
- this.setData({
- value1: e.detail,
- orderList: [],
- page_num: 1,
- })
- this.getNewOrderList();
+ console.log('headerDropdownClickheaderDropdownClick', e);
+ this.setData({
+ value1: e.detail,
+ orderList: [],
+ page_num: 1,
+ })
+ this.getNewOrderList();
},
// 撤回工单
headerRecallClick(e) {
- let _this = this;
- const { item } = e.currentTarget.dataset;
- wx.showLoading({
- title: '加载中...',
- mask: true
- })
- util.postUrl4(apiArr.RecallNewRepair,{
- install_id: item.install_id,
- },res=>{
- wx.hideLoading()
- if (res.error) {
- wx.showToast({
- title: '撤回工单失败',
- icon: 'none',
- })
- return;
- }
- wx.showToast({
- title: res.msg,
- icon: 'none',
- success() {
- setTimeout(() => {
- _this.setData({
- deviceList: [],
- page_num: 1,
- })
- _this.getNewOrderList();
- }, 1500)
- }
+ let _this = this;
+ const { item } = e.currentTarget.dataset;
+ wx.showLoading({
+ title: '加载中...',
+ mask: true
+ })
+ util.postUrl4(apiArr.RecallNewRepair, {
+ install_id: item.install_id,
+ }, res => {
+ wx.hideLoading()
+ if (res.error) {
+ wx.showToast({
+ title: '撤回工单失败',
+ icon: 'none',
+ })
+ return;
+ }
+ wx.showToast({
+ title: res.msg,
+ icon: 'none',
+ success() {
+ setTimeout(() => {
+ _this.setData({
+ deviceList: [],
+ page_num: 1,
+ })
+ _this.getNewOrderList();
+ }, 1500)
+ }
+ })
})
- })
},
- ipt1(e){
+ ipt1(e) {
let that = this
+ console.log(e);
that.setData({
- searchText:e.detail.value,
- page_num:1,
- flag:false,
- deviceList:[]
+ searchText: e.detail.value,
})
- that.getNewOrderList()
},
- search(){
+ search() {
let that = this
that.setData({
- page_num:1,
- flag:false,
- deviceList:[]
+ page_num: 1,
+ flag: false,
+ deviceList: []
})
that.getNewOrderList()
},
//工单列表
- getNewOrderList(){
+ getNewOrderList() {
let that = this
wx.showLoading({
- title: '加载中...',
- mask:true,
+ title: '加载中...',
+ mask: true,
})
//设置加载状态
- util.postUrl4(apiArr.newOrderList,{
- page_size:that.data.page_size,
- page_num:that.data.page_num,
- search:that.data.searchText,
- dealer_id: that.data.admin.shop_id
- },res=>{
+ util.postUrl4(apiArr.newOrderList, {
+ page_size: that.data.page_size,
+ page_num: that.data.page_num,
+ dealer_id: that.data.admin.shop_id,
+ search: that.data.searchText,
+ }, res => {
wx.hideLoading()
- if(res.row){
+ if (res.row) {
let flag = false
- if(res.row.length == that.data.page_size){
+ if (res.row.length == that.data.page_size) {
flag = true
- }else{
+ } else {
flag = false
}
that.setData({
flag,
- deviceList:that.data.deviceList.concat(res.row || []),
- page_num:that.data.page_num +1
+ deviceList: that.data.deviceList.concat(res.row || []),
+ page_num: that.data.page_num + 1
})
-
+
}
that.getMasterList()
})
},
// 维修师傅列表
- getMasterList(){
+ getMasterList() {
let that = this
- util.postUrl4(apiArr.MasterList,{
- page_num:1,
- page_size:50,
- dealer_id:that.data.admin.shop_id
- },res=>{
- if(res.rows){
- res.rows.forEach(item=>{
+ util.postUrl4(apiArr.MasterList, {
+ page_num: 1,
+ page_size: 50,
+ dealer_id: that.data.admin.shop_id
+ }, res => {
+ if (res.rows) {
+ res.rows.forEach(item => {
item.checked = false
- item.avatar = util.img_url + item.avatar
+ item.avatar =item.avatar.startsWith('http')?item.avatar: util.img_url + item.avatar
})
that.setData({
- MasterList:res.rows
+ MasterList: res.rows
})
}
})
},
- selectMaster(e){
+ selectMaster(e) {
console.log(e);
let that = this
let MasterList = that.data.MasterList
- MasterList.forEach(item=>{
+ MasterList.forEach(item => {
item.checked = false
})
MasterList[e.currentTarget.dataset.index].checked = true
@@ -204,45 +211,44 @@ Page({
})
},
- cancel(){
+ cancel() {
let that = this
that.setData({
- show:false,
- })
+ show: false,
+ })
},
- sure(){
+ sure() {
let that = this
that.setData({
- show:false
+ show: false
})
const { sendOrders, MasterList } = this.data;
const checkedMaster = MasterList.filter((item) => item.checked)[0];
util.postUrl4(apiArr.newInstallAssign, {
- install_id: sendOrders.install_id,
- master_id: checkedMaster.info_id,
- } ,res => {
- console.log('新装工单 选择修为师傅', res);
- if (res.error) {
+ install_id: sendOrders.install_id,
+ master_id: checkedMaster.info_id,
+ }, res => {
+ if (res.error) {
+ wx.showToast({
+ title: '派单失败',
+ icon: 'none',
+ })
+ return;
+ }
wx.showToast({
- title: '派单失败',
- icon: 'none',
+ title: res.msg,
+ icon: 'none',
})
- return;
- }
- wx.showToast({
- title: res.msg,
- icon: 'none',
- })
- that.setData({
- page_num:1,
- flag:false,
- })
- setTimeout(()=>{
that.setData({
- deviceList:[]
- })
- that.getNewOrderList()
- },1500)
+ page_num: 1,
+ flag: false,
+ })
+ setTimeout(() => {
+ that.setData({
+ deviceList: []
+ })
+ that.getNewOrderList()
+ }, 1500)
})
},
@@ -252,70 +258,85 @@ Page({
onLoad(options) {
let that = this
that.setData({
- admin:wx.getStorageSync('admin')
+ admin: wx.getStorageSync('admin')
})
- that.getNewOrderList()
-
wx.showShareMenu({
withShareTicket: true,
menus: ['shareAppMessage', 'shareTimeline']
})
},
-
+
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
-
+
},
-
+
/**
* 生命周期函数--监听页面显示
*/
onShow() {
-
+ let that = this
+ this.setData({
+ orderList: [],
+ deviceList:[],
+ page_num: 1,
+ })
+ that.getNewOrderList()
},
-
+
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
-
+
},
-
+
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
-
+
},
-
+
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
-
+ let that = this
+
+ that.setData({
+ orderList: [],
+ deviceList:[],
+ searchText:"",
+ page_num: 1,
+ flag:false
+ })
+ that.getNewOrderList()
+ wx.stopPullDownRefresh();
+
},
-
+
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
let that = this
- if(that.data.flag){
+ if (that.data.flag) {
that.getNewOrderList()
}
},
-
+
/**
* 用户点击右上角分享
*/
- onShareAppMessage(){
+ onShareAppMessage() {
return {
title: '人人爱净水', // 分享卡片标题(必填)
path: '/pages/water_filter/water_filter', // 用户点击后跳转的路径(可选,默认当前页)
imageUrl: 'https://wechat-img-file.oss-cn-beijing.aliyuncs.com/share.png' // 自定义图片(可选,比例建议 5:4)
- }
+ }
},
onShareTimeline() {
return {
@@ -324,4 +345,4 @@ Page({
imageUrl: 'https://wechat-img-file.oss-cn-beijing.aliyuncs.com/share.png' // 自定义分享图片路径
}
},
- })
\ No newline at end of file
+})
\ No newline at end of file
diff --git a/packages/partner/pages/WorkOrder/WorkOrder.json b/packages/partner/pages/WorkOrder/WorkOrder.json
index d7c8f2d..add3a68 100644
--- a/packages/partner/pages/WorkOrder/WorkOrder.json
+++ b/packages/partner/pages/WorkOrder/WorkOrder.json
@@ -2,5 +2,6 @@
"usingComponents": {
"Footer":"/component/footer/index"
},
- "navigationBarTitleText": "新装工单"
+ "navigationStyle": "custom",
+ "enablePullDownRefresh": true
}
\ No newline at end of file
diff --git a/packages/partner/pages/WorkOrder/WorkOrder.wxml b/packages/partner/pages/WorkOrder/WorkOrder.wxml
index bcf2a9c..5ff7ac9 100644
--- a/packages/partner/pages/WorkOrder/WorkOrder.wxml
+++ b/packages/partner/pages/WorkOrder/WorkOrder.wxml
@@ -1,9 +1,28 @@
+
+
+
+
+
+
+
+ 新装工单
+
+
+
+
+
+
+
+
-
-
+
+
+
+
+
@@ -12,10 +31,10 @@
工单号:{{item.install_no}}
- 设备号
+ 设备编号
{{item.device_code}}
-
+
客户名称
{{item.customer_name}}
@@ -26,23 +45,27 @@
工单状态
- {{statusType[item.status]}}
+ 待分配
+ 安装中
+ 待激活
+ 已安装
+ 已撤销
-
+
- 具体位置
- {{item.region + item.address}}
+ 详细地址
+ {{item.region + item.address || '暂无数据'}}
撤回
派单
- 完成
+
-
+
新增
@@ -55,7 +78,7 @@
-
+
取消
请选择维修师傅
@@ -66,7 +89,7 @@
-
+
@@ -81,11 +104,11 @@
-
+
-
+
\ No newline at end of file
diff --git a/packages/partner/pages/WorkOrder/WorkOrder.wxss b/packages/partner/pages/WorkOrder/WorkOrder.wxss
index 21622b7..d3a3480 100644
--- a/packages/partner/pages/WorkOrder/WorkOrder.wxss
+++ b/packages/partner/pages/WorkOrder/WorkOrder.wxss
@@ -1,6 +1,13 @@
.upkeep{
padding-bottom: 80rpx;
}
+.nav-box{
+ padding-bottom: 30rpx;
+}
+.nav-bar-right{
+ opacity: 0;
+}
+
.upkeep_select {
display: flex;
align-items: center;
@@ -9,7 +16,7 @@
font-size: 26rpx;
color: #222222;
background-color: #F9F9F9;
- padding: 30rpx 20rpx;
+ padding: 16rpx 20rpx;
}
.upkeep_select .ipt {
@@ -18,7 +25,7 @@
justify-content: space-between;
background-color: #fff;
width: 710rpx;
- height: 54rpx;
+ height: 98rpx;
background: #FFFFFF;
border-radius: 100rpx 100rpx 100rpx 100rpx;
padding-left: 26rpx;
@@ -27,10 +34,11 @@
.ipt input{
flex: 1;
+ height: 100rpx;
}
.ipt image {
- width: 30rpx;
- height: 30rpx;
+ width: 42rpx;
+ height: 42rpx;
}
.orderList {
@@ -58,7 +66,7 @@
.orderItem_Item_tit {
font-weight: 400;
- font-size: 26rpx;
+ font-size: 28rpx;
color: #999999;
min-width: 110rpx;
margin-right: 30rpx;
@@ -66,7 +74,7 @@
.orderItem_Item_con {
font-weight: 400;
- font-size: 26rpx;
+ font-size: 28rpx;
color: #222222;
}
@@ -235,6 +243,7 @@
background: #F9F9F9;
border-radius: 20rpx 20rpx 20rpx 20rpx;
border: 1rpx solid #999999;
+ overflow: hidden;
margin-right: 30rpx;
}
.MasterAva image{
@@ -280,4 +289,13 @@
height: 50vh;
padding-top: 80rpx;
overflow-y: auto;
+}
+
+
+.searchBox{
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ padding-left: 40rpx;
+ height: 70rpx;
}
\ No newline at end of file
diff --git a/packages/partner/pages/addNewOrder/addNewOrder.js b/packages/partner/pages/addNewOrder/addNewOrder.js
index 9874aa1..c15f61e 100644
--- a/packages/partner/pages/addNewOrder/addNewOrder.js
+++ b/packages/partner/pages/addNewOrder/addNewOrder.js
@@ -1,5 +1,6 @@
let util = require('../../../../utils/util')
let apiArr = require('../../../../api/partner')
+let apiArr2 = require('../../../../api/water_filter')
Page({
/**
@@ -18,17 +19,137 @@ Page({
page_num: 1,
page_size: 50,
show: false,
- currentDeviceInfo: ""
+ currentDeviceInfo: {
+ region:"",
+ address:"",
+ },
+ formatter(type, value) {
+ if (type === 'year') {
+ return `${value}年`;
+ }
+ if (type === 'month') {
+ return `${value}月`;
+ }
+ if (type === 'day') {
+ return `${value}日`;
+ }
+ return value;
+ },
+ show2: false,
+ cityList: [],
+ areaList: [],
+ businessList: [],
+ newAreaList: [], // 默认展示 市区
+ newBusiness: [], // 默认展示 县/区
+ confirmCity: '',
+ confirmArea: '',
+ confirmBusiness: '',
+ deviceInfo:{
+ customer_name:"",
+ customer_phone:"",
+ device_code:"",
+ address:"",
+ region:""
+ }
},
+ onClose2() {
+ this.setData({
+ show2: false
+ })
+ },
+ headerAreaClick() {
+ this.setData({
+ show2: true
+ })
+ },
+ bindChange(e) {
+ const { value } = e.detail;
+ const { cityList, areaList, businessList } = this.data;
+ // 每次切换时,根据当前点击的省过滤出所属市区,并且试试变化县/区
+ let newArea = areaList.filter((item) => item.city_id === cityList[value[0]].city_id);
+ let newbus = businessList.filter((item) => item.area_id === newArea[value[1]].area_id);
+ this.setData({
+ newAreaList: newArea,
+ newBusiness: newbus,
+ confirmCity: cityList[value[0]],
+ confirmArea: newArea[value[1]],
+ confirmBusiness: newbus[value[2]],
+ })
+ },
+ onOk() {
+ const { confirmCity, confirmArea, confirmBusiness } = this.data;
+ console.log(confirmCity, confirmArea, confirmBusiness);
+ this.setData({
+ show2: false,
+ "currentDeviceInfo.region": `${confirmCity.name}${confirmArea.area_name}${confirmBusiness.business_name}`,
+ })
+ },
+
+ getSSQ() {
+ let that = this
+ util.postUrl2(apiArr2.city, {}, res => {
+ util.postUrl2(apiArr2.area, {}, res1 => {
+ util.postUrl2(apiArr2.business, {}, res2 => {
+ wx.hideLoading();
+ // 省列表来自 res
+ let cityList = res.data.data.rows;
+ // 市列表来自 res1
+ let areaList = res1.data.data.rows;
+ // 区列表来自 res2
+ let businessList = res2.data.data.rows;
+
+ // 处理市列表,将衡水市放到最后
+ let hengshuiIndex = areaList.findIndex(item => item.name === '衡水市');
+ console.log(hengshuiIndex, 'hengshuiIndex');
+ if (hengshuiIndex !== -1) {
+ const hengshui = areaList.splice(hengshuiIndex, 1)[0];
+ areaList.push(hengshui);
+ }
+
+ console.log(businessList);
+ // 处理区列表,将衡水市的桃城区放到最后一个
+ let taochengIndex = businessList.findIndex(item => item.business_name === '桃城区');
+ if (taochengIndex !== -1) {
+ const taocheng = businessList.splice(taochengIndex, 1)[0];
+ businessList.unshift(taocheng);
+ }
+
+
+ // 默认展示第一条数据的省、市和区
+ let newArea = res1.data.data.rows.filter((item) => {
+ return item.city_id === res.data.data.rows[0].city_id
+ });
+ let newbus = res2.data.data.rows.filter((item) => {
+ return item.area_id === res1.data.data.rows[0].area_id
+ });
+
+ // 正确存储数据
+ wx.setStorageSync('cityList', cityList)
+ wx.setStorageSync('areaList', areaList)
+ wx.setStorageSync('businessList', businessList)
+
+ this.setData({
+ cityList: cityList,
+ areaList: areaList,
+ businessList: businessList,
+ newAreaList: newArea, // 默认展示市
+ newBusiness: newbus, // 默认展示区
+ confirmCity: cityList[0],
+ confirmArea: newArea[0],
+ confirmBusiness: newbus[0],
+ })
+ })
+ })
+ })
+ },
changeShow1() {
let that = this
- that.setData({
- show: true
+ wx.navigateTo({
+ url: '/packages/partner/pages/chooseRepairDevice/chooseRepairDevice',
})
},
getDeviceList() {
- console.log(apiArr);
let that = this
util.postUrl4(apiArr.deviceList, {
page_num: that.data.page_num,
@@ -40,6 +161,14 @@ Page({
})
},
+ changeAddress(e){
+ console.log(e);
+ let that = this
+ that.setData({
+ "currentDeviceInfo.address":e.detail.value
+ })
+ },
+
updateFault_desc(e) {
let that = this
that.setData({
@@ -103,11 +232,13 @@ Page({
fileList2
})
},
-
+ changeCustomerPhone(e){
+ console.log(e);
+ },
submit() {
let that = this
- if (!that.data.currentDeviceInfo.device_id) {
+ if (!that.data.deviceInfo.device_code) {
return wx.showToast({
title: '请选择维修设备',
icon: "none"
@@ -127,20 +258,20 @@ Page({
})
}
util.postUrl4(apiArr.createRepairOrder, {
- device_code: that.data.currentDeviceInfo.device_code,
+ device_code: that.data.deviceInfo.device_code,
appointment_time: '',
fault_desc: that.data.fault_desc,
- fault_imgs: that.data.fileList2[0].url
+ fault_imgs: that.data.fileList2[0].url,
}, res => {
wx.showToast({
title: '创建成功!',
icon: "none"
})
- setTimeout(()=>{
+ setTimeout(() => {
wx.navigateBack({
- delta:1
+ delta: 1
})
- },1500)
+ }, 1500)
})
},
/**
@@ -149,6 +280,31 @@ Page({
onLoad(options) {
let that = this
that.getDeviceList()
+ if (wx.getStorageSync('cityList') && wx.getStorageSync('areaList') && wx.getStorageSync('businessList')) {
+ let res = wx.getStorageSync('cityList')
+ let res1 = wx.getStorageSync('areaList')
+ let res2 = wx.getStorageSync('businessList')
+ console.log(res1);
+ // 默认展示第一条数据 的市区 和 城区
+ let newArea = res1.filter((item) => {
+ return item.city_id === res[0].city_id
+ });
+ let newbus = res2.filter((item) => {
+ return item.area_id === res1[0].area_id
+ });
+ this.setData({
+ cityList: res,
+ areaList: res1,
+ businessList: res2,
+ newAreaList: newArea, // 默认展示 市区
+ newBusiness: newbus, // 默认展示 县/区
+ confirmCity: res1[0],
+ confirmArea: newArea[0],
+ confirmBusiness: newbus[0],
+ })
+ } else {
+ that.getSSQ()
+ }
},
/**
diff --git a/packages/partner/pages/addNewOrder/addNewOrder.json b/packages/partner/pages/addNewOrder/addNewOrder.json
index 6f5247b..3fafc90 100644
--- a/packages/partner/pages/addNewOrder/addNewOrder.json
+++ b/packages/partner/pages/addNewOrder/addNewOrder.json
@@ -1,3 +1,4 @@
{
- "usingComponents": {}
+ "usingComponents": {},
+ "navigationBarTitleText": "新增维修工单"
}
\ No newline at end of file
diff --git a/packages/partner/pages/addNewOrder/addNewOrder.wxml b/packages/partner/pages/addNewOrder/addNewOrder.wxml
index 188215c..f86a93f 100644
--- a/packages/partner/pages/addNewOrder/addNewOrder.wxml
+++ b/packages/partner/pages/addNewOrder/addNewOrder.wxml
@@ -7,7 +7,7 @@
维修设备
-
+
@@ -18,7 +18,7 @@
用户姓名
-
+
@@ -28,7 +28,7 @@
用户电话
-
+
@@ -40,18 +40,17 @@
所在区域
-
+
-
*
详细地址
-
+
@@ -97,7 +96,6 @@
-
@@ -106,3 +104,24 @@
+
+
+
+
+
+
+
+
+ {{item.name}}
+
+
+ {{item.name}}
+
+
+ {{item.business_name}}
+
+
+
\ No newline at end of file
diff --git a/packages/partner/pages/chooseDevice/chooseDevice.js b/packages/partner/pages/chooseDevice/chooseDevice.js
new file mode 100644
index 0000000..be3f1e6
--- /dev/null
+++ b/packages/partner/pages/chooseDevice/chooseDevice.js
@@ -0,0 +1,182 @@
+let util = require('../../../../utils/util')
+let apiArr = require('../../../../api/partner')
+// packages/partner/pages/chooseDevice/chooseDevice.js
+Page({
+
+ /**
+ * 页面的初始数据
+ */
+ data: {
+ deviceCode: "",
+ deviceInfo: "",
+ deviceList: [],
+ flag: false,
+ page_num: 1,
+ page_size: 10,
+ id: "",
+ product_id:""
+ },
+ scanQrcode() {
+ let that = this
+ wx.scanCode({
+ success: (res) => {
+ // 处理扫码结果
+ this.setData({
+ deviceCode: res.result
+ });
+ util.postUrl4(apiArr.ScanQrcodeInNewOrder, {
+ device_code: res.result,
+ install_id: that.data.id
+ }, res => {
+ that.setData({
+ deviceInfo: res
+ })
+
+ const pages = getCurrentPages();
+ const prevPage = pages[pages.length - 2]; // 获取上一页实例
+ // 传值给上一页
+ prevPage.setData({
+ deviceInfo: res // 可以是对象、数组等
+ });
+ // 调用上一页的方法
+ // prevPage.yourRefreshMethod(); // 你定义的刷新方法
+ // 返回上一页
+ wx.navigateBack();
+ })
+
+ },
+ fail: (err) => {
+ wx.showToast({
+ title: '扫码失败',
+ icon: 'none'
+ });
+ }
+ });
+ },
+ getDeviceList() {
+ wx.showLoading({
+ title: '加载中',
+ mask: true
+ })
+ let that = this
+ let admin = wx.getStorageSync('admin')
+ let param = {
+ page_size: that.data.page_size,
+ page_num: that.data.page_num,
+ search: that.data.searchText,
+ dealer_id: admin.shop_id,
+ status: Number(9),
+ product_id:that.data.product_id
+ };
+
+
+ util.postUrl4(apiArr.deviceList, param, res => {
+ wx.hideLoading()
+ let flag = false
+ if (res.list && res.list.length == that.data.page_size) {
+ console.log(123);
+ flag = true
+ } else {
+ console.log(456);
+ flag = false
+ }
+ that.setData({
+ deviceList: that.data.deviceList.concat(res.list || []),
+ total: res.total,
+ flag,
+ page_num: that.data.page_num + 1
+ })
+ console.log(that.data.flag);
+ })
+ },
+ deviceDesc(e) {
+ const pages = getCurrentPages();
+ const prevPage = pages[pages.length - 2]; // 获取上一页实例
+ // 传值给上一页
+ prevPage.setData({
+ deviceInfo: e.currentTarget.dataset.item // 可以是对象、数组等
+ });
+ // 调用上一页的方法
+ // prevPage.yourRefreshMethod(); // 你定义的刷新方法
+ // 返回上一页
+ wx.navigateBack();
+ },
+ ipt1(e) {
+ let that = this
+ that.setData({
+ searchText: e.detail.value,
+ })
+ },
+ search2() {
+ let that = this
+ that.setData({
+ deviceList: [],
+ flag: false,
+ page_num: 1
+ })
+ that.getDeviceList()
+ },
+ /**
+ * 生命周期函数--监听页面加载
+ */
+ onLoad(options) {
+ let that = this
+ that.setData({
+ id: options.id,
+ product_id:options.product_id
+ })
+ that.getDeviceList()
+ },
+
+ /**
+ * 生命周期函数--监听页面初次渲染完成
+ */
+ onReady() {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面显示
+ */
+ onShow() {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面隐藏
+ */
+ onHide() {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面卸载
+ */
+ onUnload() {
+
+ },
+
+ /**
+ * 页面相关事件处理函数--监听用户下拉动作
+ */
+ onPullDownRefresh() {
+
+ },
+
+ /**
+ * 页面上拉触底事件的处理函数
+ */
+ onReachBottom() {
+ let that = this
+ if (that.data.flag) {
+ that.getDeviceList()
+ }
+ },
+
+ /**
+ * 用户点击右上角分享
+ */
+ onShareAppMessage() {
+
+ }
+})
\ No newline at end of file
diff --git a/packages/partner/pages/chooseDevice/chooseDevice.json b/packages/partner/pages/chooseDevice/chooseDevice.json
new file mode 100644
index 0000000..24d9930
--- /dev/null
+++ b/packages/partner/pages/chooseDevice/chooseDevice.json
@@ -0,0 +1,4 @@
+{
+ "usingComponents": {},
+ "navigationBarTitleText": "选择设备"
+}
\ No newline at end of file
diff --git a/packages/partner/pages/chooseDevice/chooseDevice.wxml b/packages/partner/pages/chooseDevice/chooseDevice.wxml
new file mode 100644
index 0000000..799cf37
--- /dev/null
+++ b/packages/partner/pages/chooseDevice/chooseDevice.wxml
@@ -0,0 +1,49 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 设备编码:{{item.device_code}}
+
+
+ 产品名称
+ {{item.product_name}}
+
+
+ 经销商
+ {{item.dealer_name}}
+
+
+ 经销商编码
+ {{item.dealer_code}}
+
+
+ 网络状态
+ {{item.network_status == '1'?'正常':'离线'}}
+
+
+
+ 安装状态
+ 已安装
+ 空闲
+ 已拆机
+
+
+
+ 设备地址
+ {{item.address}}
+
+
+
+
+
+
\ No newline at end of file
diff --git a/packages/partner/pages/chooseDevice/chooseDevice.wxss b/packages/partner/pages/chooseDevice/chooseDevice.wxss
new file mode 100644
index 0000000..dcc5f66
--- /dev/null
+++ b/packages/partner/pages/chooseDevice/chooseDevice.wxss
@@ -0,0 +1,84 @@
+.upkeep_select {
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+ font-weight: 400;
+ font-size: 26rpx;
+ color: #222222;
+ background-color: #F9F9F9;
+ padding: 20rpx 20rpx;
+}
+
+.upkeep_select .ipt {
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+ background-color: #fff;
+ width: 710rpx;
+ height: 80rpx;
+ background: #FFFFFF;
+ border-radius: 100rpx 100rpx 100rpx 100rpx;
+ padding-left: 26rpx;
+ padding-right: 26rpx;
+}
+
+.ipt input {
+ flex: 1;
+ height: 100%;
+}
+
+.ipt image {
+ width: 60rpx;
+ height: 60rpx;
+}
+
+
+page {
+ background-color: #f9f9f9;
+}
+
+.deviceItem {
+ background-color: #fff;
+ padding: 30rpx 20rpx;
+ margin-bottom: 20rpx;
+}
+
+.deviceItem_Tit {
+ font-family: HarmonyOS Sans SC, HarmonyOS Sans SC;
+ font-weight: bold;
+ font-size: 32rpx;
+ color: #222222;
+ margin-bottom: 30rpx;
+}
+
+.deviceItemCon {
+ display: flex;
+ align-items: center;
+}
+
+.deviceItemCon_tit {
+ font-weight: 400;
+ font-size: 28rpx;
+ color: #999999;
+ margin-right: 30rpx;
+}
+
+.deviceItemCon_con {
+ font-weight: 400;
+ font-size: 28rpx;
+ color: #222222;
+}
+
+.searchBox {
+ padding-left: 30rpx;
+ padding-right: 30rpx;
+ height: 70rpx;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+}
+
+.searchBox image {
+ width: 40rpx;
+ height: 40rpx;
+}
\ No newline at end of file
diff --git a/packages/partner/pages/chooseRepairDevice/chooseRepairDevice.js b/packages/partner/pages/chooseRepairDevice/chooseRepairDevice.js
new file mode 100644
index 0000000..005f37c
--- /dev/null
+++ b/packages/partner/pages/chooseRepairDevice/chooseRepairDevice.js
@@ -0,0 +1,149 @@
+let util = require('../../../../utils/util')
+let apiArr = require('../../../../api/partner')
+// packages/partner/pages/chooseDevice/chooseDevice.js
+Page({
+
+ /**
+ * 页面的初始数据
+ */
+ data: {
+ deviceCode: "",
+ deviceInfo: "",
+ deviceList: [],
+ flag: false,
+ page_num: 1,
+ page_size: 10,
+ },
+ scanQrcode() {
+ let that = this
+ wx.scanCode({
+ success: (res) => {
+ // 处理扫码结果
+ this.setData({
+ deviceCode: res.result
+ });
+ util.postUrl4(apiArr.getDeviceByCode, {
+ device_code: res.result,
+ install_id: that.data.id
+ }, res => {
+ that.setData({
+ deviceInfo: res
+ })
+ })
+
+ },
+ fail: (err) => {
+ wx.showToast({
+ title: '扫码失败',
+ icon: 'none'
+ });
+ }
+ });
+ },
+ getDeviceList() {
+ wx.showLoading({
+ title: '加载中',
+ mask: true
+ })
+ let that = this
+ let admin = wx.getStorageSync('admin')
+ let param = {
+ page_size: that.data.page_size,
+ page_num: that.data.page_num,
+ search: that.data.searchText,
+ dealer_id: admin.shop_id,
+ };
+
+
+ util.postUrl4(apiArr.deviceList, param, res => {
+ wx.hideLoading()
+ let flag = false
+ if (res.list && res.list.length == that.data.page_size) {
+ console.log(123);
+ flag = true
+ } else {
+ console.log(456);
+ flag = false
+ }
+ that.setData({
+ deviceList: that.data.deviceList.concat(res.list || []),
+ total: res.total,
+ flag,
+ page_num: that.data.page_num + 1
+ })
+ console.log(that.data.flag);
+ })
+ },
+ deviceDesc(e) {
+ console.log(e);
+ const pages = getCurrentPages();
+ const prevPage = pages[pages.length - 2]; // 获取上一页实例
+ // 传值给上一页
+ prevPage.setData({
+ deviceInfo: e.currentTarget.dataset.item // 可以是对象、数组等
+ });
+ // 调用上一页的方法
+ // prevPage.yourRefreshMethod(); // 你定义的刷新方法
+ // 返回上一页
+ wx.navigateBack();
+ },
+ /**
+ * 生命周期函数--监听页面加载
+ */
+ onLoad(options) {
+ this.getDeviceList()
+ },
+
+ /**
+ * 生命周期函数--监听页面初次渲染完成
+ */
+ onReady() {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面显示
+ */
+ onShow() {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面隐藏
+ */
+ onHide() {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面卸载
+ */
+ onUnload() {
+
+ },
+
+ /**
+ * 页面相关事件处理函数--监听用户下拉动作
+ */
+ onPullDownRefresh() {
+
+ },
+
+ /**
+ * 页面上拉触底事件的处理函数
+ */
+ onReachBottom() {
+ console.log(123);
+ let that = this
+ if(that.data.flag){
+ that.getDeviceList()
+ }
+ },
+
+ /**
+ * 用户点击右上角分享
+ */
+ onShareAppMessage() {
+
+ }
+})
\ No newline at end of file
diff --git a/packages/partner/pages/chooseRepairDevice/chooseRepairDevice.json b/packages/partner/pages/chooseRepairDevice/chooseRepairDevice.json
new file mode 100644
index 0000000..e2b4bb2
--- /dev/null
+++ b/packages/partner/pages/chooseRepairDevice/chooseRepairDevice.json
@@ -0,0 +1,4 @@
+{
+ "usingComponents": {},
+ "navigationBarTitleText": "选择设备"
+ }
\ No newline at end of file
diff --git a/packages/partner/pages/chooseRepairDevice/chooseRepairDevice.wxml b/packages/partner/pages/chooseRepairDevice/chooseRepairDevice.wxml
new file mode 100644
index 0000000..64ede82
--- /dev/null
+++ b/packages/partner/pages/chooseRepairDevice/chooseRepairDevice.wxml
@@ -0,0 +1,44 @@
+
+
+
+
+
+
+
+
+
+ 设备编码:{{item.device_code}}
+
+
+ 产品名称
+ {{item.product_name}}
+
+
+ 经销商
+ {{item.dealer_name}}
+
+
+ 经销商编码
+ {{item.dealer_code}}
+
+
+ 网络状态
+ {{item.network_status == '1'?'正常':'离线'}}
+
+
+
+ 安装状态
+ 已安装
+ 空闲
+ 已拆机
+
+
+
+ 设备地址
+ {{item.address}}
+
+
+
+
+
+
\ No newline at end of file
diff --git a/packages/partner/pages/chooseRepairDevice/chooseRepairDevice.wxss b/packages/partner/pages/chooseRepairDevice/chooseRepairDevice.wxss
new file mode 100644
index 0000000..98f2547
--- /dev/null
+++ b/packages/partner/pages/chooseRepairDevice/chooseRepairDevice.wxss
@@ -0,0 +1,68 @@
+.upkeep_select {
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+ font-weight: 400;
+ font-size: 26rpx;
+ color: #222222;
+ background-color: #F9F9F9;
+ padding: 20rpx 20rpx;
+}
+
+.upkeep_select .ipt {
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+ background-color: #fff;
+ width: 710rpx;
+ height: 60rpx;
+ background: #FFFFFF;
+ border-radius: 100rpx 100rpx 100rpx 100rpx;
+ padding-left: 26rpx;
+ padding-right: 26rpx;
+}
+
+.ipt input {
+ flex: 1;
+}
+
+.ipt image {
+ width: 50rpx;
+ height: 50rpx;
+}
+
+
+page{
+ background-color: #f9f9f9;
+}
+.deviceItem {
+ background-color: #fff;
+ padding: 30rpx 20rpx;
+ margin-bottom: 20rpx;
+}
+
+.deviceItem_Tit {
+ font-family: HarmonyOS Sans SC, HarmonyOS Sans SC;
+ font-weight: bold;
+ font-size: 32rpx;
+ color: #222222;
+ margin-bottom: 30rpx;
+}
+
+.deviceItemCon {
+ display: flex;
+ align-items: center;
+}
+
+.deviceItemCon_tit {
+ font-weight: 400;
+ font-size: 26rpx;
+ color: #999999;
+ margin-right: 30rpx;
+}
+
+.deviceItemCon_con {
+ font-weight: 400;
+ font-size: 26rpx;
+ color: #222222;
+}
\ No newline at end of file
diff --git a/packages/partner/pages/creatMaster/creatMaster.js b/packages/partner/pages/creatMaster/creatMaster.js
index c9bd77b..7e618be 100644
--- a/packages/partner/pages/creatMaster/creatMaster.js
+++ b/packages/partner/pages/creatMaster/creatMaster.js
@@ -169,7 +169,6 @@ Page({
AreaConfirm(e){
let that = this
- console.log(e);
let region
if(e.detail.values[0].name == e.detail.values[1].name){
region = e.detail.values[0].name + e.detail.values[2].name
diff --git a/packages/partner/pages/creatMaster/creatMaster.wxss b/packages/partner/pages/creatMaster/creatMaster.wxss
index 0dcefd2..e72828b 100644
--- a/packages/partner/pages/creatMaster/creatMaster.wxss
+++ b/packages/partner/pages/creatMaster/creatMaster.wxss
@@ -44,6 +44,7 @@
font-weight: 400;
font-size: 28rpx;
color: #222222;
+ white-space: nowrap;
}
.masterItem_msg_tit view {
diff --git a/packages/partner/pages/device/device.js b/packages/partner/pages/device/device.js
new file mode 100644
index 0000000..fa95d69
--- /dev/null
+++ b/packages/partner/pages/device/device.js
@@ -0,0 +1,302 @@
+let util = require('../../../../utils/util')
+const apiArr = require('../../../../api/water_filter')
+const apiArr2 = require('../../../../api/partner')
+const app = getApp({ allowDefault: true })
+
+// packages/WaterPurifier/pages/device/deviceList/deviceList.js
+Page({
+
+ /**
+ * 页面的初始数据
+ */
+ data: {
+ s: app.system.statusBarHeight, // 状态栏高度
+ n: (app.menu.top - app.system.statusBarHeight) * 2 + app.menu.height, // 导航栏高度
+ t: app.menu.top, // 胶囊局顶部距离
+ h: app.menu.height, // 胶囊高度
+
+ option1: [
+ { text: '全部', value: 0 },
+ { text: '已安装', value: 1 },
+ { text: '空闲', value: 2 },
+ { text: '已拆机', value: 3 },
+ ],
+ option2: [
+ { text: '全部', value: 0 },
+ { text: '在用', value: 1 },
+ { text: '待启用', value: 2 },
+ { text: '关机', value: 3 },
+ { text: '已拆机', value: 4 },
+ { text: '漏水', value: 5 },
+ { text: '制水故障', value: 6 },
+ { text: '报废', value: 7 },
+ { text: '已欠费', value: 8 },
+ { text: '在库', value: 9 },
+ { text: '激活失败', value: 10 },
+ ],
+ stateType: {
+ 1: '在用',
+ 2: '待启用',
+ 3: '关机',
+ 4: '已拆机',
+ 5: '漏水',
+ 6: '制水故障',
+ 7: '报废',
+ 8: '已欠费',
+ 9: '在库',
+ 10: '激活失败'
+ },
+ value1: 0,
+ value2: 0,
+ nav_list: {},
+ foot_width: "",
+
+ searchText: "",//搜索文字
+ page_num: 1,
+ page_size: 10,
+ flag: false,
+ total: '',
+ deviceList: [],
+ dropdownOpen: false,
+ text1:'安装状态:全部',
+ text2:"设备状态:全部"
+
+ },
+ back(){
+ wx.reLaunch({
+ url: '/packages/partner/pages/mine/mine',
+ })
+ },
+ onDropdownOpen() {
+ console.log(123);
+ this.setData({ dropdownOpen: true });
+ },
+ onDropdownClose() {
+ this.setData({ dropdownOpen: false });
+ },
+ ipt1(e) {
+ let that = this
+ that.setData({
+ searchText: e.detail.value,
+ })
+ },
+
+ deviceDesc(e) {
+ wx.navigateTo({
+ url: `../deviceDesc/deviceDesc?device_id=${e.currentTarget.dataset.device_id}`,
+ })
+ },
+ addWorkOrders() {
+ console.log(123123);
+ wx.navigateTo({
+ url: '/packages/partner/pages/newWorkOrder/newWorkOrder',
+ })
+ },
+ //安装状态
+ headerNetWorkClick(e) {
+ let that = this
+ let text1 = ''
+ if(e.detail == 0){
+ text1 = '安装状态:全部'
+ }else if(e.detail == 1){
+ text1 = '安装状态:已安装'
+ }else if(e.detail == 2){
+ text1 = '安装状态:空闲'
+ }else if(e.detail == 3){
+ text1 = '安装状态:已拆机'
+ }
+
+ this.setData({
+ value1: e.detail,
+ page_num: 1,
+ deviceList: [],
+ text1
+ });
+ if (e.detail == 0) {
+ this.getDeviceList(0,that.data.value2);
+ return;
+ }
+ this.getDeviceList(e.detail, that.data.value2);
+ },
+
+ // 设备状态
+ headerEquipmentClick(e) {
+ let that = this
+ let text2 = ''
+ if(e.detail == 0){
+ text2 = '设备状态:全部'
+ }else if(e.detail == 1){
+ text2 = '设备状态:在用'
+ }else if(e.detail == 2){
+ text2 = '设备状态:待启用'
+ }else if(e.detail == 3){
+ text2 = '设备状态:关机'
+ }else if(e.detail == 4){
+ text2 = '设备状态:已拆机'
+ }else if(e.detail == 5){
+ text2 = '设备状态:漏水'
+ }else if(e.detail == 6){
+ text2 = '设备状态:制水故障'
+ }else if(e.detail == 7){
+ text2 = '设备状态:报废'
+ }else if(e.detail == 8){
+ text2 = '设备状态:已欠费'
+ }else if(e.detail == 9){
+ text2 = '设备状态:在库'
+ }else if(e.detail == 10){
+ text2 = '设备状态:激活失败'
+ }
+ this.setData({
+ value2: e.detail,
+ page_num: 1,
+ deviceList: [],
+ text2
+ });
+ if (e.detail == 0) {
+ this.getDeviceList(that.data.value1,0);
+ return;
+ }
+ this.getDeviceList(that.data.value1, e.detail);
+ },
+
+ search2() {
+ let that = this
+ that.setData({
+ deviceList: [],
+ flag: false,
+ page_num: 1
+ })
+ that.getDeviceList('', '')
+ },
+ getDeviceList(networkStatus, status) {
+ wx.showLoading({
+ title: '加载中',
+ mask: true
+ })
+ let that = this
+ let admin = wx.getStorageSync('admin')
+ let param = {
+ page_size: that.data.page_size,
+ page_num: that.data.page_num,
+ search: that.data.searchText,
+ dealer_id: admin.shop_id
+ };
+ // if (networkStatus) {
+ // param = {
+ // ...param,
+ // install_status: networkStatus
+ // }
+ // }
+ // if (status) {
+ // }
+ param = {
+ ...param,
+ status: Number(status),
+ install_status: networkStatus
+ }
+
+ util.postUrl4(apiArr2.deviceList, param, res => {
+ wx.hideLoading()
+ let flag = false
+ if (res.list && res.list.length == that.data.page_size) {
+ console.log(123);
+ flag = true
+ } else {
+ console.log(456);
+ flag = false
+ }
+ that.setData({
+ deviceList: that.data.deviceList.concat(res.list || []),
+ total: res.total,
+ flag,
+ page_num: that.data.page_num + 1
+ })
+ console.log(that.data.flag);
+ })
+ },
+
+ /**
+ * 生命周期函数--监听页面加载
+ */
+ onLoad(options) {
+ this.getDeviceList();
+ wx.showShareMenu({
+ withShareTicket: true,
+ menus: ['shareAppMessage', 'shareTimeline']
+ })
+ },
+
+ /**
+ * 生命周期函数--监听页面初次渲染完成
+ */
+ onReady() {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面显示
+ */
+ onShow() {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面隐藏
+ */
+ onHide() {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面卸载
+ */
+ onUnload() {
+
+ },
+
+ /**
+ * 页面相关事件处理函数--监听用户下拉动作
+ */
+ onPullDownRefresh() {
+ let that = this
+ that.setData({
+ flag: false,
+ page_num: 1,
+ total: 0,
+ searchText: "",
+ value1: "",
+ value2: "",
+ deviceList: []
+ })
+ that.getDeviceList();
+ wx.stopPullDownRefresh();
+ },
+
+ /**
+ * 页面上拉触底事件的处理函数
+ */
+ onReachBottom() {
+ let that = this
+ if (that.data.flag) {
+ that.getDeviceList('', that.data.value2)
+ }
+ },
+
+ /**
+ * 用户点击右上角分享
+ */
+ onShareAppMessage() {
+ return {
+ title: '人人爱净水', // 分享卡片标题(必填)
+ path: '/pages/water_filter/water_filter', // 用户点击后跳转的路径(可选,默认当前页)
+ imageUrl: 'https://wechat-img-file.oss-cn-beijing.aliyuncs.com/share.png' // 自定义图片(可选,比例建议 5:4)
+ }
+ },
+ onShareTimeline() {
+ return {
+ title: '人人爱净水', // 自定义标题
+ query: '', // 自定义页面路径中的参数
+ imageUrl: 'https://wechat-img-file.oss-cn-beijing.aliyuncs.com/share.png' // 自定义分享图片路径
+ }
+ },
+})
\ No newline at end of file
diff --git a/packages/partner/pages/device/device.json b/packages/partner/pages/device/device.json
new file mode 100644
index 0000000..c012f80
--- /dev/null
+++ b/packages/partner/pages/device/device.json
@@ -0,0 +1,6 @@
+{
+ "usingComponents": {},
+ "enablePullDownRefresh": true,
+ "navigationBarTitleText": "设备管理",
+ "navigationStyle": "custom"
+}
\ No newline at end of file
diff --git a/packages/partner/pages/device/device.wxml b/packages/partner/pages/device/device.wxml
new file mode 100644
index 0000000..1ee1949
--- /dev/null
+++ b/packages/partner/pages/device/device.wxml
@@ -0,0 +1,84 @@
+
+
+
+
+
+
+
+ 工单详情
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 设备总数:{{total}}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 设备编码:{{item.device_code}}
+
+ 客户姓名
+ {{item.customer_info.name}}
+
+
+ 客户手机
+ {{item.customer_info.phone}}
+
+
+ 网络状态
+ {{item.network_status == '1'?'正常':'离线'}}
+
+
+ 设备状态
+ {{stateType[item.status]}}
+
+
+ 安装状态
+ 已安装
+ 空闲
+ 已拆机
+
+
+
+ 设备地址
+ {{item.region}}{{item.address}}
+
+
+
+
+
+
+
+
+
+
+新增
+
+
+
+
+
\ No newline at end of file
diff --git a/packages/partner/pages/device/device.wxss b/packages/partner/pages/device/device.wxss
new file mode 100644
index 0000000..88c0c68
--- /dev/null
+++ b/packages/partner/pages/device/device.wxss
@@ -0,0 +1,152 @@
+.nav-box {
+ padding-bottom: 30rpx;
+}
+
+.nav-bar-right {
+ opacity: 0;
+}
+
+.deviceList {
+ background-color: #F9F9F9;
+ padding-bottom: 120rpx;
+ min-height: 95vh;
+}
+
+.white {
+ background-color: #fff;
+}
+
+.fixed-page {
+ position: fixed;
+ width: 100%;
+ height: 100%;
+ overflow: hidden;
+}
+
+.deviceImg {
+ width: 157rpx;
+ height: 157rpx;
+ margin: 0 auto;
+ margin-top: 52rpx;
+}
+
+.deviceImg image {
+ width: 100% !important;
+ height: 100% !important;
+}
+
+.deviceText {
+ font-family: HarmonyOS Sans SC, HarmonyOS Sans SC;
+ font-weight: 400;
+ font-size: 32rpx;
+ color: #222222;
+ text-align: center;
+ margin-top: 3rpx;
+}
+
+.deviceIpt {
+ width: 710rpx;
+ height: 98rpx;
+ background: #F9F9F9;
+ border-radius: 100rpx 100rpx 100rpx 100rpx;
+ margin: 0 auto;
+ margin-top: 20rpx;
+ box-sizing: border-box;
+ padding-left: 26rpx;
+ padding-right: 26rpx;
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+}
+
+.deviceIpt input {
+ height: 100%;
+ flex: 1;
+}
+
+.deviceIpt image {
+ width: 42rpx;
+ height: 42rpx;
+}
+
+.dropBox .van-dropdown-menu {
+ box-shadow: none !important;
+}
+
+.dropBox .van-ellipsis {
+ font-size: 26rpx !important;
+ color: #999999 !important;
+}
+
+.deviceItem {
+ background-color: #fff;
+ padding: 30rpx 20rpx;
+ margin-bottom: 20rpx;
+}
+
+.deviceItem_Tit {
+ font-family: HarmonyOS Sans SC, HarmonyOS Sans SC;
+ font-weight: bold;
+ font-size: 32rpx;
+ color: #222222;
+ margin-bottom: 30rpx;
+}
+
+.deviceItemCon {
+ display: flex;
+ align-items: center;
+}
+
+.deviceItemCon_tit {
+ font-weight: 400;
+ font-size: 28rpx;
+ color: #999999;
+ margin-right: 30rpx;
+}
+
+.deviceItemCon_con {
+ font-weight: 400;
+ font-size: 28rpx;
+ color: #222222;
+}
+
+.searchBox {
+ padding-left: 30rpx;
+ height: 54rpx;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+}
+
+
+
+.addBtn {
+ font-weight: 400;
+ font-size: 30rpx;
+ color: #FFFFFF;
+ width: 100rpx;
+ height: 100rpx;
+ background: #2583FF;
+ position: fixed;
+ right: 55rpx;
+ bottom: 200rpx;
+ border-radius: 50%;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+}
+
+.addBtn::after {
+ content: '';
+ background: rgba(77, 154, 255, .5);
+ filter: blur(10.899999618530273rpx);
+ width: 90rpx;
+ height: 90rpx;
+ position: absolute;
+ left: 50%;
+ top: 50%;
+ transform: translate(-50%, -50%);
+ border-radius: 50%;
+ overflow: hidden;
+ z-index: -1;
+}
\ No newline at end of file
diff --git a/packages/partner/pages/deviceDesc/deviceDesc.js b/packages/partner/pages/deviceDesc/deviceDesc.js
new file mode 100644
index 0000000..9ae9206
--- /dev/null
+++ b/packages/partner/pages/deviceDesc/deviceDesc.js
@@ -0,0 +1,798 @@
+
+let util = require('../../../../utils/util')
+const apiArr = require('../../../../api/water_filter')
+const apiArr2 = require('../../../../api/partner')
+
+
+// packages/master/deviceInfo/index.js
+Page({
+
+ /**
+ * 页面的初始数据
+ */
+ data: {
+ id: "",
+ currentDevice: "",
+ imagePath: "",
+ ec: {
+ onInit: initChart
+ },
+
+ appointment_time: "",
+ show: false,
+ show2: false,
+ show3: false,
+ show4: false,
+ show5: false,
+ show6: false,
+ remarks1: "", //拆机备注
+ remainingDays: "",//到期日期
+ surplusFlow: "",//剩余流量
+ remaining_days: "",//转时长
+ surplus_flow: "",//转流量
+ minDate: new Date().getTime(),
+ formatter(type, value) {
+ if (type === 'year') {
+ return `${value}年`;
+ }
+ if (type === 'month') {
+ return `${value}月`;
+ }
+ if (type === 'day') {
+ return `${value}日`;
+ }
+ return value;
+ },
+ UninstallDateShow:false,
+ uninstall_time:"",
+ },
+ onInput(event) {
+ let that = this
+ const date = new Date(event.detail); // 获取选中的 Date 对象
+ const year = date.getFullYear(); // 获取年份
+ const month = String(date.getMonth() + 1).padStart(2, '0'); // 月份从0开始,所以需要+1
+ const day = String(date.getDate()).padStart(2, '0');
+ const hours = String(date.getHours()).padStart(2, '0'); // 小时补零
+ const minutes = String(date.getMinutes()).padStart(2, '0'); // 分钟补零
+ const time = `${year}-${month}-${day} ${hours}:${minutes}`;
+ that.setData({
+ appointment_time: time,
+ show: false
+ })
+
+ that.cancelActivation()
+ },
+ onClose() {
+ let that = this
+ that.setData({
+ show: false
+ })
+ },
+ formatPercentage(value) {
+ return Math.max(0, Number((value || 0).toFixed(0)));
+ },
+ getInfo() {
+ let that = this
+ console.log(that, 'ssss');
+ util.postUrl4(apiArr.deviceDesc, {
+ device_id: that.data.id
+ }, res => {
+ res.remainDay = Math.max(0, that.getDaysBetweenDates2(res.expiration_duration)) //剩余天数
+ if (res.expiration_duration) {
+ res.difDay = Math.max(0, that.getDaysBetweenDates(res.install_time)) //服务天数,确保不小于0
+ } else {
+ const installDate = new Date(res.install_time)
+ const expireDate = new Date(res.expiration_duration)
+ res.difDay = Math.max(0, Math.floor((expireDate - installDate) / (1000 * 60 * 60 * 24))) //确保不小于0
+ }
+
+ if (res.parts) {
+ res.parts.forEach(item => {
+ item.difDay = that.getDaysBetweenDates(item.start_time)
+ const remainingDays = Math.max(0, (item.available_days || 0) - (item.difDay || 0));
+
+ item.percentageDay = that.formatPercentage(
+ (remainingDays / (item.available_days || 1)) * 100
+ );
+ item.percentageCapacity = that.formatPercentage(
+ (1 - (item.threshold_volume || 0) / (item.available_volume || 1)) * 100
+ );
+ })
+ }
+ res.today = Number(res.today).toFixed(2)
+ res.yesterday = Number(res.yesterday).toFixed(2)
+
+ that.setData({
+ currentDevice: res
+ })
+ let Xarr = [];
+ let Yarr = [];
+ res.device_net.forEach(item => {
+ Xarr.push(item.create_time.slice(11, 16))
+ Yarr.push((item.cumulative_filtration_flow).toFixed(1))
+ })
+ that.updateChart({
+ xAxis: Xarr,
+ series: Yarr
+ })
+ that.getDeriveInfo()
+ setTimeout(() => {
+ const ecComponent = that.selectComponent("#mychart-dom-bar")
+ // 将 canvas 内容转换为临时图片文件
+ ecComponent.canvasToTempFilePath({
+ // canvasId: 'mychart-dom-bar',
+ success: (result) => {
+ that.base64({
+ url: result.tempFilePath,
+ type: 'png',
+ }).then((res) => {
+ that.setData({
+ imagePath: res
+ })
+ })
+ },
+ fail: (err) => {
+ console.error('转换失败:', err);
+ }
+ });
+ }, 2000)
+
+ })
+ },
+ replay(e) {
+ wx.showLoading({
+ title: '重置中...',
+ })
+ util.postUrl4(apiArr.resetFilter, {
+ part_id: e.currentTarget.dataset.item.id,
+ device_id: e.currentTarget.dataset.item.device_id,
+ }, res => {
+ wx.hideLoading()
+ console.log(res);
+ if (res.msg == '操作成功') {
+ wx.showToast({
+ title: '重置成功!',
+ icon: "none"
+ })
+ that.getfilterList()
+ } else {
+ wx.showToast({
+ title: res.msg,
+ icon: "none"
+ })
+ }
+ })
+ },
+
+
+ //查询设备实时信息
+ getDeriveInfo() {
+ let that = this
+ util.postUrl4(apiArr.boardInfo, {
+ device_id: that.data.currentDevice.device_id
+ }, res => {
+ console.log(res);
+ })
+ },
+ ///////////////////////////////////////////////新增/////////////////////////////////////////////////////////////////////////
+ onClose2() {
+ this.setData({
+ show2: false,
+ show3: false,
+ show4: false,
+ show5: false,
+ show6: false,
+ })
+ },
+ // 拆机
+ uninstall() {
+ let that = this
+ wx.showModal({
+ title: '提示',
+ content: '请确保设备通电开机状态,该操作将取消设备激活状态',
+ complete: (res) => {
+ if (res.cancel) {
+
+ }
+
+ if (res.confirm) {
+ that.setData({
+ show2: true
+ })
+ }
+ }
+ })
+ },
+ remarksIpt1(e) {
+ console.log(e);
+ let that = this
+ that.setData({
+ remarks1: e.detail.value
+ })
+ },
+ createUninstall() {
+ wx.showLoading({
+ title: '加载中...',
+ mask: true
+ })
+ let that = this
+ util.postUrl4(apiArr.UninstallOrder, {
+ device_id: that.data.currentDevice.device_id,
+ remark: that.data.remarks1,
+ appointment_time:that.data.uninstall_time + ":00"
+ }, res => {
+ wx.hideLoading()
+ wx.showToast({
+ title: '拆机工单创建完成',
+ icon: "none"
+ })
+
+ setTimeout(() => {
+ wx.navigateTo({
+ url: '/packages/partner/pages/removeOrder/removeOrder',
+ })
+ }, 1500)
+ })
+ },
+ changeUninstallDate(){
+ let that = this
+ that.setData({
+ UninstallDateShow:true
+ })
+ },
+ closeUninstallDate(){
+ let that = this
+ that.setData({
+ UninstallDateShow:false
+ })
+ },
+ onInput2(event){
+ let that = this
+ const date = new Date(event.detail); // 获取选中的 Date 对象
+ const year = date.getFullYear(); // 获取年份
+ const month = String(date.getMonth() + 1).padStart(2, '0'); // 月份从0开始,所以需要+1
+ const day = String(date.getDate()).padStart(2, '0');
+ const hours = String(date.getHours()).padStart(2, '0'); // 小时补零
+ const minutes = String(date.getMinutes()).padStart(2, '0'); // 分钟补零
+ const time = `${year}-${month}-${day} ${hours}:${minutes}`;
+ that.setData({
+ uninstall_time:time,
+ UninstallDateShow:false
+ })
+ },
+ // 激活
+ active() {
+ wx.showLoading({
+ title: '加载中...',
+ mask: true
+ })
+ let that = this
+ util.postUrl4(apiArr.deviceActive, {
+ device_id: that.data.currentDevice.device_id
+ }, res => {
+ console.log(res);
+ wx.showToast({
+ title: res.msg,
+ icon: "none"
+ })
+ that.getInfo()
+ wx.hideLoading()
+
+ return
+ if (res.statusCode == 200) {
+ wx.showToast({
+ title: '激活成功',
+ icon: "none"
+ })
+ that.getInfo()
+
+ } else {
+ wx.showToast({
+ title: res.data.msg,
+ icon: "none"
+ })
+ }
+ wx.hideLoading()
+ })
+ },
+
+
+ isPureNumber(value) {
+ return /^\d+(\.\d+)?$/.test(value);
+ },
+ //时长充值
+ recharge1() {
+ let that = this
+ that.setData({
+ show4: true
+ })
+ },
+ deviceDeactivation() {
+ let that = this
+ if (!that.isPureNumber(that.data.remainingDays)) {
+ return wx.showToast({
+ title: '请输入正确到期日期',
+ icon: "none"
+ })
+ }
+ wx.showModal({
+ title: '提示',
+ content: '确定要充值时长吗?请在设备通电开机的状态下进行操作',
+ complete: (res) => {
+ if (res.cancel) {
+
+ }
+
+ if (res.confirm) {
+ wx.showLoading({
+ title: '加载中...',
+ mask: true
+ })
+ util.postUrl4(apiArr.deviceDeactivation, {
+ device_id: that.data.currentDevice.device_id,
+ remainingDays: that.data.remainingDays
+ }, res => {
+ wx.hideLoading()
+ if (res.data.code == 200) {
+ wx.showToast({
+ title: '充值成功',
+ icon: "none"
+ })
+ that.getInfo()
+ } else {
+ wx.showToast({
+ title: res.data.msg,
+ icon: "none"
+ })
+ }
+ that.setData({
+ show4: false,
+ remainingDays: ""
+ })
+ })
+ }
+ }
+ })
+ },
+ changeRemainingDay(e) {
+ console.log(e);
+ let that = this
+ that.setData({
+ remainingDays: e.detail.value
+ })
+ },
+ //流量充值
+ recharge2() {
+ let that = this
+ that.setData({
+ show3: true
+ })
+ },
+ changeSurplusFlow(e) {
+ let that = this
+ that.setData({
+ surplusFlow: e.detail.value
+ })
+ },
+ deviceDataForce() {
+ let that = this
+ if (!that.isPureNumber(that.data.surplusFlow)) {
+ return wx.showToast({
+ title: '请输入正确数额',
+ icon: "none"
+ })
+ }
+ wx.showModal({
+ title: '提示',
+ content: '确定要充值流量吗?请在设备通电开机的状态下进行操作',
+ complete: (res) => {
+ if (res.cancel) {
+
+ }
+
+ if (res.confirm) {
+ util.postUrl4(apiArr.deviceDataForce, {
+ device_id: that.data.currentDevice.device_id,
+ surplusFlow: that.data.surplusFlow
+ }, res => {
+ if (res.data.code == 200) {
+ wx.showToast({
+ title: '充值成功',
+ icon: "none"
+ })
+ that.getInfo()
+ } else {
+ wx.showToast({
+ title: res.data.msg,
+ icon: "none"
+ })
+ }
+ that.setData({
+ show3: false,
+ surplusFlow: ""
+ })
+ })
+ }
+ }
+ })
+ },
+ //转时长
+ timeSet() {
+ let that = this
+ that.setData({
+ show5: true
+ })
+ },
+ changeRemainingDay2(e) {
+ console.log(e);
+ let that = this
+ that.setData({
+ remaining_days: e.detail.value
+ })
+ },
+ modeToTime() {
+ let that = this
+ if (!that.data.remaining_days) {
+ return wx.showToast({
+ title: '请输入到期日期',
+ })
+ }
+ wx.showModal({
+ title: '提示',
+ content: '确定要将设备转时长吗?请在设备通电开机的状态下进行操作',
+ complete: (res) => {
+ if (res.cancel) {
+ }
+ if (res.confirm) {
+ util.postUrl4(apiArr.deviceToTime, {
+ device_id: that.data.currentDevice.device_id,
+ remaining_days: that.data.remaining_days
+ }, res => {
+ if (res.data.code == 200) {
+ wx.showToast({
+ title: '充值成功',
+ icon: "none"
+ })
+ that.getInfo()
+ } else {
+ wx.showToast({
+ title: res.data.msg,
+ icon: "none"
+ })
+ }
+ that.setData({
+ show5: false,
+ remaining_days: ""
+ })
+ })
+ }
+ }
+ })
+ },
+ // 转流量
+ timeSet2() {
+ let that = this
+ that.setData({
+ show6: true
+ })
+ },
+ changeRemainingDay3(e) {
+ console.log(e);
+ let that = this
+ that.setData({
+ surplus_flow: e.detail.value
+ })
+ },
+ modeToFlowRate() {
+ let that = this
+ if (!that.data.surplus_flow) {
+ return wx.showToast({
+ title: '请输入数额',
+ })
+ }
+ wx.showModal({
+ title: '提示',
+ content: '确定要设备转流量吗?请在设备通电开机的状态下进行操作',
+ complete: (res) => {
+ if (res.cancel) {
+ }
+ if (res.confirm) {
+ util.postUrl4(apiArr.deviceToTraffic, {
+ device_id: that.data.currentDevice.device_id,
+ surplus_flow: that.data.surplus_flow
+ }, res => {
+ if (res.data.code == 200) {
+ wx.showToast({
+ title: '充值成功',
+ icon: "none"
+ })
+ that.getInfo()
+ } else {
+ wx.showToast({
+ title: res.data.msg,
+ icon: "none"
+ })
+ }
+ that.setData({
+ show6: false,
+ surplus_flow: ""
+ })
+ })
+ }
+ }
+ })
+
+
+ },
+ // 转零售
+ retailSet() {
+ let that = this
+ wx.showModal({
+ title: '提示',
+ content: '是否确认设置为零售模式?此操作请在设备通电开机的状态下进行操作',
+ complete: (res) => {
+ if (res.cancel) {
+
+ }
+
+ if (res.confirm) {
+ util.postUrl4(apiArr.deviceToRetail, {
+ device_id: that.data.currentDevice.device_id
+ }, res => {
+ if (res.data.code == 200) {
+ wx.showToast({
+ title: '设置成功',
+ icon: "none"
+ })
+ that.getInfo()
+ } else {
+ wx.showToast({
+ title: res.data.msg,
+ icon: "none"
+ })
+ }
+ })
+ }
+ }
+ })
+ },
+
+ ///////////////////////////////////////////////新增/////////////////////////////////////////////////////////////////////////
+ //开关机
+ openOff() {
+ let that = this
+ let onOff = ''
+
+ if (that.data.currentDevice.sevice_status == 1) {
+ onOff = 2
+ } else if (that.data.currentDevice.sevice_status == 2) {
+ onOff = 1
+ }
+
+ wx.showLoading({
+ title: '操作中...',
+ mask: true
+ })
+
+ util.postUrl4(apiArr.openOff, {
+ deviceId: that.data.currentDevice.device_id,
+ onOff
+ }, res => {
+ wx.hideLoading()
+ if (res.msg == '操作成功') {
+ if (res.data.params.sevice_status.value == '00') {
+ wx.showToast({
+ title: '关机成功!',
+ icon: "none"
+ })
+ that.setData({
+ "currentDevice.sevice_status": 2
+ })
+ console.log('关机');
+ } else if (res.data.params.sevice_status.value == '10') {
+ wx.showToast({
+ title: '开机成功!',
+ icon: "none"
+ })
+ that.setData({
+ "currentDevice.sevice_status": 1
+ })
+ console.log('开机');
+ }
+ }
+ })
+ },
+
+ updateChart(data) {
+ const ecComponent = this.selectComponent("#mychart-dom-bar");
+ if (!ecComponent) return;
+
+ this.setData({
+ chartData: data
+ });
+
+ ecComponent.init((canvas, width, height, dpr) => {
+ const chart = initChart(canvas, width, height, dpr);
+ chart.setOption({
+ grid: {
+ left: '3%', // 左边距
+ right: '4%', // 右边距
+ bottom: '3%', // 底部边距
+ containLabel: true // 确保标签包含在内
+ },
+ xAxis: {
+ data: data.xAxis
+ },
+ series: [{
+ data: data.series,
+ label: { // 添加这个label配置
+ show: true, // 开启显示
+ position: 'top', // 位置在柱子上方
+ color: '#333', // 文字颜色
+ // fontSize: 8 // 文字大小
+ }
+ }]
+ });
+ return chart;
+ });
+ },
+
+ base64({ url, type }) {
+ return new Promise((resolve, reject) => {
+ wx.getFileSystemManager().readFile({
+ filePath: url, //选择图片返回的相对路径
+ encoding: 'base64', //编码格式
+ success: res => {
+ resolve('data:image/' + type.toLocaleLowerCase() + ';base64,' + res.data)
+ },
+ fail: res => reject(res.errMsg)
+ })
+ })
+ },
+ convertCanvasToImage() {
+ wx.canvasToTempFilePath({
+ canvasId: 'myChart',
+ success: (res) => {
+ console.log(res.tempFilePath);
+ this.setData({
+ imagePath: res.tempFilePath
+ });
+ },
+ fail: (err) => {
+ console.error('Canvas to image failed:', err);
+ }
+ });
+ },
+ getDaysBetweenDates(inputDate) {
+ const currentDate = new Date();
+ // 将传入的日期字符串转换为日期对象
+ const targetDate = new Date(inputDate);
+ // 计算两个日期之间的时间差(以毫秒为单位)
+ const timeDifference = currentDate - targetDate;
+ // 将时间差转换为天数
+ const daysDifference = Math.floor(timeDifference / (1000 * 60 * 60 * 24));
+ // 返回天数
+ return daysDifference;
+ },
+ getDaysBetweenDates2(targetDate) {
+ // 获取当前日期(不含时间)
+ const today = new Date();
+ today.setHours(0, 0, 0, 0); // 时间归零,避免时间差影响
+ // 解析目标日期(格式:YYYY-MM-DD)
+ const target = new Date(targetDate);
+ target.setHours(0, 0, 0, 0);
+ // 计算毫秒差并转换为天数
+ const timeDiff = target - today;
+ const daysRemaining = Math.ceil(timeDiff / (1000 * 60 * 60 * 24));
+ return daysRemaining;
+ },
+
+ /**
+ * 生命周期函数--监听页面加载
+ */
+ onLoad(options) {
+ let that = this
+ that.setData({
+ id: options.device_id
+ })
+ that.getInfo()
+ },
+
+ /**
+ * 生命周期函数--监听页面初次渲染完成
+ */
+ onReady() {
+ let that = this
+ setTimeout(() => {
+ this.convertCanvasToImage()
+ }, 5000)
+ },
+
+ /**
+ * 生命周期函数--监听页面显示
+ */
+ onShow() {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面隐藏
+ */
+ onHide() {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面卸载
+ */
+ onUnload() {
+
+ },
+
+ /**
+ * 页面相关事件处理函数--监听用户下拉动作
+ */
+ onPullDownRefresh() {
+
+ },
+
+ /**
+ * 页面上拉触底事件的处理函数
+ */
+ onReachBottom() {
+
+ },
+
+ /**
+ * 用户点击右上角分享
+ */
+ onShareAppMessage() {
+
+ }
+})
+
+function initChart(canvas, width, height, dpr) {
+ const chart = echarts.init(canvas, null, {
+ width: width,
+ height: height,
+ devicePixelRatio: dpr // 将此选项设置为 2,可以在高分辨率屏幕上绘制更清晰的图表
+ });
+ canvas.setChart(chart);
+ const option = {
+ xAxis: {
+ type: 'category',
+ // data: ['16:41', '22:41', '04:41', '10:41', '16:41'],
+ data: []
+ },
+ yAxis: {
+ type: 'value',
+ // data: ['0ml', '560ml']
+ min: 0,
+ axisLabel: {
+ formatter: '{value}ml'
+ }
+ },
+ series: [{
+ // data: [150, 230, 224, 218, 135, 147, 345],
+ data: [],
+ type: 'bar',
+ barWidth: 15,
+ itemStyle: { //柱状颜色和圆角
+ color: {
+ x: 0,
+ y: 1,
+ colorStops: [{
+ offset: 0,
+ color: '#FFBBAC',
+ }, {
+ offset: 1,
+ color: '#338BFF'
+ }]
+ },
+ barBorderRadius: [5, 5, 0, 0], // (顺时针左上,右上,右下,左下)
+ },
+ }]
+ };
+ chart.setOption(option);
+ return chart;
+}
\ No newline at end of file
diff --git a/packages/partner/pages/deviceDesc/deviceDesc.json b/packages/partner/pages/deviceDesc/deviceDesc.json
new file mode 100644
index 0000000..f0d8f8f
--- /dev/null
+++ b/packages/partner/pages/deviceDesc/deviceDesc.json
@@ -0,0 +1,6 @@
+{
+ "usingComponents": {
+ "ec-canvas": "/component/ec-canvas/ec-canvas"
+ },
+ "navigationBarTitleText": "设备详情"
+ }
\ No newline at end of file
diff --git a/packages/partner/pages/deviceDesc/deviceDesc.wxml b/packages/partner/pages/deviceDesc/deviceDesc.wxml
new file mode 100644
index 0000000..3f1a581
--- /dev/null
+++ b/packages/partner/pages/deviceDesc/deviceDesc.wxml
@@ -0,0 +1,298 @@
+
+
+
+
+
+
+
+
+ {{currentDevice.region + currentDevice.address}}
+
+
+
+
+
+
+
+ 净化前
+ 水质TDS值
+ {{currentDevice.raw_water_value}}
+ PPM
+
+
+
+
+
+
+ 净化后
+ 水质TDS值
+ {{currentDevice.purification_water_value}}
+ PPM
+
+
+
+
+
+
+ 净化前水质:极好
+ 净化前水质:良好
+ 净化前水质:正常
+ 净化前水质:较差
+ 净化前水质:极差
+
+
+ 净化后水质:极好
+ 净化后水质:良好
+ 净化后水质:正常
+ 净化后水质:较差
+ 净化后水质:极差
+
+
+
+
+
+
+
+
+
+ 我的设备
+
+ {{currentDevice.product_name}}
+
+
+
+
+ 开机
+ 关机
+ 制水故障
+ 漏水故障
+ 主板故障
+
+
+
+
+ {{currentDevice.network_status == '1'?'在线':'离线'}}
+
+
+
+
+
+ 编号:{{currentDevice.device_code}}
+
+
+ 已服务{{currentDevice.difDay}}天
+
+
+
+ 已服务0天
+
+
+
+
+
+ 剩余天数
+ {{ currentDevice.remainDay}}
+ 天
+
+
+
+ 已欠费
+
+
+
+
+
+ 剩余天数
+ 0
+ 天
+
+
+
+
+
+
+
+
+
+ 滤芯寿命
+ 滤芯寿命用水量和使用时间来综合计算
+
+
+
+
+
+ {{item.parts_name}}
+
+
+
+
+
+ {{item.percentageDay}}%
+
+
+
+ {{item.percentageCapacity}}%
+
+
+
+
+ {{item.percentageDay}}%
+
+
+
+
+ 重置
+
+
+
+
+
+
+
+
+
+ 用水量
+
+
+
+
+ 累计用水量
+ {{currentDevice.cumulative_filtration_flow}}L
+
+
+ 今日用水量
+ {{currentDevice.today}}L
+
+
+ 昨日用水量
+ {{currentDevice.yesterday}}L
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 拆机
+
+
+
+ 激活
+
+
+
+ 流量充值
+
+
+
+ 时长充值
+
+
+
+
+ 转时长
+
+
+
+
+ 转流量
+
+
+
+ 转零售
+
+
+
+
+
+
+
+
+
+ 取消
+ 确定
+
+
+ 预约时间:
+
+
+
+ 备注:
+
+
+
+
+
+
+
+
+
+
+ 取消
+ 确定
+
+
+ 充值天数:
+
+
+
+
+
+
+
+
+ 取消
+ 确定
+
+
+ 设置数额:
+
+
+
+
+
+
+
+
+
+
+ 取消
+ 确定
+
+
+ 充值天数:
+
+
+
+
+
+
+
+
+
+
+ 取消
+ 确定
+
+
+ 设置数额:
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/packages/partner/pages/deviceDesc/deviceDesc.wxss b/packages/partner/pages/deviceDesc/deviceDesc.wxss
new file mode 100644
index 0000000..453b77b
--- /dev/null
+++ b/packages/partner/pages/deviceDesc/deviceDesc.wxss
@@ -0,0 +1,742 @@
+.nav-box {
+ box-sizing: border-box;
+ width: 100%;
+ position: relative;
+ /* position: fixed; */
+ z-index: 2;
+}
+
+.nav-box .nav-bar {
+ display: flex;
+ align-items: center;
+}
+
+.nav-box .nav-bar .nav-bar-left,
+.nav-box .nav-bar .nav-bar-right {
+ padding: 0 20rpx;
+ min-width: 36rpx;
+}
+
+.nav-box .nav-bar .nav-bar-left van-icon {
+ vertical-align: sub;
+ color: #333333;
+}
+
+.nav-box .nav-bar .nav-bar-title {
+ flex: 1;
+ text-align: center;
+ font-weight: 400;
+ font-size: 36rpx;
+ color: #FFFFFF;
+}
+
+.nav-box .nav-bar-title {
+ color: red;
+ margin-left: -20rpx;
+}
+
+
+.water-filter {
+ width: 100vw;
+ overflow: hidden;
+}
+
+.nowrap {
+ white-space: nowrap;
+}
+
+.top {
+ background-color: #FFFFFF;
+
+}
+
+/* 位置定位 */
+.positioning {
+ display: flex;
+ margin-left: 24rpx;
+ padding-top: 40rpx;
+ margin-right: 20rpx;
+ margin-bottom: 64rpx;
+ justify-content: space-between;
+}
+
+.positioning-left {
+ display: flex;
+ align-items: center;
+ overflow: hidden;
+}
+
+.positioning-right {
+ display: flex;
+ align-items: center;
+}
+
+.positioning-icon-left {
+ width: 33rpx;
+ height: 33rpx;
+}
+
+.positioning-text {
+ font-size: 26rpx;
+ color: #FFFFFF;
+ margin-left: 9rpx;
+ white-space: nowrap;
+ overflow: hidden;
+ text-overflow: ellipsis;
+}
+
+.positioning-icon-right {
+ width: 24rpx;
+ height: 24rpx;
+}
+
+/* 净化前后数值 */
+.purification-value {
+ display: flex;
+ margin-left: 114rpx;
+}
+
+.purification-value-left {
+ display: inline;
+ width: 210rpx;
+ height: 250rpx;
+}
+
+.purification-value-right {
+ margin-left: 116rpx;
+}
+
+.purification-value-icon {
+ width: 210rpx;
+ height: 250rpx;
+ position: absolute;
+}
+
+.purification-value-text {
+ position: absolute;
+ margin: 60rpx 42rpx 0 41rpx;
+}
+
+.puri-text {
+ display: flex;
+ justify-content: center;
+ color: #FFFFFF;
+ font-size: 26rpx;
+}
+
+.tds {
+ opacity: 0.5;
+}
+
+.tds-value {
+ font-size: 50rpx;
+}
+
+/* 净化前后水质 */
+.water-quality {
+ margin-left: 80rpx;
+ margin-top: 23rpx;
+}
+
+.water-quality2 {
+ display: flex;
+ margin: 0 80rpx;
+ margin-top: 10rpx;
+}
+
+.water-quality2 .water-quality-left {
+ flex: 1;
+ display: flex;
+ text-align: center;
+ height: auto;
+ background: transparent;
+}
+
+.water-quality2 .water-quality-text {
+ width: 150rpx;
+ height: 50rpx;
+ background: #fff;
+ border-radius: 100rpx 100rpx 100rpx 100rpx;
+ color: #2583FF;
+ display: block;
+ line-height: 50rpx;
+}
+
+.water-quality-left {
+ display: inline;
+ width: 265rpx;
+ height: 50rpx;
+ padding: 10rpx 38rpx 10rpx 30rpx;
+ justify-content: center;
+ align-items: center;
+ border-radius: 20rpx;
+ background: linear-gradient(to right, #2583FF1a, #2583FF);
+}
+
+.water-quality-text {
+ font-size: 26rpx;
+ color: #FFFFFF;
+}
+
+/* 我的设备 */
+.my-device {
+ background-color: #FFFFFF;
+ /* margin: 0 24rpx 0 20rpx; */
+ /* padding-bottom: 30rpx; */
+}
+
+.mydevice {
+ font-size: 28rpx;
+ display: flex;
+ margin-bottom: 23rpx;
+}
+
+.text-color {
+ color: #999999;
+}
+
+.replayBtn {
+ width: 120rpx;
+ height: 50rpx;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ background-color: #2887ff;
+ color: #fff;
+ border-radius: 30rpx;
+ margin-left: 20rpx;
+}
+
+.day-num2 {
+ color: #ff0000da;
+ font-size: 36rpx;
+ font-weight: bold;
+ margin: 0 7rpx 0 8rpx;
+}
+
+.device-info {
+ margin: 0 24rpx 0 20rpx;
+}
+
+.info-top {
+ display: flex;
+ justify-content: space-between;
+}
+
+.device-name {
+ font-size: 36rpx;
+ color: #222222;
+ font-weight: bold;
+}
+
+.device-state {
+ display: flex;
+ align-items: center;
+}
+
+.switch-icon {
+ width: 28rpx;
+ height: 28rpx;
+}
+
+.switch-text {
+ margin-right: 31rpx;
+ margin-left: 10rpx;
+}
+
+.wifi-text {
+ margin-left: 10rpx;
+}
+
+.text-size {
+ font-size: 26rpx;
+}
+
+.wifi-icon {
+ width: 30rpx;
+ height: 22rpx;
+}
+
+.info-bottom {
+ display: flex;
+ margin-top: 22rpx;
+ justify-content: space-between;
+ align-items: center;
+}
+
+.device-id {
+ color: #2583FF;
+ /* display: inline; */
+}
+
+.service-day {
+ /* display: inline; */
+ /* float: right; */
+}
+
+.day-num {
+ color: #2583FF;
+ font-size: 36rpx;
+ font-weight: bold;
+ margin: 0 7rpx 0 8rpx;
+}
+
+.day {
+ color: #222222;
+}
+
+/* 购买滤芯和报修记录 */
+.van-row {
+ padding: 0 20rpx !important;
+}
+
+.van-col {
+ display: flex;
+ background-color: #FFF0ED;
+ height: 150rpx;
+ border-radius: 30rpx;
+ align-items: center;
+ font-size: 28rpx;
+ font-weight: bold;
+}
+
+.purchase {
+ width: 100rpx;
+ height: 100rpx;
+ margin-left: 68rpx;
+}
+
+/* 功能列表 */
+.van-grid {
+ margin-top: 20rpx;
+ background-color: #FFFFFF;
+}
+
+.van-icon__image {
+ width: 100rpx !important;
+ height: 100rpx !important;
+}
+
+.van-icon--image {
+ width: 100rpx !important;
+ height: 100rpx !important;
+}
+
+
+.van-grid-item__text {
+ font-size: 26rpx !important;
+ color: #222222 !important;
+}
+
+/* 滤芯寿命 */
+.lifetime {
+ margin-top: 20rpx;
+ background-color: #FFFFFF;
+ padding: 30rpx 20rpx;
+}
+
+.lifetime-title {
+ font-size: 28rpx;
+ font-weight: bold;
+ color: #000000;
+}
+
+.lifetime-prompt {
+ font-size: 24rpx;
+ color: #999999;
+ margin-top: 20rpx;
+ margin-bottom: 25rpx;
+}
+
+.lifetime-progress {
+ margin-top: 10rpx;
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+}
+
+.progress-name {
+ white-space: nowrap;
+ /* width: 24%; */
+ overflow: hidden;
+ white-space: nowrap;
+ font-size: 26rpx;
+ display: flex;
+ justify-content: space-between;
+ padding-top: 10rpx;
+}
+
+.van-progress {
+ width: 100%;
+ margin-right: 19rpx;
+ margin-top: 10rpx;
+}
+
+.progress {
+ color: #000000;
+ font-size: 24rpx;
+}
+
+.contral3 {
+ display: flex;
+ flex-direction: column;
+}
+
+.equi-contral-right2 {
+ margin-top: 20rpx;
+}
+
+/* 用水量 */
+.water-consumption {
+ background-color: #FFFFFF;
+ margin-top: 20rpx;
+ padding: 30rpx 24rpx 0 20rpx;
+}
+
+.water-consumption-title {
+ font-size: 28rpx;
+ font-weight: bold;
+ margin-bottom: 30rpx;
+}
+
+.row-index--van-row {
+ margin: 0 !important;
+}
+
+.van-col--8 {
+ display: inline;
+ height: 130rpx !important;
+ width: 220rpx !important;
+ margin-right: 5rpx;
+}
+
+.water-consumption-col-name {
+ font-size: 24rpx;
+ font-weight: normal;
+ color: #000000;
+ display: flex;
+ justify-content: center;
+ align-items: center;
+ text-align: center;
+ margin-top: 12rpx;
+ margin-bottom: 16rpx;
+}
+
+.water-consumption-col-num {
+ text-align: center;
+ font-size: 38rpx;
+ font-weight: bold;
+ color: #2583FF;
+}
+
+.water-consumption-col-num-size {
+ font-size: 24rpx;
+ font-weight: normal;
+}
+
+.container {
+ width: 100%;
+ height: 600rpx;
+ padding-bottom: 100rpx;
+ position: relative;
+
+}
+
+.container canvas {
+ position: absolute;
+ right: -100vw;
+ top: 0;
+}
+
+#mychart-bar {
+ border-radius: 30rpx 30rpx 0 0;
+}
+
+.chart {
+ display: flex;
+ align-items: flex-end;
+ height: 300px;
+}
+
+.bar {
+ width: 20px;
+ margin: 0 5px;
+ background-color: blue;
+ border-radius: 30rpx 30rpx 0 0;
+}
+
+
+
+
+
+.water-consumption-row {
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+ padding: 0;
+ margin: 0 24rpx;
+}
+
+.water-consumption-col {
+ width: 220rpx;
+ height: 112rpx;
+ background: linear-gradient(180deg, #F0F4FF 0%, #DEE7FF 100%);
+ border-radius: 20rpx 20rpx 20rpx 20rpx;
+ box-sizing: border-box;
+}
+
+.water-consumption-row .col2 {
+ background: linear-gradient(180deg, #FFFBD8 0%, #FFEBB8 100%);
+ margin: 0 20rpx;
+}
+
+.water-consumption-row .col3 {
+ background: linear-gradient(180deg, #ECECEC 0%, #E5E4E4 100%);
+}
+
+.water-consumption-col .water-consumption-col-name {
+ font-weight: 400;
+ font-size: 24rpx;
+ color: #000000;
+}
+
+.water-consumption-col .water-consumption-col-num {
+ font-weight: bold;
+ font-size: 36rpx;
+ color: #2583FF;
+}
+
+.equi-contral {
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+ margin-left: 20rpx;
+ margin-right: 20rpx;
+}
+
+.equi-contral2 .equi-contral-right {
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+ width: 100%;
+}
+
+.equi-contral2 .equi-contral-right .equi-contral-right-btn2 {
+ margin-top: 0;
+ width: 335rpx;
+}
+
+.equi-contral2 .equi-contral-right .equi-contral-right-btn1 {
+ margin-top: 0;
+ width: 335rpx;
+}
+
+.equi-contral-left {
+ position: relative;
+ width: 345rpx;
+ height: 320rpx;
+ background: #FFF0ED;
+ border-radius: 30rpx 30rpx 30rpx 30rpx;
+ font-weight: bold;
+ font-size: 28rpx;
+ color: #000000;
+ box-sizing: border-box;
+ padding-top: 58rpx;
+ padding-left: 28rpx;
+}
+
+.equi-contral-left #img1 {
+ width: 219.21rpx;
+ height: 175rpx;
+ position: absolute;
+ left: 116rpx;
+ bottom: 5rpx;
+}
+
+.equi-contral-left #img2 {
+ width: 119rpx;
+ height: 95rpx;
+ position: absolute;
+ bottom: 32rpx;
+ left: 180rpx;
+}
+
+.van-grid-item__text text {
+ white-space: nowrap;
+}
+
+.equi-contral-right {
+ /* justify-content: center !important; */
+}
+
+.equi-contral-right-btn1 {
+ width: 345rpx;
+ height: 150rpx;
+ background: linear-gradient(180deg, #FFFBD8 0%, #FFEBB8 100%);
+ border-radius: 20rpx 20rpx 20rpx 20rpx;
+ font-weight: bold;
+ font-size: 28rpx;
+ color: #000000;
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+ padding-left: 30rpx;
+ padding-right: 30rpx;
+ box-sizing: border-box;
+}
+
+.equi-contral-right-btn1 image {
+ width: 100rpx;
+ height: 100rpx;
+}
+
+.equi-contral-right-btn2 {
+ width: 345rpx;
+ height: 150rpx;
+ background: linear-gradient(180deg, #ECECEC 0%, #E5E4E4 100%);
+ border-radius: 20rpx 20rpx 20rpx 20rpx;
+ margin-top: 23rpx;
+ position: relative;
+ box-sizing: border-box;
+ font-weight: bold;
+ font-size: 28rpx;
+ color: #000000;
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+ padding-left: 30rpx;
+ padding-right: 30rpx;
+ box-sizing: border-box;
+}
+
+.equi-contral-right-btn2 image {
+ width: 100rpx;
+ height: 100rpx;
+}
+
+
+.foot-fixed {
+ z-index: 999999999999 !important;
+}
+
+.btnDevice {
+ width: 650rpx;
+ height: 80rpx;
+ background: #2583FF;
+ border-radius: 100rpx 100rpx 100rpx 100rpx;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ margin: 0 auto;
+ margin-top: 300rpx;
+ font-weight: 400;
+ font-size: 36rpx;
+ color: #FFFFFF;
+}
+
+.deleteBtn {
+ width: 710rpx;
+ height: 100rpx;
+ background-color: #dd0000;
+ color: #fff;
+ border-radius: 20rpx;
+ font-size: 34rpx;
+ font-weight: 700;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ margin: 0 auto;
+ margin-top: 40rpx;
+}
+
+
+.btn3 {
+ background: #D5AC66;
+ width: 710rpx;
+ height: 100rpx;
+ color: #fff;
+ border-radius: 20rpx;
+ font-size: 34rpx;
+ font-weight: 700;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ margin: 0 auto;
+ margin-top: 40rpx;
+}
+
+.btn4 {
+ background: #67C23A;
+ width: 710rpx;
+ height: 100rpx;
+ color: #fff;
+ border-radius: 20rpx;
+ font-size: 34rpx;
+ font-weight: 700;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ margin: 0 auto;
+ margin-top: 40rpx;
+}
+.btn5{
+ background-color: #909399;
+ width: 710rpx;
+ height: 100rpx;
+ color: #fff;
+ border-radius: 20rpx;
+ font-size: 34rpx;
+ font-weight: 700;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ margin: 0 auto;
+ margin-top: 40rpx;
+}
+
+.row {
+ padding-top: 30rpx;
+ height: 300rpx;
+ overflow: hidden;
+ overflow-y: auto;
+ padding: 30rpx;
+ box-sizing: border-box;
+ font-size: 30rpx;
+ display: flex;
+ color: #606266;
+}
+
+.row_label {
+ margin-right: 20rpx;
+ white-space: nowrap;
+}
+
+.row_con {
+ flex: 1;
+}
+
+.row_con textarea {
+ height: 100% !important;
+}
+
+.tit {
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+ font-size: 32rpx;
+ padding-right: 30rpx;
+ padding-left: 30rpx;
+ padding-top: 20rpx;
+}
+
+.row2 {
+ padding-top: 30rpx;
+ overflow: hidden;
+ overflow-y: auto;
+ padding: 30rpx;
+ padding-bottom: 0;
+ box-sizing: border-box;
+ font-size: 30rpx;
+ display: flex;
+ color: #606266;
+}
\ No newline at end of file
diff --git a/packages/partner/pages/distributor/distributor.js b/packages/partner/pages/distributor/distributor.js
new file mode 100644
index 0000000..557f301
--- /dev/null
+++ b/packages/partner/pages/distributor/distributor.js
@@ -0,0 +1,222 @@
+let util = require('../../../../utils/util')
+let apiArr = require('../../../../api/partner')
+// packages/partner/pages/distributor/distributor.js
+Page({
+
+ /**
+ * 页面的初始数据
+ */
+ data: {
+ show: false,
+ deviceList: [],
+ deal: {},
+ deviceInfo:{
+ device_code:""
+ }
+ },
+ choseJXS() {
+ let that = this
+ that.setData({
+ show: true
+ })
+ },
+ //扫码
+ scanQrcode() {
+ let that = this
+ wx.scanCode({
+ success: (res) => {
+ // 处理扫码结果
+ this.setData({
+ deviceCode: res.result
+ });
+ util.postUrl4(apiArr.getDeviceByCode, {
+ device_code: res.result,
+ install_id: that.data.id
+ }, res => {
+ let deviceList = that.data.deviceList
+ deviceList.push(res)
+ that.setData({
+ deviceList
+ })
+ })
+
+ },
+ fail: (err) => {
+ wx.showToast({
+ title: '扫码失败',
+ icon: 'none'
+ });
+ }
+ });
+ },
+
+ iptDeviceCode(e){
+ let that = this
+ console.log(e);
+ that.setData({
+ "deviceInfo.device_code":e.detail.value
+ })
+
+ },
+
+ search(){
+ let that = this
+ console.log(that.data.deviceInfo);
+ util.postUrl4(apiArr.getDeviceByCode, {
+ device_code: that.data.deviceInfo.device_code,
+ install_id: that.data.id
+ }, res => {
+ let deviceList = that.data.deviceList
+ deviceList.push(res)
+ that.setData({
+ deviceList
+ })
+ })
+ },
+
+ //经销商列表
+ getDealerList() {
+ let that = this
+ util.postUrl4(apiArr.getPartnerList, {
+ page_size: 50,
+ page_num: 1
+ }, res => {
+ console.log(res);
+ that.setData({
+ columns: res.rows
+ })
+ })
+ },
+
+ deleteItem(e){
+ console.log(e);
+ let that = this
+ let deviceList = that.data.deviceList
+ deviceList.splice(e.currentTarget.dataset.idx,1)
+ that.setData({
+ deviceList
+ })
+ },
+
+ onClose() {
+ let that = this
+ that.setData({
+ show: false
+ })
+ },
+ onConfirm(e) {
+ console.log(e);
+ let that = this
+ that.setData({
+ deal: e.detail.value,
+ show: false
+ })
+ },
+
+ allocation() {
+ let that = this
+ let device_id = []
+
+ if (!that.data.deal.deal_id) {
+ return wx.showToast({
+ title: '请选择经销商',
+ icon: "none"
+ })
+ }
+ if (that.data.deviceList.length == 0) {
+ return wx.showToast({
+ title: '请添加设备',
+ icon: "none"
+ })
+ }
+ that.data.deviceList.forEach(item => {
+ device_id.push(item.device_id)
+ })
+ util.postUrl4(apiArr.allocation, {
+ dealer_id: that.data.deal.deal_id,
+ device_id
+ }, res => {
+ wx.showToast({
+ title: '分配成功!',
+ icon: "none"
+ })
+
+ that.setData({
+ deal:{},
+ deviceList:[]
+ })
+
+ })
+ },
+ cancels(){
+ let that= this
+ that.setData({
+ deviceList:[],
+ deal:{}
+ })
+ },
+ deleteItem(e) {
+ console.log(e);
+ let that = this
+ let deviceList = that.data.deviceList
+ deviceList.splice(e.currentTarget.dataset.idx, 1)
+ that.setData({
+ deviceList
+ })
+ },
+ /**
+ * 生命周期函数--监听页面加载
+ */
+ onLoad(options) {
+ this.getDealerList()
+ },
+
+ /**
+ * 生命周期函数--监听页面初次渲染完成
+ */
+ onReady() {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面显示
+ */
+ onShow() {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面隐藏
+ */
+ onHide() {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面卸载
+ */
+ onUnload() {
+
+ },
+
+ /**
+ * 页面相关事件处理函数--监听用户下拉动作
+ */
+ onPullDownRefresh() {
+
+ },
+
+ /**
+ * 页面上拉触底事件的处理函数
+ */
+ onReachBottom() {
+
+ },
+
+ /**
+ * 用户点击右上角分享
+ */
+ onShareAppMessage() {
+
+ }
+})
\ No newline at end of file
diff --git a/packages/partner/pages/distributor/distributor.json b/packages/partner/pages/distributor/distributor.json
new file mode 100644
index 0000000..1997e11
--- /dev/null
+++ b/packages/partner/pages/distributor/distributor.json
@@ -0,0 +1,4 @@
+{
+ "usingComponents": {},
+ "navigationBarTitleText": "设备分配"
+}
\ No newline at end of file
diff --git a/packages/partner/pages/distributor/distributor.wxml b/packages/partner/pages/distributor/distributor.wxml
new file mode 100644
index 0000000..8e65d65
--- /dev/null
+++ b/packages/partner/pages/distributor/distributor.wxml
@@ -0,0 +1,101 @@
+
+
+
+ 扫码添加设备
+
+
+ 设备编码:
+
+
+
+
+
+
+
+
+ 经销商:
+
+
+
+
+
+
+
+
+ 扫码台数:
+
+
+
+
+
+
+
+
+ 产品名称
+ 设备编码
+ 操作
+
+
+
+ {{item.product_name}}
+ {{item.device_code}}
+ 删除
+
+
+
+
+
+ 取消
+ 分配
+
+
+
+
+
+
\ No newline at end of file
diff --git a/packages/partner/pages/distributor/distributor.wxss b/packages/partner/pages/distributor/distributor.wxss
new file mode 100644
index 0000000..c1bcd08
--- /dev/null
+++ b/packages/partner/pages/distributor/distributor.wxss
@@ -0,0 +1,172 @@
+.iptBox {
+ display: flex;
+ align-items: center;
+ padding: 30rpx;
+ padding-bottom: 10rpx;
+ box-sizing: border-box;
+ font-size: 30rpx;
+}
+
+.iptBox span{
+ margin-right: 10rpx;
+}
+.searchBox{
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ padding-left: 40rpx;
+}
+.searchBox image{
+ width: 30rpx;
+ height: 30rpx;
+}
+.btns {
+ width: 650rpx;
+ height: 80rpx;
+ background: #2583FF;
+ border-radius: 100rpx 100rpx 100rpx 100rpx;
+ font-size: 36rpx;
+ color: #FFFFFF;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ margin: 0 auto;
+ margin-top: 30rpx;
+}
+
+.choseJXS {
+ display: flex;
+ align-items: center;
+ padding: 30rpx;
+ padding-bottom: 10rpx;
+ box-sizing: border-box;
+ font-size: 30rpx;
+}
+
+.choseJXS .label {
+ font-size: 30rpx;
+ font-weight: 700;
+ width: 180rpx;
+ text-align: right;
+}
+
+.choseJXS2 {
+ display: flex;
+ align-items: center;
+ padding: 30rpx;
+ box-sizing: border-box;
+ font-size: 30rpx;
+
+}
+
+.choseJXS2 .label {
+ font-size: 30rpx;
+ font-weight: 700;
+ width: 180rpx;
+ text-align: right;
+}
+.iptBox .label {
+ font-size: 30rpx;
+ font-weight: 700;
+ width: 180rpx;
+ text-align: right;
+}
+
+.deviceItem {
+ padding: 30rpx;
+ box-sizing: border-box;
+ margin-bottom: 30rpx;
+ box-shadow: 0 4rpx 16rpx rgba(0, 0, 0, 0.1);
+}
+
+.row {
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+ margin-bottom: 10rpx;
+}
+
+.row2 {
+ display: flex;
+ align-items: flex-end;
+ justify-content: flex-end;
+ padding-top: 10rpx;
+}
+
+.deletes {
+ font-size: 30rpx;
+ color: #F56C6C;
+}
+
+.contralList {
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+ padding: 0 60rpx;
+ position: fixed;
+ bottom: 32rpx;
+ left: 32rpx;
+ right: 32rpx;
+}
+
+.contralBtn1 {
+ width: 48%;
+ height: 80rpx;
+ line-height: 80rpx;
+ background: #2583FF;
+ color: #fff;
+ border-radius: 40rpx;
+ font-size: 32rpx;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+}
+
+.contralBtn2 {
+ width: 48%;
+ height: 80rpx;
+ line-height: 80rpx;
+ background: #F56C6C;
+ color: #fff;
+ border-radius: 40rpx;
+ font-size: 32rpx;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+}
+
+
+.deviceList {
+ padding: 0 20rpx;
+}
+
+.deviceList_tit {
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+ font-size: 30rpx;
+ padding-bottom: 10rpx;
+ border-bottom: 1rpx solid #999;
+}
+
+.deviceList_item {
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+ font-size: 30rpx;
+ padding: 10rpx 0;
+}
+
+.dele {
+ color: red;
+}
+
+.deviceList_tit_item {
+ flex: 1;
+ text-align: center;
+}
+
+.deviceList_item_con {
+ flex: 1;
+ text-align: center;
+}
\ No newline at end of file
diff --git a/packages/partner/pages/editAdmin/editAdmin.js b/packages/partner/pages/editAdmin/editAdmin.js
new file mode 100644
index 0000000..771e7be
--- /dev/null
+++ b/packages/partner/pages/editAdmin/editAdmin.js
@@ -0,0 +1,195 @@
+import { areaList } from '../../data/index';
+
+let util = require('../../../../utils/util')
+let apiArr = require('../../../../api/partner')
+
+// packages/master/masterInfo/index.js
+Page({
+
+ /**
+ * 页面的初始数据
+ */
+ data: {
+ areaList,
+ Info: {},
+ sexOptions: ['男', '女'],
+ sexIndex: "",
+ avatarUrl: "https://wechat-img-file.oss-cn-beijing.aliyuncs.com/person/Group_309.png?2",
+ avatarUrl2: "",
+ fileList: [],
+ show: "",
+ },
+ // 选择头像
+ chooseAvatar() {
+ let that = this
+ wx.chooseMedia({
+ count: 1,
+ mediaType: ['image'],
+ sourceType: ['album', 'camera'],
+ success: (res) => {
+ const tempFilePath = res.tempFiles[0].tempFilePath;
+ // 这里可以添加上传头像到服务器的逻辑
+ util.uploadFileUrl(tempFilePath, (res) => {
+ let datas = JSON.parse(res)
+ console.log(datas.data);
+ let url = util.img_url + datas.data.path
+ let url2 = datas.data.path
+ let fileList = that.data.fileList
+
+ that.setData({
+ "Info.deal_img": url,
+ "Info.deal_icon": url2
+ })
+ })
+ }
+ });
+ },
+ changeLegal(e) {
+ let that = this
+ that.setData({
+ "Info.legal": e.detail.value
+ })
+ },
+ changeDealName(e) {
+ let that = this
+ that.setData({
+ "Info.deal_name": e.detail.value
+ })
+ },
+ changePhone(e) {
+ let that = this
+ that.setData({
+ "Info.phone": e.detail.value
+ })
+ },
+ changeCustomerPhone(e) {
+ let that = this
+ that.setData({
+ "Info.customer_phone": e.detail.value
+ })
+ },
+ changeAddress(e){
+ let that = this
+ that.setData({
+ "Info.address": e.detail.value
+ })
+ },
+ choseRegion() {
+ let that = this
+ that.setData({
+ show: true
+ })
+ },
+ changeAddress(e){
+ let that = this
+ that.setData({
+ "Info.address": e.detail.value
+ })
+ },
+ onClose() {
+ let that = this
+ that.setData({
+ show: false
+ })
+ },
+ AreaConfirm(e){
+ let that = this
+ let region
+ if(e.detail.values[0].name == e.detail.values[1].name){
+ region = e.detail.values[0].name + e.detail.values[2].name
+ }else{
+ region = e.detail.values[0].name + e.detail.values[1].name + e.detail.values[2].name
+ }
+ that.setData({
+ "Info.region":region,
+ show:false
+ })
+ },
+
+ getAdminInfo() {
+ let that = this
+ util.postUrl4(apiArr.getPartner, { deal_id: wx.getStorageSync('admin').shop_id }, res => {
+ console.log(res);
+ res.deal_icon = res.deal_icon.startsWith('http') ? res.deal_icon : util.img_url + res.deal_icon
+ that.setData({
+ Info: res
+ })
+ })
+ },
+ saveMasterInfo(){
+ let that = this
+ wx.showLoading({
+ title: '修改中...',
+ })
+ util.postUrl4(apiArr.editPartner,that.data.Info,res=>{
+ wx.hideLoading()
+ wx.showToast({
+ title: '修改成功',
+ icon:"none"
+ })
+ that.getAdminInfo()
+ })
+ },
+ exit(){
+ wx.removeStorageSync('atoken')
+ wx.removeStorageSync('admin')
+ wx.reLaunch({
+ url: '/pages/newLogin/newLogin',
+ })
+ },
+ /**
+ * 生命周期函数--监听页面加载
+ */
+ onLoad(options) {
+ this.getAdminInfo()
+ },
+
+ /**
+ * 生命周期函数--监听页面初次渲染完成
+ */
+ onReady() {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面显示
+ */
+ onShow() {
+ let that = this
+ },
+
+ /**
+ * 生命周期函数--监听页面隐藏
+ */
+ onHide() {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面卸载
+ */
+ onUnload() {
+
+ },
+
+ /**
+ * 页面相关事件处理函数--监听用户下拉动作
+ */
+ onPullDownRefresh() {
+
+ },
+
+ /**
+ * 页面上拉触底事件的处理函数
+ */
+ onReachBottom() {
+
+ },
+
+ /**
+ * 用户点击右上角分享
+ */
+ onShareAppMessage() {
+
+ }
+})
\ No newline at end of file
diff --git a/packages/partner/pages/editAdmin/editAdmin.json b/packages/partner/pages/editAdmin/editAdmin.json
new file mode 100644
index 0000000..6f5247b
--- /dev/null
+++ b/packages/partner/pages/editAdmin/editAdmin.json
@@ -0,0 +1,3 @@
+{
+ "usingComponents": {}
+}
\ No newline at end of file
diff --git a/packages/partner/pages/editAdmin/editAdmin.wxml b/packages/partner/pages/editAdmin/editAdmin.wxml
new file mode 100644
index 0000000..68de3a5
--- /dev/null
+++ b/packages/partner/pages/editAdmin/editAdmin.wxml
@@ -0,0 +1,56 @@
+
+
+
+
+
+
+
+
+
+ 经销商名称
+
+
+
+ 经销商标识
+
+
+
+
+ 联系人
+
+
+
+
+ 联系电话
+
+
+
+
+ 客服电话
+
+
+
+
+
+ 所在地区
+
+
+
+
+ 详细地址
+
+
+
+ 保存
+
+ 退出登录
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/packages/partner/pages/editAdmin/editAdmin.wxss b/packages/partner/pages/editAdmin/editAdmin.wxss
new file mode 100644
index 0000000..4a4597c
--- /dev/null
+++ b/packages/partner/pages/editAdmin/editAdmin.wxss
@@ -0,0 +1,65 @@
+.container {
+ padding: 32rpx;
+}
+
+.avatar-section {
+ display: flex;
+ flex-direction: column;
+ align-items: center;
+ margin-bottom: 40rpx;
+}
+
+.avatar {
+ width: 120rpx;
+ height: 120rpx;
+ border-radius: 50%;
+ margin-bottom: 20rpx;
+}
+
+.change-avatar-btn {
+ font-size: 28rpx;
+ color: #2583ff;
+ background-color: transparent;
+ border: none;
+}
+
+.info-item {
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+ padding: 32rpx 0;
+ border-bottom: 1rpx solid #eee;
+}
+
+.label {
+ font-size: 28rpx;
+ color: #333;
+}
+
+.value {
+ font-size: 28rpx;
+ color: #666;
+}
+
+.save-btn {
+ width: 100%;
+ height: 80rpx;
+ line-height: 80rpx;
+ background-color: #2583ff;
+ color: #fff;
+ font-size: 32rpx;
+ text-align: center;
+ border-radius: 40rpx;
+ margin-top: 40rpx;
+}
+
+input{
+ text-align: right;
+}
+.picker{
+ flex: 1;
+}
+
+.btn2{
+ background-color: #666;
+}
\ No newline at end of file
diff --git a/packages/partner/pages/equipmentStock/equipmentStock.js b/packages/partner/pages/equipmentStock/equipmentStock.js
new file mode 100644
index 0000000..9ab54d4
--- /dev/null
+++ b/packages/partner/pages/equipmentStock/equipmentStock.js
@@ -0,0 +1,89 @@
+let util = require('../../../../utils/util')
+let apiArr = require('../../../../api/partner')
+// packages/partner/pages/equipmentStock/equipmentStock.js
+Page({
+
+ /**
+ * 页面的初始数据
+ */
+ data: {
+ equipmentList: []
+ },
+ getEquipmentStock() {
+ let that = this
+ let admin = wx.getStorageSync('admin')
+
+ util.postUrl4(apiArr.getEquipmentStock, {
+ dealer_id: admin.shop_id
+ }, res => {
+ res.rows.forEach(item => {
+ item.product_icon = item.product_icon.startsWith('http') ? item.product_icon : util.img_url + item.product_icon
+ })
+ that.setData({
+ equipmentList: res.rows
+ })
+ })
+ },
+ desc(e){
+ console.log(e);
+ wx.navigateTo({
+ url: '../equipmentStockInfo/equipmentStockInfo?id=' + e.currentTarget.dataset.id,
+ })
+ },
+ /**
+ * 生命周期函数--监听页面加载
+ */
+ onLoad(options) {
+ let that = this
+ that.getEquipmentStock()
+ },
+
+ /**
+ * 生命周期函数--监听页面初次渲染完成
+ */
+ onReady() {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面显示
+ */
+ onShow() {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面隐藏
+ */
+ onHide() {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面卸载
+ */
+ onUnload() {
+
+ },
+
+ /**
+ * 页面相关事件处理函数--监听用户下拉动作
+ */
+ onPullDownRefresh() {
+
+ },
+
+ /**
+ * 页面上拉触底事件的处理函数
+ */
+ onReachBottom() {
+
+ },
+
+ /**
+ * 用户点击右上角分享
+ */
+ onShareAppMessage() {
+
+ }
+})
\ No newline at end of file
diff --git a/packages/partner/pages/equipmentStock/equipmentStock.json b/packages/partner/pages/equipmentStock/equipmentStock.json
new file mode 100644
index 0000000..9fe53c2
--- /dev/null
+++ b/packages/partner/pages/equipmentStock/equipmentStock.json
@@ -0,0 +1,4 @@
+{
+ "usingComponents": {},
+ "navigationBarTitleText": "设备库存"
+}
\ No newline at end of file
diff --git a/packages/partner/pages/equipmentStock/equipmentStock.wxml b/packages/partner/pages/equipmentStock/equipmentStock.wxml
new file mode 100644
index 0000000..cc73f43
--- /dev/null
+++ b/packages/partner/pages/equipmentStock/equipmentStock.wxml
@@ -0,0 +1,22 @@
+
+
+
+ 产品名称: {{item.product_name}}
+ 产品编码: {{item.product_code}}
+
+
+
+
+
+
+ 在库:{{item.storage}}
+
+ 安装:{{item.install}}
+
+ 报废:{{item.scrap}}
+
+
+
+
+
+
\ No newline at end of file
diff --git a/packages/partner/pages/equipmentStock/equipmentStock.wxss b/packages/partner/pages/equipmentStock/equipmentStock.wxss
new file mode 100644
index 0000000..04fe423
--- /dev/null
+++ b/packages/partner/pages/equipmentStock/equipmentStock.wxss
@@ -0,0 +1,66 @@
+page {
+ background-color: #f9f9f9;
+ padding: 0;
+}
+
+.equipmentList {
+ padding: 30rpx;
+ box-sizing: border-box;
+}
+
+.equipmentItem {
+ padding: 30rpx 10rpx;
+ border-radius: 20rpx;
+ overflow: hidden;
+ box-sizing: border-box;
+ background-color: #fff;
+ margin-bottom: 30rpx;
+}
+
+.equipmentItem_tit {
+ display: flex;
+ justify-content: space-between;
+ padding-bottom: 10rpx;
+ border-bottom: 1rpx solid #99999980;
+}
+
+.equipmentItem_Con {
+ display: flex;
+ align-items: center;
+ margin-top: 30rpx;
+}
+
+.equipmentItem_Con_left {
+ width: 180rpx;
+ height: 180rpx;
+ margin-right: 30rpx;
+}
+.equipmentItem_Con_left image{
+ width: 100%;
+ height: 100%;
+}
+
+.equipmentItem_Con_right {
+ flex: 1;
+ display: flex;
+ flex-wrap: wrap;
+}
+
+.equipmentItem_Con_right_item {
+ width: 50%;
+ text-align: center;
+ margin-bottom: 20rpx;
+ white-space: nowrap;
+}
+.equipmentItem_tit_left{
+ flex: 1;
+}
+.equipmentItem_tit_right{
+ flex: 1;
+}
+.equipmentItem_tit_left span{
+ white-space: nowrap;
+}
+.equipmentItem_tit_right span{
+ white-space: nowrap;
+}
diff --git a/packages/partner/pages/filterStock/filterStock.js b/packages/partner/pages/filterStock/filterStock.js
new file mode 100644
index 0000000..ae0d039
--- /dev/null
+++ b/packages/partner/pages/filterStock/filterStock.js
@@ -0,0 +1,89 @@
+let util = require('../../../../utils/util')
+let apiArr = require('../../../../api/partner')
+// packages/partner/pages/equipmentStock/equipmentStock.js
+Page({
+
+ /**
+ * 页面的初始数据
+ */
+ data: {
+ equipmentList: []
+ },
+ getEquipmentStock() {
+ let that = this
+ let admin = wx.getStorageSync('admin')
+
+ util.postUrl4(apiArr.getEquipmentStock, {
+ dealer_id: admin.shop_id
+ }, res => {
+ res.rows.forEach(item => {
+ item.product_icon = item.product_icon.startsWith('http') ? item.product_icon : util.img_url + item.product_icon
+ })
+ that.setData({
+ equipmentList: res.rows
+ })
+ })
+ },
+ desc(e){
+ console.log(e);
+ wx.navigateTo({
+ url: '../filterStockInfo/filterStockInfo?id=' + e.currentTarget.dataset.id,
+ })
+ },
+ /**
+ * 生命周期函数--监听页面加载
+ */
+ onLoad(options) {
+ let that = this
+ that.getEquipmentStock()
+ },
+
+ /**
+ * 生命周期函数--监听页面初次渲染完成
+ */
+ onReady() {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面显示
+ */
+ onShow() {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面隐藏
+ */
+ onHide() {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面卸载
+ */
+ onUnload() {
+
+ },
+
+ /**
+ * 页面相关事件处理函数--监听用户下拉动作
+ */
+ onPullDownRefresh() {
+
+ },
+
+ /**
+ * 页面上拉触底事件的处理函数
+ */
+ onReachBottom() {
+
+ },
+
+ /**
+ * 用户点击右上角分享
+ */
+ onShareAppMessage() {
+
+ }
+})
\ No newline at end of file
diff --git a/packages/partner/pages/filterStock/filterStock.json b/packages/partner/pages/filterStock/filterStock.json
new file mode 100644
index 0000000..68686d6
--- /dev/null
+++ b/packages/partner/pages/filterStock/filterStock.json
@@ -0,0 +1,4 @@
+{
+ "usingComponents": {},
+ "navigationBarTitleText": "滤芯库存"
+}
\ No newline at end of file
diff --git a/packages/partner/pages/filterStock/filterStock.wxml b/packages/partner/pages/filterStock/filterStock.wxml
new file mode 100644
index 0000000..2290596
--- /dev/null
+++ b/packages/partner/pages/filterStock/filterStock.wxml
@@ -0,0 +1,22 @@
+
+
+
+ 产品名称: {{item.product_name}}
+ 产品编码: {{item.product_code}}
+
+
+
+
+
+
+ 在库:{{item.storage}}
+
+ 安装:{{item.install}}
+
+ 报废:{{item.scrap}}
+
+
+
+
+
+
\ No newline at end of file
diff --git a/packages/partner/pages/filterStock/filterStock.wxss b/packages/partner/pages/filterStock/filterStock.wxss
new file mode 100644
index 0000000..04fe423
--- /dev/null
+++ b/packages/partner/pages/filterStock/filterStock.wxss
@@ -0,0 +1,66 @@
+page {
+ background-color: #f9f9f9;
+ padding: 0;
+}
+
+.equipmentList {
+ padding: 30rpx;
+ box-sizing: border-box;
+}
+
+.equipmentItem {
+ padding: 30rpx 10rpx;
+ border-radius: 20rpx;
+ overflow: hidden;
+ box-sizing: border-box;
+ background-color: #fff;
+ margin-bottom: 30rpx;
+}
+
+.equipmentItem_tit {
+ display: flex;
+ justify-content: space-between;
+ padding-bottom: 10rpx;
+ border-bottom: 1rpx solid #99999980;
+}
+
+.equipmentItem_Con {
+ display: flex;
+ align-items: center;
+ margin-top: 30rpx;
+}
+
+.equipmentItem_Con_left {
+ width: 180rpx;
+ height: 180rpx;
+ margin-right: 30rpx;
+}
+.equipmentItem_Con_left image{
+ width: 100%;
+ height: 100%;
+}
+
+.equipmentItem_Con_right {
+ flex: 1;
+ display: flex;
+ flex-wrap: wrap;
+}
+
+.equipmentItem_Con_right_item {
+ width: 50%;
+ text-align: center;
+ margin-bottom: 20rpx;
+ white-space: nowrap;
+}
+.equipmentItem_tit_left{
+ flex: 1;
+}
+.equipmentItem_tit_right{
+ flex: 1;
+}
+.equipmentItem_tit_left span{
+ white-space: nowrap;
+}
+.equipmentItem_tit_right span{
+ white-space: nowrap;
+}
diff --git a/packages/partner/pages/filterStockInfo/filterStockInfo.js b/packages/partner/pages/filterStockInfo/filterStockInfo.js
new file mode 100644
index 0000000..deb5c1f
--- /dev/null
+++ b/packages/partner/pages/filterStockInfo/filterStockInfo.js
@@ -0,0 +1,66 @@
+// packages/partner/pages/filterStockInfo/filterStockInfo.js
+Page({
+
+ /**
+ * 页面的初始数据
+ */
+ data: {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面加载
+ */
+ onLoad(options) {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面初次渲染完成
+ */
+ onReady() {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面显示
+ */
+ onShow() {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面隐藏
+ */
+ onHide() {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面卸载
+ */
+ onUnload() {
+
+ },
+
+ /**
+ * 页面相关事件处理函数--监听用户下拉动作
+ */
+ onPullDownRefresh() {
+
+ },
+
+ /**
+ * 页面上拉触底事件的处理函数
+ */
+ onReachBottom() {
+
+ },
+
+ /**
+ * 用户点击右上角分享
+ */
+ onShareAppMessage() {
+
+ }
+})
\ No newline at end of file
diff --git a/packages/partner/pages/filterStockInfo/filterStockInfo.json b/packages/partner/pages/filterStockInfo/filterStockInfo.json
new file mode 100644
index 0000000..6f5247b
--- /dev/null
+++ b/packages/partner/pages/filterStockInfo/filterStockInfo.json
@@ -0,0 +1,3 @@
+{
+ "usingComponents": {}
+}
\ No newline at end of file
diff --git a/packages/partner/pages/filterStockInfo/filterStockInfo.wxml b/packages/partner/pages/filterStockInfo/filterStockInfo.wxml
new file mode 100644
index 0000000..319659d
--- /dev/null
+++ b/packages/partner/pages/filterStockInfo/filterStockInfo.wxml
@@ -0,0 +1,21 @@
+
+
+
+ 产品名称: 测试
+ 产品编码: JRX1234
+
+
+
+
+
+
+ 在库:{{item.storage}}
+
+ 安装:{{item.install}}
+
+ 报废:{{item.scrap}}
+
+
+
+
+
\ No newline at end of file
diff --git a/packages/partner/pages/filterStockInfo/filterStockInfo.wxss b/packages/partner/pages/filterStockInfo/filterStockInfo.wxss
new file mode 100644
index 0000000..04fe423
--- /dev/null
+++ b/packages/partner/pages/filterStockInfo/filterStockInfo.wxss
@@ -0,0 +1,66 @@
+page {
+ background-color: #f9f9f9;
+ padding: 0;
+}
+
+.equipmentList {
+ padding: 30rpx;
+ box-sizing: border-box;
+}
+
+.equipmentItem {
+ padding: 30rpx 10rpx;
+ border-radius: 20rpx;
+ overflow: hidden;
+ box-sizing: border-box;
+ background-color: #fff;
+ margin-bottom: 30rpx;
+}
+
+.equipmentItem_tit {
+ display: flex;
+ justify-content: space-between;
+ padding-bottom: 10rpx;
+ border-bottom: 1rpx solid #99999980;
+}
+
+.equipmentItem_Con {
+ display: flex;
+ align-items: center;
+ margin-top: 30rpx;
+}
+
+.equipmentItem_Con_left {
+ width: 180rpx;
+ height: 180rpx;
+ margin-right: 30rpx;
+}
+.equipmentItem_Con_left image{
+ width: 100%;
+ height: 100%;
+}
+
+.equipmentItem_Con_right {
+ flex: 1;
+ display: flex;
+ flex-wrap: wrap;
+}
+
+.equipmentItem_Con_right_item {
+ width: 50%;
+ text-align: center;
+ margin-bottom: 20rpx;
+ white-space: nowrap;
+}
+.equipmentItem_tit_left{
+ flex: 1;
+}
+.equipmentItem_tit_right{
+ flex: 1;
+}
+.equipmentItem_tit_left span{
+ white-space: nowrap;
+}
+.equipmentItem_tit_right span{
+ white-space: nowrap;
+}
diff --git a/packages/partner/pages/login/login.js b/packages/partner/pages/login/login.js
index 51d4390..150118b 100644
--- a/packages/partner/pages/login/login.js
+++ b/packages/partner/pages/login/login.js
@@ -10,10 +10,32 @@ Page({
data: {
account: "",
password: "",
+ checked:false
+
},
-
+ onChange(e){
+ let that = this
+ that.setData({
+ checked:e.detail
+ })
+ },
+ showTo(){
+ wx.showModal({
+ title: '提示',
+ content: '请阅读并同意《用户服务协议和隐私政策》',
+ complete: (res) => {
+ if (res.cancel) {
+
+ }
+
+ if (res.confirm) {
+
+ }
+ }
+ })
+ },
accountIpt(e) {
let that = this
@@ -124,7 +146,7 @@ Page({
tohome() {
wx.redirectTo({
- url: '/pages/chooseEntrance/chooseEntrance',
+ url: '/pages/newLogin/newLogin',
})
},
diff --git a/packages/partner/pages/login/login.wxml b/packages/partner/pages/login/login.wxml
index 0d421b6..9d41c06 100644
--- a/packages/partner/pages/login/login.wxml
+++ b/packages/partner/pages/login/login.wxml
@@ -6,17 +6,11 @@
为了更好的体验,申请获取您的公开信息
-
+
-
- 登录即表示您已同意
+
+
+ 我已阅读并同意
《用户服务协议和隐私政策》
@@ -27,7 +21,11 @@
-
diff --git a/packages/partner/pages/login/login.wxss b/packages/partner/pages/login/login.wxss
index fcc147d..a385a7b 100644
--- a/packages/partner/pages/login/login.wxss
+++ b/packages/partner/pages/login/login.wxss
@@ -11,6 +11,9 @@
color: #999;
text-align: center;
margin-top: 30rpx;
+ display: flex;
+ align-items: center;
+ justify-content: center;
}
.link {
diff --git a/packages/partner/pages/marketingOrder1/marketingOrder1.js b/packages/partner/pages/marketingOrder1/marketingOrder1.js
new file mode 100644
index 0000000..46ac78a
--- /dev/null
+++ b/packages/partner/pages/marketingOrder1/marketingOrder1.js
@@ -0,0 +1,83 @@
+// packages/partner/pages/marketingOrder1/marketingOrder1.js
+Page({
+
+ /**
+ * 页面的初始数据
+ */
+ data: {
+ searchText:"",
+
+ option1: [
+ { text: '全部', value: 0 },
+ { text: '时长', value: 1 },
+ { text: '水量', value: 3 },
+ { text: '零售', value: 4 },
+ ],
+ option2: [
+ { text: '全部', value: 0 },
+ { text: '本日', value: 1 },
+ { text: '本周', value: 3 },
+ { text: '本月', value: 4 },
+ ],
+ value1: 0,
+ value2: 0,
+ text1:'计费模式:全部',
+ text2:"营销周期:全部"
+ },
+
+ /**
+ * 生命周期函数--监听页面加载
+ */
+ onLoad(options) {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面初次渲染完成
+ */
+ onReady() {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面显示
+ */
+ onShow() {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面隐藏
+ */
+ onHide() {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面卸载
+ */
+ onUnload() {
+
+ },
+
+ /**
+ * 页面相关事件处理函数--监听用户下拉动作
+ */
+ onPullDownRefresh() {
+
+ },
+
+ /**
+ * 页面上拉触底事件的处理函数
+ */
+ onReachBottom() {
+
+ },
+
+ /**
+ * 用户点击右上角分享
+ */
+ onShareAppMessage() {
+
+ }
+})
\ No newline at end of file
diff --git a/packages/partner/pages/marketingOrder1/marketingOrder1.json b/packages/partner/pages/marketingOrder1/marketingOrder1.json
new file mode 100644
index 0000000..6680193
--- /dev/null
+++ b/packages/partner/pages/marketingOrder1/marketingOrder1.json
@@ -0,0 +1,4 @@
+{
+ "usingComponents": {},
+ "navigationBarTitleText": "滤芯预警营销"
+}
\ No newline at end of file
diff --git a/packages/partner/pages/marketingOrder1/marketingOrder1.wxml b/packages/partner/pages/marketingOrder1/marketingOrder1.wxml
new file mode 100644
index 0000000..4d78da1
--- /dev/null
+++ b/packages/partner/pages/marketingOrder1/marketingOrder1.wxml
@@ -0,0 +1,65 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 套餐编号:123123
+
+
+ 订单状态:已完成
+
+
+
+
+
+
+
+
+ 套餐名称:
+ xxxx
+
+
+ 套餐类型:
+ xxxx
+
+
+ 客户姓名:
+ xxxx
+
+
+ 实付价格:
+ xxxx
+
+
+ 支付时间:
+ xxxx
+
+
+
+
+ 查看套餐详情
+
+
+
\ No newline at end of file
diff --git a/packages/partner/pages/marketingOrder1/marketingOrder1.wxss b/packages/partner/pages/marketingOrder1/marketingOrder1.wxss
new file mode 100644
index 0000000..454b046
--- /dev/null
+++ b/packages/partner/pages/marketingOrder1/marketingOrder1.wxss
@@ -0,0 +1,89 @@
+.upkeep_select {
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+ font-weight: 400;
+ font-size: 26rpx;
+ color: #222222;
+ background-color: #F9F9F9;
+ padding: 16rpx 20rpx;
+}
+
+.upkeep_select .ipt {
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+ background-color: #fff;
+ width: 710rpx;
+ height: 98rpx;
+ background: #FFFFFF;
+ border-radius: 100rpx 100rpx 100rpx 100rpx;
+ padding-left: 26rpx;
+ padding-right: 26rpx;
+}
+
+.ipt input {
+ flex: 1;
+ height: 100rpx;
+}
+
+.ipt image {
+ width: 42rpx;
+ height: 42rpx;
+}
+
+.dropBox .van-dropdown-menu {
+ box-shadow: none !important;
+}
+
+.dropBox .van-ellipsis {
+ font-size: 26rpx !important;
+ color: #999999 !important;
+}
+
+
+
+.PackageItem {
+ padding-bottom: 30rpx;
+ margin: 0 20rpx;
+ border-bottom: 1rpx solid rgba(196, 195, 195, 0.925);
+}
+
+.packItem {
+ display: flex;
+ align-items: center;
+}
+
+.packItem_left {
+ width: 240rpx;
+ height: 240rpx;
+ border-radius: 20rpx;
+ overflow: hidden;
+}
+
+.row {
+ display: flex;
+ align-items: center;
+}
+
+.row_label {
+ color: #999;
+}
+
+.packInfo {
+ background: #D5AC66;
+ height: 80rpx;
+ color: #fff;
+ border-radius: 20rpx;
+ font-size: 30rpx;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ margin: 0 auto;
+}
+.packItem_tit{
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+ padding-top: 30rpx;
+}
\ No newline at end of file
diff --git a/packages/partner/pages/marketingOrder2/marketingOrder2.js b/packages/partner/pages/marketingOrder2/marketingOrder2.js
new file mode 100644
index 0000000..4440fcb
--- /dev/null
+++ b/packages/partner/pages/marketingOrder2/marketingOrder2.js
@@ -0,0 +1,80 @@
+// packages/partner/pages/marketingOrder1/marketingOrder1.js
+Page({
+
+ /**
+ * 页面的初始数据
+ */
+ data: {
+ searchText: "",
+
+ option1: [
+ { text: '全部', value: 0 },
+ { text: '系统', value: 1 },
+ { text: 'app', value: 3 },
+ { text: '设备', value: 4 },
+ ],
+ option2: [
+ { text: '全部', value: 0 },
+ ],
+ value1: 0,
+ value2: 0,
+ text1: '营销状态:全部',
+ text2: "营销来源:全部"
+ },
+
+ /**
+ * 生命周期函数--监听页面加载
+ */
+ onLoad(options) {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面初次渲染完成
+ */
+ onReady() {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面显示
+ */
+ onShow() {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面隐藏
+ */
+ onHide() {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面卸载
+ */
+ onUnload() {
+
+ },
+
+ /**
+ * 页面相关事件处理函数--监听用户下拉动作
+ */
+ onPullDownRefresh() {
+
+ },
+
+ /**
+ * 页面上拉触底事件的处理函数
+ */
+ onReachBottom() {
+
+ },
+
+ /**
+ * 用户点击右上角分享
+ */
+ onShareAppMessage() {
+
+ }
+})
\ No newline at end of file
diff --git a/packages/partner/pages/marketingOrder2/marketingOrder2.json b/packages/partner/pages/marketingOrder2/marketingOrder2.json
new file mode 100644
index 0000000..ebc7f3b
--- /dev/null
+++ b/packages/partner/pages/marketingOrder2/marketingOrder2.json
@@ -0,0 +1,4 @@
+{
+ "usingComponents": {},
+ "navigationBarTitleText": "套餐预警营销"
+}
\ No newline at end of file
diff --git a/packages/partner/pages/marketingOrder2/marketingOrder2.wxml b/packages/partner/pages/marketingOrder2/marketingOrder2.wxml
new file mode 100644
index 0000000..01914f0
--- /dev/null
+++ b/packages/partner/pages/marketingOrder2/marketingOrder2.wxml
@@ -0,0 +1,66 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 套餐编号:123123
+
+
+ 订单状态:已完成
+
+
+
+
+
+
+
+
+ 套餐名称:
+ xxxx
+
+
+ 套餐类型:
+ xxxx
+
+
+ 客户姓名:
+ xxxx
+
+
+ 实付价格:
+ xxxx
+
+
+ 支付时间:
+ xxxx
+
+
+
+
+ 查看套餐详情
+
+
+
\ No newline at end of file
diff --git a/packages/partner/pages/marketingOrder2/marketingOrder2.wxss b/packages/partner/pages/marketingOrder2/marketingOrder2.wxss
new file mode 100644
index 0000000..454b046
--- /dev/null
+++ b/packages/partner/pages/marketingOrder2/marketingOrder2.wxss
@@ -0,0 +1,89 @@
+.upkeep_select {
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+ font-weight: 400;
+ font-size: 26rpx;
+ color: #222222;
+ background-color: #F9F9F9;
+ padding: 16rpx 20rpx;
+}
+
+.upkeep_select .ipt {
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+ background-color: #fff;
+ width: 710rpx;
+ height: 98rpx;
+ background: #FFFFFF;
+ border-radius: 100rpx 100rpx 100rpx 100rpx;
+ padding-left: 26rpx;
+ padding-right: 26rpx;
+}
+
+.ipt input {
+ flex: 1;
+ height: 100rpx;
+}
+
+.ipt image {
+ width: 42rpx;
+ height: 42rpx;
+}
+
+.dropBox .van-dropdown-menu {
+ box-shadow: none !important;
+}
+
+.dropBox .van-ellipsis {
+ font-size: 26rpx !important;
+ color: #999999 !important;
+}
+
+
+
+.PackageItem {
+ padding-bottom: 30rpx;
+ margin: 0 20rpx;
+ border-bottom: 1rpx solid rgba(196, 195, 195, 0.925);
+}
+
+.packItem {
+ display: flex;
+ align-items: center;
+}
+
+.packItem_left {
+ width: 240rpx;
+ height: 240rpx;
+ border-radius: 20rpx;
+ overflow: hidden;
+}
+
+.row {
+ display: flex;
+ align-items: center;
+}
+
+.row_label {
+ color: #999;
+}
+
+.packInfo {
+ background: #D5AC66;
+ height: 80rpx;
+ color: #fff;
+ border-radius: 20rpx;
+ font-size: 30rpx;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ margin: 0 auto;
+}
+.packItem_tit{
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+ padding-top: 30rpx;
+}
\ No newline at end of file
diff --git a/packages/partner/pages/master/master.js b/packages/partner/pages/master/master.js
index 20fe480..234c047 100644
--- a/packages/partner/pages/master/master.js
+++ b/packages/partner/pages/master/master.js
@@ -113,7 +113,13 @@ Page({
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
-
+ let that= this
+ that.setData({
+ flag:false,
+ page_num:1,
+ MasterList:[],
+ })
+ that.getMasterList()
},
/**
diff --git a/packages/partner/pages/master/master.json b/packages/partner/pages/master/master.json
index afe92de..775b046 100644
--- a/packages/partner/pages/master/master.json
+++ b/packages/partner/pages/master/master.json
@@ -2,5 +2,6 @@
"usingComponents": {
"Footer":"/component/footer/index"
},
- "navigationBarTitleText": "师傅管理"
+ "navigationBarTitleText": "师傅管理",
+ "enablePullDownRefresh": true
}
\ No newline at end of file
diff --git a/packages/partner/pages/master/master.wxss b/packages/partner/pages/master/master.wxss
index 4212353..acdc085 100644
--- a/packages/partner/pages/master/master.wxss
+++ b/packages/partner/pages/master/master.wxss
@@ -11,8 +11,8 @@
}
.masterItem_ava image {
- width: 74rpx;
- height: 74rpx;
+ width: 144rpx;
+ height: 144rpx;
z-index: 3;
}
@@ -24,6 +24,7 @@
height: 144rpx;
background: rgba(77, 154, 255,.5);
border-radius: 50%;
+ overflow: hidden;
}
.masterItem_avaBox {
diff --git a/packages/partner/pages/mine/mine.js b/packages/partner/pages/mine/mine.js
new file mode 100644
index 0000000..a27fedb
--- /dev/null
+++ b/packages/partner/pages/mine/mine.js
@@ -0,0 +1,206 @@
+let util = require('../../../../utils/util')
+// const apiArr = require('../../../api/water_filter')
+const apiArr = require('../../../../api/partner')
+const app = getApp({ allowDefault: true })
+
+
+
+// packages/partner/pages/partner.js
+Page({
+
+ /**
+ * 页面的初始数据
+ */
+ data: {
+ s: app.system.statusBarHeight, // 状态栏高度
+ n: (app.menu.top - app.system.statusBarHeight) * 2 + app.menu.height, // 导航栏高度
+ t: app.menu.top, // 胶囊局顶部距离
+ h: app.menu.height, // 胶囊高度
+
+ nav_list:{},
+ foot_width:"",
+ funcList:[
+ {
+ text:"设备管理",
+ img:"https://wechat-img-file.oss-cn-beijing.aliyuncs.com/water_filter/partner/partner_icon2.png?1",
+ url:"/packages/partner/pages/device/device",
+ },
+
+ {
+ text:"师傅管理",
+ img:"https://wechat-img-file.oss-cn-beijing.aliyuncs.com/water_filter/partner/partner_icon6.png?1",
+ url:"../master/master",
+ },
+ {
+ text:"收银台",
+ img:"https://wechat-img-file.oss-cn-beijing.aliyuncs.com/water_filter/partner/partner_icon7.png?1",
+ // url:"../pages/desk/desk",
+ },
+
+ {
+ text:"分配经销商",
+ img:"https://wechat-img-file.oss-cn-beijing.aliyuncs.com/partner_icon_new1.png",
+ url:"/packages/partner/pages/distributor/distributor",
+ },
+ {
+ text:"设备库存",
+ img:"https://wechat-img-file.oss-cn-beijing.aliyuncs.com/equipmentStock.png",
+ url:"/packages/partner/pages/equipmentStock/equipmentStock",
+ },
+ {
+ text:"滤芯库存",
+ img:"https://wechat-img-file.oss-cn-beijing.aliyuncs.com/filterStock.png",
+ url:"/packages/partner/pages/filterStock/filterStock",
+ },
+ {
+ text:"消息订阅",
+ img:"https://wechat-img-file.oss-cn-beijing.aliyuncs.com/SubscribeMessageIcon.png",
+ url:"/pages/SubscribeMessage/SubscribeMessage",
+ },
+ ],
+ Info:"",
+ order:"",
+ },
+
+ back(){
+ wx.reLaunch({
+ url: '/pages/newLogin/newLogin',
+ })
+ },
+ editAdmin(){
+ wx.navigateTo({
+ url: '/packages/partner/pages/editAdmin/editAdmin',
+ })
+ },
+ padToEightDigits(number) {
+ // 将数字转换为字符串,并使用 padStart 补足到 8 位
+ return String(number).padStart(8, '0');
+ },
+
+ getOrderList(){
+ let that = this
+ let admin = wx.getStorageSync('admin')
+ util.postUrl4(apiArr.getPartnerOrder,{
+ dealer_id:admin.shop_id
+ },res=>{
+ that.setData({
+ order:res
+ })
+ })
+ },
+
+ getParter(){
+ let that =this
+ wx.showLoading({
+ title: '加载中...',
+ mask:true
+ })
+ let admin = wx.getStorageSync('admin')
+ util.postUrl4(apiArr.getPartner,{
+ deal_id:admin.shop_id
+ },res=>{
+ wx.hideLoading()
+ res.No = that.padToEightDigits(res.deal_id)
+ if(res.deal_icon){
+ res.deal_icon = res.deal_icon.startsWith('http')?res.deal_icon:util.img_url + res.deal_icon
+ }
+ console.log(admin.shop_id);
+ if(admin.shop_id != 1){
+ let funcList = that.data.funcList
+ funcList.splice(7,1)
+ that.setData({
+ funcList
+ })
+ }
+ that.setData({
+ Info:res
+ })
+ })
+ },
+
+ jump(e){
+ console.log(e);
+ if(!e.currentTarget.dataset.url){
+ return wx.showToast({
+ title: '功能暂未开通',
+ icon:"none"
+ })
+ }
+ wx.navigateTo({
+ url: e.currentTarget.dataset.url,
+ })
+ },
+
+ /**
+ * 生命周期函数--监听页面加载
+ */
+ onLoad(options) {
+ let that = this
+ // that.getOrderList()
+ wx.showShareMenu({
+ withShareTicket: true,
+ menus: ['shareAppMessage', 'shareTimeline']
+ })
+ },
+
+ /**
+ * 生命周期函数--监听页面初次渲染完成
+ */
+ onReady() {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面显示
+ */
+ onShow() {
+ let that = this
+ that.getParter()
+ },
+
+ /**
+ * 生命周期函数--监听页面隐藏
+ */
+ onHide() {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面卸载
+ */
+ onUnload() {
+
+ },
+
+ /**
+ * 页面相关事件处理函数--监听用户下拉动作
+ */
+ onPullDownRefresh() {
+
+ },
+
+ /**
+ * 页面上拉触底事件的处理函数
+ */
+ onReachBottom() {
+
+ },
+
+ /**
+ * 用户点击右上角分享
+ */
+ onShareAppMessage(){
+ return {
+ title: '人人爱净水', // 分享卡片标题(必填)
+ path: '/pages/water_filter/water_filter', // 用户点击后跳转的路径(可选,默认当前页)
+ imageUrl: 'https://wechat-img-file.oss-cn-beijing.aliyuncs.com/share.png' // 自定义图片(可选,比例建议 5:4)
+ }
+},
+onShareTimeline() {
+ return {
+ title: '人人爱净水', // 自定义标题
+ query: '', // 自定义页面路径中的参数
+ imageUrl: 'https://wechat-img-file.oss-cn-beijing.aliyuncs.com/share.png' // 自定义分享图片路径
+ }
+},
+})
\ No newline at end of file
diff --git a/packages/partner/pages/mine/mine.json b/packages/partner/pages/mine/mine.json
new file mode 100644
index 0000000..b679a8b
--- /dev/null
+++ b/packages/partner/pages/mine/mine.json
@@ -0,0 +1,6 @@
+{
+ "usingComponents": {
+ "Footer":"/component/partnerFooter/index"
+ },
+ "navigationStyle": "custom"
+ }
\ No newline at end of file
diff --git a/packages/partner/pages/mine/mine.wxml b/packages/partner/pages/mine/mine.wxml
new file mode 100644
index 0000000..be28625
--- /dev/null
+++ b/packages/partner/pages/mine/mine.wxml
@@ -0,0 +1,62 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{Info.deal_name}}
+ 编码:{{Info.deal_code}}
+ 手机号:{{Info.owner_phone}}
+
+
+
+
+ 修改
+
+
+
+
+ 功能服务
+
+
+
+ {{item.text}}
+
+
+
+
+
\ No newline at end of file
diff --git a/packages/partner/pages/mine/mine.wxss b/packages/partner/pages/mine/mine.wxss
new file mode 100644
index 0000000..a1343e6
--- /dev/null
+++ b/packages/partner/pages/mine/mine.wxss
@@ -0,0 +1,175 @@
+.partner {
+ background: linear-gradient( 359deg, rgba(255,255,255,0) 0%, rgba(77,154,255,0.15) 100%);
+ height: calc( 100vh - 120rpx);
+}
+
+.UserInfo {
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+ margin-left: 25rpx;
+ margin-right: 20rpx;
+ padding-top: 20rpx;
+ margin-bottom: 40rpx;
+}
+
+.UserInfo_msg {
+ display: flex;
+
+}
+
+.UserInfo_ava {
+ width: 126rpx;
+ height: 126rpx;
+ /* background: linear-gradient( 150deg, #E4EFFF 0%, #2583FF 100%); */
+ box-sizing: border-box;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ border-radius: 50%;
+ overflow: hidden;
+ margin-right: 30rpx;
+}
+
+.UserInfo_ava image {
+ width:100%;
+ height: 100%;
+ border-radius: 50%;
+ overflow: hidden;
+}
+
+.UserInfo_Info_name {
+ font-weight: 400;
+ font-size: 30rpx;
+ color: #222222;
+}
+
+.UserInfo_Info_company {
+ font-weight: 400;
+ font-size: 24rpx;
+ color: #999999;
+ margin-top: 10rpx;
+}
+
+.UserInfo_level {
+ display: flex;
+ flex-direction: column;
+ align-items: center;
+}
+
+.UserInfo_level image {
+ width: 90.92rpx;
+ height: 95.29rpx;
+ margin-left: -18rpx;
+ margin-bottom: 10rpx;
+}
+
+/* .UserInfo_level view {
+ font-weight: 400;
+ font-size: 22rpx;
+ color: #FFFFFF;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ width: 139rpx;
+ height: 32rpx;
+ background: #D5AC66;
+ border-radius: 100rpx 100rpx 100rpx 100rpx;
+} */
+
+.text1 {
+ font-weight: 400;
+ font-size: 22rpx;
+ color: #222222;
+ margin-bottom: 10rpx;
+ margin-left: 30rpx;
+}
+
+.orderList {
+ width: 710rpx;
+ height: 150rpx;
+ background: #FFFFFF;
+ border-radius: 30rpx 30rpx 30rpx 30rpx;
+ margin: 0 auto;
+ margin-top: 10rpx;
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+ box-sizing: border-box;
+ padding: 0 56rpx;
+}
+
+.orderItem {
+ display: flex;
+ flex-direction: column;
+ align-items: center;
+}
+
+.orderNum {
+ font-weight: 400;
+ font-size: 40rpx;
+ color: #222222;
+}
+
+.orderText {
+ font-weight: 400;
+ font-size: 26rpx;
+ color: #999999;
+}
+
+.Tit {
+ font-weight: bold;
+ font-size: 32rpx;
+ color: #222222;
+ margin-left: 30rpx;
+ margin-top: 75rpx;
+}
+.Tit2 {
+ font-weight: bold;
+ font-size: 32rpx;
+ color: #222222;
+ margin-left: 30rpx;
+ margin-top: 30rpx;
+}
+
+.func {
+ display: flex;
+ flex-wrap: wrap;
+ padding: 0 50rpx;
+ margin-top: 46rpx;
+}
+
+.funcItem {
+ display: flex;
+ flex-direction: column;
+ align-items: center;
+ font-weight: 400;
+ font-size: 26rpx;
+ color: #222222;
+ width: 25%;
+ margin-bottom: 50rpx;
+}
+.funcItem3 {
+ display: flex;
+ flex-direction: column;
+ align-items: center;
+ font-weight: 400;
+ font-size: 26rpx;
+ color: #222222;
+ width: 30%;
+ margin-bottom: 50rpx;
+}
+
+.funcItem image {
+ height: 54rpx;
+ margin-bottom: 15rpx;
+}
+.funcItem3 image {
+ height: 54rpx;
+ margin-bottom: 15rpx;
+}
+.UserInfo_level .edit{
+ border: 1rpx solid #999;
+ padding: 10rpx 20rpx;
+ border-radius: 10rpx;
+}
\ No newline at end of file
diff --git a/packages/partner/pages/newWorkOrder/newWorkOrder.js b/packages/partner/pages/newWorkOrder/newWorkOrder.js
index 77d39c6..3b7bb67 100644
--- a/packages/partner/pages/newWorkOrder/newWorkOrder.js
+++ b/packages/partner/pages/newWorkOrder/newWorkOrder.js
@@ -19,13 +19,13 @@ Page({
package: {},//套餐
customer_name: "",//顾客姓名
customer_phone: "",//顾客电话
- customer_id:"",
+ customer_id: "",
area: "",
address: "",
show3: false,
show2: false,
- show4:false,
+ show4: false,
cityList: [],
areaList: [],
businessList: [],
@@ -35,7 +35,7 @@ Page({
confirmArea: '',
confirmBusiness: '',
minDate: new Date().getTime(),
- time:"",
+ time: "",
packageList: [],//套餐列表
masterList: [], //师傅列表
formatter(type, value) {
@@ -50,21 +50,21 @@ Page({
}
return value;
},
- product:"",
- show5:false,
- productList:[]
+ product: "",
+ show5: false,
+ productList: []
},
- changeShow5(){
- let that=this
+ changeShow5() {
+ let that = this
that.setData({
- show5:true
+ show5: true
})
},
- cancel5(){
- let that= this
+ cancel5() {
+ let that = this
that.setData({
- show5:false
+ show5: false
})
},
changeCustomerName(e) {
@@ -78,27 +78,31 @@ Page({
that.setData({
customer_phone: e.detail.value
})
- that.searchCustomer(e.detail.value)
-
+ if(e.detail.value.length == 11){
+ that.searchCustomer(e.detail.value)
+ }
},
- searchCustomer(e){
- let that= this
- util.postUrl4(apiArr.phoneSearch,{
- phone:e
- },res=>{
+ searchCustomer(e) {
+ let that = this
+ util.postUrl4(apiArr.phoneSearch, {
+ phone: e
+ }, res => {
console.log(res);
- if(res.row){
+ if (res.row.length == 1) {
that.setData({
- customer_name:res.row.name,
- address:res.row.address,
- customer_id:res.row.info_id,
+ customer_name: res.row[0].name,
+ address: res.row[0].address,
+ customer_id: res.row[0].info_id,
+ area:res.row[0].region,
+ address:res.row[0].address,
+ customer_phone:res.row[0].phone,
})
- }else{
+ } else {
that.setData({
- customer_name:'',
- address:'',
- customer_id:0
+ customer_name: '',
+ address: '',
+ customer_id: 0
})
}
})
@@ -122,7 +126,8 @@ Page({
show2: false
})
},
- onClose3() {
+ onClose6() {
+ console.log(123);
let that = this
that.setData({
show3: false
@@ -140,7 +145,7 @@ Page({
show3: true
})
},
- changeShow4(){
+ changeShow4() {
let that = this
that.setData({
show4: true
@@ -202,23 +207,51 @@ Page({
util.postUrl2(apiArr2.area, {}, res1 => {
util.postUrl2(apiArr2.business, {}, res2 => {
wx.hideLoading();
- // 默认展示第一条数据 的市区 和 城区
+ // 省列表来自 res
+ let cityList = res.data.data.rows;
+
+ // 市列表来自 res1
+ let areaList = res1.data.data.rows;
+ // 区列表来自 res2
+ let businessList = res2.data.data.rows;
+
+ // 处理市列表,将衡水市放到最后
+ let hengshuiIndex = areaList.findIndex(item => item.name === '衡水市');
+ console.log(hengshuiIndex, 'hengshuiIndex');
+ if (hengshuiIndex !== -1) {
+ const hengshui = areaList.splice(hengshuiIndex, 1)[0];
+ areaList.push(hengshui);
+ }
+
+ console.log(businessList);
+ // 处理区列表,将衡水市的桃城区放到最后一个
+ let taochengIndex = businessList.findIndex(item => item.business_name === '桃城区');
+ if (taochengIndex !== -1) {
+ const taocheng = businessList.splice(taochengIndex, 1)[0];
+ businessList.unshift(taocheng);
+ }
+
+
+ // 默认展示第一条数据的省、市和区
let newArea = res1.data.data.rows.filter((item) => {
return item.city_id === res.data.data.rows[0].city_id
});
let newbus = res2.data.data.rows.filter((item) => {
return item.area_id === res1.data.data.rows[0].area_id
});
- wx.setStorageSync('cityList', res.data.data.rows)
- wx.setStorageSync('areaList', res1.data.data.rows)
- wx.setStorageSync('businessList', res2.data.data.rows)
+
+ // 正确存储数据
+ wx.setStorageSync('cityList', cityList)
+ wx.setStorageSync('areaList', areaList)
+ wx.setStorageSync('businessList', businessList)
+
this.setData({
- cityList: res.data.data.rows,
- areaList: res1.data.data.rows,
- businessList: res2.data.data.rows,
- newAreaList: newArea, // 默认展示 市区
- newBusiness: newbus, // 默认展示 县/区
- confirmCity: res1.data.data.rows[0],
+ cityList: cityList,
+ areaList: areaList,
+ businessList: businessList,
+ newAreaList: newArea, // 默认展示市
+ newBusiness: newbus, // 默认展示区
+ confirmCity: cityList[0],
confirmArea: newArea[0],
confirmBusiness: newbus[0],
})
@@ -258,7 +291,7 @@ Page({
show: false
})
},
- confirmproduct(e){
+ confirmproduct(e) {
let that = this
that.setData({
product: e.detail.value,
@@ -271,13 +304,12 @@ Page({
package: e.detail.value,
show: false,
})
-
- util.postUrl4(apiArr.getproductList,{
- package_id:e.detail.value.package_id
- },res=>{
+ util.postUrl4(apiArr.getproductList, {
+ package_id: e.detail.value.package_id
+ }, res => {
console.log(res);
that.setData({
- productList:res.rows
+ productList: res.rows
})
})
},
@@ -315,9 +347,6 @@ Page({
submit() {
let that = this
- console.log(that.data.package.package_id);
- console.log(that.data.masterInfo);
-
if (!that.data.package) {
return wx.showToast({
title: '请选择套餐',
@@ -366,7 +395,7 @@ Page({
icon: "none"
})
}
- if(!that.data.time){
+ if (!that.data.time) {
return wx.showToast({
title: '请选择预约时间',
icon: "none"
@@ -375,37 +404,41 @@ Page({
util.postUrl4(apiArr.createNewOrder, {
packages_id: that.data.package.package_id,
- product_id:that.data.product.product_id,
+ product_id: that.data.product.product_id,
customer_id: that.data.customer_id,
customer_name: that.data.customer_name,
customer_phone: that.data.customer_phone,
region: that.data.area,
address: that.data.address,
- remark:that.data.remark,
+ remark: that.data.remark,
repairman_id: that.data.masterInfo.info_id,
dealer_id: that.data.admin.shop_id,
city_id: that.data.confirmCity.city_id,
area_id: that.data.confirmArea.area_id,
business_id: that.data.confirmBusiness.business_id,
appointment_time: that.data.time + ':00',
- user_id:wx.getStorageSync('userId')?wx.getStorageSync('userId'):0,
- },res=>{
+ user_id: wx.getStorageSync('userId') ? wx.getStorageSync('userId') : 0,
+ }, res => {
console.log(res);
- if(res.msg == '操作成功'){
+ if (res.msg == '操作成功') {
wx.showToast({
- title: '创建成功!',
- icon:"none"
+ title: '创建成功!',
+ icon: "none"
})
+ // wx.navigateBack({ //返回上一页
+ // delta: 1
+ // })
setTimeout(()=>{
- wx.navigateBack({
- delta:1
+ wx.navigateTo({
+ url: `/packages/partner/pages/OrderMsgInfo/OrderMsgInfo?type=0&id=${res.install_id}`,
})
},1500)
- }else{
+
+ } else {
wx.showToast({
title: '创建失败!',
- icon:"none"
- })
+ icon: "none"
+ })
}
})
},
@@ -419,6 +452,8 @@ Page({
that.setData({
admin: wx.getStorageSync('admin')
})
+ console.log(apiArr.getPackageList,'asd');
+
that.getPackageList()
that.getMasterList()
@@ -447,7 +482,6 @@ Page({
} else {
that.getSSQ()
}
- // that.getSSQ()
},
/**
diff --git a/packages/partner/pages/newWorkOrder/newWorkOrder.wxml b/packages/partner/pages/newWorkOrder/newWorkOrder.wxml
index 4216877..a3717af 100644
--- a/packages/partner/pages/newWorkOrder/newWorkOrder.wxml
+++ b/packages/partner/pages/newWorkOrder/newWorkOrder.wxml
@@ -102,10 +102,10 @@
*
- 维修师傅
+ 安装师傅
-
+
@@ -160,8 +160,8 @@
-
-
+
+
diff --git a/packages/partner/pages/order1/order1.js b/packages/partner/pages/order1/order1.js
new file mode 100644
index 0000000..7a45f2b
--- /dev/null
+++ b/packages/partner/pages/order1/order1.js
@@ -0,0 +1,82 @@
+// packages/partner/pages/marketingOrder1/marketingOrder1.js
+Page({
+
+ /**
+ * 页面的初始数据
+ */
+ data: {
+ searchText:"",
+
+ option1: [
+ { text: '全部', value: 0 },
+ { text: '待支付', value: 1 },
+ { text: '已支付', value: 3 },
+ { text: '已取消', value: 4 },
+ ],
+ option2: [
+ { text: '全部', value: 0 },
+ { text: '系统', value: 1 },
+ { text: 'app', value: 3 },
+ ],
+ value1: 0,
+ value2: 0,
+ text1:'订单状态:全部',
+ text2:"订单来源:全部"
+ },
+
+ /**
+ * 生命周期函数--监听页面加载
+ */
+ onLoad(options) {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面初次渲染完成
+ */
+ onReady() {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面显示
+ */
+ onShow() {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面隐藏
+ */
+ onHide() {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面卸载
+ */
+ onUnload() {
+
+ },
+
+ /**
+ * 页面相关事件处理函数--监听用户下拉动作
+ */
+ onPullDownRefresh() {
+
+ },
+
+ /**
+ * 页面上拉触底事件的处理函数
+ */
+ onReachBottom() {
+
+ },
+
+ /**
+ * 用户点击右上角分享
+ */
+ onShareAppMessage() {
+
+ }
+ })
\ No newline at end of file
diff --git a/packages/partner/pages/order1/order1.json b/packages/partner/pages/order1/order1.json
new file mode 100644
index 0000000..32bcd21
--- /dev/null
+++ b/packages/partner/pages/order1/order1.json
@@ -0,0 +1,4 @@
+{
+ "usingComponents": {},
+ "navigationBarTitleText": "滤芯订单(零售)"
+}
\ No newline at end of file
diff --git a/packages/partner/pages/order1/order1.wxml b/packages/partner/pages/order1/order1.wxml
new file mode 100644
index 0000000..e4fc97d
--- /dev/null
+++ b/packages/partner/pages/order1/order1.wxml
@@ -0,0 +1,66 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 套餐编号:123123
+
+
+ 订单状态:已完成
+
+
+
+
+
+
+
+
+ 套餐名称:
+ xxxx
+
+
+ 套餐类型:
+ xxxx
+
+
+ 客户姓名:
+ xxxx
+
+
+ 实付价格:
+ xxxx
+
+
+ 支付时间:
+ xxxx
+
+
+
+
+ 查看套餐详情
+
+
+
\ No newline at end of file
diff --git a/packages/partner/pages/order1/order1.wxss b/packages/partner/pages/order1/order1.wxss
new file mode 100644
index 0000000..454b046
--- /dev/null
+++ b/packages/partner/pages/order1/order1.wxss
@@ -0,0 +1,89 @@
+.upkeep_select {
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+ font-weight: 400;
+ font-size: 26rpx;
+ color: #222222;
+ background-color: #F9F9F9;
+ padding: 16rpx 20rpx;
+}
+
+.upkeep_select .ipt {
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+ background-color: #fff;
+ width: 710rpx;
+ height: 98rpx;
+ background: #FFFFFF;
+ border-radius: 100rpx 100rpx 100rpx 100rpx;
+ padding-left: 26rpx;
+ padding-right: 26rpx;
+}
+
+.ipt input {
+ flex: 1;
+ height: 100rpx;
+}
+
+.ipt image {
+ width: 42rpx;
+ height: 42rpx;
+}
+
+.dropBox .van-dropdown-menu {
+ box-shadow: none !important;
+}
+
+.dropBox .van-ellipsis {
+ font-size: 26rpx !important;
+ color: #999999 !important;
+}
+
+
+
+.PackageItem {
+ padding-bottom: 30rpx;
+ margin: 0 20rpx;
+ border-bottom: 1rpx solid rgba(196, 195, 195, 0.925);
+}
+
+.packItem {
+ display: flex;
+ align-items: center;
+}
+
+.packItem_left {
+ width: 240rpx;
+ height: 240rpx;
+ border-radius: 20rpx;
+ overflow: hidden;
+}
+
+.row {
+ display: flex;
+ align-items: center;
+}
+
+.row_label {
+ color: #999;
+}
+
+.packInfo {
+ background: #D5AC66;
+ height: 80rpx;
+ color: #fff;
+ border-radius: 20rpx;
+ font-size: 30rpx;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ margin: 0 auto;
+}
+.packItem_tit{
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+ padding-top: 30rpx;
+}
\ No newline at end of file
diff --git a/packages/partner/pages/order2/order2.js b/packages/partner/pages/order2/order2.js
new file mode 100644
index 0000000..4cddf63
--- /dev/null
+++ b/packages/partner/pages/order2/order2.js
@@ -0,0 +1,67 @@
+// packages/partner/pages/order2/order2.js
+Page({
+
+ /**
+ * 页面的初始数据
+ */
+ data: {
+ searchText:"",
+
+ },
+
+ /**
+ * 生命周期函数--监听页面加载
+ */
+ onLoad(options) {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面初次渲染完成
+ */
+ onReady() {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面显示
+ */
+ onShow() {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面隐藏
+ */
+ onHide() {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面卸载
+ */
+ onUnload() {
+
+ },
+
+ /**
+ * 页面相关事件处理函数--监听用户下拉动作
+ */
+ onPullDownRefresh() {
+
+ },
+
+ /**
+ * 页面上拉触底事件的处理函数
+ */
+ onReachBottom() {
+
+ },
+
+ /**
+ * 用户点击右上角分享
+ */
+ onShareAppMessage() {
+
+ }
+})
\ No newline at end of file
diff --git a/packages/partner/pages/order2/order2.json b/packages/partner/pages/order2/order2.json
new file mode 100644
index 0000000..40846d2
--- /dev/null
+++ b/packages/partner/pages/order2/order2.json
@@ -0,0 +1,4 @@
+{
+ "usingComponents": {},
+ "navigationBarTitleText": "套餐订单(租赁)"
+}
\ No newline at end of file
diff --git a/packages/partner/pages/order2/order2.wxml b/packages/partner/pages/order2/order2.wxml
new file mode 100644
index 0000000..f225048
--- /dev/null
+++ b/packages/partner/pages/order2/order2.wxml
@@ -0,0 +1,57 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 套餐编号:123123
+
+
+ 订单状态:已完成
+
+
+
+
+
+
+
+
+ 套餐名称:
+ xxxx
+
+
+ 套餐类型:
+ xxxx
+
+
+ 客户姓名:
+ xxxx
+
+
+ 实付价格:
+ xxxx
+
+
+ 支付时间:
+ xxxx
+
+
+
+
+ 查看套餐详情
+
+
+
+
\ No newline at end of file
diff --git a/packages/partner/pages/order2/order2.wxss b/packages/partner/pages/order2/order2.wxss
new file mode 100644
index 0000000..4a19892
--- /dev/null
+++ b/packages/partner/pages/order2/order2.wxss
@@ -0,0 +1,83 @@
+image {
+ width: 100%;
+ height: 100%;
+}
+
+.upkeep_select {
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+ font-weight: 400;
+ font-size: 26rpx;
+ color: #222222;
+ background-color: #F9F9F9;
+ padding: 16rpx 20rpx;
+}
+
+.upkeep_select .ipt {
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+ background-color: #fff;
+ width: 710rpx;
+ height: 98rpx;
+ background: #FFFFFF;
+ border-radius: 100rpx 100rpx 100rpx 100rpx;
+ padding-left: 26rpx;
+ padding-right: 26rpx;
+}
+
+.ipt input {
+ flex: 1;
+ height: 100rpx;
+}
+
+.ipt image {
+ width: 42rpx;
+ height: 42rpx;
+}
+
+.PackageItem {
+ padding-bottom: 30rpx;
+ margin: 0 20rpx;
+ border-bottom: 1rpx solid rgba(196, 195, 195, 0.925);
+}
+
+.packItem {
+ display: flex;
+ align-items: center;
+}
+
+.packItem_left {
+ width: 240rpx;
+ height: 240rpx;
+ border-radius: 20rpx;
+ overflow: hidden;
+}
+
+.row {
+ display: flex;
+ align-items: center;
+}
+
+.row_label {
+ color: #999;
+}
+
+.packInfo {
+ background: #D5AC66;
+ height: 80rpx;
+ color: #fff;
+ border-radius: 20rpx;
+ font-size: 30rpx;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ margin: 0 auto;
+}
+.packItem_tit{
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+ padding-top: 30rpx;
+}
\ No newline at end of file
diff --git a/packages/partner/pages/orderDesc/orderDesc.js b/packages/partner/pages/orderDesc/orderDesc.js
index 33d8e11..30dffe8 100644
--- a/packages/partner/pages/orderDesc/orderDesc.js
+++ b/packages/partner/pages/orderDesc/orderDesc.js
@@ -34,6 +34,9 @@ Page({
}
}
util.postUrl4(url,param,res=>{
+ if(res.fault_imgs){
+ res.fault_imgs = res.fault_imgs.startsWith('http')?res.fault_imgs : util.img_url + res.fault_imgs
+ }
that.setData({
Info:res
})
@@ -42,7 +45,7 @@ Page({
headerPicClick() {
wx.previewImage({
- urls: [ util.img_url + this.data.Info.fault_imgs]
+ urls: [ this.data.Info.fault_imgs]
})
},
diff --git a/packages/partner/pages/orderDesc/orderDesc.wxml b/packages/partner/pages/orderDesc/orderDesc.wxml
index 4e407de..ad68e2f 100644
--- a/packages/partner/pages/orderDesc/orderDesc.wxml
+++ b/packages/partner/pages/orderDesc/orderDesc.wxml
@@ -1,60 +1,54 @@
-
- 设备编码
- {{Info.device_iccid}}
-
-
- 设备名称
- {{Info.product_name}}
-
-
- 报修内容
- {{Info.repair_desc}}
-
-
- 故障描述
- {{Info.fault_desc}}
-
-
- 维修人
- {{Info.repairman_name}}
-
-
- 故障时间
- {{Info.create_time}}
-
-
- 报修时间
- {{Info.repair_time}}
-
-
- 故障图片
-
-
-
+
+ 订单编号
+ {{Info.repair_no}}
+
+
+ 产品名称
+ {{Info.product_name}}
+
+
+ 设备编码
+ {{Info.device_code}}
+
+
+
+ 报修内容
+ {{Info.repair_desc}}
+
+
+ 故障描述
+ {{Info.fault_desc}}
+
+
+ 维修人
+ {{Info.repairman_name}}
+
+
+ 故障时间
+ {{Info.create_time}}
+
+
+ 报修时间
+ {{Info.repair_time}}
+
+
+ 故障图片
+
+
+
-
-
-
-
-
-
+ 订单编号
+ {{Info.install_no}}
+
+
+
产品名称
{{Info.product_name}}
@@ -66,12 +60,12 @@
- 维修师傅
+ 安装师傅
{{Info.repairman_name}}
- 维修师傅电话
+ 师傅手机
{{Info.repairman_phone}}
@@ -84,12 +78,12 @@
客户电话
{{Info.customer_phone}}
-
+
客户地址
{{ Info.region +Info.address}}
-
-
+
+
创建时间
{{Info.create_time}}
@@ -110,6 +104,4 @@
工单备注
{{Info.remark}}
-
-
-
+
\ No newline at end of file
diff --git a/packages/partner/pages/orderDesc/orderDesc.wxss b/packages/partner/pages/orderDesc/orderDesc.wxss
index 080ee01..8121359 100644
--- a/packages/partner/pages/orderDesc/orderDesc.wxss
+++ b/packages/partner/pages/orderDesc/orderDesc.wxss
@@ -1,6 +1,7 @@
-.desc{
+.desc {
padding-top: 30rpx;
}
+
.descItem {
display: flex;
align-items: center;
@@ -21,6 +22,8 @@
font-weight: 400;
font-size: 26rpx;
color: #222222;
+ flex: 1;
+ text-align: right;
}
.descItem2 {
@@ -31,44 +34,61 @@
margin-bottom: 20rpx;
}
-.descItem2 .descItem_con{
+.descItem2 .descItem_con {
margin-top: 20rpx;
}
+
.container {
- margin-top: 30rpx;
+ margin-top: 30rpx;
}
+
.item {
- margin: 0 20rpx 21rpx;
+ margin: 0 20rpx 21rpx;
+ display: flex;
+
}
+
.label {
- font-weight: 400;
- font-size: 26rpx;
- color: #999999;
+ font-weight: 400;
+ font-size: 26rpx;
+ color: #999999;
}
+
.label_desc {
- display: inline-block;
- margin-left: 30rpx;
- font-weight: 400;
- font-size: 26rpx;
- color: #222222;
+ display: inline-block;
+ margin-left: 30rpx;
+ font-weight: 400;
+ font-size: 26rpx;
+ color: #222222;
+ flex: 1;
+ text-align: right;
+ overflow: hidden;
+ overflow-x: auto;
}
+
.wx_name {
- margin-left: 57rpx;
+ margin-left: 57rpx;
}
+
.pic_item {
- display: flex;
+ display: flex;
}
+
.pic_view {
- margin-left: 44rpx;
- display: flex;
- flex: 1;
- height: 120rpx;
+ margin-left: 44rpx;
+ display: flex;
+ flex: 1;
+ height: 120rpx;
+ justify-content: flex-end;
}
+
.label_pic {
- width: 120rpx !important;
- height: 120rpx !important;
- margin-right: 20rpx;
+ width: 300rpx;
+ height: 300rpx;
+ margin-right: 20rpx;
+ box-shadow: 0 4rpx 16rpx rgba(0, 0, 0, 0.1);
}
+
.label_pic:last-child {
- margin-right: 0;
+ margin-right: 0;
}
\ No newline at end of file
diff --git a/packages/partner/pages/partner.js b/packages/partner/pages/partner.js
index 79ba1ff..e693425 100644
--- a/packages/partner/pages/partner.js
+++ b/packages/partner/pages/partner.js
@@ -1,195 +1,234 @@
let util = require('../../../utils/util')
// const apiArr = require('../../../api/water_filter')
const apiArr = require('../../../api/partner')
+const apiArr2 = require('../../../api/water_filter')
+
+const app = getApp({ allowDefault: true })
// packages/partner/pages/partner.js
Page({
- /**
- * 页面的初始数据
- */
- data: {
- nav_list:{},
- foot_width:"",
- funcList:[
- // {
- // text:"进货管理",
- // img:"https://wechat-img-file.oss-cn-beijing.aliyuncs.com/water_filter/partner/partner_icon1.png?1",
- // url:"../pages/purchaseGoods/purchaseGoods",
- // },
- {
- text:"设备管理",
- img:"https://wechat-img-file.oss-cn-beijing.aliyuncs.com/water_filter/partner/partner_icon2.png?1",
- url:"../../WaterPurifier/pages/device/deviceList/deviceList",
- },
- {
- text:"新装工单",
- img:"https://wechat-img-file.oss-cn-beijing.aliyuncs.com/water_filter/partner/partner_icon3.png?1",
- url:"../pages/WorkOrder/WorkOrder",
- },
- {
- text:"维修工单",
- img:"https://wechat-img-file.oss-cn-beijing.aliyuncs.com/water_filter/partner/partner_icon4.png?1",
- url:"../../WaterPurifier/pages/upKeep/upKeep",
- },
- {
- text:"拆除工单",
- img:"https://wechat-img-file.oss-cn-beijing.aliyuncs.com/removeIcon.png",
- url:"../pages/removeOrder/removeOrder",
- },
- {
- text:"滤芯更换工单",
- img:"https://wechat-img-file.oss-cn-beijing.aliyuncs.com/partsIcon.png",
- url:"../pages/partsOrder/partsOrder",
- },
- // {
- // text:"我的团队",
- // img:"https://wechat-img-file.oss-cn-beijing.aliyuncs.com/water_filter/partner/partner_icon5.png?1",
- // url:"../pages/team/team",
- // },
- {
- text:"师傅管理",
- img:"https://wechat-img-file.oss-cn-beijing.aliyuncs.com/water_filter/partner/partner_icon6.png?1",
- url:"../pages/master/master",
- },
- {
- text:"收银台",
- img:"https://wechat-img-file.oss-cn-beijing.aliyuncs.com/water_filter/partner/partner_icon7.png?1",
- // url:"../pages/desk/desk",
- },
- {
- text:"消息订阅",
- img:"https://wechat-img-file.oss-cn-beijing.aliyuncs.com/SubscribeMessageIcon.png",
- url:"/pages/SubscribeMessage/SubscribeMessage",
- },
- ],
- Info:"",
- order:"",
- },
+ /**
+ * 页面的初始数据
+ */
+ data: {
+ s: app.system.statusBarHeight, // 状态栏高度
+ n: (app.menu.top - app.system.statusBarHeight) * 2 + app.menu.height, // 导航栏高度
+ t: app.menu.top, // 胶囊局顶部距离
+ h: app.menu.height, // 胶囊高度
- padToEightDigits(number) {
- // 将数字转换为字符串,并使用 padStart 补足到 8 位
- return String(number).padStart(8, '0');
- },
+ nav_list: {},
+ foot_width: "",
+ funcList: [
- getOrderList(){
- let that = this
- let admin = wx.getStorageSync('admin')
- util.postUrl4(apiArr.getPartnerOrder,{
- dealer_id:admin.shop_id
- },res=>{
- that.setData({
- order:res
- })
- })
- },
+ {
+ text: "新装工单",
+ img: "https://wechat-img-file.oss-cn-beijing.aliyuncs.com/water_filter/partner/partner_icon3.png?1",
+ url: "../pages/WorkOrder/WorkOrder",
+ },
+ {
+ text: "维修工单",
+ img: "https://wechat-img-file.oss-cn-beijing.aliyuncs.com/water_filter/partner/partner_icon4.png?1",
+ url: "../../WaterPurifier/pages/upKeep/upKeep",
+ },
+ {
+ text: "拆除工单",
+ img: "https://wechat-img-file.oss-cn-beijing.aliyuncs.com/removeIcon.png",
+ url: "../pages/removeOrder/removeOrder",
+ },
+ {
+ text: "滤芯更换工单",
+ img: "https://wechat-img-file.oss-cn-beijing.aliyuncs.com/partsIcon.png",
+ url: "../pages/partsOrder/partsOrder",
+ },
+ ],
+ funcList2: [
+ {
+ text: "滤芯预警营销",
+ img: "https://wechat-img-file.oss-cn-beijing.aliyuncs.com/filterStock.png",
+ url: "/packages/partner/pages/marketingOrder1/marketingOrder1",
+ },
+ {
+ text: "套餐预警营销",
+ img: "https://wechat-img-file.oss-cn-beijing.aliyuncs.com/filterStock.png",
+ url: "/packages/partner/pages/marketingOrder2/marketingOrder2",
+ },
+ ],
+ funcList3: [
+ {
+ text: "滤芯订单(零售)",
+ img: "https://wechat-img-file.oss-cn-beijing.aliyuncs.com/filterStock.png",
+ url: "/packages/partner/pages/order1/order1",
+ },
+ {
+ text: "套餐订单(租赁)",
+ img: "https://wechat-img-file.oss-cn-beijing.aliyuncs.com/filterStock.png",
+ url: "/packages/partner/pages/order2/order2",
+ },
+ ],
+ Info: "",
+ order: "",
- getParter(){
- let that =this
- wx.showLoading({
- title: '加载中...',
- mask:true
- })
- let admin = wx.getStorageSync('admin')
- util.postUrl4(apiArr.getPartner,{
- deal_id:admin.shop_id
- },res=>{
- wx.hideLoading()
- res.No = that.padToEightDigits(res.deal_id)
- if(res.deal_img){
- res.deal_img = util.img_url + res.deal_img
- }
- that.setData({
- Info:res
- })
- })
- },
-
- jump(e){
- console.log(e);
- if(!e.currentTarget.dataset.url){
- return wx.showToast({
- title: '功能暂未开通',
- icon:"none"
- })
- }
- wx.navigateTo({
- url: e.currentTarget.dataset.url,
- })
- },
+ serverInfo: ""
+ },
+ callPhone() {
+ let that = this
+ wx.makePhoneCall({
+ phoneNumber: that.data.serverInfo.customer_phone,
+ })
+ },
+ getServerInfo() {
+ let that = this
+ util.postUrl(apiArr2.getServerInfo, '', res => {
+ res.qr_code = res.qr_code.startsWith('http') ? res.qr_code : util.img_url + res.qr_code
+ console.log(res.qr_code);
+ that.setData({
+ serverInfo: res
+ })
+ })
+ },
+ back() {
+ wx.reLaunch({
+ url: '/pages/newLogin/newLogin',
+ })
+ },
+ editAdmin() {
+ wx.navigateTo({
+ url: '/packages/partner/pages/editAdmin/editAdmin',
+ })
+ },
+ padToEightDigits(number) {
+ // 将数字转换为字符串,并使用 padStart 补足到 8 位
+ return String(number).padStart(8, '0');
+ },
- /**
- * 生命周期函数--监听页面加载
- */
- onLoad(options) {
- let that = this
- that.getParter()
- // that.getOrderList()
- wx.showShareMenu({
- withShareTicket: true,
- menus: ['shareAppMessage', 'shareTimeline']
- })
- },
+ getOrderList() {
+ let that = this
+ let admin = wx.getStorageSync('admin')
+ util.postUrl4(apiArr.getPartnerOrder, {
+ dealer_id: admin.shop_id
+ }, res => {
+ that.setData({
+ order: res
+ })
+ })
+ },
- /**
- * 生命周期函数--监听页面初次渲染完成
- */
- onReady() {
+ getParter() {
+ let that = this
+ wx.showLoading({
+ title: '加载中...',
+ mask: true
+ })
+ let admin = wx.getStorageSync('admin')
+ util.postUrl4(apiArr.getPartner, {
+ deal_id: admin.shop_id
+ }, res => {
+ wx.hideLoading()
+ res.No = that.padToEightDigits(res.deal_id)
+ if (res.deal_icon) {
+ res.deal_icon = res.deal_icon.startsWith('http') ? res.deal_icon : util.img_url + res.deal_icon
+ }
+ console.log(admin.shop_id);
+ if (admin.shop_id != 1) {
+ let funcList = that.data.funcList
+ funcList.splice(7, 1)
+ that.setData({
+ funcList
+ })
+ }
+ that.setData({
+ Info: res
+ })
+ })
+ },
- },
+ jump(e) {
+ console.log(e);
+ if (!e.currentTarget.dataset.url) {
+ return wx.showToast({
+ title: '功能暂未开通',
+ icon: "none"
+ })
+ }
+ wx.navigateTo({
+ url: e.currentTarget.dataset.url,
+ })
+ },
- /**
- * 生命周期函数--监听页面显示
- */
- onShow() {
+ /**
+ * 生命周期函数--监听页面加载
+ */
+ onLoad(options) {
+ let that = this
+ that.getServerInfo()
+ // that.getOrderList()
+ wx.showShareMenu({
+ withShareTicket: true,
+ menus: ['shareAppMessage', 'shareTimeline']
+ })
+ },
- },
+ /**
+ * 生命周期函数--监听页面初次渲染完成
+ */
+ onReady() {
- /**
- * 生命周期函数--监听页面隐藏
- */
- onHide() {
+ },
- },
+ /**
+ * 生命周期函数--监听页面显示
+ */
+ onShow() {
+ let that = this
+ that.getParter()
+ },
- /**
- * 生命周期函数--监听页面卸载
- */
- onUnload() {
+ /**
+ * 生命周期函数--监听页面隐藏
+ */
+ onHide() {
- },
+ },
- /**
- * 页面相关事件处理函数--监听用户下拉动作
- */
- onPullDownRefresh() {
+ /**
+ * 生命周期函数--监听页面卸载
+ */
+ onUnload() {
- },
+ },
- /**
- * 页面上拉触底事件的处理函数
- */
- onReachBottom() {
+ /**
+ * 页面相关事件处理函数--监听用户下拉动作
+ */
+ onPullDownRefresh() {
- },
+ },
- /**
- * 用户点击右上角分享
- */
- onShareAppMessage(){
- return {
- title: '人人爱净水', // 分享卡片标题(必填)
- path: '/pages/water_filter/water_filter', // 用户点击后跳转的路径(可选,默认当前页)
- imageUrl: 'https://wechat-img-file.oss-cn-beijing.aliyuncs.com/share.png' // 自定义图片(可选,比例建议 5:4)
- }
-},
-onShareTimeline() {
- return {
- title: '人人爱净水', // 自定义标题
- query: '', // 自定义页面路径中的参数
- imageUrl: 'https://wechat-img-file.oss-cn-beijing.aliyuncs.com/share.png' // 自定义分享图片路径
- }
-},
+ /**
+ * 页面上拉触底事件的处理函数
+ */
+ onReachBottom() {
+
+ },
+
+ /**
+ * 用户点击右上角分享
+ */
+ onShareAppMessage() {
+ return {
+ title: '人人爱净水', // 分享卡片标题(必填)
+ path: '/pages/water_filter/water_filter', // 用户点击后跳转的路径(可选,默认当前页)
+ imageUrl: 'https://wechat-img-file.oss-cn-beijing.aliyuncs.com/share.png' // 自定义图片(可选,比例建议 5:4)
+ }
+ },
+ onShareTimeline() {
+ return {
+ title: '人人爱净水', // 自定义标题
+ query: '', // 自定义页面路径中的参数
+ imageUrl: 'https://wechat-img-file.oss-cn-beijing.aliyuncs.com/share.png' // 自定义分享图片路径
+ }
+ },
})
\ No newline at end of file
diff --git a/packages/partner/pages/partner.json b/packages/partner/pages/partner.json
index c328e31..ad924d2 100644
--- a/packages/partner/pages/partner.json
+++ b/packages/partner/pages/partner.json
@@ -1,7 +1,6 @@
{
"usingComponents": {
- "Footer":"/component/footer/index"
-
+ "Footer":"/component/partnerFooter/index"
},
"navigationStyle": "custom"
}
\ No newline at end of file
diff --git a/packages/partner/pages/partner.wxml b/packages/partner/pages/partner.wxml
index 15bd49a..77a7582 100644
--- a/packages/partner/pages/partner.wxml
+++ b/packages/partner/pages/partner.wxml
@@ -1,46 +1,67 @@
-
-
-
-
-
+
+
+
+
+
-
- {{Info.deal_name}}
- {{Info.merchant_name}}
+
+
+
-
-
- {{Info.invite_dealer_id?'初级合伙人':'高级合伙人'}}
-
- NO.{{Info.No}}
- 智能净水管家
-
- 功能服务
+
+
+
+
+
+
+ 工单管理
-
+
{{item.text}}
+ 营销管理
+
+
+
+ {{item.text}}
+
+
+ 订单管理
+
+
+
+ {{item.text}}
+
+
+
+
+ 平台客服
+
+
+
+ 平台电话
+ {{serverInfo.customer_phone}}
+
+
+
+
+ 工作时间
+ {{serverInfo.business_hours}}
+
+
+
+
+ 长按保存二维码
+
+
+
+
+
+
\ No newline at end of file
diff --git a/packages/partner/pages/partner.wxss b/packages/partner/pages/partner.wxss
index bd4d569..771f2f9 100644
--- a/packages/partner/pages/partner.wxss
+++ b/packages/partner/pages/partner.wxss
@@ -1,6 +1,5 @@
.partner {
background: linear-gradient( 359deg, rgba(255,255,255,0) 0%, rgba(77,154,255,0.15) 100%);
- height: calc( 100vh - 120rpx);
}
.UserInfo {
@@ -9,7 +8,7 @@
justify-content: space-between;
margin-left: 25rpx;
margin-right: 20rpx;
- padding-top: 160rpx;
+ padding-top: 20rpx;
margin-bottom: 40rpx;
}
@@ -19,9 +18,9 @@
}
.UserInfo_ava {
- width: 120rpx;
- height: 120rpx;
- background: linear-gradient( 150deg, #E4EFFF 0%, #2583FF 100%);
+ width: 126rpx;
+ height: 126rpx;
+ /* background: linear-gradient( 150deg, #E4EFFF 0%, #2583FF 100%); */
box-sizing: border-box;
display: flex;
align-items: center;
@@ -32,13 +31,15 @@
}
.UserInfo_ava image {
- width: 73rpx;
- height: 68.5rpx;
+ width:100%;
+ height: 100%;
+ border-radius: 50%;
+ overflow: hidden;
}
.UserInfo_Info_name {
font-weight: 400;
- font-size: 36rpx;
+ font-size: 30rpx;
color: #222222;
}
@@ -62,7 +63,7 @@
margin-bottom: 10rpx;
}
-.UserInfo_level view {
+/* .UserInfo_level view {
font-weight: 400;
font-size: 22rpx;
color: #FFFFFF;
@@ -73,7 +74,7 @@
height: 32rpx;
background: #D5AC66;
border-radius: 100rpx 100rpx 100rpx 100rpx;
-}
+} */
.text1 {
font-weight: 400;
@@ -122,6 +123,13 @@
margin-left: 30rpx;
margin-top: 75rpx;
}
+.Tit2 {
+ font-weight: bold;
+ font-size: 32rpx;
+ color: #222222;
+ margin-left: 30rpx;
+ margin-top: 30rpx;
+}
.func {
display: flex;
@@ -140,8 +148,74 @@
width: 25%;
margin-bottom: 50rpx;
}
+.funcItem3 {
+ display: flex;
+ flex-direction: column;
+ align-items: center;
+ font-weight: 400;
+ font-size: 26rpx;
+ color: #222222;
+ width: 30%;
+ margin-bottom: 50rpx;
+}
.funcItem image {
height: 54rpx;
margin-bottom: 15rpx;
+}
+.funcItem3 image {
+ height: 54rpx;
+ margin-bottom: 15rpx;
+}
+.UserInfo_level .edit{
+ border: 1rpx solid #999;
+ padding: 10rpx 20rpx;
+ border-radius: 10rpx;
+}
+
+.orderMsg{
+ padding: 0 20rpx;
+ padding-bottom: 40rpx;
+}
+
+.orderMsgBox {
+ display: flex;
+ /* align-items: center; */
+ align-items: stretch;
+ justify-content: space-between;
+ margin-top: 30rpx;
+}
+
+.orderMsgBox_left {
+ width: 48%;
+ background-color: #edf6fd;
+ border-radius: 20rpx;
+ display: flex;
+ flex-direction: column;
+ align-items: center;
+ justify-content: center;
+}
+
+.orderMsgBox_right {
+ width: 48%;
+ border-radius: 20rpx;
+ border: 1rpx solid #000;
+ overflow: hidden;
+ display: flex;
+ flex-direction: column;
+ align-items: center;
+ justify-content: center;
+ padding: 10rpx 0;
+}
+.orderMsgBox_right span{
+ margin-top: 20rpx;
+}
+
+.orderMsgBox_left1 {
+ text-align: center;
+ margin-bottom: 20rpx;
+}
+
+.orderMsgBox_left2 {
+ text-align: center;
}
\ No newline at end of file
diff --git a/packages/partner/pages/partsOrder/partsOrder.js b/packages/partner/pages/partsOrder/partsOrder.js
index f688f8e..af909a1 100644
--- a/packages/partner/pages/partsOrder/partsOrder.js
+++ b/packages/partner/pages/partsOrder/partsOrder.js
@@ -1,5 +1,6 @@
let util = require('../../../../utils/util')
let apiArr = require('../../../../api/partner')
+const app = getApp({ allowDefault: true })
// packages/WaterPurifier/pages/upKeep/upKeep.js
Page({
@@ -8,9 +9,11 @@ Page({
* 页面的初始数据
*/
data: {
+ s: app.system.statusBarHeight, // 状态栏高度
+ n: (app.menu.top - app.system.statusBarHeight) * 2 + app.menu.height, // 导航栏高度
+ t: app.menu.top, // 胶囊局顶部距离
+ h: app.menu.height, // 胶囊高度
admin: "",
-
-
value1: 0,
value2: 'a',
show: false,
@@ -28,70 +31,75 @@ Page({
admin: "",
show: false,
show2: false,
- masterList:[],
- currentMaster:"",
- radio:"",
- currentOrder:"",
- radio:"",
+ masterList: [],
+ currentMaster: "",
+ radio: "",
+ currentOrder: "",
+ radio: "",
},
- onConfirms(){
+ back(){
+ wx.reLaunch({
+ url: '/packages/partner/pages/partner',
+ })
+ },
+ onConfirms() {
let that = this
- if(!that.data.currentMaster && !that.data.currentMaster.info_id){
+ if (!that.data.currentMaster && !that.data.currentMaster.info_id) {
return wx.showToast({
- title: '请选择师傅',
- icon:"none"
+ title: '请选择师傅',
+ icon: "none"
})
}
- util.postUrl4(apiArr.assignPartReplaceMaster,{
- replace_id:that.data.currentOrder.replace_id,
- master_id:that.data.currentMaster.info_id,
- is_up:that.data.radio,
- address:that.data.address,
- },res=>{
+ util.postUrl4(apiArr.assignPartReplaceMaster, {
+ replace_id: that.data.currentOrder.replace_id,
+ master_id: that.data.currentMaster.info_id,
+ is_up: that.data.radio,
+ address: that.data.address,
+ }, res => {
wx.showToast({
- title: '分配师傅成功',
- icon:"none"
+ title: '分配师傅成功',
+ icon: "none"
})
that.setData({
- show:false
+ show: false
})
- setTimeout(()=>{
+ setTimeout(() => {
that.getNewOrderList()
- },1500)
+ }, 1500)
})
},
- onChange2(e){
+ onChange2(e) {
let that = this
that.setData({
- radio:e.detail
+ radio: e.detail
})
},
- onConfirm(e){
+ onConfirm(e) {
console.log(e);
- let that= this
+ let that = this
that.setData({
- currentMaster:e.detail.value,
- show2:false
+ currentMaster: e.detail.value,
+ show2: false
})
},
- onClose2(){
- let that= this
+ onClose2() {
+ let that = this
that.setData({
- show2:false
+ show2: false
})
},
- getMasterList(){
- let that =this
- util.postUrl4(apiArr.masterSelect,{
- dealer_id:that.data.admin.shop_id
- },res=>{
+ getMasterList() {
+ let that = this
+ util.postUrl4(apiArr.masterSelect, {
+ dealer_id: that.data.admin.shop_id
+ }, res => {
console.log(res.rows);
that.setData({
- masterList:res.rows
+ masterList: res.rows
})
})
},
@@ -107,8 +115,8 @@ Page({
console.log(e);
that.setData({
show: true,
- currentOrder:e.currentTarget.dataset.item,
- address:e.currentTarget.dataset.item.address,
+ currentOrder: e.currentTarget.dataset.item,
+ address: e.currentTarget.dataset.item.address,
})
},
onClose() {
@@ -119,21 +127,19 @@ Page({
},
desc(e) {
let that = this
-
wx.navigateTo({
- url: `../partsOrderInfo/partsOrderInfo?id=${e.currentTarget.dataset.id}`,
+ url: `/packages/partner/pages/OrderMsgInfo/OrderMsgInfo?id=${e.currentTarget.dataset.id}&type=2`,
})
+ // wx.navigateTo({
+ // url: `../partsOrderInfo/partsOrderInfo?id=${e.currentTarget.dataset.id}`,
+ // })
},
ipt1(e) {
let that = this
that.setData({
searchText: e.detail.value,
- page_num: 1,
- flag: false,
- deviceList: []
})
- that.getNewOrderList()
},
search() {
@@ -160,7 +166,8 @@ Page({
util.postUrl4(apiArr.getPartList, {
page_size: that.data.page_size,
page_num: that.data.page_num,
- dealer_id: that.data.admin.shop_id
+ dealer_id: that.data.admin.shop_id,
+ search:that.data.searchText
}, res => {
wx.hideLoading()
that.getMasterList()
@@ -231,7 +238,15 @@ Page({
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
-
+ let that = this
+ that.setData({
+ page_num: 1,
+ deviceList: [],
+ searchText:"",
+ flag: false
+ })
+ that.getNewOrderList()
+ wx.stopPullDownRefresh();
},
/**
diff --git a/packages/partner/pages/partsOrder/partsOrder.json b/packages/partner/pages/partsOrder/partsOrder.json
index 59190d5..7a9492c 100644
--- a/packages/partner/pages/partsOrder/partsOrder.json
+++ b/packages/partner/pages/partsOrder/partsOrder.json
@@ -1,6 +1,8 @@
{
"usingComponents": {
- "Footer":"/component/footer/index"
+ "Footer": "/component/footer/index"
},
- "navigationBarTitleText": "滤芯更换工单"
- }
\ No newline at end of file
+ "navigationBarTitleText": "滤芯更换工单",
+ "enablePullDownRefresh": true,
+ "navigationStyle": "custom"
+}
\ No newline at end of file
diff --git a/packages/partner/pages/partsOrder/partsOrder.wxml b/packages/partner/pages/partsOrder/partsOrder.wxml
index c0eca86..e6fb99c 100644
--- a/packages/partner/pages/partsOrder/partsOrder.wxml
+++ b/packages/partner/pages/partsOrder/partsOrder.wxml
@@ -1,9 +1,27 @@
+
+
+
+
+
+
+
+ 滤芯更换工单
+
+
+
+
+
+
+
+
-
-
+
+
+
+
@@ -14,6 +32,11 @@
工单号:
{{item.replace_no}}
+
+
+ 产品名称:
+ {{item.device.product_name}}
+
设备编码:
{{item.device_code}}
@@ -49,15 +72,12 @@
客户手机:
{{item.customer_phone}}
-
- 所在区域:
- {{item.region}}
-
详细地址:
- {{item.address}}
+ {{item.region + item.address || '暂无数据'}}
+
指派
diff --git a/packages/partner/pages/partsOrder/partsOrder.wxss b/packages/partner/pages/partsOrder/partsOrder.wxss
index df89360..de0f35d 100644
--- a/packages/partner/pages/partsOrder/partsOrder.wxss
+++ b/packages/partner/pages/partsOrder/partsOrder.wxss
@@ -1,6 +1,12 @@
.upkeep{
padding-bottom: 80rpx;
}
+.nav-box{
+ padding-bottom: 30rpx;
+}
+.nav-bar-right{
+ opacity: 0;
+}
.upkeep_select {
display: flex;
align-items: center;
@@ -9,7 +15,7 @@
font-size: 26rpx;
color: #222222;
background-color: #F9F9F9;
- padding: 30rpx 20rpx;
+ padding: 16rpx 20rpx;
}
.upkeep_select .ipt {
@@ -18,7 +24,7 @@
justify-content: space-between;
background-color: #fff;
width: 710rpx;
- height: 54rpx;
+ height: 98rpx;
background: #FFFFFF;
border-radius: 100rpx 100rpx 100rpx 100rpx;
padding-left: 26rpx;
@@ -27,10 +33,11 @@
.ipt input{
flex: 1;
+ height: 100%;
}
.ipt image {
- width: 30rpx;
- height: 30rpx;
+ width: 42rpx;
+ height: 42rpx;
}
.orderList {
@@ -58,15 +65,16 @@
.orderItem_Item_tit {
font-weight: 400;
- font-size: 26rpx;
+ font-size: 28rpx;
color: #999999;
- min-width: 110rpx;
+ width: 130rpx;
margin-right: 30rpx;
+ white-space: nowrap;
}
.orderItem_Item_con {
font-weight: 400;
- font-size: 26rpx;
+ font-size: 28rpx;
color: #222222;
}
@@ -355,4 +363,14 @@
.confirm {
background-color: #2583ff;
color: #fff;
+}
+
+
+.searchBox{
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ padding-left: 40rpx;
+ height: 70rpx;
+
}
\ No newline at end of file
diff --git a/packages/partner/pages/partsOrderInfo/partsOrderInfo.wxml b/packages/partner/pages/partsOrderInfo/partsOrderInfo.wxml
index 5333926..8b48379 100644
--- a/packages/partner/pages/partsOrderInfo/partsOrderInfo.wxml
+++ b/packages/partner/pages/partsOrderInfo/partsOrderInfo.wxml
@@ -1,13 +1,14 @@
- 工单名称
- {{Info.replace_name}}
-
-
- 工单号
+ 订单编号
{{Info.replace_no}}
+
+ 产品名称
+ {{Info.replace_name}}
+
+
设备编号
{{Info.device_code}}
diff --git a/packages/partner/pages/partsOrderInfo/partsOrderInfo.wxss b/packages/partner/pages/partsOrderInfo/partsOrderInfo.wxss
index bf0b0ca..66b0ed2 100644
--- a/packages/partner/pages/partsOrderInfo/partsOrderInfo.wxss
+++ b/packages/partner/pages/partsOrderInfo/partsOrderInfo.wxss
@@ -42,6 +42,7 @@
.item {
margin: 0 20rpx 21rpx;
+ display: flex;
}
.label {
@@ -56,6 +57,10 @@
font-weight: 400;
font-size: 26rpx;
color: #222222;
+ flex: 1;
+ text-align: right;
+ overflow: hidden;
+ overflow-x: auto;
}
.wx_name {
diff --git a/packages/partner/pages/removeOrder/removeOrder.js b/packages/partner/pages/removeOrder/removeOrder.js
index 40a69dc..633ff8d 100644
--- a/packages/partner/pages/removeOrder/removeOrder.js
+++ b/packages/partner/pages/removeOrder/removeOrder.js
@@ -1,5 +1,7 @@
let util = require('../../../../utils/util')
let apiArr = require('../../../../api/partner')
+let apiArr2 = require('../../../../api/water_filter')
+const app = getApp({ allowDefault: true })
// packages/WaterPurifier/pages/upKeep/upKeep.js
Page({
@@ -8,80 +10,167 @@ Page({
* 页面的初始数据
*/
data: {
- admin:"",
-
-
- value1: 0,
- value2: 'a',
- show:false,
- MasterList:[
-
- ],
+ s: app.system.statusBarHeight, // 状态栏高度
+ n: (app.menu.top - app.system.statusBarHeight) * 2 + app.menu.height, // 导航栏高度
+ t: app.menu.top, // 胶囊局顶部距离
+ h: app.menu.height, // 胶囊高度
+ admin: "",
- searchText:"",//搜索文字
- page_num:1,
- page_size:10,
- total:'',
- deviceList:[],
- sendOrders: {}, // 派单订单
- flag:false
+
+ value1: 0,
+ value2: 'a',
+ show: false,
+ MasterList: [],
+
+ searchText: "",//搜索文字
+ page_num: 1,
+ page_size: 10,
+ total: '',
+ deviceList: [],
+ sendOrders: {}, // 派单订单
+ flag: false
},
- desc(e){
+ back(){
+ wx.reLaunch({
+ url: '/packages/partner/pages/partner',
+ })
+ },
+ dispatch(e) {
let that = this
+ that.setData({
+ show: true,
+ sendOrders: e.currentTarget.dataset.item
+ })
+ },
+ //师傅列表
+ getMasterList() {
+ let that = this
+ wx.showLoading({
+ title: '加载中...',
+ mask: true
+ })
+ util.postUrl4(apiArr2.MasterList, {
+ page_num: 1,
+ page_size: 100,
+ dealer_id: wx.getStorageSync('dealer_id')
+ }, res => {
+ wx.hideLoading()
+ res.rows.forEach(item => {
+ item.avatar = util.img_url + item.avatar
+ })
+ that.setData({
+ MasterList: res.rows
+ })
+ })
+ },
+ //选择师傅
+ selectMaster(e) {
+ console.log(e);
+ let that = this
+ let MasterList = that.data.MasterList
+ MasterList.forEach(item => {
+ item.checked = false
+ })
+ MasterList[e.currentTarget.dataset.index].checked = true
+ that.setData({
+ MasterList
+ })
+ },
+ onClose() {
+ let that = this
+ that.setData({
+ show: false
+ })
+ },
+ sure() {
+ let that = this
+ const { sendOrders, MasterList } = this.data;
+ const checkedMaster = MasterList.filter((item) => item.checked)[0];
+ console.log('sendOrders', sendOrders);
+ console.log('checkedMaster', checkedMaster);
+ that.setData({
+ show: false
+ })
+ util.postUrl4(apiArr.UninstallAllocation, {
+ repairman_id: checkedMaster.info_id,
+ uninstall_id: sendOrders.uninstall_id,
+ }, res => {
+ if (res.error) {
+ wx.showToast({
+ title: '派单失败',
+ icon: 'none',
+ })
+ return;
+ }
+ wx.showToast({
+ title: res.msg,
+ icon: 'none',
+ success() {
+ setTimeout(() => {
+ that.setData({
+ flag: false,
+ page_num: 1,
+ orderList: []
+ })
+ that.getOrderList()
+ }, 1500)
+ }
+ })
+ })
+ },
+
+ desc(e) {
+ let that = this
wx.navigateTo({
- url: `../removeOrderInfo/removeOrderInfo?id=${e.currentTarget.dataset.id}`,
+ url: `/packages/partner/pages/OrderMsgInfo/OrderMsgInfo?id=${e.currentTarget.dataset.id}&type=3`,
})
},
- ipt1(e){
+ ipt1(e) {
let that = this
that.setData({
- searchText:e.detail.value,
- page_num:1,
- flag:false,
- deviceList:[]
+ searchText: e.detail.value,
})
- that.getNewOrderList()
},
- search(){
+ search() {
let that = this
that.setData({
- page_num:1,
- flag:false,
- deviceList:[]
+ page_num: 1,
+ flag: false,
+ deviceList: []
})
that.getNewOrderList()
},
//工单列表
- getNewOrderList(){
+ getNewOrderList() {
let that = this
wx.showLoading({
- title: '加载中...',
- mask:true,
+ title: '加载中...',
+ mask: true,
})
//设置加载状态
- util.postUrl4(apiArr.getUninstallList,{
- page_size:that.data.page_size,
- page_num:that.data.page_num,
- search:that.data.searchText,
+ util.postUrl4(apiArr.getUninstallList, {
+ page_size: that.data.page_size,
+ page_num: that.data.page_num,
+ search: that.data.searchText,
dealer_id: that.data.admin.shop_id
- },res=>{
+ }, res => {
wx.hideLoading()
- if(res.row){
+ if (res.row) {
let flag = false
- if(res.row.length == that.data.page_size){
+ if (res.row.length == that.data.page_size) {
flag = true
- }else{
+ } else {
flag = false
}
that.setData({
flag,
- deviceList:that.data.deviceList.concat(res.row || []),
- page_num:that.data.page_num +1
+ deviceList: that.data.deviceList.concat(res.row || []),
+ page_num: that.data.page_num + 1
})
}
})
@@ -97,69 +186,78 @@ Page({
onLoad(options) {
let that = this
that.setData({
- admin:wx.getStorageSync('admin')
+ admin: wx.getStorageSync('admin')
})
that.getNewOrderList()
+ that.getMasterList()
wx.showShareMenu({
withShareTicket: true,
menus: ['shareAppMessage', 'shareTimeline']
})
},
-
+
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
-
+
},
-
+
/**
* 生命周期函数--监听页面显示
*/
onShow() {
-
+
},
-
+
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
-
+
},
-
+
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
-
+
},
-
+
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
-
+ let that = this
+ that.setData({
+ page_num: 1,
+ deviceList: [],
+ searchText: "",
+ flag: false
+ })
+ that.getNewOrderList()
+ wx.stopPullDownRefresh();
},
-
+
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
let that = this
- if(that.data.flag){
+ if (that.data.flag) {
that.getNewOrderList()
}
},
-
+
/**
* 用户点击右上角分享
*/
- onShareAppMessage(){
+ onShareAppMessage() {
return {
title: '人人爱净水', // 分享卡片标题(必填)
path: '/pages/water_filter/water_filter', // 用户点击后跳转的路径(可选,默认当前页)
imageUrl: 'https://wechat-img-file.oss-cn-beijing.aliyuncs.com/share.png' // 自定义图片(可选,比例建议 5:4)
- }
+ }
},
onShareTimeline() {
return {
@@ -168,4 +266,4 @@ Page({
imageUrl: 'https://wechat-img-file.oss-cn-beijing.aliyuncs.com/share.png' // 自定义分享图片路径
}
},
- })
\ No newline at end of file
+})
\ No newline at end of file
diff --git a/packages/partner/pages/removeOrder/removeOrder.json b/packages/partner/pages/removeOrder/removeOrder.json
index 3ff4bf3..07c384a 100644
--- a/packages/partner/pages/removeOrder/removeOrder.json
+++ b/packages/partner/pages/removeOrder/removeOrder.json
@@ -2,5 +2,8 @@
"usingComponents": {
"Footer":"/component/footer/index"
},
- "navigationBarTitleText": "拆除工单"
+ "navigationBarTitleText": "拆除工单",
+ "enablePullDownRefresh": true,
+ "navigationStyle": "custom"
+
}
\ No newline at end of file
diff --git a/packages/partner/pages/removeOrder/removeOrder.wxml b/packages/partner/pages/removeOrder/removeOrder.wxml
index 7727996..80776ca 100644
--- a/packages/partner/pages/removeOrder/removeOrder.wxml
+++ b/packages/partner/pages/removeOrder/removeOrder.wxml
@@ -1,46 +1,119 @@
+
+
+
+
+
-
-
-
-
+
+ 拆除工单
+
+
+
+
+
+
-
+
+
+
-
-
- 工单名称:{{item.uninstall_name}}
-
- 工单号:
- {{item.uninstall_no}}
+
+
+
-
- 设备编码:
- {{item.device_code}}
-
-
- 客户名称
- {{item.customer_name}}
-
-
- 客户手机
- {{item.customer_phone}}
-
-
-
- 师傅名称
- {{item.repairman_name}}
-
-
-
- 师傅手机号
- {{item.repairman_phone}}
-
-
-
+
+
+ 工单名称:{{item.uninstall_name}}
+
+ 订单编号:
+ {{item.uninstall_no}}
+
+
+ 设备编号:
+ {{item.device_code}}
+
+
+ 产品状态:
+ 待指派
+ 待拆机
+ 待操作
+ 已完成
+
+
+ 客户名称:
+ {{item.customer_name}}
+
+
+ 客户手机:
+ {{item.customer_phone}}
+
+
+ 详细地址:
+ {{item.region + item.address || '暂无数据'}}
+
-
+
+ 预约时间:
+ {{item.appointment_time}}
+
-
+
+ 师傅名称:
+ {{item.repairman_name}}
+
+
+
+ 师傅手机号:
+ {{item.repairman_phone}}
+
+
+
+
+
+ 派单
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 请选择拆除师傅
+ 确定
+
+
+
+
+
+
+
+
+
+
+ 师傅姓名
+ {{item.name}}
+
+
+ 师傅手机号
+ {{item.phone}}
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/packages/partner/pages/removeOrder/removeOrder.wxss b/packages/partner/pages/removeOrder/removeOrder.wxss
index 21622b7..11073c5 100644
--- a/packages/partner/pages/removeOrder/removeOrder.wxss
+++ b/packages/partner/pages/removeOrder/removeOrder.wxss
@@ -1,6 +1,12 @@
.upkeep{
padding-bottom: 80rpx;
}
+.nav-box{
+ padding-bottom: 30rpx;
+}
+.nav-bar-right{
+ opacity: 0;
+}
.upkeep_select {
display: flex;
align-items: center;
@@ -9,7 +15,7 @@
font-size: 26rpx;
color: #222222;
background-color: #F9F9F9;
- padding: 30rpx 20rpx;
+ padding: 16rpx 20rpx;
}
.upkeep_select .ipt {
@@ -18,7 +24,7 @@
justify-content: space-between;
background-color: #fff;
width: 710rpx;
- height: 54rpx;
+ height: 98rpx;
background: #FFFFFF;
border-radius: 100rpx 100rpx 100rpx 100rpx;
padding-left: 26rpx;
@@ -27,10 +33,11 @@
.ipt input{
flex: 1;
+ height: 100%;
}
.ipt image {
- width: 30rpx;
- height: 30rpx;
+ width: 42rpx;
+ height: 42rpx;
}
.orderList {
@@ -58,7 +65,7 @@
.orderItem_Item_tit {
font-weight: 400;
- font-size: 26rpx;
+ font-size: 28rpx;
color: #999999;
min-width: 110rpx;
margin-right: 30rpx;
@@ -66,7 +73,7 @@
.orderItem_Item_con {
font-weight: 400;
- font-size: 26rpx;
+ font-size: 28rpx;
color: #222222;
}
@@ -280,4 +287,13 @@
height: 50vh;
padding-top: 80rpx;
overflow-y: auto;
+}
+
+
+.searchBox{
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ padding-left: 40rpx;
+ height: 70rpx;
}
\ No newline at end of file
diff --git a/packages/partner/pages/removeOrderInfo/removeOrderInfo.js b/packages/partner/pages/removeOrderInfo/removeOrderInfo.js
index 73929aa..35b6a42 100644
--- a/packages/partner/pages/removeOrderInfo/removeOrderInfo.js
+++ b/packages/partner/pages/removeOrderInfo/removeOrderInfo.js
@@ -18,6 +18,7 @@ Page({
util.postUrl4(apiArr.getUninstallInfo,{
uninstall_id:Number(that.data.install_id)
},res=>{
+ res.uninstall_imgs = res.uninstall_imgs.startsWith('http')?res.uninstall_imgs : util.img_url + res.uninstall_imgs
that.setData({
Info:res
})
@@ -26,7 +27,7 @@ Page({
headerPicClick() {
wx.previewImage({
- urls: [this.data.Info.fault_imgs]
+ urls: [this.data.Info.uninstall_imgs]
})
},
diff --git a/packages/partner/pages/removeOrderInfo/removeOrderInfo.wxml b/packages/partner/pages/removeOrderInfo/removeOrderInfo.wxml
index 507b29e..d9a8e9c 100644
--- a/packages/partner/pages/removeOrderInfo/removeOrderInfo.wxml
+++ b/packages/partner/pages/removeOrderInfo/removeOrderInfo.wxml
@@ -1,57 +1,55 @@
-
-
- 工单名称
- {{Info.uninstall_name}}
-
-
- 工单号
- {{Info.uninstall_no}}
-
-
- 设备编号
- {{Info.device_code}}
-
-
- 设备IMEI
- {{Info.device_imei}}
-
-
- 来源
- 系统
- 微信
- 后台
-
-
- 区域
- {{Info.region}}
-
-
- 详细地址
- {{Info.address}}
-
-
-
- 拆机时间
- {{Info.repair_time}}
-
-
-
- 拆机状态
- {{Info.uninstall_time}}
-
-
-
- 拆机说明
- {{Info.uninstall_desc}}
-
-
-
- 拆机图片
-
-
+
+
+ 订单编号
+ {{Info.uninstall_no}}
+
+
+ 产品名称
+ {{Info.uninstall_name}}
+
+
+ 设备编号
+ {{Info.device_code}}
+
+
+ 设备IMEI
+ {{Info.device_imei}}
+
+
+ 来源
+ 系统
+ 微信
+ 后台
+
+
+ 区域
+ {{Info.region}}
+
+
+ 详细地址
+ {{Info.address}}
-
-
+
+ 拆机时间
+ {{Info.repair_time}}
+
+
+ 拆机状态
+ {{Info.uninstall_time}}
+
+
+
+ 拆机说明
+ {{Info.uninstall_desc}}
+
+
+
+ 拆机图片
+
+
+
+
+
\ No newline at end of file
diff --git a/packages/partner/pages/removeOrderInfo/removeOrderInfo.wxss b/packages/partner/pages/removeOrderInfo/removeOrderInfo.wxss
index 080ee01..ec5bba7 100644
--- a/packages/partner/pages/removeOrderInfo/removeOrderInfo.wxss
+++ b/packages/partner/pages/removeOrderInfo/removeOrderInfo.wxss
@@ -39,6 +39,7 @@
}
.item {
margin: 0 20rpx 21rpx;
+ display: flex;
}
.label {
font-weight: 400;
@@ -51,6 +52,10 @@
font-weight: 400;
font-size: 26rpx;
color: #222222;
+ flex: 1;
+ text-align: right;
+ overflow: hidden;
+ overflow-x: auto;
}
.wx_name {
margin-left: 57rpx;
@@ -63,11 +68,13 @@
display: flex;
flex: 1;
height: 120rpx;
+ justify-content: flex-end;
}
.label_pic {
- width: 120rpx !important;
- height: 120rpx !important;
- margin-right: 20rpx;
+ width: 300rpx;
+ height: 300rpx;
+ margin-right: 20rpx;
+ box-shadow: 0 4rpx 16rpx rgba(0, 0, 0, 0.1);
}
.label_pic:last-child {
margin-right: 0;
diff --git a/pages/MasterLogin/MasterLogin.js b/pages/MasterLogin/MasterLogin.js
index 2b2196c..fe5b432 100644
--- a/pages/MasterLogin/MasterLogin.js
+++ b/pages/MasterLogin/MasterLogin.js
@@ -11,7 +11,30 @@ Page({
loginType: 'account', // 默认手机登录
password: "",
account: "",
- type:""
+ type:"",
+ checked:false
+
+ },
+ onChange(e){
+ let that = this
+ that.setData({
+ checked:e.detail
+ })
+ },
+ showTo(){
+ wx.showModal({
+ title: '提示',
+ content: '请阅读并同意《用户服务协议和隐私政策》',
+ complete: (res) => {
+ if (res.cancel) {
+
+ }
+
+ if (res.confirm) {
+
+ }
+ }
+ })
},
navigateToAgreement() {
wx.navigateTo({
@@ -270,7 +293,7 @@ Page({
setTimeout(() => {
wx.redirectTo({
- url: '/pages/chooseEntrance/chooseEntrance',
+ url: '/pages/newLogin/newLogin',
})
}, 1500);
@@ -280,7 +303,7 @@ Page({
backHomes(){
wx.redirectTo({
- url: '/pages/chooseEntrance/chooseEntrance',
+ url: '/pages/newLogin/newLogin',
})
},
})
\ No newline at end of file
diff --git a/pages/MasterLogin/MasterLogin.wxml b/pages/MasterLogin/MasterLogin.wxml
index 3af2d3f..65c077c 100644
--- a/pages/MasterLogin/MasterLogin.wxml
+++ b/pages/MasterLogin/MasterLogin.wxml
@@ -6,14 +6,19 @@
(头像、昵称等)
- 登录即表示您已同意
+
+ 我已阅读并同意
《用户服务协议和隐私政策》
-
+
+ 授权登录
+
+
+
授权登录
diff --git a/pages/MasterLogin/MasterLogin.wxss b/pages/MasterLogin/MasterLogin.wxss
index 0c72b1f..029fe56 100644
--- a/pages/MasterLogin/MasterLogin.wxss
+++ b/pages/MasterLogin/MasterLogin.wxss
@@ -7,11 +7,14 @@
background-repeat: no-repeat;
}
-.agreement {
+ .agreement {
font-size: 24rpx;
color: #999;
text-align: center;
margin-top: 30rpx;
+ display: flex;
+ align-items: center;
+ justify-content: center;
}
.link {
diff --git a/pages/RechargeRecord/RechargeRecord.js b/pages/RechargeRecord/RechargeRecord.js
index d3da2fa..2f2409d 100644
--- a/pages/RechargeRecord/RechargeRecord.js
+++ b/pages/RechargeRecord/RechargeRecord.js
@@ -1,66 +1,98 @@
+import { apiArr } from '../../api/user';
+import apiArr2 from '../../api/water_filter';
+let util = require('../../utils/util')
// pages/RechargeRecord/RechargeRecord.js
Page({
- /**
- * 页面的初始数据
- */
- data: {
+ /**
+ * 页面的初始数据
+ */
+ data: {
+ List: [],
+ page_size: 10,
+ page_num: 1,
+ flag: false
+ },
- },
+ getTrans() {
+ let that = this
+ util.postUrl(apiArr2.getTrans, {
+ page_num: that.data.page_num,
+ page_size: that.data.page_size,
+ }, res => {
+ let flag = false
+ if (res.rows && res.rows.length == that.data.page_size) {
+ flag = true
+ } else {
+ flag = false
+ }
+ if(res.rows){
+ that.setData({
+ flag,
+ List: that.data.List.concat(res.rows)
+ })
+ }
+ })
+ },
+ desc(e) {
+ wx.navigateTo({
+ url: `/pages/RechargeRecordDesc/RechargeRecordDesc?item=${e.currentTarget.dataset.item}`,
+ })
+ },
+ /**
+ * 生命周期函数--监听页面加载
+ */
+ onLoad(options) {
+ let that = this
+ that.getTrans()
+ },
- /**
- * 生命周期函数--监听页面加载
- */
- onLoad(options) {
+ /**
+ * 生命周期函数--监听页面初次渲染完成
+ */
+ onReady() {
- },
+ },
- /**
- * 生命周期函数--监听页面初次渲染完成
- */
- onReady() {
+ /**
+ * 生命周期函数--监听页面显示
+ */
+ onShow() {
- },
+ },
- /**
- * 生命周期函数--监听页面显示
- */
- onShow() {
+ /**
+ * 生命周期函数--监听页面隐藏
+ */
+ onHide() {
- },
+ },
- /**
- * 生命周期函数--监听页面隐藏
- */
- onHide() {
+ /**
+ * 生命周期函数--监听页面卸载
+ */
+ onUnload() {
- },
+ },
- /**
- * 生命周期函数--监听页面卸载
- */
- onUnload() {
+ /**
+ * 页面相关事件处理函数--监听用户下拉动作
+ */
+ onPullDownRefresh() {
- },
+ },
- /**
- * 页面相关事件处理函数--监听用户下拉动作
- */
- onPullDownRefresh() {
+ /**
+ * 页面上拉触底事件的处理函数
+ */
+ onReachBottom() {
- },
+ },
- /**
- * 页面上拉触底事件的处理函数
- */
- onReachBottom() {
+ /**
+ * 用户点击右上角分享
+ */
+ onShareAppMessage() {
- },
-
- /**
- * 用户点击右上角分享
- */
- onShareAppMessage() {
-
- }
+ }
})
\ No newline at end of file
diff --git a/pages/RechargeRecord/RechargeRecord.json b/pages/RechargeRecord/RechargeRecord.json
index 6f5247b..1b985d5 100644
--- a/pages/RechargeRecord/RechargeRecord.json
+++ b/pages/RechargeRecord/RechargeRecord.json
@@ -1,3 +1,4 @@
{
- "usingComponents": {}
+ "usingComponents": {},
+ "navigationBarTitleText": "品宣金"
}
\ No newline at end of file
diff --git a/pages/RechargeRecord/RechargeRecord.wxml b/pages/RechargeRecord/RechargeRecord.wxml
index e8e7329..8cdb359 100644
--- a/pages/RechargeRecord/RechargeRecord.wxml
+++ b/pages/RechargeRecord/RechargeRecord.wxml
@@ -1,3 +1,34 @@
-
- 暂无内容
-
\ No newline at end of file
+
+
+ 返费账户
+ {{item.name}}
+
+
+ 返费总额
+ {{item.amount * 100}}
+
+
+ 剩余待返
+ {{item.wait_amount * 100}}
+
+
+ 返费方式
+ 按月
+ 按年
+
+
+ 返费状态
+ 待转账
+ 转账中
+ 已完成
+ 已取消
+
+
+ 返款时间
+ {{item.up_time}}
+
+
+ 点击查看详情
+
+
+
\ No newline at end of file
diff --git a/pages/RechargeRecord/RechargeRecord.wxss b/pages/RechargeRecord/RechargeRecord.wxss
index 5a3157f..e3e1983 100644
--- a/pages/RechargeRecord/RechargeRecord.wxss
+++ b/pages/RechargeRecord/RechargeRecord.wxss
@@ -1,6 +1,91 @@
-.container {
+page{
+ background-color: #f5f5f5;
+}
+
+.payItem {
+ padding: 30rpx 20rpx;
+ background-color: #fff;
+ margin-top: 30rpx;
+ padding-bottom: 1rpx;
+}
+
+.payItem1 {
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+}
+
+.payItem1_time {
+ font-weight: 400;
+ font-size: 26rpx;
+ color: #222222;
+}
+
+.payItem1_state1 {
+ font-weight: 400;
+ font-size: 26rpx;
+ color: #2583FF;
+}
+
+.payItem1_state2 {
+ font-weight: 400;
+ font-size: 26rpx;
+ color: #D5AC66;
+}
+
+.payItem1_state3 {
+ font-weight: 400;
+ font-size: 26rpx;
+ color: #222222;
+}
+
+.payItem1_state4 {
+ font-weight: 400;
+ font-size: 26rpx;
+ color: #222222;
+}
+
+.payItem_row {
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+ margin-bottom: 30rpx;
+}
+.payItem_row2 {
display: flex;
align-items: center;
justify-content: center;
- height: 100vh;
+ margin-bottom: 30rpx;
+
+}
+.payItem_title {
+ font-weight: 400;
+ font-size: 26rpx;
+ color: #222222;
+}
+
+.payItem_con {
+ font-weight: 400;
+ font-size: 26rpx;
+ color: #222222;
+}
+
+.payItem_payBox {
+ display: flex;
+ justify-content: flex-end;
+ margin-right: -4rpx;
+}
+
+.payItem_pay {
+ width: 150rpx;
+ height: 50rpx;
+ background: #2583FF;
+ border-radius: 100rpx 100rpx 100rpx 100rpx;
+ font-weight: 400;
+ font-size: 26rpx;
+ color: #FFFFFF;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+
}
\ No newline at end of file
diff --git a/pages/RechargeRecordDesc/RechargeRecordDesc.js b/pages/RechargeRecordDesc/RechargeRecordDesc.js
new file mode 100644
index 0000000..930c146
--- /dev/null
+++ b/pages/RechargeRecordDesc/RechargeRecordDesc.js
@@ -0,0 +1,69 @@
+// pages/RechargeRecordDesc/RechargeRecordDesc.js
+Page({
+
+ /**
+ * 页面的初始数据
+ */
+ data: {
+ Info:""
+ },
+
+ /**
+ * 生命周期函数--监听页面加载
+ */
+ onLoad(options) {
+ let that = this
+ that.setData({
+ Info:options.item
+ })
+ },
+
+ /**
+ * 生命周期函数--监听页面初次渲染完成
+ */
+ onReady() {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面显示
+ */
+ onShow() {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面隐藏
+ */
+ onHide() {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面卸载
+ */
+ onUnload() {
+
+ },
+
+ /**
+ * 页面相关事件处理函数--监听用户下拉动作
+ */
+ onPullDownRefresh() {
+
+ },
+
+ /**
+ * 页面上拉触底事件的处理函数
+ */
+ onReachBottom() {
+
+ },
+
+ /**
+ * 用户点击右上角分享
+ */
+ onShareAppMessage() {
+
+ }
+})
\ No newline at end of file
diff --git a/pages/RechargeRecordDesc/RechargeRecordDesc.json b/pages/RechargeRecordDesc/RechargeRecordDesc.json
new file mode 100644
index 0000000..383fda7
--- /dev/null
+++ b/pages/RechargeRecordDesc/RechargeRecordDesc.json
@@ -0,0 +1,4 @@
+{
+ "usingComponents": {},
+ "navigationBarTitleText": "返费详情"
+}
\ No newline at end of file
diff --git a/pages/RechargeRecordDesc/RechargeRecordDesc.wxml b/pages/RechargeRecordDesc/RechargeRecordDesc.wxml
new file mode 100644
index 0000000..79a9601
--- /dev/null
+++ b/pages/RechargeRecordDesc/RechargeRecordDesc.wxml
@@ -0,0 +1,44 @@
+
+
+ 返费账户
+ {{Info.name}}
+
+
+ 返费总额
+ {{Info.amount * 100}}
+
+
+ 剩余待返
+ {{Info.wait_amount * 100}}
+
+
+ 返费方式
+ 按月
+ 按年
+
+
+ 返费状态
+ 待转账
+ 转账中
+ 已完成
+ 已取消
+
+
+ 返款时间
+ {{Info.up_time}}
+
+
+
+
+
+ 返费月份
+ 返费账户
+ 返费金额
+
+
+
+ {{item.month}}
+ {{item.name}}
+ {{item.amount * 100}}元
+
+
\ No newline at end of file
diff --git a/pages/RechargeRecordDesc/RechargeRecordDesc.wxss b/pages/RechargeRecordDesc/RechargeRecordDesc.wxss
new file mode 100644
index 0000000..89c53cd
--- /dev/null
+++ b/pages/RechargeRecordDesc/RechargeRecordDesc.wxss
@@ -0,0 +1,119 @@
+page {
+ background-color: #f5f5f5;
+}
+
+.payItem {
+ padding: 30rpx 20rpx;
+ background-color: #fff;
+ margin-top: 30rpx;
+ padding-bottom: 1rpx;
+}
+
+.payItem1 {
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+}
+
+.payItem1_time {
+ font-weight: 400;
+ font-size: 26rpx;
+ color: #222222;
+}
+
+.payItem1_state1 {
+ font-weight: 400;
+ font-size: 26rpx;
+ color: #2583FF;
+}
+
+.payItem1_state2 {
+ font-weight: 400;
+ font-size: 26rpx;
+ color: #D5AC66;
+}
+
+.payItem1_state3 {
+ font-weight: 400;
+ font-size: 26rpx;
+ color: #222222;
+}
+
+.payItem1_state4 {
+ font-weight: 400;
+ font-size: 26rpx;
+ color: #222222;
+}
+
+.payItem_row {
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+ margin-bottom: 30rpx;
+}
+
+.payItem_row2 {
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ margin-bottom: 30rpx;
+
+}
+
+.payItem_title {
+ font-weight: 400;
+ font-size: 26rpx;
+ color: #222222;
+}
+
+.payItem_con {
+ font-weight: 400;
+ font-size: 26rpx;
+ color: #222222;
+}
+
+.payItem_payBox {
+ display: flex;
+ justify-content: flex-end;
+ margin-right: -4rpx;
+}
+
+.payItem_pay {
+ width: 150rpx;
+ height: 50rpx;
+ background: #2583FF;
+ border-radius: 100rpx 100rpx 100rpx 100rpx;
+ font-weight: 400;
+ font-size: 26rpx;
+ color: #FFFFFF;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+
+}
+
+page{
+ padding: 0;
+}
+
+.payList {
+ padding: 30rpx 20rpx;
+ background-color: #fff;
+ margin-top: 30rpx;
+}
+
+.payListTit {
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+ border-bottom: 1rpx solid #999;
+ padding-bottom: 30rpx;
+ font-weight: 700;
+}
+
+.payList_item {
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+ padding: 30rpx 0;
+}
\ No newline at end of file
diff --git a/pages/SubscribeMessage/SubscribeMessage.json b/pages/SubscribeMessage/SubscribeMessage.json
index 6f5247b..8b3cf9d 100644
--- a/pages/SubscribeMessage/SubscribeMessage.json
+++ b/pages/SubscribeMessage/SubscribeMessage.json
@@ -1,3 +1,4 @@
{
- "usingComponents": {}
+ "usingComponents": {},
+ "navigationBarTitleText": "消息订阅"
}
\ No newline at end of file
diff --git a/pages/chooseEntrance/chooseEntrance.js b/pages/chooseEntrance/chooseEntrance.js
index 41773ab..7982755 100644
--- a/pages/chooseEntrance/chooseEntrance.js
+++ b/pages/chooseEntrance/chooseEntrance.js
@@ -154,7 +154,7 @@ Page({
if (accountInfo.miniProgram.version) {
version = accountInfo.miniProgram.version
} else {
- version = '1.0.22'
+ version = '1.0.24'
}
wx.setStorageSync('version', version)
diff --git a/pages/deposit/deposit copy.js b/pages/deposit/deposit copy.js
index a9dbbf2..6347f23 100644
--- a/pages/deposit/deposit copy.js
+++ b/pages/deposit/deposit copy.js
@@ -183,23 +183,50 @@ Page({
util.postUrl2(apiArr.area, {}, res1 => {
util.postUrl2(apiArr.business, {}, res2 => {
wx.hideLoading();
- // 默认展示第一条数据 的市区 和 城区
+ // 省列表来自 res
+ let cityList = res.data.data.rows;
+ // 市列表来自 res1
+ let areaList = res1.data.data.rows;
+ // 区列表来自 res2
+ let businessList = res2.data.data.rows;
+
+ // 处理市列表,将衡水市放到最后
+ let hengshuiIndex = areaList.findIndex(item => item.name === '衡水市');
+ console.log(hengshuiIndex, 'hengshuiIndex');
+ if (hengshuiIndex !== -1) {
+ const hengshui = areaList.splice(hengshuiIndex, 1)[0];
+ areaList.push(hengshui);
+ }
+
+ console.log(businessList);
+ // 处理区列表,将衡水市的桃城区放到最后一个
+ let taochengIndex = businessList.findIndex(item => item.business_name === '桃城区');
+ if (taochengIndex !== -1) {
+ const taocheng = businessList.splice(taochengIndex, 1)[0];
+ businessList.unshift(taocheng);
+ }
+
+
+ // 默认展示第一条数据的省、市和区
let newArea = res1.data.data.rows.filter((item) => {
return item.city_id === res.data.data.rows[0].city_id
});
let newbus = res2.data.data.rows.filter((item) => {
return item.area_id === res1.data.data.rows[0].area_id
});
- wx.setStorageSync('cityList', res.data.data.rows)
- wx.setStorageSync('areaList', res1.data.data.rows)
- wx.setStorageSync('businessList', res2.data.data.rows)
+
+ // 正确存储数据
+ wx.setStorageSync('cityList', cityList)
+ wx.setStorageSync('areaList', areaList)
+ wx.setStorageSync('businessList', businessList)
+
this.setData({
- cityList: res.data.data.rows,
- areaList: res1.data.data.rows,
- businessList: res2.data.data.rows,
- newAreaList: newArea, // 默认展示 市区
- newBusiness: newbus, // 默认展示 县/区
- confirmCity: res1.data.data.rows[0],
+ cityList: cityList,
+ areaList: areaList,
+ businessList: businessList,
+ newAreaList: newArea, // 默认展示市
+ newBusiness: newbus, // 默认展示区
+ confirmCity: cityList[0],
confirmArea: newArea[0],
confirmBusiness: newbus[0],
})
diff --git a/pages/deposit/deposit copy.wxml b/pages/deposit/deposit copy.wxml
new file mode 100644
index 0000000..b078f09
--- /dev/null
+++ b/pages/deposit/deposit copy.wxml
@@ -0,0 +1,148 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 客户姓名:
+
+
+
+
+
+
+ 客户电话:
+
+
+
+
+
+
+
+
+ 预约时间:
+
+
+
+
+
+
+ 所在区域:
+
+
+
+
+
+
+ 详细地址:
+
+
+
+
+
+
+
+ 产品套餐:
+
+
+
+
+
+
+ 支付金额
+
+
+
+
+
+
+ 详细说明
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{item.name}}
+
+
+ {{item.name}}
+
+
+ {{item.business_name}}
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/pages/deposit/deposit.js b/pages/deposit/deposit.js
index 1d5ac0c..fe4b58a 100644
--- a/pages/deposit/deposit.js
+++ b/pages/deposit/deposit.js
@@ -46,9 +46,37 @@ Page({
}
return value;
},
+
+ swiperList:[],
+ swiperActive:"0",
+ options: [],
+ selectedId: 1,// 已选中值,需回显时传
+ showSelect: false, // [暂未发现]处理滚动选项区域时背景页面滚动问题
},
+ swiperChange(e){
+ let that = this
+ that.setData({
+ swiperActive: e.detail.current
+ })
+ },
+ handleChange(e) {
+ console.log(e.detail); // {value: 3, label: "测试数据三"}
+ let that = this
+ let depositList = that.data.depositList
+ depositList.forEach(item => {
+ if (item.id == e.detail.id) {
+ that.setData({
+ deposit: item,
+ selectedDeposit: item,
+ swiperList: item.imgList
+ })
+ }
+ })
+ },
+ handleShow(e) {
+ },
changeDeposit() {
@@ -90,16 +118,46 @@ Page({
this.setData({ show4: false });
},
+ extractImagesFromRichText(richText) {
+ const imageArray = [];
+ const regex = /
]+src=["']([^"']+)["'][^>]*>/g;
+ let match;
+
+ while ((match = regex.exec(richText)) !== null) {
+ imageArray.push({
+ src: match[1],
+ fullTag: match[0]
+ });
+ }
+
+ return imageArray;
+ },
+ addImageStyles(richText) {
+ return richText.replace(/
]*)>/g, (match, attributes) => {
+ // 检查是否已有style属性
+ if (/style\s*=\s*["'][^"']*["']/.test(attributes)) {
+ return `
`;
+ } else {
+ return `
`;
+ }
+ });
+ },
+
getDepositList() {
let that = this
util.postUrl(apiArr.getDepositList, { dealer_id: wx.getStorageSync('dealer_id') }, res => {
const depositList = res.rows.map(item => ({
+ id:item.id,
text: item.title,
value: item.id,
- // value: item.id,
price: item.price,
- desc: item.desc
+ desc: that.addImageStyles(item.desc),
+ imgList: that.extractImagesFromRichText(item.desc)
}));
+ console.log(depositList,'223');
that.setData({ depositList });
})
},
@@ -183,23 +241,50 @@ Page({
util.postUrl2(apiArr.area, {}, res1 => {
util.postUrl2(apiArr.business, {}, res2 => {
wx.hideLoading();
- // 默认展示第一条数据 的市区 和 城区
+ // 省列表来自 res
+ let cityList = res.data.data.rows;
+ // 市列表来自 res1
+ let areaList = res1.data.data.rows;
+ // 区列表来自 res2
+ let businessList = res2.data.data.rows;
+
+ // 处理市列表,将衡水市放到最后
+ let hengshuiIndex = areaList.findIndex(item => item.name === '衡水市');
+ console.log(hengshuiIndex, 'hengshuiIndex');
+ if (hengshuiIndex !== -1) {
+ const hengshui = areaList.splice(hengshuiIndex, 1)[0];
+ areaList.push(hengshui);
+ }
+
+ console.log(businessList);
+ // 处理区列表,将衡水市的桃城区放到最后一个
+ let taochengIndex = businessList.findIndex(item => item.business_name === '桃城区');
+ if (taochengIndex !== -1) {
+ const taocheng = businessList.splice(taochengIndex, 1)[0];
+ businessList.unshift(taocheng);
+ }
+
+
+ // 默认展示第一条数据的省、市和区
let newArea = res1.data.data.rows.filter((item) => {
return item.city_id === res.data.data.rows[0].city_id
});
let newbus = res2.data.data.rows.filter((item) => {
return item.area_id === res1.data.data.rows[0].area_id
});
- wx.setStorageSync('cityList', res.data.data.rows)
- wx.setStorageSync('areaList', res1.data.data.rows)
- wx.setStorageSync('businessList', res2.data.data.rows)
+
+ // 正确存储数据
+ wx.setStorageSync('cityList', cityList)
+ wx.setStorageSync('areaList', areaList)
+ wx.setStorageSync('businessList', businessList)
+
this.setData({
- cityList: res.data.data.rows,
- areaList: res1.data.data.rows,
- businessList: res2.data.data.rows,
- newAreaList: newArea, // 默认展示 市区
- newBusiness: newbus, // 默认展示 县/区
- confirmCity: res1.data.data.rows[0],
+ cityList: cityList,
+ areaList: areaList,
+ businessList: businessList,
+ newAreaList: newArea, // 默认展示市
+ newBusiness: newbus, // 默认展示区
+ confirmCity: cityList[0],
confirmArea: newArea[0],
confirmBusiness: newbus[0],
})
@@ -285,7 +370,13 @@ Page({
})
return
}
-
+ if(!that.data.deposit.text){
+ wx.showToast({
+ title: '请选择产品套餐',
+ icon: "none"
+ })
+ return
+ }
util.postUrl(apiArr.createPosit, {
deal_deposit_id: that.data.selectedDeposit.value,
@@ -461,7 +552,6 @@ Page({
phone: wx.getStorageSync('phone')
})
// that.getDeposit()
- that.getDepositList()
if (wx.getStorageSync('cityList') && wx.getStorageSync('areaList') && wx.getStorageSync('businessList')) {
let res = wx.getStorageSync('cityList')
let res1 = wx.getStorageSync('areaList')
@@ -487,6 +577,16 @@ Page({
} else {
that.getSSQ()
}
+ that.getDepositList()
+
+ setTimeout(() => {
+ that.setData({
+ deposit: that.data.depositList[0],
+ selectedDeposit: that.data.depositList[0],
+ depositName: that.data.depositList[0].text,
+ swiperList: that.data.depositList[0].imgList,
+ })
+ }, 1500)
},
/**
diff --git a/pages/deposit/deposit.json b/pages/deposit/deposit.json
index 748bc2f..657d8cc 100644
--- a/pages/deposit/deposit.json
+++ b/pages/deposit/deposit.json
@@ -1,4 +1,6 @@
{
- "usingComponents": {},
+ "usingComponents": {
+ "wan-select": "/component/wan-select/index"
+ },
"navigationBarTitleText": "支付押金"
}
\ No newline at end of file
diff --git a/pages/deposit/deposit.wxml b/pages/deposit/deposit.wxml
index cded9a5..ae7896f 100644
--- a/pages/deposit/deposit.wxml
+++ b/pages/deposit/deposit.wxml
@@ -1,26 +1,27 @@
-
-
+
+
+
+
+
+
-
-
+
+
+
+
+
- 客户姓名:
+ 客户姓名:
- 客户电话:
+ 客户电话:
@@ -29,48 +30,53 @@
- 预约时间:
+ 预约时间:
- 所在区域:
+ 所在区域:
- 详细地址
+ 详细地址:
-
- 选择类型
-
-
-
+
+
+
-
+
支付金额
-
+
详细说明
-
-
+
diff --git a/pages/deposit/deposit.wxss b/pages/deposit/deposit.wxss
index 451bf33..06a8f2d 100644
--- a/pages/deposit/deposit.wxss
+++ b/pages/deposit/deposit.wxss
@@ -99,10 +99,11 @@
.footer {
position: fixed;
- bottom: 28rpx;
+ bottom: 0rpx;
left: 0;
right: 0;
padding: 20rpx;
+ padding-bottom: 40rpx;
background-color: #fff;
box-shadow: 0 -4rpx 12rpx rgba(0, 0, 0, 0.05);
}
@@ -123,20 +124,32 @@
border-bottom: 1rpx solid rgba(51, 51, 51, 0.226);
padding-bottom: 30rpx;
}
-.item2{
+.input-item2{
+ padding-bottom: 10rpx;
+}
+.item2 {
display: flex;
align-items: flex-start;
padding-bottom: 0;
border-bottom: none;
}
-.item2 .label{
+
+.item2 .label {
white-space: nowrap;
}
-.item2 textarea{
+
+.item2 textarea {
flex: 1;
width: auto;
height: auto;
}
+.item3{
+ align-items: flex-start;
+ flex-direction: column;
+}
+.item3 .value{
+ margin-top: 20rpx;
+}
.label {
width: 160rpx;
font-size: 28rpx;
@@ -187,10 +200,59 @@
display: flex;
margin: 20rpx 30rpx 0;
justify-content: space-between;
- }
- .popup_label {
+}
+
+.popup_label {
color: #999;
- }
- .color_blue {
+}
+
+.color_blue {
color: #576b95;
- }
\ No newline at end of file
+}
+
+.swiper {
+ margin-bottom: 30rpx;
+ width: 710rpx;
+ height: 750rpx;
+}
+.swiper swiper{
+ height: 710rpx;
+ width: 100%;
+}
+.dot {
+ display: flex;
+ justify-content: center;
+ align-items: center;
+ margin-top: 20rpx;
+}
+
+.dot-item {
+ width: 10rpx;
+ height: 10rpx;
+ border-radius: 50%;
+ background-color: #ccc;
+ margin: 0 10rpx;
+}
+
+.dot-item.active {
+ background-color: #576b95;
+}
+
+
+
+.select_all_view {
+ width: 100%;
+ display: flex !important;
+ justify-content: space-between !important;
+}
+.inputPlaceholder {
+ display: flex !important;
+ width: 100% !important;
+ justify-content: space-between !important;
+ border: none !important;
+ background-color: transparent !important;
+ color: #666;
+}
+.select_view{
+ flex: 1;
+}
\ No newline at end of file
diff --git a/pages/filterChange/filterChange.wxml b/pages/filterChange/filterChange.wxml
index 66fc879..5a6e546 100644
--- a/pages/filterChange/filterChange.wxml
+++ b/pages/filterChange/filterChange.wxml
@@ -28,7 +28,7 @@
{{item.parts_name}}
- 剩余可用{{item.available_days}}天
+ 预计剩余寿命:{{item.available_days}}天
diff --git a/pages/info/info.js b/pages/info/info.js
index 6f69bec..fe0b584 100644
--- a/pages/info/info.js
+++ b/pages/info/info.js
@@ -14,8 +14,14 @@ Page({
fileList: [],
avatarUrl: "",
avatarUrl2: "",
+ isAva:false
},
+ renewalRecord(){
+ wx.navigateTo({
+ url: '/pages/renewalRecord/renewalRecord',
+ })
+ },
SubscribeMessage(){
wx.navigateTo({
url: '../SubscribeMessage/SubscribeMessage',
@@ -142,7 +148,12 @@ Page({
})
if (wx.getStorageSync('userInfo').img) {
that.setData({
- avatar: util.img_url + wx.getStorageSync('userInfo').img
+ avatar: util.img_url + wx.getStorageSync('userInfo').img,
+ isAva:true
+ })
+ }else{
+ that.setData({
+ isAva:false
})
}
},
@@ -168,7 +179,7 @@ Page({
wx.removeStorageSync('loginMaster');
wx.reLaunch({
- url: '/pages/chooseEntrance/chooseEntrance'
+ url: '/pages/newLogin/newLogin'
})
},
/**
diff --git a/pages/info/info.wxml b/pages/info/info.wxml
index 74d1a19..3eb7ddf 100644
--- a/pages/info/info.wxml
+++ b/pages/info/info.wxml
@@ -3,7 +3,7 @@
- 点击上传
+ 点击上传
+
+
+
+
+ 用户快捷登录1
+
+
+
+ 用户快捷登录2
+
+
+
+ 用户快捷登录
+
+
+
+
+ 我已阅读并同意
+ 《用户服务协议和隐私政策》
+
+
+ 合作伙伴
+
+
+
+
+
+
+
+
+ 手机号快捷登录
+
+
+
+ 手机号快捷登录
+
+
+
+ 手机号快捷登录
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 登录
+
+
+
+ 登录
+
+
+
+
+
+
+ 我是经销商
+ 我是师傅
+
+
+
+
+ 我已阅读并同意
+ 《用户服务协议和隐私政策》
+
+
+
+ 您好,本服务仅为已开通【人人爱净水】账号的 经销商提供服务。若您尚未完成账号开通,建议 暂不进行授权登录。如有任何使用疑问,欢迎联 系【人人爱净水】客服400-699-8890。
+
+
+
+ 用户登录
+
+
+
+
\ No newline at end of file
diff --git a/pages/newLogin/newLogin.wxss b/pages/newLogin/newLogin.wxss
new file mode 100644
index 0000000..85817bd
--- /dev/null
+++ b/pages/newLogin/newLogin.wxss
@@ -0,0 +1,144 @@
+.newLogin {
+ height: 100vh;
+ padding-top: 300rpx;
+ box-sizing: border-box;
+ background: url(https://wechat-img-file.oss-cn-beijing.aliyuncs.com/newLogin_bgImg.png) no-repeat;
+ background-size: cover;
+ overflow: hidden;
+}
+
+page {
+ padding-bottom: 0;
+}
+
+.logo {
+ width: 197rpx;
+ height: 231rpx;
+ margin: 0 auto;
+}
+
+.text {
+ font-weight: normal;
+ font-size: 54rpx;
+ color: #0E9ACE;
+ text-align: center;
+ font-weight: 700;
+}
+
+
+.agreement {
+ font-size: 24rpx;
+ color: #999;
+ text-align: center;
+ margin-top: 30rpx;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+}
+
+.link {
+ color: #2583ff;
+}
+
+
+.login-button {
+ margin: 140rpx 52rpx 0 48rpx;
+ font-weight: 700;
+}
+
+.login-btn {
+ font-weight: 600;
+ font-size: 36rpx;
+ color: #FFFFFF;
+ background: #2583FF;
+ border-radius: 100rpx 100rpx 100rpx 100rpx;
+}
+
+.changeLogin {
+ font-weight: 400;
+ font-size: 28rpx;
+ color: #000000;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ margin-top: 40rpx;
+ flex-wrap: nowrap;
+ width: 100%;
+}
+
+.changeLogin image {
+ width: 35rpx;
+ height: 35rpx;
+ margin-left: 10rpx;
+}
+
+.mt {
+ margin-top: 370rpx;
+}
+
+.choseType {
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ margin-top: 60rpx;
+}
+
+.van-radio-group {
+ display: flex !important;
+ align-items: center !important;
+}
+
+
+
+.login-form {
+ margin-top: 40rpx;
+}
+
+.login-input {
+ width: 80%;
+ margin: 20rpx auto;
+ padding: 20rpx;
+ border: 1rpx solid #ddd;
+ border-radius: 8rpx;
+ height: 80rpx;
+}
+
+.msg {
+ font-weight: 400;
+ font-size: 24rpx;
+ color: #555555;
+ width: 554rpx;
+ background: #FFFFFF;
+ border-radius: 20rpx 20rpx 20rpx 20rpx;
+ margin: 0 auto;
+ padding: 16rpx 25rpx;
+ margin-top: 70rpx;
+}
+
+.van-radio__label {
+ font-weight: 600;
+ padding-left: 10rpx !important;
+}
+
+.van-radio__label--right {
+ margin-right: 20rpx !important;
+}
+
+.van-radio {
+ margin-left: 10rpx !important;
+}
+
+.mt2 {
+ margin-top: 30rpx;
+}
+
+.ipt {
+ width: 80%;
+ margin: 20rpx auto;
+ border: 1rpx solid #ddd;
+ border-radius: 8rpx;
+ height: 90rpx;
+}
+.ipt .van-field {
+ background: transparent;
+}
\ No newline at end of file
diff --git a/pages/renewalRecord/renewalRecord.js b/pages/renewalRecord/renewalRecord.js
new file mode 100644
index 0000000..3b550dc
--- /dev/null
+++ b/pages/renewalRecord/renewalRecord.js
@@ -0,0 +1,104 @@
+import { apiArr } from '../../api/user';
+import apiArr2 from '../../api/water_filter';
+let util = require('../../utils/util')
+// pages/RechargeRecord/RechargeRecord.js
+Page({
+
+ /**
+ * 页面的初始数据
+ */
+ data: {
+ List: [
+
+ ],
+ page_size: 10,
+ page_num: 1,
+ flag: false
+ },
+
+ getBuyList() {
+ let that = this
+ util.postUrl(apiArr2.getOrderBuyList, {
+ page_num: that.data.page_num,
+ page_size: that.data.page_size,
+ }, res => {
+ let flag = false
+ if (res.rows && res.rows.length == that.data.page_size) {
+ flag = true
+ } else {
+ flag = false
+ }
+ that.setData({
+ flag,
+ List: that.data.List.concat(res.rows),
+ page_num: that.data.page_num + 1
+ })
+ })
+ },
+
+ desc() {
+ console.log(123);
+ wx.navigateTo({
+ url: `/pages/RechargeRecordDesc/RechargeRecordDesc`,
+ })
+ },
+ /**
+ * 生命周期函数--监听页面加载
+ */
+ onLoad(options) {
+ let that = this
+ that.getBuyList()
+ },
+
+ /**
+ * 生命周期函数--监听页面初次渲染完成
+ */
+ onReady() {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面显示
+ */
+ onShow() {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面隐藏
+ */
+ onHide() {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面卸载
+ */
+ onUnload() {
+
+ },
+
+ /**
+ * 页面相关事件处理函数--监听用户下拉动作
+ */
+ onPullDownRefresh() {
+
+ },
+
+ /**
+ * 页面上拉触底事件的处理函数
+ */
+ onReachBottom() {
+ let that = this
+ if (that.data.flag) {
+ that.getBuyList()
+ }
+ },
+
+ /**
+ * 用户点击右上角分享
+ */
+ onShareAppMessage() {
+
+ }
+})
\ No newline at end of file
diff --git a/pages/renewalRecord/renewalRecord.json b/pages/renewalRecord/renewalRecord.json
new file mode 100644
index 0000000..42cde2c
--- /dev/null
+++ b/pages/renewalRecord/renewalRecord.json
@@ -0,0 +1,4 @@
+{
+ "usingComponents": {},
+ "navigationBarTitleText": "续费记录"
+}
\ No newline at end of file
diff --git a/pages/renewalRecord/renewalRecord.wxml b/pages/renewalRecord/renewalRecord.wxml
new file mode 100644
index 0000000..9bc6319
--- /dev/null
+++ b/pages/renewalRecord/renewalRecord.wxml
@@ -0,0 +1,42 @@
+
+
+ 产品编号
+ {{item.order_no}}
+
+
+ 续费套餐
+ {{item.package_name}}
+
+
+ 产品类型
+ {{item.package_type}}
+
+
+ 充值天数
+ {{item.package_days}}
+
+
+ 套餐流量
+ {{item.package_flow}}
+
+
+ 支付方式
+ {{item.order_source == 1?'微信支付':'线下'}}
+
+
+ 支付状态
+ 待支付
+ 已支付
+ 已取消
+ 其他
+
+
+ 支付时间
+ {{item.pay_time}}
+
+
+
+
+
\ No newline at end of file
diff --git a/pages/renewalRecord/renewalRecord.wxss b/pages/renewalRecord/renewalRecord.wxss
new file mode 100644
index 0000000..e3e1983
--- /dev/null
+++ b/pages/renewalRecord/renewalRecord.wxss
@@ -0,0 +1,91 @@
+page{
+ background-color: #f5f5f5;
+}
+
+.payItem {
+ padding: 30rpx 20rpx;
+ background-color: #fff;
+ margin-top: 30rpx;
+ padding-bottom: 1rpx;
+}
+
+.payItem1 {
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+}
+
+.payItem1_time {
+ font-weight: 400;
+ font-size: 26rpx;
+ color: #222222;
+}
+
+.payItem1_state1 {
+ font-weight: 400;
+ font-size: 26rpx;
+ color: #2583FF;
+}
+
+.payItem1_state2 {
+ font-weight: 400;
+ font-size: 26rpx;
+ color: #D5AC66;
+}
+
+.payItem1_state3 {
+ font-weight: 400;
+ font-size: 26rpx;
+ color: #222222;
+}
+
+.payItem1_state4 {
+ font-weight: 400;
+ font-size: 26rpx;
+ color: #222222;
+}
+
+.payItem_row {
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+ margin-bottom: 30rpx;
+}
+.payItem_row2 {
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ margin-bottom: 30rpx;
+
+}
+.payItem_title {
+ font-weight: 400;
+ font-size: 26rpx;
+ color: #222222;
+}
+
+.payItem_con {
+ font-weight: 400;
+ font-size: 26rpx;
+ color: #222222;
+}
+
+.payItem_payBox {
+ display: flex;
+ justify-content: flex-end;
+ margin-right: -4rpx;
+}
+
+.payItem_pay {
+ width: 150rpx;
+ height: 50rpx;
+ background: #2583FF;
+ border-radius: 100rpx 100rpx 100rpx 100rpx;
+ font-weight: 400;
+ font-size: 26rpx;
+ color: #FFFFFF;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+
+}
\ No newline at end of file
diff --git a/pages/water_filter/water_filter.js b/pages/water_filter/water_filter.js
index bd9d558..ac3da0d 100644
--- a/pages/water_filter/water_filter.js
+++ b/pages/water_filter/water_filter.js
@@ -111,7 +111,7 @@ Page({
},
back() {
wx.redirectTo({
- url: '/pages/chooseEntrance/chooseEntrance',
+ url: '/pages/newLogin/newLogin',
})
},
scanOrder() {
@@ -287,17 +287,17 @@ Page({
that.setData({
newOrderList: that.data.newOrderList.concat(res.rows || []),
})
- if(res.rows.length){
+ if (res.rows.length) {
that.getNewOrderInfo(res.rows[0].install_id)
}
}
})
},
- call(){
- let that= this
+ call() {
+ let that = this
wx.makePhoneCall({
- phoneNumber: that.data.newOrderDesc.cus_service_phone,
+ phoneNumber: that.data.newOrderDesc.cus_service_phone,
})
},
@@ -339,7 +339,6 @@ Page({
wx.setStorageSync('openId', ress.open_id);
wx.setStorageSync('shopId', ress.wshop_id);
wx.setStorageSync('mshopId', ress.mshop_id);
- wx.setStorageSync('dealer_id', ress.dealer_id);
wx.setStorageSync('is_dev', ress.is_dev);
that.setData({
is_dev: wx.getStorageSync('is_dev')
@@ -365,7 +364,7 @@ Page({
if (res.confirm) {
wx.navigateTo({
- url: '../login/login',
+ url: '/pages/newLogin/newLogin',
})
}
}
@@ -396,7 +395,7 @@ Page({
if (res.confirm) {
wx.navigateTo({
- url: '../login/login',
+ url: '/pages/newLogin/newLogin',
})
}
}
@@ -433,7 +432,7 @@ Page({
if (res.confirm) {
wx.navigateTo({
- url: '../login/login',
+ url: '/pages/newLogin/newLogin',
})
}
}
@@ -457,7 +456,7 @@ Page({
if (res.confirm) {
wx.navigateTo({
- url: '../login/login',
+ url: '/pages/newLogin/newLogin',
})
}
}
@@ -481,6 +480,7 @@ Page({
})
},
jump(e) {
+ let that = this
if (!e.target.dataset.url) {
this.NotOpen()
}
@@ -496,12 +496,30 @@ Page({
if (res.confirm) {
wx.navigateTo({
- url: '../login/login',
+ url: '/pages/newLogin/newLogin',
})
}
}
})
}
+ if(e.target.dataset.url == '/packages/WaterPurifier/pages/Recharge/Recharge'){
+ if(that.data.currentDevice.network_status != 1){
+ return wx.showModal({
+ title: '设备已离线!',
+ content: '请将设备断电后重新上电,确保设备在线,再进行续费充值!',
+ showCancel:false,
+ complete: (res) => {
+ if (res.cancel) {
+
+ }
+
+ if (res.confirm) {
+
+ }
+ }
+ })
+ }
+ }
wx.navigateTo({
url: e.target.dataset.url,
})
@@ -662,7 +680,7 @@ Page({
}
if (res.confirm) {
wx.navigateTo({
- url: '../login/login',
+ url: '/pages/newLogin/newLogin',
})
}
}
@@ -712,7 +730,37 @@ Page({
(1 - (item.threshold_volume || 0) / (item.available_volume || 1)) * 100
);
})
+
+ const first = res.device_part.findIndex(item =>
+ item.parts_name.indexOf("PP棉滤芯") !== -1
+ );
+ if (first !== -1) {
+ const [removed] = res.device_part.splice(first, 1); // 移除该对象
+ res.device_part.unshift(removed); // 插入到首位
+ }
+ const Second = res.device_part.findIndex(item =>
+ item.parts_name.indexOf("PP+CB") !== -1
+ );
+ if (Second !== -1) {
+ const [removed] = res.device_part.splice(Second, 1); // 移除该对象
+ res.device_part.splice(1, 0, removed); // 插入到第二位
+ }
+ const Third = res.device_part.findIndex(item =>
+ item.parts_name.indexOf("RO") !== -1
+ );
+ if (Third !== -1) {
+ const [removed] = res.device_part.splice(Third, 1); // 移除该对象
+ res.device_part.splice(2, 0, removed); // 插入到第二位
+ }
+ const Fourth = res.device_part.findIndex(item =>
+ item.parts_name.indexOf("后置活性炭") !== -1
+ );
+ if (Fourth !== -1) {
+ const [removed] = res.device_part.splice(Fourth, 1); // 移除该对象
+ res.device_part.splice(3, 0, removed); // 插入到第二位
+ }
}
+
res.today = Number(res.today).toFixed(2)
res.yesterday = Number(res.yesterday).toFixed(2)
@@ -722,9 +770,9 @@ Page({
that.getDeriveInfo()
wx.setStorageSync('device_id', res.device_id),
- wx.setStorageSync('currentDevice', res)
+ wx.setStorageSync('currentDevice', res)
wx.setStorageSync('billing_method', res.billing_method)
-
+ wx.setStorageSync('dealer_id', res.dealer_id);
if (!res.device_net) {
} else {
@@ -879,7 +927,7 @@ Page({
if (res.confirm) {
wx.navigateTo({
- url: '../login/login',
+ url: '/pages/newLogin/newLogin',
})
}
}
diff --git a/pages/water_filter/water_filter.wxml b/pages/water_filter/water_filter.wxml
index 6afb034..620c9e1 100644
--- a/pages/water_filter/water_filter.wxml
+++ b/pages/water_filter/water_filter.wxml
@@ -33,7 +33,7 @@
- 净化前
+ 原水
水质TDS值
{{currentDevice.raw_water_value}}
PPM
@@ -43,7 +43,7 @@
- 净化后
+ 净水
水质TDS值
{{currentDevice.purification_water_value}}
PPM
@@ -72,18 +72,18 @@
- 净化前水质:极好
- 净化前水质:良好
- 净化前水质:正常
- 净化前水质:较差
- 净化前水质:极差
+ 极好
+ 良好
+ 正常
+ 差
+ 极差
-
- 净化后水质:极好
- 净化后水质:良好
- 净化后水质:正常
- 净化后水质:较差
- 净化后水质:极差
+
+ 极好
+ 良好
+ 正常
+ 差
+ 极差
@@ -109,9 +109,8 @@
-
开机
- 关机
+ 关机
制水故障
漏水故障
主板故障
@@ -119,7 +118,8 @@
- {{currentDevice.network_status == '1'?'在线':'离线'}}
+ 在线
+ 离线
@@ -157,9 +157,6 @@
天
-
-
-
@@ -185,7 +182,9 @@
- {{item.parts_name}}
+
+ {{item.parts_name}}
+
@@ -248,6 +247,12 @@
+
+
+ 1
+ 2
+
+
添加设备
@@ -281,12 +286,12 @@
- 维修师傅:
+ 安装师傅:
{{newOrderDesc.repairman_name}}
- 维修师傅电话:
+ 师傅电话:
{{newOrderDesc.repairman_phone}}
@@ -304,24 +309,23 @@
忽视
-
- 客服电话:
-
- {{newOrderDesc.cus_service_phone}}
-
-
-
-
-
客服二维码:
-
+
+
+
+ 客服电话:
+
+ {{newOrderDesc.cus_service_phone}}
+
+
+
diff --git a/pages/water_filter/water_filter.wxss b/pages/water_filter/water_filter.wxss
index cbd3a63..9926146 100644
--- a/pages/water_filter/water_filter.wxss
+++ b/pages/water_filter/water_filter.wxss
@@ -1,3 +1,6 @@
+page{
+ padding-bottom: 200rpx !important;
+}
.nav-box {
box-sizing: border-box;
width: 100%;
@@ -135,6 +138,10 @@
/* 净化前后水质 */
.water-quality {
margin-left: 80rpx;
+ margin-right: 80rpx;
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
margin-top: 23rpx;
}
@@ -150,6 +157,7 @@
text-align: center;
height: auto;
background: transparent;
+ text-align: center;
}
.water-quality2 .water-quality-text {
@@ -168,13 +176,17 @@
height: 50rpx;
padding: 10rpx 38rpx 10rpx 30rpx;
justify-content: center;
+ text-align: center;
align-items: center;
border-radius: 20rpx;
background: linear-gradient(to right, #2583FF1a, #2583FF);
}
+.water-quality-right{
+ background: transparent !important;
+}
.water-quality-text {
- font-size: 26rpx;
+ font-size: 34rpx;
color: #FFFFFF;
}
@@ -325,6 +337,7 @@
.van-grid-item__text {
font-size: 26rpx !important;
color: #222222 !important;
+ margin-top: 10rpx !important;
}
/* 滤芯寿命 */
@@ -360,6 +373,9 @@
overflow: hidden;
white-space: nowrap;
font-size: 26rpx;
+ display: flex;
+ /* justify-content: space-between; */
+ padding-top: 10rpx;
}
.van-progress {
@@ -640,7 +656,6 @@
padding: 20rpx;
background: #fff;
border-radius: 8rpx;
- box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.1);
}
.section-title {
@@ -737,4 +752,19 @@
/* 每行显示3张图片,减去间距 */
height: 210rpx;
border-radius: 8rpx;
+}
+
+.van-grid-item__icon{
+ height: 100rpx !important;
+ width: 100rpx !important;
+}
+
+.van-grid-item__content{
+ padding: 0 !important;
+ padding-bottom: 10rpx !important;
+}
+
+.red{
+ color: red !important;
+ font-size: 36rpx;
}
\ No newline at end of file
diff --git a/project.private.config.json b/project.private.config.json
index 72969d9..1b35404 100644
--- a/project.private.config.json
+++ b/project.private.config.json
@@ -2,6 +2,174 @@
"condition": {
"miniprogram": {
"list": [
+ {
+ "name": "packages/partner/pages/partner",
+ "pathName": "packages/partner/pages/partner",
+ "query": "",
+ "scene": null,
+ "launchMode": "default"
+ },
+ {
+ "name": "师傅新增维修工单",
+ "pathName": "packages/master/addNewOrder/index",
+ "query": "",
+ "launchMode": "default",
+ "scene": null
+ },
+ {
+ "name": "师傅首页",
+ "pathName": "packages/master/masterIndex/index",
+ "query": "",
+ "launchMode": "default",
+ "scene": null
+ },
+ {
+ "name": "新增维修工单",
+ "pathName": "packages/partner/pages/addNewOrder/addNewOrder",
+ "query": "",
+ "launchMode": "default",
+ "scene": null
+ },
+ {
+ "name": "packages/WaterPurifier/pages/device/deviceDesc/deviceDesc",
+ "pathName": "packages/WaterPurifier/pages/device/deviceDesc/deviceDesc",
+ "query": "device_id=3",
+ "launchMode": "default",
+ "scene": null
+ },
+ {
+ "name": "packages/partner/pages/distributor/distributor",
+ "pathName": "packages/partner/pages/distributor/distributor",
+ "query": "",
+ "launchMode": "default",
+ "scene": null
+ },
+ {
+ "name": "packages/partner/pages/newWorkOrder/newWorkOrder",
+ "pathName": "packages/partner/pages/newWorkOrder/newWorkOrder",
+ "query": "",
+ "launchMode": "default",
+ "scene": null
+ },
+ {
+ "name": "客户端我的",
+ "pathName": "pages/info/info",
+ "query": "",
+ "launchMode": "default",
+ "scene": null
+ },
+ {
+ "name": "packages/partner/pages/newWorkOrder/newWorkOrder",
+ "pathName": "packages/partner/pages/newWorkOrder/newWorkOrder",
+ "query": "",
+ "launchMode": "default",
+ "scene": null
+ },
+ {
+ "name": "packages/partner/pages/chooseDevice/chooseDevice",
+ "pathName": "packages/partner/pages/chooseDevice/chooseDevice",
+ "query": "",
+ "launchMode": "default",
+ "scene": null
+ },
+ {
+ "name": "packages/partner/pages/newWorkOrder/newWorkOrder",
+ "pathName": "packages/partner/pages/newWorkOrder/newWorkOrder",
+ "query": "",
+ "launchMode": "default",
+ "scene": null
+ },
+ {
+ "name": "packages/WaterPurifier/pages/device/deviceDesc/deviceDesc",
+ "pathName": "packages/WaterPurifier/pages/device/deviceDesc/deviceDesc",
+ "query": "device_id=3",
+ "launchMode": "default",
+ "scene": null
+ },
+ {
+ "name": "packages/partner/pages/partner",
+ "pathName": "packages/partner/pages/partner",
+ "query": "",
+ "launchMode": "default",
+ "scene": null
+ },
+ {
+ "name": "pages/deposit/deposit",
+ "pathName": "pages/deposit/deposit",
+ "query": "",
+ "launchMode": "default",
+ "scene": null
+ },
+ {
+ "name": "分配经销商",
+ "pathName": "packages/partner/pages/distributor/distributor",
+ "query": "",
+ "launchMode": "default",
+ "scene": null
+ },
+ {
+ "name": "packages/master/device/index",
+ "pathName": "packages/master/device/index",
+ "query": "",
+ "launchMode": "default",
+ "scene": null
+ },
+ {
+ "name": "packages/partner/pages/OrderMsg/OrderMsg",
+ "pathName": "packages/partner/pages/OrderMsg/OrderMsg",
+ "query": "",
+ "launchMode": "default",
+ "scene": null
+ },
+ {
+ "name": "pages/deposit/deposit",
+ "pathName": "pages/deposit/deposit",
+ "query": "",
+ "launchMode": "default",
+ "scene": null
+ },
+ {
+ "name": "新增设备",
+ "pathName": "pages/deposit/deposit",
+ "query": "",
+ "launchMode": "default",
+ "scene": null
+ },
+ {
+ "name": "购买记录",
+ "pathName": "packages/WaterPurifier/pages/RechargeRecord/RechargeRecord",
+ "query": "",
+ "launchMode": "default",
+ "scene": null
+ },
+ {
+ "name": "packages/WaterPurifier/pages/Recharge/Recharge",
+ "pathName": "packages/WaterPurifier/pages/Recharge/Recharge",
+ "query": "",
+ "launchMode": "default",
+ "scene": null
+ },
+ {
+ "name": "packages/WaterPurifier/pages/device/deviceDesc/deviceDesc",
+ "pathName": "packages/WaterPurifier/pages/device/deviceDesc/deviceDesc",
+ "query": "device_id=446",
+ "launchMode": "default",
+ "scene": null
+ },
+ {
+ "name": "packages/WaterPurifier/pages/device/deviceDesc/deviceDesc",
+ "pathName": "packages/WaterPurifier/pages/device/deviceDesc/deviceDesc",
+ "query": "device_id=446",
+ "launchMode": "default",
+ "scene": null
+ },
+ {
+ "name": "pages/share/share",
+ "pathName": "pages/share/share",
+ "query": "",
+ "launchMode": "default",
+ "scene": null
+ },
{
"name": "/packages/WaterPurifier/pages/Addfriend/Addfriend",
"pathName": "/packages/WaterPurifier/pages/Addfriend/Addfriend",
diff --git a/utils/util.js b/utils/util.js
index c764943..4cf07a5 100644
--- a/utils/util.js
+++ b/utils/util.js
@@ -2,14 +2,11 @@
const app = getApp()
-// const server_url = "https://huishang.magicany.cc/api/v1";
-// const img_url = "https://huishang.magicany.cc";
-const server_url = "https://api.hshuishang.com/api/v1";
-const img_url = "https://api.hshuishang.com";
-
-// const server_url = "https://test.hshuishang.com/api/v1";
-// const img_url = "https://test.hshuishang.com";
+// const server_url = "https://api.hshuishang.com/api/v1";
+// const img_url = "https://api.hshuishang.com";
+const server_url = "https://test.hshuishang.com/api/v1";
+const img_url = "https://test.hshuishang.com";
// https://api.hshuishang.com
@@ -31,18 +28,18 @@ const goLogin = () => {
var currentPage = pages[pages.length - 1] //获取当前页面的对象
var urlthis = currentPage.route //当前页面url
console.log('urlthisurlthis', urlthis);
- let JumpUrl = '/pages/login/login';
+ let JumpUrl = '/pages/newLogin/newLogin';
if (urlthis.includes('packages/master')) {
- JumpUrl = '/pages/MasterLogin/MasterLogin';
+ JumpUrl = '/pages/newLogin/newLogin';
} else if (urlthis.includes('packages/partner')) {
- JumpUrl = '/packages/partner/pages/login/login';
+ JumpUrl = '/pages/newLogin/newLogin';
}
wx.showModal({
title: '提示',
content: '请登录后查看',
confirmText: "去登陆",
complete: (res) => {
- if (res.cancel) {}
+ if (res.cancel) { }
if (res.confirm) {
wx.reLaunch({
url: JumpUrl,
@@ -242,12 +239,9 @@ const postUrl = function (url, data, successfn, token) {
var currentPage = pages[pages.length - 1] //获取当前页面的对象
var urlthis = currentPage.route //当前页面url
if (data && !data.uid) {
- // data.uid = wx.getStorageSync('uid');
}
if (data && !data.paid) {
- // data._paid = wx.getStorageSync('paid');
}
- // data._said = wx.getStorageSync("said")
if (data.uid == "" && urlthis == "pages/login/login") {
} else if (data.uid == "" && urlthis == "/pages/mine/route/route") {
@@ -265,41 +259,27 @@ const postUrl = function (url, data, successfn, token) {
}
}
try {
+ let traceId = ''
+ traceId = wx.getStorageSync('trace-id')
wx.request({
url: server_url + url,
data: JSON.stringify(parmas),
method: 'POST',
header: {
- // 'content-type': 'application/x-www-form-urlencoded',
'content-type': 'application/json',
'Authorization': ctoken === undefined ? '' : ctoken,
+ 'trace-id':traceId
},
success: f => {
- console.log('successddd', f);
+ const traceId = f.headers['trace-id']
+ if(traceId){
+ wx.setStorageSync('traceId', traceId)
+ }
// TODO: 待验证是否可做判断依据
// 调用成功,返回200 等其他情况则表示接口失败
if (f.statusCode == 401 || f.data.msg === "效验令牌失败") {
console.log('走到这?')
goLogin();
- // wx.showModal({
- // title: '提示',
- // content: '请登录后查看',
- // confirmText: "去登陆",
- // complete: (res) => {
- // if (res.cancel) {
-
- // }
-
- // if (res.confirm) {
-
-
- // wx.reLaunch({
- // url: JumpUrl,
- // // url: '/pages/login/login',
- // })
- // }
- // }
- // })
return
}
if (f.data && f.statusCode === 200) {
@@ -310,28 +290,10 @@ const postUrl = function (url, data, successfn, token) {
successfn(res);
return res;
} else {
- // 根据后端约定,返回code码如果是500 则弹窗提醒
- // if(f.statusCode === 500) {
- // wx.showToast({
- // title: f.data.msg,
- // icon: 'none'
- // })
- // }
wx.showToast({
title: f.data.msg,
icon: 'none'
})
- // wx.removeStorageSync('userlocat')
- // wx.removeStorageSync('city')
- // wx.removeStorageSync('ctoken')
- // wx.removeStorageSync('is_deal')
- // wx.removeStorageSync('is_dev')
- // wx.removeStorageSync('is_shop')
- // wx.removeStorageSync('userId')
- // wx.removeStorageSync('openId')
- // wx.removeStorageSync('shopId')
- // wx.removeStorageSync('phone')
- // wx.removeStorageSync('shopArea')
}
},
error: f => {
@@ -382,6 +344,9 @@ const postUrl2 = function (url, data, successfn, token) {
}
}
try {
+ let traceId = ''
+ traceId = wx.getStorageSync('trace-id')
+
wx.request({
url: server_url + url,
data: JSON.stringify(parmas),
@@ -390,9 +355,14 @@ const postUrl2 = function (url, data, successfn, token) {
// 'content-type': 'application/x-www-form-urlencoded',
'content-type': 'application/json',
'Authorization': ctoken === undefined ? '' : ctoken,
+ 'trace-id':traceId
},
success: f => {
console.log('successddd', f);
+ const traceId = f.headers['trace-id']
+ if(traceId){
+ wx.setStorageSync('traceId', traceId)
+ }
if (f.data) {
successfn(f);
console.log(1);
@@ -450,6 +420,8 @@ const postUrl3 = function (url, data, version, successfn, token) {
}
}
try {
+ let traceId = ''
+ traceId = wx.getStorageSync('trace-id')
wx.request({
url: server_url + url,
data: JSON.stringify(parmas),
@@ -458,9 +430,14 @@ const postUrl3 = function (url, data, version, successfn, token) {
// 'content-type': 'application/x-www-form-urlencoded',
'content-type': 'application/json',
'version': version,
+ 'trace-id':traceId
},
success: f => {
console.log('successddd', f);
+ const traceId = f.headers['trace-id']
+ if(traceId){
+ wx.setStorageSync('traceId', traceId)
+ }
// TODO: 待验证是否可做判断依据
// 调用成功,返回200 等其他情况则表示接口失败
if (f.statusCode == 401 || f.data.msg === "效验令牌失败") {
@@ -517,101 +494,109 @@ const postUrl3 = function (url, data, version, successfn, token) {
}
}
const postUrl4 = function (url, data, successfn, token) {
- var pages = getCurrentPages() //获取加载的页面
- let ctoken;
- if (token) {
- ctoken = token;
- } else {
- ctoken = wx.getStorageSync('atoken'); // 后续接口强依赖强校验该字段
- }
- var currentPage = pages[pages.length - 1] //获取当前页面的对象
- var urlthis = currentPage.route //当前页面url
- if (data && !data.uid) {
- // data.uid = wx.getStorageSync('uid');
- }
- if (data && !data.paid) {
- // data._paid = wx.getStorageSync('paid');
- }
- // data._said = wx.getStorageSync("said")
- if (data.uid == "" && urlthis == "pages/login/login") {
+ var pages = getCurrentPages() //获取加载的页面
+ let ctoken;
+ if (token) {
+ ctoken = token;
+ } else {
+ ctoken = wx.getStorageSync('atoken'); // 后续接口强依赖强校验该字段
+ }
+ var currentPage = pages[pages.length - 1] //获取当前页面的对象
+ var urlthis = currentPage.route //当前页面url
+ if (data && !data.uid) {
+ // data.uid = wx.getStorageSync('uid');
+ }
+ if (data && !data.paid) {
+ // data._paid = wx.getStorageSync('paid');
+ }
+ // data._said = wx.getStorageSync("said")
+ if (data.uid == "" && urlthis == "pages/login/login") {
- } else if (data.uid == "" && urlthis == "/pages/mine/route/route") {
+ } else if (data.uid == "" && urlthis == "/pages/mine/route/route") {
- } else { }
- let parmas
- if (wx.getStorageSync('userId')) {
- parmas = {
- // user_id: wx.getStorageSync('userId'),
- ...data
- }
- } else {
- parmas = {
- ...data
- }
- }
- try {
- wx.request({
- url: server_url + url,
- data: JSON.stringify(parmas),
- method: 'POST',
- header: {
- // 'content-type': 'application/x-www-form-urlencoded',
- 'content-type': 'application/json',
- "Authorization":ctoken
- },
- success: f => {
- console.log('successddd', f);
- // TODO: 待验证是否可做判断依据
- // 调用成功,返回200 等其他情况则表示接口失败
- if (f.statusCode == 401 || f.data.msg === "效验令牌失败") {
- goLogin();
- return;
- wx.showModal({
- title: '提示',
- content: '请登录后查看',
- confirmText: "去登陆",
- complete: (res) => {
- if (res.cancel) {
- }
+ } else { }
+ let parmas
+ if (wx.getStorageSync('userId')) {
+ parmas = {
+ // user_id: wx.getStorageSync('userId'),
+ ...data
+ }
+ } else {
+ parmas = {
+ ...data
+ }
+ }
+ try {
+ let traceId = ''
+ traceId = wx.getStorageSync('trace-id')
- if (res.confirm) {
- wx.reLaunch({
- url: '/pages/login/login',
- })
- }
- }
- })
- return
- }
- if (f.data && f.statusCode === 200) {
- const res = {
- ...f.data.data,
- msg: f.data.msg
- };
- successfn(res);
- return res;
- } else {
+ wx.request({
+ url: server_url + url,
+ data: JSON.stringify(parmas),
+ method: 'POST',
+ header: {
+ // 'content-type': 'application/x-www-form-urlencoded',
+ 'content-type': 'application/json',
+ "Authorization": ctoken,
+ 'trace-id':traceId
+ },
+ success: f => {
+ console.log('successddd', f);
+ const traceId = f.headers['trace-id']
+ if(traceId){
+ wx.setStorageSync('traceId', traceId)
+ }
+ // TODO: 待验证是否可做判断依据
+ // 调用成功,返回200 等其他情况则表示接口失败
+ if (f.statusCode == 401 || f.data.msg === "效验令牌失败") {
+ goLogin();
+ return;
+ wx.showModal({
+ title: '提示',
+ content: '请登录后查看',
+ confirmText: "去登陆",
+ complete: (res) => {
+ if (res.cancel) {
+ }
- wx.showToast({
- title: f.data.msg,
- icon: 'none'
- })
+ if (res.confirm) {
+ wx.reLaunch({
+ url: '/pages/login/login',
+ })
+ }
+ }
+ })
+ return
+ }
+ if (f.data && f.statusCode === 200) {
+ const res = {
+ ...f.data.data,
+ msg: f.data.msg
+ };
+ successfn(res);
+ return res;
+ } else {
- }
- },
- error: f => {
- console.log('error');
- wx.showToast({
- title: '系统繁忙',
- icon: 'none'
- })
- }
- })
- } catch (e) {
- wx.showToast({
- title: e.message,
- })
- }
+ wx.showToast({
+ title: f.data.msg,
+ icon: 'none'
+ })
+
+ }
+ },
+ error: f => {
+ console.log('error');
+ wx.showToast({
+ title: '系统繁忙',
+ icon: 'none'
+ })
+ }
+ })
+ } catch (e) {
+ wx.showToast({
+ title: e.message,
+ })
+ }
}
const uploadFileUrl = function (filename, successfn) {
wx.uploadFile({
@@ -866,7 +851,7 @@ module.exports = {
postUrl: postUrl,
postUrl2: postUrl2,
postUrl3: postUrl3,
- postUrl4:postUrl4,
+ postUrl4: postUrl4,
uploadFileUrl: uploadFileUrl,
formatTime: formatTime,
formatTimeForChart: formatTimeForChart,