From f89573097756b78220e3de61fc1b67071214dfd1 Mon Sep 17 00:00:00 2001
From: caill <815519168@qq.com>
Date: Wed, 13 Mar 2024 15:42:17 +0800
Subject: [PATCH] =?UTF-8?q?=E5=AE=9A=E7=82=B9=E4=BD=9C=E4=B8=9A=E3=80=81?=
=?UTF-8?q?=E5=87=BA=E5=BA=93=E7=A1=AE=E8=AE=A4=E3=80=81=E4=BD=9C=E4=B8=9A?=
=?UTF-8?q?=E7=AE=A1=E7=90=86?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
common/style/layout.styl | 138 ++++++++------------
common/style/reset.css | 6 +
components/NavBar.vue | 16 +--
pages.json | 24 ++++
pages/home/home.vue | 6 +-
pages/login/setup.vue | 2 +-
pages/manage/fixed-point-task.vue | 146 +++++++++++++++++++++
pages/manage/out-storage-confirm.vue | 174 +++++++++++++++++++++++++
pages/manage/task-manage.vue | 185 +++++++++++++++++++++++++++
utils/api.js | 16 ---
utils/getData2.js | 172 +++++++++++++++++++++----
utils/request1.js | 126 ------------------
utils/utils.js | 116 +++++++++++++++++
13 files changed, 864 insertions(+), 263 deletions(-)
create mode 100644 pages/manage/fixed-point-task.vue
create mode 100644 pages/manage/out-storage-confirm.vue
create mode 100644 pages/manage/task-manage.vue
delete mode 100644 utils/api.js
delete mode 100644 utils/request1.js
create mode 100644 utils/utils.js
diff --git a/common/style/layout.styl b/common/style/layout.styl
index d37891a..14f1f07 100644
--- a/common/style/layout.styl
+++ b/common/style/layout.styl
@@ -33,6 +33,15 @@ uni-button:after {
margin-bottom: 20rpx;
box-shadow: 0 4rpx 10rpx 2rpx rgba(0,0,0,.1);
}
+.filter_wrapper {
+ position relative
+ left -14rpx
+ width: calc(100% + 28rpx);
+ height: auto;
+ background-color: #fff;
+ padding: 22rpx 22rpx 0 22rpx;
+ margin-bottom: 20rpx;
+}
.filter_label {
display: block;
line-height: 80rpx;
@@ -73,23 +82,6 @@ uni-button:after {
.filter_input_disabled {
background-color: #eee;
}
-.filter_search {
- width: 100rpx;
- height: 70rpx;
- line-height: 70rpx;
- font-size: 28rpx;
- color: #323232;
- text-align: center;
- background-color: #fff;
- border: 1px solid #ff6a00;
- border-radius: 10rpx;
- margin-left: 30rpx;
-}
-.filter_search_disabled {
- background-color: #dcdfe6;
- border: 1px solid #dcdfe6;
- color: #fff;
-}
.filter_input_wraper {
/* flex: 1; */
width: calc(100% - 170rpx);
@@ -100,6 +92,21 @@ uni-button:after {
justify-content: flex-start;
align-items: center;
}
+.tab-line {
+ _wh(32rpx, 10rpx)
+ background-color #fff
+ border-radius 10rpx
+ margin 20rpx auto 0
+}
+.tab-line_active {
+ background-color #4e6ef2
+}
+.font-style-1 {
+ _font(32rpx, 32rpx, #c1c1c3,,center)
+}
+.font-style-2 {
+ _font(32rpx, 32rpx, #000,bold,center)
+}
.grid-wraper {
width: 100%;
}
@@ -224,72 +231,34 @@ uni-button:after {
margin-bottom: 20rpx;
box-shadow: 0 4rpx 10rpx 2rpx rgba(0,0,0,.1);
}
-.item-font-1 {
- font-size: 28rpx;
- color: #42444a;
- line-height: 30rpx;
- padding: 14rpx 4rpx;
-}
-.item-font-2 {
- font-size: 26rpx;
- color: #2b87ff;
- line-height: 30rpx;
- padding: 14rpx 4rpx;
- background-color: #edf6ff;
- border-radius: 10rpx;
- text-align: center;
-}
-.item-font-3 {
- font-size: 26rpx;
- color: #ff8824;
- line-height: 30rpx;
- padding: 14rpx 4rpx;
- background-color: #fff4ea;
- border-radius: 10rpx;
- text-align: center;
-}
-.item-font-4 {
- font-size: 26rpx;
- color: #c1c1c3;
- line-height: 30rpx;
- padding: 14rpx 4rpx;
-}
-.item-status {
- font-size: 26rpx;
- color: #fff;
- line-height: 30rpx;
- padding: 6rpx 1rpx;
- background-color: #fff;
- border-radius: 10rpx;
- text-align: center;
-}
-.item-status-1 {
- background-color: #cfd2d4;
- color: #5e5d5d;
-}
-.item-status-2 {
- color: #bf8836;
- background-color: #f0e2cd;
-}
-.item-status-3 {
- background-color: #f3ccb5;
- color: #ff5e00;
-}
-.item-status-4 {
- background-color: #96f3b8;
- color: #36744c;
-}
-.item-line-1 {
- height: 1rpx;
- background-color: #b8b8ba;
-}
-.item-line-2 {
- width: 1rpx;
- height: 30rpx;
- background-color: #000;
- margin: 0 14rpx;
-}
-
+.item-font-1
+ _font(30rpx,28rpx,#000,,)
+.item-font-2
+ _font(24rpx,40rpx,$red,,)
+.item-font-3
+ width 110rpx
+ _font(24rpx,26rpx,#333,,)
+ text-align:justify;
+ text-align-last: justify;
+ text-justify: inter-ideograph;
+.item-font-4
+ width calc(100% - 110rpx)
+ _font(26rpx,26rpx,#999,,)
+.item-font-5
+ _font(44rpx,60rpx,$green,,center)
+ background-color #f6f6f6
+.item-font-6
+ width calc(50% - 110rpx)
+ _font(24rpx,52rpx,#666,,center)
+ background-color #e5e5e5
+ border-radius 26rpx
+.item-font-7
+ width 110rpx
+ _font(24rpx,52rpx,#666,,center)
+.item-font-8
+ _font(24rpx,52rpx,#666,,center)
+.isChecked
+ box-shadow inset 2px 2px 4px 0px rgba(120, 141, 250, 0.7), inset -2px -2px 4px 0px rgba(120, 141, 250, 0.7)
/** 提交栏 **/
.submit-bar {
position: fixed;
@@ -328,6 +297,9 @@ uni-button:after {
border: 2rpx solid #c9c9c9;
color: #fff;
}
+uni-button[disabled]:not([type]), uni-button[disabled][type=default] {
+ border: 2rpx solid #c9c9c9;
+}
.submit-more {
width: 20%;
font-size: 34rpx;
diff --git a/common/style/reset.css b/common/style/reset.css
index ed9bb53..8e5b014 100644
--- a/common/style/reset.css
+++ b/common/style/reset.css
@@ -53,6 +53,9 @@ input[type="button"], input[type="submit"], input[type="search"], input[type="re
.jcflexend {
justify-content: flex-end !important;
}
+.jccenter {
+ justify-content: center !important;
+}
.zd-row {
width: 100%;
@@ -146,4 +149,7 @@ input[type="button"], input[type="submit"], input[type="search"], input[type="re
}
.pdr10 {
padding-right: 10rpx;
+}
+.pdt0 {
+ padding-top: 0 !important
}
\ No newline at end of file
diff --git a/components/NavBar.vue b/components/NavBar.vue
index b556c9c..eeb59d1 100644
--- a/components/NavBar.vue
+++ b/components/NavBar.vue
@@ -4,9 +4,9 @@
{{title}}
-
+
+
+
@@ -26,9 +26,9 @@
type: Boolean,
default: false
},
- show1: {
+ searchActive: {
type: Boolean,
- default: true
+ default: false
}
},
methods: {
@@ -43,10 +43,8 @@
})
}
},
- backHome () {
- uni.redirectTo({
- url: '/pages/home/home'
- })
+ toSearch () {
+ this.$emit('toSearch')
}
}
}
diff --git a/pages.json b/pages.json
index 20e71e0..aec5e87 100644
--- a/pages.json
+++ b/pages.json
@@ -66,6 +66,30 @@
}
}
+ ,{
+ "path" : "pages/manage/fixed-point-task",
+ "style" :
+ {
+ "navigationStyle": "custom"
+ }
+
+ }
+ ,{
+ "path" : "pages/manage/task-manage",
+ "style" :
+ {
+ "navigationStyle": "custom"
+ }
+
+ }
+ ,{
+ "path" : "pages/manage/out-storage-confirm",
+ "style" :
+ {
+ "navigationStyle": "custom"
+ }
+
+ }
],
"globalStyle": {
// "pageOrientation": "landscape",
diff --git a/pages/home/home.vue b/pages/home/home.vue
index 52a4f2e..8fc4492 100644
--- a/pages/home/home.vue
+++ b/pages/home/home.vue
@@ -50,9 +50,9 @@
{id: 4, title: '原料出库', icon: 'RF04', path: '/pages/manage/mater-out-storage'},
{id: 5, title: '生产下料', icon: 'RF05', path: '/pages/manage/produce-cut'},
{id: 6, title: '点位更新', icon: 'RF06', path: '/pages/manage/point-update'},
- {id: 7, title: '定点作业', icon: 'RF07', path: ''},
- {id: 8, title: '作业管理', icon: 'RF08', path: ''},
- {id: 9, title: '出库确认', icon: 'RF09', path: ''}
+ {id: 7, title: '定点作业', icon: 'RF07', path: '/pages/manage/fixed-point-task'},
+ {id: 8, title: '作业管理', icon: 'RF08', path: '/pages/manage/task-manage'},
+ {id: 9, title: '出库确认', icon: 'RF09', path: '/pages/manage/out-storage-confirm'}
],
show: false,
secM: []
diff --git a/pages/login/setup.vue b/pages/login/setup.vue
index 624398e..22c2b0e 100644
--- a/pages/login/setup.vue
+++ b/pages/login/setup.vue
@@ -1,6 +1,6 @@
-
+
diff --git a/pages/manage/fixed-point-task.vue b/pages/manage/fixed-point-task.vue
new file mode 100644
index 0000000..2cd6165
--- /dev/null
+++ b/pages/manage/fixed-point-task.vue
@@ -0,0 +1,146 @@
+
+
+
+
+
+
+
+ 起点区域
+
+
+
+
+
+
+
+ 起点点位
+
+
+
+
+
+
+
+ 终点区域
+
+
+
+
+
+
+
+ 终点点位
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/pages/manage/out-storage-confirm.vue b/pages/manage/out-storage-confirm.vue
new file mode 100644
index 0000000..a1100d0
--- /dev/null
+++ b/pages/manage/out-storage-confirm.vue
@@ -0,0 +1,174 @@
+
+
+
+
+
+
+
+ 载具编码
+
+
+
+
+
+
+
+ 出库点位
+
+
+
+
+
+
+
+ 物料编码
+
+
+
+
+
+
+
+ 物料名称
+
+
+
+
+
+
+
+ 配盘批次
+
+
+
+
+
+
+
+ 物料数量
+
+
+
+
+
+
+
+ 出库数量
+
+
+
+
+
+
+
+ 剩余数量
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/pages/manage/task-manage.vue b/pages/manage/task-manage.vue
new file mode 100644
index 0000000..aa508be
--- /dev/null
+++ b/pages/manage/task-manage.vue
@@ -0,0 +1,185 @@
+
+
+
+
+
+
+
+ {{e.text}}
+
+
+
+
+
+
+
+ {{e.task_no}} | {{['就绪', '执行中', '完成'][Number(e.inst_status)]}}
+
+
+
+ {{e.create_time}} | {{['请求取货', '取货完成', '请求放货', '放货完成'][Number(e.inst_step) - 1]}}
+
+ 载具号:
+ {{e.carrier}}
+
+
+ 指令号:
+ {{e.instruction_code}}
+
+
+ 车号:
+ {{e.carno}}
+
+
+
+ {{e.priority}}
+ 优先级
+
+
+
+ 设备:
+ {{e.start_devicecode}}
+ –
+ {{e.next_devicecode}}
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 关键字
+
+
+
+
+
+
+
+ 起始设备
+
+
+
+
+
+
+
+ 目标设备
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/utils/api.js b/utils/api.js
deleted file mode 100644
index bcc7a47..0000000
--- a/utils/api.js
+++ /dev/null
@@ -1,16 +0,0 @@
-import request from './request.js'
-// 登录
-export const handLogin = (user, password) => request({
- url:'mobile/auth/login',
- data: {
- username: user,
- password: password
- }
-})
-
-// 测试状态码报错接口
-export const handRequest = () => request({
- url:'getInfo/4',
- data: {}
-})
-
diff --git a/utils/getData2.js b/utils/getData2.js
index 25ea460..7ebf300 100644
--- a/utils/getData2.js
+++ b/utils/getData2.js
@@ -1,5 +1,4 @@
import request from './request.js'
-import request1 from './request1.js'
// 版本更新测试
export const pdaUpdate = () => request({
@@ -252,6 +251,153 @@ export const bindVehicle = (code, type, vcode) => request({
vehicle_code: vcode
}
})
+/**
+ * 定点作业
+ */
+// 查询设备
+// export const queryDevice = () => request({
+// url:'api/pda/queryDevice',
+// data: {}
+// })
+export const queryDevice = () => {
+ let res = [
+ {
+ "region_code": "68",
+ "region_name": "构华",
+ "deviceArr": [
+ {
+ "point_code": "9",
+ "point_name": "京产"
+ }
+ ]
+ },
+ {
+ "region_code": "8",
+ "region_name": "构华片资",
+ "deviceArr": [
+ {
+ "point_code": "19",
+ "point_name": "京产开向准"
+ }
+ ]
+ }
+]
+ return res
+}
+// 定点作业-确认
+export const taskConfirm = (code1, code2) => request({
+ url:'api/pda/taskConfirm',
+ data: {
+ point_code1: code1,
+ point_code2: code2
+ }
+})
+/**
+ * 作业管理
+ */
+// 查询未完成指令
+// export const pdaInsts = (keyword, scode, ncode) => request({
+// url:'api/pda/insts',
+// data: {
+// keyword: keyword,
+// start_devicecode: scode,
+// next_devicecode: ncode
+// }
+// })
+export const pdaInsts = () => {
+ let res = {
+ "code": "1",
+ "desc": "in",
+ "result": [
+ {
+ "inst_uuid": "51",
+ "task_no": "ADB001",
+ "start_devicecode": "46",
+ "next_devicecode": "2",
+ "inst_status": "0",
+ "priority": "一级",
+ "create_time": "1976-04-07 02:36:18",
+ "carrier": "890000008",
+ "instruction_code": '0000',
+ "carno": '1号车',
+ "inst_step": '1'
+ },
+ {
+ "inst_uuid": "5",
+ "task_no": "ADB001",
+ "start_devicecode": "46",
+ "next_devicecode": "2",
+ "inst_status": "0",
+ "priority": "一级",
+ "create_time": "1976-04-07 02:36:18",
+ "carrier": "890000008",
+ "instruction_code": '0000',
+ "carno": '1号车',
+ "inst_step": '1'
+ },
+ {
+ "inst_uuid": "1",
+ "task_no": "ADB001",
+ "start_devicecode": "46",
+ "next_devicecode": "2",
+ "inst_status": "2",
+ "priority": "一级",
+ "create_time": "1976-04-07 02:36:18",
+ "carrier": "890000008",
+ "instruction_code": '0000',
+ "carno": '1号车',
+ "inst_step": '1'
+ }
+ ]
+}
+ return res
+}
+// 指令操作
+export const pdaInst = (type, uuid) => request({
+ url:'api/pda/inst',
+ data: {
+ type: type,
+ inst_uuid: uuid
+ }
+})
+/**
+ * 出库确认
+ */
+// 根据载具编码查询配盘信息
+// export const queryGroupInfoByVehicle = (code) => request({
+// url:'api/pda/queryGroupInfoByVehicle',
+// data: {
+// vehicle_code: code
+// }
+// })
+export const queryGroupInfoByVehicle = (code) => {
+ let res = {
+ "point_code": "001",
+ "material_code": "100001",
+ "material_name": "垃圾了付定金",
+ "pcsn": "20202020",
+ "material_qty": "20.0"
+}
+ return res
+}
+// 回库
+export const vehicleGoBack = (code, vcode, num) => request({
+ url:'api/pda/vehicleGoBack',
+ data: {
+ point_code: code,
+ vehicle_code: vcode,
+ residue_num: num
+ }
+})
+// 出库确认
+export const fullVehicleOutConfirm = (code, vcode, num) => request({
+ url:'api/pda/fullVehicleOutConfirm',
+ data: {
+ point_code: code,
+ vehicle_code: vcode,
+ residue_num: num
+ }
+})
/**
* 任务流转
*/
@@ -314,27 +460,3 @@ export const queryPoints = (type) => request({
// ]
// return res
// }
-
-
-
-
-
-//1.3余料回库
-export const vehicleGoBack = (code, vcode, num) => request({
- url:'api/pda/vehicleGoBack',
- data: {
- point_code: code,
- vehicle_code: vcode,
- residue_num: num
- }
-})
-// 1.4满托出库确认
-export const fullVehicleOutConfirm = (code, vcode, num) => request({
- url:'api/pda/fullVehicleOutConfirm',
- data: {
- point_code: code,
- vehicle_code: vcode,
- residue_num: num
- }
-})
-
diff --git a/utils/request1.js b/utils/request1.js
deleted file mode 100644
index 90dbecf..0000000
--- a/utils/request1.js
+++ /dev/null
@@ -1,126 +0,0 @@
-import store from '@/vuex/store'
-const request1 = (params) => {
- let _self = this;
- let url = params.url;
- let method = params.method || 'POST';
- let data = params.data || {};
- // data.token = "default-access_token"
- // if (!params.token) {
- // let token = uni.getStorageSync('token');
- // if (!token) {
- // uni.navigateTo({
- // url: '/pages/login/login'
- // });
- // } else {
- // data.token = '179509245-9c91827e0224bdc18d0b118b8be1b5af';
- // }
- // }
- let token = ''
- if (store.getters.saveToken !== '') {
- token = store.getters.saveToken
- }
- let defaultOpot = {
- // 'Content-Type': 'application/x-www-form-urlencoded',
- 'Terminal-Type': 'innerH5',
- 'Content-Type': 'application/json;charset=UTF-8',
- }
- let header = {}
- method = method.toUpperCase()
- if (method == 'POST') {
- header = {
- 'Content-Type': 'application/json;charset=UTF-8',
- 'Authorization': token
- }
- // data = qs.stringify(data)
- }
- const requestUrl = url;
- uni.showLoading({
- title: '加载中...'
- });
- return new Promise((resolve, reject) => {
- uni.request({
- url: requestUrl,
- method: method,
- header: Object.assign({}, defaultOpot, header),
- data: data,
- dataType: 'json',
- })
- .then(res => { // 成功
- if (res.length === 1) {
- uni.showModal({
- content: 'request:fail',
- showCancel: false
- })
- reject('request:fail')
- } else if (res[1] && res[1].statusCode === 400) {
- uni.showModal({
- content: res[1].data.message,
- showCancel: false
- })
- reject(res[1].data.message)
- } else if (res[1] && res[1].statusCode === 401) {
- uni.showModal({
- content: res[1].data.message,
- showCancel: false
- })
- store.dispatch('delUserInfo')
- uni.redirectTo({
- url: '/pages/login/login'
- })
- } else if (res[1] && res[1].statusCode === 200) {
- let {
- data: dataType
- } = res[1]
- resolve(dataType)
- // switch (dataType.code * 1) { // 拦截返回参数
- // case 0:
- // resolve(dataType)
- // break;
- // case 1003:
- // uni.showModal({
- // title: '登录已过期',
- // content: '很抱歉,登录已过期,请重新登录',
- // confirmText: '重新登录',
- // success: function(res) {
- // if (res.confirm) {
- // uni.navigateTo({
- // // 切记这儿需要哈pages.json保持一致;不能有.vue后缀
- // url: '/pages/login/login'
- // });
- // } else if (res.cancel) {
- // console.log('用户点击取消');
- // }
- // }
- // })
- // break;
- // case -1:
- // uni.showModal({
- // title: '请求数据失败',
- // content: '获取数据失败!',
- // confirmText: '确定',
- // showCancel: false,
- // success: function(res) {
- // if (res.confirm) {} else if (res.cancel) {
- // console.log('用户点击取消');
- // }
- // }
- // })
- // break
- // }
- }else {
- uni.showModal({
- content: res[1].data.message,
- showCancel: false
- })
- reject(res[1].data.message)
- }
- })
- .catch(err => { // 错误
- reject(err)
- })
- .finally(() => {
- uni.hideLoading();
- })
- })
-}
-export default request1
\ No newline at end of file
diff --git a/utils/utils.js b/utils/utils.js
new file mode 100644
index 0000000..9dff433
--- /dev/null
+++ b/utils/utils.js
@@ -0,0 +1,116 @@
+/**
+ * yy-mm-dd
+ */
+export const dateFtt = date => {
+ if (date == null) {
+ return ''
+ }
+ let year = date.getFullYear()
+ let month = date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1
+ let day = date.getDate() < 10 ? '0' + date.getDate() : date.getDate()
+ return `${year}-${month}-${day}`
+ }
+
+ /**
+ * yy-mm-dd hh:mm:ss
+ */
+ export const dateTimeFtt = date => {
+ if (date == null) {
+ return ''
+ }
+ let year = date.getFullYear()
+ let month = date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1
+ let day = date.getDate() < 10 ? '0' + date.getDate() : date.getDate()
+ let hh = date.getHours() < 10 ? '0' + date.getHours() : date.getHours()
+ let mm = date.getMinutes() < 10 ? '0' + date.getMinutes() : date.getMinutes()
+ let ss = date.getSeconds() < 10 ? '0' + date.getSeconds() : date.getSeconds()
+ return `${year}-${month}-${day} ${hh}:${mm}:${ss}`
+ }
+
+ /**
+ * 将字符串形式的日期转换成日期对象
+ */
+ export const dateNew = date => {
+ if (date === undefined || date === 'undefined') {
+ return new Date()
+ }
+ return new Date(Date.parse(date))
+ }
+
+/**
+ * 小数加法
+ */
+export const accAdd = (arg1, arg2) => {
+ var r1, r2, m, c
+ try {
+ r1 = arg1.toString().split('.')[1].length
+ } catch (e) {
+ r1 = 0
+ }
+ try {
+ r2 = arg2.toString().split('.')[1].length
+ } catch (e) {
+ r2 = 0
+ }
+ c = Math.abs(r1 - r2)
+ m = Math.pow(10, Math.max(r1, r2))
+ if (c > 0) {
+ var cm = Math.pow(10, c)
+ if (r1 > r2) {
+ arg1 = Number(arg1.toString().replace('.', ''))
+ arg2 = Number(arg2.toString().replace('.', '')) * cm
+ } else {
+ arg1 = Number(arg1.toString().replace('.', '')) * cm
+ arg2 = Number(arg2.toString().replace('.', ''))
+ }
+ } else {
+ arg1 = Number(arg1.toString().replace('.', ''))
+ arg2 = Number(arg2.toString().replace('.', ''))
+ }
+ return (arg1 + arg2) / m
+}
+
+/**
+ * 小数减法
+ */
+export const accSubtract = (arg1, arg2) => {
+ var r1, r2, m, c
+ try {
+ r1 = arg1.toString().split('.')[1].length
+ } catch (e) {
+ r1 = 0
+ }
+ try {
+ r2 = arg2.toString().split('.')[1].length
+ } catch (e) {
+ r2 = 0
+ }
+ c = Math.abs(r1 - r2)
+ m = Math.pow(10, Math.max(r1, r2))
+ if (c > 0) {
+ var cm = Math.pow(10, c)
+ if (r1 > r2) {
+ arg1 = Number(arg1.toString().replace('.', ''))
+ arg2 = Number(arg2.toString().replace('.', '')) * cm
+ } else {
+ arg1 = Number(arg1.toString().replace('.', '')) * cm
+ arg2 = Number(arg2.toString().replace('.', ''))
+ }
+ } else {
+ arg1 = Number(arg1.toString().replace('.', ''))
+ arg2 = Number(arg2.toString().replace('.', ''))
+ }
+ return (arg1 - arg2) / m
+}
+
+/**
+ * 小数乘法
+ */
+export const accMul = (arg1, arg2) => {
+ var m = 0
+ var s1 = arg1.toString()
+ var s2 = arg2.toString()
+ try { m += s1.split('.')[1].length } catch (e) {}
+ try { m += s2.split('.')[1].length } catch (e) {}
+ return Number(s1.replace('.', '')) * Number(s2.replace('.', '')) / Math.pow(10, m)
+}
\ No newline at end of file