diff --git a/assets/image/login_logo.png b/assets/image/login_logo.png
deleted file mode 100644
index 3ec1e4d..0000000
Binary files a/assets/image/login_logo.png and /dev/null differ
diff --git a/pages/login/index.wxml b/pages/login/index.wxml
index ca897bf..479b7d9 100644
--- a/pages/login/index.wxml
+++ b/pages/login/index.wxml
@@ -1,6 +1,6 @@
diff --git a/pages/mall/index.wxs b/pages/mall/index.wxs
index 8e1587f..0eebd2c 100644
--- a/pages/mall/index.wxs
+++ b/pages/mall/index.wxs
@@ -1,43 +1,3 @@
-function orderStatus(status) {
- if (status == 2) {
- return '已完成'
- } else if (status == 3) {
- return '已取消'
- } else if (status == 4) {
- return '待调度'
- } else if (status == 5) {
- return '待装货'
- } else if (status == 6) {
- return '待验货'
- } else if (status == 7) {
- return '待入库'
- } else if (status == 8) {
- return '已入库'
- }
- return ''
-}
-
-function customerType(type) {
- if (type == 0) {
- return 'A'
- } else if (type == 1) {
- return 'B'
- } else if (type == 2) {
- return 'C'
- }
- return ''
-}
-
-function colorType(type) {
- if (type == 0) {
- return 'blue'
- } else if (type == 1) {
- return 'green'
- } else if (type == 2) {
- return 'tree'
- }
- return ''
-}
function formatePrice(price) {
return Number(parseFloat(price) / 100).toFixed(2)
@@ -46,91 +6,12 @@ function formatePrice(price) {
function formateWeight(weight) {
return Number(parseFloat(weight) / 1000).toFixed(3)
}
-
-function deductMoney(money) {
- if (money < 0) {
- return '待定'
- } else if (money === 0) {
- return money
- }
- return (money / 100).toFixed(2)
-}
-
-function deductStatus(deductionStatus) {
- switch (deductionStatus) {
- case 0:
- return '【待客户确认】'
- case 1:
- return '【客户同意】'
- case -1:
- return '【客户拒绝】'
- }
-}
-
-function orderDate(order) {
- if (order.orderStatus == 4) {
- return '下单日期:' + order.orderDate
- } else if (order.orderStatus == 5) {
- return '调度日期' + order.schedulingCreateDate
- } else if (order.orderStatus == 6) {
- return '装货日期:' + order.shippingDate
- } else if (order.orderStatus == 7 || order.orderStatus == 8 || order.orderStatus == 2) {
- return '验货日期:' + order.inspectionDate
- }
- return ''
-}
-
-function isInspectable(order, centerId) {
- if (!order) {
- return false
- }
- if (order.orderStatus === 6) {
- if (centerId === 1) {
- return true
- }
- return Number(order.destinationOperationCenterId) === centerId
- }
- return false
-}
-
-function isStockinable(order, centerId) {
- if (!order) {
- return false
- }
- if (order.orderStatus === 7) {
- if (centerId === 1) {
- return true
- }
- return Number(order.destinationOperationCenterId) === centerId
- }
- return false
-}
-
-function canHandle(order, centerId) {
- if (order.inspectionId > 0 && order.deductMoney == -1) {
- if (centerId === 1) {
- return true
- }
- return Number(order.destinationOperationCenterId) === centerId
- }
- return false
-}
-
-function isAbnormalable(order, centerId) {
- if (order.orderStatus === 6) {
- if (centerId === 1) {
- return true
- }
- return Number(order.destinationOperationCenterId) === centerId
- }
- return false
-}
-
+
function isEmpty(val) {
return typeof val === 'undefined' || val === '' || val === null
}
-function formateOrderDate(datetime) {
+function formateDate(datetime) {
if (isEmpty(datetime)) {
return ''
}
@@ -156,86 +37,8 @@ function formateOrderDate(datetime) {
return datetime + week
}
-function getCateName(item) {
- if (!item.categoriesName){
- return ''
- }
- if (item.categoriesName.toString().length < 10) {
- return item.categoriesName
- }
- return item.categoriesName.substring(0, 10) + '...'
-}
-
-function handleWeight(weight) {
- if (!weight) {
- return ''
- }
- return '折算重量:' + Number(weight / 1000).toFixed(3) + '吨'
-}
-
-/**
- * 4: 'green',
- 5: 'green',
- 6: 'green',
- 7: 'green',
- 8: 'green',
- 0: 'grey',
- 1: 'green',
- 2: 'grey',
- 3: 'grey'
- */
-function orderStatusColor(status) {
- if (status == 4) {
- return 'yellow'
- } else if (status == 5) {
- return 'yellow'
- } else if (status == 6) {
- return 'yellow'
- } else if (status == 7) {
- return 'yellow'
- } else if (status == 8) {
- return 'yellow'
- } else if (status == 0) {
- return 'gray'
- } else if (status == 1) {
- return 'gray'
- } else if (status == 2) {
- return 'blue'
- } else if (status == 3) {
- return 'gray'
- }
- return ''
-}
-
-function getGuidePrice(cateId, cateList) {
- for (var i = 0; i < cateList.length; i++) {
- if (parseInt(cateId) == parseInt(cateList[i].value)) {
- return '今日指导价:¥' + formatePrice(cateList[i].price) + '元/kg'
- }
- }
- return ''
-}
-
-function offesWeight(offsetWeight, totalWeight) {
- return offsetWeight > 0.01 * totalWeight
-}
-
module.exports = {
- orderStatus: orderStatus,
- customerType: customerType,
- colorType: colorType,
formatePrice: formatePrice,
- deductMoney: deductMoney,
- deductStatus: deductStatus,
- orderDate: orderDate,
- isInspectable: isInspectable,
- canHandle: canHandle,
formateWeight: formateWeight,
- formateOrderDate: formateOrderDate,
- getCateName: getCateName,
- handleWeight: handleWeight,
- orderStatusColor: orderStatusColor,
- getGuidePrice: getGuidePrice,
- isStockinable: isStockinable,
- offesWeight: offesWeight
+ formateDate: formateDate
}
\ No newline at end of file
diff --git a/pages/mall/index/index.wxml b/pages/mall/index/index.wxml
index 3381021..68d5baf 100644
--- a/pages/mall/index/index.wxml
+++ b/pages/mall/index/index.wxml
@@ -1,5 +1,5 @@
-
+
原纸商城
diff --git a/pages/mall/order-detail/index.wxml b/pages/mall/order-detail/index.wxml
index f046c66..474d6a1 100644
--- a/pages/mall/order-detail/index.wxml
+++ b/pages/mall/order-detail/index.wxml
@@ -1,5 +1,4 @@
-
返回
订单详情
diff --git a/pages/mall/order-offer/index.wxml b/pages/mall/order-offer/index.wxml
index ed3261f..0344f35 100644
--- a/pages/mall/order-offer/index.wxml
+++ b/pages/mall/order-offer/index.wxml
@@ -1,5 +1,5 @@
-
+
返回
确认订单
diff --git a/pages/mall/search-list/index.wxml b/pages/mall/search-list/index.wxml
index 18fbf64..3e1accc 100644
--- a/pages/mall/search-list/index.wxml
+++ b/pages/mall/search-list/index.wxml
@@ -1,5 +1,4 @@
-
返回
原纸商城