Browse Source

fix: 最新代码改成vue3

master
张立 3 months ago
parent
commit
d2a381e47b
  1. 17
      .env.development
  2. 11
      .env.production
  3. 14
      .env.test
  4. 4
      nginx.conf
  5. 10
      package.json
  6. 7500
      pnpm-lock.yaml
  7. 17
      sfms3.0-uniapp3/App.vue
  8. 20
      sfms3.0-uniapp3/index.html
  9. 22
      sfms3.0-uniapp3/main.js
  10. 72
      sfms3.0-uniapp3/manifest.json
  11. 17
      sfms3.0-uniapp3/pages.json
  12. 52
      sfms3.0-uniapp3/pages/index/index.vue
  13. BIN
      sfms3.0-uniapp3/static/logo.png
  14. 10
      sfms3.0-uniapp3/uni.promisify.adaptor.js
  15. 76
      sfms3.0-uniapp3/uni.scss
  16. 12
      src/api/dept.js
  17. 6
      src/api/eam/attachmentFile.js
  18. 5
      src/api/eam/basicFaultType.js
  19. 43
      src/api/eam/device.js
  20. 20
      src/api/eam/dict.js
  21. 57
      src/api/eam/inspection.js
  22. 24
      src/api/eam/location.js
  23. 119
      src/api/eam/repairOrder.js
  24. 22
      src/api/eam/spareParts.js
  25. 18
      src/api/eam/sparePartsApplication.js
  26. 14
      src/api/eam/sparePartsApplicationApprove.js
  27. 10
      src/api/eam/sparePartsServiceWorkOrderList.js
  28. 57
      src/api/eam/spotcheck.js
  29. 25
      src/api/eam/tool.js
  30. 104
      src/api/eam/upkeepOrder.js
  31. 11
      src/api/eam/user.js
  32. 66
      src/api/http.ts
  33. 5
      src/api/location.js
  34. 2
      src/api/login.js
  35. 21
      src/api/mes/dict/dictApi.ts
  36. 54
      src/api/mes/orderDay/index.ts
  37. 15
      src/api/mes/productBackline/productBacklineApi.ts
  38. 23
      src/api/mes/productOffline/productOfflineApi.ts
  39. 8
      src/api/mes/qaForm/index.ts
  40. 15
      src/api/mes/reworkBatch/reworkBatchApi.ts
  41. 15
      src/api/mes/reworkSingle/reworkSingleApi.ts
  42. 13
      src/api/mes/workScheduling/addBasicItem/index.ts
  43. 149
      src/api/mes/workScheduling/index.ts
  44. 35
      src/api/overhaulOrder.js
  45. 828
      src/api/request2.js
  46. 19
      src/api/spotCheckOrder.js
  47. 21
      src/api/wms/workShop.js
  48. 79
      src/common/appUpdate.js
  49. 50
      src/common/array.js
  50. 113
      src/common/balance.js
  51. 177
      src/common/basic.js
  52. 10
      src/common/calc.js
  53. 159
      src/common/detail.js
  54. 181
      src/common/directory.js
  55. 107
      src/common/label.js
  56. 91
      src/common/record.js
  57. 236
      src/common/style/new_style.css
  58. 23
      src/common/style/pdabasic.css
  59. 138
      src/common/utils/common.ts
  60. 50
      src/common/utils/dateTime.ts
  61. 19
      src/common/utils/http.ts
  62. 14
      src/common/utils/storage.js
  63. 31
      src/common/utils/utils.ts
  64. 783
      src/common/utils/validator.ts
  65. 269
      src/components/item/slectItemList.vue
  66. 99
      src/components/my-paging/my-paging.vue
  67. 85
      src/components/search/index.vue
  68. 159
      src/components/show-modal/show-modal.vue
  69. 87
      src/components/tags/index.vue
  70. 469
      src/components/verifition/Verify.vue
  71. 14
      src/components/verifition/utils/ase.js
  72. 17
      src/components/verifition/utils/request.js
  73. 555
      src/components/verifition/verifyPoint/verifyPoint.vue
  74. 661
      src/components/verifition/verifySlider/verifySlider.vue
  75. 11
      src/main.ts
  76. 37
      src/manifest.json
  77. 111
      src/mycomponents/balance/balance.vue
  78. 2
      src/mycomponents/balance/balanceDetailPopup.vue
  79. 2
      src/mycomponents/balance/balanceMove.vue
  80. 73
      src/mycomponents/balance/balanceSelect.vue
  81. 17
      src/mycomponents/balance/batch.vue
  82. 37
      src/mycomponents/balance/bussinessType.vue
  83. 45
      src/mycomponents/balance/handleBalance.vue
  84. 22
      src/mycomponents/balance/location.vue
  85. 41
      src/mycomponents/balance/pack.vue
  86. 29
      src/mycomponents/balance/productionLabel.vue
  87. 45
      src/mycomponents/balance/recommendBalance.vue
  88. 26
      src/mycomponents/balance/toLocation.vue
  89. 64
      src/mycomponents/button/requestButton.vue
  90. 30
      src/mycomponents/common/comBlankView.vue
  91. 27
      src/mycomponents/common/comEmptyView.vue
  92. 4
      src/mycomponents/common/comListHint.vue
  93. 96
      src/mycomponents/common/comListItem.vue
  94. 540
      src/mycomponents/common/comMessage.vue
  95. 25
      src/mycomponents/common/comPopup.vue
  96. 75
      src/mycomponents/container/targetContainer.vue
  97. 227
      src/mycomponents/detail/comDetailCard.vue
  98. 190
      src/mycomponents/detail/comRequestDetailCard.vue
  99. 34
      src/mycomponents/detail/detailBalanceInfo.vue
  100. 55
      src/mycomponents/detail/detailCommonInfo.vue

17
.env.development

@ -1,4 +1,15 @@
VITE_BASE_URL=http://localhost:12080/admin-api VITE_BASE_URL=http://localhost:12080/admin-api
#VITE_BASE_URL=http://dev.ccwin-in.com:25203/api/admin-api #VITE_BASE_URL=http://dev.ccwin-in.com:28051/api/admin-api
VITE_BASE_URL_IMAGE=http://localhost:12080/admin-api # VITE_BASE_URL_IMAGE=http://172.22.32.9:81/admin-api
# 租户配置
VITE_TENANT='[{"text":"英泰","value":1}]'
# 是否是测试环境
VITE_isDevelopment=true
# 积木报表请求路径
VITE_JMREPORT_BASE_URL='http://172.22.32.9:90'
# 项目管理模式 批次货/包装
VITE_MANAGE_MODEL="BY_BATCH"

11
.env.production

@ -1,4 +1,7 @@
# VITE_BASE_URL=http://dev.ccwin-in.com:23111/app VITE_BASE_URL=http://172.21.32.14:81/api/admin-api VITE_BASE_URL_IMAGE=http://172.21.32.14:81/admin-api # 租户配置 VITE_TENANT='[{"text":"长春","value":1},{"text":"成都","value":2}]'
# VITE_BASE_URL_IMAGE=http://dev.ccwin-in.com:23111
VITE_BASE_URL=https://tmsapp.hongxianggroup.com.cn # 是否是测试环境
VITE_BASE_URL_IMAGE=https://tmsapp.hongxianggroup.com.cn VITE_isDevelopment=false
# 积木报表请求路径
VITE_JMREPORT_BASE_URL='http://172.21.32.14:90'

14
.env.test

@ -1,2 +1,12 @@
VITE_BASE_URL=http://dev.ccwin-in.com:25303/api/admin-api
VITE_BASE_URL_IMAGE=http://dev.ccwin-in.com:25303/api/admin-api VITE_BASE_URL=http://dev.ccwin-in.com:25300/api/admin-api
VITE_BASE_URL_IMAGE=http://dev.ccwin-in.com:25300/admin-api
# 租户配置
VITE_TENANT='[{"text":"长春","value":1},{"text":"成都","value":2}]'
# 是否是测试环境
VITE_isDevelopment=false
# 积木报表请求路径
VITE_JMREPORT_BASE_URL='http://dev.ccwin-in.com:25310'

4
nginx.conf

@ -27,10 +27,10 @@ http {
gzip_vary on; gzip_vary on;
gzip_disable "MSIE [1-6]\."; gzip_disable "MSIE [1-6]\.";
upstream eam { upstream eam {
server localhost:25310 weight=10 max_fails=3 fail_timeout=10s; server localhost:25210 weight=10 max_fails=3 fail_timeout=10s;
} }
server { server {
listen 25303; listen 25203;
server_name_in_redirect off; server_name_in_redirect off;
server_name dev.ccwin-in.com; server_name dev.ccwin-in.com;
location /api/ { location /api/ {

10
package.json

@ -11,10 +11,16 @@
"test:mp-weixin": "uni build -p mp-weixin", "test:mp-weixin": "uni build -p mp-weixin",
"test:app": "uni build -p app", "test:app": "uni build -p app",
"test:custom": "uni build -p", "test:custom": "uni build -p",
"prod": "uni build --mode production",
"prod:mp-weixin": "uni build -p mp-weixin --mode production", "prod:mp-weixin": "uni build -p mp-weixin --mode production",
"prod:app": "uni build -p app --mode production", "prod:app": "uni build -p app --mode production",
"prod:custom": "uni build -p --mode production" "prod:custom": "uni build -p --mode production",
"prod": "uni build --mode production",
"hella8": "uni build --mode hella8",
"hella9": "uni build --mode hella9",
"hella13": "uni build --mode hella13",
"hella14": "uni build --mode hella14",
"hella15": "uni build --mode hella15",
"hella16": "uni build --mode hella16"
}, },
"dependencies": { "dependencies": {
"@dcloudio/uni-app": "3.0.0-alpha-3060920221114001", "@dcloudio/uni-app": "3.0.0-alpha-3060920221114001",

7500
pnpm-lock.yaml

File diff suppressed because it is too large

17
sfms3.0-uniapp3/App.vue

@ -1,17 +0,0 @@
<script>
export default {
onLaunch: function() {
console.log('App Launch')
},
onShow: function() {
console.log('App Show')
},
onHide: function() {
console.log('App Hide')
}
}
</script>
<style>
/*每个页面公共css */
</style>

20
sfms3.0-uniapp3/index.html

@ -1,20 +0,0 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<script>
var coverSupport = 'CSS' in window && typeof CSS.supports === 'function' && (CSS.supports('top: env(a)') ||
CSS.supports('top: constant(a)'))
document.write(
'<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0' +
(coverSupport ? ', viewport-fit=cover' : '') + '" />')
</script>
<title></title>
<!--preload-links-->
<!--app-context-->
</head>
<body>
<div id="app"><!--app-html--></div>
<script type="module" src="/main.js"></script>
</body>
</html>

22
sfms3.0-uniapp3/main.js

@ -1,22 +0,0 @@
import App from './App'
// #ifndef VUE3
import Vue from 'vue'
import './uni.promisify.adaptor'
Vue.config.productionTip = false
App.mpType = 'app'
const app = new Vue({
...App
})
app.$mount()
// #endif
// #ifdef VUE3
import { createSSRApp } from 'vue'
export function createApp() {
const app = createSSRApp(App)
return {
app
}
}
// #endif

72
sfms3.0-uniapp3/manifest.json

@ -1,72 +0,0 @@
{
"name" : "sfms3.0-uniapp3",
"appid" : "",
"description" : "",
"versionName" : "1.0.0",
"versionCode" : "100",
"transformPx" : false,
/* 5+App */
"app-plus" : {
"usingComponents" : true,
"nvueStyleCompiler" : "uni-app",
"compilerVersion" : 3,
"splashscreen" : {
"alwaysShowBeforeRender" : true,
"waiting" : true,
"autoclose" : true,
"delay" : 0
},
/* */
"modules" : {},
/* */
"distribute" : {
/* android */
"android" : {
"permissions" : [
"<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>",
"<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>",
"<uses-permission android:name=\"android.permission.VIBRATE\"/>",
"<uses-permission android:name=\"android.permission.READ_LOGS\"/>",
"<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>",
"<uses-feature android:name=\"android.hardware.camera.autofocus\"/>",
"<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>",
"<uses-permission android:name=\"android.permission.CAMERA\"/>",
"<uses-permission android:name=\"android.permission.GET_ACCOUNTS\"/>",
"<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>",
"<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>",
"<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>",
"<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>",
"<uses-feature android:name=\"android.hardware.camera\"/>",
"<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>"
]
},
/* ios */
"ios" : {},
/* SDK */
"sdkConfigs" : {}
}
},
/* */
"quickapp" : {},
/* */
"mp-weixin" : {
"appid" : "",
"setting" : {
"urlCheck" : false
},
"usingComponents" : true
},
"mp-alipay" : {
"usingComponents" : true
},
"mp-baidu" : {
"usingComponents" : true
},
"mp-toutiao" : {
"usingComponents" : true
},
"uniStatistics" : {
"enable" : false
},
"vueVersion" : "3"
}

17
sfms3.0-uniapp3/pages.json

@ -1,17 +0,0 @@
{
"pages": [ //pageshttps://uniapp.dcloud.io/collocation/pages
{
"path": "pages/index/index",
"style": {
"navigationBarTitleText": "uni-app"
}
}
],
"globalStyle": {
"navigationBarTextStyle": "black",
"navigationBarTitleText": "uni-app",
"navigationBarBackgroundColor": "#F8F8F8",
"backgroundColor": "#F8F8F8"
},
"uniIdRouter": {}
}

52
sfms3.0-uniapp3/pages/index/index.vue

@ -1,52 +0,0 @@
<template>
<view class="content">
<image class="logo" src="/static/logo.png"></image>
<view class="text-area">
<text class="title">{{title}}</text>
</view>
</view>
</template>
<script>
export default {
data() {
return {
title: 'Hello'
}
},
onLoad() {
},
methods: {
}
}
</script>
<style>
.content {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
}
.logo {
height: 200rpx;
width: 200rpx;
margin-top: 200rpx;
margin-left: auto;
margin-right: auto;
margin-bottom: 50rpx;
}
.text-area {
display: flex;
justify-content: center;
}
.title {
font-size: 36rpx;
color: #8f8f94;
}
</style>

BIN
sfms3.0-uniapp3/static/logo.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.9 KiB

10
sfms3.0-uniapp3/uni.promisify.adaptor.js

@ -1,10 +0,0 @@
uni.addInterceptor({
returnValue (res) {
if (!(!!res && (typeof res === "object" || typeof res === "function") && typeof res.then === "function")) {
return res;
}
return new Promise((resolve, reject) => {
res.then((res) => res[0] ? reject(res[0]) : resolve(res[1]));
});
},
});

76
sfms3.0-uniapp3/uni.scss

@ -1,76 +0,0 @@
/**
* 这里是uni-app内置的常用样式变量
*
* uni-app 官方扩展插件及插件市场https://ext.dcloud.net.cn上很多三方插件均使用了这些样式变量
* 如果你是插件开发者建议你使用scss预处理并在插件代码中直接使用这些变量无需 import 这个文件方便用户通过搭积木的方式开发整体风格一致的App
*
*/
/**
* 如果你是App开发者插件使用者你可以通过修改这些变量来定制自己的插件主题实现自定义主题功能
*
* 如果你的项目同样使用了scss预处理你也可以直接在你的 scss 代码中使用如下变量同时无需 import 这个文件
*/
/* 颜色变量 */
/* 行为相关颜色 */
$uni-color-primary: #007aff;
$uni-color-success: #4cd964;
$uni-color-warning: #f0ad4e;
$uni-color-error: #dd524d;
/* 文字基本颜色 */
$uni-text-color:#333;//基本色
$uni-text-color-inverse:#fff;//反色
$uni-text-color-grey:#999;//辅助灰色如加载更多的提示信息
$uni-text-color-placeholder: #808080;
$uni-text-color-disable:#c0c0c0;
/* 背景颜色 */
$uni-bg-color:#ffffff;
$uni-bg-color-grey:#f8f8f8;
$uni-bg-color-hover:#f1f1f1;//点击状态颜色
$uni-bg-color-mask:rgba(0, 0, 0, 0.4);//遮罩颜色
/* 边框颜色 */
$uni-border-color:#c8c7cc;
/* 尺寸变量 */
/* 文字尺寸 */
$uni-font-size-sm:12px;
$uni-font-size-base:14px;
$uni-font-size-lg:16px;
/* 图片尺寸 */
$uni-img-size-sm:20px;
$uni-img-size-base:26px;
$uni-img-size-lg:40px;
/* Border Radius */
$uni-border-radius-sm: 2px;
$uni-border-radius-base: 3px;
$uni-border-radius-lg: 6px;
$uni-border-radius-circle: 50%;
/* 水平间距 */
$uni-spacing-row-sm: 5px;
$uni-spacing-row-base: 10px;
$uni-spacing-row-lg: 15px;
/* 垂直间距 */
$uni-spacing-col-sm: 4px;
$uni-spacing-col-base: 8px;
$uni-spacing-col-lg: 12px;
/* 透明度 */
$uni-opacity-disabled: 0.3; // 组件禁用态的透明度
/* 文章场景相关 */
$uni-color-title: #2C405A; // 文章标题颜色
$uni-font-size-title:20px;
$uni-color-subtitle: #555555; // 二级标题颜色
$uni-font-size-subtitle:26px;
$uni-color-paragraph: #3F536E; // 文章段落颜色
$uni-font-size-paragraph:15px;

12
src/api/dept.js

@ -1,12 +0,0 @@
import http from './http'
// 获取人员列表
export function getSelecUser(params) {
return http.get('/system/dept/selecUserByType',{params})
}
// // 获取厂区列表
// export function getFactoryAreaList(params) {
// return []
// // http.get('/system/dept/selectAllFactoryArea',{params})
// }

6
src/api/eam/attachmentFile.js

@ -1,6 +0,0 @@
import http from '../http'
// 文件列表
export function listNoPage(params) {
return http.post('/eam/attachment-file/listNoPage',{params})
}

5
src/api/eam/basicFaultType.js

@ -1,5 +0,0 @@
import http from '../http'
// 根据模具号查询信息
export function getBasicFaultTypeNoPage(params) {
return http.get('/eam/basic-fault-type/noPage',{params})
}

43
src/api/eam/device.js

@ -1,43 +0,0 @@
import http from '../http'
// 根据设备号查询信息
export function getDeviceDetailsByNumber(params) {
return http.get('/eam/device/equipment-accounts/detail',{params})
}
// 根据厂区查询设备
export function getDeviceByFactoryAreaNumber(factoryAreaNumber) {
return http.get('/eam/device/equipment-accounts/noPage')
}
// 添加报修
export function deviceRepairCreate(data) {
return http.post('/eam/equipment-report-repair-request/create',data)
}
// 报修列表
export function deviceRepairPage(params) {
return http.get('/eam/equipment-report-repair-request/page',{params})
}
// 撤销
export function rejected(id) {
return http.delete('/eam/device-repair-request/rejected?id='+id)
}
// 设备列表
export function deviceNoPage(params) {
return http.get('/eam/device/equipment-accounts/noPage',{params})
}
// 设备分页列表
export function devicePage(params) {
return http.get('/eam/device/equipment-accounts/page',{params})
}
// 根据设备号码获取二级列表
export function getSubList(params) {
return http.get('/eam/device-mold-items/getListByNumber',{params})
}
// 新增申领备件时获取备件列表
export function getApplyDeviceList() {
return http.get('/eam/device/equipment-accounts/noPage')
}
// 设备列表不分页
export function deviceList(params) {
return http.get('/eam/device/equipment-accounts/noPage',{params})
}

20
src/api/eam/dict.js

@ -1,20 +0,0 @@
import http from '../http'
// 获取字典
export function getDictList(type) {
return http.get('/system/dict-data/queryByDictType?dictType=' + type)
}
export async function getDict(type) {
let data =[]
await getDictList(type).then((res) => {
if (res.code == 0) {
data = res.data.map(item=>{
return {
label:item.label,
value:item.value,
}
})
} else {}
}).catch((err) => {})
return data
}

57
src/api/eam/inspection.js

@ -1,57 +0,0 @@
import http from '../http'
// 获取巡检工单
export function inspectionOrderPage(params) {
return http.get('/eam/equipment-inspection-main/page',{params})
}
// 获取巡检工单
export function inspectionOrder(number) {
return http.get('/eam/equipment-inspection-main/get?id=' + number)
}
//接单
export function inspectionUpdateOrder(params) {
return http.post('/eam/equipment-inspection-main/updateOrder',params)
}
//完成
export function inspectionExecuteOrder(params) {
return http.post('/eam/equipment-inspection-main/execute',params)
}
// 获取巡检工单
export function inspectionOrderDetail(params) {
return http.get('/eam/equipment-inspection-detail/getList',{params})
}
//更新巡检项
export function inspectionOrderItemUpdate(params) {
return http.put('/eam/equipment-inspection-detail/update',params)
}
//新增非必选巡检项
export function inspectionOrderItemCreate(params) {
return http.post('/eam/equipment-inspection-detail/create',params)
}
//删除巡检项
export function inspectionOrderDetailDelete(number) {
return http.delete('/eam/equipment-inspection-detail/delete?id=' + number)
}
//获取非必选的巡检项
export function inspectionPlanItemList(params) {
return http.post('/eam/relation-inspection-plan-item/getList',params)
}
//验证驳回
export function inspectionOrderRejected(params) {
return http.post('/eam/equipment-inspection-main/fallback',params)
}
//验证通过
export function inspectionOrderPassed(params) {
return http.put('/eam/equipment-inspection-main/updateOrders',params)
}

24
src/api/eam/location.js

@ -1,24 +0,0 @@
import http from '../http'
// 获取库位
export function getLocation(number) {
return http.get('/eam/location/scanCodeByNumber?number='+number)
}
// 出库获取库位
export function getOutLocation(data) {
return http.post('/eam/location/outScanCodeByNumber',data)
}
// 首页扫码获取详情
export function pdaItemAndLocation(number) {
return http.get('/eam/location/pdaItemAndLocation?number='+number)
}
// 获取领用出库主表分页列表
export function getOutLocationPage(params) {
return http.get('/eam/spare-parts-out-location-main/page',{params})
}
// 获取领用出库子表分页列表
export function getOutLocationDetailPage(params) {
return http.get('/eam/spare-parts-out-location-detail/page',{params})
}

119
src/api/eam/repairOrder.js

@ -1,119 +0,0 @@
import http from '../http'
// 添加工单
export function repairOrderCreate(data,type) {
if (type == 'DEVICE') {
return http.post('/eam/equipment-repair-job-main/create', data)
} else if (type == 'EQUIPMENT') {
return http.post('/eam/equipment-repair-job-main/create', data)
}
}
// 编辑工单
export function repairOrderUpdate(data,type) {
if (type == 'DEVICE') {
return http.put('/eam/equipment-repair-job-main/update', data)
} else if (type == 'EQUIPMENT') {
return http.put('/eam/equipment-repair-job-main/update', data)
}
}
// 工单列表
export function repairOrderPage(params,type) {
if (type == 'DEVICE') {
return http.get('/eam/equipment-repair-job-main/page', {params})
} else if (type == 'EQUIPMENT') {
return http.get('/eam/equipment-repair-job-main/page', {params})
}
}
// 获取维修工单详情信息
export function getDeviceRepairDetail(params,type) {
if (type == 'DEVICE') {
return http.get('eam/equipment-repair-job-main/page', {params})
} else if (type == 'EQUIPMENT') {
return http.get('eam/equipment-repair-job-main/page', {params})
}
}
// 接单
export function orderClick(params,type) {
if (type == 'DEVICE') {
return http.post('/eam/equipment-repair-job-main/updateOrder', params)
} else if (type == 'EQUIPMENT') {
return http.post('/eam/equipment-repair-job-main/updateOrder', params)
}
}
// 完成
export function orderClickFinish(params,type) {
if (type == 'DEVICE') {
return http.get('/eam/equipment-repair-job-main/orderClickFinish', {params})
} else if (type == 'EQUIPMENT') {
return http.get('/eam/equipment-repair-job-main/orderClickFinish', {params})
}
}
// 确认
export function orderClickConfirm(params,type) {
if (type == 'DEVICE') {
return http.get('/eam/equipment-repair-job-main/orderClickConfirm', {params})
} else if (type == 'EQUIPMENT') {
return http.get('/eam/equipment-repair-job-main/orderClickConfirm', {params})
}
}
// 验证
export function orderClickVerify(params,type) {
if (type == 'DEVICE') {
return http.get('/eam/equipment-repair-job-main/orderClickVerify', {params})
} else if (type == 'EQUIPMENT') {
return http.get('/eam/equipment-repair-job-main/orderClickVerify', {params})
}
}
// 添加维修工单子项维修内容
export function repairOrderDetailCreate(data,type) {
if (type == 'DEVICE') {
return http.post('/eam/equipment-repair-job-detail/create', data)
} else if (type == 'EQUIPMENT') {
return http.post('/eam/equipment-repair-job-detail/create', data)
}
}
// 编辑维修工单子项维修内容
export function repairOrderDetailUpdate(data,type) {
if (type == 'DEVICE') {
return http.put('/eam/equipment-repair-job-detail/update', data)
} else if (type == 'EQUIPMENT') {
return http.put('/eam/equipment-repair-job-detail/update', data)
}
}
// 获得维修工单子列表
export function repairOrderDetailList(params,type) {
if (type == 'DEVICE') {
return http.get('/eam/equipment-repair-job-detail/noPage', {params})
} else if (type == 'EQUIPMENT') {
return http.get('/eam/equipment-repair-job-detail/noPage', {params})
}
}
// 删除维修工单子
export function repairOrderDetailDelete(id,type) {
if (type == 'DEVICE') {
return http.delete('/eam/equipment-repair-job-detail/delete?id=' + id)
} else if (type == 'EQUIPMENT') {
return http.delete('/eam/equipment-repair-job-detail/delete?id=' + id)
}
}
//转办
export function transfer(params,type) {
if (type == 'DEVICE') {
return http.get('/eam/equipment-repair-job-main/turnTo', {params})
} else if (type == 'EQUIPMENT') {
return http.get('/eam/equipment-repair-job-main/turnTo', {params})
}
}
// 获取采取临时措施的维修工单
export function repairOrderList(params) {
return http.get('/eam/equipment-repair-job-main/getList', {
params
})
}
// 获取维修工单的报修信息
export function getDeviceRepairDetailsByNumber(params) {
return http.get('/eam/equipment-repair-job-main/detail', {
params
})
}

22
src/api/eam/spareParts.js

@ -1,22 +0,0 @@
import http from '../http'
// 获取tabs备件列表
export function getSparePartsPage(params) {
return http.get('/eam/item-accounts/page',{params})
}
// 获取备件列表
export function getSparePartsList(params) {
return http.get('/eam/item/getListByNumber',{params})
}
// 新增申领备件时获取备件列表
export function getApplySparePartsList() {
return http.get('/eam/basic/spare-part/noPage')
}
// 新增申领备件时获取备件列表
export function getItemAccountsNoPage() {
return http.get('/eam/item-accounts/noPage')
}
// 新增备件维修获取备件列表
export function getServiceSparePartsList() {
return http.get('/eam/basic/spare-part/noPage')
}

18
src/api/eam/sparePartsApplication.js

@ -1,18 +0,0 @@
import http from '../http'
// 备件领用列表
export function sparePartsApplicationPage(params) {
return http.get('/eam/spare-parts-apply-main/page',{params})
}
// 领用备件
export function sparePartsApplicationCreate(data) {
return http.post('/eam/spare-parts-apply-main/create',data)
}
// 撤回领用备件
export function sparePartsApplicationCancle(id) {
return http.get('/eam/spare-parts-apply-main/backout?id=' + id)
}
// 领用备件详情
export function sparePartsApplicationDetail(masterId) {
return http.get('/eam/spare-parts-apply-detail/page?masterId=' + masterId)
}

14
src/api/eam/sparePartsApplicationApprove.js

@ -1,14 +0,0 @@
import http from '../http'
// 备件领用审批列表
export function sparePartsApplicationApprovePage(params) {
return http.get('/eam/spare-parts-apply-main/page',{params})
}
// 通过申请
export function sparePartsApplicationAgree(id) {
return http.get('/eam/spare-parts-apply-main/agree?id='+id)
}
// 驳回申请
export function sparePartsApplicationReject(id) {
return http.get('/eam/spare-parts-apply-main/disAgree?id='+id)
}

10
src/api/eam/sparePartsServiceWorkOrderList.js

@ -1,10 +0,0 @@
import http from '../http'
// 领用备件
export function sparePartsServiceWorkOrderListCreate(data) {
return http.post('/eam/repair-spare-parts-request/create',data)
}
// 备件维修列表
export function sparePartsServiceWorkOrderListPage(params) {
return http.get('/eam/repair-spare-parts-request/page',{params})
}

57
src/api/eam/spotcheck.js

@ -1,57 +0,0 @@
import http from '../http'
// 获取点检工单
export function spotcheckOrderPage(params) {
return http.get('/eam/equipment-spot-check-main/page',{params})
}
// 获取点检工单
export function spotcheckOrder(number) {
return http.get('/eam/equipment-spot-check-main/get?id=' + number)
}
//接单
export function spotcheckUpdateOrder(params) {
return http.post('/eam/equipment-spot-check-main/updateOrder',params)
}
//完成
export function spotcheckExecuteOrder(params) {
return http.post('/eam/equipment-spot-check-main/execute',params)
}
// 获取点检工单
export function spotcheckOrderDetail(params) {
return http.get('/eam/equipment-spot-check-detail/getList',{params})
}
//更新点检项
export function spotcheckOrderItemUpdate(params) {
return http.put('/eam/equipment-spot-check-detail/update',params)
}
//新增非必选点检项
export function spotcheckOrderItemCreate(params) {
return http.post('/eam/equipment-spot-check-detail/create',params)
}
//删除点检项
export function spotcheckOrderDetailDelete(number) {
return http.delete('/eam/equipment-spot-check-detail/delete?id=' + number)
}
//获取非必选的点检项
export function spotcheckPlanItemList(params) {
return http.post('/eam/relation-spot-check-plan-item/getList',params)
}
//验证驳回
export function spotcheckOrderRejected(params) {
return http.post('/eam/equipment-spot-check-main/fallback',params)
}
//验证通过
export function spotcheckOrderPassed(params) {
return http.put('/eam/equipment-spot-check-main/updateOrders',params)
}

25
src/api/eam/tool.js

@ -1,25 +0,0 @@
import http from '../http'
// 根据模具号查询信息
export function getToolDetailsByNumber(params) {
return http.get('/eam/tool/tool-accounts/get',{params})
}
// 根据厂区查询模具
export function getToolByFactoryAreaNumber(factoryAreaNumber) {
return http.get('/eam/tool/tool-accounts/noPage')
}
// 模具分页列表
export function toolPage(params) {
return http.get('/eam/tool/tool-accounts/page',{params})
}
// 模具列表
export function toolList(params) {
return http.get('/eam/tool/tool-accounts/noPage',{params})
}
// 模具列表不分页
export function toolNoPage(params) {
return http.get('/eam/tool/tool-accounts/noPage',{params})
}
// 新增申领备件时获取模具列表
export function getApplyToolList() {
return http.get('/eam/tool/tool-accounts/noPage')
}

104
src/api/eam/upkeepOrder.js

@ -1,104 +0,0 @@
import http from '../http'
// 添加工单
export function upkeepOrderCreate(data,type) {
if (type == 'DEVICE') {
return http.post('/eam/equipment-maintenance-main/create',data)
} else if (type == 'EQUIPMENT') {
return http.post('/eam/equipment-maintenance-main/create',data)
}
}
// 编辑工单
export function upkeepOrderUpdate(data,type) {
if (type == 'DEVICE') {
return http.put('/eam/equipment-maintenance-main/update',data)
} else if (type == 'EQUIPMENT') {
return http.put('/eam/equipment-maintenance-main/update',data)
}
}
// 工单列表
export function upkeepOrderPage(params,type) {
if (type == 'DEVICE') {
return http.get('/eam/equipment-maintenance-main/page',{params})
} else if (type == 'EQUIPMENT') {
return http.get('/eam/equipment-maintenance-main/page',{params})
}
}
// 工单列表
export function upkeepOrderInfo(params,type) {
if (type == 'DEVICE') {
return http.get('/eam/equipment-maintenance-main/get',{params})
} else if (type == 'EQUIPMENT') {
return http.get('/eam/equipment-maintenance-main/get',{params})
}
}
// 接单
export function orderClick(params,type) {
if (type == 'DEVICE') {
return http.post('/eam/equipment-maintenance-main/updateOrder',params)
} else if (type == 'EQUIPMENT') {
return http.post('/eam/equipment-maintenance-main/updateOrder',params)
}
}
export function orderClickVerify(params,type) {
if (type == 'DEVICE') {
return http.get('/eam/equipment-maintenance-main/orderClickVerify',{params})
} else if (type == 'EQUIPMENT') {
return http.get('/eam/equipment-maintenance-main/orderClickVerify',{params})
}
}
// 完成保养工单
export function orderClickFinish(params,type) {
if (type == 'DEVICE') {
return http.post('/eam/equipment-maintenance-main/updateOrders',params)
} else if (type == 'EQUIPMENT') {
return http.post('/eam/equipment-maintenance-main/updateOrders',params)
}
}
// 修改保养工单完成状态
export function excuteFinish(params,type) {
if (type == 'DEVICE') {
return http.post('/eam/equipment-maintenance-main/execute',params)
} else if (type == 'EQUIPMENT') {
return http.post('/eam/equipment-maintenance-main/execute',params)
}
}
// 添加维修工单子项维修内容
export function upkeepOrderDetailCreate(data,type) {
if (type == 'DEVICE') {
return http.post('/eam/device-maintain-job-detail/create',data)
} else if (type == 'EQUIPMENT') {
return http.post('/eam/device-maintain-job-detail/create',data)
}
}
// 编辑维修工单子项维修内容
export function upkeepOrderDetailUpdate(data,type) {
if (type == 'DEVICE') {
return http.put('/eam/equipment-maintenance-detail/update',data)
} else if (type == 'EQUIPMENT') {
return http.put('/eam/equipment-maintenance-detail/update',data)
}
}
// 获得维修工单子列表
export function upkeepOrderDetailList(params,type) {
if (type == 'DEVICE') {
return http.post('/eam/equipment-maintenance-detail/noPage',params)
} else if (type == 'EQUIPMENT') {
return http.post('/eam/equipment-maintenance-detail/noPage',params)
}
}
// 删除维修工单子
export function upkeepOrderDetailDelete(id,type) {
if (type == 'DEVICE') {
return http.delete('/eam/device-maintain-job-detail/delete?id='+id)
} else if (type == 'EQUIPMENT') {
return http.delete('/eam/device-maintain-job-detail/delete?id='+id)
}
}

11
src/api/eam/user.js

@ -1,11 +0,0 @@
import http from '../http'
// 用户密码重置
export function updateUserPassword(data) {
return http.put('/eam/device-accounts/getDetailsByNumber',data)
}
export function getAllUserSimpleInfo(){
return http.get('/system/user/list-all-simple')
}

66
src/api/http.ts

@ -8,6 +8,7 @@ const instance = axios.create({
adapter(config) { adapter(config) {
const { url, method, data, params, headers, baseURL, paramsSerializer } = const { url, method, data, params, headers, baseURL, paramsSerializer } =
config config
config.timeout = 300000
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
uni.request({ uni.request({
method: method!.toUpperCase() as any, method: method!.toUpperCase() as any,
@ -20,7 +21,16 @@ const instance = axios.create({
resolve(res) resolve(res)
}, },
fail: (error : any) => { fail: (error : any) => {
reject(error) // var message = error.errMsg
// if (message === 'Network Error') {
// message = '接口连接异常'
// } else if (message.includes('timeout')) {
// message = '接口请求超时'
// } else if (message.includes('Request failed with status code')) {
// message = '接口' + message.substr(message.length - 3) + '异常'
// }
// reject("系统异常:"+message);
// console.log("系统异常",message)
} }
}) })
}) })
@ -34,10 +44,12 @@ const instance = axios.create({
instance.interceptors.request.use((config) => { instance.interceptors.request.use((config) => {
const { method, params, url } = config const { method, params, url } = config
// 附带鉴权的token // 附带鉴权的token
const tenantId = 1 // const tenantId = 1
var tenantId = uni.getStorageSync('tenantId')
const headers : any = { const headers : any = {
token: getAccessToken(), token: getAccessToken(),
"tenant-id": tenantId, "tenant-id": tenantId,
"dataSource":"PDA",
'Authorization': 'Bearer ' + getAccessToken() 'Authorization': 'Bearer ' + getAccessToken()
} }
if (uni.getStorageSync('openId')) { if (uni.getStorageSync('openId')) {
@ -66,11 +78,12 @@ instance.interceptors.request.use((config) => {
* *
*/ */
instance.interceptors.response.use((v) => { instance.interceptors.response.use((v) => {
const code = v.data?.code || 200 if (v) {
if (code === 401) { if (v.statusCode == 200) {
// alert('即将跳转登录页。。。', '登录过期') if (v.data.code == 0) {
// setTimeout(redirectHome, 1500) // return v.data
removeToken() return Promise.resolve(v.data)
}else if(v.data.code == 404){
uni.showModal({ uni.showModal({
title: '系统提示', title: '系统提示',
content: '登录状态已过期,您可以继续留在该页面,或者重新登录', content: '登录状态已过期,您可以继续留在该页面,或者重新登录',
@ -78,32 +91,37 @@ instance.interceptors.response.use((v) => {
confirmText: '重新登录', confirmText: '重新登录',
success: function (res) { success: function (res) {
if (res.confirm) { if (res.confirm) {
uni.reLaunch({ url: '/pages/login' }) uni.reLaunch({ url: '/pages/login/index' })
} }
} }
}) })
return v.data } else if(v.data.code == 401){
} else if (code === 500) { uni.clearStorageSync()
uni.showToast({ uni.removeStorageSync('overPackageRecord')
title: v.data.msg, uni.showModal({
icon: 'none' title: '系统提示',
}) content: '账号未登录,请重新登录',
return v.data cancelText: '关闭',
} else if (code !== 200) { confirmText: '重新登录',
uni.showToast({ success: function (res) {
title: v.data.msg, if (res.confirm) {
icon: 'none' uni.reLaunch({ url: '/pages/login/index' })
}
}
}) })
return v.data } else {
// return v.data
return Promise.reject("系统异常:" + v.data.msg)
} }
// @ts-ignore
if ((v.status || v.statusCode) === 200) {
return v.data
} else { } else {
return Promise.reject("系统异常:" + v.data.msg)
}
} else {
return Promise.reject("系统异常:" + v.data.msg)
} }
return Promise.reject(v)
}, error => { }, error => {
console.log(error) console.log(error)
uni.showToast({ uni.showToast({

5
src/api/location.js

@ -1,5 +0,0 @@
import http from './http'
// 获取库位
export function getLocation(number) {
return http.get('/eam/location/scanCodeByNumber?number='+number)
}

2
src/api/login.js

@ -11,7 +11,7 @@ export function login(username, password, captchaVerification, tenantName, remem
code, code,
uuid, uuid,
} }
return http.post('/system/auth/login', data) return http.post('/system/auth/loginNoCode', data)
} }
// 获取用户详细信息 // 获取用户详细信息

21
src/api/mes/dict/dictApi.ts

@ -1,21 +0,0 @@
import http from '../../http'
// 获取字典
export function getDictList(type) {
return http.get('/system/dict-data/queryByDictType?dictType=' + type)
}
export async function getDict(type) {
let data =[]
await getDictList(type).then((res) => {
if (res.code == 0) {
data = res.data.map(item=>{
return {
label:item.label,
value:item.value,
}
})
} else {}
}).catch((err) => {})
return data
}

54
src/api/mes/orderDay/index.ts

@ -1,54 +0,0 @@
import http from '../../http'
export interface OrderDayVO {
status: string
remark: string
planNoMonth: string
planNoDay: string
productCode: string
workroomCode: string
lineCode: string
planCount: number
processrouteCode: string
tempProcessroute: string
standardBom: string
tempBom: string
workMode: string
planDate: Date
startTime: Date
endTime: Date
taskMode: string
}
export function getCompleteInspectionMark(paramCode) {
return http.get('/mes/complete-inspect/get?paramCode=' + paramCode)
}
export function getQualityformInfo(fromNo) {
return http.get('/mes/qualityform/getQualityform?fromNo=' + fromNo)
}
export function getOrderDayPage(params) {
return http.get('/mes/orderday/page', {params})
}
export function getOrderDayPlanDetail(number) {
//return http.get('/eam/item-apply-request-main/appGetByNumber?number=' + number)
return http.get('/mes/orderday/get?id=' + number)
}
export function getBomInfo(params) {
return http.post('/mes/complete-inspect/get-orderDay-bom', params)
}
export function getBomInfoList(params) {
return http.post('/mes/complete-inspect/get-orderDay-bom-page', params)
}
export function updateBomInfo(params) {
return http.post('/mes/complete-inspect/update', params)
}
export function planStop(params) {
return http.post('/mes/orderday/stopPlan/'+ params)
}

15
src/api/mes/productBackline/productBacklineApi.ts

@ -1,15 +0,0 @@
import http from '../../http'
// 产品离线登记列表
export function getPage(params) {
return http.get('/mes/product-backline/page',{params})
}
export function changeStatus(data) {
return http.put('/mes/product-backline/update',data)
}
export function create(data) {
return http.post('/mes/product-backline/create',data)
}

23
src/api/mes/productOffline/productOfflineApi.ts

@ -1,23 +0,0 @@
import http from '../../http'
// 产品离线登记列表
export function getPage(params) {
return http.get('/mes/product-offline/page',{params})
}
export function changeStatus(data) {
return http.put('/mes/product-offline/update',data)
}
export function create(data) {
return http.post('/mes/product-offline/create',data)
}
export function getPageChildren(params) {
return http.get('/wms/team/getPageChildren',{params})
}
export function getworkSchedulingPage(params) {
return http.get('/mes/work-scheduling/page',{params})
}

8
src/api/mes/qaForm/index.ts

@ -1,8 +0,0 @@
import http from '../../http'
export function create(data) {
return http.post('/mes/work-scheduling-qaform/create',data)
}

15
src/api/mes/reworkBatch/reworkBatchApi.ts

@ -1,15 +0,0 @@
import http from '../../http'
// 产品离线登记列表
export function getPage(params) {
return http.get('/mes/rework-batch/page',{params})
}
export function update(data) {
return http.put('/mes/rework-batch/update',data)
}
export function create(data) {
return http.post('/mes/rework-batch/create',data)
}

15
src/api/mes/reworkSingle/reworkSingleApi.ts

@ -1,15 +0,0 @@
import http from '../../http'
// 产品离线登记列表
export function getPage(params) {
return http.get('/mes/rework-single/page',{params})
}
export function update(data) {
return http.put('/mes/rework-single/update',data)
}
export function create(data) {
return http.post('/mes/rework-single/create',data)
}

13
src/api/mes/workScheduling/addBasicItem/index.ts

@ -1,13 +0,0 @@
import http from '../../../http'
//查询物料信息列表
export function getByOrder(params) {
return http.get('/mes/orderDayBom/getByOrder', {params})
}
//补料
export function addBasicItem(data) {
return http.post('/mes/item-request-main/addBasicItem', data)
}

149
src/api/mes/workScheduling/index.ts

@ -1,149 +0,0 @@
import http from '../../http'
export interface OrderDayVO {
status: string
remark: string
planNoMonth: string
planNoDay: string
productCode: string
workroomCode: string
lineCode: string
planCount: number
processrouteCode: string
tempProcessroute: string
standardBom: string
tempBom: string
workMode: string
planDate: Date
startTime: Date
endTime: Date
taskMode: string
}
export function getCompleteInspectionMark(paramCode) {
return http.get('/mes/complete-inspect/get?paramCode=' + paramCode)
}
export function getQualityformInfo(fromNo) {
return http.get('/mes/qualityform/getQualityform?fromNo=' + fromNo)
}
export function getWorkSchedulingPage(params) {
return http.get('/mes/workScheduling/page', {params})
}
export function getWorkSchedulingPDAPage(params) {
return http.get('/mes/workScheduling/PDA-page', {params})
}
export function getWorkSchedulingInfo(number) {
return http.get('/mes/workScheduling/get?id=' + number)
}
export function updateWorkScheduling(params) {
return http.post('/mes/workScheduling/update-status', params)
}
export function getWorkSchedulingPDF(number) {
return http.get('/mes/workScheduling/get-PDF?planMasterCode=' + number)
}
export function getWorkSchedulingDetail(params) {
return http.post('/mes/work-scheduling-detail/get-info', params)
}
export function getWorkSchedulingProcessFinished(number) {
return http.get('/mes/work-scheduling-detail/processFinished?id=' + number)
}
export function getBomInfo(params) {
return http.post('/mes/complete-inspect/get-orderDay-bom', params)
}
export function getBomInfoList(params) {
return http.post('/mes/complete-inspect/get-orderDay-bom-page', params)
}
export function getWorkerInfoList(params) {
return http.post('/mes/complete-inspect/get-orderDay-worker-page', params)
}
export function getEquipmentInfoList(params) {
return http.post('/mes/complete-inspect/get-orderDay-equipment-page', params)
}
export function updateWorkSchedulingInfo(params) {
return http.post('/mes/complete-inspect/update', params)
}
export function getQaFormPage(params) {
return http.get('/mes/work-scheduling-qaform/page', {params})
}
// 查询已经配置工序人员
export const getConfigProcessWorker = async (params: any) => {
return http.get('/mes/work-scheduling-detail/getPeopleReportList', {params})
}
// 工序报工
export const reportWorkByProcess = async (params: any) => {
return http.post('/mes/work-scheduling-detail/reportWorkByProcess', params)
}
//完工处理
export function completeHandle(data) {
return http.post('/mes/workScheduling/completeHandle', data)
}
//叫料
export function callBasicItem(params) {
return http.get('/mes/orderDayBom/page', {params})
}
export function callBasicItemForm(params) {
console.log(params)
return http.post('/mes/item-request-main/create-call-material', params)
}
//领料
export function receiveBasicItem(data) {
return http.post('/mes/item-request-main/receiveBasicItem', data)
}
//领料
export function receiveItem(data) {
return http.post('/mes/item-request-main/receiveItem', data)
}
//补料
export function addBasicItem(data) {
return http.post('/mes/', data)
}
export function getRequestMainList(params) {
return http.get('/mes/item-request-main/page', {params})
}
// 完工查询是否最后节点
export function getNodePosition(params) {
return http.get('/mes/workScheduling/getNodePosition', {params})
}
// 完工查询人员
export function getWorkerList(params) {
return http.get('/mes/workScheduling/getCurrentWorkerList', {params})
}
export function getRequestMainDetail(params) {
return http.get('/mes/item-request-detail/page', {params})
}
//工序报工
export function reportByProcess(data) {
return http.post('/mes/work-scheduling-detail/reportWorkByProcess', data)
}
//工序完工
export function finishedByProcess(data) {
return http.post('/mes/work-scheduling-detail/processFinished', data)
}
//工序质检
export function qualityByProcess(data) {
return http.post('/mes/work-scheduling-detail/processQualified', data)
}

35
src/api/overhaulOrder.js

@ -1,35 +0,0 @@
import http from './http'
// 添加工单
export function overhaulOrderCreate(data) {
return http.post('/eam/device-inspection-job-main/create',data)
}
// 编辑工单
export function overhaulOrderUpdate(data) {
return http.put('/eam/device-inspection-job-main/updat',data)
}
// 报修列表
export function overhaulOrderPage(params) {
return http.get('/eam/device-inspection-job-main/getAppPage',{params})
}
// 操作工单
export function orderClick(params) {
return http.get('/eam/device-inspection-job-main/onClick',{params})
}
// 添加维修工单子项维修内容
export function overhaulOrderDetailCreate(data) {
return http.post('/eam/device-inspection-job-detail/create',data)
}
// 编辑维修工单子项维修内容
export function overhaulOrderDetailUpdate(data) {
return http.put('/eam/device-inspection-job-detail/update',data)
}
// 获得维修工单子列表
export function overhaulOrderDetailList(params) {
return http.get('/eam/device-inspection-job-detail/selectListByNumber',{params})
}
// 删除维修工单子
export function overhaulOrderDetailDelete(id) {
return http.delete('/eam/device-inspection-job-detail/delete?id='+id)
}

828
src/api/request2.js

File diff suppressed because it is too large

19
src/api/spotCheckOrder.js

@ -1,19 +0,0 @@
import http from './http'
// 添加工单
export function spotCheckOrderCreate(data) {
return http.post('/eam/device-spot-inspection-record-main/create',data)
}
// 编辑工单
export function spotCheckOrderUpdate(data) {
return http.put('/eam/device-spot-inspection-record-main/update',data)
}
// 工单列表
export function spotCheckOrderPage(params) {
return http.get('/eam/device-spot-inspection-record-main/getAppPage',{params})
}
// 操作工单
export function orderClick(params) {
return http.get('/eam/device-spot-inspection-record-main/onClick',{params})
}

21
src/api/wms/workShop.js

@ -1,21 +0,0 @@
import http from '../http'
// 获取车间
export function getWorkshopNoPage(params) {
return http.get('/wms/workshop/noPage',{params})
}
// 获取库区
export function getAreaBasicInfoNoPage(params) {
return http.get('/wms/areabasic/list',{params})
}
// 获取库位
export function getLocationBasicInfoNoPage(params) {
return http.get('/wms/locationgroup/list',{params})
}
// 获取班组
export function getTeamNoPage(params) {
return http.get('/wms/team/noPage',{params})
}

79
src/common/appUpdate.js

@ -1,7 +1,7 @@
import { import {
appCheckUpdate appCheckUpdate
} from '../api/request2.js'; } from '../api/request2.js';
export function appUpdate() { export function appUpdate(isShowHint) {
let curversion = 0; let curversion = 0;
plus.runtime.getProperty(plus.runtime.appid, function(widgetInfo) { plus.runtime.getProperty(plus.runtime.appid, function(widgetInfo) {
const data = { const data = {
@ -14,41 +14,74 @@ export function appUpdate() {
curversion = data.versionCode curversion = data.versionCode
appCheckUpdate().then(res => { appCheckUpdate().then(res => {
console.log("当前版本提示", curversion) console.log("当前版本提示", curversion)
var json = JSON.stringify(res)
console.log("获取更新数据", json)
if (res.data) { if (res.data) {
if (res.data.versionCode > Number(curversion)) { if (res.data.installPackageVersion > Number(curversion)) {
var downUrl = res.data.downUrl; var downUrl = res.data.installPackageUrl;
var content = res.data.content; var content = res.data.updateContent;
var version =res.data.version var version = res.data.installPackageVersion;
var isForcedUpdate = res.data.isForcedUpdate
var versionName = res.data.installPackageName
console.log("新版本提示") console.log("新版本提示")
uni.showModal({ showDialog(versionName, content, isForcedUpdate, downUrl)
title: "发现新版本:("+version+")",
content: content, // uni.showModal({
confirmText: "更新", // title: "发现新版本:(" + version + ")",
cancelText: "取消", // content: content,
success: (res) => { // confirmText: "更新",
if (res.confirm) { // showCancel: isForcedUpdate == "TRUE" ? false : true,
confirm(downUrl); // cancelText: "取消",
console.log('comfirm') //点击确定之后执行的代码 // success: (res) => {
} else { // if (res.confirm) {
console.log('cancel') //点击取消之后执行的代码 // confirm(downUrl);
} // console.log('comfirm') //点击确定之后执行的代码
} // } else {
}) // console.log('cancel') //点击取消之后执行的代码
// if (isForcedUpdate == "TRUE") {
// }
// }
// }
// })
} else { } else {
if (isShowHint) {
uni.showToast({ uni.showToast({
title: "当前是最新版本" title: "当前是最新版本"
}) })
}
console.log("没有新版本") console.log("没有新版本")
} }
} }
}).catch(error => { }).catch(error => {
console.log("版本错误", error) console.log("版本错误", error)
}) })
}) })
}
export function showDialog(versionName, content, isForcedUpdate, downUrl) {
uni.showModal({
title: "发现新版本:(" + versionName + ")",
content: content,
confirmText: "更新",
showCancel: isForcedUpdate == "TRUE" ? false : true,
cancelText: "取消",
success: (res) => {
if (res.confirm) {
confirm(downUrl);
console.log(
'comfirm') //点击确定之后执行的代码
} else {
console.log(
'cancel') //点击取消之后执行的代码
if (isForcedUpdate == "TRUE") {
showDialog(versionName, content, isForcedUpdate, downUrl)
}
}
}
})
} }
export function confirm(downUrl) { export function confirm(downUrl) {
@ -91,12 +124,16 @@ export function confirm(downUrl) {
showLoading.setTitle("已连接到服务器"); showLoading.setTitle("已连接到服务器");
break; break;
case 3: case 3:
if (task.totalSize && task.totalSize > 0) {
prg = parseInt( prg = parseInt(
(parseFloat(task.downloadedSize) / (parseFloat(task.downloadedSize) /
parseFloat(task.totalSize)) * parseFloat(task.totalSize)) *
100 100
); );
showLoading.setTitle("正在下载" + prg + "% "); showLoading.setTitle("正在下载" + prg + "% ");
}else {
showLoading.setTitle("正在下载");
}
break; break;
case 4: case 4:
plus.nativeUI.closeWaiting(); plus.nativeUI.closeWaiting();

50
src/common/array.js

@ -110,6 +110,18 @@ export function getPurchaseReceiptOption(allowModifyQty, allowModifyLocation) {
return option; return option;
} }
export function getRecordOption(allowModifyQty, allowModifyLocation) {
var option = []
option.push(...getDetailOption())
if (allowModifyQty) {
option.push(...getEditOption())
}
if (allowModifyLocation) {
option.push(...getLocationOption())
}
option.push(...getRemoveOption())
return option;
}
//详情 //详情
export function getDetailOption() { export function getDetailOption() {
let option_detail = [{ let option_detail = [{
@ -223,7 +235,7 @@ export function getDetailEditRemoveOption() {
} }
//详情编辑放弃 //详情编辑关闭
export function getDetailGiveupOption() { export function getDetailGiveupOption() {
let option_detail_giveup = [{ let option_detail_giveup = [{
text: '详情', text: '详情',
@ -241,7 +253,23 @@ export function getDetailGiveupOption() {
return option_detail_giveup; return option_detail_giveup;
} }
//详情放弃
export function getDetailCloseOption() {
let option_detail_giveup = [{
text: '详情',
style: {
backgroundColor: '#3C9CFF'
}
},
{
text: '关闭',
style: {
backgroundColor: '#F56C6C'
}
}
];
return option_detail_giveup;
}
//详情编辑移除 //详情编辑移除
export function getEditRemoveOption() { export function getEditRemoveOption() {
@ -261,7 +289,23 @@ export function getEditRemoveOption() {
return option_edit_remove; return option_edit_remove;
} }
//详情编辑移除
export function getEditLocationRemoveOption() {
let option_edit_remove = [{
text: '修改\n库位',
style: {
backgroundColor: '#F1A532'
}
},
{
text: '移除',
style: {
backgroundColor: '#F56C6C'
}
}
];
return option_edit_remove;
}
// 库存状态字典项 // 库存状态字典项
export function getInventoryStatusArray() { export function getInventoryStatusArray() {
let array = [{ let array = [{

113
src/common/balance.js

@ -84,16 +84,19 @@ export function getPrecisionStrategyList(itemList, callback) {
}; };
getPrecisionStrategy(itemList).then(res => { getPrecisionStrategy(itemList).then(res => {
console.log(111, res.data)
if (res.data == null) { if (res.data == null) {
result.success = false result.success = false
result.message = '未查询到管理精度信息' result.message = '未查询到管理精度信息'
} else { } else {
result.list = res.data; result.list = res.data;
} }
console.log('haha', result)
callback(result); callback(result);
}).catch(error => { }).catch(error => {
result.success = false; result.success = false;
result.message = error; result.message = error;
console.log('hehe', result)
callback(result); callback(result);
}) })
} }
@ -105,7 +108,7 @@ export function getPrecisionStrategyList(itemList, callback) {
* @param {*} * @param {*}
* *
*/ */
export function getManagementPrecisions(itemCodes, locationCode, callback) { export async function getManagementPrecisions(itemCodes, locationCode, callback) {
// let jsonParem = JSON.stringify(param) // let jsonParem = JSON.stringify(param)
let result = { let result = {
list: [], list: [],
@ -113,11 +116,11 @@ export function getManagementPrecisions(itemCodes, locationCode, callback) {
message: '' message: ''
}; };
var params = { const params = {
itemCodes: itemCodes, itemCodes: itemCodes,
locationCode: locationCode locationCode: locationCode
} }
getManagementPrecision(params).then(res => { await getManagementPrecision(params).then(res => {
if (res.data == null) { if (res.data == null) {
result.success = false result.success = false
result.message = '未查询到管理精度信息' result.message = '未查询到管理精度信息'
@ -131,23 +134,75 @@ export function getManagementPrecisions(itemCodes, locationCode, callback) {
callback(result); callback(result);
}) })
} }
//通过父包装查询
export function getBalanceByManagementPrecisionByPacking(label, packageInfo,locationCode, fromInventoryStatuses, callback) {
let result = {
list: [],
success: true,
message: ''
};
let params = {
itemCodes: [label.itemCode],
locationCode: locationCode
};
// let jsonParem = JSON.stringify(param)
getManagementPrecision(params).then(res => {
let managementPrecision = res.data[0].ManagementPrecision;
switch (managementPrecision) {
case 'BY_PACKAGING':
byPacking(label, packageInfo,locationCode, fromInventoryStatuses, res => {
res.managementPrecision = managementPrecision;
callback(res);
});
break;
case 'BY_BATCH':
byBatch(label, locationCode, fromInventoryStatuses, res => {
res.managementPrecision = managementPrecision;
callback(res);
});
break;
case 'BY_QUANTITY':
byQuantity(label, locationCode, fromInventoryStatuses, res => {
res.managementPrecision = managementPrecision;
callback(res);
});
break;
case 'BY_UNIQUEID':
byUniqueId(label, fromInventoryStatuses, res => {
res.managementPrecision = managementPrecision;
callback(res);
});
break;
}
}).catch(error => {
let result = {
success: false,
message: error
};
callback(result);
})
}
export function getBalanceByManagementPrecision(label, locationCode, fromInventoryStatuses, callback) { export function getBalanceByManagementPrecision(label, locationCode, fromInventoryStatuses, callback) {
let result = { let result = {
list: [], list: [],
success: true, success: true,
message: '' message: ''
}; };
let params = { let params = {
itemCodes: [label.itemCode], itemCodes: [label.itemCode],
locationCode: locationCode locationCode: locationCode
}; };
// let jsonParem = JSON.stringify(param) // let jsonParem = JSON.stringify(param)
getManagementPrecision(params).then(res => { getManagementPrecision(params).then(res => {
console.log("成功" + res)
let managementPrecision = res.data[0].ManagementPrecision; let managementPrecision = res.data[0].ManagementPrecision;
switch (managementPrecision) { switch (managementPrecision) {
case 'BY_PACKAGING': case 'BY_PACKAGING':
byPacking(label, locationCode, fromInventoryStatuses, res => { byPacking(label, "", locationCode, fromInventoryStatuses, res => {
res.managementPrecision = managementPrecision; res.managementPrecision = managementPrecision;
callback(res); callback(res);
}); });
@ -172,6 +227,7 @@ export function getBalanceByManagementPrecision(label, locationCode, fromInvento
break; break;
} }
}).catch(error => { }).catch(error => {
console.log("失败" + error)
let result = { let result = {
success: false, success: false,
message: error message: error
@ -191,6 +247,20 @@ export function byPacking(label, locationCode, fromInventoryStatuses, callback)
data: {} data: {}
}; };
var filters = [] var filters = []
if (packageInfo&&packageInfo.parentNumber) {
var packingNumber = packageInfo.parentNumber + "," + label.packingNumber;
filters.push({
column: "packingNumber",
action: "in",
value: packingNumber
})
} else {
filters.push({
column: "packingNumber",
action: "==",
value: label.packingNumber
})
}
filters.push({ filters.push({
column: "packingNumber", column: "packingNumber",
action: "==", action: "==",
@ -211,11 +281,12 @@ export function byPacking(label, locationCode, fromInventoryStatuses, callback)
action: "==", action: "==",
value: locationCode value: locationCode
}) })
if (fromInventoryStatuses != null && fromInventoryStatuses != "") { if (fromInventoryStatuses) {
var status = fromInventoryStatuses.join(',');
filters.push({ filters.push({
column: "inventoryStatus", column: "inventoryStatus",
action: "in", action: "in",
value: fromInventoryStatuses value: status
}) })
} }
@ -266,7 +337,7 @@ export function byBatch(label, locationCode, fromInventoryStatuses, callback) {
filters.push({ filters.push({
column: "packingNumber", column: "packingNumber",
action: "==", action: "==",
value: null value: ''
}) })
filters.push({ filters.push({
column: "locationCode", column: "locationCode",
@ -274,11 +345,12 @@ export function byBatch(label, locationCode, fromInventoryStatuses, callback) {
value: locationCode value: locationCode
}) })
if (fromInventoryStatuses != null && fromInventoryStatuses != "") { if (fromInventoryStatuses) {
var status = fromInventoryStatuses.join(',');
filters.push({ filters.push({
column: "inventoryStatus", column: "inventoryStatus",
action: "in", action: "in",
value: fromInventoryStatuses value: status
}) })
} }
@ -324,7 +396,7 @@ export function byQuantity(label, locationCode, fromInventoryStatuses, callback)
data: {} data: {}
}; };
var filters = [] let filters = []
filters.push({ filters.push({
column: "itemCode", column: "itemCode",
action: "==", action: "==",
@ -332,13 +404,13 @@ export function byQuantity(label, locationCode, fromInventoryStatuses, callback)
}) })
filters.push({ filters.push({
column: "packingNumber", column: "packingNumber",
action: "==", action: "isStr",
value: null value: ''
}) })
filters.push({ filters.push({
column: "batch", column: "batch",
action: "==", action: "isStr",
value: null value: ''
}) })
filters.push({ filters.push({
column: "locationCode", column: "locationCode",
@ -346,11 +418,12 @@ export function byQuantity(label, locationCode, fromInventoryStatuses, callback)
value: locationCode value: locationCode
}) })
if (fromInventoryStatuses != null && fromInventoryStatuses != "") { if (fromInventoryStatuses) {
var status = fromInventoryStatuses.join(',');
filters.push({ filters.push({
column: "inventoryStatus", column: "inventoryStatus",
action: "in", action: "in",
value: fromInventoryStatuses value: status
}) })
} }
@ -393,19 +466,21 @@ export function byUniqueId(label, locationCode, fromInventoryStatuses, callback)
data: {} data: {}
}; };
var filters = [] let filters = []
filters.push({ filters.push({
column: "packingNumber", column: "packingNumber",
action: "==", action: "==",
value: label.packingNumber value: label.packingNumber
}) })
if (fromInventoryStatuses != null && fromInventoryStatuses != "") { if (fromInventoryStatuses) {
var status = fromInventoryStatuses.join(',');
filters.push({ filters.push({
column: "inventoryStatus", column: "inventoryStatus",
action: "in", action: "in",
value: fromInventoryStatuses value: status
}) })
} }
var params = { var params = {

177
src/common/basic.js

@ -7,7 +7,7 @@ import { calc } from '@/common/calc'
let jobStatusList = []; let jobStatusList = [];
let itemStatusList = []; let itemStatusList = [];
let locationTypeList = []; let locationAreaTypeList = [];
let uomList = []; let uomList = [];
let inventoryStatusList = []; let inventoryStatusList = [];
let containerTypeList = []; let containerTypeList = [];
@ -17,6 +17,8 @@ let unplannedReceiptReasonList = [];
let unplannedIissueReason = []; let unplannedIissueReason = [];
let scrapReasonList = []; let scrapReasonList = [];
let inspectFailedReasonList = []; let inspectFailedReasonList = [];
let switchList=[]
let businessList=[]
@ -24,7 +26,7 @@ let inspectFailedReasonList = [];
export function clearCacheData() { export function clearCacheData() {
jobStatusList = []; jobStatusList = [];
itemStatusList = []; itemStatusList = [];
locationTypeList = []; locationAreaTypeList = [];
uomList = []; uomList = [];
inventoryStatusList = []; inventoryStatusList = [];
containerTypeList = []; containerTypeList = [];
@ -34,6 +36,8 @@ export function clearCacheData() {
unplannedIissueReason = []; unplannedIissueReason = [];
scrapReasonList = []; scrapReasonList = [];
inspectFailedReasonList = []; inspectFailedReasonList = [];
switchList=[]
businessList = []
} }
@ -152,11 +156,11 @@ export function getItemStateInfo(value) {
//获取库位类型 //获取库位类型
export function getLocationTypeInfo(value) { export function getLocationTypeInfo(value) {
var resultInfo = ""; var resultInfo = "";
if (locationTypeList.length == 0) { if (locationAreaTypeList.length == 0) {
locationTypeList = getDirectoryInfo("location_type") locationAreaTypeList = getDirectoryInfo("location_type")
} }
if (locationTypeList.length > 0) { if (locationAreaTypeList.length > 0) {
for (let item of locationTypeList) { for (let item of locationAreaTypeList) {
if (item.value == value) { if (item.value == value) {
resultInfo = item resultInfo = item
break; break;
@ -174,7 +178,7 @@ export function getLocationTypeName(value) {
} }
//获取计量单位 //获取计量单位
export function getUnitInfo(value) { export function getUomInfo(value) {
var resultInfo = ""; var resultInfo = "";
if (uomList.length == 0) { if (uomList.length == 0) {
uomList = getDirectoryInfo("uom") uomList = getDirectoryInfo("uom")
@ -191,7 +195,7 @@ export function getUnitInfo(value) {
} }
//获取包装单位 //获取包装单位
export function getStdPackUnitInfo(value) { export function getPackUnitInfo(value) {
var resultInfo = ""; var resultInfo = "";
if (packUnitList.length == 0) { if (packUnitList.length == 0) {
packUnitList = getDirectoryInfo("pack_unit") packUnitList = getDirectoryInfo("pack_unit")
@ -335,6 +339,39 @@ export function getInspectReasonList(value) {
return inspectFailedReasonList return inspectFailedReasonList
} }
//获取单据开关
export function getSwitchInfoByCode(code) {
var isCheck = false
var resultInfo = ""
switchList = uni.getStorageSync("switch")
for (let item of switchList) {
if (item.code == code) {
resultInfo = item
break;
}
}
isCheck = resultInfo.effectiveSetValue == "TRUE" ? true : false
return isCheck;
}
//获取业务类型名称
export function getBusinessTypeName(code) {
var resultInfo = null
if (businessList.length == 0) {
businessList = uni.getStorageSync("businessType")
}
for (let item of businessList) {
if (item.code == code) {
resultInfo = item
break;
}
}
return resultInfo.name;
}
// //数量状态 // //数量状态
// export function getCoutJobStatuStyle(val) { // export function getCoutJobStatuStyle(val) {
@ -688,23 +725,29 @@ export function getPackingNumberAndBatch(managementList, itemCode, packingNumber
return itemInfo; return itemInfo;
} }
// //提示是否消息 // 提示是否消息
// export function showConfirmMsg(content, callback) { export function showConfirmMsg(content, callback) {
// uni.showModal({ uni.showModal({
// title: '提示', title: '提示',
// cancelText: '否', cancelText: '否',
// confirmText: '是', confirmText: '是',
// content: content, content: content,
// success: function(res) { success: function(res) {
// if (res.confirm) { if (res.confirm) {
// callback(true); callback(true);
// } else { } else {
// callback(false); callback(false);
// } }
// }, },
// }) })
// scanErrorAudio(); }
// } export function compare(key) {
return function(a, b) {
var val1 = a[key];
var val2 = b[key];
return val2 - val1;
}
}
export function compareTime() { export function compareTime() {
return function(a, b) { return function(a, b) {
@ -813,7 +856,74 @@ export function getBatch() {
var batch = year.toString() + month.toString() + day.toString() var batch = year.toString() + month.toString() + day.toString()
return batch; return batch;
} }
//20270717
export function getBatch8() {
var date = new Date();
//获取日期部分
var year = date.getFullYear(); //年
var month = date.getMonth() + 1; //月
var day = date.getDate(); //日
month = month < 10 ? "0" + month : month;
day = day < 10 ? "0" + day : day;
return year + month + day;
}
/**
* 获取前几天和后几天的日期 2024-07-07
*/
export function lastThreeDays(grapDay) {
let dates = [];
for (let i = grapDay; i >= 0; i--) {
// 创建新的Date对象,并减去i天
let date = new Date();
date.setDate(date.getDate() - i);
// 将格式化的日期字符串添加到数组中
dates.push(formatDate(date));
}
for (let i = 0; i <grapDay; i++) {
// 创建新的Date对象,并减去i天
let date = new Date();
date.setDate(date.getDate() + (i+1));
// 将格式化的日期字符串添加到数组中
dates.push(formatDate(date));
}
return dates;
}
//20240702
export function formatDate(date) {
const year = date.getFullYear();
const month = (date.getMonth() + 1).toString().padStart(2, '0');
const day = date.getDate().toString().padStart(2, '0');
return `${year}-${month}-${day}`;
}
export function getBeforeDayDate(grapDay) {
const today = new Date();
var resultList = []
//获取前几天
var beforeList = []
var afterList = []
for (var i = 0; i < grapDay; i++) {
beforeList.push(today.getDate() - (i + 1))
}
//获取后几天
var afterList = []
for (var i = 0; i < grapDay; i++) {
afterList.push(today.getDate() + (i + 1))
}
resultList.concat(beforeList)
resultList.push(today)
resultList.concat(afterList)
return resultList;
}
export function getCurrDate() { export function getCurrDate() {
var date = new Date(); var date = new Date();
return getDate(date); return getDate(date);
@ -839,6 +949,15 @@ export function dateFormat(time) {
return result; return result;
} }
export function dateFormatData(time) {
var result = ""
if (time != null) {
let date = new Date(time);
result = getDate(date);
}
return result;
}
//获取日期部分 //获取日期部分
export function getDate(date) { export function getDate(date) {
@ -957,8 +1076,8 @@ export function createItemInfo(res) {
let item = { let item = {
itemCode: res.itemCode, itemCode: res.itemCode,
itemName: res.itemName, itemName: res.itemName,
stdPackQty: Number(res.stdPackQty), packQty: Number(res.packQty),
stdPackUnit: res.stdPackUnit, packUnit: res.packUnit,
qty: Number(res.qty), qty: Number(res.qty),
handleQty: 0, handleQty: 0,
uom: res.uom, uom: res.uom,
@ -1012,3 +1131,7 @@ export function deepCopyData(target) {
return cloneTarget; return cloneTarget;
} }
//数组去重重复数据
export function uniqueArray(arr) {
return arr.filter((item, index, self) => self.indexOf(item) === index);
}

10
src/common/calc.js

@ -1,16 +1,24 @@
/* 解决js计算精度问题 */ /* 解决js计算精度问题 */
import { Decimal } from 'decimal.js';//引入 import Decimal from 'decimal.js'
class Calc { class Calc {
add(num1,num2) { add(num1,num2) {
num1 = num1 || 0
num2 = num2 || 0
return new Decimal(num1).add(new Decimal(num2)).toNumber() return new Decimal(num1).add(new Decimal(num2)).toNumber()
} }
sub(num1,num2) { sub(num1,num2) {
num1 = num1 || 0
num2 = num2 || 0
return new Decimal(num1).sub(new Decimal(num2)).toNumber() return new Decimal(num1).sub(new Decimal(num2)).toNumber()
} }
mul(num1,num2) { mul(num1,num2) {
num1 = num1 || 0
num2 = num2 || 0
return new Decimal(num1).mul(new Decimal(num2)).toNumber() return new Decimal(num1).mul(new Decimal(num2)).toNumber()
} }
div(num1,num2) { div(num1,num2) {
num1 = num1 || 0
num2 = num2 || 0
return new Decimal(num1).div(new Decimal(num2)).toNumber() return new Decimal(num1).div(new Decimal(num2)).toNumber()
} }
} }

159
src/common/detail.js

@ -2,7 +2,90 @@ import {
calc calc
} from '@/common/calc' } from '@/common/calc'
import { Decimal } from 'decimal.js';//引入 import {
Decimal
} from 'decimal.js'; //引入
export function getTreeDataSource(dataList) {
let items = [];
let parentList = dataList.filter(r => r.parentPackingNumber == null || r
.parentPackingNumber == '');
let childList = dataList.filter(r => r.parentPackingNumber != '' && r.parentPackingNumber != null);
parentList.forEach(detail => {
var item = items.find(r =>
r.itemCode == detail.itemCode)
if (item == undefined) {
item = createItemInfo(detail);
let newDetail = createDetailInfo(detail); //
item.subList.push(newDetail);
items.push(item)
} else {
item.qty = calc.add(item.qty, detail.qty)
let newDetail = createDetailInfo(detail); //
item.subList.push(newDetail);
}
})
if (childList.length > 0) {
items.forEach(r =>
r.subList.forEach(s => {
s.packList = childList.filter(c => c.parentPackingNumber == s.packingNumber)
s.packList.forEach(pac => {
pac.scaned = false;
pac.scanDate = new Date();
})
})
)
}
return items;
}
export function getThreeDataSource(data) {
let items = []
let obj ={
...data.subList[0]
}
console.log(12)
data.subList.forEach((item)=>{
item.threeList = [{
fromLocationCode:item.fromLocationCode,
batch:item.batch,
handleQty:0,
qty:item.qty,
inventoryStatus:item.inventoryStatus,
toLocationCode:item.toLocationCode,
}]
item.packList=[{
scaned : false,
scanDate: new Date()
}]
})
obj.subList = data.subList
items.push(obj)
return items;
}
export function getDataSourceBatch(subList) {
let items = [];
subList.forEach(detail => {
var item = items.find(r =>
r.itemCode == detail.itemCode )
if (item == undefined) {
item = createItemInfo(detail);
let newDetail = createDetailInfo(detail); //
item.subList.push(newDetail);
items.push(item)
} else {
item.qty = calc.add(item.qty, detail.qty)
let newDetail = createDetailInfo(detail); //
item.subList.push(newDetail);
}
})
return items;
}
export function getDataSource(subList) { export function getDataSource(subList) {
let items = []; let items = [];
subList.forEach(detail => { subList.forEach(detail => {
@ -26,8 +109,8 @@ import { Decimal } from 'decimal.js';//引入
let item = { let item = {
itemCode: detail.itemCode, itemCode: detail.itemCode,
itemName: detail.itemName, itemName: detail.itemName,
stdPackQty: Number(detail.stdPackQty) || undefined, packQty: Number(detail.packQty) || undefined,
stdPackUnit: detail.stdPackUnit, packUnit: detail.packUnit,
qty: Number(detail.qty), qty: Number(detail.qty),
handleQty: 0, handleQty: 0,
uom: detail.uom, uom: detail.uom,
@ -38,8 +121,9 @@ import { Decimal } from 'decimal.js';//引入
export function createDetailInfo(data) { export function createDetailInfo(data) {
data.scaned = false; data.scaned = false;
// data.record = {}; data.scanDate = new Date();
let detail = data; let detail = data;
detail.packList = [];
return detail; return detail;
} }
@ -59,17 +143,82 @@ import { Decimal } from 'decimal.js';//引入
//计算实际数量 //计算实际数量
export function calcHandleQty(detailSource) { export function calcHandleQty(detailSource) {
for (let item of detailSource) {
item.handleQty = new Decimal(0).toNumber();
item.qty = new Decimal(0).toNumber();
for (let detail of item.subList) {
if (detail != undefined) {
if (detail.scaned) {
item.handleQty = calc.add(item.handleQty, detail.handleQty);
}
item.qty = calc.add(item.qty, detail.qty);
}
}
}
}
//计算计划外入库实际数量和任务数量
export function calcHandleQtyPlanOut(detailSource) {
for (let item of detailSource) {
item.handleQty = new Decimal(0).toNumber();
item.qty = new Decimal(0).toNumber();
for (let detail of item.subList) {
if (detail != undefined) {
if (detail.scaned) {
item.handleQty = calc.add(item.handleQty, detail.handleQty);
}
console.log(detail.isRecommend)
if(detail.isRecommend){
item.qty = calc.add(item.qty, detail.qty);
}
}
}
}
}
//计算推荐和扫描的不是用一个的数量
export function calcHandleNewQty(detailSource) {
for (let item of detailSource) { for (let item of detailSource) {
item.handleQty = new Decimal(0).toNumber(); item.handleQty = new Decimal(0).toNumber();
// item.qty = new Decimal(0).toNumber(); // item.qty = new Decimal(0).toNumber();
for (let detail of item.subList) { for (let detail of item.subList) {
if (detail != undefined && detail.scaned) { if (detail ) {
if (!detail.isRecommend && detail.scaned) {
item.handleQty = calc.add(item.handleQty, detail.handleQty); item.handleQty = calc.add(item.handleQty, detail.handleQty);
}
// if (!detail.isRecommend ) {
// item.qty = calc.add(item.qty, detail.qty); // item.qty = calc.add(item.qty, detail.qty);
// }
}
}
}
}
export function calcTreeHandleQty(detailSource) {
for (let item of detailSource) {
item.handleQty = new Decimal(0).toNumber();
for (let detail of item.subList) {
if (detail) {
if (detail.packList && detail.packList.length > 0) {
detail.handleQty = new Decimal(0).toNumber();
for (let pack of detail.packList) {
if (pack && pack.scaned) {
detail.handleQty = calc.add(detail.handleQty, pack.handleQty);
}
} }
}else{
detail.handleQty = new Decimal(0).toNumber();
}
if(detail.handleQty){
item.handleQty = calc.add(item.handleQty, detail.handleQty);
} }
} }
} }
}
}
export function getScanCount(subList) { export function getScanCount(subList) {

181
src/common/directory.js

@ -1,4 +1,5 @@
let jobStatusList = []; let jobStatusList = [];
let receiveStatusList = [];
let itemStatusList = []; let itemStatusList = [];
let itemTypeList =[]; let itemTypeList =[];
let locationTypeList = []; let locationTypeList = [];
@ -6,6 +7,7 @@ let uomList = [];
let inventoryStatusList = []; let inventoryStatusList = [];
let containerTypeList = []; let containerTypeList = [];
let packUnitList = []; let packUnitList = [];
let packUnitInfoList = [];
let requestStatusList = []; let requestStatusList = [];
let unplannedReceiptReasonList = []; let unplannedReceiptReasonList = [];
let unplannedIssueReasonList = []; let unplannedIssueReasonList = [];
@ -18,8 +20,10 @@ let inspectTypeList = [];
let sampleMethodList = []; let sampleMethodList = [];
let transferModeList = []; let transferModeList = [];
let countStageList = []; let countStageList = [];
let locationAreaTypeList = [];
let businessList=[];
let countScopeTypeList = [];
let priorityList = []
@ -39,6 +43,7 @@ export function getBusinessTypeDesc(type) {
//获取字典信息 //获取字典信息
export function clearCacheData() { export function clearCacheData() {
jobStatusList = []; jobStatusList = [];
receiveStatusList=[];
itemStatusList = []; itemStatusList = [];
itemTypeList =[]; itemTypeList =[];
locationTypeList = []; locationTypeList = [];
@ -46,6 +51,7 @@ export function clearCacheData() {
inventoryStatusList = []; inventoryStatusList = [];
containerTypeList = []; containerTypeList = [];
packUnitList = []; packUnitList = [];
packUnitInfoList = [];
requestStatusList = []; requestStatusList = [];
unplannedReceiptReasonList = []; unplannedReceiptReasonList = [];
unplannedIssueReasonList = []; unplannedIssueReasonList = [];
@ -58,6 +64,10 @@ export function clearCacheData() {
sampleMethodList = []; sampleMethodList = [];
transferModeList = []; transferModeList = [];
countStageList = []; countStageList = [];
locationAreaTypeList=[];
businessList=[];
countScopeTypeList = []
priorityList = []
} }
//获取字典信息 //获取字典信息
@ -131,6 +141,22 @@ export function getJobStateInfo(value) {
return resultInfo return resultInfo
} }
export function getReceiveStateInfo(value) {
var resultInfo = "";
if (receiveStatusList.length == 0) {
receiveStatusList = getDirectoryInfo("receive_status")
}
if (receiveStatusList.length > 0) {
for (let item of receiveStatusList) {
if (item.value == value) {
resultInfo = item
break;
}
}
}
return resultInfo
}
//获取任务状态样式 //获取任务状态样式
export function getJobStateStyle(value) { export function getJobStateStyle(value) {
let item = getJobStateInfo(value); let item = getJobStateInfo(value);
@ -145,6 +171,16 @@ export function getJobStateStyle(value) {
} }
} }
//获取库区描述(多个库区)
export function getListLocationAreaTypeDesc(list) {
let desc = '';
list.forEach(res => {
desc += getLocationAreaTypeInfo(res).label + ","
})
desc = desc.slice(0, -1);
return desc;
}
//获取库位描述(多个库位) //获取库位描述(多个库位)
export function getListLocationTypeDesc(list) { export function getListLocationTypeDesc(list) {
let desc = ''; let desc = '';
@ -175,7 +211,15 @@ export function getListItemTypeDesc(list) {
desc = desc.slice(0, -1); desc = desc.slice(0, -1);
return desc; return desc;
} }
//获取物品状态(多个)
export function getListItemStatusDesc(list) {
let desc = '';
list.forEach(res => {
desc += getItemStateInfo(res).label + ","
})
desc = desc.slice(0, -1);
return desc;
}
//获取物品类型 //获取物品类型
export function getItemTypeInfo(value) { export function getItemTypeInfo(value) {
var resultInfo = ""; var resultInfo = "";
@ -213,6 +257,38 @@ export function getItemStateInfo(value) {
return resultInfo return resultInfo
} }
//获取业务类型名称
export function getBusinessTypeName(code) {
var resultInfo = null
if (businessList.length == 0) {
businessList = uni.getStorageSync("businessType")
}
for (let item of businessList) {
if (item.code == code) {
resultInfo = item
break;
}
}
return resultInfo.name;
}
//获取库区类型
export function getLocationAreaTypeInfo(value) {
var resultInfo = "";
if (locationAreaTypeList.length == 0) {
locationAreaTypeList = getDirectoryInfo("area_type")
}
if (locationAreaTypeList.length > 0) {
for (let item of locationAreaTypeList) {
if (item.value == value) {
resultInfo = item
break;
}
}
}
return resultInfo
}
//获取库位类型 //获取库位类型
export function getLocationTypeInfo(value) { export function getLocationTypeInfo(value) {
var resultInfo = ""; var resultInfo = "";
@ -229,6 +305,26 @@ export function getLocationTypeInfo(value) {
} }
return resultInfo return resultInfo
} }
//获取库区类型名称
export function getLocationAreaTypeName(value) {
let location = getLocationAreaTypeInfo(value);
return location == '' ? value : location.label;
}
//获取物品类型名称
export function getItemTypeName(value) {
let location = getItemTypeInfo(value);
return location == '' ? value : location.label;
}
//获取物品状态名称
export function getItemStatusName(value) {
let location = getItemStateInfo(value);
return location == '' ? value : location.label;
}
//获取库位类型名称 //获取库位类型名称
export function getLocationTypeName(value) { export function getLocationTypeName(value) {
@ -249,7 +345,7 @@ export function getLocationTypeNameList(lst) {
} }
//获取计量单位 //获取计量单位
export function getUnitInfo(value) { export function getUomInfo(value) {
var resultInfo = ""; var resultInfo = "";
if (uomList.length == 0) { if (uomList.length == 0) {
uomList = getDirectoryInfo("uom") uomList = getDirectoryInfo("uom")
@ -264,9 +360,25 @@ export function getUnitInfo(value) {
} }
return resultInfo return resultInfo
} }
//获取盘点范围类型
export function getCountScopeType(value) {
var resultInfo = "";
if (countStageList.length == 0) {
countStageList = getDirectoryInfo("count_scope_type")
}
if (countStageList.length > 0) {
for (let item of countStageList) {
if (item.value == value) {
resultInfo = item
break;
}
}
}
return resultInfo
}
//获取包装单位 //获取包装单位
export function getStdPackUnitInfo(value) { export function getPackUnitInfo(value) {
var resultInfo = ""; var resultInfo = "";
if (packUnitList.length == 0) { if (packUnitList.length == 0) {
packUnitList = getDirectoryInfo("pack_unit") packUnitList = getDirectoryInfo("pack_unit")
@ -298,7 +410,13 @@ export function getRequestStateInfo(value) {
} }
return resultInfo return resultInfo
} }
//获取库存状态集合
export function getInventoryStatusList() {
if (inventoryStatusList.length == 0) {
inventoryStatusList = getDirectoryInfo("inventory_status")
}
return inventoryStatusList
}
//获取库存状态 //获取库存状态
export function getInventoryStatusInfo(value) { export function getInventoryStatusInfo(value) {
@ -514,3 +632,54 @@ export function getCountStageName(value) {
} }
return resultInfo return resultInfo
} }
//获取包装规格
export function getPackUnitName(value) {
var resultInfo = "";
if (packUnitInfoList.length == 0) {
packUnitInfoList = uni.getStorageSync('packunit');
}
if (packUnitInfoList.length > 0) {
for (let item of packUnitInfoList) {
if (item.code == value) {
resultInfo = item.name
break;
}
}
}
return resultInfo
}
//获取优先级
export function getPriorityName(value) {
// console.log(344,value)
var resultInfo = "";
if (priorityList.length == 0) {
priorityList = getDirectoryInfo("priority")
}
// console.log(455,priorityList)
if (priorityList.length > 0) {
for (let item of priorityList) {
if (item.value == value) {
resultInfo = item.label
break;
}
}
}
return resultInfo
}
//获取优先级
export function getDeliverMethod(value) {
var resultInfo = "";
if (priorityList.length == 0) {
priorityList = getDirectoryInfo("deliver_method")
}
if (priorityList.length > 0) {
for (let item of priorityList) {
if (item.value == value) {
resultInfo = item.label
break;
}
}
}
return resultInfo
}

107
src/common/label.js

@ -2,18 +2,19 @@ let labelDic = [];
import { import {
getLabelByHeader, getLabelByHeader,
getPackageByNumber getPackageListByNumber
} from '../api/request2.js'; } from '@/api/request2.js';
import { import {
checkDirectoryItemExist, checkDirectoryItemExist,
getDirectoryItemArray getDirectoryItemArray
} from '../common/directory.js'; } from '@/common/directory.js';
import {
getManagementPrecisions
} from '@/common/balance.js';
export function getLabelInfo(scanMsg,headerType, callBack) { export function getLabelInfo(scanMsg,headerType, callBack,locationCode,isHavePackNumber) {
console.log('扫描信息:', scanMsg);
if (scanMsg.length == 0) { if (scanMsg.length == 0) {
return null return null
} }
@ -41,29 +42,32 @@ export function getLabelInfo(scanMsg,headerType, callBack) {
let type = header.substring(header.length - 1, header.length); let type = header.substring(header.length - 1, header.length);
if (type == 'Q') //qrcode if (type == 'Q') //qrcode
{ {
getQRCodeInfo(header, version, scanMsg, callBack); getQRCodeInfo(header, version, scanMsg, callBack,locationCode,isHavePackNumber);
} else if (type == 'B') //barcode
{
getBarCodeInfo(header, version, items[2], callBack);
} else { //直接输入文本
getBarCodeInfo('text', 'V1.0', scanMsg, callBack);
} }
}else { // else if (type == 'B') //barcode
let labelResult = { // {
label: { // getBarCodeInfo(header, version, items[2], callBack);
labelType: "", // }
barType: '', else { //直接输入文本
code:"" getBarCodeInfo('text', 'V1.0', scanMsg, callBack,locationCode,isHavePackNumber);
},
package: null,
success: false,
message: '标签格式不正确',
} }
callBack(labelResult); }else {
getBarCodeInfo('text', 'V1.0', scanMsg, callBack,locationCode,isHavePackNumber);
// let labelResult = {
// label: {
// labelType: "",
// barType: '',
// code:""
// },
// package: null,
// success: false,
// message: '标签格式不正确',
// }
// callBack(labelResult);
} }
} }
export function getQRCodeInfo(header, version, scanMsg, callBack) { export function getQRCodeInfo(header, version, scanMsg, callBack,locationCode,isHavePackNumber) {
//获取包装信息 //获取包装信息
let labelItem = labelDic.find(r => r.header == header && r.version == version); let labelItem = labelDic.find(r => r.header == header && r.version == version);
if (labelItem == undefined) { if (labelItem == undefined) {
@ -88,7 +92,7 @@ export function getQRCodeInfo(header, version, scanMsg, callBack) {
}; };
labelDic.push(newItem); labelDic.push(newItem);
getLabelItems(newItem, scanMsg, callBack); getLabelItems(newItem, scanMsg, callBack,locationCode,isHavePackNumber);
} }
}).catch(err => { }).catch(err => {
labelResult.success = false; labelResult.success = false;
@ -96,24 +100,40 @@ export function getQRCodeInfo(header, version, scanMsg, callBack) {
callBack(err); callBack(err);
}) })
} else { } else {
getLabelItems(labelItem, scanMsg, callBack); getLabelItems(labelItem, scanMsg, callBack,locationCode,isHavePackNumber);
} }
} }
export function getLabelItems(labelItem, scanMsg, callBack) { export async function getLabelItems(labelItem, scanMsg, callBack,locationCode) {
let managementType = ""
let labelResult = analysisQRCodeLabel(labelItem, scanMsg); let labelResult = analysisQRCodeLabel(labelItem, scanMsg);
if (labelResult.label.labelType == 'PurchaseLabel' || labelResult.label.labelType == 'MakeLabel') { if (labelResult.label.labelType == 'PurchaseLabel' || labelResult.label.labelType == 'MakeLabel') {
//查询包装信息 //查询包装信息
let packingNumber = labelResult.label.packingNumber let packingNumber = labelResult.label.packingNumber
if (packingNumber != undefined) { let packingNumber1 = labelResult.label.packingNumber//记录单号
getPackageByNumber(packingNumber).then(pack => { if(locationCode){
if (pack.data.list.length == 0) { await getManagementPrecisions([labelResult.label.itemCode], locationCode, res => {
if (res.success) {
const managementList = res.list;
managementType = managementList&&managementList[0]&&managementList[0].ManagementPrecision ? managementList[0].ManagementPrecision :'BY_PACKAGING'
if(managementType == 'BY_BATCH' || managementType == 'BY_QUANTITY'){
if(!isHavePackNumber){
packingNumber = ''
}
}
}
})
}
if (packingNumber != undefined && packingNumber != '') {
await getPackageListByNumber(packingNumber).then(pack => {
if (pack.data.reqPackage) {
labelResult.package = pack.data.reqPackage;
labelResult.package.subList = pack.data.subList;
} else {
labelResult.success = false; labelResult.success = false;
labelResult.message = '包装号[' + packingNumber + ']没有包装信息'; labelResult.message = '包装号[' + packingNumber + ']没有包装信息';
} else {
labelResult.package = pack.data.list[0];
console.log('包装信息', JSON.stringify(labelResult.package))
} }
labelResult.managementType = managementType
callBack(labelResult); callBack(labelResult);
}).catch(err => { }).catch(err => {
labelResult.success = false; labelResult.success = false;
@ -121,9 +141,14 @@ export function getLabelItems(labelItem, scanMsg, callBack) {
callBack(labelResult); callBack(labelResult);
}) })
} else { } else {
labelResult.success = false; labelResult.package = labelResult.label;
labelResult.message = '在条码中未解析到箱码'; labelResult.package.number = packingNumber1 ? packingNumber1 : ''
labelResult.package.packingNumber=''
labelResult.managementType = managementType
callBack(labelResult); callBack(labelResult);
// labelResult.success = false;
// labelResult.message = '在条码中未解析到箱码';
// callBack(labelResult);
} }
} else { } else {
callBack(labelResult); callBack(labelResult);
@ -153,8 +178,15 @@ export function analysisQRCodeLabel(labelItem, scanMsg) {
let scanItems = scanMsg.split(separators); let scanItems = scanMsg.split(separators);
if (scanItems.length > 0) { if (scanItems.length > 0) {
scanItems.forEach((item, index) => { scanItems.forEach((item, index) => {
let type = item.substring(0, 1); let type = ''
let value = item.substring(1, item.length); let value = ''
if(item.includes('PU')||item.includes('PQ')){
type = item.substring(0, 2);
value = item.substring(2, item.length);
}else{
type = item.substring(0, 1);
value = item.substring(1, item.length);
}
if (type == 'H') { if (type == 'H') {
labelResult.label.header = item; labelResult.label.header = item;
} else if (type == 'V') { } else if (type == 'V') {
@ -175,7 +207,6 @@ export function analysisQRCodeLabel(labelItem, scanMsg) {
} }
} }
// console.log('标签', labelResult.label)
return labelResult; return labelResult;
} }

91
src/common/record.js

@ -15,13 +15,14 @@ export function createItemInfo(balance, pack) {
let item = { let item = {
itemCode: pack.itemCode, itemCode: pack.itemCode,
itemName: pack.itemName, itemName: pack.itemName,
stdPackQty: pack.stdPackQty, packQty: pack.packQty,
stdPackUnit: pack.stdPackUnit, packUnit: pack.packUnit,
qty: new Decimal(balance.qty).toNumber(), qty: new Decimal(balance.qty).toNumber(),
handleQty: new Decimal(0).toNumber(), handleQty: new Decimal(0).toNumber(),
uom: pack.uom, uom: pack.uom,
subList: [] subList: []
} }
item.containerNumber = pack.parentNumber ? pack.parentNumber : pack.number;
return item; return item;
} }
@ -32,21 +33,56 @@ export function createDetailInfo(balance, pack) {
let detail = deepCopyData(balance); let detail = deepCopyData(balance);
detail.balanceQty = new Decimal(detail.qty).toNumber() detail.balanceQty = new Decimal(detail.qty).toNumber()
detail.qty = new Decimal(detail.qty).toNumber(); detail.qty = new Decimal(detail.qty).toNumber();
detail.stdPackQty = new Decimal(pack.stdPackQty).toNumber() detail.packQty = pack.packQty ? new Decimal(pack.packQty).toNumber() : 0
detail.stdPackUnit = pack.stdPackUnit detail.packUnit = pack.packUnit
detail.handleQty = new Decimal(detail.qty).toNumber() ; detail.handleQty = new Decimal(detail.qty).toNumber() ;
detail.package = pack; detail.package = pack;
detail.productionlineCode = pack.productionLineCode; // 制品回收记录需要加的
detail.toInventoryStatus = balance.inventoryStatus; // 制品回收记录需要加的
return detail; return detail;
} }
export function createDetailInfoForLabel(balance, pack,label) {
balance.scaned = true;
// data.toInventoryStatus = this.toInventoryStatus == "" ? data.inventoryStatus : this.toInventoryStatus;
// data.inventoryStatus = data.inventoryStatus;
let detail = deepCopyData(balance);
detail.balanceQty = new Decimal(detail.qty).toNumber()
detail.qty = new Decimal(detail.qty).toNumber();
detail.packQty = pack.packQty ? new Decimal(pack.packQty).toNumber() : 0
detail.packUnit = pack.packUnit
console.log(988,label.qty)
detail.handleQty = new Decimal(label.qty).toNumber();
detail.package = pack;
detail.productionlineCode = pack.productionLineCode; // 制品回收记录需要加的
detail.toInventoryStatus = balance.inventoryStatus; // 制品回收记录需要加的
return detail;
}
export function createDetailByPackInfo(pack) {
// data.toInventoryStatus = this.toInventoryStatus == "" ? data.inventoryStatus : this.toInventoryStatus;
// data.inventoryStatus = data.inventoryStatus;
let detail = deepCopyData(pack); detail.scaned = true;
detail.balanceQty = new Decimal(detail.qty).toNumber()
detail.qty = new Decimal(detail.qty).toNumber();
detail.packQty = pack.packQty ? new Decimal(pack.packQty).toNumber() : 0
detail.packUnit = pack.packUnit
detail.handleQty = new Decimal(detail.qty).toNumber();
detail.package = pack;
return detail;
}
//计算实际数量 //计算实际数量
export function calcHandleQty(detailSource) { export function calcHandleQty(detailSource) {
for (let item of detailSource) { for (let item of detailSource) {
console.log('qqqqqqqqq')
item.handleQty = new Decimal(0).toNumber(); item.handleQty = new Decimal(0).toNumber();
item.qty = new Decimal(0).toNumber(); item.qty = new Decimal(0).toNumber();
console.log('bbbbbb')
for (let detail of item.subList) { for (let detail of item.subList) {
if(detail!=undefined){ if(detail!=undefined){
console.log(detail)
if(detail.scaned){ if(detail.scaned){
item.handleQty = calc.add(item.handleQty,detail.handleQty); item.handleQty = calc.add(item.handleQty,detail.handleQty);
} }
@ -55,14 +91,48 @@ export function calcHandleQty(detailSource) {
} }
} }
} }
//添加数量
export function calcHandleQtyAdd(detailSource,label) {
for (let item of detailSource) {
item.handleQty = item.handleQty || new Decimal(0).toNumber();
item.qty = item.qty|| new Decimal(0).toNumber();
item.handleQty = calc.add(item.handleQty, label.qty);
for (let detail of item.subList) {
if (detail != undefined) {
if (detail.scaned) {
detail.handleQty = calc.add(detail.handleQty, label.qty);
}
// item.qty = calc.add(item.qty, detail.qty);
}
}
}
}
export function calcTreeHandleQty(detailSource) {
for (let item of detailSource) {
item.handleQty = new Decimal(0).toNumber();
for (let detail of item.subList) {
if (detail != undefined && detail.scaned) {
detail.handleQty = new Decimal(0).toNumber();
for (let pack of detail.packList){
if(pack!=undefined&&pack.scaned){
detail.handleQty = calc.add(detail.handleQty, pack.handleQty);
}
}
item.handleQty = calc.add(item.handleQty, detail.handleQty);
}
}
}
}
export function getBusinessType(typeCode, callback) { export function getBusinessType(typeCode, callback) {
let result = { let result = {
success: true, success: true,
businessType: '', businessType: '',
fromlocationTypeList: '', fromLocationAreaTypeList:'',
tolocationTypeList: '', toLocationAreaTypeList:'',
itemCodeTypeList:"", itemTypeList: "",
itemStatusList:"",
useOnTheWay:"FALSE", useOnTheWay:"FALSE",
fromInventoryStatuses: '', fromInventoryStatuses: '',
toInventoryStatuses: '', toInventoryStatuses: '',
@ -71,9 +141,10 @@ export function getBusinessType(typeCode, callback) {
getBusinesstypeByCode(typeCode).then(res => { getBusinesstypeByCode(typeCode).then(res => {
if (res.data.total > 0) { if (res.data.total > 0) {
result.businessType = res.data.list[0]; result.businessType = res.data.list[0];
result.fromlocationTypeList = getDirectoryItemArray(res.data.list[0].outLocationTypes) result.fromLocationAreaTypeList = getDirectoryItemArray(res.data.list[0].outAreaTypes) ;
result.tolocationTypeList = getDirectoryItemArray(res.data.list[0].inLocationTypes) result.toLocationAreaTypeList = getDirectoryItemArray(res.data.list[0].inAreaTypes) ;
result.itemCodeTypeList = getDirectoryItemArray(res.data.list[0].itemTypes) result.itemTypeList = getDirectoryItemArray(res.data.list[0].itemTypes)
result.itemStatusList =getDirectoryItemArray(res.data.list[0].itemStatuses)
result.fromInventoryStatuses = res.data.list[0].outInventoryStatuses; result.fromInventoryStatuses = res.data.list[0].outInventoryStatuses;
result.toInventoryStatuses = res.data.list[0].inInventoryStatuses; result.toInventoryStatuses = res.data.list[0].inInventoryStatuses;
result.useOnTheWay =res.data.list[0].useOnTheWay result.useOnTheWay =res.data.list[0].useOnTheWay

236
src/common/style/new_style.css

@ -62,6 +62,10 @@ uni-page-head .uni-page-head__title {
font-size: 1.125rem; font-size: 1.125rem;
} }
.font_default {
font-size: 1rem;
}
.margin_top { .margin_top {
margin-top: 20rpx; margin-top: 20rpx;
} }
@ -180,18 +184,20 @@ uni-page-head .uni-page-head__title {
text-align: center; text-align: center;
box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.2); box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.2);
opacity: 0.8; opacity: 0.8;
display: flex;
align-items: center;
justify-content: center;
flex-direction: column;
} }
.scan_float image { .scan_float image {
width: 40rpx; width: 40rpx;
height: 40rpx; height: 40rpx;
margin-top: 10rpx;
} }
.scan_float view { .scan_float view {
color: #fff; color: #fff;
font-size: .725rem; font-size: .725rem;
margin-top: -8rpx;
} }
.top_card { .top_card {
@ -212,9 +218,10 @@ uni-page-head .uni-page-head__title {
.cen_card { .cen_card {
padding: 0 0rpx; padding: 0 0rpx;
width: 100%;
box-sizing: border-box; box-sizing: border-box;
float: left; background:#EEF4FA;
padding:20rpx;
border-radius: 10rpx;
} }
.cell_box { .cell_box {
@ -227,6 +234,7 @@ uni-page-head .uni-page-head__title {
padding: 0 20rpx; padding: 0 20rpx;
/* margin: 0 0 20rpx; */ /* margin: 0 0 20rpx; */
text-align: center; text-align: center;
flex:1
} }
.cell_box .cell_long { .cell_box .cell_long {
@ -236,7 +244,8 @@ uni-page-head .uni-page-head__title {
.cell_box .cell_info view { .cell_box .cell_info view {
font-size: 0.9375rem; font-size: 0.9375rem;
margin-bottom: 10rpx; margin-bottom: 10rpx;
color: #7B8195; color: #515562;
word-wrap:break-word
} }
.cell_box .cell_info .text_black { .cell_box .cell_info .text_black {
@ -306,7 +315,7 @@ uni-page-head .uni-page-head__title {
} }
.cen_card .cell_box .cell_info .text_lightblue { .cen_card .cell_box .cell_info .text_lightblue {
font-size: 0.925rem; font-size:26rpx;
} }
.bot_card { .bot_card {
@ -1390,13 +1399,13 @@ uni-page-head .uni-page-head__title {
} }
.msg_list { .msg_list {
padding-top: 20rpx;
} }
.msg_list .uni-list-chat__header { .msg_list ::v-deep .u-card__head--left__thumb{
width: 60rpx !important; width: 60rpx !important;
height: 60rpx !important; height: 60rpx !important;
background-color: #3d7eff; padding:12rpx;
background-color: #3d7eff!important;
border-color: transparent !important; border-color: transparent !important;
border-radius: 6rpx !important; border-radius: 6rpx !important;
} }
@ -1422,9 +1431,8 @@ uni-page-head .uni-page-head__title {
.msg_list .uni-list-chat__content-title { .msg_list .uni-list-chat__content-title {
font-size: .9rem !important; font-size: .9rem !important;
} }
::v-deep .msg_list .hasread .u-card__head--left__thumb {
.msg_list .hasread .uni-list-chat__header { background-color: #ccc!important;
background-color: #ccc;
} }
/* index */ /* index */
@ -1850,7 +1858,7 @@ uni-modal .uni-modal__hd {
border-radius: 8rpx; border-radius: 8rpx;
max-width: 300rpx; max-width: 300rpx;
font-size: 0.7rem; font-size: 0.7rem;
overflow: visble; overflow: visible;
word-break: break-all; word-break: break-all;
/* overflow: hidden; /* overflow: hidden;
white-space: nowrap; white-space: nowrap;
@ -2027,15 +2035,21 @@ button::after {
} }
.card_itemCode { .card_itemCode {
font-size: 36rpx; font-size: 32rpx;
/* font-weight: 500; */ font-weight: bold;
padding: 5rpx 10rpx; /* padding: 5rpx 10rpx; */
/* width: 210rpx; */
word-wrap: break-word;
word-break: break-all;
} }
.card_itemName { .card_itemName {
color: #909399; color: #909399;
font-size: 30rpx; font-size: 26rpx;
padding: 5rpx 20rpx; /* padding: 5rpx 10rpx; */
/* width: 210rpx; */
word-wrap: break-word;
word-break: break-all;
} }
.card_ProdLine { .card_ProdLine {
@ -2058,43 +2072,50 @@ button::after {
.card_content { .card_content {
font-size: 32rpx; font-size: 40rpx;
color:#2E3A63;
margin-left:20rpx;
font-weight: 600;
}
.card_big_content {
font-size: 40rpx;
font-weight: bold;
padding: 5px; padding: 5px;
} }
.card_icon_normal { .card_icon_normal {
width: 45rpx; width: 30rpx;
height: 45rpx; height: 30rpx;
vertical-align: middle vertical-align: middle;
margin-right:12rpx
} }
.card_packing_code { .card_item_code {
color: #3315EB; color: #329362;
padding: 5px; padding: 5px;
font-size: 30rpx;
} }
.card_packing_code {
.card_packing_code_content { color: #3315EB;
font-size: 32rpx;
padding: 5px; padding: 5px;
font-size: 26rpx;
font-style: italic;
} }
.card_batch { .card_batch {
color: #9747FF; color: #9747FF;
padding: 5px; font-size: 26rpx;
} font-style: italic;
.card_batch_content {
font-size: 32rpx;
padding: 5px;
} }
.card_container { .card_container {
color: #0076F6; color: #0076F6;
padding: 5px; padding: 5px;
font-size: 30rpx;
} }
.card_container_content { .card_container_content {
font-size: 32rpx; font-size: 32rpx;
padding: 5px; padding: 5px;
@ -2102,45 +2123,72 @@ button::after {
.card_business { .card_business {
color: #F1A532; color: #F1A532;
padding: 5px; font-size: 26rpx;
font-style: italic;
} }
.card_business_content { .card_business_content {
font-size: 32rpx; font-size: 32rpx;
padding: 5px; color:#2E3A63;
margin-left:20rpx
} }
.card_location { .card_location {
color: #DA8910; color: #DA8910;
padding: 5px; font-size: 26rpx;
font-style: italic;
} }
.card_to_location { .card_to_location {
color: #329362; color: #329362;
padding: 5px; font-size: 26rpx;
font-style: italic;
} }
.card_location_content { .card_location_content {
font-size: 32rpx; font-size: 32rpx;
padding: 5px; padding: 5px;
} }
.card_level {
color: #0689da;
padding: 5px;
font-size: 30rpx;
}
.card_supportCode { .card_supportCode {
color: #DA8910; color: #DA8910;
padding: 5px;
} }
.card_supportCode_content { .card_supportCode_content {
font-size: 32rpx; font-size: 32rpx;
} }
/* .card_item_code {
color: #F1A532;
padding: 5px;
} */
.card_product_date {
color: #329362;
padding: 5px;
}
.card_order {
color: #0076F6;
padding: 5px;
}
.scan_view { .scan_view {
/* #0CC2B6 20% */ /* #0CC2B6 20% */
background: linear-gradient(90deg, rgba(12, 194, 182, 0.2) 0%, rgba(12, 194, 182, 0) 100%) background: linear-gradient(90deg, rgba(12, 194, 182, 0.2) 0%, rgba(12, 194, 182, 0.05) 100%);
border-radius:14rpx;
padding:10rpx 20rpx 16rpx
} }
.card_view { .card_view {
font-size: 32rpx; font-size: 32rpx;
padding: 5rpx; margin-top:14rpx;
margin-left: 10rpx;
} }
/* /*
@ -2183,29 +2231,28 @@ button::after {
.task_top { .task_top {
margin: 0rpx 10rpx; margin: 0rpx 10rpx;
background-color: #fff; background-color: #fff;
vertical-align: middle;
} }
.task_item { .task_item {
margin: 0rpx 10rpx;
background-color: #fff; background-color: #fff;
padding:20rpx 0px
} }
.task_card { .task_card {
padding: 12rpx; padding:0px 20rpx;
background-color: #fff; background-color: #fff;
border-radius: 10rpx; border-radius: 10rpx;
margin: 12rpx;
} }
.task_number { .task_number {
font-size: 35rpx; font-size: 36rpx;
font-weight: 600; font-weight: 600;
/* bold */ /* bold */
} }
.task_text { .task_text {
font-size: 30rpx; font-size: 30rpx;
margin: 5rpx 0rpx;
white-space: nowrap; white-space: nowrap;
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
@ -2260,25 +2307,50 @@ button::after {
border-radius: 10rpx; border-radius: 10rpx;
} }
.receive_state_no_ok {
font-size: 28rpx;
background: rgba(236, 156, 0, 0.2);
color: #EC9C00;
padding: 10rpx 20rpx 10rpx 20rpx;
border-radius: 10rpx;
}
.receive_state_ok {
font-size: 28rpx;
background: rgba(95, 203, 148, 0.2);
color: #22AF68;
padding: 10rpx 20rpx 10rpx 20rpx;
border-radius: 10rpx;
}
.receive_state_reject {
font-size: 28rpx;
background: rgba(95, 203, 148, 0.2);
color: #22AF68;
padding: 10rpx 20rpx 10rpx 20rpx;
border-radius: 10rpx;
}
.pop_detail { .pop_detail {
background-color: #fff; background-color: #fff;
width: 100%; width: 100%;
border-radius: 8rpx 8rpx 0rpx 0rpx; border-radius: 8rpx 8rpx 0rpx 0rpx;
padding: 15rpx; padding:0px 30rpx;
} }
.pop_detail .item { .pop_detail .item {
padding-top: 5rpx; padding-top: 5rpx;
padding-bottom: 5rpx; padding-bottom: 5rpx;
margin-left: 10rpx; /* margin-left: 10rpx; */
margin-right: 10rpx; /* margin-right: 10rpx; */
display: flex; display: flex;
flex-direction: row; flex-direction: row;
-webkit-justify-content: space-between; -webkit-justify-content: space-between;
justify-content: space-between; justify-content: space-between;
align-items:center
} }
.pop_detail .item_title { .pop_detail .item_title {
@ -2423,7 +2495,24 @@ button[disabled] {
padding-right: 20rpx; padding-right: 20rpx;
z-index: 10; z-index: 10;
} }
.btn_single_clear{
background-color: #fff;
font-size: 30rpx;
color: #000;
text-align: center;
width: 180rpx;
}
.btn_single_clear{
background-color: #fff;
font-size: 30rpx;
color: #000;
text-align: center;
width: 180rpx;
}
.btn_clear_after {
opacity: 0.7;
}
.btn_single_commit { .btn_single_commit {
background-color: #3C9CFF; background-color: #3C9CFF;
font-size: 30rpx; font-size: 30rpx;
@ -2431,11 +2520,27 @@ button[disabled] {
text-align: center; text-align: center;
width: 180rpx; width: 180rpx;
} }
.btn_single_clear {
background-color: #EBEEF0;
font-size: 30rpx;
color: #000;
text-align: center;
width: 180rpx;
}
.btn_single_reject {
background-color: #F56C6C;
font-size: 30rpx;
color: #fff;
text-align: center;
width: 180rpx;
}
.center { .center {
display: flex; display: flex;
flex-direction: row; flex-direction: row;
justify-content: center; justify-content: flex-end;
align-items: center; align-items: center;
} }
@ -2447,9 +2552,17 @@ button[disabled] {
.text_recommend { .text_recommend {
color: #0A84FF; color: #0A84FF;
font-size: 38rpx; font-size: 34rpx;
font-weight: bold;
} }
.text_packQty {
color: #3315EB;
font-size: 40rpx;
font-weight: bold;
}
.text_balance { .text_balance {
font-size: 36rpx; font-size: 36rpx;
} }
@ -2481,7 +2594,7 @@ button[disabled] {
align-items: center; align-items: center;
padding: 0px; padding: 0px;
color: #909399; color: #909399;
font-size: 30rpx; font-size:26rpx;
} }
.std_uom { .std_uom {
@ -2493,7 +2606,7 @@ button[disabled] {
.uom { .uom {
color: #909399; color: #909399;
font-size: 30rpx; font-size: 26rpx;
margin-left: 5rpx; margin-left: 5rpx;
margin-right: 5rpx; margin-right: 5rpx;
display: flex; display: flex;
@ -2587,7 +2700,14 @@ button[disabled] {
border: 1px solid rgb(220, 211, 211); border: 1px solid rgb(220, 211, 211);
padding: 5rpx; padding: 5rpx;
} }
.desc_input {
height: 100rpx;
font-size: 10rpx;
color: #000000;
text-align: left;
border: 1px solid rgb(220, 211, 211);
padding: 5rpx;
}
.qty_inspect_input { .qty_inspect_input {
width: 150rpx; width: 150rpx;
height: 60rpx; height: 60rpx;
@ -2642,8 +2762,9 @@ button[disabled] {
align-self: stretch; align-self: stretch;
/* 颜色/白色 */ /* 颜色/白色 */
background: #FFFFFF; background:rgba(60, 156, 255, 1);
box-sizing: border-box; box-sizing: border-box;
color:white;
/* 颜色/边框 */ /* 颜色/边框 */
border: 1px solid #E7E6E4; border: 1px solid #E7E6E4;
z-index: 3; z-index: 3;
@ -2747,3 +2868,8 @@ button[disabled] {
padding: 10rpx 20rpx 10rpx 20rpx; padding: 10rpx 20rpx 10rpx 20rpx;
border-radius: 10rpx; border-radius: 10rpx;
} }
.split_line {
background-color: rgba(230,230,230,0.5);
height: 1px;
}

23
src/common/style/pdabasic.css

@ -725,20 +725,29 @@ page {
} }
.page-header { .page-header {
background-color: #3c9cff;
font-size: 35rpx;
padding: 10rpx 20rpx;
}
.page-header .header-view {
display: flex;
flex-direction: column;
background-color: #fff; background-color: #fff;
font-size: 35rpx; font-size: 35rpx;
padding: 10rpx 20rpx; padding: 10rpx 20rpx;
border-radius: 4px;
} }
.page-header .header_item { .page-header .header-view .header_item {
/* padding-left: 10rpx; */ /* padding-left: 10rpx; */
padding: 5rpx 10rpx;
font-size: 32rpx; font-size: 32rpx;
} }
.page-header .header_job_top { .page-header .header-view .header_job_top {
padding: 5rpx 0rpx; padding: 5rpx 0rpx;
} }
.page-main { .page-main {
flex: 1; flex: 1;
position: relative; position: relative;
@ -760,3 +769,11 @@ page {
background: #e0e0e0; background: #e0e0e0;
} }
.page-footer {
/* color: #fff; */
/* line-height: 100rpx; */
/* 不放大不缩小固定100rpx */
flex: 0 0 100rpx;
/* background-color: #00AAFF; */
}

138
src/common/utils/common.ts

@ -1,138 +0,0 @@
const _dTo = function(url) {
if (!_getSync('isLogin')) {
_gTo('/pages/login/index')
return;
}
uni.navigateTo({
url: url
});
}
const _gTo = function(url) {
uni.navigateTo({
url: url
});
}
const _getSync = (i) => {
return uni.getStorageSync(i);
}
const _removeSync = (i) => {
return uni.removeStorageSync(i);
}
const _setSync = (i, data) => {
return uni.setStorageSync(i, data);
}
const _alert = (txt, cb) => {
uni.showModal({
title: '温馨提示',
content: txt,
showCancel: false,
confirmColor: '#2979ff',
success: function() {
cb && cb();
}
});
}
const _confirm = function(txt, cb) {
uni.showModal({
title: '温馨提示',
content: txt,
showCancel: true,
confirmColor: '#2979ff',
success: function(res) {
if (res.confirm) {
cb && cb();
}
}
});
}
const _toast = function(txt) {
uni.showToast({
title: txt,
icon: 'none',
duration: 1500
});
}
const _backT = function() {
uni.navigateBack();
}
const _call = function(tel) {
uni.makePhoneCall({
phoneNumber: tel
});
}
const _showLoading = (msg = '') => uni.showLoading({
mask: true,
title: msg
});
/**
* loading
*/
const _closeLoading = () => uni.hideLoading();
// 获取截图宽高
const _screenshot = function(fromWhere, widthProp, proportion) {
var width = 0,
height = 0;
uni.getSystemInfo({
//整个手机屏幕的高
success: function(res) {
width = parseInt(res.screenWidth * widthProp) //宽等于屏幕款*百分比
height = width * proportion
}
});
_gTo('../u-avatar-cropper/u-avatar-cropper?destWidth=' + (width * 2) + '&destHeight=' + (height * 2) +
'&rectWidth=' + width + '&rectHeight=' + height + '&fileType=jpg' + '&fromWhere=' +
fromWhere)
}
// 复制
const _copy = (data) => {
uni.setClipboardData({
data: data,
success: function() {
}
});
}
const _upLoad = function(tempFilePaths) {
return new Promise((resolve, reject) => {
uni.uploadFile({
url: import.meta.env.VITE_BASE_URL + '/common/upload', //仅为示例,非真实的接口地址
filePath: tempFilePaths,
name: 'file',
formData: {
'user': 'test'
},
header: { "Content-Type": "multipart/form-data", 'openId': uni.getStorageSync('openId') },
success: (uploadFileRes) => {
let item = JSON.parse(uploadFileRes.data.replace(/\ufeff/g, ""));
resolve(item)
},
fail(err) {
}
});
})
}
export {
_dTo,
_gTo,
_toast,
_backT,
_call,
_confirm,
_alert,
_getSync,
_setSync,
_removeSync,
_showLoading,
_closeLoading,
_screenshot,
_copy,
_upLoad
};

50
src/common/utils/dateTime.ts

@ -1,50 +0,0 @@
const zeroPadd = function(date,seperator) {
var hours = date.getHours(); // 获取时
var minutes = date.getMinutes(); // 获取分
var second = date.getSeconds(); // 获取秒
var seperator1 = seperator?seperator:"-"; // 自定义日期分隔符
var year = date.getFullYear(); // 获取年
var month = date.getMonth() + 1; // 获取月
var strDate = date.getDate(); // 获取日
if (month >= 1 && month <= 9) {
month = "0" + month;
}
if (strDate >= 0 && strDate <= 9) {
strDate = "0" + strDate;
}
if (hours >= 0 && hours <= 9) {
hours = "0" + hours;
}
if (minutes >= 0 && minutes <= 9) {
minutes = "0" + minutes;
}
if (second >= 0 && second <= 9) {
second = "0" + second;
}
var time = hours + ":" + minutes + ":" + second; // 时分秒
var currentdate = year + seperator1 + month + seperator1 + strDate; // 年月日
var date = {
time, currentdate
}
return date;
}
// 获取当前日期 时间
const getNowFormatDate = function(date,seperator) {
return zeroPadd(date,seperator);
}
//获取一小时后的日期 时间
const accessTimeInAnHour = function(date, h,seperator) {
var date1 = date.getTime(); // 获取当前时间戳
// 当前时间戳+3600s(一小时,其他时间通过计算时间戳进行相应加减),重新设置 Date 对象
date.setTime(date1 + h * 3600000);
return zeroPadd(date,seperator);
}
export {
getNowFormatDate,
accessTimeInAnHour,
};

19
src/common/utils/http.ts

@ -1,19 +0,0 @@
// @ts-ignore
import buildURL from 'axios/lib/helpers/buildURL'
import type { AxiosRequestConfig } from 'axios'
type ParamsSerializer = AxiosRequestConfig['paramsSerializer']
export function getFullURL(
baseURL: string,
url: string,
params: Record<string, any>,
paramsSerializer?: ParamsSerializer
) {
if (url.startsWith('http')) {
return buildURL(url, params, paramsSerializer)
}
baseURL = baseURL.endsWith('/') ? baseURL : `${baseURL}/`
url = url.startsWith('/') ? url.slice(1) : url
return buildURL(`${baseURL}${url}`, params, paramsSerializer)
}

14
src/common/utils/storage.js

@ -10,7 +10,21 @@ const setStorage = (key,value)=>{
// 清除全部本地存储 // 清除全部本地存储
const clearStorage = ()=>{ const clearStorage = ()=>{
let overPackageRecordPointParams = ''
if( uni.getStorageSync('overPackageRecordPointParams')){
overPackageRecordPointParams = uni.getStorageSync('overPackageRecordPointParams')
}
let overPackageJobDetailPointParams = ''
if( uni.getStorageSync('overPackageJobDetailPointParams')){
overPackageJobDetailPointParams = uni.getStorageSync('overPackageJobDetailPointParams')
}
uni.clearStorageSync(); uni.clearStorageSync();
if(overPackageRecordPointParams){
uni.setStorageSync('overPackageRecordPointParams',overPackageRecordPointParams)
}
if(overPackageJobDetailPointParams){
uni.setStorageSync('overPackageJobDetailPointParams',overPackageJobDetailPointParams)
}
} }
// 清除指定key本地存储 // 清除指定key本地存储

31
src/common/utils/utils.ts

@ -1,31 +0,0 @@
function compareVersion(v1, v2) {
v1 = v1.split('.')
v2 = v2.split('.')
const len = Math.max(v1.length, v2.length)
while (v1.length < len) {
v1.push('0')
}
while (v2.length < len) {
v2.push('0')
}
for (let i = 0; i < len; i++) {
const num1 = parseInt(v1[i])
const num2 = parseInt(v2[i])
if (num1 > num2) {
return 1
} else if (num1 < num2) {
return -1
}
}
return 0
}
export default {
compareVersion
}

783
src/common/utils/validator.ts

@ -1,783 +0,0 @@
//校验学校编码 只能为数字
export function validateCode(rule, value, callback) {
if (!value) {
return callback(new Error('学校编码不能为空'))
} else {
const codeReg = /^[0-9]+$/
const codeMax = /^\d{0,5}$/
if (codeReg.test(value)) {
if (codeMax.test(value)) {
callback()
} else {
callback(new Error('学校编码不能大于5位'))
}
} else {
callback(new Error('请输入正确的学校编码,只能是数字'))
}
}
}
//校验邮箱
export function validateEmail(rule, value, callback) {
if (value) {
const mailReg = /^([a-zA-Z0-9_-])+@([a-zA-Z0-9_-])+(.[a-zA-Z0-9_-])+/
if (mailReg.test(value)) {
callback()
} else {
callback(new Error('请输入正确的邮箱格式'))
}
} else {
callback()
}
}
//校验英文
export function validateEng(rule, value, callback) {
if (value) {
const mailReg = /^[A-Za-z\-\&\(\)\Ⅰ\Ⅱ\Ⅲ\Ⅳ\Ⅴ\Ⅵ\Ⅶ\Ⅷ\Ⅸ\Ⅹ\s]+$/;
if (mailReg.test(value)) {
callback()
} else {
callback(new Error('请输入正确的英文名字'))
}
} else {
callback()
}
}
//校验姓名拼音
export function validateEngName(rule, value, callback) {
if (value) {
const EngNameReg = /^[A-Za-z \(\)\s]+$/
if (EngNameReg.test(value)) {
callback()
} else {
callback(new Error('请输入正确的姓名拼音'))
}
} else {
callback()
}
}
//校验手机号码
export function validateHanset(rule, value, callback) {
if (value) {
// const regs =/^[1][3,4,5,6,7,8,9][0-9]{9}$/;
// const regs = /^1[3|4|5|7|8][0-9]\d{8}$/
const regs = /^1[3-9]\d{9}$/
if (regs.test(value)) {
callback()
} else {
return callback(new Error('请输入正确的手机号'))
}
} else {
callback()
}
}
//校验座机电话
export function validatePhone(rule, value, callback) {
if (value) {
//const reg = /^1[3|4|5|7|8][0-9]\d{8}$/
// const regs = /^([0-9]{3,4}-)?[0-9]{7,8}$/;
const regs = /^((0\d{2,3}-\d{7,8}))$/;
if (regs.test(value)) {
callback()
} else {
return callback(new Error('请输入正确的座机号'))
}
} else {
callback()
}
}
//校验家庭电话 手机或者座机
export function validateFamilyPhone(rule, value, callback) {
if (value) {
const isPhone = /^([0-9]{3,4}-)?[0-9]{7,8}$/;
const isMob = /^((\+?86)|(\+86))?(13[0123456789][0-9]{8}|15[0123456789][0-9]{8}|17[0123456789][0-9]{8}|18[0123456789][0-9]{8}|147[0-9]{8}|1349[0-9]{7})$/;
if (isPhone.test(value) || isMob.test(value)) {
callback()
} else {
return callback(new Error('请输入正确的手机或者座机电话'))
}
} else {
callback()
}
}
// 校验只能为中文
export function validateChinese(rule, value, callback) {
if (value) {
const chineseReg = /^[\u4E00-\u9FA5]+$/
if (chineseReg.test(value)) {
callback()
} else {
callback(new Error('请输入简介,只能为中文'))
}
} else {
callback()
}
}
// 校验名称既能为中文也可以为英文
export function validateName(rule, value, callback) {
if (value) {
const chineseReg = /^[\u4E00-\u9FA5]+$/
const engLish = /^[A-Za-z]+$/
if (chineseReg.test(value) || engLish.test(value)) {
callback()
} else {
callback(new Error('请输入正确的中文或者英文名称'))
}
} else {
callback()
}
}
// 校验负责人既能为中文也可以为英文
export function validateChargeperson(rule, value, callback) {
if (value) {
const chineseReg = /^[\u4E00-\u9FA5]+$/
const engLish = /^[A-Za-z]+$/
if (chineseReg.test(value) || engLish.test(value)) {
callback()
} else {
callback(new Error('请输入正确的负责人(中英文都可以)'))
}
} else {
callback()
}
}
//校验学校名称不能为空
export function validateXXMC(rule, value, callback) {
if (!value) {
return callback(new Error('案例名称不能为空'))
} else {
const chineseReg = /^[\u4E00-\u9FA5]+$/
if (chineseReg.test(value)) {
callback()
} else {
callback(new Error('请输入正确的案例名称,只能是汉字'))
}
}
}
//校验中英文数字和下划线都可以
export function validateZYS(rule, value, callback) {
if (value) {
//const postReg =/^[\u4e00-\u9fa5_a-zA-Z0-9_]{4,10}+$/
const Reg = /^[\u4e00-\u9fa5a-zA-Z0-9]+$/
if (Reg.test(value)) {
callback()
} else {
callback(new Error('请输入正确的名称'))
}
} else {
callback()
}
}
// 校验邮政编码
export function validatePostCode(rule, value, callback) {
if (value) {
const postReg = /^[1-9]\d{5}$/
if (postReg.test(value)) {
callback()
} else {
callback(new Error('请输入正确的邮政编码'))
}
} else {
callback()
}
}
// 数字
export function validateNum(rule, value, callback) {
if (value) {
const numReg = /^[\d]+$/
if (numReg.test(value)) {
callback()
} else {
callback(new Error('请输入数字'))
}
} else {
callback()
}
}
//数字和小数点
export function validateNumDot(rule, value, callback) {
if (value) {
const numReg = /^\d+$|^\d+\.\d+$/g
if (numReg.test(value)) {
callback()
} else {
callback(new Error('请输入数字或小数点'))
}
} else {
callback()
}
}
// 组织机构代码
export function validateOrganization(rule, value, callback) {
if (value) {
const orgReg = /^[A-Za-z0-9]\w{14}$/g
if (orgReg.test(value)) {
callback()
} else {
callback(new Error('请输入组织机构代码'))
}
} else {
callback()
}
}
// 传真
export function validateFax(rule, value, callback) {
if (value) {
const faxReg = /^(\d{3,4}-)?\d{7,8}$/
if (faxReg.test(value)) {
callback()
} else {
callback(new Error('请输入正确的传真'))
}
} else {
callback()
}
}
// 主页地址
export function validateHome(rule, value, callback) {
if (value) {
const homeReg = /^(?:http(s)?:\/\/)?[\w.-]+(?:\.[\w\.-]+)+[\w\-\._~:/?#[\]@!\$&'\*\+,;=.]+$/
if (homeReg.test(value)) {
callback()
} else {
return callback(new Error('请输入正确的主页地址'))
}
} else {
callback()
}
}
// 学分 小数,且保留最多三位小数
export function validateXf(rule, value, callback) {
if (!value) {
return callback(new Error('学分不能为空'))
} else {
const numReg = /^[0-9]+\.[0-9]{0,3}$/
if (numReg.test(value)) {
callback()
} else {
callback(new Error('请输入小数,且小数点后最多三位'))
}
}
}
// 数字格式 小数点后一位
export function validateOneNum(rule, value, callback) {
if (value) {
const numReg = /^\d+(\.\d+)?$/
const numOneReg = /^\d*\.{0,1}\d{0,1}$/
if (numReg.test(value)) {
if (numOneReg.test(value)) {
callback()
} else {
callback(new Error('小数点后最多1位'))
}
} else {
callback(new Error('请输入数字'))
}
}
callback()
}
// 数字格式 小数点后两位
export function validateTwoNum(rule, value, callback) {
if (value) {
const numReg = /^\d+(\.\d+)?$/
const numTwoReg = /^\d*\.{0,2}\d{0,2}$/
if (numReg.test(value)) {
if (numTwoReg.test(value)) {
callback()
} else {
callback(new Error('小数点后最多2位'))
}
} else {
callback(new Error('请输入数字'))
}
}
callback()
}
// 数字格式 小数点后两位 小数点前保留五位
export function validateTwoNumThree(rule, value, callback) {
if (value) {
if (Number(value) > 10000) {// 校验value值不能大于10000
callback(new Error('数值过大,请重新输入'))
} const numReg = /^\d+(\.\d+)?$/
const numTwoReg = /^\d*\.{0,2}\d{0,2}$/
if (numReg.test(value)) {
if (numTwoReg.test(value)) {
callback()
} else {
callback(new Error('小数点后最多2位'))
}
} else {
callback(new Error('请输入数字'))
}
}
callback()
}
// 数字格式 小数点后三位
export function validateThreeNum(rule, value, callback) {
if (value) {
const numReg = /^\d+(\.\d+)?$/
const numTwoReg = /^\d*\.{0,3}\d{0,3}$/
if (numReg.test(value)) {
if (numTwoReg.test(value)) {
callback()
} else {
callback(new Error('小数点后最多3位'))
}
} else {
callback(new Error('请输入数字'))
}
}
callback()
// if (!value) {
// return callback(new Error('字段不能为空'))
// } else {
// const numReg = /^\d+(\.\d+)?$/
// const numTwoReg = /^\d*\.{0,3}\d{0,3}$/
// if (numReg.test(value)) {
// if (numTwoReg.test(value)) {
// callback()
// } else {
// callback(new Error('小数点后最多3位'))
// }
// } else {
// callback(new Error('请输入数字'))
// }
// }
}
//校验年份必须为4位数字
export function validateNF(rule, value, callback) {
if (value) {
const NFReg = /^\d{4}$/
if (NFReg.test(value)) {
callback()
} else {
callback(new Error('请输入4位数字'))
}
} else {
callback()
}
}
//校验年份必须为4位数字
export function validateXQ(rule, value, callback) {
if (value) {
const NFReg = /^\d{5}$/
if (NFReg.test(value)) {
callback()
} else {
callback(new Error('请输入5位数字'))
}
} else {
callback()
}
}
//校验分数最大值
export function validateMaxNumber(rule, value, callback) {
if (parseInt(value) <= 200) {
callback()
} else {
callback(new Error('分数不能大于200'))
}
}
//校验正整数
export function validateInteger(rule, value, callback) {
if (value) {
const integerReg = /^[+]{0,1}(\d+)$/
if (integerReg.test(value)) {
callback()
} else {
callback(new Error('请输入正确的整数'))
}
} else {
callback()
}
}
//校验整数
export function validateroundNumber(rule, value, callback) {
if (value) {
const numReg = /^[1-9]\d*$/
if (numReg.test(value)) {
callback()
} else {
callback(new Error('请输入正确的整数'))
}
} else {
callback()
}
}
// 校验车牌号
export function validateCarNumber(rule, value, callback) {
if (value) {
// 新能源
const numReg = /^[京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领A-Z]{1}[A-Z]{1}(([0-9]{5}[DF]$)|([A-HJ-K][A-HJ-NP-Z0-9][0-9]{4}$))/;
// 燃油车
const numReg1 = /^[京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领A-Z]{1}[A-Z]{1}[A-HJ-NP-Z0-9]{4}[A-HJ-NP-Z0-9挂学警港澳]{1}$/;
if (value.length == 7) {
if (numReg1.test(value)) {
callback()
}else{
callback(new Error('请输入正确的车牌号'))
}
} else if (value.length == 8) {
if (numReg.test(value)) {
callback()
}else{
callback(new Error('请输入正确的车牌号'))
}
} else {
callback(new Error('请输入正确的车牌号'))
}
} else {
callback()
}
}
//校验身份证号
export function validateCard(rule, value, callback) {
if (value) {
let cardBoolean = IdCardValidate(value);
// const cardReg =/(^\d{18}$)|(^\d{17}(\d|X|x)$)/
// if (cardReg.test(value)) {
if (cardBoolean) {
callback()
} else {
callback(new Error('请输入正确的身份证号'))
}
} else {
callback()
}
}
//身份证:身份证校验
function IdCardValidate(code) {
var tip = "";
if (code != "") {
var city = {
11: "北京",
12: "天津",
13: "河北",
14: "山西",
15: "内蒙古",
21: "辽宁",
22: "吉林",
23: "黑龙江 ",
31: "上海",
32: "江苏",
33: "浙江",
34: "安徽",
35: "福建",
36: "江西",
37: "山东",
41: "河南",
42: "湖北 ",
43: "湖南",
44: "广东",
45: "广西",
46: "海南",
50: "重庆",
51: "四川",
52: "贵州",
53: "云南",
54: "西藏 ",
61: "陕西",
62: "甘肃",
63: "青海",
64: "宁夏",
65: "新疆",
71: "台湾",
81: "香港",
82: "澳门",
91: "国外 "
};
var pass = true;
//是否为空
if (code === '') {
tip = "请输入身份证号,身份证号不能为空";
pass = false;
}
//校验长度,类型
else if (isCardNo(code) === false) {
tip = "您输入的身份证号码不正确,请重新输入";
pass = false;
}
//检查省份
else if (checkProvince(code, city) === false) {
tip = "您输入的身份证号码不正确,请重新输入";
pass = false;
}
//校验生日
else if (checkBirthday(code) === false) {
tip = "您输入的身份证号码生日不正确,请重新输入";
pass = false;
} else {
//18位身份证需要验证最后一位校验位
if (code.length == 18) {
code = code.split('');
//∑(ai×Wi)(mod 11)
//加权因子
var factor = [7, 9, 10, 5, 8, 4, 2, 1, 6, 3, 7, 9, 10, 5, 8, 4, 2];
//校验位
var parity = [1, 0, 'X', 9, 8, 7, 6, 5, 4, 3, 2];
var sum = 0;
var ai = 0;
var wi = 0;
for (var i = 0; i < 17; i++) {
ai = code[i];
wi = factor[i];
sum += ai * wi;
}
var last = parity[sum % 11];
if (parity[sum % 11] != code[17]) {
tip = "身份证格式错误";
pass = false;
}
}
}
return pass;
}
}
//身份证:检查身份证号码是否符合规范,包括长度,类型
function isCardNo(card) {
//身份证号码为15位或者18位,15位时全为数字,18位前17位为数字,最后一位是校验位,可能为数字或字符X
var reg = /(^\d{15}$)|(^\d{17}(\d|X)$)/;
if (reg.test(card) === false) {
return false;
}
return true;
};
//身份证:取身份证前两位,校验省份
function checkProvince(card, city) {
var province = card.substr(0, 2);
if (city[province] == undefined) {
return false;
}
return true;
};
//身份证:检查生日是否正确
function checkBirthday(card) {
var len = card.length;
//身份证15位时,次序为省(3位)市(3位)年(2位)月(2位)日(2位)校验位(3位),皆为数字
if (len == '15') {
var re_fifteen = /^(\d{6})(\d{2})(\d{2})(\d{2})(\d{3})$/;
var arr_data = card.match(re_fifteen);
var year = arr_data[2];
var month = arr_data[3];
var day = arr_data[4];
var birthday = new Date('19' + year + '/' + month + '/' + day);
return verifyBirthday('19' + year, month, day, birthday);
}
//身份证18位时,次序为省(3位)市(3位)年(4位)月(2位)日(2位)校验位(4位),校验位末尾可能为X
if (len == '18') {
var re_eighteen = /^(\d{6})(\d{4})(\d{2})(\d{2})(\d{3})([0-9]|X)$/;
var arr_data = card.match(re_eighteen);
var year = arr_data[2];
var month = arr_data[3];
var day = arr_data[4];
var birthday = new Date(year + '/' + month + '/' + day);
return verifyBirthday(year, month, day, birthday);
}
return false;
};
//身份证:校验日期
function verifyBirthday(year, month, day, birthday) {
var now = new Date();
var now_year = now.getFullYear();
//年月日是否合理
if (birthday.getFullYear() == year && (birthday.getMonth() + 1) == month && birthday.getDate() == day) {
//判断年份的范围(3岁到100岁之间)
var time = now_year - year;
if (time >= 3 && time <= 100) {
return true;
}
return false;
}
return false;
};
/**
* 18
* @param a_idCard
* @return
*/
function isTrueValidateCodeBy18IdCard(a_idCard) {
let By18Val = a_idCard[17].toLowerCase(); // 获取第十八位值
const numReg = /^[1-9]\d*$/
let numVal = false; // 校验第十八位是否为整数
if (numReg.test(Number(By18Val))) {
numVal = true
} else {
numVal = false
}
if (By18Val == 'x' || By18Val == 'X' || numVal) {
return true
} else {
return false
}
}
/**
*
* @param AddressNum
* @constructor
*/
function IdCardValidateAddress(AddressNum) {
var city = {
11: "北京",
12: "天津",
13: "河北",
14: "山西",
15: "内蒙古",
21: "辽宁",
22: "吉林",
23: "黑龙江 ",
31: "上海",
32: "江苏",
33: "浙江",
34: "安徽",
35: "福建",
36: "江西",
37: "山东",
41: "河南",
42: "湖北 ",
43: "湖南",
44: "广东",
45: "广西",
46: "海南",
50: "重庆",
51: "四川",
52: "贵州",
53: "云南",
54: "西藏 ",
61: "陕西",
62: "甘肃",
63: "青海",
64: "宁夏",
65: "新疆",
71: "台湾",
81: "香港",
82: "澳门",
91: "国外 "
};
if (city[AddressNum.substr(0, 2)]) {
return true
} else {
return false
}
}
/**
* 18
* @param idCard 18
* @return
*/
function isValidityBrithBy18IdCard(idCard18) {
var year = idCard18.substring(6, 10);
var month = idCard18.substring(10, 12);
var day = idCard18.substring(12, 14);
var temp_date = new Date(year, parseFloat(month) - 1, parseFloat(day));
// 这里用getFullYear()获取年份,避免千年虫问题
if (temp_date.getFullYear() != parseFloat(year)
|| temp_date.getMonth() != parseFloat(month) - 1
|| temp_date.getDate() != parseFloat(day)) {
return false;
} else {
return true;
}
}
/**
* 15
* @param idCard15 15
* @return
*/
function isValidityBrithBy15IdCard(idCard15) {
var year = idCard15.substring(6, 8);
var month = idCard15.substring(8, 10);
var day = idCard15.substring(10, 12);
var temp_date = new Date(year, parseFloat(month) - 1, parseFloat(day));
// 对于老身份证中的你年龄则不需考虑千年虫问题而使用getYear()方法
if (temp_date.getYear() != parseFloat(year)
|| temp_date.getMonth() != parseFloat(month) - 1
|| temp_date.getDate() != parseFloat(day)) {
return false;
} else {
return true;
}
}
/**
*
* @param str
* @returns {*}
*/
function trim(str) {
return str.replace(/(^\s*)|(\s*$)/g, "");
}
export default {
validateCode,
validateEmail,
validateEng,
validatePhone,
validateChinese,
validatePostCode,
validateNum,
validateNumDot,
validateZYS,
validateOrganization,
validateFax,
validateHome,
validateXXMC,
validateXf,
validateOneNum,
validateMaxNumber,
validateTwoNum,
validateTwoNumThree,
validateThreeNum,
validateInteger,
validateNF,
validateXQ,
validateroundNumber,
validateEngName,
validateCard,
validateHanset,
validateFamilyPhone,
validateName,
validateChargeperson,
validateCarNumber
}

269
src/components/item/slectItemList.vue

@ -1,269 +0,0 @@
<template>
<!-- 选择备件 -->
<u-popup v-model="props.isShowSelectItem" mode="center" border-radius="14">
<view class="popup-title">选择备件</view>
<view class="popup">
<!-- <input v-model="searchKeyword" @input="filterItems" placeholder="搜索备件名称"> -->
<u-search placeholder="搜索" v-model="form1.searchName" @change="searchItem" clearabled=false></u-search>
<!-- <u-input v-model="form1.searchName" placeholder="请输入备件名称" @change="searchItem"/>
<u-button>搜索</u-button> -->
<view class="list">
<view class="item" v-for="(item,index) in singleColumnList" :key="index" @click="chooseItem(item)">
<u-checkbox v-model="item.checked" shape="circle" style="margin-top: 8rpx;"></u-checkbox>
<view class="right">
<view class="item-name">
备件名称:<span>{{item.name}}</span>
</view>
<view class="item-dec">
备件编码:<span>{{item.number}}</span>
</view>
</view>
</view>
</view>
</view>
<view class="popup-footer">
<view @click="chooseItem1(0)">取消</view>
<view class="sure" @click="chooseItem1(1)">确认</view>
</view>
</u-popup>
</template>
<script setup lang="ts">
import {
ref,
defineProps,
defineEmits,
getCurrentInstance,
watch
} from 'vue'
import {
onLoad,
} from '@dcloudio/uni-app'
import * as repairOrderApi from "@/api/repairOrder"
const props = defineProps({
isShowSelectItem: {
type: Boolean,
default: () => { return false },
require: true
},
singleColumnList:{
type: Array,
default: () => { return [] },
require: false
},
});
// isShowSelectItem
watch(() => props.isShowSelectItem, (newValue, oldValue) => {
if(newValue){
console.log('props.isShowSelectItem',props.isShowSelectItem);
form1.value.searchName = null
form1.value.temporarilyNumber = null
form1.value.temporarilyName = null
}
});
const { proxy } = getCurrentInstance()
const repairOrderList = ref([])
const itemList = ref([])
const type = ref('')
const isShowSelectItem = ref(false);
const selectVal = ref(null);
const emits = defineEmits(['searchItem','chooseItem1']);
const form1 = ref({
number: "",
name:"",
qty: 0,
temporarilyNumber:"",//
temporarilyName:"",//
searchName:"",//
})
onLoad((option) => {
if (option.type) type.value = option.type;
if (option.type) isShowSelectItem.value = option.isShowSelectItem;//
if (option.selectVal) selectVal.value = option.selectVal;//
})
//
function chooseItem1(type){
if(type==1){
form1.value.number = form1.value.temporarilyNumber
form1.value.name = form1.value.temporarilyName
}
emits('chooseItem1',type,form1);
}
function searchItem(){
emits('searchItem',form1.value.searchName);
}
function chooseItem(item){
console.log('props.isShowSelectItem',props.isShowSelectItem);
console.log('props.singleColumnList',props.singleColumnList);
let arr = props.singleColumnList.filter(cur=>cur.number != item.number)
arr.forEach(item=>{
item.checked = false
})
item.checked = !item.checked
let arr1 = props.singleColumnList.filter(cur=>cur.number == item.number)
form1.value.temporarilyNumber = arr1[0].number;
form1.value.temporarilyName = arr1[0].name;
}
</script>
<style lang="scss" scoped>
.add-form-container {
min-height: calc(100vh - 140rpx);
background: white;
padding: 0px 30rpx 140rpx;
}
.footer {
position: fixed;
bottom: 0px;
left: 0px;
width: 100%;
z-index: 22;
}
.btns {
display: flex;
button {
flex: 1;
}
.sure {
background: #409eff;
color: white;
border-radius: 0px;
&::after {
border: 1px solid #409eff;
border-radius: 0px;
}
}
.reset {
background: #F5F5F5;
border-radius: 0px;
&::after {
border-radius: 0px;
}
}
}
.right-button {
background: #409eff;
color: white;
padding: 0rpx 30rpx;
border-radius: 16rpx;
text-align: center;
font-size: 28rpx;
}
.select {
display: flex;
align-items: center;
height: 72rpx;
width: 100%;
.input {
flex: 1;
font-size: 28rpx;
color: #000000;
}
.placeholder {
flex: 1;
font-size: 28rpx;
color: rgb(192, 196, 204);
}
}
.title {
padding: 32rpx 0px;
position: relative;
span {
position: absolute;
left: -16rpx;
color: #fa3534;
padding-top: 6rpx;
}
}
.list {
.item {
display: flex;
margin-bottom: 20rpx;
.item-box {
background: #F5F5F5;
border-radius: 12rpx;
flex: 1;
width: 0rpx;
}
.spare-title {
padding: 20rpx 30rpx;
border-bottom: 1px solid #e4e4e4;
.title-txt {
color: #409eff;
font-size: 30rpx;
font-weight: bold;
}
}
.dec {
color: #9c9c9c;
padding: 20rpx 30rpx 20rpx;
}
}
}
.add-btn {
display: flex;
justify-content: flex-start;
align-items: center;
}
.popup-title {
text-align: center;
font-size: 32rpx;
font-weight: bold;
color: #409eff;
padding: 30rpx 30rpx 0px
}
.popup {
width: 600rpx;
padding: 30rpx 60rpx 30rpx;
}
.popup-footer {
display: flex;
border-top: 1px solid #e4e4e4;
view {
line-height: 100rpx;
flex: 1;
text-align: center;
&.sure {
color: #409eff;
}
}
}
::v-deep .u-checkbox-group {
display: grid !important;
}
</style>

99
src/components/my-paging/my-paging.vue

@ -3,10 +3,7 @@
<!-- 这边统一设置z-paging在页面中使用时就不用重复写 --> <!-- 这边统一设置z-paging在页面中使用时就不用重复写 -->
<!-- 如果要在这里设置极简写法这里的ref不能设置为paging设置为其他名即可因为极简写法会修改/调用第一个包含了ref="paging"的付view中的list和query --> <!-- 如果要在这里设置极简写法这里的ref不能设置为paging设置为其他名即可因为极简写法会修改/调用第一个包含了ref="paging"的付view中的list和query -->
<!-- 极简写法在下方设置autowire-list-name="xxx" autowire-query-name="xxx"即可与minimalism-demo.vue中的一致并且不用再从这个组件转发到页面只要遵循上一行的规则即可 --> <!-- 极简写法在下方设置autowire-list-name="xxx" autowire-query-name="xxx"即可与minimalism-demo.vue中的一致并且不用再从这个组件转发到页面只要遵循上一行的规则即可 -->
<z-paging ref="paging" v-model="list" fixed auto-show-back-to-top refresher-threshold="160rpx" @query="queryList" <z-paging ref="paging" v-model="list" fixed auto-show-back-to-top refresher-threshold="160rpx" @query="queryList" :useVirtualList="useVirtualList" :useInnerList="useInnerList" :cellKeyName="cellKeyName" :innerListStyle="innerListStyle" :preloadPage="preloadPage" :cellHeightMode="cellHeightMode" :virtualScrollFps="virtualScrollFps" :loading-more-loading-text="{ en: '英文的加载中', 'zh-cn': '中文的加载中', 'zh-hant-cn': '繁体的加载中' }">
:useVirtualList="useVirtualList" :useInnerList="useInnerList" :cellKeyName="cellKeyName" :innerListStyle="innerListStyle" :preloadPage="preloadPage" :cellHeightMode="cellHeightMode" :virtualScrollFps="virtualScrollFps"
:loading-more-loading-text="{'en':'英文的加载中','zh-cn':'中文的加载中','zh-hant-cn':'繁体的加载中'}">
<!-- 这里插入一个view到z-paging中并且这个view会被z-paging标记为top固定在顶部 --> <!-- 这里插入一个view到z-paging中并且这个view会被z-paging标记为top固定在顶部 -->
<template #top> <template #top>
<!-- 这里接收页面传进来的slot这样相当于将页面传进来的slot传给z-paging的slot="top" --> <!-- 这里接收页面传进来的slot这样相当于将页面传进来的slot传给z-paging的slot="top" -->
@ -38,7 +35,7 @@
<!-- 自定义没有更多数据view --> <!-- 自定义没有更多数据view -->
<template #loadingMoreNoMore> <template #loadingMoreNoMore>
<!-- <custom-nomore></custom-nomore> --> <!-- <custom-nomore></custom-nomore> -->
<uni-load-more status="normore" /> <u-loadmore status="normore" />
</template> </template>
<!-- 这里接收页面传进来的普通slot如列表数据等 --> <!-- 这里接收页面传进来的普通slot如列表数据等 -->
@ -46,20 +43,15 @@
</z-paging> </z-paging>
</template> </template>
<script> <script setup lang="ts">
export default { import { ref, getCurrentInstance, nextTick, onMounted, watch } from 'vue'
name: "my-paging", import { onLoad, onShow, onNavigationBarButtonTap, onReady, onBackPress, onReachBottom, onPullDownRefresh } from '@dcloudio/uni-app'
data() {
return { const props = defineProps({
list: []
};
},
props: {
//v-modellist
value: { value: {
type: Array, type: Array,
default: function() { default() {
return []; return []
} }
}, },
// 使 // 使
@ -80,8 +72,8 @@
// innerList // innerList
innerListStyle: { innerListStyle: {
type: Object, type: Object,
default: function() { default() {
return {}; return {}
} }
}, },
// ()127celldom() // ()127celldom()
@ -98,41 +90,50 @@
virtualScrollFps: { virtualScrollFps: {
type: [Number, String], type: [Number, String],
default: 60 default: 60
}, }
}, })
watch: { const list = ref([])
const paging = ref()
// v-modez-paging // v-modez-paging
value(newVal) { watch(
this.list = newVal; () => props.value,
}, (newVal) => {
list.value = newVal
}
)
// #ifdef VUE3 // #ifdef VUE3
modelValue(newVal) { watch(
this.list = newVal; () => props.modelValue,
}, (newVal) => {
list.value = newVal
}
)
// #endif // #endif
//z-paging watch(
list(newVal) { () => list.value,
(newVal) => {
// emit inputv-model // emit inputv-model
this.$emit('input', newVal); emit('input', newVal)
// #ifdef VUE3 // #ifdef VUE3
this.$emit('update:modelValue', newVal); emit('update:modelValue', newVal)
// #endif // #endif
} }
}, )
methods: {
// z-paging@queryemit // z-paging@queryemit
queryList(pageNo, pageSize) { const queryList = (pageNo, pageSize) => {
console.log("queryList",pageNo) console.log('queryList', pageNo)
// this.$emit('query', pageNo, pageSize); // this.$emit('query', pageNo, pageSize);
}, }
// reloadz-paging // reloadz-paging
reload(data) { const reload = (data) => {
this.$refs.paging.reload(data); paging.value.reload(data)
}, }
// completez-paging // completez-paging
complete(data) { const complete = (data) => {
this.$refs.paging.complete(data); console.log(data)
}, paging.value.complete(data)
}
/* /*
//使mixins使 //使mixins使
//updatePageScrollTopz-paging //updatePageScrollTopz-paging
@ -148,10 +149,12 @@
this.$refs.paging.doChatRecordLoadMore(); this.$refs.paging.doChatRecordLoadMore();
} }
*/ */
} //
} const emit = defineEmits(['input', 'update:modelValue'])
defineExpose({
reload,
complete
})
</script> </script>
<style> <style></style>
</style>

85
src/components/search/index.vue

@ -1,85 +0,0 @@
<template>
<view class="content">
<view class="screen-input">
<u-search
v-model='keyWord'
:show-action='false'
:bg-color="searchData.bgBolor ||'white'"
:border-color="searchData.borderColor ||'#E4E4E4'"
:shape="searchData.shape ||'square'"
:height="searchData.height || 80"
:placeholder="searchData.placeholder ||'请输入设备名称'"
:clearabled="true"
@search='search'
@clear='clear'
>
</u-search>
</view>
<view class="screen-btn" @click="screen" v-if="isShowScreen">
<image src="../../static/icons/screen.png" mode="widthFix"></image>
<view>筛选</view>
</view>
</view>
</template>
<script>
export default {
props: {
searchData:{
type: Object,
default:()=>{return {}},
require:false
},
isShowScreen: {
type: Boolean,
default:()=>{return true},
require:false
},
},
data() {
return {
keyWord: '',
}
},
methods: {
//
search() {
this.$emit('search', this.keyWord)
},
//
clear() {
this.$emit('search', '')
},
//
screen() {
this.$emit('screen')
}
}
}
</script>
<style lang="scss" scoped>
.content {
padding: 20rpx;
display: flex;
align-items: center;
background: white;
.screen-input {
flex: 1;
width: 0px;
}
.screen-btn {
display: flex;
align-items: center;
margin-left:20rpx;
image {
width: 30rpx;
margin-right: 6rpx;
}
}
}
</style>

159
src/components/show-modal/show-modal.vue

@ -1,27 +1,24 @@
<template name="show-modal"> <template name="show-modal">
<view> <view>
<u-modal v-model="show" :title-style="{color: 'red'}" :title="title" :showTitle="false" <u-modal v-model="show" :title-style="{ color: 'red' }" :title="title" :showTitle="false" :showConfirmButton="false" ref="modal">
:showConfirmButton="false" ref="modal">
<view class="slot-content"> <view class="slot-content">
<slot name="icon"> <slot name="icon">
<image class="icon" :src="icon" /> <image class="icon" :src="icon" />
</slot> </slot>
<scroll-view scroll-y="true" style="max-height: 200px;"> <scroll-view scroll-y="true" style="max-height: 200px">
<rich-text class="content" :nodes="content"> <rich-text class="content" :nodes="content"> </rich-text>
</rich-text>
</scroll-view> </scroll-view>
<view class="split_line"></view>
<u-line></u-line>
<slot name="button"> <slot name="button">
<view class="uni-flex uni-row u-col-center space-between" style="width: 100%;height: 48px;"> <view class="uni-flex uni-row u-col-center space-between" style="width: 100%; height: 48px">
<view v-if="showCancelButton" class="cance_button" @tap="$u.throttle(cancelClose, 500)"> <view v-if="showCancelButton" class="cance_button" @tap="$u.throttle(cancelClose, 500)">
<text :style="{'color':cancelColor}">{{ cancelText }}</text> <text :style="{ color: cancelColor }">{{ cancelText }}</text>
</view> </view>
<u-line direction="col" length="100%"></u-line> <u-line direction="col" length="100%"></u-line>
<view v-if="showConfirmButton" class="confirm_button" @tap="$u.throttle(confirmClose, 500)"> <view v-if="showConfirmButton" class="confirm_button" @tap="$u.throttle(confirmClose, 500)">
<text :style="{'color':confirmColor}">{{confirmText}}</text> <text :style="{ color: confirmColor }">{{ confirmText }}</text>
<text v-if="showConfirmCountdown">({{ seconds }}s关闭)</text> <text v-if="showConfirmCountdown">({{ seconds }}s关闭)</text>
</view> </view>
</view> </view>
@ -61,58 +58,58 @@
} }
}, },
methods: { methods: {
open() { open() {
this.show = true; this.show = true
}, },
close() { close() {
this.$.refs.modal.popupClose(); this.$.refs.modal.popupClose()
}, },
confirmClose() { confirmClose() {
if (this.show) { if (this.show) {
this.show = false; this.show = false
clearInterval(this.timer) // timer clearInterval(this.timer) // timer
this.$.refs.modal.popupClose();
this.success({ this.success({
// cancel: false, // cancel: false,
confirm: true, confirm: true
}); })
} }
}, },
cancelClose() { cancelClose() {
clearInterval(this.timer) // timer clearInterval(this.timer) // timer
this.$.refs.modal.popupClose(); if(this.$refs.modal){
this.$refs.modal.popupClose();
}
this.success({ this.success({
// cancel: true, // cancel: true,
confirm: false, confirm: false
}); })
}, },
// ( // (
showConfirmMessageModal(mContent, callback) { showConfirmMessageModal(mContent, callback) {
this.showConfirmModal("消息", mContent, callback); this.showConfirmModal('消息', mContent, callback)
}, },
// ( // (
showConfirmSuccessModal(mContent, callback) { showConfirmSuccessModal(mContent, callback) {
this.showConfirmModal("成功", mContent, callback); this.showConfirmModal('成功', mContent, callback)
}, },
// ( // (
showConfirmFailModal(mContent, callback) { showConfirmFailModal(mContent, callback) {
this.showConfirmModal("失败", mContent, callback); this.showConfirmModal('失败', mContent, callback)
}, },
// ( // (
showConfirmWarningModal(mContent, callback) { showConfirmWarningModal(mContent, callback) {
this.showConfirmModal("警告", mContent, callback); this.showConfirmModal('警告', mContent, callback)
}, },
// ( // (
showConfirmQuestionModal(mContent, callback) { showConfirmQuestionModal(mContent, callback) {
this.showConfirmModal("疑问", mContent, callback); this.showConfirmModal('疑问', mContent, callback)
}, },
// ( // (
@ -121,44 +118,43 @@
iconType: mIconType, iconType: mIconType,
content: mContent, content: mContent,
showCancelButton: false, showCancelButton: false,
success: function(res) { success(res) {
if (callback != undefined) { if (callback != undefined) {
if (res.confirm == true) { if (res.confirm == true) {
callback(true); callback(true)
console.log('用户点击确定') console.log('用户点击确定')
} else { } else {
callback(false); callback(false)
console.log('用户点击取消') console.log('用户点击取消')
} }
} }
} }
}); })
}, },
// (+ // (+
showSelectMessageModal(mContent, callback) { showSelectMessageModal(mContent, callback) {
this.showSelectModal("消息", mContent, callback); this.showSelectModal('消息', mContent, callback)
}, },
// (+ // (+
showSelectSuccessModal(mContent, callback) { showSelectSuccessModal(mContent, callback) {
this.showSelectModal("成功", mContent, callback); this.showSelectModal('成功', mContent, callback)
}, },
// (+ // (+
showSelectFailModal(mContent, callback) { showSelectFailModal(mContent, callback) {
this.showSelectModal("失败", mContent, callback); this.showSelectModal('失败', mContent, callback)
}, },
// (+ // (+
showSelectWarningModal(mContent, callback) { showSelectWarningModal(mContent, callback) {
this.showSelectModal("警告", mContent, callback); this.showSelectModal('警告', mContent, callback)
}, },
// (+ // (+
showSelectQuestionModal(mContent, callback) { showSelectQuestionModal(mContent, callback) {
this.showSelectModal("疑问", mContent, callback); this.showSelectModal('疑问', mContent, callback)
}, },
// (+ // (+
@ -166,44 +162,43 @@
this.showModal({ this.showModal({
iconType: mIconType, iconType: mIconType,
content: mContent, content: mContent,
success: function(res) { success(res) {
if (callback != undefined) { if (callback != undefined) {
if (res.confirm == true) { if (res.confirm == true) {
callback(true); callback(true)
console.log('用户点击确定') console.log('用户点击确定')
} else { } else {
callback(false); callback(false)
console.log('用户点击取消') console.log('用户点击取消')
} }
} }
} }
}); })
}, },
// (+) // (+)
showConfirmCountdownMessageModal(mContent, callback) { showConfirmCountdownMessageModal(mContent, callback) {
this.showConfirmCountdownModal("消息", mContent, callback); this.showConfirmCountdownModal('消息', mContent, callback)
}, },
// (+) // (+)
showConfirmCountdownSuccessModal(mContent, callback) { showConfirmCountdownSuccessModal(mContent, callback) {
this.showConfirmCountdownModal("成功", mContent, callback); this.showConfirmCountdownModal('成功', mContent, callback)
}, },
// (+) // (+)
showConfirmCountdownFailModal(mContent, callback) { showConfirmCountdownFailModal(mContent, callback) {
this.showConfirmCountdownModal("失败", mContent, callback); this.showConfirmCountdownModal('失败', mContent, callback)
}, },
// (+) // (+)
showConfirmCountdownWarningModal(mContent, callback) { showConfirmCountdownWarningModal(mContent, callback) {
this.showConfirmCountdownModal("警告", mContent, callback); this.showConfirmCountdownModal('警告', mContent, callback)
}, },
// (+) // (+)
showConfirmCountdownQuestionModal(mContent, callback) { showConfirmCountdownQuestionModal(mContent, callback) {
this.showConfirmCountdownModal("疑问", mContent, callback); this.showConfirmCountdownModal('疑问', mContent, callback)
}, },
// (+) // (+)
@ -213,43 +208,43 @@
content: mContent, content: mContent,
showCancelButton: false, showCancelButton: false,
showConfirmCountdown: true, showConfirmCountdown: true,
success: function(res) { success(res) {
if (callback != undefined) { if (callback != undefined) {
if (res.confirm == true) { if (res.confirm == true) {
callback(true); callback(true)
console.log('用户点击确定') console.log('用户点击确定')
} else { } else {
callback(false); callback(false)
console.log('用户点击取消') console.log('用户点击取消')
} }
} }
} }
}); })
}, },
// (++) // (++)
showSelectCountdownMessageModal(mContent, callback) { showSelectCountdownMessageModal(mContent, callback) {
this.showSelectCountdownModal("消息", mContent, callback); this.showSelectCountdownModal('消息', mContent, callback)
}, },
// (++) // (++)
showSelectCountdownSuccessModal(mContent, callback) { showSelectCountdownSuccessModal(mContent, callback) {
this.showSelectCountdownModal("成功", mContent, callback); this.showSelectCountdownModal('成功', mContent, callback)
}, },
// (++) // (++)
showSelectCountdownFailModal(mContent, callback) { showSelectCountdownFailModal(mContent, callback) {
this.showSelectCountdownModal("失败", mContent, callback); this.showSelectCountdownModal('失败', mContent, callback)
}, },
// (++) // (++)
showSelectCountdownWarningModal(mContent, callback) { showSelectCountdownWarningModal(mContent, callback) {
this.showSelectCountdownModal("警告", mContent, callback); this.showSelectCountdownModal('警告', mContent, callback)
}, },
// (++) // (++)
showSelectCountdownQuestionModal(mContent, callback) { showSelectCountdownQuestionModal(mContent, callback) {
this.showSelectCountdownModal("疑问", mContent, callback); this.showSelectCountdownModal('疑问', mContent, callback)
}, },
// (++) // (++)
@ -258,18 +253,18 @@
iconType: mIconType, iconType: mIconType,
content: mContent, content: mContent,
showConfirmCountdown: true, showConfirmCountdown: true,
success: function(res) { success(res) {
if (callback != undefined) { if (callback != undefined) {
if (res.confirm == true) { if (res.confirm == true) {
callback(true); callback(true)
console.log('用户点击确定') console.log('用户点击确定')
} else { } else {
callback(false); callback(false)
console.log('用户点击取消') console.log('用户点击取消')
} }
} }
} }
}); })
}, },
// //
@ -278,22 +273,22 @@
this.iconType = data.iconType this.iconType = data.iconType
switch (data.iconType) { switch (data.iconType) {
case '消息': case '消息':
this.icon = '/static/icons/error-circle.svg'; this.icon = '/static/icons/error-circle.svg'
break; break
case '成功': case '成功':
this.icon = '/static/icons/checkmark-circle.svg'; this.icon = '/static/icons/checkmark-circle.svg'
break; break
case '失败': case '失败':
this.icon = '/static/icons/close-circle.svg'; this.icon = '/static/icons/close-circle.svg'
break; break
case '警告': case '警告':
this.icon = '/static/icons/warning.svg'; this.icon = '/static/icons/warning.svg'
break; break
case '疑问': case '疑问':
this.icon = '/static/icons/question-circle.svg'; this.icon = '/static/icons/question-circle.svg'
break; break
default: default:
break; break
} }
} }
// image // image
@ -301,8 +296,8 @@
this.title = data.title this.title = data.title
} }
if (data.content) { if (data.content) {
console.log(data.content); console.log(data.content)
this.content = data.content; this.content = data.content
} else { } else {
this.content = '' this.content = ''
} }
@ -358,24 +353,22 @@
} else { } else {
this.success = () => {} this.success = () => {}
} }
setTimeout(res => { setTimeout((res) => {
this.show = true; this.show = true
}, 500) }, 500)
if (this.showConfirmCountdown) { if (this.showConfirmCountdown) {
this.startTimer(); this.startTimer()
} }
}, },
startTimer() { startTimer() {
this.seconds = 3; this.seconds = 3
clearInterval(this.timer) clearInterval(this.timer)
this.timer = setInterval(() => { this.timer = setInterval(() => {
this.seconds-- this.seconds--
// console.log("", this.seconds); // console.log("", this.seconds);
if (this.seconds <= 0) { if (this.seconds <= 0) {
this.timeUp() this.timeUp()
return
} }
}, 1000) }, 1000)
}, },
@ -383,13 +376,9 @@
timeUp() { timeUp() {
// clearInterval(this.timer) // clearInterval(this.timer)
console.log('时间到') console.log('时间到')
this.confirmClose(); this.confirmClose()
}, }
}
},
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
@ -422,8 +411,6 @@
word-wrap: break-word; word-wrap: break-word;
word-break: break-all; word-break: break-all;
white-space: pre-line; white-space: pre-line;
} }
.cance_button { .cance_button {

87
src/components/tags/index.vue

@ -1,87 +0,0 @@
<template>
<view class="container" v-for="item in data">
<u-tag key="{{item.value}}">{{ item.text }}</u-tag>
</view>
</template>
<script setup lang="ts">
/* 初始化 */
import { onShow } from '@dcloudio/uni-app'
import { getCurrentInstance, ref, defineExpose } from 'vue'
const { proxy } = getCurrentInstance()
const data = ref([])
defineExpose({ data })
</script>
<style scoped lang="scss">
.container {
background: #f5f5f5;
min-height: 100vh;
margin: 10rpx;
}
.list {
background: #f5f5f5;
margin-top: 20rpx;
.item {
padding: 30rpx 30rpx 0px 30rpx;
margin-top: 20rpx;
background: white;
position: relative;
.title {
display: flex;
align-items: center;
padding-bottom: 20rpx;
.title-txt {
color: #409eff;
font-weight: bold;
font-size: 36rpx;
width: 0px;
flex: 1;
word-wrap: break-word;
}
.time {
color: #919191;
}
}
.dec {
padding-bottom: 20rpx;
display: flex;
align-items: center;
view {
&:nth-child(1) {
width: 160rpx;
}
&:nth-child(2) {
color: #999999;
flex: 1;
width: 0px;
word-wrap: break-word;
}
}
}
.last {
padding-bottom: 30rpx;
}
.bottom {
display: flex;
justify-content: space-between;
align-items: center;
border-top: 1px solid #e4e4e4;
padding: 20rpx 0px;
height: 90rpx;
}
}
}
</style>

469
src/components/verifition/Verify.vue

File diff suppressed because one or more lines are too long

14
src/components/verifition/utils/ase.js

@ -1,14 +0,0 @@
import CryptoJS from 'crypto-js'
/**
* @word 要加密的内容
* @keyWord String 服务器随机返回的关键字
* */
export function aesEncrypt(word, keyWord = "XwKsGlMcdPMEhR1B") {
var key = CryptoJS.enc.Utf8.parse(keyWord);
var srcs = CryptoJS.enc.Utf8.parse(word);
var encrypted = CryptoJS.AES.encrypt(srcs, key, {
mode: CryptoJS.mode.ECB,
padding: CryptoJS.pad.Pkcs7
});
return encrypted.toString();
}

17
src/components/verifition/utils/request.js

@ -1,17 +0,0 @@
import config from '@/config'
const baseUrl = config.baseUrl
export const myRequest = (option = {}) => {
return new Promise((reslove, reject) => {
uni.request({
url: baseUrl + option.url,
data: option.data,
method: option.method || "GET",
success: (result) => {
reslove(result)
},
fail: (error) => {
reject(error)
}
})
})
}

555
src/components/verifition/verifyPoint/verifyPoint.vue

File diff suppressed because one or more lines are too long

661
src/components/verifition/verifySlider/verifySlider.vue

File diff suppressed because one or more lines are too long

11
src/main.ts

@ -3,13 +3,14 @@ import * as Pinia from 'pinia'
// @ts-ignore // @ts-ignore
import uView from 'vk-uview-ui' import uView from 'vk-uview-ui'
import App from './App.vue' import App from './App.vue'
import comMessage from '@/mycomponents/common/comMessage.vue'
import noclick from './common/noclick.js'
import tab from './plugins/tab' import tab from './plugins/tab'
import modal from './plugins/modal' import modal from './plugins/modal'
import time from './plugins/time' import time from './plugins/time'
import auth from './plugins/auth' import storage from './plugins/storage'
// unocss // unocss
@ -31,7 +32,11 @@ export function createApp() {
app.config.globalProperties.$modal = modal app.config.globalProperties.$modal = modal
// 时间对象 // 时间对象
app.config.globalProperties.$time = time app.config.globalProperties.$time = time
app.config.globalProperties.$auth = auth // 节流
app.config.globalProperties.$throttle = noclick.throttle;
// 缓存
app.config.globalProperties.$storage = storage
app.component('ComMessage', comMessage)

37
src/manifest.json

@ -1,9 +1,10 @@
{ {
"name" : "富维汽车镜", "name" : "富维汽车镜",
"package" : "uni.UNI43932FE",
"appid" : "__UNI__DA78BC9", "appid" : "__UNI__DA78BC9",
"description" : "", "description" : "",
"versionName" : "1.0.0", "versionName" : "1.0.44",
"versionCode" : "100", "versionCode" : 44,
"transformPx" : false, "transformPx" : false,
/* 5+App */ /* 5+App */
"app-plus" : { "app-plus" : {
@ -47,6 +48,38 @@
/* SDK */ /* SDK */
"sdkConfigs" : { "sdkConfigs" : {
"ad" : {} "ad" : {}
},
"nativePlugins" : {
"TestModule" : {
"__plugin_info__" : {
"name" : "TestModule",
"description" : "打印",
"platforms" : "Android",
"url" : "",
"android_package_name" : "",
"ios_bundle_id" : "",
"isCloud" : false,
"bought" : -1,
"pid" : "",
"parameters" : {}
}
}
}
},
"nativePlugins" : {
"TestModule" : {
"__plugin_info__" : {
"name" : "TestModule",
"description" : "打印",
"platforms" : "Android",
"url" : "",
"android_package_name" : "",
"ios_bundle_id" : "",
"isCloud" : false,
"bought" : -1,
"pid" : "",
"parameters" : {}
}
} }
} }
}, },

111
src/mycomponents/balance/balance.vue

@ -1,24 +1,26 @@
<template> <template>
<view :class="dataContent.scaned?'scan_view':''" style="background-color: #ffffff;margin-bottom: 1px; "> <view :class="dataContent.scaned ? 'scan_view' : ''">
<view class="uni-flex uni-row space-between" style="align-items: center"> <view class="uni-flex uni-row space-between" style="align-items: center; padding: 20rpx">
<view> <view>
<pack v-if="isShowPack && dataContent.packingNumber" :packingCode="dataContent.packingNumber"></pack> <pack v-if="isShowParentPack && dataContent.parentNumber" title="父包装" :packingCode="dataContent.parentNumber"></pack>
<pack v-if="isShowPack && dataContent.packingNumber" :isShowPackingNumberProps="isShowPackingNumberProps" :packingCode="dataContent.packingNumber"></pack>
<batch v-if="isShowBatch && dataContent.batch" :batch="dataContent.batch"></batch> <batch v-if="isShowBatch && dataContent.batch" :batch="dataContent.batch"></batch>
<location title="来源库位" v-if="isShowFromLocation" :locationCode="dataContent.locationCode"></location> <location title="来源库位" v-if="isShowFromLocation" :locationCode="dataContent.locationCode"></location>
<to-location title="目标库位" v-if="isShowToLocation" :locationCode="dataContent.toLocationCode"> <to-location title="目标库位" v-if="isShowToLocation" :locationCode="dataContent.toLocationCode"> </to-location>
</to-location>
</view> </view>
<view> <view class="uni-flex" style="flex-direction: column">
<view class="uni-flex uni-row u-align-start">
<!-- <qty v-if="dataContent.record==null ||dataContent.record==undefined " :dataContent="dataContent" <!-- <qty v-if="dataContent.record==null ||dataContent.record==undefined " :dataContent="dataContent"
:isShowStdPack="isShowStdPack" :isShowStatus="isShowStatus"></qty> --> :isShowStdPack="isShowStdPack" :isShowStatus="isShowStatus"></qty> -->
<qty v-if="dataContent.handleQty==0 || dataContent.handleQty==undefined" :dataContent="dataContent" <qty v-if="dataContent.handleQty == 0 || dataContent.handleQty == undefined" :dataContent="dataContent" :isShowStdPack="isShowStdPack" :isShowStatus="isShowStatus"></qty>
:isShowStdPack="isShowStdPack" :isShowStatus="isShowStatus"></qty> <compare-qty v-else :dataContent="dataContent" :recommendQty="Number(dataContent.qty)" :handleQty="Number(dataContent.handleQty)" :isShowStdPack="isShowStdPack" :isShowStatus="isShowStatus"> </compare-qty>
<compare-qty v-else :dataContent="dataContent" :recommendQty="Number( dataContent.qty)"
:handleQty="Number (dataContent.handleQty)" :isShowStdPack="isShowStdPack">
</compare-qty>
<!-- <view class="uni-flex uni-row" style="vertical-align: center" v-if="isDevlement()"> <!-- <view class="uni-flex uni-row" style="vertical-align: center" v-if="isDevlement()">
<text style="font-size: 30rpx;color: #2979ff; " @click="copy">复制采购</text> <image style="width: 26rpx; height: 26rpx; margin-top: 40rpx" src="/static/icons/icon_copy.svg" alt="" @click="copy" />
<text style="font-size: 30rpx;color: #2979ff;" @click="copyPro">|制品</text> </view> -->
</view>
<!-- <view class="" v-if="dataContent.inventoryStatus">
<move-status :fromInventoryStatus="dataContent.inventoryStatus"> </move-status>
</view> --> </view> -->
</view> </view>
</view> </view>
@ -26,33 +28,17 @@
</view> </view>
</template> </template>
<script> <script setup lang="ts">
import pack from '@/mycomponents/balance/pack.vue' import pack from '@/mycomponents/balance/pack.vue'
import location from '@/mycomponents/balance/location.vue' import location from '@/mycomponents/balance/location.vue'
import toLocation from '@/mycomponents/balance/toLocation.vue' import toLocation from '@/mycomponents/balance/toLocation.vue'
import batch from '@/mycomponents/balance/batch.vue' import batch from '@/mycomponents/balance/batch.vue'
import qty from '@/mycomponents/qty/qty.vue' import qty from '@/mycomponents/qty/qty.vue'
import recommendQty from '@/mycomponents/qty/recommendQty.vue'//recommendQty
import compareQty from '@/mycomponents/qty/compareQty.vue' import compareQty from '@/mycomponents/qty/compareQty.vue'
// import config from '@/static/config.js' import config from '@/static/config.js'
import moveStatus from '@/mycomponents/balance/moveStatus.vue'
export default {
components: {
pack,
location,
toLocation,
batch,
qty,
recommendQty,
compareQty,
},
data() {
return {
} const props = defineProps({
},
props: {
dataContent: { dataContent: {
type: Object, type: Object,
default: {} default: {}
@ -81,26 +67,19 @@
type: Boolean, type: Boolean,
default: false default: false
}, },
isShowParentPack: {
type: Boolean,
default: true
}, },
watch: { isShowPackingNumberProps: {
type: Boolean,
}, default: false
methods: {
copy() {
// HPQ;V1.0;ICE115F11161AG;PP20230427000026;B20230427002;Q100
var content = "HPQ;V1.0;I" + this.dataContent.itemCode + ";P" + this.dataContent.packingNumber + ";B" +
this.dataContent.batch + ";Q" + this.dataContent.qty
// #ifdef H5
this.$copyText(content).then(
res => {
uni.showToast({
title: '复制成功',
icon: 'none'
})
} }
) })
// #endif const copy = () => {
// #ifndef H5 // HPQ;V1.0;ICE115F11161AG;PP20230427000026;B20230427002;Q100
const content = `HPQ;V1.0;I${props.dataContent.itemCode};P${props.dataContent.packingNumber};B${props.dataContent.batch};Q${props.dataContent.qty}`
uni.setClipboardData({ uni.setClipboardData({
data: content, data: content,
success: () => { success: () => {
@ -109,23 +88,11 @@
}) })
} }
}) })
// #endif
},
copyPro() {
// HPQ;V1.0;ICE115F11161AG;PP20230427000026;B20230427002;Q100
var content = "HMQ;V1.0;I" + this.dataContent.itemCode + ";P" + this.dataContent.packingNumber + ";B" +
this.dataContent.batch + ";Q" + this.dataContent.qty
// #ifdef H5
this.$copyText(content).then(
res => {
uni.showToast({
title: '复制成功',
icon: 'none'
})
} }
) const copyPro = () => {
// #endif // HPQ;V1.0;ICE115F11161AG;PP20230427000026;B20230427002;Q100
// #ifndef H5 const content = `HMQ;V1.0;I${props.dataContent.itemCode};P${props.dataContent.packingNumber};B${props.dataContent.batch};Q${props.dataContent.qty}`
uni.setClipboardData({ uni.setClipboardData({
data: content, data: content,
success: () => { success: () => {
@ -134,14 +101,10 @@
}) })
} }
}) })
// #endif
},
// isDevlement() {
// return config.isDevelopment;
// }
} }
const isDevlement = () => {
return config.isDevelopment
} }
</script> </script>
<style> <style></style>
</style>

2
src/mycomponents/balance/balanceDetailPopup.vue

@ -4,7 +4,7 @@
<!-- <com-item :dataContent="dataContent.package"></com-item> <!-- <com-item :dataContent="dataContent.package"></com-item>
<u-line></u-line> <view class='split_line'></view>
<scroll-view style="height:320px "> <scroll-view style="height:320px ">
<view v-for="(item, index) in dataList" style="width: 100%;"> <view v-for="(item, index) in dataList" style="width: 100%;">
<view class="item"> <view class="item">

2
src/mycomponents/balance/balanceMove.vue

@ -18,7 +18,7 @@
</view> </view>
</view> </view>
<u-line></u-line> <view class='split_line'></view>
</view> </view>
</template> </template>

73
src/mycomponents/balance/balanceSelect.vue

@ -1,54 +1,49 @@
<!--发料任务卡片--> <!--发料任务卡片-->
<template> <template>
<!-- <page-meta root-font-size="18px"></page-meta> --> <!-- <page-meta root-font-size="18px"></page-meta> -->
<uni-popup ref="popupItems" type="center"> <u-popup v-model="show" mode="center">
<scroll-view scroll-y="true" style="background-color: #EEEEEE;height: 90vh;"> <scroll-view scroll-y="true" style="background-color: #eeeeee; height: 90vh">
<item :dataContent="balanceItems[0]"></item> <item style="margin: 10rpx" :dataContent="balanceItems[0]"></item>
<view class="popinpop count_shadow" style="width: 90vw;margin: 20rpx 20rpx 30rpx 20rpx;" <view class="popinpop count_shadow" style="width: 90vw; margin: 20rpx 20rpx 30rpx 20rpx" v-for="(item, index) in balanceItems" :key="item.id" @click="callback(item)">
v-for="(item, index) in balanceItems" :key="item.id" @click="callback(item)"> <balance :dataContent="item" :isShowStatus="false"></balance>
<balance :dataContent="item"></balance> </view>
<view class="page-footer">
<view class="uni-flex space-between" style="width: 100%">
<!-- <view class=" uni-flex uni-row"> -->
<button class="btn_single_reject" hover-class="btn_commit_after" @click="close">关闭</button>
<!-- </view> -->
</view>
</view> </view>
</scroll-view> </scroll-view>
</uni-popup> </u-popup>
</template> </template>
<script> <script setup lang="ts">
import { ref, getCurrentInstance } from 'vue'
import item from '@/mycomponents/item/item.vue' import item from '@/mycomponents/item/item.vue'
import balance from '@/mycomponents/balance/balance.vue' import balance from '@/mycomponents/balance/balance.vue'
export default { const balanceItems = ref([])
name: "balanceSelect", const show = ref(false)
emits: ['onSelectItem'], const openPopup = (items) => {
components: { if (Array.isArray(items)) {
item, balanceItems.value = items
balance } else {
}, balanceItems.value = [items]
data() { }
return { show.value = true
balanceItems: [], }
};
},
//
props: {
// datacontent: {
// type: Object,
// value: null
// }
},
methods: {
openPopup(items) {
this.balanceItems = items;
this.$refs['popupItems'].open("center");
},
callback(item) {
this.$emit("onSelectItem", item);
this.$refs['popupItems'].close();
},
const callback = (item) => {
emit('onSelectItem', item)
show.value = false
} }
const close = () => {
show.value = false
} }
const emit = defineEmits(['onSelectItem'])
defineExpose({ openPopup })
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss"></style>
</style>

17
src/mycomponents/balance/batch.vue

@ -1,24 +1,19 @@
<template> <template>
<view class="card_view"> <view class="card_view">
<text class="card_batch card_content ">批次</text> <text class="card_batch">批次</text>
<text class="card_content">{{batch}}</text> <text class="card_content">{{batch}}</text>
</view> </view>
</template> </template>
<script> <script setup lang="ts">
export default { const props = defineProps({
data() {
return {}
},
props: {
batch: { batch: {
type: String, type: String,
default: "" default: ""
} }
}, })
}
</script> </script>
<style> <style scoped>
</style> </style>

37
src/mycomponents/balance/bussinessType.vue

@ -1,37 +1,26 @@
<template> <template>
<view class="business_view"> <view class="card_view">
<text class="card_business">{{businessTypeDesc(bussinessType)}}</text> <text class="card_business">业务类型</text>
<text class="card_business_content">{{number}}</text> <text class="card_business_content">{{ businessTypeDesc(bussinessType) }}</text>
</view> </view>
</template> </template>
<script> <script setup lang="ts">
import { import { getBusinessTypeName } from '@/common/directory.js'
getBusinessTypeDesc
} from '@/common/directory.js'; const props = defineProps({
export default {
data() {
return {}
},
props: {
bussinessType: { bussinessType: {
type: String, type: String,
default: "" default: ''
}, },
number: { number: {
type: String, type: String,
default: "" default: ''
}
},
methods:{
businessTypeDesc(type){
return getBusinessTypeDesc(type)
} }
})
} const businessTypeDesc = (type) => {
return getBusinessTypeName(type)
} }
</script> </script>
<style> <style></style>
</style>

45
src/mycomponents/balance/handleBalance.vue

@ -1,45 +1,29 @@
<template> <template>
<view :class="detail.scaned?'scan_view':''" style="background-color: #ffffff;"> <view :class="detail.scaned ? 'scan_view' : ''" style="background-color: #ffffff">
<view class="space_between center"> <view class="space_between center">
<view style="word-break: break-all;width: 60%;"> <view style="word-break: break-all; width: 60%">
<pack title="外包装" v-if="detail.parentPackingNumber" :packingCode="detail.parentPackingNumber"></pack>
<pack v-if="isShowPack" :packingCode="detail.packingNumber"></pack> <pack v-if="isShowPack" :packingCode="detail.packingNumber"></pack>
<batch v-if="isShowBatch" :batch="detail.batch"></batch> <batch v-if="isShowBatch" :batch="detail.batch"></batch>
<location v-if="isShowLocation" :locationCode="detail.fromLocationCode"></location> <location v-if="isShowLocation" :locationCode="detail.fromLocationCode"></location>
</view> </view>
<view style="word-break: break-all;"> <view style="word-break: break-all">
<recommend-qty v-if="detail.record==null || detail.record==undefined" :dataContent="detail" <recommend-qty v-if="detail.record == null || detail.record == undefined" :dataContent="detail" :isShowStatus="isShowStatus" :isShowStdPack="true"></recommend-qty>
:isShowStdPack="false"></recommend-qty>
<compare-qty v-else :dataContent="detail" :recommendQty="detail.qty" :handleQty="detail.record.qty" <compare-qty v-else :dataContent="detail" :recommendQty="detail.qty" :handleQty="detail.record.qty" :isShowStatus="isShowStatus" :isShowStdPack="true"> </compare-qty>
:isShowStdPack="false">
</compare-qty>
</view> </view>
</view> </view>
</view> </view>
</template> </template>
<script> <script setup lang="ts">
import pack from '@/mycomponents/balance/pack.vue' import pack from '@/mycomponents/balance/pack.vue'
import location from '@/mycomponents/balance/location.vue' import location from '@/mycomponents/balance/location.vue'
import batch from '@/mycomponents/balance/batch.vue' import batch from '@/mycomponents/balance/batch.vue'
import recommendQty from '@/mycomponents/qty/recommendQty.vue' import recommendQty from '@/mycomponents/qty/recommendQty.vue'
import compareQty from '@/mycomponents/qty/compareQty.vue' import compareQty from '@/mycomponents/qty/compareQty.vue'
export default { const props = defineProps({
components: {
pack,
location,
batch,
recommendQty,
compareQty
},
data() {
return {
}
},
props: {
detail: { detail: {
type: Object, type: Object,
default: {} default: {}
@ -56,15 +40,11 @@
type: Boolean, type: Boolean,
default: true default: true
}, },
isShowStatus: {
}, type: Boolean,
watch: { default: true
},
methods: {
}
} }
})
</script> </script>
<style> <style>
@ -75,6 +55,5 @@
width: 10px; width: 10px;
height: 30px; height: 30px;
opacity: 1; opacity: 1;
} }
</style> </style>

22
src/mycomponents/balance/location.vue

@ -1,18 +1,12 @@
<template> <template>
<view class="card_view"> <view class="card_view">
<text class="card_location card_content ">{{title}}</text> <text class="card_location">{{ title }}</text>
<text class="card_content ">{{locationCode}}</text> <text class="card_big_content" style="font-size: 40rpx">{{ locationCode }}</text>
</view> </view>
</template> </template>
<script> <script setup lang="ts">
export default { const props = defineProps({
components: {
},
data() {
return {}
},
props: {
locationCode: { locationCode: {
type: String, type: String,
default: '' default: ''
@ -20,12 +14,10 @@
title: { title: {
type: String, type: String,
default: '库位' default: '库位'
},
},
} }
})
</script> </script>
<style> <style scoped>
</style> </style>

41
src/mycomponents/balance/pack.vue

@ -1,34 +1,33 @@
<template> <template>
<view class="card_view"> <view class="card_view" v-if="ShowPackingNumber">
<text class="card_packing_code card_content ">箱码</text> <text class="card_packing_code">{{ title }}</text>
<text class="card_content">{{ packingCode }}</text> <text class="card_content">{{ packingCode }}</text>
</view> </view>
</template> </template>
<script> <script setup lang="ts">
export default { import {getSwitchInfoByCode} from '@/common/basic.js';
components: { import {onMounted} from "vue";
}, import {ref} from "vue";
const props = defineProps({
data() {
return {
}
},
props: {
packingCode: { packingCode: {
type: String, type: String,
default: '' default: ''
}, },
}, title: {
watch: { type: String,
default: '包装'
},
methods: {
}
} }
})
const ShowPackingNumber = ref(true)
onMounted(()=>{
ShowPackingNumber.value = getSwitchInfoByCode('ShowPackingNumber')
})
</script> </script>
<style> <style lang="scss" scoped>
.card_packing_code {
padding: 0;
}
</style> </style>

29
src/mycomponents/balance/productionLabel.vue

@ -1,26 +1,15 @@
<template> <template>
<view :class="dataContent.scaned ? 'scan_view' : ''"> <view :class="dataContent.scaned ? 'scan_view' : ''">
<balance :dataContent="dataContent" :isShowStdPack="false" :isShowPack="isShowPack" <balance :dataContent="dataContent" :isShowStdPack="false" :isShowPack="isShowPack" :isShowFromLocation="isShowLocation"></balance>
:isShowFromLocation="isShowLocation"></balance>
<production-info :dataContent="packageContent"></production-info> <production-info :dataContent="packageContent"></production-info>
</view> </view>
</template> </template>
<script> <script setup lang="ts">
import balance from '@/mycomponents/balance/balance.vue' import balance from '@/mycomponents/balance/balance.vue'
import productionInfo from '@/mycomponents/production/productionInfo.vue' import productionInfo from '@/mycomponents/production/productionInfo.vue'
export default { const props = defineProps({
components: {
balance,
productionInfo
},
data() {
return {
}
},
props: {
dataContent: { dataContent: {
type: Object, type: Object,
default: {} default: {}
@ -45,15 +34,7 @@
type: Boolean, type: Boolean,
default: true default: true
} }
}, })
watch: {
},
methods: {
}
}
</script> </script>
<style> <style></style>
</style>

45
src/mycomponents/balance/recommendBalance.vue

@ -1,10 +1,8 @@
<template> <template>
<view :class="detail.scaned?'scan_view':''" style="background-color: #fff;"> <view :class="detail.scaned ? 'scan_view' : ''" style="background-color: #fff">
<view class="uni-flex uni-row space-between center"> <view class="uni-flex uni-row space-between center">
<view class="uni-flex uni-row " style="width: 60%;margin-left: 30rpx;" > <view class="uni-flex uni-row" style="width: 60%">
<view style=" width: 25rpx;color: #32C1E8;"> <view style="width: 20rpx; color: #1677ff; margin-right: 20rpx; font-size: 24rpx"> 推荐 </view>
推荐
</view>
<view style="word-break: break-all"> <view style="word-break: break-all">
<pack v-if="isShowPack" :packingCode="detail.packingNumber"></pack> <pack v-if="isShowPack" :packingCode="detail.packingNumber"></pack>
<batch v-if="isShowBatch" :batch="detail.batch"></batch> <batch v-if="isShowBatch" :batch="detail.batch"></batch>
@ -12,39 +10,21 @@
</view> </view>
</view> </view>
<view style="word-break: break-all"> <view style="word-break: break-all">
<recommend-qty v-if="detail.Records==null || detail.Records.length==0" :dataContent="detail" <recommend-qty v-if="detail.Records == null || detail.Records.length == 0" :dataContent="detail" :isShowStdPack="false" :isShowStatus="false"></recommend-qty>
:isShowStdPack="false" :isShowStatus="false"></recommend-qty> <compare-qty v-else :dataContent="detail" :recommendQty="Number(detail.qty)" :handleQty="Number(detail.handleQty)" :isShowStdPack="false" :isShowStatus="false"> </compare-qty>
<compare-qty v-else :dataContent="detail" :recommendQty="Number( detail.qty)"
:handleQty="Number(detail.handleQty)" :isShowStdPack="false" :isShowStatus="false">
</compare-qty>
</view> </view>
</view> </view>
</view> </view>
</template> </template>
<script> <script setup lang="ts">
import pack from '@/mycomponents/balance/pack.vue' import pack from '@/mycomponents/balance/pack.vue'
import location from '@/mycomponents/balance/location.vue' import location from '@/mycomponents/balance/location.vue'
import batch from '@/mycomponents/balance/batch.vue' import batch from '@/mycomponents/balance/batch.vue'
//
import recommendQty from '@/mycomponents/qty/recommendQty.vue' import recommendQty from '@/mycomponents/qty/recommendQty.vue'
import compareQty from '@/mycomponents/qty/compareQty.vue' import compareQty from '@/mycomponents/qty/compareQty.vue'
export default { const props = defineProps({
components: {
pack,
location,
batch,
recommendQty,
compareQty
},
data() {
return {
}
},
props: {
detail: { detail: {
type: Object, type: Object,
default: {} default: {}
@ -60,16 +40,8 @@
isShowLocation: { isShowLocation: {
type: Boolean, type: Boolean,
default: true default: true
},
},
watch: {
},
methods: {
}
} }
})
</script> </script>
<style> <style>
@ -80,6 +52,5 @@
width: 10px; width: 10px;
height: 30px; height: 30px;
opacity: 1; opacity: 1;
} }
</style> </style>

26
src/mycomponents/balance/toLocation.vue

@ -1,31 +1,19 @@
<template> <template>
<view class="card_view"> <view class="card_view">
<text class="card_to_location card_content ">{{title}}</text> <text class="card_to_location">{{ title }}</text>
<text class="card_content ">{{locationCode}}</text> <text class="card_big_content">{{ locationCode }}</text>
</view> </view>
</template> </template>
<script setup lang="ts">
<script> const props = defineProps({
export default {
components: {
},
data() {
return {}
},
props: {
locationCode: { locationCode: {
type: String, type: String
default: ''
}, },
title: { title: {
type: String, type: String,
default: '库位' default: '库位'
},
},
} }
})
</script> </script>
<style> <style></style>
</style>

64
src/mycomponents/button/requestButton.vue

@ -4,53 +4,43 @@
<image src="@/static/icons_ui/icon_add.svg"></image> <image src="@/static/icons_ui/icon_add.svg"></image>
<view>{{btnName}}</view> <view>{{btnName}}</view>
</view> </view>
<!-- <movable-area>
<movable-view class="max" direction="all">扫描</movable-view>
</movable-area> -->
</view> </view>
</template> </template>
<script> <script setup lang="ts">
export default { import {
data() { ref,
return { nextTick
x: 0, } from 'vue'
y: 0, const props = defineProps({
old: {
x: 0,
y: 0
}
}
},
props: {
btnName: { btnName: {
type: String, type: String,
default: '创建' default: '创建'
}, },
},
created() {
},
methods: {
goScan(content) {
this.$emit("goScan", '');
},
tap: function(e) {
this.x = this.old.x
this.y = this.old.y
this.$nextTick(function() {
this.x = 30
this.y = 30
}) })
}, const x = ref(0)
onChange: function(e) { const y = ref(0)
this.old.x = e.detail.x const old= ref({
this.old.y = e.detail.y x: 0,
y: 0
})
const goScan=(content)=> {
emit("goScan", '');
} }
}, const tap=(e) =>{
x.value = old.value.x
y.value = old.value.y
nextTick(function() {
x.value = 30
y.value = 30
})
}
const onChange=(e) =>{
old.value.x = e.detail.x
old.value.y = e.detail.y
} }
//
const emit = defineEmits(['goScan'])
</script> </script>
<style> <style>

30
src/mycomponents/common/comBlankView.vue

@ -3,29 +3,23 @@
<image class="img_goscan" src="@/static/icons_ui/default_blank.png"></image> <image class="img_goscan" src="@/static/icons_ui/default_blank.png"></image>
<button @click="goScan"> <button @click="goScan">
<image src="@/static/icons_ui/icon_add.svg"></image> <image src="@/static/icons_ui/icon_add.svg"></image>
去扫描 {{ title }}
</button> </button>
</view> </view>
</template> </template>
<script> <script setup lang="ts">
export default { const props = defineProps({
data() { title: {
return { type: String,
default: '去扫描'
}
},
created() {
},
methods: {
goScan(content) {
this.$emit("goScan", '');
}
} }
})
const goScan = (content) => {
emit('goScan', '')
} }
//
const emit = defineEmits(['goScan'])
</script> </script>
<style></style>
<style>
</style>

27
src/mycomponents/common/comEmptyView.vue

@ -4,36 +4,11 @@
<view class=""> <view class="">
<image class="default_nodata" src="@/static/icons_ui/default_data.png"></image> <image class="default_nodata" src="@/static/icons_ui/default_data.png"></image>
</view> </view>
<!--
<view class="" style="display: flex;flex-direction: column;
align-items: center;">
<view class="" >
<image class="nodata" src="/static/icons_ui/default_data.png"></image>
</view>
<view style="font-size: 40rpx;color: #909193;">
暂无数据
</view>
</view> -->
</view> </view>
</template> </template>
<script> <script setup lang="ts">
export default {
data() {
return {
}
},
created() {
},
methods: {
}
}
</script> </script>

4
src/mycomponents/common/comListHint.vue

@ -39,14 +39,14 @@
</view> --> </view> -->
</view> </view>
<u-line></u-line> <view class='split_line'></view>
<view class="" v-for="(item, index) in dataList"> <view class="" v-for="(item, index) in dataList">
<view class="item" v-if="(item.title!='worker')" v-show="(item.title!='date')"> <view class="item" v-if="(item.title!='worker')" v-show="(item.title!='date')">
<text class="item_title">{{item.title}} : </text> <text class="item_title">{{item.title}} : </text>
<text class="text_wrap">{{item.content}} </text> <text class="text_wrap">{{item.content}} </text>
</view> </view>
</view> </view>
<u-line></u-line> <view class='split_line'></view>
<view v-if="isShowbottom" style="margin-top: 10rpx;margin-bottom: 10rpx;width: 100%;display: flex;" <view v-if="isShowbottom" style="margin-top: 10rpx;margin-bottom: 10rpx;width: 100%;display: flex;"
class="uni-flex uni-row space-between u-col-center"> class="uni-flex uni-row space-between u-col-center">
<view class="uni-flex uni-row u-col-center " style="flex: 1; overflow: hidden;"> <view class="uni-flex uni-row u-col-center " style="flex: 1; overflow: hidden;">

96
src/mycomponents/common/comListItem.vue

@ -1,27 +1,25 @@
<template> <template>
<view class="">
<view class="uni-flex uni-column"> <view class="uni-flex uni-column">
<view class="item" v-for="(item,index) in dataList"> <view class="item" v-for="(item,index) in dataList">
<text class="item_title">{{item.title}} : </text> <text class="item_title">{{item.title}} : </text>
<text v-if="(item.type=='')||(item.type==undefined)" class="text_wrap">{{item.content}} </text> <text v-if="(item.type=='')||(item.type==undefined)" class="text_wrap">{{item.content}} </text>
<text v-else-if="item.type=='dateTime'" class="text_wrap">{{formatDate(item.content)}} </text> <text v-else-if="item.type=='dateTime'" class="text_wrap">{{formatDate(item.content)}} </text>
<text v-else-if="item.type=='boolean'" class="text_wrap">{{boolean(item.content)}} </text> <text v-else-if="item.type=='boolean'" class="text_wrap">{{boolean(item.content)}} </text>
<text v-else-if="item.type=='transferMode'" class="text_wrap">{{getTransferModeName(item.content)}} </text> <text v-else-if="item.type=='transferMode'" class="text_wrap">{{handleGetTransferModeName(item.content)}} </text>
<text v-else-if="item.type=='locationType'" class="text_wrap">{{getLocationTypeNameList(getDirectoryItemArray(item.content))}} </text> <text v-else-if="item.type=='locationType'" class="text_wrap">{{handleGetLocationTypeNameList(handleGetDirectoryItemArray(item.content))}} </text>
<text v-else-if="item.type=='uom'" class="text_wrap">{{getUnitInfo(item.content)}} </text> <text v-else-if="item.type=='uom'" class="text_wrap">{{handleGetUomInfo(item.content)}} </text>
<text v-else-if="item.type=='inspectType'" class="text_wrap">{{getInspectType(item.content)}} </text> <text v-else-if="item.type=='inspectType'" class="text_wrap">{{handleGetInspectType(item.content)}} </text>
<text v-else-if="item.type=='sampleMethod'" class="text_wrap">{{getSampleMethod(item.content)}} </text> <text v-else-if="item.type=='sampleMethod'" class="text_wrap">{{handleGetSampleMethod(item.content)}} </text>
<text v-else-if="item.type=='requestState'" class="text_wrap">{{getRequestStateInfo(item.content)}} </text> <text v-else-if="item.type=='requestState'" class="text_wrap">{{handleGetRequestStateInfo(item.content)}} </text>
<text v-else-if="item.type=='inventoryStatus'" class="text_wrap">{{getInventoryStatusName(item.content)}} </text> <text v-else-if="item.type=='inventoryStatus'" class="text_wrap">{{handleGetInventoryStatusName(item.content)}} </text>
<text v-else-if="item.type=='locationCode'" class="text_wrap">{{getLocationTypeName(item.content)}} </text> <text v-else-if="item.type=='locationCode'" class="text_wrap">{{handleGetLocationTypeName(item.content)}} </text>
</view> </view>
</view> </view>
</view>
</template> </template>
<script> <script setup lang="ts">
import { import {
dateFormat dateFormat
} from '@/common/basic.js'; } from '@/common/basic.js';
@ -30,7 +28,7 @@
getTransferModeName, getTransferModeName,
getLocationTypeNameList, getLocationTypeNameList,
getDirectoryItemArray, getDirectoryItemArray,
getUnitInfo, getUomInfo,
getInspectType, getInspectType,
getSampleMethod, getSampleMethod,
getRequestStateInfo, getRequestStateInfo,
@ -38,69 +36,49 @@
getLocationTypeName getLocationTypeName
} from '@/common/directory.js'; } from '@/common/directory.js';
export default { const props = defineProps({
components: {},
data() {
return {
}
},
mounted() {},
watch: {
// dataContent: {
// handler(newName, oldName) {
// },
// immediate: true,
// deep: true
// }
},
props: {
dataList: { dataList: {
type: Array, type: Array,
default: [] default: []
} }
}, })
const avaliable=(value)=> {
methods: {
avaliable(value) {
return value == "TRUE" ? "可用" : "不可用" return value == "TRUE" ? "可用" : "不可用"
}, }
boolean(value) { const boolean=(value)=> {
return value == "TRUE" ? "是" : "否" return value == "TRUE" ? "是" : "否"
}, }
formatDate(val) { const formatDate=(val)=> {
return dateFormat(val) return dateFormat(val)
}, }
getTransferModeName(value){ const handleGetTransferModeName=(value)=>{
return getTransferModeName(value) return getTransferModeName(value)
}, }
getLocationTypeNameList(value){ const handleGetLocationTypeNameList=(value)=>{
return getLocationTypeNameList(value) return getLocationTypeNameList(value)
}, }
getDirectoryItemArray(value){ const handleGetDirectoryItemArray=(value)=>{
return getDirectoryItemArray(value) return getDirectoryItemArray(value)
}, }
getUnitInfo(value){ const handleGetUomInfo=(value)=>{
return getUnitInfo(value).label return getUomInfo(value).label
}, }
getInspectType(value){ const handleGetInspectType=(value)=>{
return getInspectType(value) return getInspectType(value)
}, }
getSampleMethod(value){ const handleGetSampleMethod=(value)=>{
return getSampleMethod(value) return getSampleMethod(value)
}, }
getRequestStateInfo(value){ const handleGetRequestStateInfo=(value)=>{
return getRequestStateInfo(value).label return getRequestStateInfo(value).label
},
getInventoryStatusName(value){
return getInventoryStatusName(value)
},
getLocationTypeName(value){
return getLocationTypeName(value)
} }
const handleGetInventoryStatusName=(value)=>{
return getInventoryStatusName(value)
} }
const handleGetLocationTypeName=(value)=>{
return getLocationTypeName(value)
} }
</script> </script>
<style> <style>

540
src/mycomponents/common/comMessage.vue

@ -1,25 +1,34 @@
<template name="show-modal"> <template name="show-modal">
<view> <view>
<u-modal v-model="show" :title-style="{color: 'red'}" :title="title" :showTitle="false" <u-modal v-model="show" :title-style="{ color: 'red' }" :title="title" :showTitle="false" :showConfirmButton="false" ref="modal">
:showConfirmButton="false" ref="modal"> <view class="" style="width: 100%; display: flex; align-items: center; justify-content: center; margin-top: 10rpx">
<view class="" style=""> 版本号 : {{ version }} </view>
</view>
<view class="slot-content"> <view class="slot-content">
<slot name="icon"> <slot name="icon">
<image class="icon" :src="icon" /> <image class="icon" :src="icon" />
</slot> </slot>
<scroll-view style="max-height: 400rpx; " scroll-y="true">
<slot name="content"> <slot name="content">
<rich-text class="content" :nodes="content"> <view class="" style="display: flex;align-items: center;justify-content: center;">
</rich-text> <text class="text_content" :style="{'color': textColor?textColor:'#000'}" >
{{content}}
</text>
</view>
<!-- <rich-text class="content" :nodes="content" v-else></rich-text> -->
</slot> </slot>
<u-line></u-line> </scroll-view>
<view class="split_line"></view>
<slot name="button"> <slot name="button">
<view class="uni-flex uni-row u-col-center space-between" style="width: 100%;height: 48px;"> <view class="uni-flex uni-row u-col-center space-between" style="width: 100%; height: 50px">
<view v-if="showCancelButton" class="cance_button" @tap="cancelClose"> <view v-if="showCancelButton" class="cance_button" @tap="cancelClose">
<text :style="{'color':cancelColor}">{{ cancelText }}</text> <text :style="{ color: cancelColor }">{{ cancelText }}</text>
</view> </view>
<u-line direction="col" length="100%"></u-line> <u-line direction="col" length="100%"></u-line>
<view v-if="showConfirmButton" class="confirm_button" @tap="confirmClose"> <view v-if="showConfirmButton" class="confirm_button" @tap="confirmClose">
<text :style="{'color':confirmColor}">{{confirmText}}</text> <text :style="{ color: confirmColor }">{{ confirmText }}</text>
<text v-if="showConfirmCountdown">({{ seconds }}s关闭)</text> <text v-if="showConfirmCountdown">({{ seconds }}s关闭)</text>
</view> </view>
</view> </view>
@ -29,193 +38,233 @@
</view> </view>
</template> </template>
<script> <script setup lang="ts">
/** /**
* modal 模态框 * modal 模态框
* @description 弹出模态框常用于消息提示消息确认在当前页面内完成特定的交互操作 * @description 弹出模态框常用于消息提示消息确认在当前页面内完成特定的交互操作
* */ * */
export default { import { ref, getCurrentInstance, onMounted } from 'vue'
data() {
return { const timer = ref(null)
timer: null, const show = ref(false) //
show: false, // const iconType = ref('消息')
iconType: '消息', const icon = ref('../../static/icons/error-circle.svg')
icon: '../../static/icons/error-circle.svg', const title = ref('')
title: '', // const content = ref('') //
content: '', // const cancelText = ref('取消') //
cancelText: '取消', // const confirmText = ref('确定') //
confirmText: '确定', // const showCancel = ref(true) // true
showCancel: true, // true const confirmColor = ref('#007aff') //
confirmColor: '#007aff', // const cancelColor = ref(null) //
cancelColor: null, // const showConfirmButton = ref(true) //
showConfirmButton: true, // const showConfirmCountdown = ref(true) //
showConfirmCountdown: true, // const showCancelButton = ref(true) //
showCancelButton: true, // const showClose = ref(false)
showClose: false, const confirm = ref(false) // true
confirm: false, // true const cancel = ref(false) // true
cancel: false, // true const isDisabled = ref(true) // true
isDisabled: true, // true const seconds = ref(0)
seconds: 0, const success = ref(() => {})
success: () => {} // const version = ref('')
} const modal = ref(null)
}, const textColor = ref('')
const count = ref(0)
// onMounted(() => {
methods: { // const systemInfo = uni.getSystemInfoSync()
open() { // // #ifdef H5
this.show = true; // version.value = systemInfo.appVersion
this.isDisabled = true; // console.log(systemInfo.appVersion, '')
}, // // #endif
close() {
this.$.refs.modal.popupClose(); // // #ifdef APP
this.isDisabled = false; // version.value = systemInfo.appWgtVersion
}, // // #endif
confirmClose() { // })
if (!this.isDisabled) return const getVersionCode = () => {
this.isDisabled = false const systemInfo = uni.getSystemInfoSync()
// #ifdef H5
version.value = systemInfo.appVersion
console.log(systemInfo.appVersion, '版本号')
// #endif
// #ifdef APP
version.value = systemInfo.appWgtVersion
// #endif
}
const open = () => {
getVersionCode()
show.value = true
isDisabled.value = true
}
const close = () => {
show.value = false
isDisabled.value = false
}
const confirmClose = () => {
if (!isDisabled.value) return
isDisabled.value = false
// console.log('') // console.log('')
if (this.show) { if (show.value) {
this.show = false; show.value = false
clearInterval(this.timer) //timer clearInterval(timer.value) // timer
this.$.refs.modal.popupClose(); if(modal.value){
this.success({ modal.value.popupClose()
}
success.value({
// cancel: false, // cancel: false,
confirm: true, confirm: true
}); })
} }
}, }
const cancelClose = () => {
cancelClose() { if (!isDisabled.value) return
if (!this.isDisabled) return isDisabled.value = false
this.isDisabled = false clearInterval(timer.value) // timer
clearInterval(this.timer) //timer show.value = false
this.$.refs.modal.popupClose(); success.value({
this.success({
// cancel: true, // cancel: true,
confirm: false, confirm: false
}); })
}, }
// (+) // (+)
showMessage(mContent, callback) { const showMessage = (mContent, callback) => {
this.showConfirmCountdownModal("消息", mContent, callback); showConfirmCountdownModal('消息', mContent, callback)
}, }
// (+) // (+)
showSuccessMessage(mContent, callback) { const showSuccessMessage = (mContent, callback) => {
this.showConfirmCountdownModal("成功", mContent, callback); showConfirmCountdownModal('成功', mContent, callback)
}, }
// ( // (
showErrorMessage(mContent, callback) { const showErrorMessage = (mContent, callback) => {
this.showConfirmModal("失败", mContent, callback); showConfirmModal('失败', mContent, callback)
}, }
// ( // (
showBreakMessage(mContent, callback) { const showBreakMessage = (mContent, callback) => {
this.showNoButtonModal("失败", mContent, callback); showNoButtonModal('失败', mContent, callback)
}, }
// (+ // (+
showQuestionMessage(mContent, callback) { const showQuestionMessage = (mContent, callback) => {
this.showSelectModal("疑问", mContent, callback); showSelectModal('疑问', mContent, callback)
}, }
// (+
const showQuestionMessage1 = (mContent,textColor, callback)=> {
console.log(textColor)
showSelectModal1("疑问", mContent, callback,textColor);
}
// (+) // (+)
showWarningMessage(mContent, callback) { const showWarningMessage = (mContent, callback) => {
this.showConfirmCountdownModal("警告", mContent, callback); showConfirmCountdownModal('警告', mContent, callback)
}, }
// (+) // (+)
showConfirmCountdownFailModal(mContent, callback) { const showConfirmCountdownFailModal = (mContent, callback) => {
this.showConfirmCountdownModal("失败", mContent, callback); showConfirmCountdownModal('失败', mContent, callback)
}, }
// ( // (
showConfirmMessageModal(mContent, callback) { const showConfirmMessageModal = (mContent, callback) => {
this.showConfirmModal("消息", mContent, callback); showConfirmModal('消息', mContent, callback)
}, }
// ( // (
showConfirmSuccessModal(mContent, callback) { const showConfirmSuccessModall = (mContent, callback) => {
this.showConfirmModal("成功", mContent, callback); showConfirmModal('成功', mContent, callback)
}, }
// ( // (
showConfirmWarningModal(mContent, callback) { const showConfirmWarningModal = (mContent, callback) => {
this.showConfirmModal("警告", mContent, callback); showConfirmModal('警告', mContent, callback)
}, }
// ( // (
showConfirmQuestionModal(mContent, callback) { const showConfirmQuestionModal = (mContent, callback) => {
this.showConfirmModal("疑问", mContent, callback); showConfirmModal('疑问', mContent, callback)
}, }
// ( // (
showNoButtonModal(mIconType, mContent, callback) { const showNoButtonModal = (mIconType, mContent, callback) => {
this.showModal({ showModal({
iconType: mIconType, iconType: mIconType,
content: mContent, content: mContent,
showConfirmButton: false, showConfirmButton: false,
showCancelButton: false, showCancelButton: false,
success: function(res) { success(res) {
if (callback != undefined) { if (callback != undefined) {
if (res.confirm == true) { if (res.confirm == true) {
callback(true); callback(true)
} else { } else {
callback(false); callback(false)
} }
} }
} }
}); })
}, }
// ( // (
showConfirmModal(mIconType, mContent, callback) { const showConfirmModal = (mIconType, mContent, callback) => {
this.showModal({ console.log(11)
showModal({
iconType: mIconType, iconType: mIconType,
content: mContent, content: mContent,
showCancelButton: false, showCancelButton: false,
success: function(res) { success(res) {
console.log(11, res)
if (callback != undefined) { if (callback != undefined) {
if (res.confirm == true) { if (res.confirm == true) {
callback(true); callback(true)
} else { } else {
callback(false); callback(false)
} }
} }
} }
}); })
}, }
// (+ // (+
showSelectMessageModal(mContent, callback) { const showSelectMessageModal = (mContent, callback) => {
this.showSelectModal("消息", mContent, callback); showSelectModal('消息', mContent, callback)
}, }
// (+ // (+
showSelectSuccessModal(mContent, callback) { const showSelectSuccessModal = (mContent, callback) => {
this.showSelectModal("成功", mContent, callback); showSelectModal('成功', mContent, callback)
}, }
// (+ // (+
showSelectFailModal(mContent, callback) { const showSelectFailModal = (mContent, callback) => {
this.showSelectModal("失败", mContent, callback); showSelectModal('失败', mContent, callback)
}, }
// (+ // (+
showSelectWarningModal(mContent, callback) { const showSelectWarningModal = (mContent, callback) => {
this.showSelectModal("警告", mContent, callback); showSelectModal('警告', mContent, callback)
}, }
// (+ // (+
showSelectModal(mIconType, mContent, callback) { const showSelectModal = (mIconType, mContent, callback) => {
showModal({
iconType: mIconType,
content: mContent,
success(res) {
if (callback != undefined) {
if (res.confirm == true) {
callback(true)
console.log('用户点击确定')
} else {
callback(false)
console.log('用户点击取消')
}
}
}
})
}
// (+
const showSelectModal1 = (mIconType, mContent, callback,textColor)=> {
this.showModal({ this.showModal({
iconType: mIconType, iconType: mIconType,
content: mContent, content: mContent,
textColor:textColor,
success: function(res) { success: function(res) {
if (callback != undefined) { if (callback != undefined) {
if (res.confirm == true) { if (res.confirm == true) {
@ -226,198 +275,221 @@
console.log('用户点击取消') console.log('用户点击取消')
} }
} }
} }
}); });
}, }
// (+) // (+)
showConfirmCountdownQuestionModal(mContent, callback) { const showConfirmCountdownQuestionModal = (mContent, callback) => {
this.showConfirmCountdownModal("疑问", mContent, callback); showConfirmCountdownModal('疑问', mContent, callback)
}, }
// (+) // (+)
showConfirmCountdownModal(mIconType, mContent, callback) { const showConfirmCountdownModal = (mIconType, mContent, callback) => {
this.showModal({ showModal({
iconType: mIconType, iconType: mIconType,
content: mContent, content: mContent,
showCancelButton: false, showCancelButton: false,
showConfirmCountdown: true, showConfirmCountdown: true,
success: function(res) { success(res) {
if (callback != undefined) { if (callback != undefined) {
if (res.confirm == true) { if (res.confirm == true) {
callback(true); callback(true)
} else { } else {
callback(false); callback(false)
} }
} }
} }
}); })
}, }
// (++) // (++)
showSelectCountdownMessageModal(mContent, callback) { const showSelectCountdownMessageModal = (mContent, callback) => {
this.showSelectCountdownModal("消息", mContent, callback); showSelectCountdownModal('消息', mContent, callback)
}, }
// (++) // (++)
showSelectCountdownSuccessModal(mContent, callback) { const showSelectCountdownSuccessModal = (mContent, callback) => {
this.showSelectCountdownModal("成功", mContent, callback); showSelectCountdownModal('成功', mContent, callback)
}, }
// (++) // (++)
showSelectCountdownFailModal(mContent, callback) { const showSelectCountdownFailModal = (mContent, callback) => {
this.showSelectCountdownModal("失败", mContent, callback); showSelectCountdownModal('失败', mContent, callback)
}, }
// (++) // (++)
showSelectCountdownWarningModal(mContent, callback) { const showSelectCountdownWarningModal = (mContent, callback) => {
this.showSelectCountdownModal("警告", mContent, callback); showSelectCountdownModal('警告', mContent, callback)
}, }
// (++) // (++)
showSelectCountdownQuestionModal(mContent, callback) { const showSelectCountdownQuestionModal = (mContent, callback) => {
this.showSelectCountdownModal("疑问", mContent, callback); showSelectCountdownModal('疑问', mContent, callback)
}, }
// (++) // (++)
showSelectCountdownModal(mIconType, mContent, callback) { const showSelectCountdownModal = (mIconType, mContent, callback) => {
this.showModal({ showModal({
iconType: mIconType, iconType: mIconType,
content: mContent, content: mContent,
showConfirmCountdown: true, showConfirmCountdown: true,
success: function(res) { success(res) {
if (callback != undefined) { if (callback != undefined) {
if (res.confirm == true) { if (res.confirm == true) {
callback(true); callback(true)
console.log('用户点击确定') console.log('用户点击确定')
} else { } else {
callback(false); callback(false)
console.log('用户点击取消') console.log('用户点击取消')
} }
} }
} }
}); })
}, }
// //
showModal(data) { const showModal = (data) => {
if (data.iconType) { if (data.iconType) {
this.iconType = data.iconType iconType.value = data.iconType
switch (data.iconType) { switch (data.iconType) {
case '消息': case '消息':
this.icon = '/static/icons/error-circle.svg'; icon.value = '/static/icons/error-circle.svg'
break; break
case '成功': case '成功':
this.icon = '/static/icons/checkmark-circle.svg'; icon.value = '/static/icons/checkmark-circle.svg'
break; break
case '失败': case '失败':
this.icon = '/static/icons/close-circle.svg'; icon.value = '/static/icons/close-circle.svg'
break; break
case '警告': case '警告':
this.icon = '/static/icons/warning.svg'; icon.value = '/static/icons/warning.svg'
break; break
case '疑问': case '疑问':
this.icon = '/static/icons/question-circle.svg'; icon.value = '/static/icons/question-circle.svg'
break; break
default: default:
break; break
} }
} }
// image // image
if (data.title) { if (data.title) {
this.title = data.title title.value = data.title
} }
if (data.content) { if (data.content) {
this.content = data.content content.value = data.content
} else { } else {
this.content = '' content.value = ''
} }
if (data.cancelText) { if (data.cancelText) {
this.cancelText = data.cancelText cancelText.value = data.cancelText
} else { } else {
this.cancelText = '取消' cancelText.value = '取消'
} }
if (data.confirmText) { if (data.confirmText) {
this.confirmText = data.confirmText confirmText.value = data.confirmText
} else { } else {
this.confirmText = '确定' confirmText.value = '确定'
} }
if (data.showCancel === false || data.showCancel === true) { if (data.showCancel === false || data.showCancel === true) {
this.showCancel = data.showCancel showCancel.value = data.showCancel
} else { } else {
this.showCancel = true showCancel.value = true
} }
if (data.confirmColor) { if (data.confirmColor) {
this.confirmColor = data.confirmColor confirmColor.value = data.confirmColor
} else { } else {
this.confirmColor = '#007aff' confirmColor.value = '#007aff'
} }
if (data.cancelColor) { if (data.cancelColor) {
this.cancelColor = data.cancelColor cancelColor.value = data.cancelColor
} else { } else {
this.cancelColor = '#666F83' cancelColor.value = '#666F83'
}
if (data.textColor) {
textColor.value = data.textColor
} else {
textColor.value = ''
} }
if (data.showConfirmButton === false || data.showConfirmButton === true) { if (data.showConfirmButton === false || data.showConfirmButton === true) {
this.showConfirmButton = data.showConfirmButton showConfirmButton.value = data.showConfirmButton
} else { } else {
this.showConfirmButton = true showConfirmButton.value = true
} }
if (data.showConfirmCountdown === false || data.showConfirmCountdown === true) { if (data.showConfirmCountdown === false || data.showConfirmCountdown === true) {
this.showConfirmCountdown = data.showConfirmCountdown showConfirmCountdown.value = data.showConfirmCountdown
} else { } else {
this.showConfirmCountdown = false showConfirmCountdown.value = false
} }
if (data.showCancelButton === false || data.showCancelButton === true) { if (data.showCancelButton === false || data.showCancelButton === true) {
this.showCancelButton = data.showCancelButton showCancelButton.value = data.showCancelButton
} else { } else {
this.showCancelButton = true showCancelButton.value = true
} }
if (data.success) { if (data.success) {
this.success = data.success success.value = data.success
} else { } else {
this.success = () => {} success.value = () => {}
} }
setTimeout(res => { setTimeout((res) => {
this.open(); open()
}, 500) }, 500)
if (this.showConfirmCountdown) { if (showConfirmCountdown.value) {
this.startTimer(); startTimer()
}
} }
}, const startTimer = () => {
seconds.value = 3
startTimer() { clearInterval(timer.value)
this.seconds = 3; timer.value = setInterval(() => {
clearInterval(this.timer) seconds.value--
this.timer = setInterval(() => {
this.seconds--
// console.log("", this.seconds); // console.log("", this.seconds);
if (this.seconds <= 0) { if (seconds.value <= 0) {
this.timeUp() timeUp()
return
} }
}, 1000) }, 1000)
}, }
timeUp() { const timeUp = () => {
// clearInterval(this.timer) // clearInterval(this.timer)
console.log('时间到') confirmClose()
this.confirmClose(); }
}, defineExpose({
confirmClose,
}, cancelClose,
showSuccessMessage,
showErrorMessage,
showBreakMessage,
} showQuestionMessage,
showQuestionMessage1,
showWarningMessage,
showConfirmCountdownFailModal,
showConfirmMessageModal,
showConfirmSuccessModall,
showConfirmWarningModal,
showConfirmQuestionModal,
showNoButtonModal,
showConfirmModal,
showSelectMessageModal,
showSelectSuccessModal,
showSelectFailModal,
showSelectWarningModal,
showSelectModal,
showConfirmCountdownQuestionModal,
showConfirmCountdownModal,
showSelectCountdownMessageModal,
showSelectCountdownSuccessModal,
showSelectCountdownFailModal,
showSelectCountdownWarningModal,
showSelectCountdownQuestionModal,
showMessage,
showModal,
})
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.slot-content { .slot-content {
@ -425,6 +497,7 @@
display: flex; // display: flex; //
flex-direction: column; // flex-direction: column; //
align-items: center; // align-items: center; //
margin: 8rpx;
// background-image: url() // background-image: url()
} }
@ -476,4 +549,11 @@
.def_text { .def_text {
color: $uni-color-primary; color: $uni-color-primary;
} }
.text_content{
padding: 10rpx;
font-size: 32rpx;
text-align: center;
word-break: break-all;
white-space: normal;
}
</style> </style>

25
src/mycomponents/common/comPopup.vue

@ -10,26 +10,13 @@
</view> </view>
</template> </template>
<script> <script setup lang="ts">
export default { const closeScanPopup = () => {
emits: ["onClose"], emit("onClose", );
components: {
},
props: {
},
data() {
return {
}
},
methods: {
closeScanPopup() {
this.$emit("onClose", );
}
}
} }
//
const emit = defineEmits(['onClose'])
</script> </script>
<style> <style>

75
src/mycomponents/container/targetContainer.vue

@ -1,68 +1,57 @@
<template> <template>
<view class="uni-flex u-col-center" style="padding-top: 15rpx; <view class="uni-flex u-col-center" style="padding-top: 15rpx; padding-bottom: 15rpx; padding-left: 10rpx; padding-right: 10rpx; font-size: 32rpx">
padding-bottom: 15rpx; <text style="font-size: 35rpx">{{ title }} </text>
padding-left: 10rpx;
padding-right: 10rpx;
font-size:32rpx;">
<text style="font-size: 35rpx;">{{title}} </text>
<view class="uni-flex u-col-center" @click="showLocation"> <view class="uni-flex u-col-center" @click="showLocation">
<text style="color:#3FBAFF;font-size: 35rpx;" v-if="containerCode==''&&isShowEdit==true">&nbsp 请扫描</text> <text style="color: #3fbaff; font-size: 35rpx" v-if="containerCode == '' && isShowEdit == true">&nbsp 请扫描</text>
<text style="color:#3FBAFF; font-size: 35rpx;">&nbsp {{containerCode}}</text> <text style="color: #3fbaff; font-size: 35rpx">&nbsp {{ containerCode }}</text>
<image v-if="isShowEdit" style="width: 45rpx;height: 45rpx;" src="/static/icons/icons_edit.svg"></image> <image v-if="isShowEdit" style="width: 45rpx; height: 45rpx" src="/static/icons/icons_edit.svg"></image>
</view> </view>
<winScanContainer ref="scanContainer" :title="title" @getContainer='getContainer'></winScanContainer> <winScanContainer ref="scanContainer" :title="title" @getContainer="getContainer"></winScanContainer>
</view> </view>
</template> </template>
<script> <script setup lang="ts">
import winScanContainer from "@/mycomponents/scan/winScanContainer.vue" import { ref, getCurrentInstance, onMounted, nextTick, watch } from 'vue'
import winScanContainer from '@/mycomponents/scan/winScanContainer.vue'
export default { const defaultContainerCode = ref('')
components: { const props = defineProps({
winScanContainer
},
data() {
return {
defaultContainerCode: ""
}
},
props: {
title: { title: {
type: String, type: String,
default: "需求库位" default: '需求库位'
}, },
containerCode: { containerCode: {
type: String, type: String,
default: "" default: ''
}, },
isShowEdit: { isShowEdit: {
type: Boolean, type: Boolean,
default: true default: true
}, }
}, })
watch(
watch: { () => props.containerCode,
containerCode: { (val) => {
handler(newName, oldName) { if (val != '') {
if (this.containerCode != "") { defaultContainerCode.value = val
this.defaultContainerCode = this.containerCode;
} }
}, },
{
immediate: true, immediate: true,
deep: true deep: true
} }
}, )
methods: {
showLocation() { const showLocation = () => {
this.$refs.scanContainer.openScanPopup(); scanContainer.value.openScanPopup()
},
//
getContainer(containerInfo) {
this.$emit("getContainer", containerInfo)
}
} }
//
const getContainer = (containerInfo) => {
emit('getContainer', containerInfo)
} }
//
const emit = defineEmits(['getContainer'])
</script> </script>
<style> <style></style>
</style>

227
src/mycomponents/detail/comDetailCard.vue

@ -1,57 +1,37 @@
<template> <template>
<view class="" style="background-color: #fff;"> <view class="" style="background-color: #fff">
<uni-collapse ref="collapse1" @change=""> <u-collapse ref="collapse">
<uni-collapse-item :open="true"> <u-collapse-item :open="true">
<template v-slot:title> <template v-slot:title>
<item-compare-qty :dataContent="dataContent" :handleQty="dataContent.handleQty" :isShowStdPack="false"> <item-compare-qty :dataContent="dataContent" :handleQty="dataContent.handleQty" :isShowStdPack="false" style="width: 100%"> </item-compare-qty>
</item-compare-qty>
</template> </template>
<u-line></u-line> <u-swipe-action :show="item.show" :index="index" v-for="(item, index) in dataContent.subList" :key="index" :options="item.scaned ? scanOptions : detailOptions" bg-color="rgba(255,255,255,0)" @click="(...event) => swipeClick(event, item)">
<view class="" v-for="(item,index) in dataContent.subList"> <recommend :detail="item" :isShowFromLocation="isShowFromLocation" :isShowStatus="isShowStatus" :isShowToLocation="isShowToLocation"></recommend>
<uni-swipe-action ref="swipeAction"> </u-swipe-action>
<uni-swipe-action-item @click="swipeClick($event,item)" </u-collapse-item>
:right-options="item.scaned?scanOptions:detailOptions" </u-collapse>
style='padding:0px 0px 5px 0px;align-items: center;'> <balance-qty-edit ref="qtyEdit" :settingParam="settingParam" :queryBalance="queryBalance" @confirm="confirm"></balance-qty-edit>
<recommend :detail="item" :isShowToLocation="false"> <win-scan-location ref="scanLocationCode" title="目标库位" @getLocation="getLocation" :locationAreaTypeList="locationAreaTypeList"></win-scan-location>
</recommend> <com-message ref="comMessageRef" />
</uni-swipe-action-item>
</uni-swipe-action>
</view>
</uni-collapse-item>
</uni-collapse>
<balance-qty-edit ref="qtyEdit" :settingParam="settingParam" @confirm="confirm"></balance-qty-edit>
<win-scan-location ref="scanLocationCode" title="目标库位" @getLocation='getLocation'
:locationTypeList="locationTypeList"></win-scan-location>
<comMessage ref="message"></comMessage>
</view> </view>
</template> </template>
<script> <script setup lang="ts">
import { ref, getCurrentInstance, onMounted, nextTick, watch } from 'vue'
import itemCompareQty from '@/mycomponents/item/itemCompareQty.vue' import itemCompareQty from '@/mycomponents/item/itemCompareQty.vue'
import recommend from '@/mycomponents/recommend/recommend.vue' import recommend from '@/mycomponents/recommend/recommend.vue'
import balanceQtyEdit from '@/mycomponents/qty/balanceQtyEdit.vue' import balanceQtyEdit from '@/mycomponents/qty/balanceQtyEdit.vue'
import winScanLocation from "@/mycomponents/scan/winScanLocation.vue" import winScanLocation from '@/mycomponents/scan/winScanLocation.vue'
import { import { getDetailOption, getPurchaseReceiptOption } from '@/common/array.js'
getDetailOption,
getPurchaseReceiptOption
} from '@/common/array.js';
export default { const props = defineProps({
emits: ['openDetail', "updateData"],
components: {
itemCompareQty,
recommend,
balanceQtyEdit,
winScanLocation
},
props: {
dataContent: { dataContent: {
type: Object, type: Object,
default: {} default: null
}, },
settingParam: { settingParam: {
type: Object, type: Object,
default: {} default: null
}, },
isShowPack: { isShowPack: {
type: Boolean, type: Boolean,
@ -65,98 +45,121 @@
type: Boolean, type: Boolean,
default: true default: true
}, },
locationTypeList: { isShowFromLocation: {
type: Boolean,
default: true
},
isShowToLocation: {
type: Boolean,
default: false
},
locationAreaTypeList: {
type: Array, type: Array,
default: [] default: null
}, },
queryBalance: {
type: Boolean,
default: true
}, },
watch: { isShowStatus: {
dataContent: { type: Boolean,
handler(newName, oldName) { default: true
if (this.dataContent.subList.length > 0) { }
if (this.$refs.collapse1 != undefined && this.$refs.collapse1 != null) { })
this.$nextTick(res => { const option = ref([])
this.$refs.collapse1.resize() const showItem = ref({})
const editItem = ref({})
const locatonItem = ref({})
const detailOptions = ref([])
const scanOptions = ref([])
const comMessageRef = ref()
const collapse = ref()
const qtyEdit = ref()
const scanLocationCode = ref()
const dataContent = ref(props.dataContent)
dataContent.value.subList.forEach((item) => {
item.show = false
})
//
watch(
() => props.dataContent,
(val) => {
if (val.subList.length > 0) {
if (collapse.value != undefined && collapse.value != null) {
nextTick((res) => {
setTimeout(()=>{
collapse.value.init()
},500)
}) })
} }
} }
}, },
{
immediate: true, immediate: true,
deep: true deep: true
} }
}, )
onMounted(() => {
data() { if (detailOptions.value.length == 0) {
return { detailOptions.value = getDetailOption()
option: [],
showItem: {},
locatonItem: {},
editItem: {},
detailOptions: [],
scanOptions: []
} }
}, if (scanOptions.value.length == 0) {
scanOptions.value = getPurchaseReceiptOption(props.settingParam.allowModifyQty, false)
mounted() {
if (this.detailOptions.length == 0) {
this.detailOptions = getDetailOption();
} }
if (this.scanOptions.length == 0) { nextTick((res) => {
this.scanOptions = getPurchaseReceiptOption(this.settingParam.allowModifyQty, this.settingParam collapse.value.init()
.allowModifyLocation) })
showLocation()
})
const swipeClick = (params, item) => {
let text = ''
if (item.scaned) {
text = scanOptions.value[params[1]].text
} else {
text = detailOptions.value[params[1]].text
} }
}, if (text == '详情') {
detail(item)
methods: { } else if (text == '编辑') {
swipeClick(e, item) { edit(item)
if (e.content.text == "详情") { } else if (text == '库位') {
this.detail(item) showLocation(item)
} else if (e.content.text == "编辑") { } else if (text == '移除') {
this.edit(item) remove(item)
} else if (e.content.text == "库位") {
this.showLocation(item)
} else if (e.content.text == "移除") {
this.remove(item)
} }
}, }
edit(item) { const edit = (item) => {
this.editItem = item; editItem.value = item
this.$refs.qtyEdit.openEditPopup(item.balance, item.handleQty); qtyEdit.value.openEditPopup(item, item.handleQty)
}, }
const detail = (item) => {
detail(item) { emit('openDetail', item)
this.$emit('openDetail', item); }
// this.showItem = item; const remove = (item) => {
// this.$refs.jobDetailPopup.openPopup(item) comMessageRef.value.showQuestionMessage('确定移除扫描信息?', (res) => {
},
remove(item) {
this.$refs.message.showQuestionMessage("确定移除扫描信息?",
res => {
if (res) { if (res) {
item.scaned = false item.scaned = false
item.balance = {} item.balance = {}
item.handleQty = null; item.handleQty = null
this.$forceUpdate() emit('remove', item)
this.$emit('remove', item)
} }
}); })
}, }
confirm(qty) { const confirm = (qty) => {
this.editItem.handleQty = qty; editItem.value.handleQty = qty
this.$emit('updateData') emit('updateData')
},
showLocation(item) {
this.locatonItem = item;
this.$refs.scanLocationCode.openScanPopup();
},
//
getLocation(location, code) {
this.locatonItem.toLocationCode = code;
this.$emit('updateData')
},
} }
const showLocation = (item) => {
locatonItem.value = item
scanLocationCode.value.openScanPopup()
}
//
const getLocation = () => {
locatonItem.value.LocationCode = code
emit('updateData')
} }
//
const emit = defineEmits(['openDetail', 'remove', 'updateData'])
</script> </script>
<style> <style></style>
</style>

190
src/mycomponents/detail/comRequestDetailCard.vue

@ -1,53 +1,29 @@
<template> <template>
<view class="" style="background-color: #fff;"> <view class="" style="background-color: #fff">
<!-- <comReturnRequestInfo :workShopCode="dataContent.workshopCode" :dataContent="requestItem"> <u-collapse ref="collapse">
</comReturnRequestInfo> --> <u-collapse-item :open="true">
<uni-collapse ref="collapse1" @change="">
<uni-collapse-item :open="true">
<template v-slot:title> <template v-slot:title>
<item-compare-qty <item-compare-qty :dataContent="dataContent" :handleQty="Number(dataContent.handleQty)" :isShowStdPack="false" style="flex: 1"> </item-compare-qty>
:dataContent="dataContent"
:handleQty="Number(dataContent.handleQty)"
:isShowStdPack="false">
</item-compare-qty>
</template> </template>
<u-line /> <u-swipe-action :show="item.show" :index="index" v-for="(item, index) in dataContent.subList" :key="index" :options="item.scaned ? scanOptions : detailOptions" bg-color="rgba(255,255,255,0)" @click="(...event) => swipeClick(event, item)">
<view class="" v-for="(item,index) in dataContent.subList"> <recommend :detail="item" :record="item.record" :isShowPack="isShowPack" :isShowBatch="isShowBatch" :isShowFromLocation="isShowLocation"></recommend>
<uni-swipe-action ref="swipeAction"> </u-swipe-action>
<uni-swipe-action-item @click="swipeClick($event,item)" </u-collapse-item>
:right-options="item.scaned?scanOptions:detailOptions"> </u-collapse>
<recommend :detail="item" :record="item.record" :isShowPack="isShowPack"
:isShowBatch="isShowBatch" :isShowFromLocation="isShowLocation"></recommend>
</uni-swipe-action-item>
</uni-swipe-action>
</view>
</uni-collapse-item>
</uni-collapse>
<balance-qty-edit ref="qtyEdit" :settingParam="settingParam" @confirm="confirm"></balance-qty-edit> <balance-qty-edit ref="qtyEdit" :settingParam="settingParam" @confirm="confirm"></balance-qty-edit>
<comMessage ref="message"></comMessage> <com-message ref="comMessageRef" />
</view> </view>
</template> </template>
<script> <script setup lang="ts">
import { ref, getCurrentInstance, onMounted, watch, nextTick } from 'vue'
import itemCompareQty from '@/mycomponents/item/itemCompareQty.vue' import itemCompareQty from '@/mycomponents/item/itemCompareQty.vue'
import recommend from '@/mycomponents/recommend/recommend.vue' import recommend from '@/mycomponents/recommend/recommend.vue'
import balanceQtyEdit from '@/mycomponents/qty/balanceQtyEdit.vue' import balanceQtyEdit from '@/mycomponents/qty/balanceQtyEdit.vue'
import comReturnRequestInfo from '@/pages/productionReturn/coms/comReturnRequestInfo.vue' import comReturnRequestInfo from '@/pages/productionReturn/coms/comReturnRequestInfo.vue'
import { import { getDetailOption, getDetailEditRemoveOption, getDetailRemoveOption } from '@/common/array.js'
getDetailOption,
getDetailEditRemoveOption,
getDetailRemoveOption
} from '@/common/array.js';
export default { const props = defineProps({
emits: ['openDetail'],
components: {
itemCompareQty,
recommend,
balanceQtyEdit,
comReturnRequestInfo
},
props: {
dataContent: { dataContent: {
type: Object, type: Object,
default: {} default: {}
@ -67,85 +43,93 @@
isShowLocation: { isShowLocation: {
type: Boolean, type: Boolean,
default: true default: true
},
},
watch: {
dataContent(newVal) {
var test =this.dataContent
this.requestItem = newVal.subList[0];
},
},
data() {
return {
option: [],
showItem: {},
editItem: {
record: {
} }
}, })
detailOptions: [], const option = ref([])
scanOptions: [], const showItem = ref({})
requestItem:{} const editItem = ref({
record: {}
})
const detailOptions = ref([])
const scanOptions = ref([])
const requestItem = ref({})
const qtyEdit = ref()
const comMessageRef = ref()
const dataContent = ref([])
const collapse = ref()
dataContent.value = props.dataContent
dataContent.value.subList.forEach((item) => {
item.show = false
})
onMounted(() => {
if (detailOptions.value.length == 0) {
detailOptions.value = getDetailOption()
} }
}, if (scanOptions.value.length == 0) {
scanOptions.value = getDetailEditRemoveOption()
mounted() {
if (this.detailOptions.length == 0) {
this.detailOptions = getDetailOption();
} }
if (this.scanOptions.length == 0) { })
this.scanOptions = getDetailEditRemoveOption(); //
// if (this.dataContent.allowModifyQty == 1) { watch(
// this.scanOptions = getDetailEditRemoveOption(); () => props.dataContent,
// } else { (val) => {
// this.scanOptions = getDetailRemoveOption(); requestItem.value = val.subList[0]
// } dataContent.value = val
dataContent.value.subList.forEach((item) => {
item.show = false
})
nextTick(() => {
collapse.value.init()
})
},
{
immediate: true,
deep: true
} }
}, )
const swipeClick = (params, item) => {
methods: { let text = ''
swipeClick(e, item) { if (item.scaned) {
if (e.content.text == "详情") { text = scanOptions.value[params[1]].text
this.detail(item) } else {
} else if (e.content.text == "编辑") { text = detailOptions.value[params[1]].text
this.edit(item)
} else if (e.content.text == "移除") {
this.remove(item)
} }
}, if (text == '详情') {
edit(item) { detail(item)
this.editItem = item; } else if (text == '编辑') {
this.$refs.qtyEdit.openEditPopup(item.balance, item.record.qty); edit(item)
}, } else if (text == '移除') {
remove(item)
detail(item) { }
this.$emit('openDetail', item); }
// this.showItem = item; const edit = (item) => {
// this.$refs.jobDetailPopup.openPopup(item) editItem.value = item
}, qtyEdit.value.openEditPopup(item.balance, item.record.qty)
remove(item) { }
this.$refs.message.showQuestionMessage("确定移除扫描信息?", const detail = (item) => {
res => { emit('openDetail', item)
}
const remove = (item) => {
comMessageRef.value.showQuestionMessage('确定移除扫描信息?', (res) => {
if (res) { if (res) {
item.scaned = false item.scaned = false
item.record = {} item.record = {}
item.balance = {} item.balance = {}
item.inventoryStatus = item.RecommendInventoryStatus item.inventoryStatus = item.RecommendInventoryStatus
// item.record.qty = 0; emit('remove', item)
this.$forceUpdate()
this.$emit('remove', item)
}
});
},
confirm(qty) {
this.editItem.record.qty = qty;
this.$emit('updateData')
} }
})
} }
const confirm = (qty) => {
editItem.value.record.qty = qty
emit('updateData')
} }
//
const emit = defineEmits(['openDetail', 'remove', 'updateData'])
</script> </script>
<style> <style>
::v-deep .u-arrow-down-icon {
margin-right: 0px !important;
}
</style> </style>

34
src/mycomponents/detail/detailBalanceInfo.vue

@ -15,12 +15,12 @@
<text class="item_title">数量 : </text> <text class="item_title">数量 : </text>
<view class="text_wrap"> <view class="text_wrap">
<text class="text_wrap">{{Number(dataContent.qty)}}</text> <text class="text_wrap">{{Number(dataContent.qty)}}</text>
<text class="text_wrap">{{getUnitInfo(dataContent.uom)}}</text> <text class="text_wrap">{{handleGetUomInfo(dataContent.uom)}}</text>
</view> </view>
</view> </view>
<view class="item"> <view class="item">
<text class="item_title">库存状态 : </text> <text class="item_title">库存状态 : </text>
<text class="text_wrap">{{getInventoryStatusInfo(dataContent.inventoryStatus)}}</text> <text class="text_wrap">{{handleGetInventoryStatusInfo(dataContent.inventoryStatus)}}</text>
</view> </view>
<view class="item"> <view class="item">
<text class="item_title">来源库位 : </text> <text class="item_title">来源库位 : </text>
@ -29,37 +29,25 @@
</view> </view>
</template> </template>
<script> <script setup lang="ts">
import { import {
getInventoryStatusName, getInventoryStatusName,
getStdPackUnitInfo, getPackUnitInfo,
getUnitInfo getUomInfo
} from '@/common/directory.js'; } from '@/common/directory.js';
export default { const props = defineProps({
components: {},
data() {
return {
}
},
mounted() {},
props: {
dataContent: { dataContent: {
type: Object, type: Object,
default: {} default: {}
} }
}, })
const handleGetInventoryStatusInfo=(value)=> {
methods: {
getInventoryStatusInfo(value) {
return getInventoryStatusName(value) return getInventoryStatusName(value)
},
getUnitInfo(value){
return getUnitInfo(value).label
}
} }
const handleGetUomInfo=(value)=>{
return getUomInfo(value).label
} }
</script> </script>
<style> <style>

55
src/mycomponents/detail/detailCommonInfo.vue

@ -1,65 +1,48 @@
<template> <template>
<view class="pop_detail" style="height: 80%"> <view class="pop_detail" style="height: 80%">
<view class="u-p-t-20 u-p-b-20">
<com-item :dataContent="dataContent"></com-item> <com-item :dataContent="dataContent"></com-item>
<u-line></u-line> </view>
<scroll-view style="height:320px "> <view class="split_line"></view>
<scroll-view style="height: 320px" scroll-y>
<detail-item-info :dataContent="dataContent"></detail-item-info> <detail-item-info :dataContent="dataContent"></detail-item-info>
<u-line></u-line> <view class="split_line"></view>
<detail-recommend-info :dataContent="dataContent"></detail-recommend-info> <detail-recommend-info :dataContent="dataContent"></detail-recommend-info>
<u-line></u-line> <view class="split_line"></view>
<view v-if="dataContent.record != undefined"> <view v-if="dataContent.record != undefined">
<detail-handle-info :dataContent="dataContent"> <detail-handle-info :dataContent="dataContent"> </detail-handle-info>
</detail-handle-info> <view class="split_line"></view>
<u-line></u-line>
</view> </view>
<slot> <slot>
<!-- 每个任务的详情 --> <!-- 每个任务的详情 -->
</slot> </slot>
</scroll-view> </scroll-view>
<view class="uni-flex u-row-center "> <view class="uni-flex u-row-center u-p-t-20 u-p-b-20">
<view class="close_button" @click="closePopup"> <view class="close_button" @click="closePopup"> 关闭</view>
关闭</view>
<!-- button 滚动不好使 --> <!-- button 滚动不好使 -->
</view> </view>
</view> </view>
</template> </template>
<script> <script setup lang="ts">
import comItem from '@/mycomponents/item/item.vue' import comItem from '@/mycomponents/item/item.vue'
import detailItemInfo from '@/mycomponents/detail/detailItemInfo.vue' import detailItemInfo from '@/mycomponents/detail/detailItemInfo.vue'
import detailRecommendInfo from '@/mycomponents/detail/detailRecommendInfo.vue' import detailRecommendInfo from '@/mycomponents/detail/detailRecommendInfo.vue'
import detailHandleInfo from '@/mycomponents/detail/detailHandleInfo.vue' import detailHandleInfo from '@/mycomponents/detail/detailHandleInfo.vue'
export default { const props = defineProps({
emits: ['onClose'],
components: {
comItem,
detailItemInfo,
detailRecommendInfo,
detailHandleInfo
},
data() {
return {}
},
mounted() {},
props: {
dataContent: { dataContent: {
type: Object, type: Object,
default: {} default: {}
} }
}, })
const closePopup = () => {
methods: { emit('onClose')
closePopup() {
this.$emit('onClose')
},
}
} }
</script>
<style>
//
const emit = defineEmits(['onClose'])
</script>
</style> <style></style>

Some files were not shown because too many files changed in this diff

Loading…
Cancel
Save