958 changed files with 63727 additions and 134595 deletions
@ -1,4 +1,15 @@ |
|||
|
|||
VITE_BASE_URL=http://localhost:12080/admin-api |
|||
#VITE_BASE_URL=http://dev.ccwin-in.com:25203/api/admin-api |
|||
VITE_BASE_URL_IMAGE=http://localhost:12080/admin-api |
|||
#VITE_BASE_URL=http://dev.ccwin-in.com:28051/api/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" |
@ -1,4 +1,7 @@ |
|||
# VITE_BASE_URL=http://dev.ccwin-in.com:23111/app |
|||
# 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_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_isDevelopment=false |
|||
|
|||
# 积木报表请求路径 |
|||
VITE_JMREPORT_BASE_URL='http://172.21.32.14:90' |
|||
|
@ -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' |
|||
|
File diff suppressed because it is too large
@ -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> |
@ -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> |
@ -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
|
@ -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" |
|||
} |
@ -1,17 +0,0 @@ |
|||
{ |
|||
"pages": [ //pages数组中第一项表示应用启动页,参考:https://uniapp.dcloud.io/collocation/pages |
|||
{ |
|||
"path": "pages/index/index", |
|||
"style": { |
|||
"navigationBarTitleText": "uni-app" |
|||
} |
|||
} |
|||
], |
|||
"globalStyle": { |
|||
"navigationBarTextStyle": "black", |
|||
"navigationBarTitleText": "uni-app", |
|||
"navigationBarBackgroundColor": "#F8F8F8", |
|||
"backgroundColor": "#F8F8F8" |
|||
}, |
|||
"uniIdRouter": {} |
|||
} |
@ -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> |
Before Width: | Height: | Size: 3.9 KiB |
@ -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])); |
|||
}); |
|||
}, |
|||
}); |
@ -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; |
@ -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})
|
|||
// }
|
@ -1,6 +0,0 @@ |
|||
import http from '../http' |
|||
|
|||
// 文件列表
|
|||
export function listNoPage(params) { |
|||
return http.post('/eam/attachment-file/listNoPage',{params}) |
|||
} |
@ -1,5 +0,0 @@ |
|||
import http from '../http' |
|||
// 根据模具号查询信息
|
|||
export function getBasicFaultTypeNoPage(params) { |
|||
return http.get('/eam/basic-fault-type/noPage',{params}) |
|||
} |
@ -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}) |
|||
} |
@ -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 |
|||
} |
@ -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) |
|||
} |
|||
|
@ -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}) |
|||
} |
@ -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 |
|||
}) |
|||
} |
@ -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') |
|||
} |
@ -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) |
|||
} |
@ -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) |
|||
} |
@ -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}) |
|||
} |
@ -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) |
|||
} |
|||
|
@ -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') |
|||
} |
@ -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) |
|||
} |
|||
} |
@ -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') |
|||
} |
|||
|
@ -1,5 +0,0 @@ |
|||
import http from './http' |
|||
// 获取库位
|
|||
export function getLocation(number) { |
|||
return http.get('/eam/location/scanCodeByNumber?number='+number) |
|||
} |
@ -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 |
|||
} |
@ -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) |
|||
} |
@ -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) |
|||
} |
@ -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}) |
|||
} |
@ -1,8 +0,0 @@ |
|||
import http from '../../http' |
|||
|
|||
|
|||
export function create(data) { |
|||
return http.post('/mes/work-scheduling-qaform/create',data) |
|||
} |
|||
|
|||
|
@ -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) |
|||
} |
@ -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) |
|||
} |
@ -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) |
|||
} |
|||
|
|||
|
@ -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) |
|||
} |
|||
|
@ -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) |
|||
} |
File diff suppressed because it is too large
@ -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}) |
|||
} |
@ -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}) |
|||
} |
@ -1,16 +1,24 @@ |
|||
/* 解决js计算精度问题 */ |
|||
import { Decimal } from 'decimal.js';//引入
|
|||
import Decimal from 'decimal.js' |
|||
class Calc { |
|||
add(num1,num2) { |
|||
num1 = num1 || 0 |
|||
num2 = num2 || 0 |
|||
return new Decimal(num1).add(new Decimal(num2)).toNumber() |
|||
} |
|||
sub(num1,num2) { |
|||
num1 = num1 || 0 |
|||
num2 = num2 || 0 |
|||
return new Decimal(num1).sub(new Decimal(num2)).toNumber() |
|||
} |
|||
mul(num1,num2) { |
|||
num1 = num1 || 0 |
|||
num2 = num2 || 0 |
|||
return new Decimal(num1).mul(new Decimal(num2)).toNumber() |
|||
} |
|||
div(num1,num2) { |
|||
num1 = num1 || 0 |
|||
num2 = num2 || 0 |
|||
return new Decimal(num1).div(new Decimal(num2)).toNumber() |
|||
} |
|||
} |
|||
|
@ -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 |
|||
}; |
@ -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, |
|||
}; |
@ -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) |
|||
} |
@ -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 |
|||
} |
@ -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 |
|||
} |
@ -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> |
|||
|
@ -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> |
@ -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> |
File diff suppressed because one or more lines are too long
@ -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(); |
|||
} |
@ -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) |
|||
} |
|||
}) |
|||
}) |
|||
} |
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -1,54 +1,49 @@ |
|||
<!--发料任务卡片--> |
|||
<template> |
|||
<!-- <page-meta root-font-size="18px"></page-meta> --> |
|||
<uni-popup ref="popupItems" type="center"> |
|||
<scroll-view scroll-y="true" style="background-color: #EEEEEE;height: 90vh;"> |
|||
<item :dataContent="balanceItems[0]"></item> |
|||
<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)"> |
|||
<balance :dataContent="item"></balance> |
|||
<u-popup v-model="show" mode="center"> |
|||
<scroll-view scroll-y="true" style="background-color: #eeeeee; height: 90vh"> |
|||
<item style="margin: 10rpx" :dataContent="balanceItems[0]"></item> |
|||
<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)"> |
|||
<balance :dataContent="item" :isShowStatus="false"></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> |
|||
</scroll-view> |
|||
</uni-popup> |
|||
</u-popup> |
|||
</template> |
|||
|
|||
<script> |
|||
<script setup lang="ts"> |
|||
import { ref, getCurrentInstance } from 'vue' |
|||
import item from '@/mycomponents/item/item.vue' |
|||
import balance from '@/mycomponents/balance/balance.vue' |
|||
|
|||
export default { |
|||
name: "balanceSelect", |
|||
emits: ['onSelectItem'], |
|||
components: { |
|||
item, |
|||
balance |
|||
}, |
|||
data() { |
|||
return { |
|||
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 balanceItems = ref([]) |
|||
const show = ref(false) |
|||
const openPopup = (items) => { |
|||
if (Array.isArray(items)) { |
|||
balanceItems.value = items |
|||
} else { |
|||
balanceItems.value = [items] |
|||
} |
|||
show.value = true |
|||
} |
|||
|
|||
const callback = (item) => { |
|||
emit('onSelectItem', item) |
|||
show.value = false |
|||
} |
|||
|
|||
const close = () => { |
|||
show.value = false |
|||
} |
|||
const emit = defineEmits(['onSelectItem']) |
|||
defineExpose({ openPopup }) |
|||
</script> |
|||
|
|||
<style scoped lang="scss"> |
|||
</style> |
|||
<style scoped lang="scss"></style> |
|||
|
@ -1,24 +1,19 @@ |
|||
<template> |
|||
<view class="card_view"> |
|||
<text class="card_batch card_content ">批次</text> |
|||
<text class="card_batch">批次</text> |
|||
<text class="card_content">{{batch}}</text> |
|||
</view> |
|||
</template> |
|||
|
|||
<script> |
|||
export default { |
|||
data() { |
|||
return {} |
|||
}, |
|||
props: { |
|||
<script setup lang="ts"> |
|||
const props = defineProps({ |
|||
batch: { |
|||
type: String, |
|||
default: "" |
|||
} |
|||
}, |
|||
|
|||
} |
|||
}) |
|||
</script> |
|||
|
|||
<style> |
|||
<style scoped> |
|||
|
|||
</style> |
|||
|
@ -1,37 +1,26 @@ |
|||
<template> |
|||
<view class="business_view"> |
|||
<text class="card_business">{{businessTypeDesc(bussinessType)}}</text> |
|||
<text class="card_business_content">{{number}}</text> |
|||
<view class="card_view"> |
|||
<text class="card_business">业务类型</text> |
|||
<text class="card_business_content">{{ businessTypeDesc(bussinessType) }}</text> |
|||
</view> |
|||
</template> |
|||
|
|||
<script> |
|||
import { |
|||
getBusinessTypeDesc |
|||
} from '@/common/directory.js'; |
|||
export default { |
|||
data() { |
|||
return {} |
|||
}, |
|||
props: { |
|||
<script setup lang="ts"> |
|||
import { getBusinessTypeName } from '@/common/directory.js' |
|||
|
|||
const props = defineProps({ |
|||
bussinessType: { |
|||
type: String, |
|||
default: "" |
|||
default: '' |
|||
}, |
|||
number: { |
|||
type: String, |
|||
default: "" |
|||
} |
|||
}, |
|||
methods:{ |
|||
businessTypeDesc(type){ |
|||
return getBusinessTypeDesc(type) |
|||
default: '' |
|||
} |
|||
|
|||
} |
|||
|
|||
}) |
|||
const businessTypeDesc = (type) => { |
|||
return getBusinessTypeName(type) |
|||
} |
|||
</script> |
|||
|
|||
<style> |
|||
</style> |
|||
<style></style> |
|||
|
@ -1,34 +1,33 @@ |
|||
<template> |
|||
<view class="card_view"> |
|||
<text class="card_packing_code card_content ">箱码</text> |
|||
<view class="card_view" v-if="ShowPackingNumber"> |
|||
<text class="card_packing_code">{{ title }}</text> |
|||
<text class="card_content">{{ packingCode }}</text> |
|||
</view> |
|||
</template> |
|||
|
|||
<script> |
|||
export default { |
|||
components: { |
|||
}, |
|||
|
|||
data() { |
|||
return { |
|||
|
|||
} |
|||
}, |
|||
props: { |
|||
<script setup lang="ts"> |
|||
import {getSwitchInfoByCode} from '@/common/basic.js'; |
|||
import {onMounted} from "vue"; |
|||
import {ref} from "vue"; |
|||
const props = defineProps({ |
|||
packingCode: { |
|||
type: String, |
|||
default: '' |
|||
}, |
|||
}, |
|||
watch: { |
|||
|
|||
}, |
|||
methods: { |
|||
|
|||
} |
|||
title: { |
|||
type: String, |
|||
default: '包装' |
|||
} |
|||
}) |
|||
const ShowPackingNumber = ref(true) |
|||
onMounted(()=>{ |
|||
ShowPackingNumber.value = getSwitchInfoByCode('ShowPackingNumber') |
|||
}) |
|||
</script> |
|||
|
|||
<style> |
|||
<style lang="scss" scoped> |
|||
.card_packing_code { |
|||
|
|||
padding: 0; |
|||
} |
|||
</style> |
|||
|
@ -1,31 +1,19 @@ |
|||
<template> |
|||
<view class="card_view"> |
|||
<text class="card_to_location card_content ">{{title}}</text> |
|||
<text class="card_content ">{{locationCode}}</text> |
|||
<text class="card_to_location">{{ title }}</text> |
|||
<text class="card_big_content">{{ locationCode }}</text> |
|||
</view> |
|||
</template> |
|||
|
|||
<script> |
|||
export default { |
|||
components: { |
|||
}, |
|||
data() { |
|||
return {} |
|||
}, |
|||
props: { |
|||
<script setup lang="ts"> |
|||
const props = defineProps({ |
|||
locationCode: { |
|||
type: String, |
|||
default: '' |
|||
type: String |
|||
}, |
|||
title: { |
|||
type: String, |
|||
default: '库位' |
|||
}, |
|||
|
|||
}, |
|||
|
|||
} |
|||
}) |
|||
</script> |
|||
|
|||
<style> |
|||
</style> |
|||
<style></style> |
|||
|
@ -1,68 +1,57 @@ |
|||
<template> |
|||
<view class="uni-flex u-col-center" style="padding-top: 15rpx; |
|||
padding-bottom: 15rpx; |
|||
padding-left: 10rpx; |
|||
padding-right: 10rpx; |
|||
font-size:32rpx;"> |
|||
<text style="font-size: 35rpx;">{{title}} </text> |
|||
<view class="uni-flex u-col-center" style="padding-top: 15rpx; padding-bottom: 15rpx; 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"> |
|||
<text style="color:#3FBAFF;font-size: 35rpx;" v-if="containerCode==''&&isShowEdit==true">  请扫描</text> |
|||
<text style="color:#3FBAFF; font-size: 35rpx;">  {{containerCode}}</text> |
|||
<image v-if="isShowEdit" style="width: 45rpx;height: 45rpx;" src="/static/icons/icons_edit.svg"></image> |
|||
<text style="color: #3fbaff; font-size: 35rpx" v-if="containerCode == '' && isShowEdit == true">  请扫描</text> |
|||
<text style="color: #3fbaff; font-size: 35rpx">  {{ containerCode }}</text> |
|||
<image v-if="isShowEdit" style="width: 45rpx; height: 45rpx" src="/static/icons/icons_edit.svg"></image> |
|||
</view> |
|||
<winScanContainer ref="scanContainer" :title="title" @getContainer='getContainer'></winScanContainer> |
|||
<winScanContainer ref="scanContainer" :title="title" @getContainer="getContainer"></winScanContainer> |
|||
</view> |
|||
</template> |
|||
|
|||
<script> |
|||
import winScanContainer from "@/mycomponents/scan/winScanContainer.vue" |
|||
<script setup lang="ts"> |
|||
import { ref, getCurrentInstance, onMounted, nextTick, watch } from 'vue' |
|||
import winScanContainer from '@/mycomponents/scan/winScanContainer.vue' |
|||
|
|||
export default { |
|||
components: { |
|||
winScanContainer |
|||
}, |
|||
data() { |
|||
return { |
|||
defaultContainerCode: "" |
|||
} |
|||
}, |
|||
props: { |
|||
const defaultContainerCode = ref('') |
|||
const props = defineProps({ |
|||
title: { |
|||
type: String, |
|||
default: "需求库位" |
|||
default: '需求库位' |
|||
}, |
|||
containerCode: { |
|||
type: String, |
|||
default: "" |
|||
default: '' |
|||
}, |
|||
isShowEdit: { |
|||
type: Boolean, |
|||
default: true |
|||
}, |
|||
}, |
|||
|
|||
watch: { |
|||
containerCode: { |
|||
handler(newName, oldName) { |
|||
if (this.containerCode != "") { |
|||
this.defaultContainerCode = this.containerCode; |
|||
} |
|||
}) |
|||
watch( |
|||
() => props.containerCode, |
|||
(val) => { |
|||
if (val != '') { |
|||
defaultContainerCode.value = val |
|||
} |
|||
}, |
|||
{ |
|||
immediate: true, |
|||
deep: true |
|||
} |
|||
}, |
|||
methods: { |
|||
showLocation() { |
|||
this.$refs.scanContainer.openScanPopup(); |
|||
}, |
|||
//扫描源库位 |
|||
getContainer(containerInfo) { |
|||
this.$emit("getContainer", containerInfo) |
|||
} |
|||
) |
|||
|
|||
const showLocation = () => { |
|||
scanContainer.value.openScanPopup() |
|||
} |
|||
// 扫描源库位 |
|||
const getContainer = (containerInfo) => { |
|||
emit('getContainer', containerInfo) |
|||
} |
|||
|
|||
// 传递给父类 |
|||
const emit = defineEmits(['getContainer']) |
|||
</script> |
|||
|
|||
<style> |
|||
</style> |
|||
<style></style> |
|||
|
@ -1,65 +1,48 @@ |
|||
<template> |
|||
<view class="pop_detail" style="height: 80%"> |
|||
<view class="u-p-t-20 u-p-b-20"> |
|||
<com-item :dataContent="dataContent"></com-item> |
|||
<u-line></u-line> |
|||
<scroll-view style="height:320px "> |
|||
</view> |
|||
<view class="split_line"></view> |
|||
<scroll-view style="height: 320px" scroll-y> |
|||
<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> |
|||
<u-line></u-line> |
|||
<view class="split_line"></view> |
|||
<view v-if="dataContent.record != undefined"> |
|||
<detail-handle-info :dataContent="dataContent"> |
|||
</detail-handle-info> |
|||
<u-line></u-line> |
|||
<detail-handle-info :dataContent="dataContent"> </detail-handle-info> |
|||
<view class="split_line"></view> |
|||
</view> |
|||
<slot> |
|||
<!-- 每个任务的详情 --> |
|||
</slot> |
|||
</scroll-view> |
|||
|
|||
<view class="uni-flex u-row-center "> |
|||
<view class="close_button" @click="closePopup"> |
|||
关闭</view> |
|||
<view class="uni-flex u-row-center u-p-t-20 u-p-b-20"> |
|||
<view class="close_button" @click="closePopup"> 关闭</view> |
|||
<!-- button 滚动不好使 --> |
|||
</view> |
|||
</view> |
|||
</template> |
|||
|
|||
<script> |
|||
<script setup lang="ts"> |
|||
import comItem from '@/mycomponents/item/item.vue' |
|||
import detailItemInfo from '@/mycomponents/detail/detailItemInfo.vue' |
|||
import detailRecommendInfo from '@/mycomponents/detail/detailRecommendInfo.vue' |
|||
import detailHandleInfo from '@/mycomponents/detail/detailHandleInfo.vue' |
|||
|
|||
export default { |
|||
emits: ['onClose'], |
|||
components: { |
|||
comItem, |
|||
detailItemInfo, |
|||
detailRecommendInfo, |
|||
detailHandleInfo |
|||
}, |
|||
data() { |
|||
return {} |
|||
}, |
|||
|
|||
mounted() {}, |
|||
props: { |
|||
const props = defineProps({ |
|||
dataContent: { |
|||
type: Object, |
|||
default: {} |
|||
} |
|||
}, |
|||
|
|||
methods: { |
|||
closePopup() { |
|||
this.$emit('onClose') |
|||
}, |
|||
} |
|||
}) |
|||
const closePopup = () => { |
|||
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…
Reference in new issue